Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7549453B2 - Image processing device and control method thereof, imaging device, program, and storage medium - Google Patents
[go: Go Back, main page]

JP7549453B2 - Image processing device and control method thereof, imaging device, program, and storage medium - Google Patents

Image processing device and control method thereof, imaging device, program, and storage medium Download PDF

Info

Publication number
JP7549453B2
JP7549453B2 JP2020037159A JP2020037159A JP7549453B2 JP 7549453 B2 JP7549453 B2 JP 7549453B2 JP 2020037159 A JP2020037159 A JP 2020037159A JP 2020037159 A JP2020037159 A JP 2020037159A JP 7549453 B2 JP7549453 B2 JP 7549453B2
Authority
JP
Japan
Prior art keywords
subject
area
setting
image processing
processing device
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
Application number
JP2020037159A
Other languages
Japanese (ja)
Other versions
JP2021141421A (en
Inventor
慶祐 緑川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2020037159A priority Critical patent/JP7549453B2/en
Publication of JP2021141421A publication Critical patent/JP2021141421A/en
Application granted granted Critical
Publication of JP7549453B2 publication Critical patent/JP7549453B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Exposure Control For Cameras (AREA)
  • Automatic Focus Adjustment (AREA)
  • Transforming Light Signals Into Electric Signals (AREA)
  • Studio Devices (AREA)

Description

本発明は、画像から被写体を検出する技術に関する。 The present invention relates to a technology for detecting a subject from an image.

従来より、撮像した画像から被写体を検出する技術が知られている。 Technology for detecting a subject from a captured image has been known for some time.

例えば、特許文献1には、撮像画像から被写体領域を抽出する場合に、撮像画像の指定された領域をクロップするかしないかの選択を前回の撮像画像の検出結果に応じて切り替える技術が開示されている。画像全体ではなくクロップされた範囲のみを被写体検出のための入力画像とすることにより、小さな被写体の検出性能を向上させることが可能となる。 For example, Patent Document 1 discloses a technique for selecting whether or not to crop a specified area of a captured image when extracting a subject area from a captured image, depending on the detection results of the previous captured image. By using only the cropped area, rather than the entire image, as the input image for subject detection, it is possible to improve the detection performance of small subjects.

特開2008-172368号公報JP 2008-172368 A

特許文献1では、前回検出された被写体のうちの少なくとも一つのサイズや位置に基づいてクロップの範囲を決定している。しかしながら、この方法では、ユーザが現在の主被写体以外の被写体に興味が無い場合でも、主被写体以外の被写体も検出しようとして、クロップ範囲を広げてしまうことがある。この場合、主被写体の検出率が相対的に犠牲になってしまうこともある。 In Patent Document 1, the crop range is determined based on the size and position of at least one of the previously detected subjects. However, with this method, even if the user is not interested in subjects other than the current main subject, the crop range may be widened in an attempt to detect subjects other than the main subject. In this case, the detection rate of the main subject may be relatively sacrificed.

逆に、現在の主被写体以外の被写体を検出し、新たな主被写体として好ましい被写体に切り替えたい場合でも、狭い領域でクロップを行ってしまって、主被写体以外の被写体が検出されないことがある。 Conversely, even if you want to detect a subject other than the current main subject and switch to a preferred subject as the new main subject, cropping may occur in a small area, resulting in the subject other than the main subject not being detected.

本発明は上述した課題に鑑みてなされたものであり、その目的は、よりユーザの意図に合致した被写体検出を行うことが可能な画像処理装置を提供することである。 The present invention has been made in consideration of the above-mentioned problems, and its purpose is to provide an image processing device capable of performing subject detection that is more in line with the user's intentions.

本発明に係わる画像処理装置は、撮像手段により撮像された画像から被写体を検出する検出手段と、前記画像における前記検出手段により被写体を検出する候補の領域である候補領域を設定する第1の設定手段と、前記候補領域に対して、目的とする被写体を検出するための切り出し領域を設定する第2の設定手段と、撮像装置の動作を、検出された現在の主被写体に追従させ続けるか、他の被写体に切り替えるかの程度を決める乗り移り度合いを設定する第3の設定手段と、を備え、前記候補領域は、前記切り出し領域と前記現在の主被写体の領域を含むように設定され、前記第2の設定手段は、前記乗り移り度合いに基づいて、前記候補領域に対する前記切り出し領域の位置を設定することを特徴とする。 The image processing device of the present invention comprises a detection means for detecting a subject from an image captured by an imaging means, a first setting means for setting a candidate area which is a candidate area in the image in which the detection means detects the subject, a second setting means for setting a cut-out area for detecting a target subject in the candidate area, and a third setting means for setting a degree of transition which determines the extent to which the operation of the imaging device will continue to follow the detected current main subject or will switch to another subject , wherein the candidate area is set to include the cut-out area and the area of the current main subject, and the second setting means sets the position of the cut-out area relative to the candidate area based on the degree of transition.

本発明によれば、よりユーザの意図に合致した被写体検出を行うことが可能な画像処理装置を提供することが可能となる。 The present invention makes it possible to provide an image processing device capable of performing subject detection that is more in line with the user's intentions.

本発明の一実施形態に係わる撮像装置の構成を示すブロック図。1 is a block diagram showing the configuration of an image pickup apparatus according to an embodiment of the present invention; 被写体検出部の入力画像を説明する図。4A to 4C are diagrams illustrating input images to a subject detection unit. 一実施形態における全体処理手順を示すフローチャート。1 is a flowchart showing an overall processing procedure according to an embodiment. 一実施形態におけるクロップ領域を示す模式図。FIG. 4 is a schematic diagram showing a crop region according to an embodiment.

以下、添付図面を参照して実施形態を詳しく説明する。なお、以下の実施形態は特許請求の範囲に係る発明を限定するものではない。実施形態には複数の特徴が記載されているが、これらの複数の特徴の全てが発明に必須のものとは限らず、また、複数の特徴は任意に組み合わせられてもよい。さらに、添付図面においては、同一若しくは同様の構成に同一の参照番号を付し、重複した説明は省略する。 The following embodiments are described in detail with reference to the attached drawings. Note that the following embodiments do not limit the invention according to the claims. Although the embodiments describe multiple features, not all of these multiple features are necessarily essential to the invention, and multiple features may be combined in any manner. Furthermore, in the attached drawings, the same reference numbers are used for the same or similar configurations, and duplicate explanations are omitted.

(撮像装置の構成)
図1は、本発明の一実施形態に係わる撮像装置100の構成を示すブロック図である。図1を参照して、撮像装置100の構成について説明する。
(Configuration of the imaging device)
1 is a block diagram showing the configuration of an image capturing apparatus 100 according to an embodiment of the present invention. The configuration of the image capturing apparatus 100 will be described with reference to FIG.

撮像装置100は、被写体を撮影して、動画や静止画のデータをテープや固体メモリ、光ディスクや磁気ディスクなどの各種メディアに記録可能なデジタルスチルカメラやビデオカメラなどであるが、これらに限定されるものではない。撮像装置100内の各ユニットは、バス160を介して接続されている。また各ユニットは、CPU151(中央演算処理装置)により制御される。 The imaging device 100 may be, but is not limited to, a digital still camera or video camera that can capture an image of a subject and record video or still image data on various media such as tape, solid-state memory, optical disks, and magnetic disks. Each unit in the imaging device 100 is connected via a bus 160. Each unit is controlled by a CPU 151 (central processing unit).

レンズユニット101は、固定1群レンズ102、ズームレンズ(2群レンズ)111、絞り103、固定3群レンズ121、および、フォーカスレンズ131を備えて構成される。フォーカスレンズ131は、焦点調節用レンズであり、図1には単レンズで簡略的に示されているが、通常複数のレンズで構成される。 The lens unit 101 is configured with a fixed first group lens 102, a zoom lens (second group lens) 111, an aperture 103, a fixed third group lens 121, and a focus lens 131. The focus lens 131 is a lens for adjusting focus, and although it is shown simply as a single lens in FIG. 1, it is usually configured with multiple lenses.

絞り制御部105は、CPU151の指令に従い、絞りモータ104(AM)を介して絞り103を駆動することにより、絞り103の開口径を調整して撮影時の光量調節を行う。ズーム制御部113は、ズームモータ112(ZM)を介してズームレンズ111を駆動することにより、焦点距離を変更する。フォーカス制御部133は、レンズユニット101のピント方向のずれ量(デフォーカス量)に基づいてフォーカスモータ132(FM)を駆動する駆動量を決定する。加えてフォーカス制御部133は、フォーカスモータ132(FM)を介してフォーカスレンズ131を駆動することにより、焦点調節状態を制御する。フォーカス制御部133およびフォーカスモータ132によるフォーカスレンズ131の移動制御により、AF(オートフォーカス)制御が実現される。 The aperture control unit 105 adjusts the aperture 103 opening diameter and adjusts the amount of light during shooting by driving the aperture 103 via the aperture motor 104 (AM) in accordance with instructions from the CPU 151. The zoom control unit 113 changes the focal length by driving the zoom lens 111 via the zoom motor 112 (ZM). The focus control unit 133 determines the drive amount for driving the focus motor 132 (FM) based on the amount of deviation (defocus amount) in the focus direction of the lens unit 101. In addition, the focus control unit 133 controls the focus adjustment state by driving the focus lens 131 via the focus motor 132 (FM). AF (autofocus) control is realized by the movement control of the focus lens 131 by the focus control unit 133 and the focus motor 132.

レンズユニット101を介して撮像素子141上に結像した被写体像は、撮像素子141により電気信号に変換される。撮像素子141は、被写体像(光学像)を電気信号に変換する光電変換素子である。撮像素子141は、横方向にm画素、縦方向にn画素の受光素子が配置されて構成されている。撮像素子141上に結像されて光電変換された画像信号は、撮像信号処理部142により画像データとして整えられ、撮像面の画像を取得することができる。 The subject image formed on the image sensor 141 via the lens unit 101 is converted into an electrical signal by the image sensor 141. The image sensor 141 is a photoelectric conversion element that converts the subject image (optical image) into an electrical signal. The image sensor 141 is configured with m pixels in the horizontal direction and n pixels in the vertical direction of light receiving elements. The image signal formed on the image sensor 141 and photoelectrically converted is arranged as image data by the image signal processing unit 142, and an image on the imaging surface can be obtained.

撮像信号処理部142から出力される画像データは、撮像制御部143に送られ、一時的にRAM154(ランダム・アクセス・メモリ)に蓄積される。RAM154に蓄積された画像データは、画像圧縮解凍部153において圧縮された後、画像記録媒体157に記録される。これと並行して、RAM154に蓄積された画像データは、画像処理部152に送られる。画像処理部152は、画像信号を処理し、画像データに対して最適なサイズへの縮小・拡大処理や画像データ同士の類似度算出等を行う。最適なサイズに処理された画像データを、適宜モニタディスプレイ150に送って表示することによりプレビュー画像表示やスルー画像表示を行うことができる他、被写体検出部162の被写体検出結果を画像データに重畳表示することもできる。またRAM154をリングバッファとして用いることにより、所定期間内に撮像された複数の画像データや、画像データ毎に対応した被写体検出部162の検出結果、位置姿勢変化取得部161が取得した撮像装置の位置姿勢変化等をバッファリングできる。 Image data output from the imaging signal processing unit 142 is sent to the imaging control unit 143 and temporarily stored in the RAM 154 (random access memory). The image data stored in the RAM 154 is compressed in the image compression/decompression unit 153 and then recorded in the image recording medium 157. In parallel with this, the image data stored in the RAM 154 is sent to the image processing unit 152. The image processing unit 152 processes the image signal, performs processing such as reducing/enlarging the image data to an optimal size and calculating the similarity between image data. By appropriately sending and displaying the image data processed to the optimal size on the monitor display 150, it is possible to display a preview image or a through image, and it is also possible to superimpose the subject detection result of the subject detection unit 162 on the image data. In addition, by using the RAM 154 as a ring buffer, it is possible to buffer multiple image data captured within a predetermined period, the detection result of the subject detection unit 162 corresponding to each image data, and the position and orientation change of the imaging device acquired by the position and orientation change acquisition unit 161.

操作スイッチ156は、タッチパネルやボタンなどを含む入力インターフェイスであり、モニタディスプレイ150に表示される種々の機能アイコンを選択操作することなどにより、様々な操作を行うことができる。 The operation switch 156 is an input interface including a touch panel and buttons, and various operations can be performed by selecting and operating various function icons displayed on the monitor display 150.

CPU151は、操作スイッチ156から入力されたユーザからの指示、あるいは、一時的にRAM154に蓄積された画像データの画素信号の大きさに基づき、撮像素子141の蓄積時間、撮像素子141から撮像信号処理部142へ出力を行う際のゲインの設定値を決定する。撮像制御部143は、CPU151から蓄積時間、ゲインの設定値の指示を受け取り、撮像素子141を制御する。 The CPU 151 determines the accumulation time of the image sensor 141 and the gain setting value when outputting from the image sensor 141 to the image signal processing unit 142 based on instructions from the user input from the operation switch 156 or the magnitude of the pixel signal of the image data temporarily accumulated in the RAM 154. The image sensor control unit 143 receives instructions on the accumulation time and gain setting value from the CPU 151 and controls the image sensor 141.

被写体検出部162では、画像信号を用いて所定の被写体が存在する領域(主被写体領域)を決定する。被写体検出部162は、パターンマッチングなどの公知の方法で被写体を検出する。フォーカス制御部133では、特定の被写体領域に対するAF制御(自動焦点調節動作)を行うことができる。絞り制御部105では、特定の被写体領域の輝度値を用いた露出制御(露出調節動作)を行う。画像処理部152では、被写体領域に基づいたガンマ補正、ホワイトバランス処理などを行う。 The subject detection unit 162 uses the image signal to determine the area where a specific subject exists (main subject area). The subject detection unit 162 detects the subject using a known method such as pattern matching. The focus control unit 133 can perform AF control (automatic focus adjustment operation) for a specific subject area. The aperture control unit 105 performs exposure control (exposure adjustment operation) using the luminance value of the specific subject area. The image processing unit 152 performs gamma correction, white balance processing, etc. based on the subject area.

モニタディスプレイ(表示部)150では、画像や被写体検出結果を矩形などで表示する。バッテリ159は、電源管理部158により適切に管理され、撮像装置100の全体に安定した電源供給を行う。 The monitor display (display unit) 150 displays images and subject detection results as rectangles or the like. The battery 159 is appropriately managed by the power management unit 158, and provides a stable power supply to the entire imaging device 100.

フラッシュメモリ155には、撮像装置100の動作に必要な制御プログラムや、各部の動作に用いるパラメータ等が記録されている。ユーザの操作により撮像装置100が起動されると(電源OFF状態から電源ON状態へ移行すると)、フラッシュメモリ155に格納された制御プログラム及びパラメータがRAM154の一部に読み込まれる。CPU151は、RAM154にロードされた制御プログラム及び定数に従って撮像装置100の動作を制御する。 Flash memory 155 stores control programs necessary for the operation of imaging device 100 and parameters used for the operation of each part. When imaging device 100 is started by a user's operation (when the power is switched from OFF to ON), the control programs and parameters stored in flash memory 155 are loaded into a part of RAM 154. CPU 151 controls the operation of imaging device 100 according to the control programs and constants loaded into RAM 154.

位置姿勢変化取得部161は、例えばジャイロセンサや加速度センサ、電子コンパス等の位置姿勢センサにより構成され、撮像装置100の撮影シーンに対する位置姿勢変化を計測する。取得した位置姿勢変化はRAM154に保存される。 The position and orientation change acquisition unit 161 is composed of a position and orientation sensor such as a gyro sensor, an acceleration sensor, an electronic compass, etc., and measures the position and orientation change of the imaging device 100 relative to the shooting scene. The acquired position and orientation change is stored in the RAM 154.

深度算出部163では、画像中の任意の被写体について撮像装置からの距離を算出する。生成された距離情報はRAM154に保存され、画像処理部152により参照される。 The depth calculation unit 163 calculates the distance from the imaging device to any subject in the image. The generated distance information is stored in the RAM 154 and is referenced by the image processing unit 152.

なお、上記で説明した構成は、撮像装置の構成の一例に過ぎない。 Note that the configuration described above is just one example of the configuration of an imaging device.

(被写体検出の前提)
次に、被写体検出部162の入力画像を生成する際の本実施形態における前提と、本実施形態の方法を適用しなかった場合の課題について、図2を用いて説明する。ここでは被写体検出部162は例えば犬を検出できるものとする。
(Prerequisite for subject detection)
Next, the premise of this embodiment when generating an input image for the subject detection unit 162 and the problem that occurs when the method of this embodiment is not applied will be described with reference to Fig. 2. Here, it is assumed that the subject detection unit 162 can detect dogs, for example.

図2(a)は、撮像信号処理部142で生成される高解像度の第1の画像を示している。以下、これを画像aとする。画像aに対して低解像度、例えば縦横それぞれ半分の画素数の第2の画像を生成し、それを被写体検出部162の入力とする。図2(b)は、単純に画像aの全体を縮小して第2の画像を生成した結果を示している。これを画像bとする。被写体検出部162の検出性能(検出率や領域の一致度)は被写体の入力画像上のサイズに依存することがあり、画像bを被写体検出部162の入力とすると、縮小に伴って小さくなった被写体の検出性能は低くなる。 Figure 2(a) shows a high-resolution first image generated by the imaging signal processing unit 142. Hereinafter, this will be referred to as image a. A second image with lower resolution than image a, for example with half the number of pixels vertically and horizontally, is generated and used as input to the subject detection unit 162. Figure 2(b) shows the result of simply reducing the entire image a to generate the second image. This will be referred to as image b. The detection performance (detection rate and degree of area coincidence) of the subject detection unit 162 may depend on the size of the subject on the input image, and if image b is used as input to the subject detection unit 162, the detection performance of the subject, which has become smaller as it is reduced, will be poor.

図2(c)は、主被写体が存在する場合、その周辺をクロップ(全画角のうちの一部の画像を切り出す処理)して第2の画像を生成した結果を示している。これを画像cとする。画像bと違い、縮小処理を行っていないため、主被写体の解像度は画像aの解像度と同じであり、縮小に伴う検出性能の低下を抑制できる。結果として主被写体を安定的に検出し、追尾し続けることができる。その一方で、主被写体の近傍に存在しない他の被写体は検出されないという課題がある。 Figure 2 (c) shows the result of generating a second image by cropping (a process of cutting out a part of the image from the full angle of view) the periphery of a main subject when it is present. This is called image c. Unlike image b, since it has not been reduced in size, the resolution of the main subject is the same as that of image a, and the degradation of detection performance associated with reduction can be suppressed. As a result, the main subject can be stably detected and continuously tracked. On the other hand, there is an issue that other subjects that are not present near the main subject cannot be detected.

すなわち、画像bを被写体検出部162の入力とすることにより、多くの被写体を被写体検出部162の検出範囲に含めるか、画像cを被写体検出部162の入力とすることにより、小さい主被写体でも高精度で検出できる様にするかはトレードオフの関係にある。 In other words, there is a trade-off between including many subjects in the detection range of the subject detection unit 162 by using image b as the input to the subject detection unit 162, and being able to detect even a small main subject with high accuracy by using image c as the input to the subject detection unit 162.

(合焦候補領域と乗り移り度合いについて)
本実施形態において、ユーザは合焦候補領域を設定する。ここで合焦候補領域とは、その領域に存在する目的の被写体を優先的に主被写体として選択し、AF(オートフォーカス)により焦点を合わせる領域のことを指す。
(About focus candidate areas and transition degree)
In this embodiment, the user sets a focusing candidate area. Here, the focusing candidate area refers to an area in which a target subject present in the area is preferentially selected as a main subject and focused on by AF (autofocus).

また、ユーザは撮影前に被写体の乗り移り度合いを設定する。乗り移り度合いとは、撮影時、主被写体を追尾中(追従中)に他の被写体が存在した場合に、現在の主被写体の追尾を継続しやすいか、他の被写体を新たな主被写体として選択しやすいかの度合いを示す値である。乗り移り度合いは、例えば乗り移り度合い大と小の2値に設定したり、あるいは多段階に設定したりすることができる。なお、乗り移り度合いの値が大きいほど、他の被写体を新たな主被写体として選択しやすい(乗り移りやすい)ことを意味するものとする。 The user also sets the degree of subject transition before shooting. The degree of transition is a value that indicates the degree to which, when a main subject is being tracked (tracked) and another subject is present during shooting, it is easy to continue tracking the current main subject or to select the other subject as the new main subject. The degree of transition can be set, for example, to two values, high and low, or to multiple levels. Note that a higher value for the degree of transition means that it is easier to select another subject as the new main subject (easier to transition).

ここで、「現在の主被写体よりも合焦候補領域の中心に近い被写体が存在する」という条件が所定の時間続いた場合、その被写体を新たな主被写体として選択する処理があるとする。このとき、この所定の時間を乗り移り度合いに応じて変更することができる。例えば乗り移り度合いが、設定できるなかで最大のものであれば、上記の所定の時間を短くして即座に乗り移りを行う。乗り移り度合いが、設定できるなかで最小のものであれば、主被写体を見失わない限り乗り移りを行わない。それ以外であれば、この所定の時間を乗り移り度合いに比例したものに設定する、という設計を行うことができる。 Let us now assume that if the condition "there is a subject closer to the center of the focus candidate area than the current main subject" continues for a specified time, then that subject is selected as the new main subject. At this time, this specified time can be changed according to the degree of transition. For example, if the degree of transition is the greatest that can be set, then the above-mentioned specified time is shortened and the transition is performed immediately. If the degree of transition is the smallest that can be set, then the transition is not performed unless the main subject is lost. In all other cases, this specified time can be set to something proportional to the degree of transition.

乗り移りを行う条件として被写体の位置関係の例を示したが、これに限る必要はなく、例えば主被写体よりも大きい別の被写体が存在した場合に、乗り移り度合いが閾値以上である場合に限り乗り移る、といった設計を行うことも可能である。 Although an example of the positional relationship of the subject is given as a condition for transfer, this is not a limitation. For example, it is possible to design the system so that if there is another subject larger than the main subject, transfer will occur only if the degree of transfer is equal to or greater than a threshold value.

(全体処理フロー)
本実施形態における全体処理の流れを、図3、図4を用いて説明する。本実施形態においては、被写体の乗り移り度合いを大、中、小の3段階で設定することができ、ユーザは撮影にあたって事前にこれを設定しているものとする。
(Overall processing flow)
The flow of the overall process in this embodiment will be described with reference to Figures 3 and 4. In this embodiment, the degree of subject transition can be set to three levels, large, medium, and small, and it is assumed that the user sets this in advance when taking a photograph.

まず、ステップS200において、CPU151は、撮像制御部143から各部へ入力画像を供給する。 First, in step S200, the CPU 151 supplies an input image from the imaging control unit 143 to each unit.

次にステップS201において、CPU151は、主被写体の追尾中か否か(主被写体が存在するか否か)を判定する。追尾中であれば、ステップS202に進み、追尾中で無ければステップS208に進む。 Next, in step S201, the CPU 151 determines whether or not the main subject is being tracked (whether or not the main subject exists). If the main subject is being tracked, the process proceeds to step S202, and if the main subject is not being tracked, the process proceeds to step S208.

次にステップS202において、CPU151は、事前にユーザが設定した乗り移り度合いを参照する。乗り移り度合いが小、すなわち現在の主被写体に対する追尾をなるべく長く継続したいという設定であった場合、ステップS203に進む。乗り移り度合いが中であった場合は、ステップS204に、大であった場合はステップS205に進む。ステップS203、ステップS204、ステップS205ではクロップする領域の中心を決定する。 Next, in step S202, the CPU 151 refers to the degree of transition previously set by the user. If the degree of transition is small, in other words, if the setting indicates that the user wishes to continue tracking the current main subject for as long as possible, the process proceeds to step S203. If the degree of transition is medium, the process proceeds to step S204; if it is large, the process proceeds to step S205. In steps S203, S204, and S205, the center of the area to be cropped is determined.

ステップS203においては、CPU151は、図4(a)の様に、主被写体領域の中心を中心としてクロップを行う。ここで主被写体領域は前フレームの検出結果をそのまま用いても良いし、前フレームの検出結果に対して簡易的なテンプレートマッチングを行い、現フレームにおける主被写体領域を概算してもよい。こうして求めた領域の中心でクロップを行うことにより、現フレームにおける前フレームと同じ被写体領域の検出精度を高めることができる。一方、その近傍に存在しない被写体を検出することは出来なくなる。しかしこれは、乗り移り度合い小、すなわち現在の主被写体をなるべく安定的に検出することを重視したユーザの設定に整合したものであるといえる。 In step S203, the CPU 151 performs cropping around the center of the main subject region, as shown in FIG. 4(a). Here, the detection result of the previous frame may be used as is for the main subject region, or simple template matching may be performed on the detection result of the previous frame to roughly estimate the main subject region in the current frame. By cropping around the center of the region thus determined, it is possible to improve the detection accuracy of the same subject region in the current frame as in the previous frame. On the other hand, it becomes impossible to detect subjects that do not exist in the vicinity. However, this can be said to be consistent with the user's settings, which place importance on a small degree of transition, i.e., on detecting the current main subject as stably as possible.

ステップS204においては、CPU151は、図4(b)の様に、主被写体領域の中心と合焦候補領域の中心の中点をクロップの中心とする。これは、現在の主被写体をなるべく検出範囲に含めつつも、合焦候補領域に存在する他の被写体も検出し、場合によっては、焦点を合わせる対象をその被写体に切り替える(乗り移る)ことを可能とするためである。 In step S204, the CPU 151 sets the midpoint between the center of the main subject area and the center of the focus candidate area as the center of the crop, as shown in FIG. 4B. This is to include the current main subject in the detection range as much as possible, while also detecting other subjects that exist in the focus candidate area, and in some cases, to make it possible to switch (transfer) the focus target to that subject.

ステップS205においては、CPU151は、図4(c)の様に、合焦候補領域の中心をクロップの中心とする。これは、現在の主被写体の検出率は重要視せず、合焦候補領域に存在する他の被写体の検出を優先するためである。 In step S205, the CPU 151 sets the center of the focus candidate area as the center of the crop, as shown in FIG. 4(c). This is because the detection rate of the current main subject is not important, and priority is given to the detection of other subjects that exist in the focus candidate area.

ステップS206においては、CPU151は、主被写体のサイズに応じてクロップ領域のサイズを決定する。詳細は後述する。その後、ステップS207に進む。 In step S206, the CPU 151 determines the size of the crop region based on the size of the main subject. Details will be described later. Then, the process proceeds to step S207.

ステップS207においては、CPU151は、クロップ領域を被写体検出部162の入力画像サイズに合わせて拡縮し、被写体検出部162に入力する。 In step S207, the CPU 151 scales the crop area to match the input image size of the subject detection unit 162 and inputs it to the subject detection unit 162.

ステップS208においては、CPU151は、全画角範囲をそのまま被写体検出部162の入力画像サイズに合わせて拡縮し、被写体検出部162に入力する。 In step S208, the CPU 151 scales the entire angle of view range to match the input image size of the subject detection unit 162, and inputs it to the subject detection unit 162.

(クロップ領域のサイズ)
本実施形態では、画像a(図2(a)に示す画像)においてクロップする領域のサイズ(縦、横それぞれの画素数)は主被写体のサイズに依存し、事前に調整された、被写体検出部162が最も得意とするサイズに拡縮されるように決定する。
(size of crop area)
In this embodiment, the size (number of pixels vertically and horizontally) of the area to be cropped in image a (the image shown in FIG. 2A) depends on the size of the main subject, and is determined so as to be enlarged or reduced to a size that has been adjusted in advance and which the subject detection unit 162 is most comfortable with.

例えば被写体検出部162の入力画像上の主被写体の幅が画角の20%以上である場合に所望の検出率が満足されるとわかっている場合を考える。画像aにおける主被写体の幅が画角に対して20%であった場合、図2の(b)のように画像a全体をそのまま縮小して被写体検出部162の入力画像とする。画像aにおける主被写体の幅が画角に対して16%であった場合には、画像aの縦横80%の領域をクロップし、それを縮小して被写体検出部162の入力画像とする。これにより、被写体検出部162の入力画像上では主被写体のサイズを画角のおよそ20%にすることができる。 For example, consider a case where it is known that the desired detection rate will be satisfied when the width of the main subject in the input image to subject detection unit 162 is 20% or more of the angle of view. If the width of the main subject in image a is 20% of the angle of view, the entire image a is reduced as is as shown in (b) of Figure 2 and used as the input image to subject detection unit 162. If the width of the main subject in image a is 16% of the angle of view, an area that is 80% vertically and horizontally of image a is cropped and reduced to use as the input image to subject detection unit 162. This makes it possible to make the size of the main subject approximately 20% of the angle of view in the input image to subject detection unit 162.

上記の方法に従ってクロップサイズを決定した結果、クロップサイズが被写体検出部162の入力画像サイズを下回った場合、画像の拡大が必要となるが、これを避けるためにクロップサイズに下限を設けてもよい。 If the crop size determined according to the above method falls below the input image size of the subject detection unit 162, the image will need to be enlarged, but to avoid this, a lower limit may be set for the crop size.

なお、上述の実施形態ではクロップ領域のサイズを主被写体のサイズによって決定したが、これを乗り移り度合いに基づいて決定することもできる。 In the above embodiment, the size of the crop area is determined based on the size of the main subject, but it can also be determined based on the degree of transition.

具体的には、クロップサイズの下限を設け、その下限を乗り移り度合いが高いほど大きく(広範囲がクロップ領域に含まれるように)設定する。すなわち、乗り移り度合いが小さい場合、主被写体が検出されやすいクロップサイズに決定する一方で、乗り移り度合いが大きい場合、たとえ主被写体が小さい場合でも一定以上の範囲をクロップ領域に含める。これにより、他の被写体が被写体検出部162の対象に含まれやすいようにする。 Specifically, a lower limit is set for the crop size, and the higher the degree of transition, the larger the lower limit is set (so that a wider area is included in the crop area). In other words, when the degree of transition is small, a crop size that makes it easy to detect the main subject is determined, whereas when the degree of transition is large, a certain range or more is included in the crop area even if the main subject is small. This makes it easier for other subjects to be included in the target of the subject detection unit 162.

また、乗り移り度合いが中間程度の既定の設定であった場合、現在の主被写体の位置から大きくかけ離れた位置の被写体に乗り移らないように、合焦候補領域の中心から既定の距離以上にある被写体領域を乗り移る被写体領域として選択しないようにしてもよい。 In addition, if the degree of transition is set to a medium level by default, a subject area that is a preset distance or more from the center of the focus candidate area may not be selected as a subject area to transition to, so as to avoid transitioning to a subject that is far away from the current position of the main subject.

また、モニタディスプレイ150は、被写体が複数検出された場合、主被写体以外の少なくとも一つの被写体の領域を表示するようにしてもよい。 In addition, when multiple subjects are detected, the monitor display 150 may display the area of at least one subject other than the main subject.

以上説明したように、本実施形態によれば、主被写体の検出に特化したクロップ領域と主被写体以外の被写体の検出も行えるクロップ領域とを、ユーザの設定に基づいて決定することが可能となる。 As described above, according to this embodiment, it is possible to determine a crop area specialized for detecting the main subject and a crop area that can also detect subjects other than the main subject based on the user's settings.

(他の実施形態)
また本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現できる。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現できる。
Other Embodiments
The present invention can also be realized by a process in which a program for realizing one or more of the functions of the above-described embodiments is supplied to a system or device via a network or a storage medium, and one or more processors in a computer of the system or device read and execute the program. The present invention can also be realized by a circuit (e.g., ASIC) for realizing one or more of the functions.

発明は上記実施形態に制限されるものではなく、発明の精神及び範囲から離脱することなく、様々な変更及び変形が可能である。従って、発明の範囲を公にするために請求項を添付する。 The invention is not limited to the above-described embodiment, and various modifications and variations are possible without departing from the spirit and scope of the invention. Therefore, the following claims are appended to disclose the scope of the invention.

100:撮像装置、101:レンズユニット、133:フォーカス制御部、141:撮像素子、142:撮像信号処理部、143:撮像制御部、151:CPU、152:画像処理部、162:被写体検出部 100: imaging device, 101: lens unit, 133: focus control unit, 141: imaging element, 142: imaging signal processing unit, 143: imaging control unit, 151: CPU, 152: image processing unit, 162: subject detection unit

Claims (17)

撮像手段により撮像された画像から被写体を検出する検出手段と、
前記画像における前記検出手段により被写体を検出する候補の領域である候補領域を設定する第1の設定手段と、
前記候補領域に対して、目的とする被写体を検出するための切り出し領域を設定する第2の設定手段と、
撮像装置の動作を、検出された現在の主被写体に追従させ続けるか、他の被写体に切り替えるかの程度を決める乗り移り度合いを設定する第3の設定手段と、を備え、
前記候補領域は、前記切り出し領域と前記現在の主被写体の領域を含むように設定され、前記第2の設定手段は、前記乗り移り度合いに基づいて、前記候補領域に対する前記切り出し領域の位置を設定することを特徴とする画像処理装置。
A detection means for detecting a subject from an image captured by the imaging means;
a first setting means for setting a candidate area in the image, the candidate area being an area that is a candidate for detecting a subject by the detection means;
a second setting means for setting an extraction region for detecting a target subject in the candidate region;
a third setting means for setting a transition degree that determines a degree to which the operation of the imaging device should continue to follow the detected current main subject or should be switched to another subject;
an image processing device comprising: a first setting unit for setting a position of the cut-out area relative to the candidate area based on the degree of transition; and a second setting unit for setting a position of the cut-out area relative to the candidate area based on the degree of transition.
前記第1の設定手段は、ユーザからの指示により、前記候補領域を設定することを特徴とする請求項1に記載の画像処理装置。 The image processing device according to claim 1, characterized in that the first setting means sets the candidate area according to an instruction from a user. 前記第3の設定手段は、ユーザからの指示により、前記乗り移り度合いを設定することを特徴とする請求項1または2に記載の画像処理装置。 The image processing device according to claim 1 or 2, characterized in that the third setting means sets the degree of transition according to an instruction from a user. 前記切り出し領域は、前記候補領域において、前記目的とする被写体を検出しやすくするための領域であることを特徴とする請求項1乃至3のいずれか1項に記載の画像処理装置。 The image processing device according to any one of claims 1 to 3, characterized in that the cut-out area is an area for making it easier to detect the target subject in the candidate area. 前記撮像装置の動作とは、焦点調節動作であることを特徴とする請求項1乃至4のいずれか1項に記載の画像処理装置。 The image processing device according to any one of claims 1 to 4, characterized in that the operation of the imaging device is a focus adjustment operation. 前記撮像装置の動作とは、露出調節動作であることを特徴とする請求項1乃至5のいずれか1項に記載の画像処理装置。 The image processing device according to any one of claims 1 to 5, characterized in that the operation of the imaging device is an exposure adjustment operation. 前記第2の設定手段は、前記切り出し領域の中心の位置を、前記現在の主被写体の領域の中心と、前記候補領域の中心とに基づいて設定することを特徴とする請求項1乃至6のいずれか1項に記載の画像処理装置。 The image processing device according to any one of claims 1 to 6, characterized in that the second setting means sets the position of the center of the cut-out area based on the center of the area of the current main subject and the center of the candidate area. 前記第2の設定手段は、前記切り出し領域の中心の位置を、前記乗り移り度合いが大きいほど、前記候補領域の中心に近い位置に設定することを特徴とする請求項7に記載の画像処理装置。 The image processing device according to claim 7, characterized in that the second setting means sets the center position of the cutout area to a position closer to the center of the candidate area as the degree of transition increases. 前記第2の設定手段は、前記切り出し領域の中心の位置を、前記乗り移り度合いが小さいほど、前記現在の主被写体の領域の中心に近い位置に設定することを特徴とする請求項7または8に記載の画像処理装置。 The image processing device according to claim 7 or 8, characterized in that the second setting means sets the center position of the cutout area to a position closer to the center of the current main subject area the smaller the degree of transition is. 前記第2の設定手段は、前記切り出し領域のサイズを、前記現在の主被写体のサイズに応じて設定することを特徴とする請求項1乃至9のいずれか1項に記載の画像処理装置。 The image processing device according to any one of claims 1 to 9, characterized in that the second setting means sets the size of the cutout area according to the size of the current main subject. 前記第2の設定手段は、前記乗り移り度合いが大きいほど、前記切り出し領域のサイズを大きく設定することを特徴とする請求項10に記載の画像処理装置。 The image processing device according to claim 10, characterized in that the second setting means sets the size of the cutout area to be larger as the degree of transition increases. 前記乗り移り度合いが既定の設定であった場合、前記候補領域の中心から既定の距離以上にある被写体を乗り移る被写体としないことを特徴とする請求項1乃至11のいずれか1項に記載の画像処理装置。 The image processing device according to any one of claims 1 to 11, characterized in that, when the degree of transition is a default setting, a subject that is a default distance or more from the center of the candidate area is not considered to be a subject to be transitioned. 前記画像と被写体の領域を表示する表示手段をさらに備え、該表示手段は、被写体が複数検出された場合に、前記現在の主被写体以外の少なくとも一つの被写体の領域を表示することを特徴とする請求項1乃至12のいずれか1項に記載の画像処理装置。 The image processing device according to any one of claims 1 to 12, further comprising a display means for displaying the image and the area of the subject, the display means displaying the area of at least one subject other than the current main subject when multiple subjects are detected. 請求項1乃至13のいずれか1項に記載の画像処理装置と、
前記撮像手段と、
被写体に焦点を合わせる焦点調節手段と、
を備えることを特徴とする撮像装置。
An image processing device according to any one of claims 1 to 13,
The imaging means;
A focus adjustment means for adjusting the focus on a subject;
An imaging device comprising:
撮像手段により撮像された画像から被写体を検出する検出工程と、
前記画像における前記検出工程により被写体を検出する候補の領域である候補領域を設定する第1の設定工程と、
前記候補領域に対して、目的とする被写体を検出するための切り出し領域を設定する第2の設定工程と、
撮像装置の動作を、検出された現在の主被写体に追従させ続けるか、他の被写体に切り替えるかの程度を決める乗り移り度合いを設定する第3の設定工程と、を有し、
前記候補領域は、前記切り出し領域と前記現在の主被写体の領域を含むように設定され、前記第2の設定工程では、前記乗り移り度合いに基づいて、前記候補領域に対する前記切り出し領域の位置を設定することを特徴とする画像処理装置の制御方法。
a detection step of detecting a subject from an image captured by an imaging means;
a first setting step of setting a candidate area in the image, the candidate area being an area that is a candidate for detecting a subject by the detection step;
a second setting step of setting an extraction region for detecting a target subject in the candidate region;
a third setting step of setting a transition degree that determines the degree to which the operation of the imaging device should continue to follow the detected current main subject or should be switched to another subject;
a control method for an image processing device, characterized in that the candidate area is set to include the cut-out area and the area of the current main subject, and in the second setting step, a position of the cut-out area relative to the candidate area is set based on the degree of transition.
請求項15に記載の制御方法の各工程をコンピュータに実行させるためのプログラム。 A program for causing a computer to execute each step of the control method described in claim 15. 請求項15に記載の制御方法の各工程をコンピュータに実行させるためのプログラムを記憶したコンピュータが読み取り可能な記憶媒体。 A computer-readable storage medium storing a program for causing a computer to execute each step of the control method described in claim 15.
JP2020037159A 2020-03-04 2020-03-04 Image processing device and control method thereof, imaging device, program, and storage medium Active JP7549453B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020037159A JP7549453B2 (en) 2020-03-04 2020-03-04 Image processing device and control method thereof, imaging device, program, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020037159A JP7549453B2 (en) 2020-03-04 2020-03-04 Image processing device and control method thereof, imaging device, program, and storage medium

Publications (2)

Publication Number Publication Date
JP2021141421A JP2021141421A (en) 2021-09-16
JP7549453B2 true JP7549453B2 (en) 2024-09-11

Family

ID=77669130

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020037159A Active JP7549453B2 (en) 2020-03-04 2020-03-04 Image processing device and control method thereof, imaging device, program, and storage medium

Country Status (1)

Country Link
JP (1) JP7549453B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016197181A (en) 2015-04-03 2016-11-24 キヤノン株式会社 Display control device and control method therefor
JP2018037893A (en) 2016-08-31 2018-03-08 キヤノン株式会社 Imaging controller and control method thereof, program and storage medium
JP2019020716A (en) 2017-07-13 2019-02-07 キヤノン株式会社 Control device, imaging apparatus and program
JP2019205172A (en) 2019-06-19 2019-11-28 株式会社ニコン Image processing apparatus, imaging apparatus, and image processing program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016197181A (en) 2015-04-03 2016-11-24 キヤノン株式会社 Display control device and control method therefor
JP2018037893A (en) 2016-08-31 2018-03-08 キヤノン株式会社 Imaging controller and control method thereof, program and storage medium
JP2019020716A (en) 2017-07-13 2019-02-07 キヤノン株式会社 Control device, imaging apparatus and program
JP2019205172A (en) 2019-06-19 2019-11-28 株式会社ニコン Image processing apparatus, imaging apparatus, and image processing program

Also Published As

Publication number Publication date
JP2021141421A (en) 2021-09-16

Similar Documents

Publication Publication Date Title
JP4760918B2 (en) Imaging apparatus, subject tracking method, and program
US8289433B2 (en) Image processing apparatus and method, and program therefor
JP6271990B2 (en) Image processing apparatus and image processing method
US11415773B2 (en) Apparatus and lens apparatus
JP5720275B2 (en) Imaging apparatus and imaging method
JP2017046355A (en) Imaging apparatus
JP4907740B2 (en) Imaging device
JP6518452B2 (en) Imaging apparatus and imaging method
JP2013070164A (en) Imaging device and imaging method
JP6188474B2 (en) Zoom control device, control method for zoom control device, control program for zoom control device, and storage medium
JP4807582B2 (en) Image processing apparatus, imaging apparatus, and program thereof
JP7549453B2 (en) Image processing device and control method thereof, imaging device, program, and storage medium
JP6645711B2 (en) Image processing apparatus, image processing method, and program
JP4981758B2 (en) Focus adjustment apparatus and method
JP2019041414A (en) Electronic apparatus, imaging apparatus, and program
JP2012049841A (en) Imaging apparatus and program
JP5759127B2 (en) Focus adjustment device and focus adjustment method
JP2020101730A (en) Imaging device and control method for the same
JP6539115B2 (en) Imaging device, control method therefor, and program
JP2024178817A (en) Focus adjustment device and method, imaging device, program, and storage medium
JP6539114B2 (en) Imaging device, control method therefor, and program
JP2015012487A (en) Image processing apparatus and imaging apparatus
JP5610889B2 (en) Focus adjustment apparatus and method
JP5274223B2 (en) Imaging apparatus and control method thereof
KR20100100179A (en) Digtal photographing appratus and method of controlling the same

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20210103

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210113

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230221

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20240123

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20240304

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20240416

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: 20240802

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240830

R150 Certificate of patent or registration of utility model

Ref document number: 7549453

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150