JP7114648B2 - Image processing device, image processing method, imaging device, program and recording medium - Google Patents
Image processing device, image processing method, imaging device, program and recording medium Download PDFInfo
- Publication number
- JP7114648B2 JP7114648B2 JP2020075477A JP2020075477A JP7114648B2 JP 7114648 B2 JP7114648 B2 JP 7114648B2 JP 2020075477 A JP2020075477 A JP 2020075477A JP 2020075477 A JP2020075477 A JP 2020075477A JP 7114648 B2 JP7114648 B2 JP 7114648B2
- Authority
- JP
- Japan
- Prior art keywords
- images
- image
- polarization
- image processing
- component
- 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
Images
Landscapes
- Studio Devices (AREA)
Description
本発明は、ピント位置の異なる複数の画像を合成する画像処理装置に関するものである。 The present invention relates to an image processing apparatus that synthesizes a plurality of images with different focus positions.
従来、ピント位置の異なる複数の画像を合成し、撮像領域全体に合焦している合成画像を生成する、所謂、深度合成の技術が知られている。深度合成の技術は、デジタルカメラなどの撮像装置で被写体を撮像する場合に、被写界深度が足りないために被写体の一部にしかピントを合わせられないことを解決するための手段として用いられる。 2. Description of the Related Art Conventionally, a so-called focus stacking technique is known, in which a plurality of images with different focus positions are combined to generate a composite image in which the entire imaging area is in focus. Focus stacking technology is used as a means to solve the problem that only a part of the subject can be focused due to insufficient depth of field when capturing an image with an imaging device such as a digital camera. .
例えば、特許文献1には、ピント位置の異なる複数の画像を撮像し、各画像からコントラスト値の最も高い領域のみを抽出して1枚の画像に合成し、撮像領域全体に合焦している合成画像を生成する技術が開示されている。 For example, in Patent Document 1, a plurality of images with different focus positions are captured, only the region with the highest contrast value is extracted from each image, combined into one image, and the entire imaging region is focused. A technique for generating a composite image is disclosed.
しかしながら、上述したような深度合成の方法を用いると、光沢があるような一部が反射率の高い被写体の撮像において、コントラストを誤検出してしまい、本来ピントが合っていない画像を合成してしまう場合がある。例えば、ピントが合っていない画像では、被写体の光沢部が玉ボケとなって映り込むことがある。玉ボケの輪郭が、最もコントラスト値が高いとして誤判定された場合、本来選択されるべきピントが合った画像ではない別の画像が、合成対象として選択されてしまう。 However, when the focus stacking method described above is used, the contrast is erroneously detected when capturing an image of a glossy subject whose part has a high reflectance, and an image that is originally out of focus is synthesized. may be lost. For example, in an out-of-focus image, the glossy part of the subject may appear as a ball blur. If the contour of the out-of-focus ball is erroneously determined to have the highest contrast value, another image, which is not the focused image that should have been originally selected, is selected as a composition target.
そこで、本発明の目的は、ピント位置の異なる画像を撮像して画像合成を行う処理において、光沢のある領域を有する被写体でも、非合焦画像の合成を抑制した好適な合成画像を得ることができる画像処理装置を提供することである。 SUMMARY OF THE INVENTION Accordingly, it is an object of the present invention to obtain a suitable composite image by suppressing the synthesis of an out-of-focus image, even for a subject having a glossy area, in a process of picking up images with different focus positions and combining the images. It is to provide an image processing apparatus capable of
上記課題を解決するため、本願発明は、光軸方向でのピント位置の異なる複数の画像のそれぞれに対して、前記複数の画像のそれぞれに対応する偏光画像を用いて、光沢成分を取得する取得手段、前記光沢成分を除去した前記複数の画像を用いて前記複数の画像に対する合成マップを生成し、合成画像を生成する合成手段と、を有し、前記合成画像は、前記複数の画像よりも被写界深度が深い画像処理装置を提供する。 In order to solve the above problems, the present invention acquires a gloss component for each of a plurality of images having different focus positions in the optical axis direction, using a polarization image corresponding to each of the plurality of images. and synthesizing means for generating a synthetic map for the plurality of images using the plurality of images from which the gloss component has been removed, and for generating a synthetic image, wherein the synthetic image is the plurality of images. To provide an image processing device with a deep depth of field.
本発明によれば、ピント位置の異なる画像を撮像して画像合成を行う処理において、光沢のある領域を非合焦領域として認識でき、非合焦領域を合成に用いられることを抑制した好適な深度合成画像を得ることが可能な画像処理装置を提供することができる。 According to the present invention, in the process of capturing images with different focus positions and synthesizing the images, a glossy area can be recognized as an out-of-focus area, and the use of the out-of-focus area for synthesis is suppressed. It is possible to provide an image processing device capable of obtaining a depth stacking image.
以下、本発明の実施形態に係る画像処理装置について、図面を参照しながら詳細に説明する。以下の説明において、本発明の画像処理手段を撮像装置に適用した例を用いて説明するが、これに限定されない。 An image processing apparatus according to an embodiment of the present invention will be described in detail below with reference to the drawings. In the following description, an example in which the image processing means of the present invention is applied to an imaging device will be used, but the present invention is not limited to this.
図1は、本実施形態に係る撮像装置1000の構成を説明するためのブロック図である。
FIG. 1 is a block diagram for explaining the configuration of an
撮像レンズ101は複数のレンズを備える。
The
シャッター102は、一例として絞り機能を備える機械式シャッターである。シャッター102の機械式シャッター以外にも、105の撮像素子のリセットタイミングの制御によって、電子シャッターとして、蓄積時間を制御することが可能であり、動画撮像などに使用可能である。
The
撮像素子103は光学像を電気信号に変換する。
The
A/D変換器104は撮像素子103のアナログ信号出力をデジタル信号に変換する。
An A/
タイミング発生回路105は撮像素子103、A/D変換器104にクロック信号や制御信号を供給し、メモリ制御回路106及びシステム制御回路107により制御される。
A
画像処理回路108はA/D変換器104からのデータあるいはメモリ制御回路106からのデータに対して所定の画素補間処理や色変換処理を行う。また画像処理回路108の画像処理回路によって画像の切り出し、変倍処理を行うことで電子ズーム機能が実現される。また、画像処理回路108においては、撮像した画像データを用いて所定の演算処理を行い、得られた演算結果に基づいてシステム制御回路107が露光制御手段113、測距制御手段114に対して制御を行う。画像処理回路108が行う制御の例としては、TTL方式のAF処理、AE処理、EF処理が挙げられる。さらに、画像処理回路108においては、撮像した画像データを用いて所定の演算処理を行い、得られた演算結果に基づいてTTL方式のAWB(オートホワイトバランス)処理も行っている。
The
メモリ制御回路106は、A/D変換器104、タイミング発生回路105、画像処理回路108、メモリ109、圧縮・伸長回路112を制御する。A/D変換器104のデータが画像処理回路108、メモリ制御回路106を介して、あるいはA/D変換器104のデータが直接メモリ制御回路106を介して、メモリ109に書き込まれる。
The
画像表示部110はたとえばTFT-LCD等から成り、メモリ109に書き込まれた表示用の画像データはメモリ制御回路106を介して画像表示部110により表示される。画像表示部110を用いて撮像した画像データを逐次表示すれば、電子ファインダー機能を実現することが可能である。また、画像表示部110は、システム制御回路107の指示により任意に表示をON/OFFすることが可能であり、表示をOFFにした場合には撮像装置1000の電力消費を大幅に低減することが出来る。
The
メモリ109は撮像した静止画像や動画像を格納するためのメモリであり、所定枚数の静止画像や所定時間の動画像を格納するのに十分な記憶量を備えている。メモリ109により、複数枚の静止画像を連続して撮像する連写撮像やパノラマ撮像の場合にも、高速かつ大量の画像書き込みをメモリ109に対して行うことが可能となる。
A
また、メモリ109はシステム制御回路107の作業領域としても使用することが可能である。
The
不揮発性メモリ111はFlashROM等で構成された不揮発性メモリである。システム制御回路107が実行するプログラムコードは不揮発性メモリ111に書き込まれ、逐次読み出しながらプログラムコードを実行する。また、不揮発性メモリ111にはシステム情報を記憶する領域や、ユーザ設定情報を記憶する領域を設け、さまざまな情報や設定を次回起動時に読み出して、復元することを実現している。
A non-volatile
112は適応離散コサイン変換(ADCT)等により画像データを圧縮伸長する圧縮・伸長回路であり、メモリ109に格納された画像を読み込んで圧縮処理あるいは伸長処理を行い、処理を終えたデータをメモリ109に書き込む。
A compression/
圧縮・伸長回路112は適応離散コサイン変換(ADCT)等により画像データを圧縮伸長するものであり、メモリ109に格納された画像を読み込んで圧縮処理あるいは伸長処理を行い、処理を終えたデータをメモリ109に書き込む。
A compression/
露光制御手段113は絞り機能を備えるシャッター102を制御し、フラッシュ112と連動することによりフラッシュ調光機能も有するものである。
The exposure control means 113 controls the
測距制御手段114は撮像レンズ101のフォーカシングを制御し、ズーム制御手段115は撮像レンズ101のズーミングを制御する。
A
フラッシュ116は、AF補助光の投光機能、フラッシュ調光機能も有する。露光制御手段113、測距制御手段114はTTL方式を用いて制御されており、撮像した画像データを画像処理回路108によって演算した演算結果に基づき、システム制御回路107が露光制御手段113、測距制御手段114に対して制御を行う。
The
制御回路107は撮像装置1000全体を制御する。
A
操作手段118、119、120、121、122及び123は、システム制御回路107の各種の動作指示を入力するための操作手段であり、スイッチやダイアル、タッチパネル、視線検知によるポインティング、音声認識装置等の単数あるいは複数の組み合わせで構成される。
Operation means 118, 119, 120, 121, 122, and 123 are operation means for inputting various operation instructions for the
次に、操作手段118、119、120、121、122及び123の具体的な説明を行う。 Next, the operating means 118, 119, 120, 121, 122 and 123 will be specifically described.
操作手段118はモードダイアルスイッチで、電源オフ、自動撮像モード、撮像モード、HDR撮像モード、パノラマ撮像モード、動画撮像モード、再生モード、PC接続モード等の各機能モードを切り替え設定することが出来る。
The
操作手段119はシャッタースイッチSW1で、シャッターボタンの操作途中でONとなり、AF(オートフォーカス)処理、AE(自動露出)処理、AEB(オートホワイトバランス)処理等の動作開始を指示する。
The
操作手段120はシャッタースイッチSW2で、シャッターボタンの操作完了でONとなる。フラッシュ撮像の場合、EF(フラッシュプリ発光)処理を行った後に、AE処理で決定された露光時間分、撮像素子103を露光させ、フラッシュ撮像の場合、この露光期間中に発光させて、露光期間終了と同時に露光制御手段113により遮光することで、撮像素子103への露光を終了させる。撮像素子103から読み出した信号をA/D変換器104、メモリ制御回路106を介してメモリ109に画像データを書き込む読み出し処理、画像処理回路108やメモリ制御回路106での演算を用いた現像処理、メモリ109から画像データを読み出し、圧縮・伸長回路112で圧縮を行う、次に記録媒体129に画像データを書き込む記録処理という一連の処理の動作開始を指示する。
The operating means 120 is a shutter switch SW2, which is turned ON when the operation of the shutter button is completed. In the case of flash photography, after performing EF (flash pre-emission) processing, the
操作手段121は表示切り替えスイッチで、画像表示部110の表示切り替えをすることが出来る。この機能により、光学ファインダー104を用いて撮像を行う際に、TFT-LCD等から成る画像表示部への電流供給を遮断することにより、省電力を図ることが可能となる。
The operation means 121 is a display switching switch, and can switch the display of the
操作手段122は各種ボタン、タッチパネルや回転式ダイアル等からなる操作部で、メニューボタン、セットボタン、マクロボタン、マルチ画面再生改ページボタン、フラッシュ設定ボタン、単写/連写/セルフタイマー切り替えボタン等がある。またメニュー移動+(プラス)ボタン、メニュー移動-(マイナス)ボタン、再生画像移動+(プラス)ボタン、再生画像-(マイナス)ボタン、撮像画質選択ボタン、露出補正ボタン、日付/時間設定ボタン等もある。
An
操作手段123はユーザが撮像画像の倍率変更指示を行うズーム操作手段としてのズームスイッチ部である。以下、ズームスイッチ123ともいう。このズームスイッチ123は、撮像画角を望遠側に変更させるテレスイッチと、広角側に変更させるワイドスイッチからなる。ズームスイッチ123を用いることにより、ズーム制御手段115に撮像レンズ101の撮像画角の変更を指示し光学ズーム操作を行うトリガとなる。また、画像処理回路108による画像の切り出しや、画素補間処理などによる撮像画角の電子的なズーミング変更のトリガともなる。
The operating means 123 is a zoom switch section as zoom operating means for the user to instruct to change the magnification of the captured image. Hereinafter, it will also be referred to as a
電源手段117はアルカリ電池の一次電池やNiCd電池やNiMH電池、Liイオン電池等の二次電池、ACアダプター等からなる電源手段である。 The power supply means 117 is a power supply means comprising a primary battery such as an alkaline battery, a secondary battery such as a NiCd battery, a NiMH battery, or a Li ion battery, an AC adapter, or the like.
インタフェース124はメモリカードやハードディスク等の記録媒体とのインタフェース、コネクタ125はメモリカードやハードディスク等の記録媒体と接続を行うコネクタである。
An
光学ファインダー126では、画像表示部110による電子ファインダー機能を使用せずに、光学ファインダーのみを用いて撮像を行うことが可能である。
With the
通信手段127は、USB、IEEE1394、LAN、無線通信、等の各種通信機能を有する。 The communication means 127 has various communication functions such as USB, IEEE1394, LAN, and wireless communication.
コネクタ128は通信手段127により撮像装置1000を他の機器と接続するコネクタである。無線通信の場合はコネクタ128のかわりに、アンテナを使用してもよい。
A
記録媒体129はメモリカードやハードディスクなどである。コネクタ130は撮像装置1000との接続を行うコネクタ、インタフェース131は撮像装置1000とのインタフェース、記録部132はメモリカードやハードディスク等の記録媒体の記録部である。
A
次に、本実施形態における偏光画像の取得方法について説明する。ここで偏光画像とは、被写体からの反射光のうち一部の偏光成分のみの輝度情報を取得した画像のことである。 Next, a method for acquiring a polarization image according to this embodiment will be described. Here, the polarization image is an image obtained by acquiring luminance information of only some of the polarization components of the reflected light from the object.
光源から被写体に入射した光が、被写体上で正反射(鏡面反射)した直線偏光成分がそのまま撮像されることにより、撮像画像における被写体表面での光沢や“てかり”が発生する。これに対し、光学系内に偏光板を入れることで、直線偏光成分が遮断され、光沢や“てかり”が除去・軽減された偏光画像を得ることができる。 When the light incident on the subject from the light source is directly reflected (specularly reflected) on the subject and the linearly polarized light component is captured as it is, the surface of the subject in the captured image becomes glossy or "shiny". On the other hand, by inserting a polarizing plate in the optical system, it is possible to block the linearly polarized light component and obtain a polarized image in which gloss and "shininess" are removed or reduced.
偏光画像の取得方法としては、撮像光学系の前や後、もしくは撮像光学系中に偏光子を挿入し、偏光子の主軸角方向を変えながら撮像すればよい。 As a method for obtaining a polarized image, a polarizer may be inserted before or after the imaging optical system or in the imaging optical system, and an image may be captured while changing the principal axis angle direction of the polarizer.
図2は、本実施形態における撮像光学系の一例を説明するための図である。図2は、デジタルカメラの本体40と、共通のマウントを持つレンズ30と、偏光子が内蔵されるアダプター20と、を示している。偏光子は撮像装置1000に着脱可能であっても内蔵されていてもよい。
FIG. 2 is a diagram for explaining an example of an imaging optical system in this embodiment. FIG. 2 shows a
また、偏光画像の取得方法として、撮像素子の前にパターン偏光子を配置する方法も考えられる。図3は、本実施形態における撮像素子とパターン偏光子との配置を説明するための図である。図3に示した偏光子1101、1102、1103および1104はそれぞれ異なる種類の偏光子であり、たとえば、透過軸が45度ずつ異なる偏光子である。4種類の偏光子が1組となるように配置され、近傍の画素では同じ被写体上の点からの反射光を観測していると近似することで、偏光子の主軸角方向を変えながら撮像するのと同様の偏光情報を取得することができる。いうまでもなく、撮像素子103では全偏光成分を含む輝度情報も取得してもよい。
Also, as a method of acquiring a polarized image, a method of placing a patterned polarizer in front of the imaging device is also conceivable. FIG. 3 is a diagram for explaining the arrangement of the imaging element and the patterned polarizer in this embodiment.
次に、深度合成処理について説明する。 Next, focus stacking processing will be described.
図4は、本実施形態における合成画像の生成処理を示すフローチャートである。本実施例の画像生成処理は、システム制御回路107および画像処理回路108により、コンピュータを処理装置として機能させるための処理プログラムにしたがって実行される。なお、処理プログラムは、例えば、コンピュータに読み取り可能な記録媒体に記録してもよい。
FIG. 4 is a flow chart showing processing for generating a composite image according to this embodiment. The image generation processing of this embodiment is executed by the
ステップS401では、撮像素子103は、ピント位置の異なる複数の画像を撮像する。ステップS402では、撮像素子103は、前述した偏光子などを利用し、ピント位置の異なる複数の画像を偏光撮像する。ステップS403では、画像処理回路108は、ステップS102で取得された複数の画像から、無偏光画像を生成する。ステップS404では、システム制御回路107は、ステップS401で撮像素子103が撮像した複数の画像、及びステップS403で生成した複数の無偏光画像に対して、位置合わせを行う。ステップS405では、画像処理回路108は、位置合わせを行った後の画像に対して画像合成を行い、合成画像を生成する。以下では、それぞれのステップについて詳細に説明する。
In step S401, the
図5は、本実施形態におけるステップS401での撮像について説明するためのフローチャートである。 FIG. 5 is a flowchart for explaining imaging in step S401 in this embodiment.
ステップS501で、システム制御回路107は、ピント位置の設定を行う。たとえば、ユーザは操作部122のタッチパネルを通して合焦位置を指定し、指定した合焦位置に相当するピント位置の光軸方向の前後に等間隔に複数のピント位置を指定する。同時に、システム制御回路107は、設定したピント位置において、距離順に撮像順番を決める。
In step S501, the
ステップS502で、撮像素子103は、ステップS501で設定したピント位置のうち、未撮像のものの中で、撮像順番が最も先のピント位置において撮像する。
In step S502, the
ステップS503で、システム制御回路107は、ステップS501で設定したすべてのピント位置において撮像を行ったかどうかについて判断する。すべてのピント位置に撮像した場合は、図5に示したフローチャートでの処理を終了し、まだ撮像していないピント位置があれば、ステップS502に戻る。
In step S503, the
また、撮像装置1000が、撮像レンズ101及び機械式シャッター102及び撮像素子103を複数有する多眼カメラの場合、ステップS201で設定された複数のピント位置で同時に撮像することが可能であるため、撮像する順番の決定や判別は不要になる。
Further, when the
図6は、本実施形態におけるステップS402での偏光撮像について説明するためのフローチャートである。 FIG. 6 is a flowchart for explaining polarization imaging in step S402 in this embodiment.
ステップS601で、撮像素子103は、ステップS501で設定したピント位置のうち、未撮像のものの中で、撮像順番が最も先のピント位置において偏光撮像する。本実施形態では、システム制御回路107は、撮像レンズ101及び機械式シャッター102及び撮像素子103により構成される撮像部を制御して、互いに異なる偏光成分に対応する複数の条件で被写体の偏光画像(入力画像)を撮像する。偏光子はユーザが手動で動かしてもシステム制御回路107が制御してもよい。たとえば、図3に示した撮像素子を用いる場合、ステップS501で設定したピント位置のそれぞれで、撮像素子103が、4回の偏光撮像し、異なる偏光成分を有する4枚の偏光画像を取得する。
In step S601, the
ステップS602で、システム制御回路107は、ステップS501で設定したすべてのピント位置において偏光撮像を行ったかどうかについて判断する。すべてのピント位置に偏光撮像した場合は、図6に示したフローチャートでの処理を終了し、まだ撮像していないピント位置があれば、ステップS601に戻る。
In step S602, the
図7は、本実施形態におけるステップS403での無偏光画像の生成について説明するためのフローチャートである。 FIG. 7 is a flowchart for explaining generation of a non-polarized image in step S403 in this embodiment.
ステップS701では、画像処理回路108が、取得した複数の偏光画像から被写体の偏光情報を取得する。画像処理回路108は、ステップS102で取得した偏光画像から撮像画像の偏光情報を取得する。以下では図を用いながら、偏光情報の取得方法について説明する。
In step S701, the
図8は、本実施形態における方位角(偏光角度)φと輝度値(光強度)I(φ)の関係の一例を説明するためのグラフである。方位角とは、偏光素子の偏光軸方向が任意に定めた基準軸に対してなす角度である。図8における白丸は、偏光方向が0度、45度、90度の撮像画像の所定の1画素の輝度値I(0)、I(45)、I(90)を示している。また、実線のカーブは、3つの測定値からフィッティングにより算出された方位角φに対する輝度値I(φ)の変化を示している。算出された輝度値Iのうち最大輝度値をIMAX、最小輝度値をIMIN、最大輝度値IMAXの方位角(最大方位角)をα(度)とすると、方位角φに対する輝度値I(φ)は以下の式(1)で表わされる。 FIG. 8 is a graph for explaining an example of the relationship between the azimuth angle (polarization angle) φ and the luminance value (light intensity) I(φ) in this embodiment. The azimuth angle is the angle formed by the polarizing axis direction of the polarizing element with respect to an arbitrarily determined reference axis. The white circles in FIG. 8 indicate the brightness values I(0), I(45), and I(90) of one predetermined pixel of the captured images with the polarization directions of 0 degrees, 45 degrees, and 90 degrees. Also, the solid line curve shows the change in the luminance value I(φ) with respect to the azimuth angle φ calculated by fitting from the three measured values. Let I MAX be the maximum luminance value among the calculated luminance values I, I MIN be the minimum luminance value, and α (maximum azimuth angle) be the azimuth angle (maximum azimuth angle) of the maximum luminance value I MAX . (φ) is represented by the following equation (1).
I(φ)=IMAX-IMIN)・cos2(θ-α)+IMIN・・・式(1)
したがって、3つの輝度値を測定することで、画素ごとに偏光情報(最大輝度値IMAX、最小輝度値IMIN、最大方位角α)を算出し、方位角φに対する輝度値I(φ)の変化を求めることができる。
I(φ)=I MAX −I MIN )·cos 2 (θ−α)+I MIN Equation (1)
Therefore, by measuring three luminance values, polarization information (maximum luminance value I MAX , minimum luminance value I MIN , maximum azimuth angle α) is calculated for each pixel, and luminance value I(φ) with respect to azimuth angle φ. You can ask for change.
なお、本実施例では、偏光情報取得部は3つの偏光撮像画像の輝度値から偏光情報を取得したが、本発明はこれに限定されない。式(1)を用いて4つ以上の撮像画像の輝度値をフィッティングすることで偏光情報を算出してもよい。その際、例えば最小二乗法等を使用することができる。IMAX-IMINは角度依存成分、すなわち偏光方向が基準軸に対してなす偏光角度に応じて変化する輝度成分(第1成分)であり、IMINは偏光角度に依存しない角度独立成分(無偏光成分)である。 In this embodiment, the polarization information acquiring unit acquires the polarization information from the luminance values of the three polarized captured images, but the present invention is not limited to this. Polarization information may be calculated by fitting luminance values of four or more captured images using Equation (1). In that case, for example, the method of least squares or the like can be used. I MAX −I MIN is an angle-dependent component, that is, a luminance component (first component) that changes according to the polarization angle formed by the polarization direction with respect to the reference axis, and I MIN is an angle-independent component that does not depend on the polarization angle (no polarization component).
本実施形態では第1成分と無偏光成分をそれぞれ、物体からの鏡面反射成分と拡散反射成分とみなす。これは、鏡面反射成分はフレネル反射により生じてp偏光成分よりs偏光成分を多く含むことから偏光角度依存性を示し、一方で拡散反射成分はその物体内部での散乱過程で角度依存性が失われることから角度依存性を示さない傾向にあるためである。 In this embodiment, the first component and the non-polarized light component are regarded as the specular reflection component and the diffuse reflection component from the object, respectively. This is because the specular reflection component is generated by Fresnel reflection and contains more s-polarization components than p-polarization components, so it exhibits polarization angle dependence, while the diffuse reflection component loses its angular dependence during the scattering process inside the object. This is because there is a tendency not to exhibit angle dependence because the
ここでは3つ以上の偏光撮像画像を用いて偏光情報を取得したが、さらに簡易な方法として、2つの偏光撮像画像から偏光情報を取得してもよい。3つ以上の偏光撮像画像を用いる場合と違ってIMAX-IMINを算出することはできないが、偏光方向が異なる2つの偏光撮像画像の差分の絶対値を取ることで、2つの偏光角度間での輝度差を取得することができる。この輝度差成分は特定の偏光成分間の差であるため角度依存成分の一部でありIMAX-IMINよりも小さい値となる。しかし依然として鏡面反射成分を反映する量となっており、これを第1成分として用いてもよい。 Here, the polarization information is obtained using three or more polarization captured images, but as a simpler method, the polarization information may be obtained from two polarization captured images. Unlike the case where three or more polarized images are used, I MAX −I MIN cannot be calculated, but by taking the absolute value of the difference between two polarized images with different polarization directions, it is can be obtained. Since this luminance difference component is the difference between specific polarization components, it is part of the angle dependent component and has a value smaller than I MAX -I MIN . However, the amount still reflects the specular reflection component, which may be used as the first component.
ステップS702では、無偏光成分IMINのみが反映された画像を、無偏光画像として生成する。 In step S702, an image reflecting only the non-polarized component I MIN is generated as a non-polarized image.
図9は、本実施形態におけるステップS104での位置合わせについて説明するためのフローチャートである。 FIG. 9 is a flowchart for explaining alignment in step S104 in this embodiment.
ステップS901では、システム制御回路107は、ステップS502で撮像素子103が撮像した画像及びステップS403で生成した無偏光画像の各々から、位置合わせの基準画像を取得する。位置合わせの基準画像は、撮像順番が最も早いものとする。あるいは、ピント位置を変えながら撮像することで、わずかながら撮像された画像間で画角が変化するため、撮像した画像の中で画角が最も狭いものにしてもよい。
In step S901, the
ステップS902では、システム制御回路107は、位置合わせの処理の対象画像を取得する。対象画像は、ステップS901で取得した基準画像以外の画像で、位置合わせの処理が済んでいないものとする。システム制御回路107は、撮像順番が最も早いものを基準画像とするならば、撮像した順番で順次に対象画像を取得すればよい。
In step S902, the
ステップS903では、システム制御回路107は、基準画像と対象画像との位置のずれ量を算出する。算出方法の一例は、以下に述べる。まず、システム制御回路107は、基準画像に、複数のブロックを設定する。システム制御回路107は、各々のブロックのサイズが同じになるように設定することが好ましい。次に、システム制御回路107は、対象画像の、基準画像のそれぞれのブロックと同じ位置に、基準画像のブロックよりも広い範囲を、探索範囲を設定する。最後に、システム制御回路107は、対象画像のそれぞれの探索範囲に、基準画像のブロックとの輝度の差分絶対値和(Sum of Absolute Difference、以下、SADをいう)が最小となる対応点を算出する。システム制御回路107は、基準画像のブロックの中心と前述した対応点から、ステップS503でいう位置のずれをベクトルとして算出する。システム制御回路107は、前述する対応点の算出において、SADのほかに、差分二乗和(Sum of Squared Difference、以下SSDをいう)や正規化相互相関(Normalized Cross Correlation、以下NCCをいう)などを用いてもよい。
In step S903, the
ステップS904で、システム制御回路107で、基準画像と対象画像との位置のずれ量から変換係数を算出する。システム制御回路107は、変換係数として、例えば射影変換係数を用いる。ただし、変換係数として射影変換係数だけに限定するわけではなく、アフィン変換係数や水平垂直シフトのみの簡略化した変換係数を用いてもよい。
In step S904, the
ステップS905で、画像処理回路108は、ステップS904で算出した変換係数を用いて対象画像に対して変換を行う。
In step S905, the
たとえば、システム制御回路107は、式(2)に示した式を用いて変形を行うことができる。
For example,
ステップS906で、システム制御回路107は、基準画像以外のすべての画像に対して位置合わせを行ったかどうかについて判断する。基準画像以外のすべての画像に対して位置合わせを行った場合は、このフローチャートでの処理を終了し、まだ処理していない画像があれば、ステップS902に戻る。
In step S906,
また、上述した多眼カメラで撮像された複数の画像を位置合わせする場合、光学系103の位置の違いにより生まれる視差量をステップS903でずれ量算出で求める事が出来るため、同様の処理で位置合わせを行うことができる。
Further, when aligning a plurality of images captured by the above-described multi-lens camera, the amount of parallax caused by the difference in the position of the
図10は、本実施形態におけるステップS405での画像の合成について説明するためのフローチャートである。 FIG. 10 is a flowchart for explaining image composition in step S405 in this embodiment.
ステップ1001で、画像処理回路108は、位置合わせを行った後の無偏光画像(基準画像を含む)に対してコントラスト値を算出する。コントラスト値の算出方法の一例としては、たとえば、まず、画像処理回路108は、それぞれの画素の色信号Sr、Sg、Sbから、下記の式(3)を用いて輝度Yを算出する。
At step 1001, the
Y=0.299Sr+0.587Sg+0.114Sb・・・式(3)
次に、3×3の画素の輝度Yの行列Lに、下記の式(4)乃至式(6)に示したように、ソーベルフィルタを用いてコントラスト値Iを算出する。
Y=0.299S r +0.587S g +0.114S b Expression (3)
Next, a contrast value I is calculated using a Sobel filter on the matrix L of luminance Y of 3×3 pixels, as shown in the following equations (4) to (6).
ステップS1002で、画像処理回路108は合成マップを生成する。合成マップの生成方法としては、画像処理回路108は、それぞれの画像の同じ位置にある画素のコントラスト値を比較し、コントラスト値の大きさに応じた合成比率を算出する。
In step S1002,
具体的な算出方法の一例を以下に示す。 An example of a specific calculation method is shown below.
ステップS1001で算出したコントラスト値Cm(x,y)を用いて合成マップAm(x,y)を生成する。なお、mはピント位置の異なる複数画像のうちm番目の画像、xは画像の水平座標、yは垂直座標を示している。合成マップは、画素単位に得られたコントラスト値に基づいた加重平均で算出される。ピント位置の異なる画像をM枚撮像したとすると、m番目の画像に対する合成マップAm(x,y)は、式(7)で表される。 A synthetic map Am(x, y) is generated using the contrast value Cm(x, y) calculated in step S1001. Note that m is the m-th image among a plurality of images with different focus positions, x is the horizontal coordinate of the image, and y is the vertical coordinate. A synthetic map is calculated by a weighted average based on contrast values obtained for each pixel. Assuming that M images with different focus positions are taken, the composite map Am(x, y) for the m-th image is expressed by Equation (7).
Am(x,y)=maxk=1Ck(x,y)・・・式(7)
ただし、ステップS1002では、境界部が不自然にならないように合成比率を適宜調整する必要がある。その結果、1枚の画像における合成マップの合成比率は、0%と100%との二値化のものでなく、連続的に変化するものになる。
A m (x, y)=max k=1 C k (x, y) Expression (7)
However, in step S1002, it is necessary to appropriately adjust the composition ratio so that the boundary does not look unnatural. As a result, the composition ratio of the composition map in one image is not binarized between 0% and 100%, but continuously changes.
ステップS1003で、画像処理回路108は、ステップS602で算出した合成マップを基に、ステップS401で撮像した複数の画像を合成した合成画像О(x,y)を生成する。ピントを振った画像をIm(x,y)とすると、式(7)で生成した合成マップを用いて以下の式(9)で画像が生成される。
In step S1003, the
以上説明したように、本発明によれば、偏光撮像によって得られた鏡面反射成分を除外した入力画像により、合成比率を算出することができる。これにより、光沢のある被写体の深度合成処理において、非合焦の領域を合成に用いられるを抑制した好適な深度合成画像を得ることができる。 As described above, according to the present invention, it is possible to calculate a composite ratio from an input image obtained by polarization imaging and excluding a specular reflection component. As a result, in the focus stacking processing of a glossy subject, it is possible to obtain a suitable focus stacking image in which the out-of-focus area is suppressed from being used for stacking.
(その他の実施形態)
なお、本発明は、上述の実施形態の1つ以上の機能を実現するプログラムを、ネットワークまたは記録媒体を介してシステムまたは装置に供給し、そのシステムまたは装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読み出し作動させる処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other embodiments)
In addition, the present invention supplies a program that implements one or more functions of the above-described embodiments to a system or device via a network or a recording medium, and one or more processors in a computer of the system or device executes the program. can also be realized by a process of reading and operating the It can also be implemented by a circuit (for example, ASIC) that implements one or more functions.
上述の実施形態は、いずれも本発明を実施するにあたっての具体化の例を示したもの過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。即ち、本発明は、その技術思想、又はその主要な特徴から逸脱することなく、様々な形で実施することができる。 The above-described embodiments merely show specific examples for carrying out the present invention, and the technical scope of the present invention should not be construed to be limited by these. That is, the present invention can be embodied in various forms without departing from its technical spirit or main features.
1000 撮像装置 1000 imaging device
Claims (17)
前記光沢成分を除去した前記複数の画像を用いて前記複数の画像に対する合成マップを生成し、合成画像を生成する合成手段と、を有し、
前記合成画像は、前記複数の画像よりも被写界深度が深いことを特徴とする画像処理装置。 Acquisition means for acquiring a gloss component for each of a plurality of images with different focus positions in the optical axis direction, using a polarization image corresponding to each of the plurality of images;
synthesizing means for generating a synthetic map for the plurality of images using the plurality of images from which the gloss component has been removed to generate a synthetic image;
The image processing apparatus, wherein the composite image has a deeper depth of field than the plurality of images.
角度依存成分を除いた前記複数の画像を用いて前記複数の画像に対する合成マップを生成し、合成画像を生成する合成手段と、を有し、
前記合成画像は、前記複数の画像よりも被写界深度が深いことを特徴とする画像処理装置。 Acquisition means for acquiring a polarization component for each of a plurality of images with different focus positions in the optical axis direction, using a polarization image corresponding to each of the plurality of images;
synthesizing means for generating a synthetic map for the plurality of images using the plurality of images excluding the angle -dependent component to generate a synthetic image;
The image processing apparatus, wherein the composite image has a deeper depth of field than the plurality of images.
前記光沢成分を除去した前記複数の画像に対して合成を行い、合成画像を生成する合成ステップと、を有し、
前記合成画像は、前記複数の画像よりも被写界深度が深いことを特徴とする画像処理方法。 obtaining a gloss component for each of a plurality of images with different focus positions in the optical axis direction, using a polarization image corresponding to each of the plurality of images;
a synthesizing step of synthesizing the plurality of images from which the gloss component has been removed to generate a synthetic image;
The image processing method, wherein the composite image has a deeper depth of field than the plurality of images.
前記偏光成分を除いた前記複数の画像に対して合成を行い、合成画像を生成する合成ステップと、を有し、
前記合成画像は、前記複数の画像よりも被写界深度が深いことを特徴とする画像処理方法。 Acquisition step of acquiring a polarization component for each of a plurality of images with different focus positions in the optical axis direction, using a polarization image corresponding to each of the plurality of images;
a synthesizing step of synthesizing the plurality of images excluding the polarization components to generate a synthesized image;
The image processing method, wherein the composite image has a deeper depth of field than the plurality of images.
前記複数の画像のそれぞれに対して、前記複数の画像のそれぞれに対応する偏光画像を用いて、光沢成分を取得する取得手段、を有し、
前記光沢成分を除去した前記複数の画像に対して合成を行い、合成画像を生成する合成手段と、を有し、
前記合成画像は、前記複数の画像よりも被写界深度が深いことを特徴とする撮像装置。 imaging means for capturing a plurality of images with different focus positions in the optical axis direction;
obtaining means for obtaining a gloss component for each of the plurality of images using a polarization image corresponding to each of the plurality of images;
synthesizing means for synthesizing the plurality of images from which the gloss component has been removed to generate a synthetic image;
The imaging apparatus, wherein the composite image has a deeper depth of field than the plurality of images.
前記複数の画像のそれぞれに対して、前記複数の画像のそれぞれに対応する偏光画像を用いて、偏光成分を取得する取得手段、を有し
前記偏光成分を除いた前記複数の画像に対して合成を行い、合成画像を生成する合成手段と、を有し、
前記合成画像は、前記複数の画像よりも被写界深度が深いことを特徴とする撮像装置。 imaging means for capturing a plurality of images with different focus positions in the optical axis direction;
obtaining means for obtaining a polarization component for each of the plurality of images using a polarization image corresponding to each of the plurality of images, and combining the plurality of images excluding the polarization component; and synthesizing means for generating a synthetic image,
The imaging apparatus, wherein the composite image has a deeper depth of field than the plurality of images.
光軸方向でのピント位置の異なる複数の画像のそれぞれに対して、前記複数の画像のそれぞれに対応する偏光画像を用いて、光沢成分を取得する取得ステップ、
前記光沢成分を除去した前記複数の画像に対して合成を行い、合成画像を生成する合成ステップと、を行わせ、
前記合成画像は、前記複数の画像よりも被写界深度が深いことを特徴とするプログラム。 A computer program to be operated by a computer of an image processing device,
obtaining a gloss component for each of a plurality of images with different focus positions in the optical axis direction, using a polarization image corresponding to each of the plurality of images;
a synthesizing step of synthesizing the plurality of images from which the gloss component has been removed to generate a synthetic image;
A program, wherein the composite image has a deeper depth of field than the plurality of images.
光軸方向でのピント位置の異なる複数の画像のそれぞれに対して、前記複数の画像のそれぞれに対応する偏光画像を用いて、偏光成分を取得する取得ステップ、
前記偏光成分を除いた前記複数の画像に対して合成を行い、合成画像を生成する合成ステップと、を行わせ、
前記合成画像は、前記複数の画像よりも被写界深度が深いことを特徴とする画像処理方法。 A computer program to be operated by a computer of an image processing device,
Acquisition step of acquiring a polarization component for each of a plurality of images with different focus positions in the optical axis direction, using a polarization image corresponding to each of the plurality of images;
performing a synthesizing step of synthesizing the plurality of images excluding the polarization components to generate a synthesized image;
The image processing method, wherein the composite image has a deeper depth of field than the plurality of images.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020075477A JP7114648B2 (en) | 2020-04-21 | 2020-04-21 | Image processing device, image processing method, imaging device, program and recording medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020075477A JP7114648B2 (en) | 2020-04-21 | 2020-04-21 | Image processing device, image processing method, imaging device, program and recording medium |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2021175034A JP2021175034A (en) | 2021-11-01 |
JP7114648B2 true JP7114648B2 (en) | 2022-08-08 |
Family
ID=78278830
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020075477A Active JP7114648B2 (en) | 2020-04-21 | 2020-04-21 | Image processing device, image processing method, imaging device, program and recording medium |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7114648B2 (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008032951A (en) | 2006-07-28 | 2008-02-14 | Nikon Corp | Optical device |
JP2011033472A (en) | 2009-07-31 | 2011-02-17 | Yukio Yanagisawa | Apparatus, method and program for type identification of asbestos fiber |
-
2020
- 2020-04-21 JP JP2020075477A patent/JP7114648B2/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008032951A (en) | 2006-07-28 | 2008-02-14 | Nikon Corp | Optical device |
JP2011033472A (en) | 2009-07-31 | 2011-02-17 | Yukio Yanagisawa | Apparatus, method and program for type identification of asbestos fiber |
Also Published As
Publication number | Publication date |
---|---|
JP2021175034A (en) | 2021-11-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6218378B2 (en) | Image processing apparatus and image processing method | |
US20070024738A1 (en) | Image capturing apparatus | |
JP5889247B2 (en) | Image processing apparatus, image processing method, image processing program, and imaging apparatus | |
JP7174120B2 (en) | IMAGING DEVICE, PROGRAM, RECORDING MEDIUM, AND CONTROL METHOD | |
JP2011087128A (en) | Pantoscopic camera and method for discrimination of object | |
JP7009142B2 (en) | Image pickup device and image processing method | |
JP7154758B2 (en) | Image processing device and its control method | |
JP7293025B2 (en) | Imaging device and its control method | |
JP6833801B2 (en) | Imaging equipment, imaging methods, programs and recording media | |
JP2017126915A (en) | Imaging apparatus | |
JP7114648B2 (en) | Image processing device, image processing method, imaging device, program and recording medium | |
JP6590894B2 (en) | Image processing apparatus, imaging apparatus, image processing method, and program | |
JP2016019161A (en) | Imaging device | |
JP7158841B2 (en) | Imaging device, imaging method, program, recording medium, and image processing device | |
JP2015167310A (en) | Imaging apparatus and imaging method | |
JP5743729B2 (en) | Image synthesizer | |
JP6590899B2 (en) | Imaging apparatus, imaging method, and program | |
JP7458769B2 (en) | Image processing device, imaging device, image processing method, program and recording medium | |
JP2015041879A (en) | Imaging apparatus, imaging system, control method of imaging apparatus, program, and storage medium | |
JP7286451B2 (en) | Imaging device, imaging method and program | |
JP2019153208A (en) | Image processor, method for processing image, and program | |
JP2019022162A (en) | Image processing system, imaging apparatus, control method and program of image processing system | |
JP2021111811A (en) | Image processing device, imaging apparatus, image processing method, program, and recording medium | |
JP2024002631A (en) | Image processing device, imaging apparatus, image processing method, computer program, and recording medium | |
JP2024036872A (en) | Imaging device, imaging method, program and recording medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20200616 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20201210 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20201210 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20220204 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20220222 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20220314 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20220531 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20220607 |
|
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: 20220628 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220727 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 7114648 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |