JP5282533B2 - Image processing apparatus, imaging apparatus, and program - Google Patents
Image processing apparatus, imaging apparatus, and program Download PDFInfo
- Publication number
- JP5282533B2 JP5282533B2 JP2008290011A JP2008290011A JP5282533B2 JP 5282533 B2 JP5282533 B2 JP 5282533B2 JP 2008290011 A JP2008290011 A JP 2008290011A JP 2008290011 A JP2008290011 A JP 2008290011A JP 5282533 B2 JP5282533 B2 JP 5282533B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- reference image
- processing apparatus
- image processing
- value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000012545 processing Methods 0.000 title claims description 80
- 238000003384 imaging method Methods 0.000 title claims description 18
- 238000000034 method Methods 0.000 claims description 24
- 230000008569 process Effects 0.000 claims description 20
- 238000009499 grossing Methods 0.000 claims description 18
- 238000006243 chemical reaction Methods 0.000 claims description 7
- 230000008859 change Effects 0.000 claims description 3
- 230000003287 optical effect Effects 0.000 description 10
- 230000000875 corresponding effect Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 7
- 230000004048 modification Effects 0.000 description 5
- 238000012986 modification Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 230000008901 benefit Effects 0.000 description 3
- 230000006872 improvement Effects 0.000 description 3
- 241000282414 Homo sapiens Species 0.000 description 2
- 239000006185 dispersion Substances 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000014509 gene expression Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 238000012935 Averaging Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000012805 post-processing Methods 0.000 description 1
- 238000003825 pressing Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
Images
Landscapes
- Studio Devices (AREA)
Description
本発明は、複数の画像を用いて画像処理でぼかし画像を生成する画像処理装置、撮像装置およびプログラムに関する。 The present invention relates to an image processing apparatus, an imaging apparatus, and a program that generate a blurred image by image processing using a plurality of images.
例えば、カメラによるポートレート撮影では、絞りの開放などで被写界深度を浅くして意図的に前景や背景の被写体をぼかし、主要被写体を浮かび上がらせる写真表現が好まれている。ところが、電子カメラでは、撮像素子の大きさ(撮像面積)や絞りの構成などに起因して、上記のようなボケ味を生かした写真表現を苦手とすることが多い。 For example, in portrait photography with a camera, a photographic expression that deliberately blurs the foreground or background subject by shallowly opening the aperture to open the main subject is preferred. However, electronic cameras often do not like photographic expressions that take advantage of the above-mentioned blur due to the size of the image sensor (imaging area), the configuration of the diaphragm, and the like.
そのため、電子カメラで撮像した複数の画像から被写界深度の浅い画像を電子的に生成する手法も従来から提案されている。一例として特許文献1には、焦点距離または絞りを変化させて電子カメラで複数の画像を取得し、撮影時の焦点距離または絞りの情報を用いた領域分割により、背景領域をぼかしたポートレート調のぼかし画像を生成する技術が開示されている。
しかし、上記の従来技術では、撮影時の焦点距離または絞りの情報がない場合にはぼかし画像を生成することはできず、また、主要被写体と背景領域との領域分割に不具合があると、ぼかし画像での被写体のボケ方が不自然となる点で改善の余地があった。 However, in the above prior art, a blurred image cannot be generated if there is no focal length or aperture information at the time of shooting, and if there is a defect in the area division between the main subject and the background area, There was room for improvement in that the subject was blurred in the image.
そこで、本発明の目的は、焦点距離または絞りの情報を用いることなく、複数の画像を用いて画像処理で見映えのよいぼかし画像を生成する手段を提供することにある。 Therefore, an object of the present invention is to provide means for generating a blurred image having a good appearance by image processing using a plurality of images without using focal length or aperture information.
一の態様に係る画像処理装置は、基準画像と、前記基準画像に対してレンズの焦点位置をそれぞれ変化させた状態で撮像された複数の撮像画像とを取得する画像読込部と、前記基準画像及び前記複数の撮像画像毎に高周波成分をそれぞれ抽出し、抽出した高周波成分の分布を示す高周波成分画像を各々位置合わせした後に合成して前記基準画像よりも被写体深度が深い参照画像を生成する画像処理部と、前記基準画像及び前記参照画像の各位置に対応する輝度成分に基づいて前記各画像の特徴量を求める特徴量演算部と、前記基準画像から求めた各位置の第1の特徴量と前記参照画像から求めた各位置の第2の特徴量との、対応位置間での差分を用いて、前記基準画像の合焦度に関するパラメータの値を画像の各位置でそれぞれ設定するパラメータ設定部と、各々の前記パラメータの値に応じて画像の各位置でぼかし度合いを変化させるぼかし処理を前記基準画像に施して、ぼかし画像を生成するぼかし画像生成部と、を備えるものである。 An image processing apparatus according to an aspect includes an image reading unit that acquires a reference image and a plurality of captured images that are captured in a state in which a focal position of a lens is changed with respect to the reference image, and the reference image And an image for extracting a high frequency component for each of the plurality of captured images, combining the high frequency component images indicating the distribution of the extracted high frequency components, and then combining them to generate a reference image having a deeper subject depth than the reference image A processing unit; a feature amount computing unit for obtaining a feature amount of each image based on a luminance component corresponding to each position of the base image and the reference image; and a first feature amount at each position obtained from the base image And a second feature value obtained from the reference image at each position, using the difference between the corresponding positions, a parameter value for setting the parameter value relating to the focus degree of the reference image at each position of the image. And a blurred image generation unit that generates a blurred image by subjecting the reference image to a blurring process that changes a blurring degree at each position of the image according to each parameter value. is there.
ここで、上記の一の態様の画像処理装置を備えた撮像装置、コンピュータを上記の一の態様の画像処理装置として機能させるプログラムやこのプログラムを記憶したプログラム記憶媒体、上記の一の態様の画像処理装置における動作を方法のカテゴリで表現したものも、本発明の具体的態様として有効である。 Here, an imaging apparatus including the image processing apparatus according to the one aspect, a program that causes a computer to function as the image processing apparatus according to the one aspect, a program storage medium storing the program, and an image according to the one aspect A representation of the operation in the processing apparatus in the category of the method is also effective as a specific aspect of the present invention.
本発明によれば、焦点距離または絞りの情報を用いることなく、基準画像および参照画像を用いて画像処理により見映えのよいぼかし画像を生成できる。 According to the present invention, it is possible to generate a blurred image having a good appearance by image processing using a standard image and a reference image without using focal length or aperture information.
<一の実施形態の説明>
図1は、一の実施形態の画像処理装置を含む電子カメラの概略構成を示すブロック図である。電子カメラ11は、撮像光学系12と、レンズ駆動部13と、絞り14と、絞り駆動部15と、撮像素子16と、AFE17と、CPU18と、第1メモリ19および第2メモリ20と、メディアI/F21と、通信I/F22と、モニタ23と、レリーズ釦24とを有している。ここで、レンズ駆動部13、絞り駆動部15、AFE17、第1メモリ19、第2メモリ20、メディアI/F21、通信I/F22、モニタ23、レリーズ釦24は、それぞれCPU18と接続されている。
<Description of One Embodiment>
FIG. 1 is a block diagram illustrating a schematic configuration of an electronic camera including an image processing apparatus according to an embodiment. The
撮像光学系12は、フォーカシングレンズを含む複数のレンズで構成されている。撮像光学系12の焦点位置は、レンズ駆動部13によって光軸方向に調整される。なお、簡単のため、図1では撮像光学系12を1枚のレンズとして図示する。また、絞り14は、撮像素子16に入射する単位時間当たりの光量を調節する。この絞り14の開口量は、CPU18の指示に応じて絞り駆動部15が調整する。
The imaging
撮像素子16は、撮像光学系12によって結像される被写体像を撮像して撮像画像の画像信号を生成する。なお、撮像素子16から出力された画像信号はAFE17に入力される。
The
AFE17は、撮像素子16の出力に対してアナログ信号処理を施すアナログフロントエンド回路である。このAFE17では、相関二重サンプリングや、画像信号のゲインの調整や、画像信号のA/D変換が行われる。なお、AFE17から出力されたデジタルの画像信号はCPU18に入力される。
The AFE 17 is an analog front end circuit that performs analog signal processing on the output of the
CPU18は、電子カメラ11の動作を統括的に制御するプロセッサである。例えば、CPU18は、撮像素子16で撮像された画像のデータを用いて、公知のAF(オートフォーカス)演算処理を実行する。
The
また、CPU18は、後述のプログラムの実行により、画像処理部25、特徴量演算部26、パラメータ設定部27として機能する。ここで、上記の画像処理部25は、A/D変換後の撮像画像に各種の画像処理(色補間処理、階調変換処理、輪郭強調処理、ホワイトバランス調整、色変換処理など)を施す。
The
また、画像処理部25、特徴量演算部26およびパラメータ設定部27は、撮影モードの1つである背景ぼかしモードにおいて、複数の撮像画像を用いてぼかし画像を生成する。なお、背景ぼかしモードでの各部の動作例は後述する。
In addition, the
第1メモリ19は、揮発性の記憶媒体(SDRAMなど)で構成されており、CPU18による画像処理の前工程や後工程で画像のデータを一時的に記憶する。また、第2メモリ20は、フラッシュメモリ等の不揮発性の記憶媒体で構成される。この第2メモリ20には、CPU18によって実行されるプログラムが記憶される。
The
メディアI/F21は、不揮発性の記憶媒体28を着脱可能に接続できる。そして、メデイアI/Fは、記憶媒体28に対して画像のデータの書き込み/読み込みを実行する。上記の記憶媒体28は、ハードディスクや、半導体メモリを内蔵したメモリカードなどで構成される。なお、図1では記憶媒体28の一例としてメモリカードを図示する。
The media I /
通信I/F22は、有線または無線の公知の通信回線を介して接続された外部装置(後述のコンピュータ31など)とのデータ送受信を、所定の通信規格に準拠して制御する。
The communication I /
モニタ23は、CPU18の制御によって、撮像画像の再生表示を行う。また、レリーズ釦24は、半押し操作による撮影前のAF動作開始の指示入力と、全押し操作による撮像動作開始の指示入力とをユーザーから受け付ける。
The
次に、図2を参照しつつ、一の実施形態の電子カメラでの背景ぼかしモードでの動作例を説明する。なお、図2に示す一連の処理は、ユーザーによるマニュアル選択操作により選択されるか、或いはカメラ自身が自動的に識別し選択した主要被写体に対して焦点が合っている状態を前提として、レリーズ釦24の全押し操作に応じてCPU18がプログラムを実行することで開始される。
Next, an operation example in the background blur mode in the electronic camera according to the embodiment will be described with reference to FIG. Note that the series of processing shown in FIG. 2 is performed on the assumption that the main subject selected by the manual selection operation by the user or automatically selected and selected by the camera itself is in focus. The process starts when the
ステップS101:CPU18は、主要被写体に合焦した状態から撮像光学系12の焦点位置のみを変化させつつ複数画像を得るための連続撮影(連写)を実行する(フォーカスブラケティング撮影)。これにより、CPU18は、主要被写体に合焦した状態で撮影された基準画像と、この基準画像とは合焦状態が異なる複数の撮像画像(1〜nフレーム)とを取得する。また、基準画像の一例を図3(この図3の場合の主要被写体は画面中央部に位置する「人」である)に示す。
Step S101: The
なお、連写撮影によって撮像素子16から出力される基準画像および撮像画像のデータは、AFE17を介して画像処理部25で所定の画像処理を施された後に、第1メモリ19に記憶されることとなる。
The reference image and the captured image data output from the
ステップS102:画像処理部25は、基準画像および各撮像画像(S101)について画像毎に高周波成分をそれぞれ抽出する。これにより、画像処理部25は、S101で取得したすべての画像について、画像内での高周波成分の分布を示す高周波成分画像を生成する。一例として、S102での画像処理部25は、公知のアンシャープマスク処理により各画像から高周波成分画像を生成してもよい。
Step S102: The
ここで、S101で取得した各画像は、撮影時における撮像光学系12の焦点位置が相違する。よって、各々の高周波成分画像において、高周波成分が抽出される箇所(換言すればその画像内における合焦箇所)はそれぞれ相違することとなる。
Here, each image acquired in S101 has a different focal position of the imaging
ステップS103:画像処理部25は、複数の高周波成分画像(S102で生成されたもの)を合成して、基準画像よりも被写界深度が深い参照画像(パンフォーカス画像)を生成する。一例として、S103での画像処理部25は、以下の(1)および(2)の処理によりパンフォーカス画像を生成する。
Step S103: The
(1)まず、画像処理部25は、エッジまたはコーナーを用いた公知の画像間のマッチング処理により、全ての高周波成分画像にわたって画像の位置合わせ処理を行う。連写撮影時には手ブレなどの影響により、全ての画像が厳密には同じ位置で撮影されていない可能性が高いからである。
(1) First, the
(2)次に、画像処理部25は、各々の高周波成分画像で対応位置にある画素の画素値を用いて、パンフォーカス画像の各画素の画素値を求める。例えば、画像処理部25は、画像間でそれぞれ対応位置にある複数の画素値を重み付け平均した上で積算し、この積算値をパンフォーカス画像での画素値としてもよい。そして、画像処理部25は、上記の処理を全ての画素分繰り返すことでパンフォーカス画像を生成する。
(2) Next, the
ステップS104:特徴量演算部26は、基準画像(S101)およびパンフォーカス画像(S103)を演算対象として、この演算対象の画像の各位置で輝度成分の分散を示す特徴量をそれぞれ求める。
一例として、S104での特徴量演算部26は、演算対象の画像内で注目画素を指定するとともに、この注目画素を基準として複数の画素を含む局所領域を設定する。そして、特徴量演算部26は、上記の局所領域に含まれる画素について、輝度成分に対応する画素値の分散を特徴量として求める。
Step S104: The feature
As an example, the feature
また、S104において、演算対象の画像データがYCbCr形式であれば、特徴量演算部26はY成分の画素値から特徴量を求めればよい。一方、演算対象の画像データがRGB形式の場合には、特徴量演算部26はRGBのいずれかの画素値から特徴量を求めてもよく、あるいはRGBからYCbCrへ色空間変換後にY成分の画素値から特徴量を求めてもよい。
In S104, if the image data to be calculated is in the YCbCr format, the feature
なお本実施形態において、画像の上記特徴量として、「輝度成分の分散」を用いるのは次の理由による。 In the present embodiment, “luminance component dispersion” is used as the feature amount of the image for the following reason.
まず輝度情報を用いる理由は、輝度情報は色情報などと比べて人間の視覚に対する感度(影響)が大きいためである。人間は一般的に色差よりも輝度差に敏感であるため、鑑賞して違和感を与えないための基準情報量として輝度情報を用いている。 First, the reason why luminance information is used is that luminance information is more sensitive (influenced) to human vision than color information. Since human beings are generally more sensitive to luminance differences than color differences, luminance information is used as a reference information amount for appreciating and not causing a sense of incongruity.
また分散を用いる理由は、分散は特徴量の種類によらず、被写体の焦点状態に敏感に左右される情報量であるためである(同一画像であっても、合焦していれば特徴量(どんな特徴量であっても)の分散は小さいが、非合焦であれば合焦状態よりも特徴量の分散は小さくなる)。 The reason for using variance is that the variance is an amount of information that is sensitive to the focus state of the subject, regardless of the type of feature. (Even if the same image is in focus, (Any feature amount) has a small variance, but if it is out of focus, the variance of the feature amount is smaller than that in the focused state.
ここで、S104での特徴量演算部26は、基準画像およびパンフォーカス画像の全画素で上記の特徴量をそれぞれ求めるものとする。なお、本明細書の以下の説明では、基準画像から求めた各位置の特徴量はそれぞれ第1の特徴量と称し、参照画像(図2の例ではパンフォーカス画像)から求めた各位置の特徴量はそれぞれ第2の特徴量と称する。
Here, the feature
ステップS105:パラメータ設定部27は、第1の特徴量および第2の特徴量(S104)を用いて、基準画像の合焦度に関するパラメータの値を画像の各画素でそれぞれ設定する。そして、パラメータ設定部27は、基準画像の各画素の位置と、上記のパラメータの値との対応関係を示すパラメータマップを生成する。
Step S105: The
一例として、S105でのパラメータ設定部27は、画像上で対応位置にある第2の特徴量から第1の特徴量を減算することで、所定の画素位置におけるパラメータの値を求める。なお、S105において、上記のパラメータの値は基準画像の全画素でそれぞれ設定されることとなる。
As an example, the
ここで、基準画像上で合焦状態にある箇所では、基準画像およびパンフォーカス画像の高周波成分の分布が近似するため、かかる箇所での第1の特徴量と第2の特徴量との差は小さくなる。よって、基準画像上で合焦状態にある箇所では、S105で求まるパラメータの値は小さくなる。 Here, since the distribution of the high-frequency components of the reference image and the pan-focus image is approximated at the in-focus position on the reference image, the difference between the first feature value and the second feature value at the position is as follows. Get smaller. Therefore, the parameter value obtained in S105 is small at the in-focus position on the reference image.
一方、基準画像上で被写体がぼけている箇所では、基準画像には高周波成分がほとんどないが、パンフォーカス画像には高周波成分が含まれるため、かかる箇所での第1の特徴量と第2の特徴量との差は大きくなる。よって、基準画像上で被写体がぼけている箇所では、S105で求まるパラメータの値が大きくなる。また基準画像上での被写体のぼけの程度(ぼけ度合い)に応じて、パラメータ値の大きさも変化する(ぼけ度合いが大きいほどパラメータ値も大きい)。 On the other hand, in the portion where the subject is blurred on the reference image, the reference image has almost no high-frequency component, but the pan-focus image contains the high-frequency component. The difference from the feature amount becomes large. Therefore, the parameter value obtained in S105 is increased at a portion where the subject is blurred on the reference image. Also, the parameter value changes in accordance with the degree of blur (degree of blur) of the subject on the reference image (the parameter value increases as the degree of blur increases).
ステップS106:画像処理部25は、基準画像(S101)に対して、平滑化フィルタによるぼかし処理を施す。そして、S106での画像処理部25は、上記のパラメータマップ(S105)を参照し、画像の各位置でのパラメータの値に応じて、基準画像の局所領域でのぼかし度合いを段階的に変化させる。
Step S106: The
一例として、画像処理部25は、パラメータの値をその大小により複数のクラスに区分するとともに、各々のクラスごとに異なるぼかし処理を行う。基準画像の任意の位置において、パラメータの値が小さくて最下位のクラスに属する場合、画像処理部25は、その位置でのぼかし処理を行わないか、あるいは平滑化の度合いが最も弱い平滑化フィルタを適用する。一方、パラメータの値が一段階上のクラスに属する場合、画像処理部25は、最下位のクラスの場合よりも平滑化の度合いが強い平滑化フィルタを適用する。そして、パラメータの値がより上位のクラスに属するほど、画像処理部25は平滑化の度合いがより強い平滑化フィルタを基準画像に適用する。
As an example, the
なお、画像処理部25は、ガウシアン型の平滑化フィルタであれば、フィルタ半径の調節によって平滑化の度合いを変化させればよい。また、画像処理部25は、フィルタのサイズが異なる複数の平滑化フィルタ(3×3、5×5など)を使い分けて平滑化の度合いを変化させてもよい。
If the
そして、上記のぼかし処理により、主要被写体以外の背景領域をぼかしたぼかし画像が電子的に生成される。なお、図3の基準画像に対応するぼかし画像の例を図4に示す。このぼかし画像のデータは、CPU18によって最終的に記憶媒体28に記録される。このとき、CPU18は、基準画像のデータも記憶媒体28に記録するようにしてもよい。以上で、図2の説明を終了する。
Then, a blurred image in which a background area other than the main subject is blurred is electronically generated by the blurring process. An example of the blurred image corresponding to the reference image in FIG. 3 is shown in FIG. The blurred image data is finally recorded in the
上記の一の実施形態での電子カメラ11は、基準画像とパンフォーカス画像とを用いて、基準画像の合焦度に関するパラメータを画像の各位置で求める。そして、電子カメラ11は、上記のパラメータに基づいて、基準画像の局所領域でのぼかし度合いを段階的に変化させたぼかし処理を行って、被写界深度を浅くした撮影結果とほぼ同等なぼかし画像を電子的に生成する。
The
そのため、一の実施形態では、主要被写体の領域と背景領域との領域分割を行わなくとも、被写体のボケ具合が自然で見映えのよいぼかし画像を生成できる。また、一の実施形態では、撮影時の焦点距離の情報を用いなくともぼかし画像を生成できる。 Therefore, in one embodiment, it is possible to generate a blurred image in which the subject's blur is natural and looks good without dividing the region of the main subject and the background region. In one embodiment, a blurred image can be generated without using information on the focal length at the time of shooting.
<一の実施形態における変形例の説明>
図5は、図2で説明した背景ぼかしモードの変形例を示す概要図である。図5に示す一連の処理も、AFにより所望の主要被写体に焦点が合っている状態を前提として、レリーズ釦24の全押し操作に応じてCPU18がプログラムを実行することで開始される。なお、図5の例における電子カメラ11の構成は、図1に示した一の実施形態のものと共通するので重複説明は省略する。
<Description of Modification in One Embodiment>
FIG. 5 is a schematic diagram showing a modification of the background blur mode described in FIG. The series of processing shown in FIG. 5 is also started when the
ステップS201:CPU18は、主要被写体に合焦した状態で基準画像を撮影するとともに、基準画像を撮影した状態から絞り14を絞って被写界深度を深くした参照画像を撮影する。なお、S201で参照画像を撮影するときには、CPU18は、参照画像の明るさが基準画像とほぼ同じとなるように露出を調整する。なお、基準画像および参照画像のデータは、AFE17を介して画像処理部25で所定の画像処理を施された後に、第1メモリ19に記憶されることとなる。
Step S201: The
ステップS202:特徴量演算部26は、基準画像および参照画像(S201)を演算対象として、この演算対象の画像の各位置で輝度成分の分散を示す特徴量をそれぞれ求める。このS202での処理は、図2のS104と共通するため重複説明を省略する。
Step S202: The feature
ステップS203:パラメータ設定部27は、基準画像から求めた第1の特徴量および参照画像から求めた第2の特徴量を用いて、基準画像の合焦度に関するパラメータの値を画像の各画素でそれぞれ設定する。そして、パラメータ設定部27は、基準画像の各画素の位置と、上記のパラメータの値との対応関係を示すパラメータマップを生成する。このS203での処理は、図2のS105と共通するため重複説明を省略する。
Step S203: The
ステップS204:画像処理部25は、基準画像(S201)に対して、平滑化フィルタによるぼかし処理を施して、ぼかし画像を生成する。このS204での処理は、図2のS106と共通するため重複説明を省略する。以上で、図5の説明を終了する。
Step S204: The
この図5に示す変形例での電子カメラ11は、基準画像と、絞り14を絞って被写界深度を深くした参照画像とを用いて、基準画像の合焦度に関するパラメータを画像の各位置で求めている。この場合も、図2で説明した電子カメラ11の動作例とほぼ同様の効果を得ることができる。
The
<他の実施形態の説明>
図6は、他の実施形態に係る画像処理装置の構成例を示すブロック図である。他の実施形態では、コンピュータ31に画像処理プログラムを実行させることで画像処理装置の機能を実現する。よって、他の実施形態の構成においても、上述の一の実施形態(およびその変形例)とほぼ同様の効果を奏することができる。
<Description of other embodiments>
FIG. 6 is a block diagram illustrating a configuration example of an image processing apparatus according to another embodiment. In another embodiment, the function of the image processing apparatus is realized by causing the
画像処理装置を構成するコンピュータ31は、データ読込部32、記憶装置33、CPU34、メモリ35および入出力I/F36、バス37を有している。データ読込部32、記憶装置33、CPU34、メモリ35および入出力I/F36は、バス37を介して相互に接続されている。さらに、コンピュータ31には、入出力I/F36を介して、入力デバイス38(キーボード、ポインティングデバイスなど)とモニタ39とがそれぞれ接続されている。なお、入出力I/F36は、入力デバイス38からの各種入力を受け付けるとともに、モニタ39に対して表示用のデータを出力する。
A
データ読込部32は、撮像画像のデータや、画像処理プログラムを外部から読み込むときに用いられる。例えば、データ読込部32は、着脱可能な記憶媒体からデータを取得する読込デバイス(光ディスク、磁気ディスク、光磁気ディスクの読込装置など)や、公知の通信規格に準拠して外部の装置(電子カメラ11など)と通信を行う通信デバイス(USBインターフェース、有線または無線のLANモジュールなど)で構成される。
The
記憶装置33は、上記の画像処理プログラムと、プログラムの実行に必要となる各種のデータとを記憶する。また、記憶装置33には、データ読込部32から取得した撮像画像のデータを記録することもできる。なお、他の実施形態での記憶装置33は、ハードディスクや、不揮発性の半導体メモリなどで構成される。
The
CPU34は、コンピュータ31の各部動作を統括的に制御するプロセッサである。また、CPU34は、画像処理プログラムの実行によって、上記の画像処理部25、特徴量演算部26、パラメータ設定部27としてそれぞれ機能する。また、メモリ35は、画像処理プログラムの演算結果などを一時的に記憶する。このメモリ35は、例えば揮発性のSDRAMなどで構成される。
The
ここで、図6に示すコンピュータ31によってぼかし画像を生成する場合、ユーザーは、予め基準画像と、焦点位置の異なる複数の撮像画像(または基準画像の撮影状態から絞り14を絞って撮影した参照画像)とを電子カメラ11で撮影しておく。そして、コンピュータ31は、上記の各画像のデータをそれぞれデータ読込部32から取得し、図2のS102以降の処理または図5のS202以降の処理を実行すればよい。
Here, when the blurred image is generated by the
なお、基準画像の判別は、コンピュータ31がユーザーの指定操作に基づいて行えばよい。あるいは、基準画像を示す付帯データを電子カメラ11が撮影時に画像ファイルのヘッダなどに付加している場合、コンピュータ31は上記の付帯データの有無に基づいて基準画像を判別することができる。
Note that the determination of the reference image may be performed by the
<実施形態の補足事項>
(1)本発明の画像処理装置は、上記実施形態の電子カメラ11やコンピュータ31の例に限定されることなく、カメラ付携帯電話や画像のビューアなどにも広く適用できる。
<Supplementary items of the embodiment>
(1) The image processing apparatus of the present invention is not limited to the examples of the
(2)上記の各実施形態では、画像処理部25、特徴量演算部26、パラメータ設定部27の各動作をプログラムでソフトウェア的に実現する例を説明したが、これらの処理をASICによってハードウエア的に実現しても勿論かまわない。
(2) In each of the above-described embodiments, an example has been described in which the operations of the
(3)上記の一の実施形態およびその変形例では、電子カメラ11での撮影時にぼかし画像を生成する例を説明した。しかし、上記の電子カメラ11についても、予め撮影されている画像を後処理工程で記憶媒体28から読み込んでぼかし画像を生成してもよい。
(3) In the above-described one embodiment and its modification, the example in which the blurred image is generated when the
(4)上記の実施形態では、基準画像の全ての画素でそれぞれパラメータの値を求める例を説明したが、電子カメラ11やコンピュータ31は、基準画像を10画素×10画素程度のサイズの小ブロックに領域分割して、各ブロック単位でパラメータの値を求めるようにしてもよい。
(4) In the above embodiment, an example has been described in which parameter values are obtained for all the pixels of the reference image. However, the
以上の詳細な説明により、実施形態の特徴点および利点は明らかになるであろう。これは、特許請求の範囲が、その精神および権利範囲を逸脱しない範囲で前述のような実施形態の特徴点および利点にまで及ぶことを意図するものである。また、当該技術分野において通常の知識を有する者であれば、あらゆる改良および変更に容易に想到できるはずであり、発明性を有する実施形態の範囲を前述したものに限定する意図はなく、実施形態に開示された範囲に含まれる適当な改良物および均等物によることも可能である。 From the above detailed description, features and advantages of the embodiments will become apparent. It is intended that the scope of the claims extend to the features and advantages of the embodiments as described above without departing from the spirit and scope of the right. Further, any person having ordinary knowledge in the technical field should be able to easily come up with any improvements and modifications, and there is no intention to limit the scope of the embodiments having the invention to those described above. It is also possible to use appropriate improvements and equivalents within the scope disclosed in.
11…電子カメラ、12…撮像光学系、13…レンズ駆動部、14…絞り、15…絞り駆動部、16…撮像素子、18…CPU、25…画像処理部、26…特徴量演算部、27…パラメータ設定部、31…コンピュータ、32…データ読込部、33…記憶装置、34…CPU
DESCRIPTION OF
Claims (10)
前記基準画像及び前記複数の撮像画像毎に高周波成分をそれぞれ抽出し、抽出した高周波成分の分布を示す高周波成分画像を各々位置合わせした後に合成して前記基準画像よりも被写体深度が深い参照画像を生成する画像処理部と、
前記基準画像及び前記参照画像の各位置に対応する輝度成分に基づいて前記各画像の特徴量を求める特徴量演算部と、
前記基準画像から求めた各位置の第1の特徴量と前記参照画像から求めた各位置の第2の特徴量との、対応位置間での差分を用いて、前記基準画像の合焦度に関するパラメータの値を画像の各位置でそれぞれ設定するパラメータ設定部と、
各々の前記パラメータの値に応じて画像の各位置でぼかし度合いを変化させるぼかし処理を前記基準画像に施して、ぼかし画像を生成するぼかし画像生成部と、
を備えることを特徴とする画像処理装置。 An image reading unit for acquiring a reference image and a plurality of captured images captured in a state in which a focal position of a lens is changed with respect to the reference image;
A high-frequency component is extracted for each of the reference image and the plurality of captured images, and a high-frequency component image indicating the distribution of the extracted high-frequency components is aligned and synthesized to generate a reference image having a deeper subject depth than the reference image. An image processing unit to be generated;
A feature amount computing unit for obtaining a feature amount of each image based on a luminance component corresponding to each position of the standard image and the reference image ;
Using the difference between corresponding positions of the first feature value at each position obtained from the reference image and the second feature value at each position obtained from the reference image, the degree of focus of the reference image A parameter setting unit for setting the value of the parameter at each position of the image;
A blur image generating unit that generates a blur image by performing blur processing on the reference image to change the blur degree at each position of the image according to the value of each of the parameters;
An image processing apparatus comprising:
前記画像処理部は、記基準画像と前記参照画像との間のマッチング処理により全ての高周波画像成分画像にわたって画像の位置合わせ処理を行った後に、各々の周波成分画像間でそれぞれ対応位置にある複数の画素値を重み付け平均した上で積算して精算した値を前記参照画像の画素値とする処理を全ての画素分繰り返すことで前記参照画像を生成することを特徴とする画像処理装置。 The image processing apparatus according to claim 1.
The image processing unit performs image alignment processing over all the high-frequency image component images by matching processing between the recording standard image and the reference image, and then a plurality of frequency component images at corresponding positions. An image processing apparatus , wherein the reference image is generated by repeating a process of setting the pixel value of the reference image as a pixel value of the reference image after adding and adjusting the weighted average of the pixel values .
前記特徴量演算部は、前記基準画像および前記参照画像内で注目画素を指定するとともに、指定した注目画素を基準として複数の画素を含む局所領域を設定し、設定した前記局所領域に含まれる画素について、輝度成分に対応する画素値の分散を特徴量として求めることを特徴とする画像処理装置。 The image processing apparatus according to claim 1 or 2,
The feature amount calculation unit specifies a target pixel in the standard image and the reference image, sets a local region including a plurality of pixels based on the specified target pixel, and includes pixels included in the set local region An image processing apparatus characterized by obtaining a variance of pixel values corresponding to a luminance component as a feature amount .
前記特徴量演算部は、前記基準画像および前記参照画像の画像データがYCbCr形式の場合、Y成分の画素値から特徴量を求めることを特徴とする画像処理装置。 The image processing apparatus according to claim 1 or 2,
The image processing apparatus according to claim 1, wherein the image data of the reference image and the reference image is obtained from a pixel value of a Y component when the image data of the standard image and the reference image is in a YCbCr format .
前記特徴量演算部は、前記基準画像および前記参照画像の画像データがRGB形式の場合、RGBの画像データのいずれかの画像データの画素値から、またはRGBの画像データからYCbCrの画像データへ色空間変換を行った後に、変換したYCbCrの画像データのうちのY成分の画像データの画素値から、特徴量を求めることを特徴とする画像処理装置。 The image processing apparatus according to claim 1 or 2,
When the image data of the standard image and the reference image is in RGB format, the feature amount calculation unit performs color conversion from a pixel value of any image data of RGB image data or from RGB image data to YCbCr image data. An image processing apparatus characterized by obtaining a feature amount from a pixel value of Y component image data in the converted YCbCr image data after performing spatial conversion .
前記パラメータ設定部は、画像上で対応位置にある前記第2の特徴量から前記第1の特徴量を減算することで、全ての位置における前記パラメータの値を求めることを特徴とする画像処理装置。 The parameter setting unit obtains the value of the parameter at all positions by subtracting the first feature quantity from the second feature quantity at a corresponding position on the image. .
前記画像生成部は、前記パラメータの値をその大小により複数のクラスに区分するとともに、各々のクラスごとに異なるぼかし処理を行うことを特徴とする画像処理装置。 The image generation apparatus according to claim 1, wherein the image generation unit classifies the parameter values into a plurality of classes according to the size thereof, and performs different blurring processing for each class.
前記画像生成部は、前記基準画像の任意の位置において、前記パラメータの値が小さくて最下位のクラスに属する場合、その位置でのぼかし処理を行わないか、あるいは平滑化の度合いが最も弱い平滑化フィルタを適用し、また、前記パラメータの値が一段階上のクラスに属する場合、最下位のクラスの場合よりも平滑化の度合いが強い平滑化フィルタを適用するとともに、前記パラメータの値がより上位のクラスに属するほど、平滑化の度合いがより強い平滑化フィルタを基準画像に適用することを特徴とする画像処理装置。 When the parameter value is small and belongs to the lowest class at an arbitrary position of the reference image, the image generation unit does not perform the blurring process at the position or performs smoothing with the weakest degree of smoothing. If the parameter value belongs to a class one level higher, a smoothing filter having a higher degree of smoothing than that of the lowest class is applied, and the parameter value is more An image processing apparatus that applies a smoothing filter having a higher degree of smoothing to a reference image as belonging to a higher class.
請求項1から8のいずれか1項に記載の画像処理装置と、 The image processing apparatus according to any one of claims 1 to 8,
を備えることを特徴とする撮像装置。 An imaging apparatus comprising:
前記基準画像及び前記複数の撮像画像毎に高周波成分をそれぞれ抽出し、抽出した高周波成分の分布を示す高周波成分画像を各々位置合わせした後に合成して前記基準画像よりも被写体深度が深い参照画像を生成する画像処理部と、 A high-frequency component is extracted for each of the reference image and the plurality of captured images, and a high-frequency component image indicating the distribution of the extracted high-frequency components is aligned and synthesized to generate a reference image having a deeper subject depth than the reference image. An image processing unit to be generated;
前記基準画像および前記参照画像の各位置に対応する輝度成分に基づいて前記各画像の特徴量を求める特徴量演算処理と、 A feature amount calculation process for obtaining a feature amount of each image based on a luminance component corresponding to each position of the reference image and the reference image;
前記基準画像から求めた各位置の第1の特徴量と、前記参照画像から求めた各位置の第2の特徴量との、対応位置間での差分を用いて、画像の合焦度を示すパラメータの値を画像の各位置でそれぞれ設定するパラメータ設定処理と、 The degree of focus of the image is indicated by using the difference between the corresponding positions of the first feature value at each position obtained from the reference image and the second feature value at each position obtained from the reference image. A parameter setting process for setting the parameter value at each position of the image;
各々の前記パラメータの値に応じて画像の各位置でぼかし度合いを変化させるぼかし処理を前記基準画像に施して、ぼかし画像を生成するぼかし画像生成処理と、 A blur image generation process for generating a blur image by performing blur processing on the reference image to change the blur degree at each position of the image according to the value of each of the parameters;
をコンピュータに実行させることを特徴とするプログラム。 A program that causes a computer to execute.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008290011A JP5282533B2 (en) | 2008-11-12 | 2008-11-12 | Image processing apparatus, imaging apparatus, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008290011A JP5282533B2 (en) | 2008-11-12 | 2008-11-12 | Image processing apparatus, imaging apparatus, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2010118850A JP2010118850A (en) | 2010-05-27 |
JP5282533B2 true JP5282533B2 (en) | 2013-09-04 |
Family
ID=42306222
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008290011A Active JP5282533B2 (en) | 2008-11-12 | 2008-11-12 | Image processing apparatus, imaging apparatus, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5282533B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102891959B (en) * | 2011-07-21 | 2015-06-03 | 宝硕财务科技股份有限公司 | Image photography control system and control method thereof |
US9307166B2 (en) | 2014-03-26 | 2016-04-05 | Intel Corporation | All-in-focus implementation |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH10233919A (en) * | 1997-02-21 | 1998-09-02 | Fuji Photo Film Co Ltd | Image processor |
JP4460711B2 (en) * | 2000-04-19 | 2010-05-12 | オリンパス株式会社 | Imaging device |
JP4582423B2 (en) * | 2007-04-20 | 2010-11-17 | 富士フイルム株式会社 | Imaging apparatus, image processing apparatus, imaging method, and image processing method |
-
2008
- 2008-11-12 JP JP2008290011A patent/JP5282533B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2010118850A (en) | 2010-05-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5036599B2 (en) | Imaging device | |
JP5460173B2 (en) | Image processing method, image processing apparatus, image processing program, and imaging apparatus | |
WO2017045558A1 (en) | Depth-of-field adjustment method and apparatus, and terminal | |
KR101643613B1 (en) | Digital image process apparatus, method for image processing and storage medium thereof | |
JPWO2013047405A1 (en) | Image processing apparatus and method | |
JP6720881B2 (en) | Image processing apparatus and image processing method | |
KR20130061083A (en) | Image pickup apparatus, control method for image pickup apparatus, and storage medium | |
JP2008118348A (en) | Electronic camera and program | |
WO2020029679A1 (en) | Control method and apparatus, imaging device, electronic device and readable storage medium | |
KR20100096805A (en) | Digital photographing apparatus, method for controlling the same, and recording medium storing program to implement the method | |
JP2015040941A (en) | Image-capturing device, control method therefor, and program | |
WO2019124289A1 (en) | Device, control method, and storage medium | |
JP2011228807A (en) | Image processing program, image processing apparatus, and image processing method | |
JP5076650B2 (en) | Imaging apparatus and image processing program | |
JP5589660B2 (en) | Image processing apparatus, imaging apparatus, and image processing program | |
US8866942B2 (en) | Auto focus adjusting device and method and recording medium of the same method | |
JP2010279054A (en) | Image pickup device, image processing device, image pickup method, and image processing method | |
JP2009218704A (en) | Image processing apparatus and image processing method | |
JP2018098670A (en) | Imaging device, control method of imaging device, and program | |
JP2015211233A (en) | Image processing apparatus and control method for image processing apparatus | |
JP5282533B2 (en) | Image processing apparatus, imaging apparatus, and program | |
JP2006253970A (en) | Imaging apparatus, shading correction data generating method, and program | |
JP6786273B2 (en) | Image processing equipment, image processing methods, and programs | |
JP5115297B2 (en) | Image processing apparatus, imaging apparatus, image processing method, and program | |
JP2009206585A (en) | Image processing apparatus, image processing program and digital camera |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20110929 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120323 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120905 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120918 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20121119 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20130430 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130513 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5282533 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |