JP2015106849A - Main subject estimation device, program, and information processing apparatus - Google Patents

Main subject estimation device, program, and information processing apparatus Download PDF

Info

Publication number
JP2015106849A
JP2015106849A JP2013248592A JP2013248592A JP2015106849A JP 2015106849 A JP2015106849 A JP 2015106849A JP 2013248592 A JP2013248592 A JP 2013248592A JP 2013248592 A JP2013248592 A JP 2013248592A JP 2015106849 A JP2015106849 A JP 2015106849A
Authority
JP
Japan
Prior art keywords
subject
main subject
captured image
size
main
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.)
Granted
Application number
JP2013248592A
Other languages
Japanese (ja)
Other versions
JP6210214B2 (en
Inventor
啓一 新田
Keiichi Nitta
啓一 新田
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.)
Nikon Corp
Original Assignee
Nikon Corp
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 Nikon Corp filed Critical Nikon Corp
Priority to JP2013248592A priority Critical patent/JP6210214B2/en
Publication of JP2015106849A publication Critical patent/JP2015106849A/en
Application granted granted Critical
Publication of JP6210214B2 publication Critical patent/JP6210214B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Studio Devices (AREA)
  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To estimate a main subject in accordance with various imaging situations.SOLUTION: A control section 1 includes: an image acquisition part 21 for acquiring temporally continuous captured images; a subject detection part 23 for detecting subjects from the captured images, respectively; a subject information detection part 24 for detecting subject information (such as a size and a position of a subject within the captured image) from the detected subject; a main subject estimation part 31 for estimating a main subject of the captured image from the subject information; a score function memory 22 for storing a score function S; and a determination condition memory 26 for storing a cancellation condition Jrequired for canceling a subject that is defined as the main subject, from the main subject and a setting condition Jrequired for setting a new subject as the main subject. The score function S is a function that gives a probability for a subject that gives subject information, to be the main subject. The main subject estimation part 31 estimates the main subject within the captured image on the basis of the score function S, the cancellation condition Jand the setting condition J.

Description

本発明は、主要被写体推定装置及びプログラム並びに情報処理装置に関する。   The present invention relates to a main subject estimation device, a program, and an information processing device.

ジャイロセンサ等により検出されたカメラ本体のパンニング又はチルティング動作に基づいて主要被写体を変更しようとする撮影者の意図を推定し、この推定結果から主要被写体を判定する技術が知られている(例えば、下記特許文献1)。
特開2011−223174号公報
A technique is known in which a photographer's intention to change a main subject is estimated based on a panning or tilting operation of the camera body detected by a gyro sensor or the like, and the main subject is determined from the estimation result (for example, Patent Document 1) below.
JP 2011-223174 A

しかし、特許文献1の技術では、主要被写体を判定するためにパンニング又はチルティング動作を検出する必要があるため、種々の撮影状況に応じて主要被写体を設定する上で制約があった。   However, in the technique of Patent Document 1, since it is necessary to detect a panning or tilting operation in order to determine the main subject, there is a limitation in setting the main subject according to various shooting situations.

本発明は、上記事実に鑑みなされたもので、種々の撮影状況に応じて主要被写体を推定することを可能にした、主要被写体推定装置及びプログラム並びに情報処理装置を提供することを、その目的とする。   The present invention has been made in view of the above-described facts, and its object is to provide a main subject estimation device, a program, and an information processing device that can estimate a main subject according to various shooting situations. To do.

上記課題を解決するため、本発明の主要被写体推定装置は、複数の画像を取得する画像取得部と、画像取得部が取得した撮像画像から被写体を検出する被写体検出部と、被写体検出部が検出した被写体の撮像画像内での大きさに関する被写体情報を検出する被写体情報検出部と、当該被写体情報に基づいて、前記複数の撮像画像から主要被写体を推定する主要被写体推定部と、を備え、該被写体推定部は、第1画像内で主要被写体とされた第1の被写体の被写体情報が、第1画像よりも後に取得された第2画像内において、第1条件を満たさなくなり、かつ、第1の被写体と異なる第2の被写体の被写体情報が、第1条件と異なる第2条件を満たした時に主要被写体を第2の被写体に変更することを特徴とする。ここで、複数の撮像画像は、実際に撮像された順番に並べられたものでも、或いは、時間的に逆転した順番に並べられたもののいずれであってもよい。撮像画像の例としては、例えばデジタルスチルカメラにより撮像された静止画像や、デジタルビデオカメラにより撮像された動画像などが挙げられる。   In order to solve the above problems, the main subject estimation device of the present invention includes an image acquisition unit that acquires a plurality of images, a subject detection unit that detects a subject from captured images acquired by the image acquisition unit, and a subject detection unit A subject information detection unit that detects subject information related to the size of the captured subject in a captured image, and a main subject estimation unit that estimates a main subject from the plurality of captured images based on the subject information, The subject estimation unit does not satisfy the first condition in the second image acquired after the first image, in which the subject information of the first subject that is the main subject in the first image is satisfied. When the subject information of the second subject different from the subject satisfies the second condition different from the first condition, the main subject is changed to the second subject. Here, the plurality of captured images may be arranged in the order in which the images are actually captured, or may be arranged in the order reversed in time. Examples of the captured image include a still image captured by a digital still camera and a moving image captured by a digital video camera.

本発明の一つの好ましい態様の主要被写体推定部は、第1の被写体の大きさ又は大きさに関する値が第1の所定値以下となり、かつ、第2の被写体の大きさ又は大きさに関する値が、第2の所定値以上となったとき、更に第2の被写体が撮像画像内の所定範囲内に存在する場合に、主要被写体を第2の被写体に変更することを特徴とする。ここで、被写体の撮像画像内での大きさに関する値としては、例えば、当該被写体の撮像画像内での大きさを時間的に最初の主要被写体の大きさで正規化した値、所定数の撮像画像に亘る当該被写体の撮像画像内での大きさの平均値、当該被写体の撮像画像内での大きさの時系列データから時間的に急激な変動成分を除去した値、などが挙げられる。
本態様のさらに好ましい主要被写体推定部は、撮像画像が撮像された際の画角が大きくなったときに、所定範囲を、画角が大きくなる前と比較して小さく設定し、撮像画像が撮像された際の画角が小さくなったときに、所定範囲を、画角が小さくなる前と比較して大きく設定することを特徴とする。
The main subject estimation unit according to one preferable aspect of the present invention has a value related to the size or size of the first subject that is equal to or less than the first predetermined value, and a value related to the size or size of the second subject. When the second predetermined value or more is reached, the main subject is changed to the second subject when the second subject is within a predetermined range in the captured image. Here, as the value related to the size of the subject in the captured image, for example, a value obtained by normalizing the size of the subject in the captured image with the size of the first main subject in time, a predetermined number of images Examples include an average value of the size of the subject in the captured image over the image, a value obtained by removing temporally abrupt fluctuation components from time-series data of the size of the subject in the captured image, and the like.
The more preferable main subject estimation unit of this aspect sets the predetermined range to be smaller when the angle of view when the captured image is captured is larger than before the angle of view is increased, and captures the captured image. When the angle of view is reduced, the predetermined range is set to be larger than before the angle of view is reduced.

好ましくは、被写体情報は、撮像画像内での被写体の大きさ以外に、該大きさに関する値、撮像画像内での被写体の位置、及び該位置に関する値のうち少なくともいずれかを含み、主要被写体推定部は、被写体情報の関数を用い、該関数の値は、該被写体情報を与える被写体が主要被写体である確率又は確率に関する値を反映する。ここで、確率に関する値とは、ある被写体が主要被写体となる確率に関連する値であり、例えば、当該確率が増加するほど、増加或いは減少するスコア値などである。   Preferably, the subject information includes at least one of a value related to the size, a position of the subject in the captured image, and a value related to the position in addition to the size of the subject in the captured image. The unit uses a function of subject information, and the value of the function reflects the probability that the subject providing the subject information is the main subject or a value related to the probability. Here, the value related to the probability is a value related to the probability that a certain subject will be the main subject, for example, a score value that increases or decreases as the probability increases.

好ましくは、主要被写体推定部は、撮像画像が撮像された際の画角が大きくなったときに、第1の所定値に対する第2の所定値の比、又は、第2の所定値から第1の所定値を引いた差を、画角が大きくなる前と比較して大きく設定し、撮像画像が撮像された際の画角が小さくなったときに、第1の所定値に対する第2の所定値の比、又は、第2の所定値から第1の所定値を引いた差を、画角が小さくなる前と比較して小さく設定してもよい。   Preferably, when the angle of view when the captured image is captured is increased, the main subject estimation unit determines the ratio of the second predetermined value to the first predetermined value or the first value from the second predetermined value. The difference obtained by subtracting the predetermined value is set larger than before the angle of view is increased, and when the angle of view when the captured image is captured is decreased, the second predetermined value with respect to the first predetermined value is set. The ratio of the values or the difference obtained by subtracting the first predetermined value from the second predetermined value may be set smaller than before the angle of view decreases.

本発明に係るデジタルカメラは、上記した主要被写体推定装置を備えて構成されたものである。   A digital camera according to the present invention includes the above-described main subject estimation device.

本発明に係るプログラムは、複数の画像を取得する画像取得工程と、画像取得工程で取得された撮像画像から被写体を検出する被写体検出工程と、被写体検出工程で検出された被写体の撮像画像内での大きさに関する被写体情報を検出する被写体情報検出工程と、被写体情報に基づいて、複数の撮像画像から主要被写体を推定する主要被写体推定工程と、
を情報処理装置に実行させるためのプログラムとして構成されたものであり、主要被写体推定工程において、第1画像内で主要被写体とされた第1の被写体の被写体情報が、第1画像よりも後に取得された第2画像内において、第1条件を満たさなくなり、かつ、第1の被写体と異なる第2の被写体の被写体情報が、第1条件と異なる第2条件を満たした時に主要被写体を第2の被写体に変更することを特徴とする。
本発明の一つの好ましい態様のプログラムの主要被写体推定工程では、第1の被写体の大きさ又は大きさに関する値が第1の所定値以下となり、かつ、第2の被写体の大きさまたは大きさに関する値が、第2の所定値以上となったとき、更に第2の被写体が撮像画像内の所定範囲内に存在する場合に、主要被写体を前記第2の被写体に変更することを特徴とする。さらに好ましい態様のプログラムの主要被写体推定工程では、撮像画像が撮像された際の画角が大きくなったときに、所定範囲を、画角が大きくなる前と比較して小さく設定し、撮像画像が撮像された際の画角が小さくなったときに、所定範囲を、画角が小さくなる前と比較して大きく設定することを特徴とする。
The program according to the present invention includes an image acquisition step for acquiring a plurality of images, a subject detection step for detecting a subject from the captured image acquired in the image acquisition step, and a captured image of the subject detected in the subject detection step. A subject information detecting step for detecting subject information relating to the size of the subject, a main subject estimating step for estimating a main subject from a plurality of captured images based on the subject information,
In the main subject estimation step, the subject information of the first subject that is the main subject in the first image is acquired after the first image. When the subject information of the second subject that does not satisfy the first condition and the second subject different from the first subject satisfies the second condition different from the first condition, It is characterized by changing to a subject.
In the main subject estimation step of the program according to one preferred aspect of the present invention, the value relating to the size or size of the first subject is less than or equal to the first predetermined value and the size or size relating to the second subject. When the value is equal to or greater than the second predetermined value, the main subject is changed to the second subject when the second subject is within a predetermined range in the captured image. In the main subject estimation step of the program of a more preferable aspect, when the angle of view when the captured image is captured is increased, the predetermined range is set smaller than before the angle of view is increased, and the captured image is When the angle of view at the time of image pickup becomes small, the predetermined range is set larger than before the angle of view becomes small.

好ましくは、被写体情報は、撮像画像内での被写体の大きさ以外に、該大きさに関する値、撮像画像内での被写体の位置、及び該位置に関する値のうち少なくともいずれかを含み、主要被写体推定工程では、被写体情報の関数を用い、関数の値は、該被写体情報を与える被写体が主要被写体である確率又は確率に関する値を反映する。   Preferably, the subject information includes at least one of a value related to the size, a position of the subject in the captured image, and a value related to the position in addition to the size of the subject in the captured image. In the process, a function of subject information is used, and the value of the function reflects the probability that the subject giving the subject information is the main subject or a value related to the probability.

好ましくは、主要被写体推定工程において、撮像画像が撮像された際の画角が大きくなったときに、第1の所定値に対する前記第2の所定値の比、又は、前記第2の所定値から前記第1の所定値を引いた差を、画角が大きくなる前と比較して大きく設定し、撮像画像が撮像された際の画角が小さくなったときに、第1の所定値に対する第2の所定値の比、又は、第2の所定値から第1の所定値を引いた差を、画角が小さくなる前と比較して小さく設定する。   Preferably, in the main subject estimation step, when the angle of view when the captured image is captured increases, the ratio of the second predetermined value to the first predetermined value or the second predetermined value The difference obtained by subtracting the first predetermined value is set larger than before the angle of view increases, and when the angle of view when the captured image is captured becomes smaller, The ratio of the predetermined value of 2 or the difference obtained by subtracting the first predetermined value from the second predetermined value is set smaller than that before the angle of view decreases.

本発明の情報処理装置は、上記したプログラムに従って撮像画像内の主要被写体を推定する。情報処理装置は、当該プログラムを備えていてもよく、或いはインターネット等を介してダウンロードされたプログラムに従って主要被写体を推定してもよい。或いは、当該情報処理装置は、他の外部装置に格納されたプログラムに従って、主要被写体を推定するように指令されてもよい。本発明の情報処理装置としては、撮像画像を処理可能である任意の装置、例えばコンピュータ、携帯電話やタブレット型端末等の携帯情報通信端末、専用の画像解析装置などを使用することができる。   The information processing apparatus of the present invention estimates the main subject in the captured image according to the above-described program. The information processing apparatus may include the program, or may estimate the main subject according to a program downloaded via the Internet or the like. Alternatively, the information processing apparatus may be instructed to estimate the main subject according to a program stored in another external apparatus. As the information processing apparatus of the present invention, any apparatus capable of processing a captured image, for example, a computer, a portable information communication terminal such as a mobile phone or a tablet terminal, a dedicated image analysis apparatus, or the like can be used.

本発明によれば、種々の撮影状況に応じて主要被写体を推定することが可能となる。   According to the present invention, it is possible to estimate a main subject according to various shooting situations.

図1は、本発明の各実施形態に係る主要被写体推定装置及びプログラムが適用されるデジタルカメラの概略構成図である。FIG. 1 is a schematic configuration diagram of a digital camera to which a main subject estimation device and a program according to each embodiment of the present invention are applied. 図2は、図1のデジタルカメラの回路ブロック図である。FIG. 2 is a circuit block diagram of the digital camera of FIG. 図3は、図1のデジタルカメラの制御部が本発明の第1の実施形態に係る主要被写体推定装置として機能している場合の機能ブロック図である。FIG. 3 is a functional block diagram when the control unit of the digital camera of FIG. 1 functions as the main subject estimation apparatus according to the first embodiment of the present invention. 図4は、図1のデジタルカメラの制御部が本発明の第1及び第2の実施形態に係る主要被写体推定装置として機能している場合の機能ブロック図である。FIG. 4 is a functional block diagram when the control unit of the digital camera of FIG. 1 functions as a main subject estimation device according to the first and second embodiments of the present invention. 図5は、図1のデジタルカメラの制御部が本発明の第5の実施形態に係る主要被写体推定装置として機能している場合の機能ブロック図である。FIG. 5 is a functional block diagram when the control unit of the digital camera of FIG. 1 functions as a main subject estimation apparatus according to the fifth embodiment of the present invention. 図6は、本発明の第1の実施形態に係る主要被写体推定装置の処理の流れを示すフローチャートである。FIG. 6 is a flowchart showing a process flow of the main subject estimation apparatus according to the first embodiment of the present invention. 図7は、図6のフローチャートの主要被写体推定工程の詳細な処理の流れを示すフローチャートである。FIG. 7 is a flowchart showing a detailed processing flow of the main subject estimation step in the flowchart of FIG. 図8は、本発明の各実施形態に係る主要被写体推定装置の処理の対象となる時系列画像を説明するための図である。FIG. 8 is a diagram for explaining a time-series image to be processed by the main subject estimation device according to each embodiment of the present invention. 図9は、本発明の第2乃至第5の実施形態に係る主要被写体推定装置の処理の流れを示すフローチャートである。FIG. 9 is a flowchart showing a processing flow of the main subject estimation apparatus according to the second to fifth embodiments of the present invention. 図10は、被写体の大きさを主要被写体の判断基準とした、第2の実施形態に係る主要被写体推定工程の詳細な処理の流れを示すフローチャートである。FIG. 10 is a flowchart showing a detailed processing flow of the main subject estimation step according to the second embodiment using the size of the subject as a criterion for determining the main subject. 図11は、被写体の位置を主要被写体の判断基準とした、第4の実施形態に係る主要被写体推定工程の詳細な処理の流れを示すフローチャートである。FIG. 11 is a flowchart showing a detailed processing flow of the main subject estimation step according to the fourth embodiment using the position of the subject as a determination criterion for the main subject. 図12は、被写体の位置を主要被写体の判断基準とした、第4の実施形態に係る主要被写体推定工程の詳細な処理の流れを示すフローチャートである。FIG. 12 is a flowchart showing a detailed processing flow of the main subject estimation step according to the fourth embodiment using the position of the subject as a determination criterion for the main subject. 図13は、異なる焦点距離(広角及び望遠)に起因した画角の相違を説明するための図である。FIG. 13 is a diagram for explaining a difference in angle of view caused by different focal lengths (wide angle and telephoto). 図14は、異なる焦点距離(広角及び望遠)のカメラで各々異なる撮影距離から撮影した場合の被写体の大きさの変化を説明するための図であって、(A)は、被写体1及び2が同一の撮影距離に並んだ状態、(B)は被写体2が被写体1よりも前方に進んだ状態を示している。FIG. 14 is a diagram for explaining a change in the size of a subject when images are taken from different shooting distances with cameras having different focal lengths (wide angle and telephoto). FIG. A state in which the objects are arranged at the same shooting distance, (B) shows a state in which the subject 2 has advanced forward from the subject 1. 図15は、本発明の第1の実施形態における、第1の実施例を説明するための図である。FIG. 15 is a diagram for explaining a first example in the first embodiment of the present invention. 図16は、本発明の第1の実施形態における、第2の実施例を説明するための図である。FIG. 16 is a diagram for explaining a second example in the first embodiment of the present invention. 図17は、本発明の第1の実施形態における、第3の実施例を説明するための図である。FIG. 17 is a diagram for explaining a third example in the first embodiment of the present invention. 図18は、本発明の第1の実施形態における、第4の実施例を説明するための図である。FIG. 18 is a diagram for explaining a fourth example in the first embodiment of the present invention. 図19は、本発明の第1の実施形態における、第5の実施例を説明するための図である。FIG. 19 is a diagram for explaining a fifth example in the first embodiment of the present invention. 図20は、本発明の第1の実施形態における、第6の実施例を説明するための図である。FIG. 20 is a diagram for explaining a sixth example in the first embodiment of the present invention.

以下、図面を参照して本発明の実施形態を説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1には、本発明の各実施形態に係る主要被写体推定装置及びプログラムが適用されるデジタルカメラの概略構成図が示されている。   FIG. 1 is a schematic configuration diagram of a digital camera to which a main subject estimation device and a program according to each embodiment of the present invention are applied.

図1に示されるデジタルカメラ10は、カメラボディ11と、カメラボディ11に交換可能に装着される撮影レンズ12と、を備えている。撮影レンズ12は、カメラボディ11に固定されたものであってもよいが、本実施形態では撮影レンズ12を交換可能なレンズとして説明する。
カメラボディ11は、デジタルカメラ10全体を制御する制御部1と、画像処理ユニット2と、CCDやCMOS等で構成される撮像素子5と、撮像素子5により撮影された画像、撮影情報、撮影メニューなどを表示するディスプレイ6と、無線通信部9とを備えている。
デジタルカメラ10は、被写体に対する焦点調整を自動的に行う自動合焦(AF)動作が可能な構成とされている。この自動合焦動作を行うため、撮影レンズ12は、合焦レンズ群15を備えている。合焦方式としては、例えば、コントラスト式AF、位相差検出式AF、或いは両者を併用した合焦方式が採用される。コントラスト式AFは撮像素子5の出力に基づいて実行される。位相差検出式AFは、図示しないAFセンサモジュール、或いは、撮像素子5に埋め込まれた位相差検出AFセンサを用いて実行される。
A digital camera 10 shown in FIG. 1 includes a camera body 11 and a photographing lens 12 that is replaceably attached to the camera body 11. The photographic lens 12 may be fixed to the camera body 11, but in the present embodiment, the photographic lens 12 will be described as a replaceable lens.
The camera body 11 includes a control unit 1 that controls the entire digital camera 10, an image processing unit 2, an image sensor 5 composed of a CCD, a CMOS, and the like, an image captured by the image sensor 5, shooting information, and a shooting menu. Etc., and a wireless communication unit 9.
The digital camera 10 is configured to be capable of an automatic focusing (AF) operation that automatically performs focus adjustment on a subject. In order to perform this automatic focusing operation, the taking lens 12 includes a focusing lens group 15. As the focusing method, for example, contrast AF, phase difference detection AF, or a focusing method using both is employed. Contrast AF is executed based on the output of the image sensor 5. The phase difference detection AF is executed using an AF sensor module (not shown) or a phase difference detection AF sensor embedded in the image sensor 5.

図2には、デジタルカメラ10の各構成要素の接続態様を示す回路ブロック図が示されている。同図に示されるように、前述した制御部1、画像処理ユニット2、撮像素子5、ディスプレイ6、無線通信部9及び撮像レンズ12は、双方向に通信可能にシステムバス3に接続されている。更に、デジタルカメラ10(カメラボディ11)は、操作インターフェース部7及びメモリカードアクセス部8を備えている。これらの構成要素も、上記した構成要素と共に双方向に通信可能にシステムバス3に接続されている。   FIG. 2 is a circuit block diagram showing a connection mode of each component of the digital camera 10. As shown in the figure, the control unit 1, the image processing unit 2, the image sensor 5, the display 6, the wireless communication unit 9, and the imaging lens 12 described above are connected to the system bus 3 so as to be capable of bidirectional communication. . The digital camera 10 (camera body 11) further includes an operation interface unit 7 and a memory card access unit 8. These components are also connected to the system bus 3 so as to be capable of bidirectional communication with the above-described components.

制御部1は、少なくとも、CPU1a、RAM1b、ROM1c、及び、フラッシュメモリ1dを備えている。これらの構成要素は、内部バス1eを介して双方向に通信可能に接続されている。内部バス1eは、システムバス3に接続されている。CPU1aは、ROM1c又はフラッシュメモリ1dに予め格納されているプログラムに基づいて所定の処理、例えば後述する被写体追尾を実行する。CPU1aは、内部バス1e及びシステムバス3を介して他の構成要素にコマンドを送信することによって、当該他の構成要素を制御する。また、当該他の構成要素からのデータ、例えば画像処理ユニット2から送信された画像データは、システムバス3及び内部バス1eを介してRAM1b、或いはフラッシュメモリ1dに送られ、RAM1b或いはフラッシュメモリ1dに格納される。CPU1aは、RAM1b、或いはフラッシュメモリ1dに記憶された画像データに対して、演算処理を実行することもできる。また、ROM1cは、例えば、デジタルカメラ10に関する情報も格納している。
画像処理ユニット2は、撮像素子5で撮像された画像に対応する画像データに対して所定の画像処理、例えばホワイトバランス処理、ガンマ補正処理、レンズ収差の補正処理、ノイズ低減処理、ダイナミックレンジの拡大処理、画像データのリサイズ処理、RAWデータからJPEG等の圧縮データへの変換処理などを実行する。
撮像素子5は、静止画撮影に加え、所定のフレームレートでの連写撮影及び動画撮影が可能である。撮影された画像のデータは、システムバス3を介して画像処理ユニット2及びディスプレイ6に転送される。
ディスプレイ6は、撮影された静止画または動画をリアルタイムに表示できる他、後述するメモリカードなどの記憶媒体に記憶された静止画または動画を再生表示することもできる。さらにディスプレイ6は、タッチパネルセンサを備えていてもよく、撮影者がディスプレイ6に表示された画面上の一部をタッチするだけで、合焦させたい部分を指定できるようにしてもよい。
操作インターフェース部7は、デジタルカメラ10に備えられたダイヤル、ボタン、タッチパネル等の不図示の操作部材の操作による撮影者の操作情報をシステムバス3を介して制御部1に伝達する。制御部1のCPU1aは、操作インターフェース部7から伝達された操作情報に応じて、各構成要素を制御する。また、操作インターフェース部7は、撮影者により指定されたクロップ領域の位置とサイズをシステムバス3及び内部バス1eを介してCPU1aに伝達する。
メモリカードアクセス部8は、デジタルカメラ10に挿入されたメモリカード13に記憶されている画像データ、プログラム、ファームウェアなどを読み取ったり、撮像素子5により撮影され、画像処理ユニット2により画像処理された画像データをメモリカード13に書き込むための処理を実行する。また、メモリカードアクセス部8は、制御部1の指令により、メモリカード13に記憶されているプログラムやファームウェアを、システムバス3を介して制御部1のRAM1b或いはフラッシュメモリ1dに転送することもできる。CPU1aは、更新されたプログラムやファームウェアにより、所定の処理、例えば後述する主要被写体推定処理を実行する。
無線通信部9は、例えばWiFi(登録商標)機能を備えており、この機能により、デジタルカメラ10は無線でインターネット接続することが可能となる。例えば、無線通信部9は、制御部1の指令により、インターネット上で提供されるプログラムやファームウェア或いは画像データ等をダウンロードする際の通信を実行するようにしてもよい。ダウンロードされたプログラム等は、システムバス3を介して制御部1に転送される。制御部1のCPU1aは、転送されてきたプログラム等をフラッシュメモリ1dに書き込む。CPU1aは、更新されたプログラムやファームウェアにより、所定の処理、例えば後述する主要被写体推定処理を実行する。或いは、CPU1aは、ダウンロードした画像データを、RAM1bに撮像画像として記憶したり、ディスプレイ6に表示させたり、メモリカード13に書き込んだりしてもよい。逆に、CPU1aは、デジタルカメラ10により撮像された撮像画像をインターネットの所定サイトやブログにアップロードすることもできる。
また、無線通信部9は、スマートフォンやタブレット型端末などの携帯通信端末との間の双方向の通信を制御する。例えば制御部1は、無線通信部9を介して、画像処理ユニット2により画像処理された画像データを携帯通信端末に送信したり、携帯通信端末からの画像データを受信して画像処理ユニット2やディスプレイ6に転送することができる。また、無線通信部9は、携帯通信端末から送られてきたコマンドやプログラムを受信して制御部1に転送する。制御部1は、携帯通信端末から送られてきたコマンドやプログラムに基づいてデジタルカメラ10を制御することもできる。
The control unit 1 includes at least a CPU 1a, a RAM 1b, a ROM 1c, and a flash memory 1d. These components are connected to be able to communicate bidirectionally via the internal bus 1e. The internal bus 1e is connected to the system bus 3. The CPU 1a executes predetermined processing, for example, subject tracking described later, based on a program stored in advance in the ROM 1c or the flash memory 1d. The CPU 1a controls the other components by transmitting commands to other components via the internal bus 1e and the system bus 3. Further, data from the other components, for example, image data transmitted from the image processing unit 2 is sent to the RAM 1b or the flash memory 1d via the system bus 3 and the internal bus 1e, and is sent to the RAM 1b or the flash memory 1d. Stored. The CPU 1a can also perform arithmetic processing on the image data stored in the RAM 1b or the flash memory 1d. The ROM 1c also stores information about the digital camera 10, for example.
The image processing unit 2 performs predetermined image processing such as white balance processing, gamma correction processing, lens aberration correction processing, noise reduction processing, and dynamic range expansion on image data corresponding to the image captured by the image sensor 5. Processing, resize processing of image data, conversion processing from raw data to compressed data such as JPEG, and the like are executed.
In addition to still image shooting, the image sensor 5 can perform continuous shooting and moving image shooting at a predetermined frame rate. The captured image data is transferred to the image processing unit 2 and the display 6 via the system bus 3.
The display 6 can display captured still images or moving images in real time, and can also reproduce and display still images or moving images stored in a storage medium such as a memory card described later. Furthermore, the display 6 may be provided with a touch panel sensor, and the photographer may be able to designate a portion to be focused only by touching a part on the screen displayed on the display 6.
The operation interface unit 7 transmits to the control unit 1 via the system bus 3 operation information of a photographer by operating an operation member (not shown) such as a dial, a button, and a touch panel provided in the digital camera 10. The CPU 1 a of the control unit 1 controls each component according to the operation information transmitted from the operation interface unit 7. The operation interface unit 7 transmits the position and size of the crop area designated by the photographer to the CPU 1a via the system bus 3 and the internal bus 1e.
The memory card access unit 8 reads image data, programs, firmware, and the like stored in the memory card 13 inserted in the digital camera 10, or is imaged by the image sensor 5 and image-processed by the image processing unit 2. A process for writing data to the memory card 13 is executed. The memory card access unit 8 can also transfer a program or firmware stored in the memory card 13 to the RAM 1b or the flash memory 1d of the control unit 1 via the system bus 3 in accordance with a command from the control unit 1. . The CPU 1a executes a predetermined process, for example, a main subject estimation process to be described later, with the updated program or firmware.
The wireless communication unit 9 includes, for example, a WiFi (registered trademark) function, and this function enables the digital camera 10 to connect to the Internet wirelessly. For example, the wireless communication unit 9 may execute communication when downloading a program, firmware, image data, or the like provided on the Internet according to a command from the control unit 1. The downloaded program or the like is transferred to the control unit 1 via the system bus 3. The CPU 1a of the control unit 1 writes the transferred program or the like in the flash memory 1d. The CPU 1a executes a predetermined process, for example, a main subject estimation process to be described later, with the updated program or firmware. Alternatively, the CPU 1a may store the downloaded image data as a captured image in the RAM 1b, display it on the display 6, or write it on the memory card 13. Conversely, the CPU 1a can also upload a captured image captured by the digital camera 10 to a predetermined site or blog on the Internet.
The wireless communication unit 9 controls bidirectional communication with a mobile communication terminal such as a smartphone or a tablet terminal. For example, the control unit 1 transmits image data processed by the image processing unit 2 to the mobile communication terminal via the wireless communication unit 9 or receives image data from the mobile communication terminal to receive the image processing unit 2 or It can be transferred to the display 6. The wireless communication unit 9 receives a command or program sent from the mobile communication terminal and transfers it to the control unit 1. The control unit 1 can also control the digital camera 10 based on commands and programs sent from the mobile communication terminal.

撮影レンズ12は、制御部1からの指令に応じて撮影レンズ12の後述する各構成要素を制御するレンズCPU12aと、撮影レンズ12の焦点距離(撮影レンズ12が単焦点レンズの場合)、開放F値及び収差情報などのレンズ情報を記憶するレンズROM12bと、撮影レンズ12の各構成要素が接続された内部バス12kと、を備えている。レンズROM12bに記憶されたレンズ情報は、内部バス12k及びシステムバス3を介して制御部1及び画像処理ユニット2に送られる。制御部1は、撮影レンズ12の焦点距離の情報に基づいて所定の処理、例えば後述する被写体追尾処理を実行する。また、画像処理ユニット2は、当該レンズ情報を、所定の画像処理に用いると共に、コマ毎の画像データ撮影情報領域に記憶させる。   The photographic lens 12 includes a lens CPU 12a that controls each component described later of the photographic lens 12 according to a command from the control unit 1, a focal length of the photographic lens 12 (when the photographic lens 12 is a single focus lens), and an open F. A lens ROM 12b that stores lens information such as value and aberration information, and an internal bus 12k to which each component of the photographing lens 12 is connected are provided. The lens information stored in the lens ROM 12b is sent to the control unit 1 and the image processing unit 2 via the internal bus 12k and the system bus 3. The control unit 1 executes predetermined processing, for example, subject tracking processing described later, based on information on the focal length of the photographing lens 12. Further, the image processing unit 2 uses the lens information for predetermined image processing and stores it in the image data shooting information area for each frame.

また、撮影レンズ12は、合焦モータ12cと、防振レンズ群16(図1)を駆動させるための防振駆動部12dと、を備えている。レンズCPU12aは、制御部1からの指令に従って、合焦レンズ群15(図1)を合焦位置まで移動させるように合焦モータ12cを制御する。
更に、撮影レンズ12は、撮像素子5から被写体までの距離を検出するための距離エンコーダ12eと、撮影レンズ12がズームレンズの場合、撮影レンズ12の焦点距離に対応するズームリングの位置を検出する焦点距離エンコーダ12fとを備えている。検出された被写体までの距離及び焦点距離に関する情報は、内部バス12k及びシステムバス3を介して制御部1に送られる。制御部1は、検出された被写体までの距離及び焦点距離に基づいて所定の処理、例えば後述する主要被写体推定処理を実行する。
Further, the photographing lens 12 includes a focusing motor 12c and an anti-vibration driving unit 12d for driving the anti-vibration lens group 16 (FIG. 1). The lens CPU 12a controls the focusing motor 12c so as to move the focusing lens group 15 (FIG. 1) to the focusing position in accordance with a command from the control unit 1.
Further, the photographic lens 12 detects a distance encoder 12e for detecting the distance from the image sensor 5 to the subject, and the position of the zoom ring corresponding to the focal length of the photographic lens 12 when the photographic lens 12 is a zoom lens. And a focal length encoder 12f. Information about the detected distance to the subject and the focal length is sent to the control unit 1 via the internal bus 12k and the system bus 3. The control unit 1 executes predetermined processing based on the detected distance to the subject and the focal length, for example, main subject estimation processing described later.

また、デジタルカメラ10は、光学式手振れ補正機能及び電子式手触れ補正の少なくともいずれかを有していてもよい。この場合、撮影レンズ12は、撮影者の手振れ量を検出するための手振れ検出センサ12gを備えている。また、光学式手触れ補正機能を備える場合には、撮影レンズ12は、手振れを防止するように駆動制御される防振レンズ群16を備えている。
手振れ検出センサ12gにより検出された手振れ量を示す信号は、内部バス12k及びシステムバス3を介して制御部1に送られる。制御部1は、検出された手振れ量を打ち消すための防振レンズ群16の駆動量を計算し、当該駆動量をレンズCPU12aに伝達する。レンズCPU12aは、防振駆動部12dを制御することにより、手振れ量を打ち消すように防振レンズ群16を駆動させる。
The digital camera 10 may have at least one of an optical camera shake correction function and an electronic hand touch correction. In this case, the photographing lens 12 includes a camera shake detection sensor 12g for detecting a camera shake amount of the photographer. Further, when the optical hand touch correction function is provided, the photographing lens 12 includes an anti-vibration lens group 16 that is driven and controlled so as to prevent camera shake.
A signal indicating the amount of camera shake detected by the camera shake detection sensor 12g is sent to the control unit 1 via the internal bus 12k and the system bus 3. The control unit 1 calculates a driving amount of the image stabilizing lens group 16 for canceling the detected camera shake amount, and transmits the driving amount to the lens CPU 12a. The lens CPU 12a controls the image stabilization drive unit 12d to drive the image stabilization lens group 16 so as to cancel out the camera shake amount.

手振れ検出センサ12gは、デジタルカメラ10の角速度を手振れ(角度振れ)として検出する角速度センサ17a、17b(図1)を含む。また、手振れ検出センサ12gは、直線方向の振れ(所謂「シフト振れ」)を防止するための加速度センサ18a、18b(図1)も含んでいてもよい。   The camera shake detection sensor 12g includes angular velocity sensors 17a and 17b (FIG. 1) that detect the angular velocity of the digital camera 10 as camera shake (angle shake). The camera shake detection sensor 12g may also include acceleration sensors 18a and 18b (FIG. 1) for preventing linear shake (so-called “shift shake”).

本発明の実施形態が適用されるデジタルカメラは、図1に示すようなミラーレスのカメラには限定されず、一眼レフカメラや、ビデオカメラにも同様に適用可能である。また、携帯電話、スマートフォン、多機能情報通信端末等に備えられたデジタルカメラやビデオカメラにも適用可能である。
(第1の実施形態)
図3には、デジタルカメラ10の制御部1が第1の実施形態に係る主要被写体推定装置として機能する場合の機能ブロック図が示されている。
The digital camera to which the embodiment of the present invention is applied is not limited to the mirrorless camera as shown in FIG. 1, and can be similarly applied to a single-lens reflex camera or a video camera. Further, the present invention can be applied to a digital camera or a video camera provided in a mobile phone, a smartphone, a multi-function information communication terminal, or the like.
(First embodiment)
FIG. 3 shows a functional block diagram when the control unit 1 of the digital camera 10 functions as the main subject estimation device according to the first embodiment.

図3に示すように、制御部1は、画像処理ユニット2から転送されてきた、時間的に連続する撮像画像を取得する画像取得部21と、これらの複数の撮像画像から被写体を検出する被写体検出部23と、を備えている。本実施形態では、画像取得部21は、例えば、画像処理ユニット2から転送されてきた撮像画像を一時的に記憶する図2のRAM1bによって構成される。被写体検出部23は、RAM1bに記憶された撮像画像を読み取り、読み取った撮像画像内の被写体の画像から特徴(例えば人物の顔の特徴)を抽出することにより被写体(被写体領域)を検出する。検出される被写体の領域は、撮影対象の全体でもその一部分(例えば、人物の「顔」部分)のいずれであってもよい。
また、制御部1は、検出された被写体から、被写体情報(撮像画像内での被写体の大きさ、位置等)を検出するための被写体情報検出部24と、検出された被写体情報から撮像画像の主要被写体を推定する主要被写体推定部31と、を備えている。
さらに、制御部1は、スコア関数Sを記憶するスコア関数メモリ22と、判定条件メモリ26と、を備えている。スコア関数メモリ22及び判定条件メモリ26は、図2のRAM1b、ROM1c、及び、フラッシュメモリ1dの少なくともいずれかで実現することができる。スコア関数Sは、被写体情報を変数として、当該被写体情報を与える被写体が主要被写体である確率の高さをスコアとして与える関数である。判定条件メモリ26に記憶される判定条件には、少なくとも、主要被写体とされている被写体を主要被写体から解除するため必要となる解除条件J1、及び画像中のある被写体を新たな主要被写体として設定するため必要となる設定条件J2が含まれている。主要被写体推定部31は、スコア関数S、解除条件J1及び設定条件J2に基づいて、当該撮像画像内の主要被写体を推定する。
また、制御部1は、追尾制御部33を備えている。追尾制御部33は、主要被写体推定部31により推定された主要被写体を追尾するため主要被写体情報を含む追尾制御信号を生成する。例えば、制御部1は、追尾制御信号によって、ディスプレイ6上の主要被写体の領域にAF枠を重畳表示させたり、合焦モータ12cを駆動させて、撮影レンズ12に、主要被写体に対しての合焦動作を実行させたりする。或いは、制御部1は、主要被写体の情報に基づいて、主要被写体に露出を合わせるためデジタルカメラのシャッター速度、撮影レンズ12の絞り、ISO感度を制御したりすることができる。追尾制御部33は、上記追尾制御信号を生成しなくともよく、追尾制御部33自体が上記制御を行ってもよい。主要被写体の情報は、この例の使用に限定されるものではなく、例えば主要被写体を含む領域の画像データをクロップする等、他の用途にも用いることができる。
なお、上述の被写体検出部23、被写体情報検出部24、主要被写体推定部31及び追尾制御部33は、制御部1のROM1cやフラッシュメモリ1d等に記録されたプログラムをCPU1aが実行することによって実現することができる。
ここで、スコア関数メモリ22に記憶されているスコア関数Sについて説明する。なお、以下では、スコア関数の値が被写体Oi(添え字iは、各被写体につけた番号であり、i=1,2,...n(nは被写体の個数)である。)に関するものであることを示したいときには、スコアSをS(Oi)と表記する。スコア関数が撮像画像内での被写体Oの大きさL(O)の関数として示したいときには、スコア関数をS(L(Oi))と表記し、大きさLだけでなく被写体Oの位置P(O)の関数としても示したいときには、スコア関数をS(L(Oi),P(Oi))と表記する。なお、被写体Oiを特定する必要のない場合は、単にS(L)或いはS(L,P)と省略表記する。
As illustrated in FIG. 3, the control unit 1 includes an image acquisition unit 21 that acquires temporally continuous captured images transferred from the image processing unit 2, and a subject that detects a subject from the plurality of captured images. And a detection unit 23. In the present embodiment, the image acquisition unit 21 includes, for example, the RAM 1b of FIG. 2 that temporarily stores the captured image transferred from the image processing unit 2. The subject detection unit 23 detects a subject (subject region) by reading a captured image stored in the RAM 1b and extracting a feature (for example, a feature of a person's face) from the image of the subject in the read captured image. The area of the subject to be detected may be the entire subject to be photographed or a part thereof (for example, the “face” portion of a person).
The control unit 1 also includes a subject information detection unit 24 for detecting subject information (size, position, etc. of the subject in the captured image) from the detected subject, and a captured image from the detected subject information. And a main subject estimation unit 31 that estimates a main subject.
The control unit 1 further includes a score function memory 22 that stores the score function S and a determination condition memory 26. The score function memory 22 and the determination condition memory 26 can be realized by at least one of the RAM 1b, the ROM 1c, and the flash memory 1d in FIG. The score function S is a function that uses subject information as a variable and gives a high probability that the subject to which the subject information is given is the main subject. In the determination conditions stored in the determination condition memory 26, at least a cancellation condition J1 necessary for releasing the main subject from the main subject and a certain subject in the image are set as new main subjects. Therefore, the necessary setting condition J 2 is included. Main subject estimating unit 31, based on the score function S, the release condition J 1 and setting condition J 2, to estimate the main subject in the captured image.
Further, the control unit 1 includes a tracking control unit 33. The tracking control unit 33 generates a tracking control signal including main subject information in order to track the main subject estimated by the main subject estimation unit 31. For example, the control unit 1 causes the AF lens to be superimposed on the area of the main subject on the display 6 or to drive the focusing motor 12c in accordance with the tracking control signal, so that the photographing lens 12 can adjust the focus on the main subject. Perform a focusing operation. Alternatively, the control unit 1 can control the shutter speed of the digital camera, the aperture of the photographing lens 12, and the ISO sensitivity in order to adjust the exposure to the main subject based on the information on the main subject. The tracking control unit 33 may not generate the tracking control signal, and the tracking control unit 33 itself may perform the control. The main subject information is not limited to the use of this example, and can be used for other purposes, such as cropping image data of a region including the main subject.
The subject detection unit 23, the subject information detection unit 24, the main subject estimation unit 31, and the tracking control unit 33 are realized by the CPU 1a executing a program recorded in the ROM 1c, the flash memory 1d, or the like of the control unit 1. can do.
Here, the score function S stored in the score function memory 22 will be described. In the following, the value of the score function relates to the subject O i (subscript i is a number assigned to each subject, i = 1, 2,... N (n is the number of subjects)). When it is desired to indicate that the score S is expressed as S (O i ). When the score function is to be shown as a function of the size L (O i ) of the subject O i in the captured image, the score function is expressed as S (L (O i )), and not only the size L but also the subject O i. When it is desired to show the score function as a function of the position P (O i ), the score function is expressed as S (L (O i ), P (O i )). When there is no need to specify the subject Oi, it is simply abbreviated as S (L) or S (L, P).

スコア関数Sは、少なくとも被写体Oiの撮像画像内での大きさL又は大きさに関する値の関数であり、本実施形態では、被写体が主要被写体である確率が高いほどスコア値が大きくなる関数として設定されている。通常、撮像画像内での被写体の大きさLが大きいほど、主要被写体である確率が高いと考えられるため、スコア関数S(Oi)は、被写体Oiの大きさLが大きいほどスコア値が大きくなるように設定されている。この場合、スコア関数S(Oi)は、被写体Oiの大きさLの単調増加関数である。或いはスコア関数Sは、被写体の通常の大きさの範囲内で、大きさLの増加関数としてもよく、それ以外の範囲では、一定値を取ったり或いは大きさLの減少関数(大きすぎる被写体を排除)とすることもできる。
次に、判定条件メモリ26に記憶されている解除条件J1及び設定条件J2について説明する。解除条件J1は、主要被写体とされている被写体がこの条件J1を満たすとき、当該被写体の主要被写体らしさの確率が減少して主要被写体でないと判定するための必要条件(ただし十分条件ではない)が満たされたことを示す条件である。一方、設定条件J2は、ある被写体がこの条件Jを満たすとき、当該被写体の主要被写体らしさの確率が増大して、新たな主要被写体であると判定するための条件が満たされたことを示す条件である。ここで、設定条件J2は、解除条件J1が成立しない条件(すなわち被写体Oを主要被写体に維持する)よりもきびしい条件として設定される。換言すれば、設定条件J2が成立する被写体情報(被写体の大きさ、位置、又はスコアS)の集合は、解除条件J1が成立しない条件を満たす被写体情報の集合に含まれている。
被写体が主要被写体であるかを推定するため、本実施形態のように1次元的なスコア関数を用いる場合には、解除条件J1及び設定条件J2は、閾値或いは数値範囲で示される。主要被写体である確率が上がるほどスコア値も大きくなる関数Sを用いた場合、設定条件J2が、解除条件J1が成立しない条件よりもきびしい条件であるとは、設定条件J2の閾値が解除条件J1の閾値よりも大きいことを意味している。換言すれば、設定条件J2が成立するスコア値の集合(SThB)は、解除条件J1が成立しない条件を満たすスコア値の集合(S>ThA)に含まれている(ThA<ThBより明らか)。
逆に、主要被写体である確率が上がるほどスコア値が小さくなるスコア関数を用いた場合には、設定条件J2が、解除条件J1が成立しない条件よりもきびしい条件であるとは、設定条件J2の閾値が解除条件J1の閾値よりも小さいことを意味している。
以上のように、主要被写体として設定されていなかった第2の被写体を主要被写体として新たに設定するよりも、主要被写体として設定された第1の被写体を主要被写体として継続して維持しようとする傾向がある点で、本発明の主要被写体推定の処理は、ヒステリシス特性を有しているといえる。
The score function S is a function of at least the size L in the captured image of the subject O i or a value related to the size. In this embodiment, the score function S is a function that increases as the probability that the subject is the main subject increases. Is set. In general, the larger the subject size L in the captured image, the higher the probability that the subject is the main subject. Therefore, the score function S (O i ) has a score value that increases as the subject L i size L increases. It is set to be large. In this case, the score function S (O i ) is a monotonically increasing function of the size L of the subject O i . Alternatively, the score function S may be an increase function of the size L within the range of the normal size of the subject. In the other range, the score function S may take a constant value or a decrease function of the size L (a subject that is too large). Exclusion).
Next, the cancellation condition J 1 and the setting condition J 2 stored in the determination condition memory 26 will be described. The cancellation condition J 1 is a necessary condition (but not a sufficient condition) for determining that the subject that is the main subject satisfies the condition J 1 and that the probability of the subject's likelihood of being a main subject is reduced and is not the main subject. ) Is satisfied. On the other hand, the setting condition J 2 indicates that when a certain subject satisfies this condition J 2 , the probability of the subject being the main subject is increased and the condition for determining that the subject is a new main subject is satisfied. It is a condition to show. Here, the setting condition J 2 is set as a condition that is more severe than a condition in which the cancellation condition J 1 is not satisfied (that is, the object O 1 is maintained as the main object). In other words, the set of subject information (subject size, position, or score S) that satisfies the setting condition J 2 is included in the set of subject information that satisfies the condition that the release condition J 1 is not satisfied.
When a one-dimensional score function is used as in the present embodiment in order to estimate whether the subject is a main subject, the cancellation condition J 1 and the setting condition J 2 are indicated by threshold values or numerical ranges. When using the function S also increases as the score value the probability that the main subject is increased, setting condition J 2 is a release condition J 1 is severe conditions than the conditions not satisfied, the threshold setting condition J 2 which means that greater than the threshold of release conditions J 1. In other words, the set (S> ThB) score values established setting condition J 2 are included in the set condition is satisfied score value which the cancellation condition J 1 is not satisfied (S> ThA) (ThA < ThB More obvious).
Conversely, when a score function is used in which the score value decreases as the probability of being a main subject increases, the setting condition J 2 is more severe than the condition in which the cancellation condition J 1 is not satisfied. This means that the threshold value of J 2 is smaller than the threshold value of release condition J 1 .
As described above, a tendency to continue to maintain the first subject set as the main subject as the main subject rather than newly setting the second subject that was not set as the main subject as the main subject. Therefore, it can be said that the main subject estimation process of the present invention has hysteresis characteristics.

次に、本発明の第1の実施形態に係る主要被写体推定装置の処理の流れを、図6乃至図8を用いて説明する。このうち図6乃至図7は、制御部1の処理手順の一例を示すフローチャートである。図6乃至図7に示す処理手順のプログラムは、制御部1に備えられた、図1に示すRAM1b、ROM1c,或いは、フラッシュメモリ1dに記録されている。   Next, the processing flow of the main subject estimation apparatus according to the first embodiment of the present invention will be described with reference to FIGS. Among these, FIGS. 6 to 7 are flowcharts showing an example of the processing procedure of the control unit 1. The processing procedure programs shown in FIGS. 6 to 7 are recorded in the RAM 1b, ROM 1c, or flash memory 1d shown in FIG.

