JP2022048077A - Image processing apparatus and control method for the same - Google Patents
Image processing apparatus and control method for the same Download PDFInfo
- Publication number
- JP2022048077A JP2022048077A JP2021096752A JP2021096752A JP2022048077A JP 2022048077 A JP2022048077 A JP 2022048077A JP 2021096752 A JP2021096752 A JP 2021096752A JP 2021096752 A JP2021096752 A JP 2021096752A JP 2022048077 A JP2022048077 A JP 2022048077A
- Authority
- JP
- Japan
- Prior art keywords
- region
- image
- image processing
- area
- processing apparatus
- 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
Images
Landscapes
- Automatic Focus Adjustment (AREA)
- Studio Devices (AREA)
Abstract
Description
本発明は、画像領域を選択する技術に関するものである。 The present invention relates to a technique for selecting an image region.
カメラでの撮影において、焦点を自動的に合わせるオートフォーカス(AF)機能が存在する。撮影時に焦点を合わせる対象となる領域(以下、合焦対象領域)の選択方法としては、タッチパネルなどを用いてユーザーが手動で選択する方法や、顔検出や物体検出などの検出結果に基づいて自動的に選択する方法がある。どのような方法で選択された合焦対象領域であっても、選択された合焦対象領域内の物体もしくはカメラ自体の移動によって、画像上の位置や形状が変化することがある。このとき、選択された合焦対象領域を追尾もしくは連続的に検出することで、ユーザが所望する領域にAFを継続することが可能である。 When shooting with a camera, there is an autofocus (AF) function that automatically focuses. As a method of selecting an area to be focused at the time of shooting (hereinafter referred to as an area to be focused), a method of manually selecting by the user using a touch panel or the like, or automatic based on detection results such as face detection and object detection. There is a way to select. Regardless of the method selected for the in-focus target area, the position or shape on the image may change due to the movement of the object or the camera itself in the selected in-focus target area. At this time, by tracking or continuously detecting the selected in-focus target area, it is possible to continue AF in the area desired by the user.
特許文献1では、瞳領域を検出して合焦対象領域に用いAFを行う方法が開示されている。この方法によれば、カメラからの距離が一定な合焦対象領域を用いるため、精度よくピントを合わせることが可能である。
しかしながら、特許文献1に記載の方法では、瞳など特定部位を検出する必要がある。そのため、他の物体に遮蔽される等により当該特定部位が観察できない場合には適用できない。また、特許文献1に記載の方法においては、合焦対象領域内における深度(カメラからの距離)の差が大きい場合には精度よくピントを合わせることは困難である。そのため、胴部や腕などある程度大きさのある部位を合焦対象領域にしたい場合には適用が困難である。
However, in the method described in
本発明は、このような問題に鑑みてなされたものであり、好適にAFを実行可能な合焦対象領域を選択可能とする技術を提供することを目的としている。 The present invention has been made in view of such a problem, and an object of the present invention is to provide a technique for selecting a focus target region in which AF can be suitably performed.
上述の問題点を解決するため、本発明に係る画像処理装置は以下の構成を備える。すなわち、撮像装置の合焦対象領域を決定する画像処理装置は、第1の時点で前記撮像装置により撮像された第1の画像において合焦対象となる第1の領域を取得する取得手段と、前記第1の時点に後続する第2の時点で前記撮像装置により撮像された第2の画像から合焦対象の候補となる第2の領域を検出する検出手段と、前記第1の領域と前記第2の画像とに基づいて、前記第2の領域のうち1つ以上の部分領域の中から前記第2の画像における合焦対象領域を決定する決定手段と、を備える。 In order to solve the above-mentioned problems, the image processing apparatus according to the present invention has the following configurations. That is, the image processing device that determines the focus target area of the image pickup device is an acquisition means for acquiring the first focus target area in the first image captured by the image pickup device at the first time point. A detection means for detecting a second region as a candidate for focusing target from a second image captured by the image pickup apparatus at a second time point following the first time point, the first region, and the above. A determination means for determining an in-focus target region in the second image from one or more partial regions of the second region based on the second image is provided.
本発明によれば、好適にAFを実行可能な合焦対象領域を選択可能とする技術を提供することができる。 INDUSTRIAL APPLICABILITY According to the present invention, it is possible to provide a technique that enables selection of an in-focus target region in which AF can be suitably performed.
以下、添付図面を参照して実施形態を詳しく説明する。なお、以下の実施形態は特許請求の範囲に係る発明を限定するものではない。実施形態には複数の特徴が記載されているが、これらの複数の特徴の全てが発明に必須のものとは限らず、また、複数の特徴は任意に組み合わせられてもよい。さらに、添付図面においては、同一若しくは同様の構成に同一の参照番号を付し、重複した説明は省略する。 Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. The following embodiments do not limit the invention according to the claims. Although a plurality of features are described in the embodiment, not all of the plurality of features are essential for the invention, and the plurality of features may be arbitrarily combined. Further, in the attached drawings, the same or similar configurations are given the same reference numbers, and duplicate explanations are omitted.
(第1実施形態)
本発明に係る画像処理装置の第1実施形態として、撮影装置と領域選択装置とを含むオートフォーカス(AF)システムを例に挙げて以下に説明する。特に、第1実施形態では、AFシステムは、撮影装置から取得した画像に基づいて人体を検出し、検出された人体領域の中からピントを合わせる合焦対象領域を抽出する。
(First Embodiment)
As a first embodiment of the image processing apparatus according to the present invention, an autofocus (AF) system including a photographing apparatus and an area selection apparatus will be described below as an example. In particular, in the first embodiment, the AF system detects the human body based on the image acquired from the photographing apparatus, and extracts the in-focus target area to be focused from the detected human body area.
<装置構成>
図1は、撮影装置(カメラ)と被写体の位置関係を示す図である。図1(a)は立位の状態にある人体である被写体G-1を例示的に示し、図1(b)は仰向けの状態にある人体である被写体G-2を例示的に示している。なお、カメラは図の左下方向に存在し、カメラからの距離(深度、デプス)を示す複数の点線が示されている。
<Device configuration>
FIG. 1 is a diagram showing a positional relationship between a photographing device (camera) and a subject. FIG. 1 (a) schematically shows a subject G-1 which is a human body in a standing position, and FIG. 1 (b) schematically shows a subject G-2 which is a human body in a supine position. .. The camera exists in the lower left direction of the figure, and a plurality of dotted lines indicating the distance (depth, depth) from the camera are shown.
図1に示すように、被写体の姿勢によって体の各部位に対するカメラからの距離は変化する。たとえば、被写体G-1に示すように立位である場合、カメラからの距離はどの部位であっても大きくは変化しない。一方で、被写体G-2に示すようにカメラの視線方向に略平行に横たわっている場合、体の部位に応じて深度は大きく変化する。そして、被写体内の深度の変化幅が撮像装置の被写界深度以上に広い場合には、一般に被写体全体にピントを合わせることは出来ない。その結果、好適にAFを継続実行することが出来なくなる場合がある。そこで、第1実施形態では、被写体内の深度の変化幅が撮像装置の被写界深度以上に広い場合であっても、継続的に好適なAFを実現可能とする例について説明する。 As shown in FIG. 1, the distance from the camera to each part of the body changes depending on the posture of the subject. For example, in the case of standing as shown in the subject G-1, the distance from the camera does not change significantly at any part. On the other hand, when lying substantially parallel to the line-of-sight direction of the camera as shown in the subject G-2, the depth changes greatly depending on the part of the body. When the change width of the depth in the subject is wider than the depth of field of the image pickup apparatus, it is generally impossible to focus on the entire subject. As a result, AF may not be suitable for continuous execution. Therefore, in the first embodiment, an example in which suitable AF can be continuously realized even when the change width of the depth in the subject is wider than the depth of field of the image pickup apparatus will be described.
<装置構成>
図2は、第1実施形態におけるAFシステムの構成の一例を示す図である。図2に示すように、AFシステムは、撮影装置10および領域選択装置20を備える。
<Device configuration>
FIG. 2 is a diagram showing an example of the configuration of the AF system according to the first embodiment. As shown in FIG. 2, the AF system includes a
撮影装置10は、周辺環境の光景を画像化するカメラ装置である。撮影装置10は画像取得部11および測距部12を備える。撮影装置10の例としては、デジタル一眼レフカメラやスマートフォン、ウェアラブルカメラ、ネットワークカメラ、Webカメラなどがある。ただし、これらの例に限定されるものではなく、周囲の光景を画像化できる装置であればよい。
The photographing
画像取得部11は、撮像素子などを用いて撮影装置10の周囲の光景を画像化し、領域選択装置20に出力する。画像取得部11が取得する画像は、デモザイキング処理前のRAWデータであってもよいし、デモザイキングなどによって全画素がRGB値を持つ画像であってもよい。また、ライブビュー用の画像であってもよい。
The
測距部12は、撮影装置10と被写体との距離である深度情報を計測する測距機能を備え、計測した深度情報を領域選択装置20に出力する。深度情報は、画像取得部11が取得する画像の各画素もしくは各領域毎との対応付けが可能なものとする。また、深度情報とは、空間上の距離の長さに相関する任意の情報である。たとえば、空間上の長さそのものであってもよいし、入射光の位相差を検知する位相差センサなどに基づくデフォーカス量であってもよい。また、レンズの焦点面を移動させた際の画像のコントラスト変化量であってもよい。
The
領域選択装置20(画像処理装置)は、撮影装置10から入力された画像および深度情報に基づいて、人体の領域を検出する。そして、検出された領域の中からピントを合わせる対象となる合焦対象領域を選択する。領域選択装置20は、検出部21、部分領域抽出部22、基準領域取得部23、比較部24、選択部25を備える。なお、図2においては、領域選択装置20は撮影装置10と別体であるとして示しているが、一体の装置として構成してもよい。また、別体として構成する場合は、有線もしくは無線の通信機能によって接続されていてもよい。また、領域選択装置20の各機能部は、中央処理ユニット(CPU)がソフトウェアプログラムを実行することによっても実現され得る。
The area selection device 20 (image processing device) detects the area of the human body based on the image and the depth information input from the
図6は、情報処理装置のハードウェア構成を示す図である。CPU1001は、RAM1003をワークメモリとして、ROM1002や記憶装置1004に格納されたOSやその他プログラムを読みだして実行する。そして、システムバス1009に接続された各構成を制御して、各種処理の演算や論理判断などを行う。CPU1001が実行する処理には、実施形態の情報処理が含まれる。記憶装置1004は、ハードディスクドライブや外部記憶装置などであり、実施形態の情報処理にかかるプログラムや各種データを記憶する。入力部1005は、カメラなどの撮像装置、ユーザー指示を入力するためのボタン、キーボード、タッチパネルなどの入力デバイスである。なお、記憶装置1004は例えばSATAなどのインタフェイスを介して、入力部1005は例えばUSBなどのシリアルバスを介して、それぞれシステムバス1009に接続されるが、それらの詳細は省略する。通信I/F1006は無線通信で外部の機器と通信を行う。表示部1007はディスプレイである。
FIG. 6 is a diagram showing a hardware configuration of the information processing device. The
検出部21は、画像中の人体領域を検出し、部分領域抽出部22に出力する。人体領域は、全身に対応するものであってもよいし、顔や胴など特定の部位に対応するものであってもよい。人体領域の検出方法は特定の方法に限定しない。たとえば、「Joseph Redmon, Ali Farhadi, "YOLOv3: An Incremental Improvement", arXiv e-prints (2018)」に記載されるような物体検知手法を応用したものを利用可能である。また、頭部や手足などの輪郭形状に基づいて検出してもよい。さらに、時系列の画像から抽出した動き情報に基づいて検出してもよい。他にも、遠赤外線などに基づく熱源の情報から検出する構成であってもよい。
The
検出対象の人体領域は、所定の部位に対応するものであってもよいし、ユーザーが選択した部位に対応するものであってもよい。たとえば、顔や胴など部位のカテゴリを設定する機能を提供し、ユーザーが設定したカテゴリに対応する検出処理を行ってもよい。また、たとえばユーザーがタッチパネルで選択した領域の情報に基づいて、対応する検出処理を自動的に設定してもよい。 The human body region to be detected may correspond to a predetermined part or may correspond to a part selected by the user. For example, a function for setting a category of a part such as a face or a torso may be provided, and a detection process corresponding to the category set by the user may be performed. Further, for example, the corresponding detection process may be automatically set based on the information of the area selected by the user on the touch panel.
検出部21が複数の人体領域を検出する場合、後述する基準領域に基づいて、対応する人体領域を1つまたは複数選択して出力してもよい。たとえば、基準領域との距離や画像的な類似度に基づいて選択してよい。
When the
部分領域抽出部22は、人体領域または深度情報に基づいて、所定の条件を満たす1つ以上の部分領域を抽出し、比較部24に出力する。部分領域の抽出は、画像空間上の距離および深度情報の類似度に基づいて行う。
The partial
たとえば、人体領域内の各画素の深度情報が入力されている場合、画素間の画像空間上の距離が近く、深度情報が類似する集合を部分領域として抽出してもよい。この際、部分領域に内包される閉領域は部分領域に統合されてもよいし、異なる部分領域として抽出してもよい。また、画素間の距離や部分領域の面積に閾値を設けて抽出してもよい。 For example, when the depth information of each pixel in the human body region is input, a set in which the distance between the pixels in the image space is short and the depth information is similar may be extracted as a subregion. At this time, the closed region included in the partial region may be integrated into the partial region or may be extracted as a different partial region. Further, the extraction may be performed by setting a threshold value for the distance between pixels and the area of the partial area.
他の方法として、たとえば測距部12が特定の測距領域について深度情報を計測する場合、人体領域内の各測距領域のうち、深度情報の分散が閾値以下となるものを部分領域として抽出してもよい。
As another method, for example, when the
基準領域取得部23は、AFの対象となる特定部位である基準領域を取得し、比較部24に出力する。基準領域の取得方法は特定の方法に限定しない。たとえば、カメラのライブビュー画面を撮影者がタップすることで、タップされた領域を基準領域としてもよい。ほかにも、たとえば顔検出手法を用いて、画面中央に近く、より大きく映っている顔の領域を基準領域としてもよい。検出手法を用いる場合、検出手法は検出部21と同様であってもよいし、異なる手法であってもよい。ここでは、基準領域(第1の領域)は、AF開始時である第1の時点に撮影された第1の画像における合焦対象領域として保持されているものとする。なお、撮影開始時は、初期画像の所定の領域(例えば画面中央)を基準領域として予め設定しておく。
The reference
比較部24は、部分領域抽出部22から入力された部分領域と、基準領域取得部23から入力された基準領域と、を比較し、比較結果を選択部25に出力する。
The
比較部24が比較する対象とする要素(以降では、比較要素と呼ぶ)は深度情報を含み、異なる複数種類の情報であってもよい。たとえば、基準領域と部分領域の間の画像空間上の相対位置を含んでもよいし、領域に対応する画像上の画素値を含んでもよい。また、画像空間上の相対位置を用いる場合、深度情報に基づいて相対位置の大きさを正規化してもよい。たとえば、カメラからの距離が小さい領域については相対位置の値を小さくし、距離が大きい領域については相対位置の値を大きくしてもよい。 The element to be compared by the comparison unit 24 (hereinafter referred to as a comparison element) includes depth information, and may be a plurality of different types of information. For example, it may include relative positions in the image space between the reference region and the subregion, or it may include pixel values on the image corresponding to the region. Further, when the relative position on the image space is used, the size of the relative position may be normalized based on the depth information. For example, the relative position value may be increased for a region where the distance from the camera is small, and the relative position value may be increased for an region where the distance is large.
ただし、比較部24の比較方法は特定の方法に限定しない。たとえば、各領域の比較要素を平均し、平均値の差を比較結果として出力してもよい。また、部分領域と基準領域の形状が同一の場合は対応する各画素について比較要素の差を比較結果として出力してもよい。他にも、領域内の深度情報の分布を比較し、カルバック・ライブラー情報量などの指標を比較結果として出力してもよい。
However, the comparison method of the
更に、比較部24は注目する物体の深度情報の時間変化に基づき、基準領域が取得された時点からの深度情報の変化量を推定することで、推定した深度情報と部分領域の深度情報を比較してもよい。この場合、カメラとの距離が時間経過とともに動的に変化する被写体についても、より安定したAFが実現できる場合がある。
Further, the
選択部25は、比較部24から入力された、基準領域と各部分領域との比較結果に基づいて、現在の入力画像に対する合焦対象領域を選択し、撮影装置10に出力する。選択部25が合焦対象領域を選択する方法の一例としては、基準領域との比較結果で、基準領域と類似する(すなわち基準領域の深度との差が相対的に小さい)部分領域を選択する方法がある。この方法によれば、基準領域と類似する領域にAFを継続することが可能である。
The
また、比較結果のみを用いるのではなく、各部分領域について合焦対象領域として選択する優先度を評価し、優先度の高いものが選ばれやすくなるように選択してもよい。たとえば、基準領域の深度との差が所定値未満の部分領域が複数個存在する場合、面積が大きいほど優先度を高くしてもよい。他にもたとえば、画像の中心に近いほど優先度を高くしてもよい。さらに、選択部25は、複数の基準に基づいて、第2の画像における合焦対象領域を決定してもよい。例えば、複数の基準には、第1の領域と第2の領域との類似度、および、1つ以上の部分領域の面積についてのそれぞれの基準を含む。
Further, instead of using only the comparison result, the priority of selecting each partial region as the focusing target region may be evaluated, and the one having a high priority may be easily selected. For example, when there are a plurality of partial regions whose difference from the depth of the reference region is less than a predetermined value, the larger the area, the higher the priority may be. Alternatively, for example, the closer to the center of the image, the higher the priority. Further, the
更に、基準領域を取得した時刻からの経過時間によって合焦対象領域の選択基準を変更してもよい。たとえば、経過時間が短い場合は基準領域との比較結果で類似度が近いものを優先し、経過時間が長くなるほど、部分領域の面積など比較結果以外の優先基準を重視して選択してもよい。また、比較結果が複数種類の要素を含む場合、要素ごとの類似度について、異なる重みで考慮した選択を行ってもよい。 Further, the selection criterion of the focusing target area may be changed according to the elapsed time from the time when the reference area is acquired. For example, if the elapsed time is short, priority may be given to the comparison result with the reference area having a close degree of similarity, and as the elapsed time becomes longer, the priority criteria other than the comparison result such as the area of the partial area may be emphasized and selected. .. Further, when the comparison result includes a plurality of types of elements, the similarity of each element may be selected in consideration of different weights.
<装置の動作>
図3は、第1実施形態におけるAFシステムが実行する処理を説明するフローチャートである。S101~S111はそれぞれ特定の処理を表しており、原則として順番に実行する。ただし、AFシステムは必ずしもこのフローチャートで説明するすべての処理を行わなくともよいし、処理の実行順序が変化してもよい。さらに、複数の処理を並列に実行してもよい。
<Operation of the device>
FIG. 3 is a flowchart illustrating a process executed by the AF system according to the first embodiment. Each of S101 to S111 represents a specific process, and is executed in order in principle. However, the AF system does not necessarily have to perform all the processes described in this flowchart, and the execution order of the processes may change. Further, a plurality of processes may be executed in parallel.
ステップS101では、画像取得部11は、AF開始時点(時刻t-1)の画像(第1の画像)を取得する。たとえば、ライブビューのRGB画像を取得する。また、ステップS102では、測距部12は、AF開始時点の深度情報を計測する。たとえば、測距部12が位相差センサを備える場合はデフォーカス量を計測する。なお、計測された深度情報は、領域選択装置20により後続して取得(深度情報取得)されることになる。
In step S101, the
ステップS103では、基準領域取得部23は、AF開始時点(第1の時点)の基準領域(第1の領域)を取得する。すなわち、AF開始時点で合焦対象領域として使用していた領域を取得(基準取得)する。たとえば、ユーザーがタッチパネルで選択した領域や、自動検出された顔や人体の領域を取得する。基準領域を検出処理に基づいて取得する場合、検出部21などを用いてもよい。また、基準領域の候補が複数存在する場合、選択部25などを用いて基準領域を選択してもよい。また、連続して撮影している場合は、前回の合焦領域を取得してもよい。
In step S103, the reference
ステップS104では、画像取得部11は、合焦対象領域を選択する時点(時刻t、第2の時点)の画像(第2の画像)を取得する。合焦対象領域を選択する時点は、AF開始時点に後続する時刻である。なお、第1の時点と第2の時点は連続する時刻でない場合でもよく、例えば、一定時間間隔でフォーカス位置を変更するものであってもよい。ステップS105では、測距部12は、合焦対象領域を選択する時点の深度情報を計測する。なお、計測された深度情報は、領域選択装置20により後続して取得(深度情報取得)されることになる。
In step S104, the
ステップS106では、検出部21は、S104で取得された画像から合焦対象の候補となる人体領域(第2の領域)を検出する。たとえば、合焦対象となる所定の物体(人体の顔や全身、犬や猫などの動物、車や建物といった領域)を検出する。基準領域と画像特徴が類似する領域を第2の領域として検出してもよい。例えば、ディープラーニングや、セマンティックセグメンテーションを用いて第2の領域を検出してもよい。また、S104で取得された画像に対応する深度情報に基づいて、深度が所定の範囲である領域を第2の領域として検出してもよい。例えば、被写体が一人だけのとき等は手前の領域(つまり同じような深度を示す領域)を検出してもよい。この場合、S107をスキップしてもよい。そして、ステップS107では、部分領域抽出部22は、S106で検出した人体領域から、所定の条件を満たす1つ以上の部分領域を抽出する。例えば、部分領域は深度情報に基づいて抽出され、具体的には、深度情報によって示される深度が被写界深度の範囲に含まれる部分領域が抽出される。
In step S106, the
S107の処理に関して図1を参照して説明する。S107では、被写界深度に基づいて、部分領域の抽出基準を変更する。たとえば、被写体G-1(直立した人体)が検出されている場合、人体領域内のカメラからの距離はほぼ一定(例えば算出される深度の差は50cm以下)である。そのため、一般には人体領域全体が1つの部分領域として抽出され得る。ただし、撮影装置の被写界深度が狭い場合(例えば数cm)には、目鼻や手足など、撮影装置からの距離が近い部分領域をそれぞれ抽出してもよい。 The processing of S107 will be described with reference to FIG. In S107, the extraction standard of the partial region is changed based on the depth of field. For example, when the subject G-1 (upright human body) is detected, the distance from the camera in the human body region is almost constant (for example, the calculated depth difference is 50 cm or less). Therefore, in general, the entire human body region can be extracted as one partial region. However, when the depth of field of the photographing device is narrow (for example, several cm), partial regions such as the eyes, nose, limbs, etc., which are close to the photographing device may be extracted.
カメラからの距離が近い部分領域を抽出する方法の一例としては、たとえばK-meansなどのクラスタリング手法を用いる方法がある。具体的には、深度情報が近傍する画素クラスタを抽出し、各クラスタを部分領域として抽出する。このとき、画像上の画素間の距離を考慮してもよいし、無視してもよい。 As an example of a method of extracting a partial region close to the camera, there is a method of using a clustering method such as K-means. Specifically, pixel clusters with close depth information are extracted, and each cluster is extracted as a partial area. At this time, the distance between the pixels on the image may be taken into consideration or may be ignored.
ステップS108では、比較部24は、S103で取得した基準領域とS107で抽出された各部分領域を比較する。たとえば、基準領域と各部分領域間の深度情報の分布や、基準領域における画像特徴と抽出された部分領域における画像特徴を比較する。
In step S108, the
図4は、S108における基準領域と各部分領域の比較を説明する図である。図4(a)は第1の画像から取得された基準領域である領域G-4を示す。また、図4(b)は第2の画像から抽出された部分領域である領域G-5aと領域G-5bを示す。S108では、たとえば基準領域と各部分領域それぞれについて深度情報から深度の平均を求め、基準領域と部分領域との間の深度情報から深度の平均の差の絶対値を比較結果として出力してもよい。図4に示す一例では、領域G-5aは領域G-5bよりも領域G-4に近い。そのため、比較結果としては深度情報の差がより小さく出力される。また、画像特徴を用いて比較する場合は、基準領域における画像特徴と抽出された部分領域における画像特徴との類似度と、予め設定された閾値とを比較する。類似度が閾値以上であれば類似しており、同じ部位である可能性が高い。一方で、閾値以下であれば類似しないため別の部位である可能性が高い。 FIG. 4 is a diagram illustrating a comparison between the reference region and each partial region in S108. FIG. 4A shows a region G-4 which is a reference region acquired from the first image. Further, FIG. 4B shows a region G-5a and a region G-5b which are partial regions extracted from the second image. In S108, for example, the average depth may be obtained from the depth information for each of the reference region and each partial region, and the absolute value of the difference between the average depths from the depth information between the reference region and the partial region may be output as a comparison result. .. In the example shown in FIG. 4, the region G-5a is closer to the region G-4 than the region G-5b. Therefore, as a comparison result, the difference in depth information is output to be smaller. When comparing using image features, the similarity between the image features in the reference region and the image features in the extracted partial region is compared with a preset threshold value. If the degree of similarity is equal to or higher than the threshold value, they are similar and are likely to be the same site. On the other hand, if it is below the threshold value, there is a high possibility that it is a different site because it is not similar.
ステップS109では、選択部25は、比較結果に基づいて部分領域を選択し、合焦対象領域として決定する。ここでは、基準領域における平均の深度ともっとも近い平均深度を有する部分領域を合焦対象領域として決定する。領域における深度の平均値ではなく、代表的な位置の深度を用いてもよい。また、深度の差が一番小さい(所定の値より小さい)部分領域を合焦対象領域として決定してもよい。このように深度が近い領域を決定することでピントを合わせる時間の短縮にもつながる。さらに、合焦対象領域の選択方法の一例としては、たとえば、基準領域ともっとも類似する部分領域を選択してもよい。また、比較結果で基準領域との差分が閾値以下の部分領域の中で、もっとも面積の大きな部分領域を選択してもよい。複数の選択基準を組合せてもよい。
In step S109, the
ステップS110では、領域選択装置20は、AF処理を継続するかどうかを判定する。AF処理を継続する場合はS111に進み、継続しない場合は処理を終了する。ステップS111では、領域選択装置20は、第2の画像を第1の画像として置き換える。その後S103に戻り、処理を反復させる。
In step S110, the
以上の処理によって、直前(時刻t-1)でAFの対象として選択されていた基準領域に対応する現在(時刻t)の画像中の領域を好適に選択することが可能となる。 By the above processing, it becomes possible to suitably select the region in the current (time t) image corresponding to the reference region selected as the AF target immediately before (time t-1).
以上説明したとおり第1実施形態によれば、基準領域の情報を利用して、検出された人体領域内でAFに適した部分領域を合焦対象領域として選択する。特に、基準領域との差がより小さい(より類似した)部分領域を選択する。これにより、AFシステムは、検出された領域内の深度の差が大きい場合であっても、好適にAFを継続実行することが可能である。 As described above, according to the first embodiment, the partial region suitable for AF is selected as the focusing target region in the detected human body region by using the information of the reference region. In particular, select a partial region with a smaller (more similar) difference from the reference region. This allows the AF system to suitably continue AF even when the difference in depth within the detected region is large.
なお、上述の説明では人体領域を検出する場合について説明したが、人体領域以外の検出対象に適用してもよい。たとえば、人以外の動物を検出してもよいし、車両など特定物体を検出してもよい。また、デジタルカメラでの撮影に利用可能なほか、後処理によって撮影後にピント位置を変更するシステムなどにも利用することが可能である。 Although the case of detecting the human body region has been described in the above description, it may be applied to a detection target other than the human body region. For example, an animal other than a human may be detected, or a specific object such as a vehicle may be detected. In addition to being usable for shooting with a digital camera, it can also be used for a system that changes the focus position after shooting by post-processing.
(第2実施形態)
第2実施形態では、基準領域と合焦対象領域の部位カテゴリが違う場合に対処する形態について説明する。以下では、カメラなどから取得した画像に基づいて頭部および胴部を検出し、頭部が検出されなかった場合に胴部の部分領域から合焦対象領域を選択する例について説明する。
(Second Embodiment)
In the second embodiment, a mode for dealing with a case where the site categories of the reference region and the in-focus target region are different will be described. Hereinafter, an example will be described in which the head and the body are detected based on an image acquired from a camera or the like, and when the head is not detected, the focusing target area is selected from the partial area of the body.
なお、ここでは、用語「胴部」は、頭部を含まない人の体幹部分を指す。ただし、胴部は体幹部分以外に、首や手足などを含んでもよい。また、体幹部分全体ではなく、胸部や腹部など一部の部位であってもよい。 In addition, here, the term "torso" refers to the trunk part of a person who does not include the head. However, the torso may include the neck, limbs, etc. in addition to the trunk. Moreover, it may be a part of a part such as a chest and an abdomen instead of the whole trunk part.
第2実施形態におけるAFシステムの構成は、第1実施形態(図2)とほぼ同様である。ただし、各機能部の動作が第1実施形態とは異なるため、以下では第1実施形態とは異なる部分について説明する。 The configuration of the AF system in the second embodiment is almost the same as that in the first embodiment (FIG. 2). However, since the operation of each functional unit is different from that of the first embodiment, the parts different from the first embodiment will be described below.
図7は、第2実施形態におけるAFシステムが実行する処理を説明するフローチャートである。S201~S215はそれぞれ特定の処理を表している。 FIG. 7 is a flowchart illustrating a process executed by the AF system according to the second embodiment. S201 to S215 each represent a specific process.
ステップS201およびS202では、第1の画像とその深度情報が取得される。S201およびS202で行われる処理は第1実施形態におけるS101およびS102と同様であるため、説明は省略する。 In steps S201 and S202, the first image and its depth information are acquired. Since the processing performed in S201 and S202 is the same as in S101 and S102 in the first embodiment, the description thereof will be omitted.
ステップS203では、検出部21は、第1の画像から人体の頭部領域と胴部領域を検出し、部分領域抽出部22および基準領域取得部23に出力する。胴部領域を検出する方法は特定の方法に限定しない。たとえば、意味的領域分割の手法を用いて胴部を直接検出してもよいし、物体検出手法を用いて肩や腰など、胴部に含まれる部位を検出することで胴部を検出してもよい。
In step S203, the
図5は、人体の検出例を示す図である。図5(a)は、検出部21が頭部および胴部を検出した場合の一例を示している。領域G-8および領域G-6aは、検出された頭部および胴部である。一方、図5(b)は、構造物(領域G-9)により頭部が遮蔽され、検出部21が胴部G-6bのみを検出した場合の一例を示している。
FIG. 5 is a diagram showing an example of detection of a human body. FIG. 5A shows an example when the
領域G-6a、G-6bのように、胴部として検出される部分の大きさや位置は必ずしも体幹全体に対応するものでなくともよい。また、必ずしも矩形で表現可能である必要はなく、楕円や多角形など任意の形状であってもよい。また、分布として表現されていてもよい。 The size and position of the portion detected as the torso, such as the regions G-6a and G-6b, do not necessarily correspond to the entire trunk. Further, it does not necessarily have to be represented by a rectangle, and may be any shape such as an ellipse or a polygon. It may also be expressed as a distribution.
ステップS204では、基準領域取得部23は、第1の画像からAFの対象となる基準領域を取得し、比較部24に出力する。基準領域の位置は、第1実施形態のS103と同様にして、ユーザによる指定や、検出部21による検出結果を用いて指定される。以下の説明では、基準領域は頭部が優先的に選択されるものとして説明するが、本発明は頭部優先に限定されるものではない。胴部優先とする場合には、以下の説明における頭部と胴部を入れ替えて読むとよい。
In step S204, the reference
指定された位置が図5(a)の領域G-8に示すような頭部領域であれば、その頭部領域が基準領域とされる。基準領域取得部23が取得する頭部領域は、領域G-8のように頭部全体ではなく頭部に含まれる顔など部分の領域であってもよい。指定された位置が図5(a)の領域G-6aに示すような胴部領域であった場合は、指定された位置に最も近い位置にある頭部領域である領域G-8が基準領域として選択される。指定された位置が図5(b)の領域G-6bに示すような胴部領域であり、対応する頭部領域が存在しない場合は、指定された位置の領域G-6bを基準領域として選択する。
If the designated position is a head region as shown in the region G-8 of FIG. 5A, the head region is used as a reference region. The head region acquired by the reference
以降、基準領域に胴部領域が指定された場合に関して説明は図示しないが、処理としては基準領域に頭部領域が指定された場合と同じである。連続して撮影されている場合には、前回の時刻で選択された合焦対象領域を基準領域とする。 Hereinafter, the case where the body region is designated as the reference region is not shown, but the processing is the same as the case where the head region is designated as the reference region. When shooting continuously, the in-focus target area selected at the previous time is used as the reference area.
ステップS205およびS206では、第2の画像とその深度情報が取得される。S205およびS206の処理は、第1実施形態のS104およびS105と同様であるため、説明は省略する。 In steps S205 and S206, the second image and its depth information are acquired. Since the processing of S205 and S206 is the same as that of S104 and S105 of the first embodiment, the description thereof will be omitted.
ステップS207では、検出部21は、第2の画像から頭部領域および胴部領域を検出する。ステップS208では、部分領域抽出部22は、第2の画像から検出された頭部領域および胴部領域のそれぞれに対して、深度情報に基づいてそれぞれの部分領域を抽出する。部分領域の具体的な抽出方法については、第1実施形態のS107ですでに詳細な説明がされているため、ここでは割愛する。
In step S207, the
ステップS209では、比較部24は、第1の画像から取得された基準領域と、第2の画像で検出された頭部領域に属する部分領域に対して、それぞれの画像における深度情報を用いて比較処理を行う。基準領域と部分領域の具体的な比較方法に関しては、第1実施形態のS108で説明した方法と同様である。
In step S209, the
ステップS210では、選択部25は、S209で得られた比較結果を検証する。検証内容として、第2の画像の所定範囲内に頭部の部分領域が存在するかどうかを判定する。ここで所定範囲とは、連続撮影における追尾範囲であるが、その広さに関しては特定の範囲に限定されない。例えば、追尾対象は人体であるため、人体の常識的な移動速度と連続撮影のフレームレートから所定範囲の広さを設定する。検証結果として、所定範囲内に頭部の部分領域が存在すればS211へと進み、存在しない場合はS212へと進む。所定範囲内に頭部の部分領域が存在しない場合とは、例えば図9(b)のように、頭部領域が遮蔽されている場合や頭部検出に失敗した場合などが考えられる。
In step S210, the
ステップS211では、選択部25は、合焦対象領域を選択する。例えば、第1実施形態のS109と同様の手順により、図8(a)で示される第1の画像内の基準領域G-10に対して、図8(b)で示される第2の画像内の頭部部分領域G-11aおよびG-11bから合焦対象領域を選択する。その後、S214へ処理を進める。
In step S211th, the
ステップS212では、比較部24は、第1の画像から取得された基準領域と、第2の画像で検出された胴部領域に属する部分領域に対して、それぞれの画像における深度情報を用いて比較処理を行う。基準領域と部分領域の具体的な比較方法に関しては、第1実施形態のS108で説明した方法と同様である。比較処理が終わると、S213へ処理を進める。
In step S212, the
ステップS213では、選択部25は、S212で得られた比較結果から合焦対象領域を決定する。例えば、第1実施形態のS109と同様の手順により、図9(a)で示される第1の画像内の基準領域G-10に対して、図9(b)で示される第2の画像内の胴部部分領域G-7aおよびG-7bから合焦対象領域を選択する。その後、S214へ処理を進める。
In step S213, the
ステップS214では、領域選択装置20は、AF処理を継続するかどうかを判定する。AF処理を継続する場合はS215に進み、継続しない場合は処理を終了する。ステップS215では、領域選択装置20は、第2の画像を第1の画像として置き換える。その後S204に戻り、処理を反復させる。
In step S214, the
以上説明したとおり第2実施形態によれば、先行する画像において基準領域であった部位が遮蔽等により処理対象の画像において検出できない場合、検出された人体領域内でAFに適した部分領域を合焦対象領域として選択する。これにより、AFシステムは、遮蔽等が存在した場合であっても、好適にAFを継続実行することが可能である。 As described above, according to the second embodiment, when the portion that was the reference region in the preceding image cannot be detected in the image to be processed due to shielding or the like, a partial region suitable for AF is combined in the detected human body region. Select as the focus area. As a result, the AF system can suitably continuously execute AF even when shielding or the like is present.
なお、本実施形態では検出部21が胴部領域を検出し、基準領域取得部23が頭部領域に基づく基準領域を取得する場合について説明したが、頭部と胴部の組み合わせ以外にも適用可能である。たとえば、顔と全身の組み合わせであってもよいし、単独人物と密集した人物の集団の組み合わせであってもよい。ほかにも、車のナンバープレートと車体全体の組み合わせであってもよい。
In the present embodiment, the case where the
(その他の実施例)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other examples)
The present invention supplies a program that realizes one or more functions of the above-described embodiment to a system or device via a network or storage medium, and one or more processors in the computer of the system or device reads and executes the program. It can also be realized by the processing to be performed. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
発明は上記実施形態に制限されるものではなく、発明の精神及び範囲から離脱することなく、様々な変更及び変形が可能である。従って、発明の範囲を公にするために請求項を添付する。 The invention is not limited to the above embodiment, and various modifications and modifications can be made without departing from the spirit and scope of the invention. Therefore, a claim is attached to publicize the scope of the invention.
10 撮影装置; 11 画像取得部; 12 測距部; 20 領域選択装置; 21 検出部; 22 部分領域抽出部; 23 基準領域取得部; 24 比較部; 25 選択部 10 Imaging device; 11 Image acquisition unit; 12 Distance measurement unit; 20 Area selection device; 21 Detection unit; 22 Partial area extraction unit; 23 Reference area acquisition unit; 24 Comparison unit; 25 Selection unit
Claims (18)
第1の時点で前記撮像装置により撮像された第1の画像において合焦対象となる第1の領域を取得する取得手段と、
前記第1の時点に後続する第2の時点で前記撮像装置により撮像された第2の画像から合焦対象の候補となる第2の領域を検出する検出手段と、
前記第1の領域と前記第2の画像とに基づいて、前記第2の領域のうち1つ以上の部分領域の中から前記第2の画像における合焦対象領域を決定する決定手段と、
を備えることを特徴とする画像処理装置。 An image processing device that determines the in-focus target area of the image pickup device.
An acquisition means for acquiring a first region to be focused in a first image captured by the image pickup device at a first time point, and an acquisition means.
A detection means for detecting a second region as a candidate for focusing from a second image captured by the image pickup apparatus at a second time point following the first time point.
A determination means for determining an in-focus target region in the second image from one or more partial regions of the second region based on the first region and the second image.
An image processing device characterized by comprising.
前記決定手段は、前記第1の領域に対応する深度情報と前記第2の領域に対応する深度情報とに基づいて、前記第2の画像における前記合焦対象領域を決定する
ことを特徴とする請求項1に記載の画像処理装置。 Further, it has a depth information acquisition means for acquiring depth information for each region of the image captured by the image pickup device.
The determining means is characterized in that the focusing target region in the second image is determined based on the depth information corresponding to the first region and the depth information corresponding to the second region. The image processing apparatus according to claim 1.
ことを特徴とする請求項1または2に記載の画像処理装置。 The feature is that the in-focus target region is determined based on the difference in depth calculated by the determination means and the depth information corresponding to the first region and the depth information corresponding to the second image. The image processing apparatus according to claim 1 or 2.
ことを特徴とする請求項3に記載の画像処理装置。 The determination means sets a partial region of the one or more partial regions in which the difference between the depth of the first region and the depth of each of the one or more partial regions is smaller than a predetermined threshold value as the focusing target region. The image processing apparatus according to claim 3, wherein the image processing apparatus is determined to be.
ことを特徴とする請求項4に記載の画像処理装置。 When there are a plurality of partial regions whose difference from the depth of the first region is less than a predetermined value, the determination means has a relatively large area or a relatively small depth among the plurality of partial regions. The image processing apparatus according to claim 4, wherein the partial area is determined to be the focusing target area.
ことを特徴とする請求項2乃至5の何れか1項に記載の画像処理装置。 The image processing apparatus according to any one of claims 2 to 5, wherein the depth information is based on the distance between the image pickup device and the subject or the phase difference of the incident light in the image pickup device of the image pickup device.
ことを特徴とする請求項1乃至6の何れか1項に記載の画像処理装置。 Claims 1 to 6 are characterized in that the detection means detects a region having image features similar to the image features extracted from the first region in the second image as the second region. The image processing apparatus according to any one of the above items.
前記検出手段は、前記特定部位と同じ部位を前記第2の領域として検出する
ことを特徴とする請求項7に記載の画像処理装置。 The acquisition means acquires a specific part of a person or an object as the first region, and obtains it.
The image processing apparatus according to claim 7, wherein the detection means detects the same portion as the specific portion as the second region.
前記検出手段は、前記特定部位と同じ部位を検出できない場合、前記特定部位と異なる部位を前記第2の領域として検出する
ことを特徴とする請求項8に記載の画像処理装置。 The acquisition means acquires a specific part of a person or an object as the first region, and obtains it.
The image processing apparatus according to claim 8, wherein the detection means detects a portion different from the specific portion as the second region when the same portion as the specific portion cannot be detected.
前記決定手段は、前記抽出手段によって抽出された前記1つ以上の部分領域から前記第2の画像における合焦対象領域を決定する
ことを特徴とする請求項1乃至9の何れか1項に記載の画像処理装置。 Further having an extraction means for extracting one or more partial regions satisfying a predetermined condition from the second region.
The invention according to any one of claims 1 to 9, wherein the determination means determines an in-focus target region in the second image from the one or more partial regions extracted by the extraction means. Image processing equipment.
ことを特徴とする請求項10に記載の画像処理装置。 The extraction means is characterized in that, of the second region, a region whose depth indicated by the depth information corresponding to the second image is included in a predetermined range is extracted as one or more partial regions. The image processing apparatus according to claim 10.
ことを特徴とする請求項10または11に記載の画像処理装置。 10. The extraction means is characterized in that the predetermined condition of the one or more partial regions is changed based on the depth of field when the image pickup apparatus captures the second image. Or the image processing apparatus according to 11.
前記複数の基準は、前記第1の領域と前記第2の領域との類似度、および、前記1つ以上の部分領域の面積についてのそれぞれの基準を含む
ことを特徴とする請求項1乃至12の何れか1項に記載の画像処理装置。 The determination means determines an in-focus target area in the second image based on a plurality of criteria.
Claims 1 to 12, wherein the plurality of criteria include the similarity between the first region and the second region, and the respective criteria for the area of the one or more partial regions. The image processing apparatus according to any one of the above items.
ことを特徴とする請求項13に記載の画像処理装置。 13. The image processing apparatus according to claim 13, wherein the determination means changes the plurality of criteria of the focusing target region based on the elapsed time from the first time point.
ことを特徴とする請求項1乃至14の何れか1項に記載の画像処理装置。 The image processing apparatus according to any one of claims 1 to 14, wherein the second region is a region showing a head and / or a torso of a person.
ことを特徴とする請求項1乃至15の何れか1項に記載の画像処理装置。 Claims 1 to 15 are characterized in that the determination means preferentially determines a partial region having an area larger than a predetermined value among the one or more partial regions as a focus target region in the second image. The image processing apparatus according to any one of the above items.
第1の時点で前記撮像装置により撮像された第1の画像において合焦対象となる第1の領域を取得する取得工程と、
前記第1の時点に後続する第2の時点で前記撮像装置により撮像された第2の画像から合焦対象の候補となる第2の領域を検出する検出工程と、
前記第1の領域と前記第2の画像とに基づいて、前記第2の領域のうち1つ以上の部分領域の中から前記第2の画像における合焦対象領域を決定する決定工程と、
を含むことを特徴とする制御方法。 It is a control method of an image processing device that determines an in-focus target area of an image pickup device.
The acquisition step of acquiring the first region to be focused in the first image captured by the image pickup device at the first time point, and the acquisition step.
A detection step of detecting a second region as a candidate for focusing from a second image captured by the image pickup apparatus at a second time point following the first time point.
A determination step of determining an in-focus target region in the second image from one or more partial regions of the second region based on the first region and the second image.
A control method characterized by including.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US17/405,167 US11546502B2 (en) | 2020-09-14 | 2021-08-18 | Image processing apparatus and method of controlling the same |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020154008 | 2020-09-14 | ||
JP2020154008 | 2020-09-14 |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2022048077A true JP2022048077A (en) | 2022-03-25 |
Family
ID=80781255
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2021096752A Pending JP2022048077A (en) | 2020-09-14 | 2021-06-09 | Image processing apparatus and control method for the same |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2022048077A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115623318A (en) * | 2022-12-20 | 2023-01-17 | 荣耀终端有限公司 | Focusing method and related device |
-
2021
- 2021-06-09 JP JP2021096752A patent/JP2022048077A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115623318A (en) * | 2022-12-20 | 2023-01-17 | 荣耀终端有限公司 | Focusing method and related device |
CN115623318B (en) * | 2022-12-20 | 2024-04-19 | 荣耀终端有限公司 | Focusing method and related device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102339607B1 (en) | Apparatuses and Methods for Iris Based Biometric Recognition | |
JP5159515B2 (en) | Image processing apparatus and control method thereof | |
JP5704905B2 (en) | Image processing apparatus, image processing method, program, and storage medium | |
JP5662670B2 (en) | Image processing apparatus, image processing method, and program | |
US10146992B2 (en) | Image processing apparatus, image processing method, and storage medium that recognize an image based on a designated object type | |
KR20110093659A (en) | Image recognition apparatus and method | |
US20140286546A1 (en) | Apparatus and method for processing fingerprint image | |
JP5001930B2 (en) | Motion recognition apparatus and method | |
JP2017076288A (en) | Information processor, information processing method and program | |
JP6981277B2 (en) | Detection device and detection program | |
US20220321792A1 (en) | Main subject determining apparatus, image capturing apparatus, main subject determining method, and storage medium | |
JP5710940B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP2022048077A (en) | Image processing apparatus and control method for the same | |
KR101290517B1 (en) | Photographing apparatus for tracking object and method thereof | |
JP2013195577A (en) | Imaging device, imaging method, and program | |
US11546502B2 (en) | Image processing apparatus and method of controlling the same | |
JP2021150760A (en) | Imaging apparatus and method for controlling the same | |
KR20180100890A (en) | Method and apparatus for remote multi biometric | |
JP2008089811A (en) | Imaging apparatus and control method therefor | |
KR101703690B1 (en) | Apparatus for recognizing iris and operating method thereof | |
JPH05297152A (en) | Object recognizing device | |
JP7122916B2 (en) | IMAGING DEVICE AND CONTROL METHOD THEREOF, PROGRAM AND STORAGE MEDIUM | |
JP2019146087A (en) | Information processing device, control method of imaging device, computer program, and storage medium | |
KR101545408B1 (en) | Method for detecting profile line and device for detecting profile line | |
CN113691731B (en) | Processing method and device and electronic equipment |