JP6833564B2 - Imaging device and control method - Google Patents

Imaging device and control method Download PDF

Info

Publication number
JP6833564B2
JP6833564B2 JP2017036568A JP2017036568A JP6833564B2 JP 6833564 B2 JP6833564 B2 JP 6833564B2 JP 2017036568 A JP2017036568 A JP 2017036568A JP 2017036568 A JP2017036568 A JP 2017036568A JP 6833564 B2 JP6833564 B2 JP 6833564B2
Authority
JP
Japan
Prior art keywords
subject
area
frame
image
face detection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2017036568A
Other languages
Japanese (ja)
Other versions
JP2017212723A (en
Inventor
公章 鹿野
公章 鹿野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to US15/591,701 priority Critical patent/US10469730B2/en
Publication of JP2017212723A publication Critical patent/JP2017212723A/en
Application granted granted Critical
Publication of JP6833564B2 publication Critical patent/JP6833564B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Studio Devices (AREA)
  • Focusing (AREA)
  • Automatic Focus Adjustment (AREA)
  • Transforming Light Signals Into Electric Signals (AREA)

Description

本発明は、撮像装置および制御方法に関する。 The present invention relates to an imaging device and a control method.

近年のテレビ放送の高画素化に伴い、4K、8Kといった高画素化が進んだ撮像装置が提案されている。また、被写体を滑らかに表示するための高フレームレート化が進んだ撮像装置も提案されている。 With the recent increase in the number of pixels in television broadcasting, an imaging device having an increased number of pixels such as 4K and 8K has been proposed. In addition, an imaging device with an advanced frame rate for displaying a subject smoothly has also been proposed.

撮像装置の高解像度化に伴い、レンズが有する合焦精度や、フォーカス動作の高速化が課題となっている。したがって、撮像装置のフォーカス動作の高速化および合焦精度向上を実現するために、視差画像信号つまり位相差情報取得用の画像信号を、撮影画像信号と同時に取得可能な撮像素子を備える撮像装置が提案されている。特許文献1は、デフォーカス量の演算に用いる信号を出力する焦点検出用画素と、撮像用画素とを有する撮像素子を備える撮像装置を開示している。 As the resolution of the image pickup apparatus increases, the focusing accuracy of the lens and the speeding up of the focusing operation have become issues. Therefore, in order to speed up the focus operation of the image pickup device and improve the focusing accuracy, an image pickup device provided with an image pickup device capable of acquiring a parallax image signal, that is, an image signal for acquiring phase difference information at the same time as a captured image signal is provided. Proposed. Patent Document 1 discloses an image pickup device including an image pickup element having a focus detection pixel for outputting a signal used for calculating a defocus amount and an image pickup pixel.

特開2014−137567号公報Japanese Unexamined Patent Publication No. 2014-137567

特許文献1が開示する撮像装置は、焦点検出用画素と撮像用画素から信号を同時に読み出すので、撮像素子からの信号の読み出し帯域が増加してしまう。撮像素子からの信号の読み出し帯域(垂直ライン数)が基準ライン数を超過すると、読み出し誤動作が発生する。また、読み出し帯域が増加に応じて信号出力用の端子を増加させると、撮像素子のパッケージが大型化したり、消費電力が増加したりする。 Since the image pickup apparatus disclosed in Patent Document 1 simultaneously reads signals from the focus detection pixel and the image pickup pixel, the band for reading the signal from the image pickup element increases. If the read band (the number of vertical lines) of the signal from the image sensor exceeds the number of reference lines, a read malfunction occurs. Further, if the number of terminals for signal output is increased according to the increase in the read band, the package of the image sensor becomes large and the power consumption increases.

本発明は、視差画像信号と撮影画像信号とを出力する撮像素子を有する撮像装置であって、撮像素子からの信号の読み出し帯域の超過による読み出し誤動作を防止することが可能な撮像装置の提供を目的とする。 The present invention provides an image pickup device having an image pickup device that outputs a disparity image signal and a captured image signal, and is capable of preventing a read-out malfunction due to an excess of the read-out band of a signal from the image pickup device. The purpose.

本発明の一実施形態の撮像装置は、撮影画像信号と視差画像信号とを出力する撮像素子と、前記撮影画像信号に基づいて、被写体領域を選択し、選択した被写体領域に対応する前記撮像素子の読み出し領域から前記視差画像信号を読み出す制御を行う制御手段とを備える。前記制御手段は、被写体領域が複数存在する場合に、前記読み出し領域に対応する垂直ライン数が閾値を超えないように、前記被写体領域を選択する。 The image pickup device according to the embodiment of the present invention is an image pickup device that outputs a captured image signal and a parallax image signal, and the image pickup device that selects a subject area based on the photographed image signal and corresponds to the selected subject area. A control means for controlling the reading of the differential image signal from the reading area of the above is provided. When a plurality of subject areas exist, the control means selects the subject area so that the number of vertical lines corresponding to the read area does not exceed the threshold value.

本発明の撮像装置によれば、視差画像信号と撮影画像信号とを出力する場合における、撮像素子からの信号の読み出し帯域の超過による読み出し誤動作を防止することが可能となる。 According to the image pickup apparatus of the present invention, when the parallax image signal and the captured image signal are output, it is possible to prevent a reading malfunction due to an excess of the reading band of the signal from the image sensor.

本実施形態の撮像装置の構成例を示す図である。It is a figure which shows the structural example of the image pickup apparatus of this embodiment. 撮像素子の構成の一例を示す図である。It is a figure which shows an example of the structure of an image sensor. 位相差情報取得用画像領域の設定を説明する図である。It is a figure explaining the setting of the image area for phase difference information acquisition. 位相差情報取得用画像領域の設定を説明する図である。It is a figure explaining the setting of the image area for phase difference information acquisition. 顔検出枠の合焦位置と焦点位置との関係を示す図である。It is a figure which shows the relationship between the focusing position and the focal position of a face detection frame. 実施例1における位相差情報取得用画像領域の設定を説明する図である。It is a figure explaining the setting of the image area for acquisition of phase difference information in Example 1. FIG. 位相差情報取得用画像領域の設定処理を説明するフローチャートである。It is a flowchart explaining the setting process of the image area for phase difference information acquisition. 位相差情報取得用画像領域の設定処理を説明するフローチャートである。It is a flowchart explaining the setting process of the image area for phase difference information acquisition. 実施例2における位相差情報取得用画像領域の読み出し時間分割制御を説明する図である。It is a figure explaining the reading time division control of the image area for phase difference information acquisition in Example 2. FIG. 位相差情報取得用画像の第1の選択枠と他枠の焦点位置算出方法を説明する図である。It is a figure explaining the focus position calculation method of the 1st selection frame and the other frame of the phase difference information acquisition image. 実施例3における被写体撮影画像のフレームレートと、位相差情報取得用画像の閾値を説明する図である。It is a figure explaining the frame rate of the subject photographed image and the threshold value of the phase difference information acquisition image in Example 3. FIG. 本撮像装置内部に備えたCPUの構成例を示す図である。It is a figure which shows the configuration example of the CPU provided inside this image pickup apparatus.

撮影画像から検出される被写体(例えば、顔)に対応する撮像素子の読み出し領域を指定し、この読み出し領域から視差画像信号を読み出す撮像装置が考えられる。しかし、検出された被写体の領域(被写体領域)が複数存在する場合には、読み出し帯域が増加して、読み出し誤動作が生じるという課題がある。以下に説明する本実施形態の撮像装置によれば、この課題を解決することができる。 An imaging device is conceivable in which a readout area of an image pickup device corresponding to a subject (for example, a face) detected from a captured image is designated, and a parallax image signal is read from this readout area. However, when there are a plurality of detected subject areas (subject areas), there is a problem that the read band increases and a read malfunction occurs. According to the image pickup apparatus of the present embodiment described below, this problem can be solved.

(実施例1)
図1は、本実施形態の撮像装置の構成例を示す図である。
図1に示す撮像装置は、レンズ1乃至CPU7を備える。
レンズ1は、被写体を撮像する撮像部を構成する。撮像素子2は、レンズ1からの光信号を電気信号に変換する。撮像素子2は、位相差取得用画像領域を読み出すことが可能なX−Yアドレスに配置した画素を有する。位相差取得用画像領域は、後述する視差画像を読み出すための読み出し領域である。
(Example 1)
FIG. 1 is a diagram showing a configuration example of the imaging device of the present embodiment.
The image pickup apparatus shown in FIG. 1 includes lenses 1 to CPU 7.
The lens 1 constitutes an imaging unit that images a subject. The image sensor 2 converts an optical signal from the lens 1 into an electric signal. The image pickup device 2 has pixels arranged at XY addresses capable of reading out the phase difference acquisition image region. The phase difference acquisition image area is a reading area for reading a parallax image described later.

撮像素子2は、1つのマイクロレンズと、カラーフィルタに対して、2つのフォトダイオードで構成されている。撮像素子2からは、2つのフォトダイオードからの信号を加算して得られる信号(撮影画像信号)と、2つのフォトダイオードのうちの1つのフォトダイオードからの出力信号(視差画像信号)が、同時に出力される。以下では、撮影画像信号に係る画像を撮影画像または本画像、視差画像信号に係る画像を視差画像または片目画像と記述する。 The image sensor 2 is composed of one microlens and two photodiodes for a color filter. From the image sensor 2, a signal obtained by adding the signals from the two photodiodes (captured image signal) and an output signal from one of the two photodiodes (differential image signal) are simultaneously generated. It is output. Hereinafter, the image related to the captured image signal will be referred to as a captured image or the main image, and the image related to the parallax image signal will be referred to as a parallax image or a one-eye image.

現像処理部3は、撮像素子2から出力された本画像を現像処理する。顔検出部5は、現像された本画像から顔領域を抽出する。顔検出ライン測定部6は、顔検出部5による出力信号に基づいて、顔領域が抽出された垂直ライン数を測定する。 The development processing unit 3 develops the main image output from the image sensor 2. The face detection unit 5 extracts a face region from the developed main image. The face detection line measurement unit 6 measures the number of vertical lines from which the face region is extracted based on the output signal from the face detection unit 5.

CPU(Central Processing Unit)7は、撮像装置全体を制御する。CPU7には、顔検出部5からの出力信号と、顔検出ライン測定部6からの出力信号が入力される。CPU7は、基準ライン数と、顔検出部5からの出力信号とに基づいて、顔検出枠の優先順位を設定する。基準ライン数は、予め決められた基準となる垂直ライン数である。CPU7は、優先順位付けした顔検出枠に応じて、位相差情報取得用画像領域を設定する。 The CPU (Central Processing Unit) 7 controls the entire imaging device. The output signal from the face detection unit 5 and the output signal from the face detection line measurement unit 6 are input to the CPU 7. The CPU 7 sets the priority of the face detection frame based on the number of reference lines and the output signal from the face detection unit 5. The reference line number is a predetermined number of vertical lines as a reference. The CPU 7 sets the phase difference information acquisition image area according to the prioritized face detection frame.

ここで、CPU7の内部動作について、図12を参照しながら説明する。図12は、本撮像装置内部に備えたCPUの構成例を示す図である。
CPU7には、顔検出部5からの出力信号と、顔検出ライン測定部6からの出力信号が入力される。前記顔検出ライン測定部6からの出力信号は、比較器101に入力される。比較器101には、他方、予め備えた基準ライン数100から、撮像素子2からの位相差情報取得用画像の総ラインの閾値(基準ライン数)である情報が入力される。比較器101は、2つの入力信号から、現在の顔検出枠に対応する位相差情報取得用画像の総ライン数が基準ライン数以上か以下かを判定し、枠選択102の情報を出力する。
Here, the internal operation of the CPU 7 will be described with reference to FIG. FIG. 12 is a diagram showing a configuration example of a CPU provided inside the image pickup apparatus.
The output signal from the face detection unit 5 and the output signal from the face detection line measurement unit 6 are input to the CPU 7. The output signal from the face detection line measuring unit 6 is input to the comparator 101. On the other hand, information that is a threshold value (number of reference lines) of the total lines of the phase difference information acquisition image from the image sensor 2 is input to the comparator 101 from the number of reference lines 100 provided in advance. The comparator 101 determines from the two input signals whether the total number of lines of the phase difference information acquisition image corresponding to the current face detection frame is equal to or less than the reference line number, and outputs the information of the frame selection 102.

枠選択102には、顔検出部5からの枠情報が入力される。さらに、枠選択102には、各顔検出枠のデフォーカス量を算出するデフォーカス量算出104を介した位相差情報算出部4からの出力信号についての情報が入力される。さらに、枠選択102には、検出した複数の顔検出枠の中で、第1の選択枠に設定された枠の情報も入力される。枠選択102は、入力された4つの情報から、検出された複数の顔検出枠の中で優先順位づけと、1フレーム内で読み出す顔検出枠に対応する位相差情報取得用画像の領域情報を、位相差画像読み出し領域設定値算出部103に出力する。位相差画像読み出し領域設定値算出部103は、撮像素子2に対しての読み出し設定値を算出し、撮像素子2に出力する。 The frame information from the face detection unit 5 is input to the frame selection 102. Further, in the frame selection 102, information about an output signal from the phase difference information calculation unit 4 via the defocus amount calculation 104 that calculates the defocus amount of each face detection frame is input. Further, in the frame selection 102, information on the frame set in the first selection frame among the detected plurality of face detection frames is also input. The frame selection 102 prioritizes among the plurality of detected face detection frames from the four input information, and selects the area information of the image for acquiring phase difference information corresponding to the face detection frame read within one frame. , Output to the phase difference image reading area setting value calculation unit 103. The phase difference image reading area setting value calculation unit 103 calculates the reading setting value for the image pickup device 2 and outputs it to the image pickup device 2.

位相差情報算出部4は、本画像(R+L)と、片目画像(L)とから、もう一方の片目画像(R)を生成する。位相差情報算出部4は、片目画像(L)と、片目画像(R)とに基づいて、位相差情報を算出する。 The phase difference information calculation unit 4 generates the other one-eye image (R) from the main image (R + L) and the one-eye image (L). The phase difference information calculation unit 4 calculates the phase difference information based on the one-eye image (L) and the one-eye image (R).

図2は、撮像素子の構成の一例を示す図である。
撮像素子2は、図2(A)、(B)に示すように、1つのマイクロレンズと、カラーフィルタに対して、2つのフォトダイオードを備えることで、1つの画素を構成している。画素は、X−Yアドレス上に配置されている。各画素で構成された撮像素子2は、2つのフォトダイオードからの出力信号を加算した本画像と、2つのフォトダイオードのうちの1つのフォトダイオードからの出力信号である片目画像Lとを、同時にRAW画像として出力する。撮像素子2は、本画像を現像処理部3に出力する。また、撮像素子2は、本画像と片目画像とを、位相差情報算出部4に出力する。
FIG. 2 is a diagram showing an example of the configuration of the image sensor.
As shown in FIGS. 2A and 2B, the image pickup device 2 includes one microlens and two photodiodes for a color filter to form one pixel. The pixels are arranged on the XY addresses. The image sensor 2 composed of each pixel simultaneously produces the main image obtained by adding the output signals from the two photodiodes and the one-eye image L which is the output signal from one photodiode of the two photodiodes. Output as a RAW image. The image sensor 2 outputs this image to the development processing unit 3. Further, the image sensor 2 outputs the main image and the one-eye image to the phase difference information calculation unit 4.

現像処理部3は、入力された本画像であるRAW画像に対して、各画素の補間処理や、色補正処理等の現像処理を行い、現像画像(YUV画像)を生成する。現像処理部3は、現像画像を顔検出部5に出力する。 The development processing unit 3 performs development processing such as interpolation processing of each pixel and color correction processing on the input RAW image, which is the main image, to generate a developed image (YUV image). The development processing unit 3 outputs the developed image to the face detection unit 5.

位相差情報算出部4は、入力された本画像から、片目画像(L)を引くことにより、片目画像(R)を生成する。位相差情報算出部4は、片目画像(L)と片目画像(R)とを比較することにより、位相差情報を算出する。算出した位相差情報は、例えば、フォーカス調整用信号として使用可能であり、レンズ1が備えるフォーカス調整部に制御信号を送信することにより、フォーカス調整を行うことができる。 The phase difference information calculation unit 4 generates a one-eye image (R) by subtracting a one-eye image (L) from the input main image. The phase difference information calculation unit 4 calculates the phase difference information by comparing the one-eye image (L) and the one-eye image (R). The calculated phase difference information can be used as a focus adjustment signal, for example, and the focus adjustment can be performed by transmitting a control signal to the focus adjustment unit included in the lens 1.

顔検出部5は、現像処理部3から入力されたYUV画像内に顔があるか否かの判定を行う。顔があった場合には、顔検出部5は、顔に相当する領域を顔領域として、顔検出ライン測定部6に出力する。また、顔検出部5は、顔領域に相当する垂直方向の位置情報をCPU7に出力する。 The face detection unit 5 determines whether or not there is a face in the YUV image input from the development processing unit 3. When there is a face, the face detection unit 5 outputs a region corresponding to the face as a face region to the face detection line measurement unit 6. Further, the face detection unit 5 outputs the position information in the vertical direction corresponding to the face area to the CPU 7.

顔検出ライン測定部6は、入力された顔領域情報から、垂直ライン数Lfの測定を行う。顔検出ライン測定部6は、CPU7に垂直ライン数Lfの情報を出力する。また、顔検出部5で検出した顔領域が複数ある場合には、顔検出部5は、全ての顔検出枠の情報を、顔検出ライン測定部6に出力する。そして、顔検出ライン測定部6各顔検出枠に相当する領域の垂直ライン数Lf(1〜N)の情報をCPU7に出力する。 The face detection line measurement unit 6 measures the number of vertical lines Lf from the input face area information. The face detection line measurement unit 6 outputs information on the number of vertical lines Lf to the CPU 7. When there are a plurality of face regions detected by the face detection unit 5, the face detection unit 5 outputs information of all the face detection frames to the face detection line measurement unit 6. Then, the information of the number of vertical lines Lf (1 to N) in the area corresponding to each face detection frame of the face detection line measurement unit 6 is output to the CPU 7.

CPU7は、撮像装置全体を制御する。CPU7には、顔検出部5から、顔領域に相当する垂直方向の位置情報が入力される。また、CPU7には、顔検出ライン測定部6から、複数の顔領域の垂直ライン数Lf(1〜N)の情報が入力される。CPU7は、Lf(1〜N)の合計値LfSを算出する。また、CPU7は、顔領域の合計垂直ライン数LfSと比較するための基準ライン数Lcを備える。 The CPU 7 controls the entire imaging device. Position information in the vertical direction corresponding to the face area is input to the CPU 7 from the face detection unit 5. Further, information on the number of vertical lines Lf (1 to N) of a plurality of face regions is input to the CPU 7 from the face detection line measurement unit 6. The CPU 7 calculates the total value LfS of Lf (1 to N). Further, the CPU 7 includes a reference line number Lc for comparison with the total vertical line number LfS of the face area.

また、CPU7は、入力された複数の顔領域(顔の位置や大きさ)から、主顔を最優先の選択枠である第1の選択枠に設定し、第1の選択枠の焦点位置と、他枠の焦点位置を計算する。CPU7は、第1の選択枠と焦点位置が近い顔領域を、優先順位が第2番目の選択枠である第2の選択枠に設定し、焦点位置が次に近い顔領域を、優先順位が第3番目の選択枠である第3の選択枠に設定する。なお、主顔は、ユーザが任意に設定することも可能である。 Further, the CPU 7 sets the main face as the first selection frame, which is the highest priority selection frame, from the plurality of input face areas (face positions and sizes), and sets the focus position of the first selection frame. , Calculate the focal position of the other frame. The CPU 7 sets the face area whose focal position is close to that of the first selection frame in the second selection frame whose priority is the second selection frame, and sets the face area whose focus position is next closest to the first selection frame in the priority order. It is set in the third selection frame, which is the third selection frame. The main face can be arbitrarily set by the user.

ここで、各枠の焦点位置の計算方法を、図10を参照しながら説明する。図10は、位相差情報取得用画像の第1の選択枠と他枠の焦点位置算出方法を説明する図である。
撮像素子2からの各枠の位相差情報取得用画像の読み出しは、フレームA〜Dを読み出す各時間で、時間分割で各枠の位相差情報取得用画像領域を切り替えて読み出す。図10では、撮像素子2からの位相差情報取得用画像領域を読み出す最大ライン数を700としており、各顔検出枠に相当する領域は、図4に示すとおり、顔検出枠A:450、顔検出枠B:330、顔検出枠C:220である。
Here, a method of calculating the focal position of each frame will be described with reference to FIG. FIG. 10 is a diagram illustrating a method of calculating the focal position of the first selection frame and the other frame of the phase difference information acquisition image.
The image for acquiring the phase difference information of each frame is read from the image sensor 2 by switching the image area for acquiring the phase difference information of each frame by time division at each time for reading the frames A to D. In FIG. 10, the maximum number of lines for reading out the phase difference information acquisition image area from the image sensor 2 is 700, and the areas corresponding to each face detection frame are face detection frame A: 450 and faces as shown in FIG. The detection frame B: 330 and the face detection frame C: 220.

また、第1の選択枠は、顔検出枠Aとする。そのため、はじめにフレームAの時間では、位相差情報取得用画像領域は、A枠とB枠を読み出す。次に、フレームBの時間では、位相差情報取得用画像領域は、A枠とC枠を読み出す。次に、フレームCの時間では、位相差情報取得用画像領域は、A枠とB枠を読み出す。次に、フレームDの時間では、位相差情報取得用画像領域は、A枠とC枠を読み出す。次に、各フレームで読み出した各位相差情報取得用画像領域から、各枠の位相差を算出し、各枠のデフォーカス量の算出を行う。そして、デフォーカス算出結果から、第1の選択枠Aに近い焦点位置となる枠を判定し、第2の選択枠、第3の選択枠に設定する。 The first selection frame is the face detection frame A. Therefore, first, in the time of frame A, the phase difference information acquisition image area reads out the A frame and the B frame. Next, at the time of frame B, the phase difference information acquisition image area reads out the A frame and the C frame. Next, at the time of frame C, the phase difference information acquisition image area reads out the A frame and the B frame. Next, in the time of frame D, the phase difference information acquisition image area reads out the A frame and the C frame. Next, the phase difference of each frame is calculated from the image area for acquiring the phase difference information read in each frame, and the defocus amount of each frame is calculated. Then, from the defocus calculation result, a frame having a focal position close to the first selection frame A is determined, and the frame is set as the second selection frame and the third selection frame.

CPU7は、顔領域の合計垂直ライン数LfSと、閾値である基準ライン数Lcとを比較し、比較結果に基づいて、位相差情報取得用画像領域に対応する顔領域(被写体領域)を選択する。具体的には、CPU7は、顔領域の合計垂直ライン数LfSが基準ライン数Lc以下である場合(LfS≦Lc)には、以下の処理を実行する。CPU7は、入力されたすべての顔領域を選択し、当該顔領域に対応する領域を、位相差情報取得用画像領域として、撮像素子2に設定する。 The CPU 7 compares the total number of vertical lines LfS in the face area with the reference number Lc which is the threshold value, and selects the face area (subject area) corresponding to the image area for acquiring phase difference information based on the comparison result. .. Specifically, when the total number of vertical lines LfS in the face area is equal to or less than the number of reference lines Lc (LfS ≦ Lc), the CPU 7 executes the following processing. The CPU 7 selects all the input face regions, and sets the region corresponding to the face region in the image sensor 2 as an image region for acquiring phase difference information.

また、CPU7は、基準ライン数Lcよりも、顔領域の合計垂直ライン数LfSが大きい場合(LfS>Lc)には、以下の処理を実行する。CPU7は、第1の選択枠に対応する領域を、位相差情報取得用画像領域に設定する。 Further, the CPU 7 executes the following processing when the total number of vertical lines LfS in the face area is larger than the reference number Lc (LfS> Lc). The CPU 7 sets the area corresponding to the first selection frame as the phase difference information acquisition image area.

また、CPU7は、第1の選択枠の垂直ライン数Lf1が基準ライン数Lc以下である場合(Lf1≦Lc)には、以下の処理を実行する。CPU7は、第2の選択枠を選択候補とする。さらに、第1の選択枠の垂直ライン数Lf1と、第2の選択枠の垂直ライン数Lf2の合計が、基準ライン数Lc以下である場合には、CPU7は、以下の処理を実行する。CPU7は、第1の選択枠と、第2の選択枠を選択し、これらに対応する領域を位相差情報取得用画像読み出し領域に設定する。 Further, when the number of vertical lines Lf1 of the first selection frame is equal to or less than the number of reference lines Lc (Lf1 ≦ Lc), the CPU 7 executes the following processing. The CPU 7 uses the second selection frame as a selection candidate. Further, when the total of the number of vertical lines Lf1 of the first selection frame and the number of vertical lines Lf2 of the second selection frame is equal to or less than the number of reference lines Lc, the CPU 7 executes the following processing. The CPU 7 selects the first selection frame and the second selection frame, and sets the area corresponding to these as the phase difference information acquisition image reading area.

さらに、第1の選択枠の垂直ライン数Lf1と、第2の選択枠の垂直ライン数Lf2と、第3の選択枠の垂直ライン数Lf3の合計が、基準ライン数Lc以下である場合には、以下の処理を実行する。CPU7は、第3の選択枠に対応する領域を追加で位相差情報取得用画像読み出し領域に設定する。以上のように、CPU7は、選択枠の合計垂直ライン数が基準ライン数Lcを超えないように、優先順位にしたがって、選択枠に対応する領域を位相差情報取得用画像読み出し領域に設定していく。 Further, when the total of the number of vertical lines Lf1 of the first selection frame, the number of vertical lines Lf2 of the second selection frame, and the number of vertical lines Lf3 of the third selection frame is equal to or less than the number of reference lines Lc. , Execute the following processing. The CPU 7 additionally sets an area corresponding to the third selection frame as an image reading area for acquiring phase difference information. As described above, the CPU 7 sets the area corresponding to the selection frame as the phase difference information acquisition image reading area according to the priority so that the total number of vertical lines of the selection frame does not exceed the reference line number Lc. I will go.

図3および図4は、位相差情報取得用画像領域の設定を説明する図である。
図3(A)は、本画像を示す。本画像の画像サイズは、4K*2K(4096ピクセル*2160ライン)である。図3(A)に示す本画像には、顔検出枠Aが示されている。CPU7内部に備える基準ライン数Lcは、700ラインに設定している。
3 and 4 are diagrams for explaining the setting of the phase difference information acquisition image area.
FIG. 3A shows this image. The image size of this image is 4K * 2K (4096 pixels * 2160 lines). The face detection frame A is shown in the image shown in FIG. 3 (A). The reference line number Lc provided inside the CPU 7 is set to 700 lines.

図3(A)に示す例では、顔検出枠Aに対応する領域が位相差情報取得用画像領域Aとして設定される候補となる。図3(B)は、位相差情報取得用画像領域Aを示す図である。位相差情報取得用画像領域Aの垂直ライン数情報Lfは、450ラインである。
図3(A)、(B)に示す例では、顔検出枠は1つであり、LfS=450となるので、LfS<Lcである。したがって、撮像素子2に設定される位相差情報取得用画像領域は、顔検出枠Aに対応する位相差情報取得用画像領域Aのみである。
In the example shown in FIG. 3A, the region corresponding to the face detection frame A is a candidate to be set as the phase difference information acquisition image region A. FIG. 3B is a diagram showing an image area A for acquiring phase difference information. The vertical line number information Lf of the phase difference information acquisition image area A is 450 lines.
In the examples shown in FIGS. 3A and 3B, there is only one face detection frame, and LfS = 450, so LfS <Lc. Therefore, the phase difference information acquisition image area set in the image sensor 2 is only the phase difference information acquisition image area A corresponding to the face detection frame A.

図4(A)に示す例では、撮影画像内に顔検出枠A、B、Cという3つの顔検出枠が存在する。この例では、図4(B)に示すように、顔検出枠A、B、Cそれぞれに対応する位相差情報取得用画像領域A,B,Cが、設定される位相差情報取得用画像領域の候補となる。位相差情報取得用画像領域A、B、Cそれぞれの垂直ライン数情報LfA、LfB、LfCは、450ライン、220ライン、330ラインである。 In the example shown in FIG. 4A, there are three face detection frames A, B, and C in the captured image. In this example, as shown in FIG. 4B, the phase difference information acquisition image areas A, B, and C corresponding to the face detection frames A, B, and C are set. Candidates for. The vertical line number information LfA, LfB, and LfC of each of the phase difference information acquisition image areas A, B, and C are 450 lines, 220 lines, and 330 lines.

図4(A),(B)に示す例では、顔検出枠は3つであるので、LfS=LfA+LfB+LfC=1000となる。したがって、LfS>Lcとなって、基準値を超えてしまう。このため、全ての位相差情報取得用画像領域を撮像素子2から読み出すことはできない。 In the examples shown in FIGS. 4A and 4B, since there are three face detection frames, LfS = LfA + LfB + LfC = 1000. Therefore, LfS> Lc, and the reference value is exceeded. Therefore, it is not possible to read out all the phase difference information acquisition image regions from the image sensor 2.

図5は、図4に示す複数の顔検出枠の合焦位置と焦点位置との関係を示す図である。
焦点位置が至近から無限遠にかけて、顔検出枠A、顔検出枠B、顔検出枠Cの順に配置されている。図5から、顔検出枠Aの焦点位置と顔検出枠Bの焦点位置とが近いことがわかる。
FIG. 5 is a diagram showing the relationship between the in-focus position and the focal position of the plurality of face detection frames shown in FIG.
The face detection frame A, the face detection frame B, and the face detection frame C are arranged in this order from the closest to infinity at the focal position. From FIG. 5, it can be seen that the focal position of the face detection frame A and the focal position of the face detection frame B are close to each other.

図6は、実施例1における位相差情報取得用画像領域の設定を説明する図である。
図4(B)に示すように、撮影画像中に顔検出枠が3つあり、かつ基準ライン数Lcが700であるものとする。図6(A)は、3つの顔検出枠の中で、顔検出枠Aが最優先の選択枠である第1の選択枠に指定された場合における、位相差情報取得用画像領域の設定を示す。
FIG. 6 is a diagram illustrating the setting of the phase difference information acquisition image region in the first embodiment.
As shown in FIG. 4B, it is assumed that there are three face detection frames in the captured image and the reference line number Lc is 700. FIG. 6A shows the setting of the phase difference information acquisition image area when the face detection frame A is designated as the first selection frame, which is the highest priority selection frame, among the three face detection frames. Shown.

顔検出枠Aに対応する垂直ライン数情報Lf=LfA=450であり、基準ライン数Lc=700である。したがって、顔検出枠Aに対応する垂直ラインを位相差情報取得用画像領域として、設定して読み出した場合、まだ基準ライン数Lcに対して、垂直ラインが250ライン分余る。 The number of vertical lines information Lf = LfA = 450 corresponding to the face detection frame A, and the number of reference lines Lc = 700. Therefore, when the vertical line corresponding to the face detection frame A is set as the image area for acquiring the phase difference information and read out, 250 vertical lines are still left with respect to the reference line number Lc.

そこで、第1の選択枠、つまり顔検出枠Aの焦点位置に近い枠である顔検出枠Bを、第2の選択枠の候補とする。その場合、垂直ライン数情報は、以下の状態となる。
垂直ライン数情報Lf=LfA+LfB=450+220=670
基準ライン数Lc=700
Therefore, the first selection frame, that is, the face detection frame B, which is a frame close to the focal position of the face detection frame A, is used as a candidate for the second selection frame. In that case, the vertical line number information is in the following state.
Vertical line number information Lf = LfA + LfB = 450 + 220 = 670
Reference line number Lc = 700

本状態から、基準ライン数Lcに対して、顔検出枠Aに対応する垂直ラインと、顔検出枠Bに対応する垂直ラインを、位相差情報取得用画像領域として設定し、読み出した場合でも、まだ基準ライン数Lcに対して、垂直ラインが30ライン分余る。 From this state, even when the vertical line corresponding to the face detection frame A and the vertical line corresponding to the face detection frame B are set as the phase difference information acquisition image area and read out with respect to the reference line number Lc. There are still 30 vertical lines left over the reference line number Lc.

次に、顔検出枠Aの焦点位置に対して、顔検出枠Bの次に近い枠である顔検出枠Cを、第3の選択枠の候補とする。その場合、垂直ライン数情報は、以下の状態となる。
垂直ライン数情報Lf=LfA+LfB+LfC=450+220+330=1000
基準ライン数Lc=700
Next, the face detection frame C, which is the frame next to the face detection frame B with respect to the focal position of the face detection frame A, is set as a candidate for the third selection frame. In that case, the vertical line number information is in the following state.
Vertical line number information Lf = LfA + LfB + LfC = 450 + 220 + 330 = 1000
Reference line number Lc = 700

本状態の場合、第3の選択枠まで読み出すと、基準ライン数Lcを超えてしまう。したがって、第1の選択枠を顔検出枠Aとした場合、撮像素子2から読み出す位相差情報取得用画像領域は、顔検出枠Aと顔検出枠Bに対応する位相差情報取得用画像領域となる。 In this state, if the third selection frame is read, the number of reference lines Lc will be exceeded. Therefore, when the first selection frame is the face detection frame A, the phase difference information acquisition image area read from the image sensor 2 is the phase difference information acquisition image area corresponding to the face detection frame A and the face detection frame B. Become.

図6(B)に示す例では、3つの顔検出枠の中で、顔検出枠Bが第1の選択枠に指定された場合を想定する。
顔検出枠Bが第1の選択枠に選択された状態では、垂直ライン数情報Lf=LfB=220となる。また、基準ライン数Lc=700である。
In the example shown in FIG. 6B, it is assumed that the face detection frame B is designated as the first selection frame among the three face detection frames.
In the state where the face detection frame B is selected as the first selection frame, the vertical line number information Lf = LfB = 220. Further, the number of reference lines Lc = 700.

本状態から、顔検出枠Bに対応する垂直ラインを位相差情報取得用画像領域として設定し、読み出した場合、まだ基準ライン数Lcに対して、垂直ラインが、480ライン分余る。そこで、第1の選択枠、つまり顔検出枠Bの焦点位置に近い枠である顔検出枠Cを、第2の選択枠の候補とする。その場合、前記垂直ライン数情報は、以下の状態となる。
垂直ライン数情報Lf=LfB+LfC=220+330=550
基準ライン数Lc=700
From this state, when the vertical line corresponding to the face detection frame B is set as the image area for acquiring phase difference information and read out, there are still 480 vertical lines remaining with respect to the reference line number Lc. Therefore, the first selection frame, that is, the face detection frame C, which is a frame close to the focal position of the face detection frame B, is used as a candidate for the second selection frame. In that case, the vertical line number information is in the following state.
Vertical line number information Lf = LfB + LfC = 220 + 330 = 550
Reference line number Lc = 700

本状態から、顔検出枠Bに対応する垂直ラインと、顔検出枠Cに対応する垂直ラインを、位相差情報取得用画像領域として設定し、読み出した場合でも、まだ基準ライン数Lcに対して、垂直ラインが150ライン分余る。 From this state, even when the vertical line corresponding to the face detection frame B and the vertical line corresponding to the face detection frame C are set as the image area for acquiring the phase difference information and read out, the number of reference lines is still Lc. , There are more than 150 vertical lines.

次に、顔検出枠Cを、第3の選択枠の候補とした場合、顔検出枠Aの垂直ライン数は、450ラインあるので、第3の選択枠まで読み出すと、基準ライン数Lcを超えてしまう。したがって、第1の選択枠を、顔検出枠Bとした場合、撮像素子2から読み出す位相差情報取得用画像領域は、顔検出枠Bと顔検出枠Cに対応する位相差情報取得用画像領域となる。このように、撮影画像中の顔検出枠が複数ある場合は、予め設定した基準ライン数と、第1の選択枠の垂直ライン数とを比較し、余剰がある場合には、第2の選択枠、第3の選択枠というように、設定枠の候補を増やしていく。そして、設定枠の候補の垂直ライン数の合計が基準ライン数を超えないように、位相差情報取得用画像領域を設定する。すなわち、CPU7は、主たる被写体の顔検出枠を最優先の優先順位とし、主たる被写体の焦点位置に近い顔検出枠ほど高い優先順位とする。そして、優先順位の高い順に、選択後の被写体領域に対応する垂直ライン数の合計が基準ライン数Lcを超えないように、位相差情報取得用画像領域に対応する顔検出枠を選択する。 Next, when the face detection frame C is used as a candidate for the third selection frame, the number of vertical lines of the face detection frame A is 450, so when the face detection frame C is read up to the third selection frame, the number of reference lines Lc is exceeded. It ends up. Therefore, when the first selection frame is the face detection frame B, the phase difference information acquisition image area read from the image sensor 2 is the phase difference information acquisition image area corresponding to the face detection frame B and the face detection frame C. It becomes. In this way, when there are a plurality of face detection frames in the captured image, the number of preset reference lines is compared with the number of vertical lines of the first selection frame, and if there is a surplus, the second selection is made. We will increase the candidates for the setting frame, such as the frame and the third selection frame. Then, the phase difference information acquisition image area is set so that the total number of vertical lines of the candidates of the setting frame does not exceed the number of reference lines. That is, the CPU 7 gives the face detection frame of the main subject the highest priority, and the face detection frame closer to the focal position of the main subject has the higher priority. Then, in descending order of priority, the face detection frame corresponding to the phase difference information acquisition image area is selected so that the total number of vertical lines corresponding to the selected subject area does not exceed the reference line number Lc.

図7および図8は、位相差情報取得用画像領域の設定処理を説明するフローチャートである。
S1000において、CPU7が、撮像素子2からの読み出しを開始し、撮影画像と同時に位相差情報取得用画像を出力する。S1001において、顔検出部5が、撮像素子2から出力された撮影画像用のRAW画像に現像処理を施したYUV画像から顔領域の抽出(顔検出)を行う。
7 and 8 are flowcharts for explaining the setting process of the image area for acquiring phase difference information.
In S1000, the CPU 7 starts reading from the image sensor 2 and outputs a phase difference information acquisition image at the same time as the captured image. In S1001, the face detection unit 5 extracts a face region (face detection) from a YUV image obtained by developing a RAW image for a captured image output from the image sensor 2.

次に、S1002において、CPU7が、顔検出の結果から、撮影画像に顔があるか否かを判定する。撮影画像に顔がない場合は、処理がS1003に進む。S1003において、CPU7が、予め記憶手段に記憶された基準位相差読み出し位置を、位相差情報取得用画像領域に指定する。そして、処理が図8のS1016に進み、CPU7が、撮像素子2に位相差情報取得用画像領域を設定する。 Next, in S1002, the CPU 7 determines whether or not there is a face in the captured image from the result of face detection. If there is no face in the captured image, the process proceeds to S1003. In S1003, the CPU 7 designates a reference phase difference read position previously stored in the storage means in the phase difference information acquisition image area. Then, the process proceeds to S1016 of FIG. 8, and the CPU 7 sets the phase difference information acquisition image area in the image sensor 2.

撮影画像に顔がある場合は、CPU7が、検出された顔の枠(顔検出枠)を設定して、処理がS1004に進む。S1004において、顔検出ライン測定部6が、各々の顔検出枠に相当する垂直ライン数の測定を行う。続いて、S1005において、CPU7が、算出された各々の顔検出枠に相当する垂直ライン数の総和を算出する。S1006において、CPU7が、垂直ライン数の総和と、予め記憶手段に記憶された基準ライン数とを比較する。 If there is a face in the captured image, the CPU 7 sets the detected face frame (face detection frame), and the process proceeds to S1004. In S1004, the face detection line measuring unit 6 measures the number of vertical lines corresponding to each face detection frame. Subsequently, in S1005, the CPU 7 calculates the total number of vertical lines corresponding to each of the calculated face detection frames. In S1006, the CPU 7 compares the total number of vertical lines with the number of reference lines stored in advance in the storage means.

S1007において、CPU7が、垂直ライン数の総和が基準ライン数を超えたかを判定する。垂直ライン数の総和が基準ライン数を超えていない場合は、処理が図8のS1017に進む。そして、S1017において、CPU7が、抽出された全ての顔検出枠に相当する垂直ラインの領域を位相差情報取得用画像領域に指定し、処理がS1016に進む。そして、S1016において、CPU7が、撮像素子から指定した位相差情報取得用画像領域から画像を読み出すために、撮像素子2内部に設けられたタイミングジェネレータにデータ設定を行う。 In S1007, the CPU 7 determines whether the total number of vertical lines exceeds the number of reference lines. If the total number of vertical lines does not exceed the number of reference lines, the process proceeds to S1017 in FIG. Then, in S1017, the CPU 7 designates the area of the vertical line corresponding to all the extracted face detection frames as the phase difference information acquisition image area, and the process proceeds to S1016. Then, in S1016, the CPU 7 sets data in the timing generator provided inside the image sensor 2 in order to read the image from the phase difference information acquisition image area designated from the image sensor.

垂直ライン数の総和が基準ライン数を超えた場合は、処理がS1008に進む。S1008において、CPU7が、顔検出枠の中から、どの顔検出枠が主顔に設定されているかを検出する。CPU7は、主顔に設定されている顔検出枠を第1の選択枠とする。続いて、S1009において、CPU7が、各々の顔検出枠の焦点位置を算出し、第1の選択枠と、他の顔検出枠とで、焦点位置の比較を行う。S1010において、CPU7が、S1009における比較処理の結果に基づいて、第1の選択枠以外の顔検出枠から、第2の選択枠、第3の選択枠の設定を行う。 If the total number of vertical lines exceeds the number of reference lines, the process proceeds to S1008. In S1008, the CPU 7 detects which face detection frame is set as the main face from the face detection frames. The CPU 7 uses the face detection frame set for the main face as the first selection frame. Subsequently, in S1009, the CPU 7 calculates the focal position of each face detection frame, and compares the focal position between the first selection frame and the other face detection frame. In S1010, the CPU 7 sets the second selection frame and the third selection frame from the face detection frames other than the first selection frame based on the result of the comparison process in S1009.

図8のS1011において、CPU7が、設定された第1の選択枠と、第2の選択枠に対応する垂直ライン数の算出を行い、垂直ライン数の和を算出する。続いて、S1006において、CPU7が、S1011において算出された垂直ライン数の和と、基準ライン数とを比較する。 In S1011 of FIG. 8, the CPU 7 calculates the number of vertical lines corresponding to the set first selection frame and the second selection frame, and calculates the sum of the number of vertical lines. Subsequently, in S1006, the CPU 7 compares the sum of the number of vertical lines calculated in S1011 with the number of reference lines.

次に、S1007において、CPU7が、S1016における比較結果に基づいて、垂直ライン数の和が基準ライン数を超えたかを判定する。垂直ライン数の和が基準ライン数を超えた場合は、処理がS1012に進む。S1012において、CPU7が、第1の選択枠に対応する領域を位相差情報取得用画像領域に指定する。そして、S1016において、CPU7が、撮像素子内部に設けられたタイミングジェネレータにデータ設定を行う。 Next, in S1007, the CPU 7 determines whether the sum of the number of vertical lines exceeds the number of reference lines based on the comparison result in S1016. If the sum of the number of vertical lines exceeds the number of reference lines, the process proceeds to S1012. In S1012, the CPU 7 designates the area corresponding to the first selection frame as the phase difference information acquisition image area. Then, in S1016, the CPU 7 sets data in the timing generator provided inside the image sensor.

垂直ライン数の和が基準ライン数を超えない場合は、処理がS1013に進む。S1013において、CPU7が、第1の選択枠と、第2の選択枠と、第3の選択枠の垂直ライン数の総和を算出する。S1006において、CPU7が、垂直ライン数の和と基準ライン数とを比較する。 If the sum of the number of vertical lines does not exceed the number of reference lines, the process proceeds to S1013. In S1013, the CPU 7 calculates the total number of vertical lines of the first selection frame, the second selection frame, and the third selection frame. In S1006, the CPU 7 compares the sum of the number of vertical lines with the number of reference lines.

次に、CPU7が、垂直ライン数の和が基準ライン数を超えたかを判定する。垂直ライン数の和が基準ライン数を超えた場合は、処理がS1014に進む。S1014において、CPU7が、第1の選択枠と第2の選択枠とに対応する領域を位相差情報取得用画像領域に指定する。そして、S1016において、CPU7が、撮像素子内部に設けられたタイミングジェネレータにデータ設定を行う。 Next, the CPU 7 determines whether the sum of the number of vertical lines exceeds the number of reference lines. If the sum of the number of vertical lines exceeds the number of reference lines, the process proceeds to S1014. In S1014, the CPU 7 designates an area corresponding to the first selection frame and the second selection frame as the phase difference information acquisition image area. Then, in S1016, the CPU 7 sets data in the timing generator provided inside the image sensor.

垂直ライン数の和が基準ライン数を超えない場合は、処理がS1015に進む。S1015において、CPU7が、第2の選択枠と、第2の選択枠と、第3の選択枠のそれぞれに対応する領域を位相差情報取得用画像領域に指定する。そして、S1016において、CPU7が、撮像素子内部に設けられたタイミングジェネレータにデータ設定を行う。以上の処理により、撮影画像中に顔検出枠が複数ある場合でも、顔検出枠の優先順位設定に応じて、どの枠を位相差情報取得用画像領域に指定するかを制御することができる。これにより、撮像素子の読み出し帯域超過による読み出し不良を防止することができる。 If the sum of the number of vertical lines does not exceed the number of reference lines, the process proceeds to S1015. In S1015, the CPU 7 designates an area corresponding to each of the second selection frame, the second selection frame, and the third selection frame as the phase difference information acquisition image area. Then, in S1016, the CPU 7 sets data in the timing generator provided inside the image sensor. By the above processing, even if there are a plurality of face detection frames in the captured image, it is possible to control which frame is designated as the phase difference information acquisition image area according to the priority setting of the face detection frame. As a result, it is possible to prevent a read defect due to the reading band exceeding of the image sensor.

(実施例2)
実施例2の撮像装置は、撮影画像中の複数の顔検出枠に連動して、複数の位相差情報取得用画像領域を時間分割で読み出す。
(Example 2)
The image pickup apparatus of the second embodiment reads out a plurality of phase difference information acquisition image areas in a time-divided manner in conjunction with a plurality of face detection frames in the captured image.

図9は、実施例2における位相差情報取得用画像領域の読み出し時間分割制御を説明する図である。
基準ライン数Lcが500として説明する。図4(B)に示す3つの顔検出枠それぞれに対応する位相差情報取得用画像領域の基準ライン数は以下のとおりである。
顔検出枠A:450
顔検出枠B:220
顔検出枠C:330
基準ライン数Lcが500なので、1フレーム内で、全ての顔検出枠に対応する位相差情報取得用画像領域を読み出し対象の領域に設定することはできない。
FIG. 9 is a diagram illustrating the read time division control of the image region for acquiring phase difference information in the second embodiment.
The reference line number Lc will be described as 500. The number of reference lines in the phase difference information acquisition image region corresponding to each of the three face detection frames shown in FIG. 4B is as follows.
Face detection frame A: 450
Face detection frame B: 220
Face detection frame C: 330
Since the reference line number Lc is 500, it is not possible to set the phase difference information acquisition image area corresponding to all the face detection frames as the area to be read within one frame.

図9に示す例では、3つの顔検出枠の中で、顔検出枠Aが第1の選択枠に指定された場合、CPU7は、顔検出枠Aに一番近い焦点位置である顔検出枠Bを第2の選択枠に設定する。撮像素子2の読み出しフレームレートは、120fps(1秒間に120コマの画像を出力)であるものとする。 In the example shown in FIG. 9, when the face detection frame A is designated as the first selection frame among the three face detection frames, the CPU 7 has the face detection frame which is the focal position closest to the face detection frame A. Set B as the second selection frame. The read-out frame rate of the image sensor 2 is assumed to be 120 fps (120 frames of images are output per second).

CPU7は、第1の選択枠と、第2の選択枠を時間分割で読み出すように設定する。具体的には、CPU7は、第1の選択枠と、第2の選択枠の読み出し時間比率を2:1とする。つまり、CPU7は、第1の選択枠を2フレーム読んだ後、第2の選択枠を1フレーム読み出すよう制御する。撮像素子2の読み出しフレームレート120fpsのうち、顔検出枠Aに対応する位相差情報取得用画像領域は、80fpsとなり、顔検出枠Bに対応する位相差情報取得用画像領域は、40fpsとなる。これにより、複数の顔検出枠が被写体撮影画像中にあり、かつ1つの顔検出枠の位相差情報取得用画像領域しか読み出せない場合でも、複数の顔検出枠に応じた位相差情報取得用画像領域を読み出すことが可能となる。複数の顔検出枠の読み出し時間の比率は、任意の値に設定可能である。また、撮像装置の読み出しフレームレートや、撮像素子の読み出し画素数に応じて、読み出し時間比率を変更可能である。 The CPU 7 is set to read the first selection frame and the second selection frame in time division. Specifically, the CPU 7 sets the read time ratio of the first selection frame and the second selection frame to 2: 1. That is, the CPU 7 controls to read two frames of the first selection frame and then read one frame of the second selection frame. Of the 120 fps read frame rate of the image sensor 2, the phase difference information acquisition image area corresponding to the face detection frame A is 80 fps, and the phase difference information acquisition image area corresponding to the face detection frame B is 40 fps. As a result, even when a plurality of face detection frames are included in the subject captured image and only the phase difference information acquisition image area of one face detection frame can be read, the phase difference information acquisition according to the plurality of face detection frames can be performed. The image area can be read out. The ratio of the reading time of the plurality of face detection frames can be set to any value. Further, the read time ratio can be changed according to the read frame rate of the image pickup device and the number of read pixels of the image pickup device.

本実施例では、CPU7は、顔検出枠に対応する垂直ライン数と基準ライン数との比較結果に基づいて、1フレーム内で複数の被写体領域を選択できるかを判断する。1フレーム内で複数の被写体領域を選択できない場合に、CPU7は、第1の被写体の顔検出枠に対応する位相差情報取得用画像領域と、第2の被写体の顔検出枠に対応する位相差情報取得用画像領域とを時間分割で読み出す制御を行う。CPU7は、第1の被写体の顔検出枠に対応する位相差情報取得用画像領域から視差画像信号を読み出す第1のフレームレートに比べて、第2の被写体の顔検出枠に対応する位相差情報取得用画像領域から視差画像信号を読み出す第2のフレームレートを低くする。 In this embodiment, the CPU 7 determines whether a plurality of subject areas can be selected in one frame based on the comparison result between the number of vertical lines corresponding to the face detection frame and the number of reference lines. When a plurality of subject areas cannot be selected in one frame, the CPU 7 determines the phase difference information acquisition image area corresponding to the face detection frame of the first subject and the phase difference corresponding to the face detection frame of the second subject. Control is performed to read out the information acquisition image area in time division. The CPU 7 has a phase difference information corresponding to the face detection frame of the second subject as compared with the first frame rate for reading the parallax image signal from the image area for acquiring the phase difference information corresponding to the face detection frame of the first subject. The second frame rate for reading the parallax image signal from the acquisition image area is lowered.

また、複数の顔検出枠の優先順位として、予め設定された優先順位を用いてもよいし、ユーザの指定にしたがって、顔検出枠の優先順位を決定してもよい。すなわち、CPU7は、主たる被写体を第1の被写体とし、主たる被写体の焦点位置に近い被写体、またはユーザの操作にしたがって指定した被写体を第2の被写体とする。実施例2の撮像装置によれば、撮像素子の読み出し帯域超過による読み出し不良を防止することができる。 Further, as the priority of the plurality of face detection frames, a preset priority may be used, or the priority of the face detection frame may be determined according to the user's specification. That is, the CPU 7 sets the main subject as the first subject, and sets the subject close to the focal position of the main subject or the subject designated according to the user's operation as the second subject. According to the image pickup apparatus of the second embodiment, it is possible to prevent a read failure due to the reading band exceeding of the image pickup device.

(実施例3)
実施例3の撮像装置では、被写体撮影用画像フレームレートと、その際の位相差取得用画像の読み出しラインの閾値の設定方法について、図11を参照して説明する。
図11は、被写体撮影用画像フレームレートと、フレームレート選択時の位相差取得用画像の読み出しラインの閾値を示している。
(Example 3)
In the image pickup apparatus of the third embodiment, a method of setting an image frame rate for shooting a subject and a threshold value of a reading line of an image for acquiring a phase difference at that time will be described with reference to FIG.
FIG. 11 shows the image frame rate for shooting a subject and the threshold value of the reading line of the image for acquiring the phase difference when the frame rate is selected.

ここで、閾値の算出式(1)を示す。

(H*LAB+H*LA)*F = X ・・・(1)

被写体撮影用画像(A+B)と位相差取得用画像(A)の水平画素数 : H
被写体撮影用画像(A+B)の垂直ライン数 : LAB
位相差取得用画像(A)の垂直ライン数 : LA
被写体撮影用画像(A+B)のフレームレート : F
撮像素子の最大読み出しレート : X
Here, the threshold calculation formula (1) is shown.

(H * LAB + H * LA) * F = X ... (1)

Number of horizontal pixels of the subject shooting image (A + B) and the phase difference acquisition image (A): H
Number of vertical lines in the subject shooting image (A + B): LAB
Number of vertical lines in the phase difference acquisition image (A): LA
Frame rate of subject shooting image (A + B): F
Maximum readout rate of the image sensor: X

上記のように算出式が設定されるため、例えば、LABが2160ライン、Xが142560であった場合、
フレームレートF=24fpsの場合、LA=3780
フレームレートF=60fpsの場合、LA=216
となる。
そのため、被写体撮影用画像の垂直ライン数が2160ラインであるため、フレームレートが24fpsに設定された場合、全ライン数(2160ライン)、またフレームレートが60fpsに設定された場合、全ライン数の10%である216ラインが位相差取得用画像の読み出しラインの閾値として設定される。
Since the calculation formula is set as described above, for example, when LAB is 2160 lines and X is 142560,
When the frame rate F = 24 fps, LA = 3780
When the frame rate F = 60 fps, LA = 216
Will be.
Therefore, since the number of vertical lines of the subject shooting image is 2160 lines, the total number of lines (2160 lines) when the frame rate is set to 24 fps, and the total number of lines when the frame rate is set to 60 fps. The 216 line, which is 10%, is set as the threshold value of the reading line of the phase difference acquisition image.

以上のように、撮像装置が有する被写体撮影用画像のフレームレートや被写体撮影用画像の水平画素数および垂直ライン数の乗算値、つまり1フレームあたりの画素数の設定に応じて、位相差取得用画像の読み出し領域に対応する垂直ライン数の閾値を変更することができる。 As described above, for phase difference acquisition according to the frame rate of the subject shooting image, the multiplication value of the number of horizontal pixels and the number of vertical lines of the subject shooting image, that is, the setting of the number of pixels per frame, which the imaging device has. The threshold of the number of vertical lines corresponding to the image reading area can be changed.

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

5 顔検出部
6 顔検出ライン測定部
7 CPU
5 Face detection unit 6 Face detection line measurement unit 7 CPU

Claims (8)

撮影画像信号と視差画像信号とを出力する撮像素子と、
前記撮影画像信号に基づいて、被写体領域を選択し、選択した被写体領域に対応する前記撮像素子の読み出し領域から前記視差画像信号を読み出す制御を行う制御手段とを備え、
前記制御手段は、被写体領域が複数存在する場合に、前記読み出し領域に対応する垂直ライン数が閾値を超えないように、前記被写体領域を選択する
ことを特徴とする撮像装置。
An image sensor that outputs a captured image signal and a parallax image signal,
A control means for selecting a subject area based on the captured image signal and controlling the reading of the parallax image signal from the reading area of the image sensor corresponding to the selected subject area is provided.
The control means is an imaging device characterized in that when a plurality of subject areas exist, the subject area is selected so that the number of vertical lines corresponding to the read area does not exceed a threshold value.
前記制御手段は、被写体領域に対応する焦点位置に基づいて、優先順位を決定し、決定した優先順位に基づいて、前記被写体領域を選択する
ことを特徴とする請求項に記載の撮像装置。
The imaging device according to claim 1 , wherein the control means determines a priority based on a focal position corresponding to a subject area, and selects the subject area based on the determined priority.
前記制御手段は、
主たる被写体の被写体領域を最優先の優先順位とし、前記主たる被写体の焦点位置に近い被写体の被写体領域ほど高い優先順位として、前記優先順位の高い順に、選択後の被写体領域に対応する垂直ライン数の合計が前記閾値を超えないように前記被写体領域を選択する
ことを特徴とする請求項に記載の撮像装置。
The control means
The subject area of the main subject is set as the highest priority, and the subject area of the subject closer to the focal position of the main subject is set as the higher priority, and the number of vertical lines corresponding to the selected subject area is set in descending order of priority. The imaging apparatus according to claim 2 , wherein the subject area is selected so that the total does not exceed the threshold value.
前記制御手段は、第1の被写体の被写体領域に対応する読み出し領域と、第2の被写体の被写体領域に対応する読み出し領域とを時間分割で読み出す制御を行う
ことを特徴とする請求項1に記載の撮像装置。
The first aspect of claim 1 is characterized in that the control means controls to read out a read-out area corresponding to a subject area of a first subject and a read-out area corresponding to a subject area of a second subject in time division. Imaging device.
前記制御手段は、被写体領域に対応する垂直ライン数と閾値との比較結果に基づいて、1フレーム内で複数の被写体領域を選択できるかを判断し、1フレーム内で複数の被写体領域を選択できない場合に、第1の被写体の被写体領域に対応する読み出し領域と、第2の被写体の被写体領域に対応する読み出し領域とを時間分割で読み出す制御を行う
ことを特徴とする請求項に記載の撮像装置。
The control means determines whether a plurality of subject areas can be selected within one frame based on the comparison result between the number of vertical lines corresponding to the subject area and the threshold value, and cannot select a plurality of subject areas within one frame. The imaging according to claim 4 , wherein the readout area corresponding to the subject area of the first subject and the readout area corresponding to the subject area of the second subject are read out in a time-divided manner. apparatus.
前記制御手段は、前記第1の被写体の被写体領域に対応する読み出し領域から前記視差画像信号を読み出す第1のフレームレートに比べて、前記第2の被写体の被写体領域に対応する読み出し領域から前記視差画像信号を読み出す第2のフレームレートを低くする
ことを特徴とする請求項または請求項に記載の撮像装置。
The control means has the parallax from the reading area corresponding to the subject area of the second subject as compared with the first frame rate for reading the parallax image signal from the reading area corresponding to the subject area of the first subject. The imaging apparatus according to claim 4 or 5 , wherein a second frame rate for reading an image signal is lowered.
前記制御手段は、主たる被写体を前記第1の被写体とし、前記主たる被写体の焦点位置に近い被写体、またはユーザの操作にしたがって指定した被写体を前記第2の被写体とする
ことを特徴とする請求項乃至のいずれか1項に記載の撮像装置。
The control means according to claim 4 in which the main subject and the first object, characterized in that the specified object and the second object according to the object near the focal position of the main subject or the user's operation, 6. The imaging apparatus according to any one of 6.
撮影画像信号と視差画像信号とを出力する撮像素子を備える撮像装置の制御方法であって、
前記撮影画像信号に基づいて、被写体領域を選択し、選択した被写体領域に対応する前記撮像素子の読み出し領域から前記視差画像信号を読み出す制御を行う制御工程を有し、
前記制御工程では、被写体領域が複数存在する場合に、前記読み出し領域に対応する垂直ライン数が閾値を超えないように、前記被写体領域を選択する
ことを特徴とする制御方法。
It is a control method of an image pickup device including an image pickup element that outputs a captured image signal and a parallax image signal.
It has a control step of selecting a subject area based on the captured image signal and controlling the reading of the parallax image signal from the reading area of the image sensor corresponding to the selected subject area.
In the control step, when there are a plurality of subject areas, the subject area is selected so that the number of vertical lines corresponding to the read area does not exceed the threshold value.
JP2017036568A 2016-05-18 2017-02-28 Imaging device and control method Active JP6833564B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/591,701 US10469730B2 (en) 2016-05-18 2017-05-10 Imaging device and control method for simultaneously outputting an image pickup signal and a parallax image signal

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2016099186 2016-05-18
JP2016099186 2016-05-18

Publications (2)

Publication Number Publication Date
JP2017212723A JP2017212723A (en) 2017-11-30
JP6833564B2 true JP6833564B2 (en) 2021-02-24

Family

ID=60474872

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017036568A Active JP6833564B2 (en) 2016-05-18 2017-02-28 Imaging device and control method

Country Status (1)

Country Link
JP (1) JP6833564B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009086490A (en) * 2007-10-02 2009-04-23 Nikon Corp Imaging apparatus
CN103403599B (en) * 2011-03-31 2015-09-02 富士胶片株式会社 Camera head and focusing control method thereof
JP6056572B2 (en) * 2013-03-14 2017-01-11 株式会社ニコン Imaging device
JP2015148676A (en) * 2014-02-05 2015-08-20 キヤノン株式会社 Imaging apparatus and method of controlling imaging apparatus

Also Published As

Publication number Publication date
JP2017212723A (en) 2017-11-30

Similar Documents

Publication Publication Date Title
KR101968109B1 (en) Focus adjustment device, method for controlling the same, and image capture apparatus
US10904425B2 (en) Image processing apparatus, control method therefor, and storage medium for evaluating a focusing state of image data
US20120147150A1 (en) Electronic equipment
US9697589B2 (en) Signal processing apparatus, imaging apparatus, signal processing method and program for correcting deviation of blurring in images
US9992478B2 (en) Image processing apparatus, image pickup apparatus, image processing method, and non-transitory computer-readable storage medium for synthesizing images
RU2593689C2 (en) Image capturing device and control method thereof
JP5095519B2 (en) Imaging apparatus and imaging method
US20150109515A1 (en) Image pickup apparatus, image pickup system, method of controlling image pickup apparatus, and non-transitory computer-readable storage medium
US10469730B2 (en) Imaging device and control method for simultaneously outputting an image pickup signal and a parallax image signal
US10356381B2 (en) Image output apparatus, control method, image pickup apparatus, and storage medium
US9215459B2 (en) Image processing apparatus, image capturing apparatus, and program
US20130083169A1 (en) Image capturing apparatus, image processing apparatus, image processing method and program
US9883096B2 (en) Focus detection apparatus and control method thereof
US9383626B2 (en) Imaging apparatus, focus control method, and program
CN109964479A (en) Picture pick-up device and its control method
KR101792990B1 (en) Image capture apparatus and method for controlling the same
JP6484004B2 (en) Imaging apparatus and control method thereof, imaging optical system and control method thereof
JP6833564B2 (en) Imaging device and control method
JP6478587B2 (en) Image processing apparatus, image processing method and program, and imaging apparatus
JP5161939B2 (en) Image processing apparatus, imaging system, and control method of image processing apparatus
JP2009258451A (en) Focus detection device
JP6484003B2 (en) Imaging apparatus, control method therefor, and imaging optical system
US10447937B2 (en) Image processing apparatus, imaging apparatus, image processing method, and storage medium that perform image processing based on an image processing parameter set for a first object area, and information on a positional relationship between an object in a second object area and an object in the first object area
US20180109720A1 (en) Image processing apparatus, image processing method, and storage medium
WO2017208991A1 (en) Image capturing and processing device, electronic instrument, image capturing and processing method, and image capturing and processing device control program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200218

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20200820

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200915

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20201113

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210203

R151 Written notification of patent or utility model registration

Ref document number: 6833564

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151