図6に示すように、画像取得部21が、時間的に最初に入力される撮像画像f(k=1)、即ち撮像画像fを取得する(ステップ100)。次に、被写体検出部23が、撮像画像f内の被写体Oiを検出する(i=1,2,・(ステップ101)。例えば、図8に示すように、撮像画像fにおいて人物1、2、3が存在した場合、被写体検出部23は、人物1、2、3の顔領域を夫々被写体O、O、Oとして検出する。このとき、被写体情報検出部24が、撮像画像f内の被写体O、O、Oの被写体情報(被写体の大きさL(O))を検出する。被写体情報検出部24は、被写体の大きさL(O)に追加して被写体の位置P(O)或いは位置P(O)のみを検出してもよい。 As shown in FIG. 6, the image acquisition unit 21 acquires a captured image f k (k = 1) that is input first in time, that is, a captured image f 1 (step 100). Then, subject detection unit 23 detects the object Oi in the captured image f 1 (i = 1,2, · ( step 101). For example, as shown in FIG. 8, the person 1 in the captured image f 1, 2 and 3, the subject detection unit 23 detects the face areas of the persons 1 , 2 , and 3 as subjects O 1 , O 2 , and O 3 , at which time the subject information detection unit 24 captures the captured image. The subject information (subject size L 1 (O i )) of the subjects O 1 , O 2 , and O 3 in f 1 is detected, and the subject information detector 24 sets the subject size L 1 (O i ). In addition, only the position P 1 (O i ) or the position P 1 (O i ) of the subject may be detected.

図6に戻り、制御部1は、撮像画像fにおいて検出された被写体の中から、特定の被写体(この例では、O(第1の被写体))を主要被写体として指定する(ステップ102)。以後、主要被写体をOと表す(現時点では、O=Oである)。主要被写体の指定方法に関しては、例えば、主要被写体推定部31が、検出された被写体の中から最も大きい被写体を自動的に主要被写体と推定してもよい。或いは、制御部1は、撮影者が指定した被写体を主要被写体とすることもできる。例えば、制御部1は、撮影者が、図示しない操作部材やディスプレイ6にタッチすることにより指定した被写体を最初の主要被写体と認識してもよい。 Returning to FIG. 6, the control unit 1 designates a specific subject (in this example, O 1 (first subject)) as a main subject from the subjects detected in the captured image f 1 (step 102). . Hereinafter, the main subject is represented as O m (currently, O m = O 1 ). Regarding the main subject designation method, for example, the main subject estimation unit 31 may automatically estimate the largest subject among the detected subjects as the main subject. Alternatively, the control unit 1 can set the subject designated by the photographer as the main subject. For example, the control unit 1 may recognize the subject designated by the photographer touching an operation member (not shown) or the display 6 as the first main subject.

次に、画像取得部21は、画像番号kを1つ増分し、次の撮像画像fを取得する(ステップ104)。次に、被写体検出部23が、撮像画像fk内の被写体Oiを継続的に検出する(i=1,2,・(ステップ106)。例えば、図8に示すように、撮像画像fkにおいて、撮像画像fで検出された人物1、2、3と同じ人物であると推定される被写体O、O、Oを検出する。同一被写体であるか否かの判定は、例えば、制御部1が、現在の撮像画像において、一つ前に入力された撮像画像における被写体の位置に対応する位置の周辺の領域をサーチし、当該被写体の画像データとのマッチング演算等により類似した画像特徴を有する被写体を検出することによって可能となる。 Next, the image acquisition unit 21 increments the image number k by 1, and acquires the next captured image f k (step 104). Then, subject detection unit 23 continuously detects the object Oi in the captured image f k (i = 1,2, · ( step 106). For example, as shown in FIG. 8, in the captured image f k The subjects O 1 , O 2 , and O 3 that are estimated to be the same person as the persons 1, 2, and 3 detected in the captured image f 1 are detected. The control unit 1 searches a region around the position corresponding to the position of the subject in the previous captured image in the current captured image, and similar images by matching calculation with the image data of the subject This is possible by detecting a subject having characteristics.

次に、被写体情報検出部24が、撮像画像f内の被写体O(i=1,2,..)の被写体情報を検出する(ステップ108)。被写体情報検出部24は、被写体情報として、少なくとも撮像画像内の被写体の大きさL(O)又は大きさに関する値を検出する。また被写体情報検出部24は、被写体の大きさ以外に或いは被写体の大きさに代えて、撮像画像内での被写体の位置P(O)又は位置に関する値を検出してもよい。なお、撮像画像内の被写体の大きさL(O)は、図8に示すように、例えば、撮像画像内で被写体として検出された領域の一辺や対角線の長さ又は当該領域の面積を用いることができる。撮像画像内での被写体の位置P(O)は、撮像画像内で被写体として検出された領域の中心位置、或いは重心位置などを用いることができる。 Next, the subject information detection unit 24 detects subject information of the subject O i (i = 1, 2,...) In the captured image f k (step 108). The subject information detection unit 24 detects at least a size L k (O i ) or a value related to the size of the subject in the captured image as subject information. The subject information detection unit 24 may detect a position P k (O i ) of the subject in the captured image or a value related to the position other than the size of the subject or instead of the size of the subject. Note that the size L k (O i ) of the subject in the captured image is, for example, the length of one side or diagonal line of the region detected as the subject in the captured image or the area of the region, as shown in FIG. Can be used. As the position P k (O i ) of the subject in the captured image, the center position of the area detected as the subject in the captured image, the center of gravity position, or the like can be used.

次に、主要被写体推定部31は、L(Oi)及びP(O) (i=1,2,・の少なくともいずれかに関するスコア関数S(Oi)の値に基づいて撮像画像fkにおける主要被写体Oを推定する(ステップ110)。撮像画像fにおける主要被写体Oを推定した後、制御部1は、ステップ104に戻り、次に入力された撮像画像fについて、同様の処理を実行することにより、撮像画像fにおける主要被写体Oを推定する。 Next, the main subject estimation unit 31 captures an image based on the value of the score function S (O i ) regarding at least one of L k (O i ) and P k (O i ) (i = 1, 2,. The main subject O m in f k is estimated (step 110) After estimating the main subject O m in the captured image f k , the control unit 1 returns to step 104 and the next input captured image f k is calculated. By executing the same processing, the main subject O m in the captured image f k is estimated.

次にステップ110の工程の処理の流れについて、図7を用いて説明する。   Next, the process flow of step 110 will be described with reference to FIG.

図7に示すように、主要被写体推定部31は、スコア関数Sメモリ22からスコア関数Sを呼び出し、判定条件メモリ26から主要被写体の解除条件J及び主要被写体の設定条件Jを読み込む(ステップ150)。
次に、主要被写体推定部31は、現時点での主要被写体O(1回目のループでは、O=O)の被写体情報をスコア関数に代入することにより、主要被写体のスコア値S(O)を求める。主要被写体推定部31は、スコア値S(O)が解除条件Jを満足しているか否かを判定する(ステップ152)。
スコア値S(O)が解除条件Jを満足していない場合(ステップ152の否定判定)、主要被写体推定部31は、主要被写体を維持すると判断し(O=O)、本ルーチンをリターンして、図6のメインルーチンに処理を戻す。この場合、追尾制御部33は、直前の撮像画像のときと同じ被写体を主要被写体Oとして追尾する。
As shown in FIG. 7, the main subject estimating unit 31 calls the score function S from the score function S memory 22, reads the setting condition J 2 release conditions J 1 and the main subject of the main object determination condition memory 26 (step 150).
Next, the main subject estimation unit 31 substitutes the subject information of the current main subject O m (O m = O 1 in the first loop) into the score function, so that the score value S (O m ). Main subject estimating unit 31 determines whether the score value S (O m) satisfies the cancellation condition J 1 (step 152).
When the score value S (O m ) does not satisfy the release condition J 1 (negative determination in step 152), the main subject estimation unit 31 determines that the main subject is maintained (O m = O 1 ), and this routine To return to the main routine of FIG. In this case, the tracking controller 33 tracks the same object as in the immediately preceding captured image as the main subject O m.

一方、スコア値S(O)が解除条件Jを満足している場合(ステップ152の肯定判定)、主要被写体推定部31は、O以外の全ての被写体のスコア値S(O)の中から最大のスコア値Smaxを与える第2の被写体Oを検索する(ステップ154)。ここで被写体Oの被写体情報をスコア関数に代入することにより第2の被写体のスコア値S(O)を求める。
スコア値S(O)が設定条件Jを満足しているか否かを判定する(ステップ156)。スコア値S(O)が設定条件Jを満足していない場合(ステップ156の否定判定)、主要被写体推定部31は、主要被写体を維持するべきと判断し(O=O)、本ルーチンをリターンして、図6のメインルーチンに処理を戻す。この場合、追尾制御部33は、直前の撮像画像のときと同じ被写体を主要被写体Oとして追尾する。
On the other hand, when the score value S (O m ) satisfies the cancellation condition J 1 (affirmative determination in step 152), the main subject estimation unit 31 determines the score values S (O j ) of all subjects other than O m. searching for a second object O n giving the maximum score value S max among (step 154). Here obtaining a score value of the second object S (O n) by substituting the subject information of the object O n the score function.
It is determined whether or not the score value S (O n ) satisfies the setting condition J 2 (step 156). When the score value S (O n ) does not satisfy the setting condition J 2 (negative determination in step 156), the main subject estimation unit 31 determines that the main subject should be maintained (O m = O 1 ), This routine is returned to return to the main routine of FIG. In this case, the tracking controller 33 tracks the same object as in the immediately preceding captured image as the main subject O m.

一方、スコア値S(O)が設定条件Jを満足している場合(ステップ156の肯定判定)、主要被写体推定部31は、第2の被写体Oを主要被写体とする(ステップ158)。すなわち、主要被写体番号m=nとする。その後、主要被写体推定部31は本ルーチンをリターンして、図6のメインルーチンに処理を戻す。この場合、追尾制御部33は、直前の撮像画像のときとは異なる被写体Oを主要被写体として追尾する。図6のメインルーチンでは、制御部1は、次に入力された撮像画像について同様の処理を繰り返す。 On the other hand, if the score value S (O n) satisfies the setting condition J 2 (affirmative determination in step 156), the main subject estimating unit 31, the second object O n the main subject (step 158) . That is, the main subject number m = n. Thereafter, the main subject estimation unit 31 returns this routine and returns to the main routine of FIG. In this case, the tracking control unit 33 tracks as the main subject different object O n and the time of the previous captured image. In the main routine of FIG. 6, the control unit 1 repeats the same processing for the next input captured image.

第1の実施形態によれば、先に主要被写体と指定(又は推定)された第1の被写体のスコア関数Sの値が解除条件Jを満足し、かつ、第1の被写体以外で主要被写体である確率が高いと考えられる第2の被写体のスコア関数Sの値が設定条件Jを満足した場合、制御部1は、第2の被写体が主要被写体であると推定する。設定条件Jは解除条件Jが成立せず第1の被写体を主要被写体に維持する条件よりもきびしいため、先に主要被写体とされた第1の被写体は、主要被写体との推定(又は指定)を維持しやすく、第2の被写体は第1の被写体と比べて主要被写体であると推定されにくくなる。これによって、主要被写体を切り替えるべきでない何らかの原因により被写体のスコア値等が急激に変動する状況(例えば、偶々非常に大きい第2の被写体が撮像画像内に入り込んだ時など)であっても、安定して主要被写体を推定し続けることが可能となる。さらに第1の実施形態によれば、少なくとも撮像画像内での被写体の大きさに基づいて主要被写体を推定するため、撮影者がデジタルカメラ10をパンニング若しくはチルティングしていなくとも、或いは、その操作の途中であったとしても、主要被写体を正確に推定することができる。
なお、上記では、スコア関数Sが、撮像画像内での被写体Oの大きさL(O)の関数である例を挙げたが、被写体の大きさに関する値をスコア関数Sの変数として用いてもよい。大きさに関する値として、例えば、時間的に連続する所定フレーム数に亘る同一被写体の大きさL1,L,L,・フ平均値Lave、それらの分散値L、Lの変化ΔL(時間的に離れた撮像画像における同一被写体の大きさの変化)などが挙げられる。スコア関数の変数として、これらの値やこれらの値の組み合わせ等を使用することもできる。例えば、スコア関数として、S(Lave)、S(L,L)、S(Lave,L)、S(L,ΔL)、S(Lave,L、ΔL)等を使用することができる。
また、スコア関数S(Oi)の変数として、被写体Oの大きさL(Oi)だけではなく、撮像画像内での被写体Oの位置P(Oi)又は位置に関する値を、単独で或いは大きさLと組み合わせて使用することもできる。大きさLと位置Pとを用いた場合、スコア関数はS(L,P)となる。このとき、S(L,P)は、位置P(Oi)が撮像画像内で主要被写体が存在する確率が高い位置であるほど、スコア値が大きくなるように設定されている。しかし、スコア関数Sは大きさLの関数でもあるので、被写体が主要被写体の存在確率の高い位置に位置していたとしても、被写体の大きさLが小さければ、スコア値は大きくならない。逆もまた然りである。
また、位置に関する値としては、例えば、時間的に連続する所定フレーム数に亘る同一被写体の位置P1,P,P,・フ平均値Pave、それらの分散値P、Pの変化ΔP(時間的に離れた撮像画像における同一被写体の位置の変化)、主要被写体が存在する確率が最も高いと考えられる位置P(撮像画像の中央位置)との距離|P−P|、位置Pへの接近傾向等が挙げられる。接近傾向の例として、所定フレーム数に亘る被写体位置の評価の結果、被写体の位置が、画面内の所定の位置(例えば撮像画像の中央位置)に近づいている場合には、スコア値を大きくし、遠ざかっていればスコア値を小さくする。スコア関数の変数として、これらの値やこれらの値の組み合わせ等を使用することもできる。例えば、スコア関数として、S(L,Pave)、S(L,P)、S(Lave,P)、S(L,ΔP)、S(Lave,|P−P|)、S(L,Δ(P-P))等を使用することができる。
上記考察より、第1の実施形態では、例えば、スコア関数Sを、次式のように一般的に表すことができる。
According to the first embodiment, previously designated as a main subject (or estimated) by the value of the score function S of the first object satisfies the cancellation condition J 1 was, and the main object other than the first object If the value of the score function S of the second object which probability is considered to be high is satisfies a setting condition J 2, the control unit 1, the second object is estimated to be the main subject. For setting condition J 2 are severe than the conditions for maintaining the first object does not hold the release condition J 1 to the main subject, the first object which is a main subject earlier, estimated (or specified as a main subject ) And the second subject is less likely to be estimated as the main subject than the first subject. As a result, even if the score value of the subject fluctuates abruptly for some reason that the main subject should not be switched (for example, when a very large second subject accidentally enters the captured image), it is stable. Thus, it is possible to continue to estimate the main subject. Furthermore, according to the first embodiment, since the main subject is estimated based on at least the size of the subject in the captured image, even if the photographer does not pan or tilt the digital camera 10, or the operation thereof Even in the middle of this, the main subject can be accurately estimated.
In the above example, the score function S is a function of the size L (O i ) of the subject O i in the captured image, but a value related to the size of the subject is used as a variable of the score function S. May be. As values related to the size, for example, the size L 1 , L 2 , L 3 , average value L ave of the same subject over a predetermined number of temporally continuous frames, their variance values L v , changes in L ΔL (Changes in the size of the same subject in captured images that are separated in time). These values, combinations of these values, and the like can also be used as variables of the score function. For example, S (L ave ), S (L, L v ), S (L ave , L v ), S (L, ΔL), S (L ave , L v , ΔL), etc. are used as the score function. be able to.
Further, as a variable of the score function S (O i), of the subject O i not only the size L (O i), the value relating to the position P (O i) or position of the object O i in the captured image, alone Or in combination with the size L. When the size L and the position P are used, the score function is S (L, P). At this time, S (L, P) is set so that the score value increases as the position P (O i ) has a higher probability that the main subject exists in the captured image. However, since the score function S is also a function of the size L, the score value does not increase if the size L of the subject is small even if the subject is located at a position where the existence probability of the main subject is high. The reverse is also true.
Further, as the value related to the position, for example, the positions P 1 , P 2 , P 3 , and the average value P ave of the same subject over a predetermined number of temporally continuous frames, and changes in their variance values P v , P ΔP (change in position of the same subject in a captured image separated in time), a distance | P−P 0 |, a position P 0 (center position of the captured image) that is considered to have the highest probability that the main subject exists An approach tendency to the position P 0 can be mentioned. As an example of the approach tendency, if the position of the subject is approaching a predetermined position on the screen (for example, the center position of the captured image) as a result of evaluating the subject position over a predetermined number of frames, the score value is increased. If it is far away, the score value is decreased. These values, combinations of these values, and the like can also be used as variables of the score function. For example, as a score function, S (L, P ave ), S (L, P v ), S (L ave , P v ), S (L, ΔP), S (L ave , | P−P 0 |) , S (L, Δ (P−P 0 )) and the like can be used.
From the above consideration, in the first embodiment, for example, the score function S can be generally expressed as the following equation.

S(x,x,x,・j=w・x+w・x+w・x+・. (1)
ここで、変数x、x、x,・ヘ、上記例に挙げた、被写体の大きさ又は大きさに関する値、被写体の位置又は位置に関する値である。w、w、w,...は、各変数x,x,x,・フ重み係数であり、これらの重み係数w,w.w,...は、正負の値、0の値を取り得る。例えば大きさLの重み係数は正である。すなわち、被写体の大きさLが大きいほど、主要被写体であるスコア値(確率)が増加することを示している。逆に位置P(撮像画像の中央位置)との距離|P−P|の重み係数は負である。すなわち、当該距離が大きいほど主要被写体であるスコア値(確率)が減少することを示している。特に主要被写体推定に使用しない変数については、その重み係数を0とすればよい。
様々な撮影状況やシーンに応じて、主要被写体の変数x、x、x,・・・を解析し、主要被写体のスコア関数の値がより大きくなるように、適切な重み係数w,w.w,...を予め選択或いは学習等によって決定しておく。このように重み係数を適宜調節することによって、様々な撮影状況において主要被写体を推定することが可能となる。勿論、スコア関数の表現は(1)式に限定されるものではない。
(第2の実施形態)
次に、第2の実施の形態について説明する。図4には、デジタルカメラ10の制御部1が第2の実施形態に係る主要被写体推定装置として機能する場合の機能ブロック図が示されている。
S (x 1 , x 2 , x 3 ,... J = w 1 .x 1 + w 2 .x 2 + w 3 .x 3 +. (1)
Here, the variables x 1 , x 2 , x 3 . w 1 , w 2 , w 3 ,. . . , Each variable x 1, x 2, x 3 , a-off weight coefficients, these weighting coefficients w 1, w 2. w 3 ,... can take positive and negative values and 0 values. For example, the weighting factor of the size L is positive. That is, as the subject size L increases, the score value (probability) that is the main subject increases. Conversely, the weighting coefficient of the distance | P−P 0 | with respect to the position P 0 (the center position of the captured image) is negative. That is, as the distance increases, the score value (probability) that is the main subject decreases. In particular, for a variable that is not used for main subject estimation, the weighting coefficient may be set to zero.
Depending on various shooting situations and scenes, variables x 1 , x 2 , x 3 ,... Of the main subject are analyzed, and an appropriate weighting factor w 1 is set so that the score function value of the main subject becomes larger. , W 2 . w 3 ,. . . Are determined in advance by selection or learning. In this way, by appropriately adjusting the weighting factor, it is possible to estimate the main subject in various shooting situations. Of course, the expression of the score function is not limited to the expression (1).
(Second Embodiment)
Next, a second embodiment will be described. FIG. 4 shows a functional block diagram when the control unit 1 of the digital camera 10 functions as the main subject estimation apparatus according to the second embodiment.

図4に示すように、制御部1は、図3に示したスコア関数メモリ22及び判定条件メモリ26の代わりに、所定範囲設定部25と、判定条件設定部27とを備えている。所定範囲設定部25は、撮像画像内のうちある特定の領域である所定範囲を設定する。また、判定条件設定部27は、着目する被写体が主要被写体であるか否かを判定するための判定条件を、閾値メモリ30に記憶された閾値から設定する。なお、図4において第1の実施形態と同様の機能を有する構成要素に関しては、図3と同一の参照番号を付与し、それらの詳細な説明を省略する。なお、所定範囲設定部25及び判定条件設定部27は、制御部1のROM1cやフラッシュメモリ1d等に記録されたプログラムをCPU1aが実行することによって実現することができる。
所定範囲設定部25により設定される所定範囲は、主要被写体が存在する確率が高いと予想される撮像画像内の特定領域(一例として後述する図13の撮像画像55a、b内の所定範囲51a、b参照)である。当該所定範囲は、例えば、固定位置(例えば撮像画像の中心位置)を中心として所定の大きさを持つ所定形状の領域として設定される。この例の場合、所定範囲設定部25は、例えば、当該所定範囲を記憶したROM1c(図2)の特定メモリ領域に記憶されている固定位置の位置情報、所定範囲の形状及び大きさの情報に基づいて所定範囲を設定する。また、当該所定範囲の中心位置が先に主要被写体とされた被写体の位置又は撮影者が指定した位置に合致するように、当該所定範囲の中心位置を調整可能としてもよい。さらに、当該所定範囲が、撮影者の操作指令により、その大きさを調整されるようにしてもよい。また、所定範囲は、図13の所定範囲51a、51bのような矩形の他、円や楕円など、主要被写体の存在確率が高い領域を表すことができる他の形状を持つことができる。
第2の実施形態の主要被写体推定部31は、所定範囲及び判定条件に基づいて、撮像画像内に存在する被写体の中から主要被写体を推定する。
As illustrated in FIG. 4, the control unit 1 includes a predetermined range setting unit 25 and a determination condition setting unit 27 instead of the score function memory 22 and the determination condition memory 26 illustrated in FIG. 3. The predetermined range setting unit 25 sets a predetermined range that is a specific area in the captured image. The determination condition setting unit 27 sets a determination condition for determining whether or not the subject of interest is the main subject from the threshold values stored in the threshold memory 30. In FIG. 4, components having the same functions as those in the first embodiment are given the same reference numerals as those in FIG. 3, and detailed descriptions thereof are omitted. The predetermined range setting unit 25 and the determination condition setting unit 27 can be realized by the CPU 1a executing a program recorded in the ROM 1c, the flash memory 1d, or the like of the control unit 1.
The predetermined range set by the predetermined range setting unit 25 is a specific area in a captured image that is expected to have a high probability that a main subject exists (as an example, a predetermined range 51a in a captured image 55a, b in FIG. b). The predetermined range is set, for example, as a region of a predetermined shape having a predetermined size around a fixed position (for example, the center position of the captured image). In the case of this example, the predetermined range setting unit 25 includes, for example, the position information of the fixed position and the information on the shape and size of the predetermined range stored in the specific memory area of the ROM 1c (FIG. 2) that stores the predetermined range. A predetermined range is set based on this. In addition, the center position of the predetermined range may be adjustable so that the center position of the predetermined range matches the position of the subject that is the main subject first or the position specified by the photographer. Further, the size of the predetermined range may be adjusted by an operation command from the photographer. In addition to the rectangles such as the predetermined ranges 51a and 51b in FIG. 13, the predetermined range can have other shapes that can represent a region where the main subject exists at a high probability, such as a circle or an ellipse.
The main subject estimation unit 31 of the second embodiment estimates a main subject from subjects existing in the captured image based on a predetermined range and determination conditions.

次に、本発明の第2の実施形態に係る主要被写体推定装置の処理の流れを、図9及び図10を用いて説明する。図9及び図10は、制御部1の処理手順の一例を示すフローチャートである。当該処理手順のプログラムは、制御部1に備えられた、図1に示すRAM1b、ROM1c,或いは、フラッシュメモリ1dに記録されている。   Next, a processing flow of the main subject estimation apparatus according to the second embodiment of the present invention will be described with reference to FIGS. 9 and 10. 9 and 10 are flowcharts illustrating an example of a processing procedure of the control unit 1. The program of the processing procedure is recorded in the RAM 1b, ROM 1c, or flash memory 1d shown in FIG.

図9に示すように、画像取得部21が、時間的に最初に入力される撮像画像f(k=1)、即ち撮像画像fを取得する(ステップ200)。次に、被写体検出部23が、撮像画像f内の被写体Oiを検出する(i=1,2,・(ステップ201)。 As shown in FIG. 9, the image acquisition unit 21 acquires a captured image f k (k = 1) that is input first in time, that is, a captured image f 1 (step 200). Then, subject detection unit 23 detects the object Oi in the captured image f 1 (i = 1,2, · ( step 201).

次に、制御部1は、撮像画像fにおいて検出された被写体の中から、特定の被写体(この例では、Oを主要被写体とする)を主要被写体として指定する(ステップ202)。主要被写体の指定方法に関しては、第1の実施形態と同様である。 Next, the control unit 1 designates a specific subject (in this example, O 1 is a main subject) as a main subject from the subjects detected in the captured image f 1 (step 202). The method for specifying the main subject is the same as in the first embodiment.

次に、画像取得部21は、画像番号kを1つ増分し、次の撮像画像fを取得する(ステップ204)。次に、被写体検出部23が、撮像画像fk内の被写体Oiを継続的に検出する(i=1,2,・(ステップ206)。撮像画像内の被写体を継続的に検出する方法に関しては、第1の実施形態と同様である。 Next, the image acquisition unit 21 increments the image number k by 1, and acquires the next captured image f k (step 204). Next, the subject detection unit 23 continuously detects the subject Oi in the captured image f k (i = 1, 2, (step 206). Regarding a method for continuously detecting the subject in the captured image, This is the same as in the first embodiment.

次に、被写体情報検出部24が、撮像画像f内の被写体O(i=1,2,..)の被写体情報を検出する(ステップ208)。被写体情報検出部24は、被写体情報として、少なくとも被写体の大きさL(O)又は大きさに関する値を検出する。また被写体情報検出部24は、被写体の大きさ以外に或いは大きさに代えて、被写体の位置P(O)又は位置に関する値を検出する。 Next, the subject information detection unit 24 detects subject information of the subject O i (i = 1, 2,...) In the captured image f k (step 208). The subject information detection unit 24 detects at least a size L 1 (O i ) or a value related to the size as subject information. The subject information detection unit 24 detects a position P 1 (O i ) or a value related to the position other than the size of the subject or instead of the size.

次に、主要被写体推定部31は、L(Oi) 又は位置P(O)(i=1,2,・ に基づいて撮像画像fkにおける主要被写体Oを推定する(ステップ210)。撮像画像fにおける主要被写体Oを推定した後、制御部1は、ステップ204に戻り、次に入力された撮像画像fk+1について、同様の処理を実行することにより、撮像画像fk+1における主要被写体Oを推定する。 Next, the main subject estimation unit 31 estimates the main subject O m in the captured image f k based on L k (O i ) or position P 1 (O i ) (i = 1, 2,... (Step 210). After estimating the main subject O m in the captured image f k , the control unit 1 returns to Step 204 and performs the same processing on the next input captured image f k + 1 to thereby capture the captured image f k. Estimate the main subject O m at +1 .

次にステップ210の工程の処理の流れを図10を用いて説明する。   Next, the process flow of step 210 will be described with reference to FIG.

図10に示すように、判定条件設定部27は、閾値メモリ30から閾値ThA及びThB(ThA<ThB)を読み込む(ステップ250)。判定条件設定部27は、閾値ThA及びThBを主要被写体推定部31に伝達する。   As shown in FIG. 10, the determination condition setting unit 27 reads threshold values ThA and ThB (ThA <ThB) from the threshold memory 30 (step 250). The determination condition setting unit 27 transmits the threshold values ThA and ThB to the main subject estimation unit 31.

次に、主要被写体推定部31は、現時点で主要被写体であるとされている被写体O(1回目のループでは、O=O)の大きさL(O)が閾値ThA以下であるか否かを判定する(ステップ252)。L(O)が閾値ThAより大きい場合(ステップ252の否定判定)、主要被写体推定部31は、主要被写体を維持するべきである(O=O)と判断し、本ルーチンをリターンして、図9のメインルーチンに処理を戻す。この場合、追尾制御部33は、直前の撮像画像のときと同じ被写体を主要被写体Oとして追尾する。
一方、L(O)が閾値ThA以下である場合(ステップ252の肯定判定)、主要被写体推定部31は、O以外の全ての被写体の大きさL(O)のうち最大の大きさLmaxを与える第2の被写体Oを検索する(ステップ254)。
Next, the main subject estimation unit 31 has the size L (O m ) of the subject O m (O m = O 1 in the first loop) that is assumed to be the main subject at present is equal to or less than the threshold ThA. Whether or not (step 252). If L (O m ) is larger than the threshold ThA (negative determination in step 252), the main subject estimation unit 31 determines that the main subject should be maintained (O m = O 1 ), and returns this routine. Then, the process returns to the main routine of FIG. In this case, the tracking controller 33 tracks the same object as in the immediately preceding captured image as the main subject O m.
On the other hand, when L (O m ) is equal to or smaller than the threshold value ThA (positive determination in step 252), the main subject estimation unit 31 has the largest size among the sizes L (O j ) of all subjects other than O m. searching for a second object O n giving L max (step 254).

第2の被写体Oが検索されると、主要被写体推定部31は、第2の被写体Oの位置P(O)が所定範囲設定部25により設定された所定範囲内にあるか否かを判定する(ステップ255)。第2の被写体Oの位置P(O)が所定範囲内にない場合(ステップ255の否定判定)、主要被写体推定部31は、第2の被写体Oが主要被写体ではないとみなし、本ルーチンをリターンして、図9のメインルーチンに処理を戻す。この場合、追尾制御部33は、直前の撮像画像のときと同じ被写体を主要被写体Oとして追尾する。
一方、第2の被写体Oの位置P(O)が所定範囲内にある場合(ステップ255の肯定判定)、主要被写体推定部31は、第2の被写体の大きさL(O)がThB以上であるか否かを判定する(ステップ256)。L(O)がThBより小さい場合(ステップ256の否定判定)、主要被写体推定部31は、主要被写体を維持するべきである(O=O)と判断し、本ルーチンをリターンして、図9のメインルーチンに処理を戻す。この場合、追尾制御部33は、直前の撮像画像のときと同じ被写体を主要被写体Oとして追尾する。
When the second object O n is retrieved, the main subject estimation unit 31, whether or not the position P of the second object O n (O n) is within a predetermined range set by a predetermined range setting unit 25 Is determined (step 255). When the position P of the second object O n (O n) is not within a predetermined range (negative determination in step 255), the main subject estimating unit 31, regarded as the second object O n is not the main subject, the The routine is returned to return to the main routine of FIG. In this case, the tracking controller 33 tracks the same object as in the immediately preceding captured image as the main subject O m.
On the other hand, when the position P of the second object O n (O n) is within a predetermined range (affirmative determination in Step 255), the main subject estimating unit 31, the size of the second object L (O n) is It is determined whether it is equal to or greater than ThB (step 256). When L (O n ) is smaller than ThB (negative determination at step 256), the main subject estimation unit 31 determines that the main subject should be maintained (O m = O 1 ), and returns this routine. Then, the process returns to the main routine of FIG. In this case, the tracking controller 33 tracks the same object as in the immediately preceding captured image as the main subject O m.

L(O)がThB以上の場合(ステップ256の肯定判定)、主要被写体推定部31は、第2の被写体Oを主要被写体とする(ステップ258)。すなわち、主要被写体番号m=nとする。その後、主要被写体推定部31は本ルーチンをリターンして、図9のメインルーチンに処理を戻す。この場合、追尾制御部33は、直前の撮像画像のときとは異なる被写体Oを主要被写体として追尾する。図9のメインルーチンでは、制御部1は、次の撮像画像について同様の処理を繰り返す。
第2の実施形態によれば、先に主要被写体と指定(又は推定)された第1の被写体の大きさLがThA以下となり、かつ、第1の被写体以外で主要被写体である確率が高いと考えられる第2の被写体が撮像画面内の所定範囲内に存在し、その大きさLがThB以上となった場合に、制御部1は、第2の被写体を主要被写体であると推定する。閾値ThBは、閾値ThAよりも大きいため、先に主要被写体と推定された第1の被写体は、主要被写体との推定を維持しやすく、第2の被写体は第1の被写体と比べて主要被写体であると推定されにくくなる。すなわち、主要被写体推定は、被写体の大きさの評価に関してヒステリシス特性を有している。
これによって、主要被写体を切り替えるべきでない何らかの原因により被写体のスコア値等が急激に変動する状況(例えば、偶々非常に大きい第2の被写体が撮像画像内に入り込んだ時など)であっても、安定して主要被写体を推定し続けることが可能となる。
If L (O n) is equal to or greater than ThB (affirmative determination in step 256), the main subject estimating unit 31, the second object O n the main subject (step 258). That is, the main subject number m = n. Thereafter, the main subject estimation unit 31 returns this routine and returns to the main routine of FIG. In this case, the tracking control unit 33 tracks as the main subject different object O n and the time of the previous captured image. In the main routine of FIG. 9, the control unit 1 repeats the same processing for the next captured image.
According to the second embodiment, when the size L of the first subject previously designated (or estimated) as the main subject is equal to or less than ThA, and there is a high probability of being the main subject other than the first subject. When a possible second subject exists within a predetermined range in the imaging screen and the size L is equal to or greater than ThB, the control unit 1 estimates that the second subject is the main subject. Since the threshold ThB is larger than the threshold ThA, the first subject previously estimated as the main subject can easily maintain the estimation as the main subject, and the second subject is the main subject compared to the first subject. It becomes difficult to be estimated. That is, the main subject estimation has a hysteresis characteristic with respect to the evaluation of the subject size.
As a result, even if the score value of the subject fluctuates abruptly for some reason that the main subject should not be switched (for example, when a very large second subject accidentally enters the captured image), it is stable. Thus, it is possible to continue to estimate the main subject.

図8の例では、撮像画像fにおいて被写体Oが主要被写体と指定若しくは自動検出されている。その後、撮像画像fにおいて、撮像画像fと比べて、被写体Oの大きさL(O)が小さくなり、被写体Oの大きさL(O)が大きくなり、被写体Oの大きさL(O)が更に小さくなる。ここで、L(O)がThA以下となり、L(O)がThB以上となった場合には、主要被写体は、OからOに切り替わったと判断する。
また、第2の実施形態によれば、撮像画像内での被写体の大きさに基づいて主要被写体を推定するため、撮影者がデジタルカメラ10をパンニング若しくはチルティングしていなくとも、或いは、その操作の途中であったとしても、主要被写体を正確に推定することができる。
In the example of FIG. 8, the subject O 1 is designated or automatically detected as the main subject in the captured image f 1 . Thereafter, the captured image f k, as compared with the captured image f 1, size L k (O 1) is reduced in the subject O 1, size L k (O 2) of the object O 2 is increased, the object O 3 of size L k (O 3) is further reduced. Here, when L k (O 1 ) is equal to or less than ThA and L k (O 2 ) is equal to or greater than ThB, it is determined that the main subject has been switched from O 1 to O 2 .
Further, according to the second embodiment, since the main subject is estimated based on the size of the subject in the captured image, the photographer does not pan or tilt the digital camera 10, or the operation thereof Even in the middle of this, the main subject can be accurately estimated.

さらに第2の実施形態では、第2の被写体に対して、所定範囲内にあるか否かの判定も行う(図10のステップ255)。このように第2の実施形態では、被写体の大きさだけでなく被写体の位置の情報も、主要被写体推定に用いることを可能にしたため、より正確な主要被写体の推定が可能となる。   Further, in the second embodiment, it is also determined whether or not the second subject is within a predetermined range (step 255 in FIG. 10). As described above, in the second embodiment, not only the size of the subject but also the information on the position of the subject can be used for the main subject estimation, so that the main subject can be estimated more accurately.

なお、第2の実施形態において、所定範囲設定部25を省略した態様も可能である。この場合、図10のステップ255も省略される。   In the second embodiment, a mode in which the predetermined range setting unit 25 is omitted is also possible. In this case, step 255 in FIG. 10 is also omitted.

第2の実施形態において、所定範囲設定部25を省略した態様は、第1の実施形態において、スコア関数Sを被写体の大きさLのみの関数とした態様に対応する。この態様の一例は、スコア関数S(L)=w・L(wは正の定数)とし、更に、解除条件JをL≦ ThAとし、設定条件JをL≧ ThBとしたものである。 In the second embodiment, an aspect in which the predetermined range setting unit 25 is omitted corresponds to an aspect in which the score function S is a function of only the subject size L in the first embodiment. An example of this mode is that the score function S (L) = w · L (w is a positive constant), the release condition J 1 is L ≦ ThA, and the setting condition J 2 is L ≧ ThB. .

第2の実施形態において、所定範囲設定部25を追加した態様は、第1の実施形態において、スコア関数Sを被写体の大きさLと位置Pとの関数としたものに対応する。この態様の一例は、位置Pが所定範囲内にあるときスコア関数S(L、P)=w・L(wは正の定数)とし、位置Pが所定範囲外にあるときスコア関数S(L、P)=0としたものである。
(第3の実施形態)
次に、第3の実施の形態について説明する。第2の実施形態が被写体の大きさに基づいて主要被写体を推定したのに対して、第3の実施形態は、被写体の位置に基づいて主要被写体を推定する。第3の実施形態の機能ブロック図は、図4において、所定範囲設定部25が省略され、閾値メモリ30が閾値ThA,ThBの代わりに後述する閾領域(第1の領域RA、第2の領域)の情報を記憶するものである。
In the second embodiment, an aspect in which the predetermined range setting unit 25 is added corresponds to the score function S as a function of the subject size L and the position P in the first embodiment. An example of this aspect is that the score function S (L, P) = w · L (w is a positive constant) when the position P is within the predetermined range, and the score function S (L (L) when the position P is outside the predetermined range. , P) = 0.
(Third embodiment)
Next, a third embodiment will be described. The second embodiment estimates the main subject based on the size of the subject, whereas the third embodiment estimates the main subject based on the position of the subject. In the functional block diagram of the third embodiment, in FIG. 4, the predetermined range setting unit 25 is omitted, and the threshold memory 30 is replaced with threshold areas (first area RA, second area), which will be described later, instead of the threshold values ThA and ThB. ) Information.

次に、本発明の第3の実施形態に係る主要被写体推定装置の処理の流れを、図9及び図11を用いて説明する。図9及び図11は、制御部1の処理手順の一例を示すフローチャートである。当該処理手順のプログラムは、制御部1に備えられた、図1に示すRAM1b、ROM1c,或いは、フラッシュメモリ1dに記録されている。   Next, the processing flow of the main subject estimation apparatus according to the third embodiment of the present invention will be described with reference to FIGS. 9 and 11 are flowcharts illustrating an example of a processing procedure of the control unit 1. The program of the processing procedure is recorded in the RAM 1b, ROM 1c, or flash memory 1d shown in FIG.

第3の実施形態では、図9に示すステップ200〜206を第2の実施形態に関して上述した通り実行する。次にステップ208において、撮像画像f内の被写体O(i=1,2,..)の被写体情報として被写体Oの位置P(O)を検出する。次に、ステップ210において、主要被写体推定部31は、被写体Oの位置P(O)(i=1,2,・ に基づいて撮像画像fkにおける主要被写体Oを推定する。 In the third embodiment, steps 200 to 206 shown in FIG. 9 are performed as described above with respect to the second embodiment. Next, at step 208, the position P 1 (O i ) of the subject O i is detected as subject information of the subject O i (i = 1, 2,...) In the captured image f k . Next, in step 210, the main subject estimation unit 31 estimates the main subject O m in the captured image f k based on the position P 1 (O i ) (i = 1, 2, ... ) Of the subject O i .

次にステップ210の工程の処理の流れを図11を用いて説明する。   Next, the process flow of step 210 will be described with reference to FIG.

図11に示すように、判定条件設定部27は、閾値メモリ30から、撮像画像内の第1の領域RA及び第2の領域RBを画定するため必要な情報を読み込む(ステップ300)。ここで、第1の領域RAは第2の領域RBを包含している(後述する図12参照)。また、ステップ300において、判定条件設定部27は、領域RA、RB内の代表位置Pの座標値を読み込んでもよい。位置Pは、主要被写体が存在する確率の高い位置であり、撮像画像の中心位置、或いは、主要被写体の位置として最初に指定された位置などである(後述する図12参照)。領域RA、RBは、この位置を中心として画定されてもよい。判定条件設定部27は、領域RA、RB、位置P0の情報を主要被写体推定部31に伝達する。 As shown in FIG. 11, the determination condition setting unit 27 reads information necessary for demarcating the first area RA and the second area RB in the captured image from the threshold memory 30 (step 300). Here, the first region RA includes the second region RB (see FIG. 12 described later). Further, in step 300, the determination condition setting unit 27, the region RA, may read the coordinate values of the representative position P 0 in the RB. The position P 0 is a position with a high probability that the main subject exists, and is the center position of the captured image or the position designated as the position of the main subject first (see FIG. 12 described later). The regions RA and RB may be defined around this position. The determination condition setting unit 27 transmits information on the areas RA, RB, and position P0 to the main subject estimation unit 31.

次に、主要被写体推定部31は、現時点で主要被写体であるとされている被写体O(1回目のループでは、O=O)の位置P(O)が第1の領域RA内の位置であるか否かを判定する(ステップ302)。P(O)が第1の領域RA内の位置である場合(ステップ302の肯定判定)、主要被写体推定部31は、主要被写体を維持するべきである(O=O)と判断し、本ルーチンをリターンして、図9のメインルーチンに処理を戻す。この場合、追尾制御部33は、直前の撮像画像のときと同じ被写体を主要被写体Oとして追尾する。
一方、位置P(O)が第1の領域RA内の位置ではない場合(ステップ302の否定判定)、主要被写体推定部31は、O以外の全ての被写体の位置P(O)のうち位置Pに最も近い距離にある第2の被写体Oを検索する(ステップ304)。
Next, the main subject estimation unit 31 determines that the position P (O m ) of the subject O m (O m = O 1 in the first loop) that is currently regarded as the main subject is within the first area RA. It is determined whether or not the position is (step 302). When P (O m ) is a position in the first region RA (Yes in Step 302), the main subject estimation unit 31 determines that the main subject should be maintained (O m = O 1 ). This routine is then returned to return to the main routine of FIG. In this case, the tracking controller 33 tracks the same object as in the immediately preceding captured image as the main subject O m.
On the other hand, when the position P (O m ) is not a position in the first region RA (No determination in step 302), the main subject estimation unit 31 sets the positions P (O j ) of all subjects other than O m . searching for a second object O n in closest distance among the position P 0 (step 304).

第2の被写体Oが検索されると、主要被写体推定部31は、第2の被写体Oの位置P(O)が第2の領域RB内の位置であるか否かを判定する(ステップ306)。第2の被写体Oの位置P(O)が第2の領域RB内の位置ではない場合(ステップ306の否定判定)、主要被写体推定部31は、第2の被写体Oが主要被写体ではないとみなし、本ルーチンをリターンして、図9のメインルーチンに処理を戻す。この場合、追尾制御部33は、直前の撮像画像のときと同じ被写体を主要被写体Oとして追尾する。
一方、第2の被写体Oの位置P(O)が第2の領域RB内の位置である場合(ステップ306の肯定判定)、主要被写体推定部31は、第2の被写体Oを主要被写体とする(ステップ308)。すなわち、主要被写体番号m=nとする。その後、主要被写体推定部31は本ルーチンをリターンして、図9のメインルーチンに処理を戻す。この場合、追尾制御部33は、直前の撮像画像のときとは異なる被写体Oを主要被写体として追尾する。図9のメインルーチンでは、制御部1は、次の撮像画像について同様の処理を繰り返す。
次に図12を用いて第3の実施形態を説明する。
図12(A)は、撮像画像55において、主要被写体が存在する確率の高い第1の領域RA内に第1の被写体81が存在し、第2の被写体82が、第1の領域RAの領域外に存在している状況を示している。このとき、第1の被写体81が主要被写体と認識されている。次に、図12(B)は、第1の被写体81が第1の領域RAの領域外に移動し、第2の被写体82が第1の領域RA内に移動する状況を示している。この場合、第1の被写体が第1の領域RAの領域外に存在し、第2の被写体82が第1の領域RA内に存在しているのにも関わらず、第2の被写体82は主要被写体とはされず、依然として第1の被写体が主要被写体とされている。最後に図12(C)は、第1の被写体81が第1の領域RAの領域外に存在したままで、第2の被写体82が第2の領域RB内に移動する状況を示している。この場合、第2の被写体82が主要被写体として推定される。
第3の実施形態によれば、先に主要被写体と指定(又は推定)された第1の被写体81の位置が第1のRAの領域外の位置となり、かつ、第1の被写体以外で主要被写体である確率が高いと考えられる第2の被写体82の位置が、第1の領域RA内に含まれる第2の領域RB内の位置となった場合に、制御部1は、第2の被写体を主要被写体であると推定する。第2の領域RBは第1の領域RA内に含まれるため、先に主要被写体と推定された第1の被写体は、主要被写体との推定を維持しやすく、第2の被写体は第1の被写体と比べて主要被写体であると推定されにくくなる。すなわち、主要被写体推定は、ヒステリシス特性を有している。
これによって、主要被写体を切り替えるべきでない何らかの原因により被写体のスコア値等が急激に変動する状況(例えば、偶々ある被写体が撮像画像内の主要被写体である確率の高い位置へと入り込んだ時など)であっても、安定して主要被写体を推定し続けることが可能となる。
(第4の実施形態)
次に、第4の実施形態について説明する。撮像画像内の被写体の大きさは、被写体の実際の大きさ、撮影状況、被写体の種類や形状、デジタルカメラから被写体までの撮影距離、撮影レンズの焦点距離に応じて変化する。例えば、人物の顔と、飛行機等の乗り物とでは、実際の大きさや形状の違い等に起因して、撮影画像内で検出された大きさも様々に異なり得る。また同じ人物撮影でも、背景を広く取り入れて人物を撮影する場合と、人物を大きくクローズアップする場合とでは、検出する顔領域の大きさは、後者の方が前者よりも大きくなる。一方、第2の実施形態で用いられる閾値は、メモリに記憶された固定値である。
本発明の第4の実施形態は、撮像画像内の被写体の大きさのばらつきに対応するため、固定値としての閾値を最初に主要被写体とされた被写体の大きさに応じて正規化するものである。第4の実施形態の構成は、図4に示された第2の実施形態の構成と実質的に同様である。また、第4の実施形態の処理の流れは、図9及び図10に示されている第2の実施形態と実質的に同様である。第4の実施形態の以下の説明において、第2の実施形態と同様の構成要素及び処理に関しては、詳細な説明を省略する。
本発明の第4の実施形態は、図4の判定条件設定部27が、図10のステップ252、256で使用される閾値ThA、ThBを、主要被写体の大きさに応じて正規化する。この正規化の方法は、例えば以下の通りとなる。
ThAnormal(正規化された閾値ThA) → ThA・L(O
ThBnormal(正規化された閾値ThB) → ThB・L(O
ここで、Lは、現在の主要被写体が初めて主要被写体と推定されたときの被写体の大きさである。閾値メモリ30に記憶されているThA、ThBは、大きさの次元を持つ値としてではなく、無次元の値として与えられる。上記正規化の結果、ThAnormal及びThBnormalは、被写体の大きさと比較され得る大きさの次元を持つに至る。
第4の実施形態の正規化方法によれば、図10のステップ252で、主要被写体推定部31が、現在の主要被写体の大きさが、その最初の大きさに応じて正規化された閾値ThA以下であると判定すれば、ステップ254に進む。また、図10のステップ256で、主要被写体推定部31が、主要被写体の候補である第2の被写体の大きさが、現在の主要被写体の最初の大きさに応じて正規化された閾値ThB以上であると判定すれば、ステップ258に進む。
第4の実施形態の他の例では、閾値を正規化する代わりに、主要被写体推定部31が、検出された被写体の大きさを次の通り、L(O)で正規化してもよい。
L(Onormal(正規化された第1の被写体の大きさ)→L(O)/L(O
L(Onormal(正規化された第2の被写体の大きさ)→L(O)/L(O
閾値メモリ30に記憶されているThA、ThBは、大きさの次元を持つ値としてではなく、無次元の値として与えられ、これらと比較されるL(Onormal及びL(Onormalも無次元量となる。
第4の実施形態のこの正規化方法によれば、図10のステップ252で、主要被写体推定部31が、現在の主要被写体がその最初の大きさからどのくらいの比率で小さくなったかを監視し、当該比率がThA以下であると判定すれば、ステップ254に進む。また、図10のステップ256で、主要被写体推定部31が、主要被写体の候補である第2の被写体が現在の主要被写体の最初の大きさと比べてどのくらいの比率で大きくなったかを監視し、当該比率がThB以上であると判定すれば、ステップ258に進む。
例えば、最初の撮影では、背景を広く撮影範囲に取り入れた状態で複数の人物の中から主要被写体推定を行っていたとする。このとき、人物の大きさは小さいため、主要被写体の大きさに応じて上述のように正規化された閾値は、比較的小さく設定される。本実施形態では、各人物の大きさが小さい状態において、比較的小さい閾値を用いるため、主要被写体推定を的確に行うことができる。次に複数人物の中から少人数に絞ってクローズアップしたい場合、焦点距離を大きくするか或いは人物に近づいたりする。この場合、撮像画像内での人物の大きさは大きくなる。本実施形態では、大きくなった被写体の大きさに応じて閾値も大きく正規化されるため、被写体が大きくなった状況においても、主要被写体推定を的確に行うことができる。
また、焦点距離や撮影距離が異なる場合だけではなく、被写体の種類によっても、被写体の大きさは異なってくる。例えば飛行機等の乗り物を撮影する場合、被写体の輪郭抽出のアルゴリズムにもよるが、人物の顔領域よりも被写体の大きさは大きくなり得る。この場合においても、本実施形態は、その大きさに応じて閾値を正規化するため、被写体の種類に依らず、的確な主要被写体の推定を行うことが可能となる。
なお、上記例では、L(O)で閾値又は被写体の大きさを正規化したが、本発明は、この例に限定されない。例えば、他の時点の被写体の大きさ等を用いることも可能である。
以上の通り第4の実施形態によれば、閾値又は被写体の大きさを、被写体の実際の大きさ、デジタルカメラから被写体までの撮影距離、撮影レンズの焦点距離等に応じて変化するL(O)で正規化するため、より正確な主要被写体推定が可能となる。
(第5の実施形態)
次に第5の実施形態について説明する。図5は、デジタルカメラ10の制御部1が第5の実施形態に係る主要被写体推定装置として機能する場合の機能ブロック図である。なお、図5において第2及び第4の実施形態と同様の機能を有する構成要素に関しては、図4と同一の参照番号を付与し、それらの詳細な説明を省略する。第5の実施形態の処理の流れは、図9及び図10に示されている第2の実施形態と実質的に同様であるので、第5の実施形態の以下の説明において、第2の実施形態と同様の処理に関しては、詳細な説明を省略し、異なる部分のみを説明する。
When the second object O n is retrieved, the main subject estimating unit 31, the position P of the second object O n (O n) determines whether the position of the second region RB ( Step 306). When the position P of the second object O n (O n) is not located in the second region RB (negative determination in step 306), the main subject estimating unit 31, the second object O n is the main subject The routine is returned to the main routine shown in FIG. In this case, the tracking controller 33 tracks the same object as in the immediately preceding captured image as the main subject O m.
On the other hand, when the position P of the second object O n (O n) is a position in the second region RB (affirmative determination in Step 306), the main subject estimating unit 31, the main the second object O n A subject is set (step 308). That is, the main subject number m = n. Thereafter, the main subject estimation unit 31 returns this routine and returns to the main routine of FIG. In this case, the tracking control unit 33 tracks as the main subject different object O n and the time of the previous captured image. In the main routine of FIG. 9, the control unit 1 repeats the same processing for the next captured image.
Next, a third embodiment will be described with reference to FIG.
In FIG. 12A, in the captured image 55, the first subject 81 exists in the first region RA where the main subject is likely to exist, and the second subject 82 is the region of the first region RA. It shows the situation that exists outside. At this time, the first subject 81 is recognized as the main subject. Next, FIG. 12B shows a situation in which the first subject 81 moves out of the first region RA and the second subject 82 moves into the first region RA. In this case, the second subject 82 is the main subject in spite of the fact that the first subject exists outside the first region RA and the second subject 82 exists in the first region RA. The first subject is still the main subject, not the subject. Finally, FIG. 12C shows a situation in which the second subject 82 moves into the second region RB while the first subject 81 remains outside the region of the first region RA. In this case, the second subject 82 is estimated as the main subject.
According to the third embodiment, the position of the first subject 81 previously designated (or estimated) as the main subject is a position outside the first RA area, and the main subject is other than the first subject. When the position of the second subject 82, which is considered to have a high probability, is the position in the second region RB included in the first region RA, the control unit 1 selects the second subject. Estimated to be the main subject. Since the second region RB is included in the first region RA, the first subject previously estimated as the main subject can easily maintain the estimation as the main subject, and the second subject is the first subject. Is less likely to be estimated as the main subject. That is, the main subject estimation has a hysteresis characteristic.
As a result, in a situation where the score value of the subject fluctuates rapidly due to some reason that the main subject should not be switched (for example, when a certain subject accidentally enters a position with a high probability of being the main subject in the captured image). Even in this case, it is possible to stably estimate the main subject.
(Fourth embodiment)
Next, a fourth embodiment will be described. The size of the subject in the captured image varies depending on the actual size of the subject, the shooting situation, the type and shape of the subject, the shooting distance from the digital camera to the subject, and the focal length of the shooting lens. For example, a person's face and a vehicle such as an airplane may have different sizes detected in the captured image due to differences in actual size and shape. In the same person shooting, the size of the face area to be detected is larger in the latter than in the former when shooting a person with a wide background and when the person is greatly close-up. On the other hand, the threshold value used in the second embodiment is a fixed value stored in the memory.
The fourth embodiment of the present invention normalizes the threshold value as a fixed value in accordance with the size of the subject that is initially set as the main subject in order to cope with variations in the size of the subject in the captured image. is there. The configuration of the fourth embodiment is substantially the same as the configuration of the second embodiment shown in FIG. The processing flow of the fourth embodiment is substantially the same as that of the second embodiment shown in FIGS. In the following description of the fourth embodiment, detailed description of the same components and processes as those of the second embodiment will be omitted.
In the fourth embodiment of the present invention, the determination condition setting unit 27 in FIG. 4 normalizes the thresholds ThA and ThB used in steps 252 and 256 in FIG. 10 according to the size of the main subject. For example, the normalization method is as follows.
ThA normal (normalized threshold ThA) → ThA · L q (O m )
ThB normal (normalized threshold ThB) → ThB · L q (O m )
Here, L q is the size of the subject when the current main subject is estimated as the main subject for the first time. ThA and ThB stored in the threshold memory 30 are given as dimensionless values, not as values having a dimension of magnitude. As a result of the normalization, ThA normal and ThB normal have dimensions that can be compared with the size of the subject.
According to the normalization method of the fourth embodiment, in step 252 of FIG. 10, the main subject estimation unit 31 determines that the current main subject size is the threshold value ThA normalized according to the initial size. If it is determined that the following is true, the process proceeds to step 254. In step 256 of FIG. 10, the main subject estimation unit 31 determines that the size of the second subject that is a candidate for the main subject is equal to or larger than the threshold ThB normalized according to the initial size of the current main subject. If it is determined, the process proceeds to step 258.
In another example of the fourth embodiment, instead of normalizing the threshold value, the main subject estimation unit 31 may normalize the size of the detected subject with L q (O m ) as follows. .
L (O m ) normal (normalized first subject size) → L (O m ) / L q (O m )
L (O n ) normal (normalized second subject size) → L (O n ) / L q (O m )
The ThA and ThB stored in the threshold memory 30 are given as dimensionless values, not as values having a dimension of magnitude, and L (O m ) normal and L (O n ) normal compared with these values. Is also a dimensionless quantity.
According to this normalization method of the fourth embodiment, at step 252 in FIG. 10, the main subject estimation unit 31 monitors how much the current main subject has become smaller from its initial size, If it is determined that the ratio is equal to or less than ThA, the process proceeds to step 254. In step 256 of FIG. 10, the main subject estimation unit 31 monitors how much the second subject, which is a candidate for the main subject, is larger than the initial size of the current main subject, If it is determined that the ratio is equal to or greater than ThB, the process proceeds to step 258.
For example, in the first shooting, it is assumed that the main subject is estimated from a plurality of persons with the background widely included in the shooting range. At this time, since the size of the person is small, the threshold value normalized as described above according to the size of the main subject is set to be relatively small. In the present embodiment, since a relatively small threshold is used in a state where each person is small, main subject estimation can be performed accurately. Next, when it is desired to focus on a small number of people from a plurality of persons, the focal length is increased or the person is approached. In this case, the size of the person in the captured image increases. In this embodiment, since the threshold value is greatly normalized according to the size of the enlarged subject, the main subject can be accurately estimated even when the subject is large.
In addition, the size of the subject varies depending not only on the focal length and shooting distance but also on the type of subject. For example, when shooting a vehicle such as an airplane, the size of the subject can be larger than the face area of the person, depending on the algorithm for extracting the contour of the subject. Even in this case, the present embodiment normalizes the threshold according to the size thereof, so that it is possible to accurately estimate the main subject regardless of the type of subject.
In the above example, the threshold value or the size of the subject is normalized by L q (O m ), but the present invention is not limited to this example. For example, it is possible to use the size of the subject at another time point.
According to the above as the fourth embodiment, the magnitude of the threshold or object, the actual size of the object, shooting distance from the digital camera to the subject will vary depending on the focal length of the taking lens L q ( Since normalization is performed using O m ), more accurate main subject estimation is possible.
(Fifth embodiment)
Next, a fifth embodiment will be described. FIG. 5 is a functional block diagram when the control unit 1 of the digital camera 10 functions as a main subject estimation device according to the fifth embodiment. In FIG. 5, components having the same functions as those in the second and fourth embodiments are given the same reference numerals as those in FIG. 4, and detailed descriptions thereof are omitted. Since the processing flow of the fifth embodiment is substantially the same as that of the second embodiment shown in FIGS. 9 and 10, the second embodiment will be described in the following description of the fifth embodiment. Regarding the same processing as the embodiment, detailed description is omitted, and only different portions will be described.

撮影レンズ12の焦点距離やクロップ領域の大きさが変化すると、この変化に応じて、得られる画像の画角も変化する。画角が広角のときと望遠のときとでは、被写体がデジタルカメラに対して相対的に位置若しくは角度が変化するときの撮像画角内の移動距離は異なってくる。
また、画角が広角のときと望遠のときとでは、撮像画像内で被写体が一定の大きさであったとしても、デジタルカメラから被写体までの撮影距離が異なるため、被写体の大きさの変化は、広角のときと望遠のときとで異なってくる。すなわち、デジタルカメラから被写体までの撮影距離が一定距離だけ変化したとき、画角が広角のときの被写体の大きさの変化は、望遠のときと比べて、より大きくなる。このように広角では遠近感が強調され、望遠では遠近感が圧縮される。
When the focal length of the taking lens 12 or the size of the crop region changes, the angle of view of the obtained image also changes in accordance with this change. When the angle of view is wide and when it is telephoto, the moving distance within the imaging angle of view differs when the position or angle of the subject changes relative to the digital camera.
In addition, when the field angle is wide and telephoto, even if the subject is a certain size in the captured image, the shooting distance from the digital camera to the subject is different, so the change in the subject size is It is different between wide angle and telephoto. That is, when the shooting distance from the digital camera to the subject changes by a certain distance, the change in the size of the subject when the angle of view is wide is greater than when the telephoto is wide. In this way, the perspective is emphasized at the wide angle, and the perspective is compressed at the telephoto.

上記事実に鑑み、第5の実施形態は、第2の実施形態及び第4の実施形態において、画角の相違による被写体の撮像画像内の移動距離の変化の相違、並びに、画角の相違による被写体の大きさの変化の相違を補償するものである。   In view of the above fact, the fifth embodiment is different from the second embodiment and the fourth embodiment in the difference in the change in the moving distance in the captured image of the subject due to the difference in the angle of view and the difference in the angle of view. This compensates for differences in the size of the subject.

図5に示すように、制御部1は、図4に示した構成要素の他に、撮像画像が撮像されたときの画角を取得する画角取得部28を更に備えている。画角取得部28は、撮影レンズ12から送られてきた焦点距離情報、及び/又は、操作インターフェース部7を介して伝達された、撮影者による撮像領域の大きさの指定操作(例えば、35mmフルサイズ、APS−Cサイズ、1.2倍、或いは、1.3倍等の切り替え操作等)に基づいて、撮像画像が撮像されたときの画角を取得する。画角取得部28は、取得した画角の情報を、所定範囲設定部25及び判定条件設定部27に伝達する。デジタルカメラ10がクロップ機能を有していない場合や、クロップ機能を使用しない場合には、画角取得部28は、撮影レンズ12からの焦点距離情報を、所定範囲設定部25及び判定条件設定部27に直接送ることができる。   As shown in FIG. 5, the control unit 1 further includes an angle-of-view acquisition unit 28 that acquires an angle of view when a captured image is captured, in addition to the components illustrated in FIG. 4. The angle-of-view obtaining unit 28 specifies the focal length information sent from the photographic lens 12 and / or the designation operation of the size of the imaging region transmitted by the photographer via the operation interface unit 7 (for example, 35 mm full). The angle of view when the captured image is captured is acquired based on the size, the APS-C size, the switching operation of 1.2 times, 1.3 times, or the like. The angle of view acquisition unit 28 transmits the acquired information of the angle of view to the predetermined range setting unit 25 and the determination condition setting unit 27. When the digital camera 10 does not have a crop function, or when the crop function is not used, the angle-of-view acquisition unit 28 uses the predetermined range setting unit 25 and the determination condition setting unit as the focal length information from the photographing lens 12. 27 directly.

第5の実施形態に係る所定範囲設定部25の作用に関して図13を用いて説明する。   The operation of the predetermined range setting unit 25 according to the fifth embodiment will be described with reference to FIG.

図13には、撮影レンズの焦点距離が広角の場合と望遠の場合との画角の相違が示されている。被写体50が同一の撮影距離Dにおいて矢印58の方向に同じ移動量で相対的に移動する場合(矢印58の長さが移動量を表すものとする)を想定する(デジタルカメラ10が被写体に対する向きを変えて被写体が画面内で移動する場合も含まれる)。
広角レンズで撮影した場合、広い画角により撮影距離Dにおける撮影範囲60が広くなるため、当該撮影範囲60に対する被写体移動距離の比は望遠の場合よりも小さくなる。これに対して望遠レンズで撮影した場合、狭い画角により撮影距離Dにおける撮影範囲62が狭くなるため、当該撮影範囲62に対する被写体移動距離の比は広角の場合よりも大きくなる。この状況は、撮影レンズの焦点距離が同一であっても撮影領域の一部をクロップすることにより望遠効果をもたせる場合にも当てはまる。
従って、撮像画像内において、主要被写体が存在する確率の高い領域は、広角で撮影したときよりも望遠で撮影したときの方が、より広くなる。この状況に対応するため、所定範囲設定部25は、画角が大きく(小さくなる)なるほど、所定範囲を小さく(大きく)設定する。例えば図13に示すように、広角での撮影時に撮像画像55aに対して所定範囲51aを設定した場合、より望遠での撮影時では、撮像画像55bに対して、所定範囲51aよりも広い所定範囲51bを設定する。これによって、図10のステップ255の判定精度を向上させることができる。なお、第3の実施形態の第1の領域RA及び第2の領域RBに関しても、画角に応じた領域変更を適用することができる。
なお、図13において、被写体50までの撮影距離がD(<D)となった場合、撮影範囲61、63は、各々、撮影範囲60、62よりも小さくなる。従って、被写体50までの撮影距離を検出できる場合には、所定範囲設定部25は、撮影距離が小さい(大きい)ほど、所定範囲を大きく(小さく)するようにしてもよい。
FIG. 13 shows the difference in the angle of view between when the focal length of the photographic lens is wide and when it is telephoto. Subject 50 is assumed to be relatively moved in the same movement amount in the direction of arrow 58 at the same photographing distance D 1 (the length of the arrow 58 denote the amount of movement) (for the digital camera 10 is subject This also includes moving the subject around the screen by changing the direction).
When taken with a wide-angle lens, for imaging range 60 is wider in the photographing distance D 1 by wide angle, the ratio of subject movement distance with respect to the imaging range 60 is smaller than that of the telephoto. When taken with a telephoto lens contrast, since the imaging range 62 in the photographing distance D 1 narrowed by a narrow angle, the ratio of subject movement distance with respect to the imaging range 62 is larger than that of the wide angle. This situation is also applicable to the case where the telephoto effect is obtained by cropping a part of the photographing region even when the photographing lens has the same focal length.
Accordingly, in the captured image, an area where the main subject is highly likely to be present is wider when taken at a telephoto position than when taken at a wide angle. In order to cope with this situation, the predetermined range setting unit 25 sets the predetermined range to be smaller (larger) as the angle of view becomes larger (smaller). For example, as shown in FIG. 13, when the predetermined range 51a is set for the captured image 55a when shooting at a wide angle, the predetermined range wider than the predetermined range 51a is set for the captured image 55b when shooting at a telephoto position. 51b is set. As a result, the determination accuracy in step 255 in FIG. 10 can be improved. Note that the area change according to the angle of view can also be applied to the first area RA and the second area RB of the third embodiment.
In FIG. 13, when the shooting distance to the subject 50 is D 2 (<D 1 ), the shooting ranges 61 and 63 are smaller than the shooting ranges 60 and 62, respectively. Therefore, when the shooting distance to the subject 50 can be detected, the predetermined range setting unit 25 may increase (decrease) the predetermined range as the shooting distance is shorter (larger).

次に、第5の実施形態に係る判定条件設定部27の作用に関して図14を用いて説明する。
図14(A)には、カメラ91が広角レンズで被写体O及びOを同一の撮影距離lから撮影し、カメラ92が望遠レンズで被写体O及びOを同一の撮影距離lから撮影している撮影状況が示されている。ここで、カメラ91及び92のいずれにおいても被写体Oが主要被写体とされているとする。また、説明を簡単にするため、カメラ92の望遠レンズの焦点距離がカメラ91の広角レンズの焦点距離のl/l倍であり、被写体O及びOの実際の大きさが同一と仮定すると、カメラ91及び92の撮像画像内における被写体O及びOの大きさは、等しくなる。
図14(B)には、図14(A)の撮影状況から被写体Oがカメラ91及び92に距離lだけ接近した状況が示されている。図14(B)の場合、カメラ91における撮像画像内での被写体Oの大きさL1k(O)及びカメラ92における撮像画像内での被写体Oの大きさL2k(O)は、図14(A)の状況での被写体Oの大きさをL(O)とすると、以下の通りとなる。
カメラ91:L1k(O)=(l/(l−l))・L(O
カメラ92:L2k(O)=(l/(l−l))・L(O
>lであるためL1k(O)>L2k(O)となる。すなわち、図14(B)の状況では、カメラ91での被写体Oの大きさは、カメラ92での被写体Oの大きさよりも大きくなる。
被写体Oの大きさL(O)がThA以下となっており、L2k(O)>ThB>L1k(O)となる場合を想定する。この場合、同じ図14(B)の状況で撮影しているにも関わらず、カメラ91では、被写体Oを主要被写体とするのに対し、カメラ92では、被写体Oを主要被写体としないことがおこり得る。第5の実施形態では、広角と望遠とで主要被写体の検出率を同一或いは近づけるため、判定条件設定部27が、撮影時の画角が大きく(焦点距離が小さく)なるほど、閾値比ThB/ThA(或いは差ThB−ThA)を大きくする。また、撮影時の画角が小さく(焦点距離が大きく)なるほど、閾値比ThB/ThA(或いは差ThB−ThA)を小さくする。このように主要被写体検出のヒステリシス特性を、画角によって変更することで、撮影時の画角の相違による主要被写体の推定精度のばらつきを減少させることができる。
Next, the operation of the determination condition setting unit 27 according to the fifth embodiment will be described with reference to FIG.
In FIG. 14A, the camera 91 photographs the subjects O 1 and O 2 from the same photographing distance l 1 with a wide-angle lens, and the camera 92 uses the telephoto lens to photograph the subjects O 1 and O 2 at the same photographing distance l 2. The shooting situation is shown. Here, it is assumed that the subject O 1 is the main subject in both the cameras 91 and 92. For the sake of simplicity, the focal length of the telephoto lens of the camera 92 is l 2 / l 1 times the focal length of the wide-angle lens of the camera 91, and the actual sizes of the subjects O 1 and O 2 are the same. Assuming that the sizes of the subjects O 1 and O 2 in the captured images of the cameras 91 and 92 are equal.
FIG. 14B shows a situation in which the subject O 2 approaches the cameras 91 and 92 by a distance l 3 from the photographing situation of FIG. In the case of FIG. 14B, the size L 1k (O 2 ) of the subject O 2 in the captured image by the camera 91 and the size L 2k (O 2 ) of the subject O 2 in the captured image by the camera 92 are When the size of the subject O 2 in the situation of FIG. 14A is L 1 (O 2 ), the following is obtained.
Camera 91: L 1k (O 2 ) = (l 1 / (l 1 −l 3 )) · L 1 (O 2 )
Camera 92: L 2k (O 2 ) = (l 2 / (l 2 −l 3 )) · L 1 (O 2 )
Since l 2 > l 1 , L 1k (O 2 )> L 2k (O 2 ). That is, in the situation of FIG. 14B, the size of the subject O 2 at the camera 91 is larger than the size of the subject O 2 at the camera 92.
Assume that the size L 1 (O 2 ) of the subject O 1 is equal to or smaller than ThA, and L 2k (O 2 )>ThB> L 1k (O 2 ). In this case, the camera 91 sets the subject O 2 as the main subject, while the camera 92 does not set the subject O 2 as the main subject even though the same situation as in FIG. 14B is taken. Can happen. In the fifth embodiment, since the detection rate of the main subject is the same or close to the wide angle and the telephoto, the determination condition setting unit 27 increases the threshold angle ratio ThB / ThA as the field angle at the time of shooting increases (the focal length decreases). (Or the difference ThB-ThA) is increased. In addition, the threshold ratio ThB / ThA (or the difference ThB-ThA) is reduced as the angle of view at the time of shooting decreases (the focal length increases). In this way, by changing the hysteresis characteristics of main subject detection according to the angle of view, it is possible to reduce variations in estimation accuracy of the main subject due to differences in the angle of view at the time of shooting.

例えば、焦点距離100mmのレンズを持つカメラ92でl=10mの距離から被写体Oを撮影する場合と、焦点距離50mmのレンズを持つカメラ91で5mの距離から同一被写体Oを撮影する場合とを考えると、いずれのカメラでも、撮像画面内での被写体Oの大きさは同じとなる。ここで、被写体Oと同じ撮影距離に存在していた被写体Oが被写体Oを1m抜いてカメラ91及び92に接近する状況を想定すると、被写体Oはカメラ92から9m、カメラ91から4mの距離となる。被写体O、Oの実際の大きさが同じとすると、カメラ92の撮像画面内では、被写体Oは被写体Oの10/9=約1.1倍、カメラ91の撮像画面内では、被写体Oは被写体Oの5/4=1.25倍となる。そこで、判定条件設定部27は、撮像時の画角が広角になるほど、ThBを増大させ(或いは/及びThAを減少させ)、撮像時の画角が望遠になるほど、ThBを減少させ(或いは/及びThAを増大させ)ることにより、カメラ91及び92のいずれにおいても、被写体Oを主要被写体と推定することができる。 For example, when shooting a subject O 1 from a distance of l 2 = 10 m with a camera 92 having a lens with a focal length of 100 mm, and shooting the same subject O 1 from a distance of 5 m with a camera 91 having a lens with a focal length of 50 mm. In any camera, the size of the subject O 1 in the imaging screen is the same. Here, assuming a situation where the object O 2, which was present in the same shooting distance as the subject O 1 approaches the camera 91 and 92 the object O 1 unplug 1 m, the object O 2 is 9m from the camera 92, the camera 91 The distance is 4 m. Assuming that the actual sizes of the subjects O 1 and O 2 are the same, the subject O 2 is 10/9 = about 1.1 times the subject O 1 in the imaging screen of the camera 92, and in the imaging screen of the camera 91, The subject O 2 is 5/4 = 1.25 times the subject O 1 . Accordingly, the determination condition setting unit 27 increases ThB (or decreases ThA) as the angle of view at the time of imaging increases, and decreases ThB as the angle of view at the time of imaging increases (or / And ThA are increased), in any of the cameras 91 and 92, the subject O 2 can be estimated as the main subject.

被写体O、Oまでの撮影距離を検出できる場合には、判定条件設定部27は、撮影距離が減少するほど、ThBを増大させ、撮影距離が増大するほど、ThBを減少させる制御を行うこともできる。
以上が本発明の各実施形態であるが、本発明は上記例にのみ限定されるものではなく、本発明の範囲内で任意好適に変更可能である。
When the shooting distances to the subjects O 1 and O 2 can be detected, the determination condition setting unit 27 performs control to increase ThB as the shooting distance decreases and decrease ThB as the shooting distance increases. You can also.
The embodiments of the present invention have been described above. However, the present invention is not limited to the above-described examples, and can be arbitrarily modified within the scope of the present invention.

例えば、本発明の主要被写体推定装置をデジタルカメラ10を例にして説明したが、本発明は、デジタルカメラへの応用には限定されない。例えば、コンピュータ、専用の画像解析装置、携帯型情報処理端末(携帯電話、スマートフォン、タブレット型端末などを含む)等を始めとした情報処理装置にも、カメラ機能の有無によらず広く適用可能である。本発明には、カメラ機能を有していないか或いはカメラ機能を使用しない場合でも、連続する複数の撮像画像を入力することによって主要被写体の推定を実行可能な全ての装置が含まれる。   For example, the main subject estimation apparatus of the present invention has been described using the digital camera 10 as an example, but the present invention is not limited to application to a digital camera. For example, it can be widely applied to information processing devices such as computers, dedicated image analysis devices, and portable information processing terminals (including mobile phones, smartphones, tablet terminals, etc.) regardless of the presence or absence of a camera function. is there. The present invention includes all devices that can execute estimation of a main subject by inputting a plurality of consecutive captured images even when the camera function is not used or the camera function is not used.

また、本発明は、主要被写体の推定を上記画像情報処理装置に実行させるためのプログラムの形態で提供されてもよい。当該プログラムは、インターネット等からダウンロードする電子データの形態、記憶媒体に記憶された形態、ソースコードで記述された形態のいずれでも本発明の範囲内に含まれる。
制御部1は、デジタルカメラ10により静止画として連続撮影若しくは動画撮影されて画像処理ユニット2から送られてきたデータだけではなく、媒体に記憶され若しくはダウンロードされた複数の撮影画像を使用してもよい。また、制御部1は、後の処理の演算省力化のために、撮影時よりも小さい画像サイズにリサイズされた撮像画像を用いてもよい。撮像画像f、f、...fk,...は、古い順(即ち、フレーム番号が大きいほど後の時刻で撮影されたもの)でも、新しい順(即ち、フレーム番号が大きいほど、以前の時刻に遡って撮影されたものである)のいずれの順で並べられていてもよい。後者の場合は、撮像画像は撮影済であり、時間的に過去に遡って主要被写体を推定することになる。
The present invention may be provided in the form of a program for causing the image information processing apparatus to execute estimation of a main subject. The program is included in the scope of the present invention in any form of electronic data downloaded from the Internet or the like, a form stored in a storage medium, or a form described in source code.
The control unit 1 may use not only data that is continuously shot or captured as a still image by the digital camera 10 and sent from the image processing unit 2, but also a plurality of shot images stored or downloaded in a medium. Good. Further, the control unit 1 may use a captured image resized to an image size smaller than that at the time of shooting, in order to save the computation of later processing. The captured images f 1 , f 2 ,. . . fk,. . . Are either in the oldest order (i.e. those taken at a later time as the frame number is larger) or in the newer order (i.e. those taken at a later time as the frame number is larger). They may be arranged in order. In the latter case, the captured image has been captured, and the main subject is estimated retroactively in time.

図6、図7、図9及び図10のフローチャートの処理の流れは任意好適に変更可能である。例えば、図7のステップ154及び図10のステップ254では、ステップ152、252の判定が成立した後に、主要被写体とされている第1の被写体以外で最も大きいか又は最も大きいスコア値を与える被写体を第2の被写体とした。しかし、本発明は、この例に限らず、最初の撮像画像fにおいて主要被写体以外で最も大きいか又は最も大きいスコア値を与える被写体を第2の被写体とし、当該被写体を後の撮像画像においてもそのまま継続的に第2の被写体として追尾してもよい。 The processing flow in the flowcharts of FIGS. 6, 7, 9 and 10 can be arbitrarily changed. For example, in step 154 in FIG. 7 and step 254 in FIG. 10, after the determinations in steps 152 and 252 are established, the subject that gives the largest or largest score value other than the first subject that is the main subject is selected. A second subject was used. However, the present invention is not limited to this example. The subject that gives the largest or largest score value other than the main subject in the first captured image f 1 is set as the second subject, and the subject is also in the subsequent captured image. You may track as a 2nd object continuously as it is.

図5の画角取得部28により取得される「画角」は、「対角線画角」で表すことができるが、状況に応じて「水平画角」又は「垂直画角」を使用することができる。また、クロップしない場合は、撮像素子のサイズは一定なので、撮影レンズの「焦点距離値」そのものを画角として使用することができる(この場合、「画角が大きくなる」とは「焦点距離が小さくなる」ことに対応し、「画角が小さくなる」とは「焦点距離が大きくなる」ことに対応する)。クロップする場合は、クロップしないときの元の撮影面積をクロップ領域の面積で除算した値の平方根(クロップによる拡大率)を撮影レンズの焦点距離に乗算した値(換算焦点距離)を画角として使用してもよい(この場合、「画角が大きくなる」とは「換算焦点距離が小さくなる」ことに対応し、「画角が小さくなる」とは「換算焦点距離が大きくなる」ことに対応する)。   The “view angle” acquired by the view angle acquisition unit 28 in FIG. 5 can be represented by “diagonal view angle”, but “horizontal view angle” or “vertical view angle” may be used depending on the situation. it can. When cropping is not performed, since the size of the image sensor is constant, the “focal length value” of the photographing lens itself can be used as the angle of view (in this case, “the angle of view increases” Corresponds to “smaller” and “smaller angle of view” corresponds to “larger focal length”). When cropping, use the value (converted focal length) obtained by multiplying the focal length of the photographic lens by the square root of the value obtained by dividing the original shooting area without cropping by the area of the cropping area (magnification ratio by cropping). (In this case, “increasing the angle of view” corresponds to “decreasing the converted focal length”, and “decreasing the angle of view” corresponds to “increasing the converted focal length”) To do).

第1の実施形態では、(1)式において、スコア関数Sの変数として、被写体の大きさ又は大きさに関する値と、被写体の位置又は位置に関する値とを様々に組み合わせて用いることが可能であることを示した。以下では、それらの組み合わせの例を第1乃至第6の実施例として、図15乃至図20を用いて説明する。   In the first embodiment, in the equation (1), as the variable of the score function S, it is possible to use various combinations of the value related to the size or size of the subject and the value related to the location or position of the subject. Showed that. Hereinafter, examples of such combinations will be described as first to sixth embodiments with reference to FIGS. 15 to 20.

なお、図15乃至図20の各々には、撮像画像内において、先に主要被写体と推定されている第1の被写体(丸で表示)と、第2の被写体(四角で表示)が示されている。また、図中の矢印は、第1及び第2の被写体の大きさ或いは位置の推移を示すものである。
(第1の実施例)
まず、第1の実施例について説明する。第1の実施例は、スコア関数Sの変数として被写体の大きさLとその大きさの安定度を用いて主要被写体推定を行うものである。図15は、第1の実施例が適用される撮影状況を説明する図である。図15の撮影状況は、主要被写体がほぼ同じ大きさとなるように、撮影者が撮影レンズをズーミングしたり、被写体に接近したり、遠ざかったりして追従する場合などに相当している。このため、第1の実施例では、スコア関数の変数として、撮像画像内の被写体の大きさLの他に、大きさの安定度を用い、大きさLが大きいほど、また大きさLの安定度が大きいほどスコア関数Sの値を大きくするようにしている。
大きさの安定度として、大きさLの平均値Lave(所定フレームに亘る被写体の大きさLの平均値)や、所定フレームに亘って演算される大きさLの偏差若しくは分散値Lvを用いることができる。大きさLの偏差若しくは分散値Lvは、その値が大きいほど大きさLのばらつきが大きいため安定度が小さいものとみなされる。従って、Lvの重み係数Wは負となり、Lvが大きいほどスコアSが小さくなる。
Each of FIG. 15 to FIG. 20 shows a first subject (displayed in a circle) and a second subject (displayed in a square) that have been estimated as the main subject in the captured image. Yes. Moreover, the arrows in the figure indicate the transition of the size or position of the first and second subjects.
(First embodiment)
First, the first embodiment will be described. In the first embodiment, main subject estimation is performed using the size L of the subject and the stability of the size as variables of the score function S. FIG. 15 is a diagram illustrating a shooting situation to which the first embodiment is applied. The shooting situation in FIG. 15 corresponds to the case where the photographer zooms the shooting lens, approaches the subject, or moves away from the subject so that the main subject has almost the same size. For this reason, in the first embodiment, the stability of the size is used in addition to the size L of the subject in the captured image as a variable of the score function. The larger the size L, the more stable the size L. The score function S is increased as the degree increases.
As the stability of the size, an average value L ave of the size L (average value of the size L of the subject over a predetermined frame) or a deviation or variance value Lv of the size L calculated over the predetermined frame is used. be able to. The deviation of the magnitude L or the variance Lv is considered to be less stable because the larger the value, the greater the variation in the magnitude L. Therefore, the weight coefficient W of Lv becomes negative, and the score S decreases as Lv increases.

スコア関数Sとして、S(L,Lv)、S(L,Lave)又はS(L,Lv,Lave)等を用いることができる。 As the score function S, S (L, Lv), S (L, L ave ), S (L, Lv, L ave ), or the like can be used.

図15の例では、先に主要被写体と推定された同図中○で示される第1の被写体は、L(O)がほとんど変化しない。一方、同図中□で示される第2の被写体は、L(O)が大きく変化する。最初の段階では、第1の被写体と第2の被写体とで大きさはほぼ同じであるが、次の段階では、第2の被写体が急激に大きくなり、第1の被写体よりも大きくなる。しかし、第3の段階では、第2の被写体が急激に小さくなり、第1の被写体よりも小さくなる。従って、第2の被写体のスコア関数では、第2の被写体のLaveは、第1の被写体のLaveと比べてスコアに寄与できない。或いは、第2の被写体の分散値Lvが、第1の被写体の分散値Lvと比べて大きいため、その負の重み係数により第2の被写体のスコアを第1の被写体のスコアと比べて減少させる。その結果、大きさLだけに着目したとき第2段階でL(O)がThA以下となり、L(O)がThB以上となったときでも、大きさLの安定度を加えた主要被写体の推定では、図15の例のように、主要被写体をOに維持することが起こり得る。勿論、大きさの変動状況によっては、主要被写体をOに変更することもあり得る。 In the example of FIG. 15, L (O 1 ) hardly changes in the first subject indicated by a circle in FIG. On the other hand, in the second subject indicated by □ in the figure, L (O 2 ) changes greatly. In the first stage, the first subject and the second subject have almost the same size, but in the next stage, the second subject becomes abruptly larger and larger than the first subject. However, in the third stage, the second subject becomes abruptly smaller and smaller than the first subject. Therefore, in the score function of the second subject, L ave of the second subject cannot contribute to the score as compared to L ave of the first subject. Alternatively, since the variance value Lv of the second subject is larger than the variance value Lv of the first subject, the score of the second subject is reduced compared to the score of the first subject by the negative weighting factor. . As a result, when focusing only on the size L, in the second stage, L (O 1 ) is equal to or less than ThA, and even when L (O 2 ) is equal to or greater than ThB, the main subject to which stability of size L is added. In this estimation, it is possible to maintain the main subject at O 1 as in the example of FIG. Of course, the main subject may be changed to O 2 depending on the variation of the size.

なお、大きさLの平均値Laveは、単なる大きさの加算平均だけではなく、例えば短時間内での大きさの急激な変化分を遮断することによって求められてもよい。
(第2の実施例)
次に、第2の実施例について説明する。第2の実施例は、スコア関数Sの変数として被写体の大きさLとその大きさの変化を用いて主要被写体推定を行うものである。図16は、第2の実施例が適用される撮影状況を示す。図16の撮影状況は、例えばレース中などにおいて、先に主要被写体と推定された同図中○で示される第1の被写体が、第2の被写体に追い越されて、大きさが逆転する状況を示している。
Note that the average value L ave of the magnitude L is not limited to a simple average of magnitudes, but may be obtained, for example, by blocking a sudden change in magnitude within a short time.
(Second embodiment)
Next, a second embodiment will be described. In the second embodiment, main subject estimation is performed using a subject size L and a change in the size as a variable of the score function S. FIG. 16 shows a shooting situation to which the second embodiment is applied. The shooting situation in FIG. 16 is a situation in which, for example, during a race, the size of the first subject, which was previously estimated as the main subject, is overtaken by the second subject and reversed in size. Show.

スコア関数Sの変数として、大きさL及び大きさLの変化ΔLを用い、スコア関数としてS(L,ΔL)等を用いることができる。ΔLは、時間的に後に入力された撮像画像内の当該被写体の大きさから時間的に先に入力された撮像画像内の当該被写体の大きさを引いた値とすることができる。或いは、ΔLは、所定フレームに亘る撮像画像内の当該被写体の大きさの分布から最小二乗法などで求められた大きさLの平均変化率とすることができる。
ΔLは、被写体の大きさが減少する場合は負値であり、被写体の大きさが増加する場合は正値となる。従って、スコア関数Sは、被写体の大きさが減少する場合はより急激に減少し、被写体の大きさが増加する場合はより急激に増加する。図16の撮影状況では、大きさLのみの関数であるスコア関数S(L)を用いたとしても、いずれは第2の被写体を主要被写体と推定する。しかし第2の実施例では、S(L,ΔL)を用い、主要被写体である兆候(ΔL>0)をスコアに反映させるようにしたので、スコア関数S(L)を用いる場合と比べて、より迅速に主要被写体を推定することが可能となる。
(第3の実施例)
次に、第3の実施例について説明する。第3の実施例は、スコア関数Sの変数として被写体の大きさLと被写体の位置の安定度を用いて主要被写体推定を行うものである。図17は、第3の実施例が適用される撮影状況を示す図である。図17の撮影状況は、主要被写体が撮像画像内でほぼ同じ位置を維持するように、撮影者がデジタルカメラをフレーミングして主要被写体に追従する場合などに相当している。このため、第3の実施例では、スコア関数の変数として、撮像画像内の被写体の大きさLの他に、被写体の位置の安定度を用い、スコア関数Sとして、S(L,Pv)等が設定されている。スコア関数Sの値は、被写体の大きさLが大きいほど、また被写体の位置Lの安定度が大きいほど大きくなるように設定されている。ここで、位置Lの安定度を反映するものとしては、被写体の位置の分散値Pvが用いられ、その重み係数が負に設定されている。
As a variable of the score function S, the magnitude L and the change ΔL of the magnitude L can be used, and S (L, ΔL) or the like can be used as the score function. ΔL can be a value obtained by subtracting the size of the subject in the captured image input earlier in time from the size of the subject in the captured image input later in time. Alternatively, ΔL can be an average rate of change of the size L obtained by the least square method or the like from the size distribution of the subject in the captured image over a predetermined frame.
ΔL has a negative value when the size of the subject decreases, and has a positive value when the size of the subject increases. Therefore, the score function S decreases more rapidly when the size of the subject decreases, and increases more rapidly when the size of the subject increases. In the shooting situation of FIG. 16, even if the score function S (L) that is a function of only the size L is used, the second subject is estimated as the main subject. However, in the second embodiment, since S (L, ΔL) is used and the sign of the main subject (ΔL> 0) is reflected in the score, compared with the case where the score function S (L) is used, It becomes possible to estimate the main subject more quickly.
(Third embodiment)
Next, a third embodiment will be described. In the third embodiment, main subject estimation is performed using the subject size L and the subject position stability as variables of the score function S. FIG. 17 is a diagram illustrating a shooting situation to which the third embodiment is applied. The shooting situation in FIG. 17 corresponds to a case where the photographer frames the digital camera and follows the main subject so that the main subject maintains the substantially same position in the captured image. For this reason, in the third embodiment, the stability of the position of the subject is used in addition to the size L of the subject in the captured image as a variable of the score function, and S (L, Pv) or the like is used as the score function S. Is set. The value of the score function S is set so as to increase as the subject size L increases and as the stability of the subject position L increases. Here, as a reflection of the stability of the position L, the variance value Pv of the position of the subject is used, and its weight coefficient is set to be negative.

図17の例では、同図中○で示される第1の被写体の位置の分散値Pvが、同図中□で示される第2の被写体の位置の分散値Pvよりも大きくなっている。このため、第1の被写体のスコアが減少され、主要被写体が第2の被写体に変更されている。Pvの代わりに或いはPvに加えて、所定フレームに亘る被写体の位置の変化であるΔPを用いてもよい。
(第4の実施例)
次に、第4の実施例について説明する。
図18には、第4の実施例が示されている。第4の実施例は、スコア関数Sの変数として被写体の大きさLと被写体の所定位置からの距離とを用いて主要被写体推定を行うものである。図18は、第4の実施例が適用される撮影状況を示す図である。図18の撮影状況は、主要被写体を撮像画像内の所定位置Pの近傍に維持させるように、撮影者がデジタルカメラをフレーミングして主要被写体に追従する場合などに相当している。ここで、所定位置Pは、撮像画像の中心位置や、撮影者が指定したAFフレームの位置等、主要被写体が存在する確率が高いと想定される位置である。
第4の実施例では、スコア関数の変数として、撮像画像内の被写体の大きさLの他に、被写体の現在の位置Pと所定位置Pとの間の距離|P−P|を用いるので、スコア関数Sとして、S(L,|P−P|)等が設定されている。スコア関数Sは、被写体の大きさLが大きいほど、また被写体が所定位置Pに近いほど大きくなるように設定されている。従って、スコア関数Sにおいて|P−P|の重み係数が負に設定されている。
In the example of FIG. 17, the variance value Pv of the position of the first subject indicated by ◯ in the figure is larger than the variance value Pv of the position of the second subject indicated by □ in the figure. For this reason, the score of the first subject is reduced, and the main subject is changed to the second subject. Instead of Pv or in addition to Pv, ΔP that is a change in the position of the subject over a predetermined frame may be used.
(Fourth embodiment)
Next, a fourth embodiment will be described.
FIG. 18 shows a fourth embodiment. In the fourth embodiment, main subject estimation is performed using a subject size L and a distance from a predetermined position of the subject as variables of the score function S. FIG. 18 is a diagram illustrating a shooting situation to which the fourth embodiment is applied. The shooting situation in FIG. 18 corresponds to a case where the photographer frames the digital camera and follows the main subject so that the main subject is maintained in the vicinity of the predetermined position P 0 in the captured image. Here, the predetermined position P 0 is a position that is assumed to have a high probability that the main subject exists, such as the center position of the captured image and the position of the AF frame specified by the photographer.
In the fourth embodiment, as a variable of the score function, a distance | P−P 0 | between the current position P of the subject and the predetermined position P 0 is used in addition to the size L of the subject in the captured image. Therefore, S (L, | P−P 0 |) or the like is set as the score function S. Score function S is, the larger the size L of the object, also subject is set to be larger closer to the predetermined position P 0. Therefore, in the score function S, the weighting factor of | P−P 0 | is set to be negative.

図18の例では、同図中○で示される第1の被写体の大きさが小さくなり、同図中□で示される第2の被写体の大きさが大きくなっている。しかし、第1の被写体は、所定位置Pの近傍の位置にあるが、第2の被写体は、依然として所定位置Pから離れた位置にある。これにより、第2の被写体のスコアは、その大きさLが大きくなったにも関わらず、それほど増加せず、主要被写体は第1の被写体に維持される。
(第5の実施例)
次に、第5の実施例について説明する。
図19には、第5の実施例が示されている。第5の実施例は、スコア関数Sの変数として被写体の大きさLと被写体の所定位置への接近傾向とを用いて主要被写体推定を行うものである。図19は、第5の実施例が適用される撮影状況を示す図である。図19の撮影状況は、主要被写体を撮像画像内の所定位置Pに近づけるように、撮影者がデジタルカメラをフレーミングして主要被写体に追従する場合などに相当している。ここで、所定位置Pは、撮像画像の中心位置や、撮影者が指定したAFフレームの位置等、主要被写体が存在する確率が高いと想定される位置である。
第5の実施例では、スコア関数の変数として、撮像画像内の被写体の大きさLの他に、被写体の現在の位置Pと所定位置Pとの間の距離|P−P|の時間変化分を示すΔ|P−P|を用いるので、スコア関数Sとして、S(L,Δ|P−P|)等が設定されている。スコア関数Sは、被写体の大きさLが大きいほど、また被写体の位置が所定位置Pに近くなるように変化するほど大きくなるように設定されている。
In the example of FIG. 18, the size of the first subject indicated by ◯ in the figure is small, and the size of the second subject indicated by □ in the figure is large. However, the first subject is at a position near the predetermined position P 0 , but the second subject is still at a position away from the predetermined position P 0 . As a result, the score of the second subject does not increase so much despite the increase in the size L, and the main subject is maintained as the first subject.
(Fifth embodiment)
Next, a fifth embodiment will be described.
FIG. 19 shows a fifth embodiment. In the fifth embodiment, main subject estimation is performed using the size L of the subject and the tendency of the subject to approach a predetermined position as variables of the score function S. FIG. 19 is a diagram illustrating a shooting situation to which the fifth embodiment is applied. The shooting situation in FIG. 19 corresponds to the case where the photographer frames the digital camera and follows the main subject so that the main subject approaches the predetermined position P 0 in the captured image. Here, the predetermined position P 0 is a position that is assumed to have a high probability that the main subject exists, such as the center position of the captured image and the position of the AF frame specified by the photographer.
In the fifth embodiment, as a variable of the score function, in addition to the size L of the subject in the captured image, a time of a distance | P−P 0 | between the current position P of the subject and the predetermined position P 0 Since Δ | P−P 0 | indicating the amount of change is used, S (L, Δ | P−P 0 |) or the like is set as the score function S. Score function S is set such as the size L is large subject, and the position of the object becomes larger as changes to be close to the predetermined position P 0.

図19の例では、同図中○で示される第1の被写体は、その大きさLは変化しないが、所定位置Pから遠ざかるようにその位置が変化したので、第1の被写体のスコアは減少される。これに対して、同図中□で示される第2の被写体は、その大きさLが増加すると共に、所定位置Pに接近するようにその位置が変化したので、第2の被写体のスコアは増加される。これによって、主要被写体が第1の被写体から第2の被写体に変更される。
(第6の実施例)
次に、第6の実施例について説明する。第6の実施例は、スコア関数Sの変数として被写体の位置とその位置の安定度を用いて主要被写体推定を行うものである。図20は、第6の実施例が適用される撮影状況を説明する図である。図20の撮影状況は、主要被写体を撮像画像内のほぼ同じ位置(例えばAF枠)に維持するように、撮影者がデジタルカメラをフレーミングして主要被写体に追従する場合などに相当している。このため、第6の実施例では、スコア関数の変数として、撮像画像内の被写体と所定位置P(例えば、上述のAF枠又は画像中央位置)と、被写体の位置の安定度を用いる。スコア関数Sとして、S(|P−P|,Pv)等が設定されている。スコア関数Sの値は、被写体が所定位置Pに近いほど、また被写体の位置の安定度が大きいほど大きくなるように設定されている。ここで、位置Lの安定度を反映するものとしては、被写体の位置の分散値Pvが用いられ、その重み係数が負に設定されている。
In the example of FIG. 19, the size of the first subject indicated by a circle in FIG. 19 does not change, but its position changes so as to move away from the predetermined position P 0 , so the score of the first subject is Will be reduced. In contrast, the second object indicated in FIG □, along with their size L is increased, since its position to approach the predetermined position P 0 is changed, the score of the second subject Will be increased. As a result, the main subject is changed from the first subject to the second subject.
(Sixth embodiment)
Next, a sixth embodiment will be described. In the sixth embodiment, the main subject is estimated using the position of the subject and the stability of the position as a variable of the score function S. FIG. 20 is a diagram for explaining a shooting situation to which the sixth embodiment is applied. The shooting situation in FIG. 20 corresponds to a case where the photographer frames the digital camera and follows the main subject so that the main subject is maintained at substantially the same position (for example, an AF frame) in the captured image. For this reason, in the sixth embodiment, the subject in the captured image, the predetermined position P 0 (for example, the above-described AF frame or the image center position), and the stability of the position of the subject are used as variables of the score function. As the score function S, S (| P−P 0 |, Pv) or the like is set. The value of the score function S is subject is set closer to the predetermined position P 0, and as the larger stability of the position of the subject is large. Here, as a reflection of the stability of the position L, the variance value Pv of the position of the subject is used, and its weight coefficient is set to be negative.

図20の例では、同図中○で示される第1の被写体が、当初は同図中□で示される第2の被写体よりも所定位置Pよりも近く、先に主要被写体であると推定された。しかし、次に第1の被写体は、所定位置Pから急激に離れ、最後にまた位置Pに近づいた。これに対して、同図中□で示される第2の被写体は、所定位置Pに安定的に近づいた。このため、位置の分散値Pvに関して、第1の被写体は第2の被写体よりも大きくなり、第1の被写体のスコアSが減少された。その結果、図20の例では、主要被写体が第2の被写体に変更された。 In the example of FIG. 20, the first subject indicated by a circle in the figure is initially closer to the predetermined position P 0 than the second subject indicated by a square in the figure, and is estimated to be the main subject first. It was done. However, the first subject then moved away from the predetermined position P 0 rapidly and finally approached the position P 0 again. In contrast, the second object indicated in FIG □ approached stably in position P 0. For this reason, with respect to the position variance value Pv, the first subject is larger than the second subject, and the score S of the first subject is reduced. As a result, in the example of FIG. 20, the main subject is changed to the second subject.

以上が第1の実施形態の実施例であるが、上記例以外にも様々な変数の組み合わせが存在することはいうまでもない。また、上記に説明した各実施形態、実施例を組み合わせて用いるものも本発明に含まれる。   The above is an example of the first embodiment, but it goes without saying that there are various combinations of variables in addition to the above example. Further, the present invention includes a combination of the above-described embodiments and examples.

1 制御部
2 画像処理ユニット
5 撮像素子
6 ディスプレイ
10 デジタルカメラ
12 撮影レンズ
12a レンズCPU
15 合焦レンズ群
21 画像取得部
22 スコア関数メモリ
23 被写体検出部
24 被写体情報検出部
25 所定範囲設定部
26 判定条件メモリ
27 判定条件設定部
28 画角取得部
30 閾値メモリ
31 主要被写体推定部
50 被写体
55a、55b 撮像画像
51a、51b 所定範囲
DESCRIPTION OF SYMBOLS 1 Control part 2 Image processing unit 5 Image pick-up element 6 Display 10 Digital camera 12 Shooting lens 12a Lens CPU
DESCRIPTION OF SYMBOLS 15 Focusing lens group 21 Image acquisition part 22 Score function memory 23 Subject detection part 24 Subject information detection part 25 Predetermined range setting part 26 Judgment condition memory 27 Judgment condition setting part 28 Angle of view acquisition part 30 Threshold memory 31 Main subject estimation part 50 Subject 55a, 55b Captured image 51a, 51b Predetermined range

Claims (12)

複数の画像を取得する画像取得部と、
前記画像取得部が取得した撮像画像から被写体を検出する被写体検出部と、
前記被写体検出部が検出した被写体の前記撮像画像内での大きさに関する被写体情報を検出する被写体情報検出部と、
前記被写体情報に基づいて、前記複数の撮像画像から主要被写体を推定する主要被写体推定部と、を備え、
前記被写体推定部は、第1画像内で主要被写体とされた第1の被写体の前記被写体情報が、前記第1画像よりも後に取得された第2画像内において、第1条件を満たさなくなり、かつ、前記第1の被写体と異なる第2の被写体の前記被写体情報が、前記第1条件と異なる第2条件を満たした時に主要被写体を前記第2の被写体に変更することを特徴とする、主要被写体推定装置。
An image acquisition unit for acquiring a plurality of images;
A subject detection unit for detecting a subject from a captured image acquired by the image acquisition unit;
A subject information detection unit for detecting subject information related to the size of the subject detected by the subject detection unit in the captured image;
A main subject estimation unit that estimates a main subject from the plurality of captured images based on the subject information,
The subject estimation unit does not satisfy the first condition in the second image acquired after the first image, the subject information of the first subject that is the main subject in the first image; and The main subject is changed to the second subject when the subject information of the second subject different from the first subject satisfies a second condition different from the first condition. Estimating device.
前記主要被写体推定部は、
前記第1の被写体の大きさ又は大きさに関する値が第1の所定値以下となり、かつ、前記第2の被写体の大きさ又は大きさに関する値が、第2の所定値以上となったとき、更に前記第2の被写体が前記撮像画像内の所定範囲内に存在する場合に、前記主要被写体を前記第2の被写体に変更することを特徴とする、請求項1に記載の主要被写体推定装置。
The main subject estimation unit includes:
When a value related to the size or size of the first subject is equal to or less than a first predetermined value, and a value related to the size or size of the second subject is equal to or greater than a second predetermined value, 2. The main subject estimation apparatus according to claim 1, further comprising: changing the main subject to the second subject when the second subject exists within a predetermined range in the captured image.
前記主要被写体推定部は、
前記撮像画像が撮像された際の画角が大きくなったときに、前記所定範囲を、画角が大きくなる前と比較して小さく設定し、
前記撮像画像が撮像された際の画角が小さくなったときに、前記所定範囲を、画角が小さくなる前と比較して大きく設定することを特徴とする、請求項2に記載の主要被写体推定装置。
The main subject estimation unit includes:
When the angle of view when the captured image is captured increases, the predetermined range is set smaller than before the angle of view increases,
The main subject according to claim 2, wherein when the angle of view when the captured image is captured becomes smaller, the predetermined range is set larger than before the angle of view is decreased. Estimating device.
前記被写体情報は、前記撮像画像内での被写体の大きさ以外に該大きさに関する値、前記撮像画像内での被写体の位置、及び該位置に関する値のうち少なくともいずれかを含み、前記主要被写体推定部は、前記被写体情報の関数を用い、前記関数の値は、該被写体情報を与える被写体が主要被写体である確率又は確率に関する値を反映する、請求項1に記載の主要被写体推定装置。   The subject information includes at least one of a value related to the size, a position of the subject in the captured image, and a value related to the position in addition to the size of the subject in the captured image, and the main subject estimation The main subject estimation apparatus according to claim 1, wherein the unit uses a function of the subject information, and the value of the function reflects a probability that the subject to which the subject information is provided is a main subject or a value related to the probability. 前記主要被写体推定部は、
前記撮像画像が撮像された際の画角が大きくなったときに、前記第1の所定値に対する前記第2の所定値の比、又は、前記第2の所定値から前記第1の所定値を引いた差を、画角が大きくなる前と比較して大きく設定し、
前記撮像画像が撮像された際の画角が小さくなったときに、前記第1の所定値に対する前記第2の所定値の比、又は、前記第2の所定値から前記第1の所定値を引いた差を、画角が小さくなる前と比較して小さく設定することを特徴とする、請求項2又は3のいずれか1項に記載の主要被写体推定装置。
The main subject estimation unit includes:
When the angle of view when the captured image is captured increases, the ratio of the second predetermined value to the first predetermined value, or the first predetermined value from the second predetermined value. Set the subtracted difference larger than before the angle of view increases,
When the angle of view when the captured image is captured becomes small, the ratio of the second predetermined value to the first predetermined value, or the first predetermined value from the second predetermined value. The main subject estimation apparatus according to claim 2, wherein the difference obtained by setting is set to be smaller than that before the angle of view is reduced.
請求項1乃至5のいずれか1項に記載の主要被写体推定装置を備える、デジタルカメラ。   A digital camera comprising the main subject estimation device according to any one of claims 1 to 5. 複数の画像を取得する画像取得工程と、
前記画像取得工程で取得された撮像画像から被写体を検出する被写体検出工程と、
前記被写体検出工程で検出された被写体の前記撮像画像内での大きさに関する被写体情報を検出する被写体情報検出工程と、
前記被写体情報に基づいて、前記複数の撮像画像から主要被写体を推定する主要被写体推定工程と、
を情報処理装置に実行させるためのプログラムであって、
前記主要被写体推定工程において、
第1画像内で主要被写体とされた第1の被写体の前記被写体情報が、前記第1画像よりも後に取得された第2画像内において、第1条件を満たさなくなり、かつ、前記第1の被写体と異なる第2の被写体の前記被写体情報が、前記第1条件と異なる第2条件を満たした時に主要被写体を前記第2の被写体に変更することを特徴とする、プログラム。
An image acquisition step of acquiring a plurality of images;
A subject detection step of detecting a subject from the captured image acquired in the image acquisition step;
Subject information detection step of detecting subject information relating to the size of the subject detected in the subject detection step in the captured image;
A main subject estimation step of estimating a main subject from the plurality of captured images based on the subject information;
Is a program for causing the information processing apparatus to execute
In the main subject estimation step,
The subject information of the first subject that is the main subject in the first image does not satisfy the first condition in the second image acquired after the first image, and the first subject A program for changing a main subject to the second subject when the subject information of a second subject different from the first subject satisfies a second condition different from the first condition.
前記主要被写体推定工程において、
前記第1の被写体の大きさ又は大きさに関する値が第1の所定値以下となり、かつ、前記第2の被写体の大きさまたは大きさに関する値が、第2の所定値以上となったとき、更に前記第2の被写体が前記撮像画像内の所定範囲内に存在する場合に、主要被写体を前記第2の被写体に変更することを特徴とする、請求項7に記載のプログラム。
In the main subject estimation step,
When a value related to the size or size of the first subject is equal to or less than a first predetermined value, and a value related to the size or size of the second subject is equal to or greater than a second predetermined value, The program according to claim 7, further comprising: changing a main subject to the second subject when the second subject is within a predetermined range in the captured image.
前記主要被写体推定工程において、
前記撮像画像が撮像された際の画角が大きくなったときに、前記所定範囲を、画角が大きくなる前と比較して小さく設定し、
前記撮像画像が撮像された際の画角が小さくなったときに、前記所定範囲を、画角が小さくなる前と比較して大きく設定することを特徴とする、請求項8に記載のプログラム。
In the main subject estimation step,
When the angle of view when the captured image is captured increases, the predetermined range is set smaller than before the angle of view increases,
9. The program according to claim 8, wherein when the angle of view when the captured image is captured becomes smaller, the predetermined range is set larger than before the angle of view becomes smaller.
前記被写体情報は、前記撮像画像内での被写体の大きさ以外に、該大きさに関する値、前記撮像画像内での被写体の位置、及び該位置に関する値のうち少なくともいずれかを含み、前記主要被写体推定工程では、前記被写体情報の関数を用い、前記関数の値は、該被写体情報を与える被写体が主要被写体である確率又は確率に関する値を反映する、請求項7に記載のプログラム。   The subject information includes at least one of a value related to the size, a position of the subject in the captured image, and a value related to the position in addition to the size of the subject in the captured image. The program according to claim 7, wherein in the estimation step, a function of the subject information is used, and a value of the function reflects a probability that the subject to which the subject information is provided is a main subject or a value related to the probability. 前記主要被写体推定工程において、
前記撮像画像が撮像された際の画角が大きくなったときに、前記第1の所定値に対する前記第2の所定値の比、又は、前記第2の所定値から前記第1の所定値を引いた差を、画角が大きくなる前と比較して大きく設定し、
前記撮像画像が撮像された際の画角が小さくなったときに、前記第1の所定値に対する前記第2の所定値の比、又は、前記第2の所定値から前記第1の所定値を引いた差を、画角が小さくなる前と比較して小さく設定することを特徴とする、請求項8又は9に記載のプログラム。
In the main subject estimation step,
When the angle of view when the captured image is captured increases, the ratio of the second predetermined value to the first predetermined value, or the first predetermined value from the second predetermined value. Set the subtracted difference larger than before the angle of view increases,
When the angle of view when the captured image is captured becomes small, the ratio of the second predetermined value to the first predetermined value, or the first predetermined value from the second predetermined value. The program according to claim 8 or 9, wherein the subtracted difference is set smaller than before the angle of view becomes smaller.
請求項7乃至請求項11のいずれか1項に記載のプログラムに従って撮像画像内の主要被写体を推定する情報処理装置。   An information processing apparatus that estimates a main subject in a captured image according to the program according to claim 7.
JP2013248592A 2013-11-29 2013-11-29 Main subject estimation apparatus, program, and information processing apparatus Active JP6210214B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013248592A JP6210214B2 (en) 2013-11-29 2013-11-29 Main subject estimation apparatus, program, and information processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013248592A JP6210214B2 (en) 2013-11-29 2013-11-29 Main subject estimation apparatus, program, and information processing apparatus

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2017176679A Division JP6565991B2 (en) 2017-09-14 2017-09-14 Electronic device, subject detection method and program.

Publications (2)

Publication Number Publication Date
JP2015106849A true JP2015106849A (en) 2015-06-08
JP6210214B2 JP6210214B2 (en) 2017-10-11

Family

ID=53436733

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013248592A Active JP6210214B2 (en) 2013-11-29 2013-11-29 Main subject estimation apparatus, program, and information processing apparatus

Country Status (1)

Country Link
JP (1) JP6210214B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017225192A (en) * 2017-09-14 2017-12-21 株式会社ニコン Main subject estimation device, program and information processing device
JP2020091773A (en) * 2018-12-07 2020-06-11 アズビル株式会社 Stability determination device and stability determination method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010049148A (en) * 2008-08-25 2010-03-04 Nikon Corp Image recognition device and imaging apparatus
JP2010141849A (en) * 2008-12-15 2010-06-24 Canon Inc Main face selecting device, control method therefor, imaging device, and program
JP2010141616A (en) * 2008-12-11 2010-06-24 Canon Inc Image processor, method of processing image, and imaging apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010049148A (en) * 2008-08-25 2010-03-04 Nikon Corp Image recognition device and imaging apparatus
JP2010141616A (en) * 2008-12-11 2010-06-24 Canon Inc Image processor, method of processing image, and imaging apparatus
JP2010141849A (en) * 2008-12-15 2010-06-24 Canon Inc Main face selecting device, control method therefor, imaging device, and program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017225192A (en) * 2017-09-14 2017-12-21 株式会社ニコン Main subject estimation device, program and information processing device
JP2020091773A (en) * 2018-12-07 2020-06-11 アズビル株式会社 Stability determination device and stability determination method
JP7178889B2 (en) 2018-12-07 2022-11-28 アズビル株式会社 STABILITY DETERMINATION DEVICE AND STABILITY DETERMINATION METHOD

Also Published As

Publication number Publication date
JP6210214B2 (en) 2017-10-11

Similar Documents

Publication Publication Date Title
US11012614B2 (en) Image processing device, image processing method, and program
TWI419552B (en) Imaging apparatus, subject tracking method and storage medium
US10827127B2 (en) Zoom control device, imaging apparatus, control method of zoom control device, and recording medium
US10270978B2 (en) Zoom control device with scene composition selection, and imaging apparatus, control method of zoom control device, and recording medium therewith
EP1998558B1 (en) Image pickup apparatus equipped with function of detecting image shaking
JP4702418B2 (en) Imaging apparatus, image region existence determination method and program
US8724981B2 (en) Imaging apparatus, focus position detecting method, and computer program product
US8493493B2 (en) Imaging apparatus, imaging apparatus control method, and computer program
US20160191809A1 (en) Zoom control device, imaging apparatus, control method of zoom control device, and recording medium
KR20100067407A (en) Photographing control method and apparatus according to motion of digital photographing apparatus
US20100321503A1 (en) Image capturing apparatus and image capturing method
US20160088219A1 (en) Image capture apparatus which controls frame rate based on motion of object, information transmission apparatus, image capture control method, information transmission method, and recording medium
JP2018033013A (en) Control device, imaging apparatus, control method, program, and memory medium
JP4807582B2 (en) Image processing apparatus, imaging apparatus, and program thereof
JP6210214B2 (en) Main subject estimation apparatus, program, and information processing apparatus
KR101677699B1 (en) Camera module and mobile phone comprising it
JP2015111226A (en) Subject tracking device and control method of the same, imaging device, program, and storage medium
JP6565991B2 (en) Electronic device, subject detection method and program.
JP6087536B2 (en) Imaging apparatus and control method thereof
JP2014216830A (en) Image tracking device, image tracking method and program
CN113014796B (en) Image processing apparatus, image capturing apparatus, image processing method, and storage medium
JP2011234310A (en) Imaging apparatus
JP2021124671A (en) Image processing device, imaging apparatus, image processing method, and program
JP2019201399A (en) Control device, imaging device, control method, and program
JP5381578B2 (en) Electronic camera

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20161122

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170711

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170829

R150 Certificate of patent or registration of utility model

Ref document number: 6210214

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250