JP2024021204A - Image processing device, imaging device, image processing method, program and recording medium - Google Patents
Image processing device, imaging device, image processing method, program and recording medium Download PDFInfo
- Publication number
- JP2024021204A JP2024021204A JP2022123887A JP2022123887A JP2024021204A JP 2024021204 A JP2024021204 A JP 2024021204A JP 2022123887 A JP2022123887 A JP 2022123887A JP 2022123887 A JP2022123887 A JP 2022123887A JP 2024021204 A JP2024021204 A JP 2024021204A
- Authority
- JP
- Japan
- Prior art keywords
- images
- image processing
- image
- amount
- projective transformation
- 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
- 238000003384 imaging method Methods 0.000 title claims abstract description 71
- 238000012545 processing Methods 0.000 title claims abstract description 68
- 238000003672 processing method Methods 0.000 title claims 2
- 230000009466 transformation Effects 0.000 claims abstract description 66
- 238000013519 translation Methods 0.000 claims abstract description 41
- 238000004364 calculation method Methods 0.000 claims abstract description 29
- 239000002131 composite material Substances 0.000 claims description 9
- 239000000203 mixture Substances 0.000 claims description 4
- 230000002194 synthesizing effect Effects 0.000 claims description 3
- 238000000034 method Methods 0.000 abstract description 17
- 238000010586 diagram Methods 0.000 abstract description 12
- 230000003287 optical effect Effects 0.000 description 23
- 230000006870 function Effects 0.000 description 10
- 238000001514 detection method Methods 0.000 description 9
- 239000013598 vector Substances 0.000 description 8
- 239000011159 matrix material Substances 0.000 description 7
- 230000008569 process Effects 0.000 description 5
- 238000006243 chemical reaction Methods 0.000 description 3
- 230000006835 compression Effects 0.000 description 2
- 238000007906 compression Methods 0.000 description 2
- 230000003213 activating effect Effects 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 230000004907 flux Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 210000001747 pupil Anatomy 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000003786 synthesis reaction Methods 0.000 description 1
Images
Abstract
【課題】 異なる位置で撮像された複数の画像から、撮像装置の開口よりも大きな開口での撮像と同等な画像を得る方法において、合焦位置(ピント位置)と画面内の焦点位置の分布(ピント面形状)と独立に決めることができなかった。
【解決手段】 画像処理装置は、複数の視点から撮像された複数の画像に対して、前記複数の画像における複数の第1の点を用いて射影変換量を算出する第1の算出手段と、前記複数の画像における前記第1の点と異なる少なくとも1つの第2の点を用いて並進量を算出する第2の算出手段と、前記射影変換量と前記並進量とを用いて前記複数の画像に対して変形を行う変形手段と、を有することを特徴とする。
【選択図】 図4
[Problem] In a method for obtaining an image equivalent to imaging with an aperture larger than the aperture of an imaging device from a plurality of images taken at different positions, the focus position (focus position) and the distribution of the focal position within the screen ( It was not possible to determine this independently of the focus surface shape (focus surface shape).
SOLUTION: The image processing device includes a first calculation unit that calculates a projective transformation amount for a plurality of images captured from a plurality of viewpoints using a plurality of first points in the plurality of images; a second calculation means for calculating a translation amount using at least one second point different from the first point in the plurality of images; and a second calculation means for calculating the translation amount using the at least one second point different from the first point in the plurality of images; and a deforming means for deforming the object.
[Selection diagram] Figure 4
Description
本発明は、画像処理装置に関するものであり、特に複数の画像に対して合成を行う画像処理装置に関するものである。 The present invention relates to an image processing device, and more particularly to an image processing device that performs compositing of a plurality of images.
近年、撮像装置によって撮像された画像を複数枚合成することで、1枚の画像では得られなかった特性を得る方法が開発されている。特許文献1には、異なる位置で撮像された複数の画像に対して合成を行うことで、合焦範囲を調整する技術が開示されている。 In recent years, a method has been developed in which a plurality of images captured by an imaging device are combined to obtain characteristics that cannot be obtained with a single image. Patent Document 1 discloses a technique for adjusting a focusing range by combining a plurality of images taken at different positions.
特許文献1に記載されているように、異なる位置で撮像された複数の画像を合成処理することで、開口が大きい系と同等の光学特性(ボケ、分解能)を得ることができる。このように、小径の光学系で大径の光学系と同等の画像が得られるため、高分解能化・小型化・低コスト化などが実現できる。 As described in Patent Document 1, optical characteristics (blur, resolution) equivalent to a system with a large aperture can be obtained by combining a plurality of images taken at different positions. In this way, an image equivalent to that of a large diameter optical system can be obtained with a small diameter optical system, making it possible to achieve higher resolution, smaller size, and lower cost.
しかしながら、画像の変形量を取得するための特徴点と画像の並進量を取得するための特徴点とが共通であったため、ピント位置とピント面の設定の自由度が制限されていて、合焦範囲の調整の自由度が制限されている。 However, because the feature points used to obtain the amount of image deformation and the feature points used to obtain the amount of image translation were common, the degree of freedom in setting the focus position and focus plane was limited, and the focus The degree of freedom in adjusting the range is limited.
本発明は、上記の課題を鑑みてなされたものであり、ピント位置とピント面の形状とを独立に算出することができる画像処理装置を提供することを目的とする。 The present invention has been made in view of the above problems, and an object of the present invention is to provide an image processing device that can independently calculate the focus position and the shape of the focus surface.
本発明は、複数の視点から撮像された複数の画像に対して、前記複数の画像における複数の第1の点を用いて射影変換量を算出する第1の算出手段と、前記複数の画像における前記第1の点と異なる少なくとも1つの第2の点を用いて並進量を算出する第2の算出手段と、前記射影変換量と前記並進量とを用いて前記複数の画像に対して変形を行う変形手段と、を有することを特徴とする画像処理装置を提供する。 The present invention provides a first calculation means for calculating a projective transformation amount using a plurality of first points in the plurality of images, and a second calculation means for calculating a translation amount using at least one second point different from the first point; and deforming the plurality of images using the projective transformation amount and the translation amount. An image processing apparatus is provided, characterized in that it has a deformation means for performing the deformation.
本発明によれば、異なる位置で撮像された複数の画像から、撮像装置の開口よりも大きな開口での撮像と同等な画像を得る方法において、合焦位置と画面内の焦点位置の分布とを個別に決めることができる。 According to the present invention, in a method for obtaining an image equivalent to imaging with an aperture larger than the aperture of an imaging device from a plurality of images taken at different positions, the in-focus position and the distribution of focal positions within the screen are Can be decided individually.
以下では、図を用いながら本発明の実施に好適な実施形態について説明する。なお、以下に記載の実施形態は、あくまでも本発明を実施するための一例であり、本発明は以下の実施形態に限定されない。 DESCRIPTION OF THE PREFERRED EMBODIMENTS Preferred embodiments of the present invention will be described below with reference to the drawings. Note that the embodiments described below are merely examples for carrying out the present invention, and the present invention is not limited to the following embodiments.
(第1の実施形態)
<開口合成について>
まず、複数の視点から撮像した画像を合成することによって撮像装置の開口よりも大きな開口での撮像と同等な画像を得る方法の原理について説明する。
(First embodiment)
<About aperture synthesis>
First, the principle of a method for synthesizing images captured from a plurality of viewpoints to obtain an image equivalent to imaging with an aperture larger than the aperture of the imaging device will be explained.
図1は、本実施形態における複数の視点から撮像した画像の合成によって開口の拡大を説明するための図である。図1に示すような、被写体距離の異なる被写体101、102を異なる位置から撮像した場合の状況を説明する。図1は撮像装置と被写体との位置関係を上から見た時の様子を示す図である。図1に示す撮像装置に、レンズ103,104と撮像素子105、106とのみを描き、それ以外の構造は省略している。
FIG. 1 is a diagram for explaining enlargement of an aperture by combining images taken from a plurality of viewpoints in this embodiment. A situation will be described when
撮像装置が位置107にある場合に撮像した画像を画像109とし、位置108にある場合に撮像した画像を画像110とする。それぞれの画像において、被写体101と被写体102とは被写界深度内に入っているとする。被写体101は被写体102より撮像装置から見た手前にあるため、撮像装置が位置107にある場合は、撮像装置が位置108にある場合よりも被写体101と被写体102との間隔が広がって画像に記録されている。
An image captured when the imaging device is located at
画像109と画像110とを、被写体101が重なるように並進移動して加算合成した場合は画像111に示すように被写体102は重ならない。加算前の画像では、被写体101と102が被写界深度内に入っていたとしても、加算後の被写体102は像がずれ、画像111において被写体102がボケることになる。
When
上記の技術は、つまり、撮像装置が移動し、撮像した画像を合成することによって、撮像レンズの開口が拡大され、被写界深度が浅くなったように見える画像を得ることができる。 In other words, the above technique can obtain an image that appears to have a shallow depth of field because the aperture of the imaging lens is enlarged by moving the imaging device and combining the captured images.
上記の現象を画像の重なり状態とボケといった点に着目すると、複数枚の画像を加算合成する際に、被写体の像の位置が一致して重なる部分にピントが合い、被写体の像の位置がずれて重なる部分がボケとなる。 Focusing on the above phenomenon in terms of the overlapping state of images and blurring, when combining multiple images, the position of the subject image matches and the overlapping part is in focus, and the position of the subject image shifts. The overlapping parts become blurred.
図2は、本実施形態における被写体と撮像装置の配置とについて説明するための図である。ピントの面を分かりやすく認識できるように、図2に示すように、被写体201が撮像装置に対して傾いて配置された状態にあり、被写体201より手前に被写体202が配置されている状態を例として説明する。撮像装置についてはレンズ203と撮像素子204のみ図示し、撮像素子の筐体を位置205~207で示す。
FIG. 2 is a diagram for explaining the arrangement of a subject and an imaging device in this embodiment. In order to easily recognize the focus plane, as shown in FIG. 2, an example is shown in which the
図3は、本実施形態におけるピント位置とピント面の状態とについて説明するための図である。撮像装置が位置205~207の位置で撮像された画像を、図3における画像301~303とする。位置206においては、撮像装置は被写体201に正対する方向に移動しているため、画像内では被写体201の左右の遠近感が弱まって写る。位置207においては、被写体201をより大きい角度で見込むため、画像内では被写体201の左右の遠近感が強調されて写る。
FIG. 3 is a diagram for explaining the focus position and the state of the focus surface in this embodiment. Images captured by the imaging device at
ここで、位置205で撮像された画像301を基準にし、後述する画像処理部507またはそれと同じ機能を有するユニットが、画像302と画像303とに対して射影変換を行うことを考える。射影変換の手順は図3を参考にしながら以下に記載する。
Here, it is assumed that an image processing unit 507 (described later) or a unit having the same function performs projective transformation on
まず、画像301において、撮像者によって指定された、ピント面形状を設定するための被写体201上の4点の座標を取得する。4点を被写体201の4隅に設定した場合を画像301中に点304~307を星型として示す。
First, in the
次に、画像302において、画像301における点304~307に相当する特徴点がどこに位置しているのかを探索する。複数の画像間における特徴点の探索は、公知のベクトル検出の方法を利用できる。画像302において点304~307に相当する特徴点を、点308~311とし、点308~311の座標を取得する。
Next, in
ピント面を設定するための被写体201上の4点の座標は、撮像者が選択してもよいし、被写体の距離情報から撮像装置が自動で選択してもよい、撮像装置が提示した選択肢から撮像者が選択してもよい。
The coordinates of the four points on the
ここで、画像の左上を原点とし、画像301における点304~307の座標を(x1,y1)、(x2,y2)、(x3,y3)、(x4,y4)とし、画像302における308~311の座標を(x5,y5)、(x6,y6)、(x7,y7)、(x8,y8)とする。後述する画像処理部507またはそれと同じ機能を有するユニットが、画像302の(x5,y5)、(x6,y6)、(x7,y7)、(x8,y8)に位置する点308~311が、それぞれ(x1,y1)、(x2,y2)、(x3,y3)、(x4,y4)の位置に対応させるような射影変換を画像302に対して行う。射影変換前後の動きベクトルが同じ方向でなければ、かつ対応する特徴点のペアが4つあることで、射影変換のすべての係数を決めることができる。
Here, the origin is the upper left of the image, the coordinates of
画像303においても同様に、画像301における点304~307に相当する特徴点がどこに位置するかを探索して点312~315を特定し、点312~315の座標を取得する。点312~315が画像301の点304~307の位置に対応させるような射影変換を画像303に対して行う。
Similarly, in the
以上の処理を行うことにより、被写体201が略同一な形状にされた画像316~318が生成される。画像301を基準画像としているならば、画像301に対する射影変換を行うとしても射影変換後の画像316は自分自身であり、つまり、画像301と画像316とは同じ画像である。もちろん、基準画像である画像301に対して射影変換の処理を行わなくてもよい。
By performing the above processing,
次に、画像316~318を用いて所望の位置にピントが合った画像を生成することについて説明する。撮像者によって指定された、ピントを合わせたい点を、画像316において被写体202上の点319として十字型で示す。点319の指定は、射影変換の後に指定してもよいし、射影変換よりも前に指定しても良い。撮像時に指定すれば、画像の撮像時に、意図的に、点319の位置に相当する被写体にピントを合わせることができ、ボケを抑制することができる。
Next, generation of an image focused on a desired
まず、後述する画像処理部507またはそれと同じ機能を有するユニットが、画像316における点319の座標を取得する。次に、画像317において、射影変換の係数を用いて点319が相当する点320の位置を取得する。
First, an image processing unit 507 (described later) or a unit having the same function acquires the coordinates of a
次に、後述する画像処理部507またはそれと同じ機能を有するユニットが、点319と点320の座標との差だけ画像317を並進移動させて画像316と317を加算する。同様に、画像318においても同様な処理を行い、点319と点319に対応する点321との座標の差だけ画像318を並進移動させて加算する。これによって、撮像者が指定した点319は、被写体202の同じ部分が重ねられることで像は明瞭なままである。一方で被写体201については、射影変換後に同一な形状となっていたが、並進移動が加わったことで、被写体201の各部分は、並進移動の分だけずれて加算されることでボケることになる。また、並進移動によるずれの量は、被写体201が射影変換後には同一な形状であったため、各部分で等しくなっている。これは、画像のピントの面が並進移動の前と平行であることを示している。
Next, an image processing unit 507 (described later) or a unit having the same function translates the
以上に述べたように、射影変換のための処理と並進移動のための処理とは、それぞれ独立に行える。 As described above, the process for projective transformation and the process for translation can be performed independently.
図4は、本実施形態におけるピント位置とピント面形状の関係とについて説明するための図である。図4では、基準画像が撮像された時の撮像装置の位置を原点とし、撮像装置の光学系の光軸をz方向とし、撮像装置から距離の異なる被写体f1と被写体f2が存在しているとする。θhは撮像装置の水平方向の画角である。図4(a)では、被写体f1と被写体f2とを通る面がピント面となり、かつ被写体f1と被写体f2とにピントが合った状態が示されている。それに対して、図4(b)では、ピント面とピント位置とを個別に設定することを示している。ピント面は撮像装置の光学系の光軸と直交するのではなく、被写体f1と被写体f2とを基準に射影変換を行った場合、被写体f1と被写体f2とを通る面と平行な面となる。ピント位置が被写体f3の位置のとき、被写体f1と被写体f2は同じ量だけボケている。被写体f3が、並進位置合わせに用いられている。ピント面は被写体f1と被写体f2との距離差分に対応する角度に傾いて設定されている。このように、f1とf2とによらずf3の位置によってピント位置を決めることができ、f3の位置によらずf1とf2との位置関係によってピント面形状を設定できることから、ピント面形状とピント位置とが個別に設定できると言える。 FIG. 4 is a diagram for explaining the relationship between the focus position and the shape of the focus surface in this embodiment. In FIG. 4, the origin is the position of the imaging device when the reference image was captured, the optical axis of the optical system of the imaging device is the z direction, and there are objects f1 and f2 at different distances from the imaging device. do. θh is the horizontal viewing angle of the imaging device. FIG. 4A shows a state in which the plane passing through the subject f1 and the subject f2 is the plane of focus, and the subject f1 and the subject f2 are in focus. On the other hand, FIG. 4(b) shows that the focus plane and focus position are set individually. The focal plane is not perpendicular to the optical axis of the optical system of the imaging device, but becomes a plane parallel to the plane passing through the subjects f1 and f2 when projective transformation is performed using the subjects f1 and f2 as a reference. When the focus position is the position of the subject f3, the subjects f1 and f2 are blurred by the same amount. Subject f3 is used for translational position alignment. The focus plane is set to be inclined at an angle corresponding to the distance difference between the subject f1 and the subject f2. In this way, the focus position can be determined by the position of f3, regardless of f1 and f2, and the shape of the focus surface can be set by the positional relationship between f1 and f2, regardless of the position of f3. It can be said that the position can be set individually.
<撮像装置の構成>
図5は本実施形態における撮像装置の各部について説明するための図である。
<Configuration of imaging device>
FIG. 5 is a diagram for explaining each part of the imaging device in this embodiment.
まずカメラ筐体部501の構成を説明する。被写体からの光束は、レンズ部502の撮像光学系503を介して、撮像素子506上に結像され受光される。撮像光学系は絞りを含み、駆動部504には撮像光学系を移動させて焦点位置を変更したり、絞りを制御したりするための駆動機構も含まれる。
First, the configuration of the
撮像素子506の表面にはマイクロレンズが格子状に配置されている。多数のマイクロレンズはマイクロレンズアレイ513を構成しており、瞳分割手段として機能する。各マイクロレンズに対応する複数の光電変換部による信号を取得し、信号間の相関演算を行うことによって被写体の距離に関連する情報(距離情報)が得られる。例えば、撮像画像内の被写体の距離情報の分布を表す距離画像がある。距離画像の情報は、各画素の示す値が当該画素に対応する撮像画像の領域に存在する被写体の距離情報を表す2次元の情報である。また被写体の奥行き方向の深さを表す深度情報の例として像ずれ量マップ、デフォーカス量マップがある。像ずれ量マップは視点の異なる複数の視点画像から算出され、デフォーカス量マップは像ずれ量に所定の変換係数を乗算して算出される。デフォーカス量を被写体の距離情報に換算した距離マップは撮像装置から被写体までの距離分布を表す。
Microlenses are arranged in a grid on the surface of the
本実施形態では撮像面位相差検出方式に基づく被写体距離の計測例を示すが、位相差検出用AF(自動焦点調節)センサを用いる方式やTOF(Time of Flight)方式等によって被写体の距離情報を取得することができる。 In this embodiment, an example of measuring the object distance based on the imaging plane phase difference detection method is shown. can be obtained.
また撮像素子506の出力からは、焦点調節用の評価量や露光量を表す信号が得られるので、これらの信号に基づいて撮像光学系503のAF制御およびAE(自動露出)制御が可能である。
Further, since signals representing the evaluation amount for focus adjustment and the exposure amount are obtained from the output of the
画像処理部507は、アナログ/デジタル変換器(A/D変換器)、ホワイトバランス回路、ガンマ補正回路、補間演算回路等を有し、記録用の画像データを生成可能である。本発明ではこの画像処理部によって射影変換、並進移動、画像加算を行ってもよいし、いったん画像データを外部のコンピュータなどの画像処理装置に読み出して処理ソフト上で処理を行ってもよい。また、画像処理部507は、後述するシステム制御部505に内蔵される形態にしてもよく、システム制御部505が画像処理部507を兼用する形態にしてもよい。
The
メモリ部508は記憶部と、画像データ等の記憶に必要な処理回路を備える。また、メモリ部508は予め定められた方法で画像、動画、音声等のデータの圧縮処理や伸長処理を行う。メモリ部508に記憶された画像データは読み出されて、表示部509または記録再生部510へ出力される。表示部509はLCD(液晶表示装置)などであり、システム制御部505の制御指令にしたがって画像表示を行う。また、表示部509は画面上に所定のメッセージを表示してユーザに報知する。
The
記録再生部510は、システム制御部505の制御指令にしたがって画像データ等を所定の記録媒体に記録し、または記録媒体からデータを読出して再生する処理を行う。所定の記録媒体は、例えばカメラ本体部に装着して使用可能な半導体メモリデバイス等である。
The recording and reproducing
システム制御部505は中央演算処理装置(CPU)を備え、撮像システムの各構成部を制御する中枢部である。システム制御部505は撮像の際のタイミング信号等を生成して各部へ出力し、また、操作指示信号に応動して撮像系、画像処理系、記録再生系の各構成部をそれぞれ制御する。システム制御部505は画像処理部507によって処理された画像データを表示または記録する処理や、出力デバイスを用いて外部装置への送信する処理等を行う。
The
操作検出部511は、操作スイッチやタッチパネル等を用いて行われるユーザの操作を検出し、操作指示信号をシステム制御部505に出力する。例えば、操作検出部511はユーザの撮像操作指示を検出してシステム制御部505に通知する。システム制御部505は、撮像素子506の駆動、画像処理部507の動作、メモリ部508による圧縮処理等を制御し、表示部509の画面に画像や情報を表示する制御を行う。
The
次にレンズ部502の構成を説明する。レンズ部502は、撮像光学系503と駆動部504を備える。撮像光学系503はレンズ群や絞り等の光学部材からなり、図5には光軸512を1点鎖線で示している。
Next, the configuration of the
駆動部504は、システム制御部505からの制御信号にしたがって撮像光学系を移動させる。撮像光学系の全部または一部を焦点合わせのために光軸方向に移動させ、絞り羽根を開閉する。
The
<撮像装置の動作>
次に、本実施形態における撮像装置の動作について説明する。図6は、本実施形態における動作について説明するためのフローチャートである。図7は、本実施形態における別の動作について説明するためのフローチャートである。
<Operation of imaging device>
Next, the operation of the imaging device in this embodiment will be explained. FIG. 6 is a flowchart for explaining the operation in this embodiment. FIG. 7 is a flowchart for explaining another operation in this embodiment.
ステップS601で、撮像者の操作によって、システム制御部505がボケ拡大モードを選択する。
In step S601, the
ステップS602で、撮像者の操作に応じて、システム制御部505が構図を決定する。
In step S602, the
ステップS603で、撮像素子506が、1枚目の画像を取得する。
In step S603, the
ステップS604で、撮像者がピントを合わせたい点(合焦点)を指定し、システム制御部505が撮像光学系503を制御し、ピント位置を調整する。
In step S604, the photographer specifies a point to focus on (focus point), and the
ステップS605で、システム制御部505が、射影変換を求めるための点を選択する。前述した通り、射影変換を求めるための点は、ピント面の形状を決めるための点であり、少なくとも4つが必要である。
In step S605, the
ステップS606で、次の画像の撮像するために、撮像する位置に撮像装置または撮像光学系503が移動する。
In step S606, the imaging device or the imaging
ステップS607で、撮像素子506が2枚目以降の画像を取得する。
In step S607, the
ステップS608で、画像処理部507は、システム制御部505がステップS604とステップS605とで指定した点を用いてベクトルの算出を行う。
In step S608, the
ステップS609で、画像処理部507は、システム制御部505がステップS605において選択した点が同一になるように射影変換を行う。
In step S609, the
ステップS610で、画像処理部507は、システム制御部505がステップS604において選択した点が重なるように並進移動を行う。
In step S610, the
ステップS611においてシステム制御部505が、所定枚数もしくは所定時間に到達したかを判断し、達していないと判断した場合には、ステップS606から同じ動作が繰り返される。達していると判断した場合には、ステップS612において合成画像が出力され、一連の動作が終了する。
In step S611, the
ステップS612で、画像処理部507は、射影変換と並進移動とを行った後の画像に対して加算処理を行い、合成画像を生成する。システム制御部505が、合成画像を記録再生部510に出力する。
In step S612, the
図7は、本実施形態を実施するためのもう1つの例を説明するためのフローチャートである。図7に示した例では、すでに撮像された画像がメモリ部508などに保存され、システム制御部505および画像処理部507が合成処理を行うことについて説明する。図7に示した例では、撮像するステップが設けられていない。
FIG. 7 is a flowchart for explaining another example for implementing this embodiment. In the example shown in FIG. 7, a case will be described in which already captured images are stored in the
ステップS701で、システム制御部505が、複数の画像のうちの1枚の画像を、合成対象画像と指定する。
In step S701, the
ステップS702で、システム制御部505が、撮像者がピントを合わせたい点(合焦点)を指定する。
In step S702, the
ステップS703で、システム制御部505が、射影変換を求めるための点を選択する。
In step S703, the
ステップS704で、画像処理部507は、システム制御部505がステップS702とステップS703とで指定した点を用いて、合成対象画像を含む2枚の画像からベクトルの算出を行う。
In step S704, the
ステップS705で、画像処理部507は、システム制御部505がステップS703において選択した点が同一になるように、合成対象画像を基準に、射影変換を行う。
In step S705, the
ステップS706で、画像処理部507は、システム制御部505がステップS702において選択した点が重なるように、合成対象画像を基準に、並進移動を行う。
In step S706, the
ステップS707で、画像処理部507は、射影変換と並進移動とを行った後の画像と合成対象画像とに対して加算を行う。すでに合成画像が記録されている場合、画像処理部507は、合成画像と射影変換と並進移動とを行った後の画像とに対して加算を行い、新たな合成画像を生成する。ステップS708で、システム制御部505が、画像処理部507が新たに生成した合成画像をメモリ部508に上書きする。
In step S707, the
ステップ709においてシステム制御部505が、合成対象画像が全て合成されたかを判断し、達していないと判断した場合には、ステップS704から同じ動作が繰り返される。達していると判断した場合には、ステップS710において合成画像が出力され、一連の動作が終了する。
In step S709, the
なお、本実施形態において、基準となる画像の決め方は任意であり、以上に記載のフローではあくまでも一例である。 Note that in this embodiment, the method of determining the reference image is arbitrary, and the flow described above is just an example.
<射影変換・並進移動>
以下では、本実施形態における射影変換・並進移動の詳細のアルゴリズムについて説明する。
<Projective transformation/translation>
Below, detailed algorithms for projective transformation and translation in this embodiment will be explained.
画像の射影変換は、行列によって表すと、以下の(式1)、(式2)ように書ける。 Projective transformation of an image can be expressed as a matrix as shown in (Equation 1) and (Equation 2) below.
点(x1,y1)が点(x1’,y1’)に移動する変換は、 The transformation that moves the point (x 1 , y 1 ) to the point (x 1 ', y 1 ') is
未知の行列の要素は8であり、xとyの組が4つあれば各要素を求めることができる。 The unknown matrix has 8 elements, and each element can be found if there are 4 pairs of x and y.
本実施形態における各画像に対して行う射影変換は、変形対象の画像における4点(x1,y1)~(x4,y4)が基準画像における4点(x1’y1’)~(x4’y4’)に移動したと想定して4つの方程式をたてて解く。その結果、行列要素h11~h32をそれぞれ求めることができる。変形対象の画像のすべての画素に対し、(式1)、(式2)の行列の演算を行うことで、射影変換が終了する。 In the projective transformation performed on each image in this embodiment, the four points (x1, y1) to (x4, y4) in the image to be transformed are converted to the four points (x1'y1') to (x4'y4') in the reference image. ), create and solve four equations. As a result, each of the matrix elements h11 to h32 can be determined. The projective transformation is completed by performing matrix calculations of (Formula 1) and (Formula 2) on all pixels of the image to be transformed.
図6と図7とを用いた説明においては、まず射影変換を行って中間画像を生成し、その画像に対して並進移動を行った。射影変換の行列を工夫することで、中間画像を生成することなく1回の射影変換のみで並進移動までを完了させることができる。すなわち、ステップS608およびステップS609又はステップS705およびステップS706を1つの処理とすることができる。方法を以下に示す。 In the explanation using FIGS. 6 and 7, first, projective transformation was performed to generate an intermediate image, and translational movement was performed on the image. By devising a matrix for projective transformation, it is possible to complete translational movement with only one projective transformation without generating intermediate images. That is, step S608 and step S609 or step S705 and step S706 can be made into one process. The method is shown below.
まず、基準画像と変形対象の画像とにおける射影変換量算出用の4つの指定点の移動から、射影変換の行列である(式2)の行列要素を求める。次に、変形対象の画像におけるピントを合わせる点の座標が、射影変換前と射影変換後とでどれだけ移動したかを求め、移動量を(+Δx2、+Δy2)とする。ピントを合わせる点の、射影変換しない場合の並進移動量を(+Δx1、+Δy1)とする。そして、変形対象(x1,y1,)を射影変換と並進移動によって基準(x1’,y1’)に重ねる状態と考えると、射影変換と並進移動とについては、(式1)および下記の(式3)で表せる。 First, the matrix elements of (Equation 2), which is a matrix of projective transformation, are obtained from the movement of four specified points for calculating the amount of projective transformation between the reference image and the image to be transformed. Next, it is determined how much the coordinates of the focus point in the image to be transformed have moved between before and after the projective transformation, and the amount of movement is set to (+Δx2, +Δy2). Let the amount of translation of the point to be focused on without projective transformation be (+Δx1, +Δy1). Then, considering that the deformation target (x1, y1,) is superimposed on the reference (x1', y1') by projective transformation and translation, the projective transformation and translation are expressed by (Equation 1) and the following (Equation It can be expressed as 3).
右辺の行列を計算して統合すると、下記の(式4)ないし(式6)で表せる。 When the matrices on the right side are calculated and integrated, it can be expressed as (Equation 4) to (Equation 6) below.
変換対象の画像に対して、(式4)と(式1)とでの変換を行うことで、射影変換と並進移動を逐次行ったのと同等の変換を、1回の変換で済ませることができる。 By converting the image to be converted using (Equation 4) and (Equation 1), it is possible to perform a transformation equivalent to sequentially performing projective transformation and translation in one transformation. can.
そのため、メモリや処理時間などの計算のためのリソースを低減させることが可能になり、変換後にそれぞれの画素に画像を配置する際の丸めの誤差も低減させることができる。 Therefore, resources for calculation such as memory and processing time can be reduced, and rounding errors when arranging images at respective pixels after conversion can also be reduced.
以上の説明では、ベクトル検出技術を用いて射影変換量と並進量とを求めているが、画像上の異なる点を同一の点と混同した場合など、望ましくないベクトル検出値を示す可能性もありうる。そのようなベクトル検出値から求められた射影変換量や並進量によって合成された場合、合成画像の品質を低下させる恐れがある。そのため、ベクトル検出量をモニターし、一定の範囲から外すと、つまり、他の画像と比べて大きく外れた値や、撮像者の撮像装置を動かす動作から想定されるよりも大きく外れた値となると、画像を合成対象から除外してもよい。 In the above explanation, vector detection technology is used to find the projective transformation amount and translation amount, but if different points on the image are confused with the same point, there is a possibility that undesirable vector detection values may be obtained. sell. When images are synthesized using the projective transformation amount or translation amount determined from such vector detection values, the quality of the synthesized image may be degraded. Therefore, if the vector detection amount is monitored, and if it falls outside a certain range, that is, if the value deviates significantly compared to other images, or if the value deviates significantly from the imager's movement of the imaging device, , images may be excluded from the compositing target.
第1の実施形態によって、撮像光学系の開口よりも大きな開口での撮像と同等な画像において、合焦位置(ピント位置)と画面内の焦点位置の分布(ピント面形状)を個別に決めることができる。 According to the first embodiment, in an image equivalent to imaging with an aperture larger than the aperture of the imaging optical system, the focus position (focus position) and the distribution of the focus position within the screen (focus surface shape) can be individually determined. Can be done.
(第2の実施形態)
以下では、第2の実施形態について説明する。第2の実施形態では、第1の形態と異なり、仮想ピント面を指定することで、ピント面の形状を決める。以下では、第2の実施形態について数式を用いながら詳細に説明する。
(Second embodiment)
The second embodiment will be described below. In the second embodiment, unlike the first embodiment, the shape of the focus plane is determined by specifying a virtual focus plane. Below, the second embodiment will be described in detail using mathematical formulas.
図8は、本実施形態における並進量の算出を説明するためのフローチャートである。 FIG. 8 is a flowchart for explaining calculation of the amount of translation in this embodiment.
まず、ステップS801では、画像処理部507は、異なる位置から撮像された複数の画像に対して、公知の距離推定技術を用いて距離マップを作成する。具体的に、撮像者が設定したいピント面をなす複数の被写体を指定し、画像処理部507が、撮像者が指定したそれぞれの被写体の被写体距離を求める。
First, in step S801, the
ステップS802では、画像処理部507は、撮像者が指定した被写体を通る面を仮想ピント面f(x,y)として設定する。f(x,y)は、撮像装置の撮像画角内の各点におけるピント面の撮像装置からの距離の情報を備えた関数であり、f(x,y)を使ってピント面形状の性質を示す。
In step S802, the
ステップS803では、画像処理部507は、ピント位置として設定したい被写体の位置(x0,y0)を取得する。さらに、画像処理部507は、位置(x0,y0)と撮像装置との距離d0を取得する。
In step S803, the
ステップS804で、システム制御部505が、被写体の位置(x0,y0)を仮想ピント面の関数f(x,y)に代入し、値f(x0,y0)を算出する。
In step S804, the
ステップS805で、システム制御部505が、公知の、例えば距離マップを用いる位置姿勢推定の技術を用いて、それぞれの画像を撮像したときの撮像装置の位置(si,ti)を取得する。
In step S805, the
次に、座標(s,t)で撮像された画像を基準画像とし、複数の画像に対して変形を行うための処理を行う。 Next, the image captured at the coordinates (s, t) is used as a reference image, and processing for deforming the plurality of images is performed.
ステップS806で、システム制御部505が、下記の(式7)の新しい関数f´(x,y)を定義する。
In step S806, the
ステップS807で、システム制御部505が、並進量を算出する。
In step S807, the
i,jを画像上の画素の座標、Δi、Δjをそれぞれの画像上の画素のx方向、y方向の並進量[pix]とすると、下記の(式8)と(式9)とで並進量を算出できる。 Let i, j be the coordinates of a pixel on the image, and Δi, Δj be the translation amount [pix] of each pixel in the x direction and y direction, then the following (Equation 8) and (Equation 9) can be used to calculate the translation. Able to calculate quantity.
上記の(式8)と(式9)とで使っている文字の意味は以下である。
W:水平方向の画像サイズ
H:垂直方向の画像サイズ
θw:撮像装置の水平視野角
θh:撮像装置の垂直視野角
(sm,tm):それぞれの画像を撮像した時点での撮像装置の座標
(s,t):基準となる画像を撮像した時点での撮像装置の座標
算出された並進量で、異なる位置で撮像されたそれぞれの画像に対し、上記の並進を行った後に加算合成することで、仮想ピント面を求めた被写体の位置によってピント面形状が決まり、それとは別に指定した被写体によってピント位置を決めることができる。
The meanings of the characters used in (Formula 8) and (Formula 9) above are as follows.
W: Horizontal image size H: Vertical image size θw: Horizontal viewing angle of the imaging device θh: Vertical viewing angle of the imaging device (sm, tm): Coordinates of the imaging device at the time of capturing each image ( s, t): Coordinates of the imaging device at the time when the reference image was captured By performing the above translation on each image captured at a different position using the calculated translation amount, and then adding and combining the images, , the shape of the focus plane is determined by the position of the subject from which the virtual focus plane is determined, and the focus position can be determined separately by the specified subject.
第2の実施形態によれば、仮想ピント面の決め方によってピント面形状を自在に指定しつつ、ピント位置を個別に決めることができる。 According to the second embodiment, the focus position can be individually determined while freely specifying the focus plane shape depending on how the virtual focus plane is determined.
(その他の実施形態)
なお、上記実施形態における「撮像装置」は、個人向けのデジタルカメラのほか、携帯機器やスマートフォン、あるいは、ネットワークカメラなどに適用することも可能である。
(Other embodiments)
Note that the "imaging device" in the above embodiments can be applied not only to personal digital cameras but also to mobile devices, smartphones, network cameras, and the like.
なお、本発明は、上述の実施形態の1つ以上の機能を実現するプログラムを、ネットワークまたは記憶媒体を介してシステムまたは装置に供給し、そのシステムまたは装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読み出し作動させる処理でも実現可能である。また、1以上の機能を実現する回路(たとえば、ASIC)によっても実現可能である。 Note that the present invention provides a system or device with a program that implements one or more functions of the above-described embodiments via a network or a storage medium, and one or more processors in a computer of the system or device executes the program. This can also be realized by reading and activating the process. It can also be realized by a circuit (for example, an ASIC) that realizes one or more functions.
501 カメラ筐体部
502 レンズ部
503 撮像光学系
504 駆動部
505 システム制御部
506 撮像素子
507 画像処理部
508 メモリ部
509 表示部
510 記録再生部
511 操作検出部
512 光軸
513 マイクロレンズアレイ
501
Claims (19)
前記複数の画像における前記第1の点と異なる少なくとも1つの第2の点を用いて並進量を算出する第2の算出手段と、
前記射影変換量と前記並進量とを用いて前記複数の画像に対して変形を行う変形手段と、を有する画像処理装置。 a first calculation means for calculating a projective transformation amount using a plurality of first points in the plurality of images with respect to a plurality of images captured from a plurality of viewpoints;
a second calculation means for calculating a translation amount using at least one second point different from the first point in the plurality of images;
An image processing device comprising: a deformation unit that deforms the plurality of images using the projective transformation amount and the translation amount.
前記第2の算出手段が前記並進量の算出において、前記第1の点を用いないことを特徴とする請求項1に記載の画像処理装置。 The first calculation means does not use the second point in calculating the projective transformation amount,
The image processing apparatus according to claim 1, wherein the second calculation means does not use the first point in calculating the translation amount.
前記被写体における前記第1の点と異なる第2の点を用いて並進量を算出する算出手段と、
前記仮想のピント面と前記並進量とを用いて前記複数の画像に対する変形を行う変形手段と、を有することを特徴とする画像処理装置。 specifying means for specifying a virtual focus plane based on a first point on the subject;
Calculation means for calculating a translation amount using a second point different from the first point on the subject;
An image processing device comprising: a deformation unit that deforms the plurality of images using the virtual focus plane and the translation amount.
前記変形手段は、前記被写体距離を用いて前記変形を行うことを特徴とする請求項13に記載の画像処理装置。 comprising an acquisition means for acquiring a subject distance of the subject;
14. The image processing apparatus according to claim 13, wherein the deformation means performs the deformation using the subject distance.
前記複数の画像に対して、前記複数の画像における複数の第1の点を用いて射影変換量を算出する第1の算出手段と、
前記複数の画像における前記第1の点と異なる少なくとも1つの第2の点を用いて並進量を算出する第2の算出手段と、
前記射影変換量と前記並進量とを用いて前記複数の画像に対して変形を行う変形手段と、を有する画像処理装置。 an imaging means for capturing a plurality of images from a plurality of viewpoints;
a first calculation unit that calculates a projective transformation amount for the plurality of images using a plurality of first points in the plurality of images;
a second calculation means for calculating a translation amount using at least one second point different from the first point in the plurality of images;
An image processing device comprising: a deformation unit that deforms the plurality of images using the projective transformation amount and the translation amount.
前記複数の画像における前記第1の点と異なる少なくとも1つの第2の点を用いて並進量を算出する第2の算出ステップと、
前記射影変換量と前記並進量とを用いて前記複数の画像に対して変形を行う変形ステップと、を有する画像処理方法。 a first calculation step of calculating a projective transformation amount for a plurality of images captured from a plurality of viewpoints using a plurality of first points in the plurality of images;
a second calculation step of calculating a translation amount using at least one second point different from the first point in the plurality of images;
An image processing method comprising: a deforming step of deforming the plurality of images using the projective transformation amount and the translation amount.
複数の視点から撮像された複数の画像に対して、前記複数の画像における複数の第1の点を用いて射影変換量を算出する第1の算出ステップと、
前記複数の画像における前記第1の点と異なる少なくとも1つの第2の点を用いて並進量を算出する第2の算出ステップと、
前記射影変換量と前記並進量とを用いて前記複数の画像に対して変形を行う変形ステップと、を行わせるプログラム。 A program that causes a computer to operate an image processing device,
a first calculation step of calculating a projective transformation amount for a plurality of images captured from a plurality of viewpoints using a plurality of first points in the plurality of images;
a second calculation step of calculating a translation amount using at least one second point different from the first point in the plurality of images;
A program for performing a deforming step of deforming the plurality of images using the projective transformation amount and the translation amount.
A computer readable storage medium storing the program according to claim 18.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2022123887A JP2024021204A (en) | 2022-08-03 | 2022-08-03 | Image processing device, imaging device, image processing method, program and recording medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2022123887A JP2024021204A (en) | 2022-08-03 | 2022-08-03 | Image processing device, imaging device, image processing method, program and recording medium |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2024021204A true JP2024021204A (en) | 2024-02-16 |
Family
ID=89855252
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2022123887A Pending JP2024021204A (en) | 2022-08-03 | 2022-08-03 | Image processing device, imaging device, image processing method, program and recording medium |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2024021204A (en) |
-
2022
- 2022-08-03 JP JP2022123887A patent/JP2024021204A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6112824B2 (en) | Image processing method and apparatus, and program. | |
EP3048787B1 (en) | Image processing apparatus, image pickup apparatus, image processing method, program, and storage medium | |
JP6838994B2 (en) | Imaging device, control method and program of imaging device | |
US8810672B2 (en) | Image processing method, image processing device, and recording medium for synthesizing image data with different focus positions | |
US9535193B2 (en) | Image processing apparatus, image processing method, and storage medium | |
JP6800797B2 (en) | Image pickup device, image processing device, control method and program of image pickup device | |
JPH08116490A (en) | Image processing unit | |
JP2015204587A (en) | Image processing apparatus, imaging apparatus, image processing method, program, and storage medium | |
JP6289017B2 (en) | Imaging apparatus, control method therefor, program, and storage medium | |
JP2012049773A (en) | Imaging apparatus and method, and program | |
JP2018107526A (en) | Image processing device, imaging apparatus, image processing method and computer program | |
JP6095266B2 (en) | Image processing apparatus and control method thereof | |
JP2013021615A (en) | Image pickup apparatus | |
JP2019168479A (en) | Controller, imaging device, method for control, program, and, and storage medium | |
JP5925109B2 (en) | Image processing apparatus, control method thereof, and control program | |
JP2024021204A (en) | Image processing device, imaging device, image processing method, program and recording medium | |
JP2019168661A (en) | Controller, imaging unit, method for control, program, and storage medium | |
JP6732440B2 (en) | Image processing apparatus, image processing method, and program thereof | |
JP6576114B2 (en) | IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD | |
JP2018074362A (en) | Image processing apparatus, image processing method, and program | |
JP2022117599A (en) | Image processing device, imaging device, control method, and program | |
JP2018007205A (en) | Image processing apparatus, imaging apparatus, control method for image processing apparatus, and program | |
JP6218520B2 (en) | Image processing apparatus, image processing method, and program | |
JP2017163412A (en) | Image processing system, its control method, imaging apparatus, and program | |
JP2017184007A (en) | Image processing apparatus, imaging apparatus, control method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20231213 |