Imaging apparatus, method for controlling imaging apparatus, and program

JP2023117708A5Pending Publication Date: 2025-02-18CANON KK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2022020418
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2022-02-14
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

Existing focus control methods in imaging devices fail to maintain stability when high-priority detection regions move irregularly, leading to unstable focus control in specific scenes.

Method used

An imaging apparatus that includes subject detection means for identifying subject areas and scene detection means to differentiate focus control methods based on scene type, using a control means to adjust focus information accordingly, employing phase difference detection and machine learning for accurate focus adjustment.

Benefits of technology

Enables stable focus control in scenes where high-priority detection regions move irregularly, such as in sports, by prioritizing specific areas like eyes or body parts, ensuring clear imaging even in dynamic conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

To provide an imaging apparatus that can perform stable focus control in a specific scene.SOLUTION: An imaging apparatus (200) has: an image pickup device (201); subject detection means (211) that detects a subject area based on image data output from the image pickup device; scene detection means (219) that detects a specific scene based on the image data; and control means (209) that performs focus control based on information on focus in the subject area. The control means makes different a method for selecting the subject area for which the focus information is acquired according to whether the specific scene is detected.SELECTED DRAWING: Figure 8
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an imaging device, a control method for an imaging device, and a program.

Background Art

[0002] In recent years, cameras equipped with an autofocus (AF) function for automatically adjusting the focal position of a photographic lens have become widespread. As autofocus methods (AF methods), various methods such as an imaging plane phase difference AF method using an image sensor and a contrast AF method have been put into practical use. Also, in various AF methods, there is a technique for specifying a region of a main subject and focusing on it.

[0003] Patent Document 1 discloses a method of detecting organs such as pupils included in a face, determining the reliability of the detection results for the detected organs, and setting a focus detection region in a region with high detection reliability. Patent Document 2 discloses a method of changing the focus detection region according to the detected subject part.

Prior Art Documents

Patent Documents

[0004]

Patent Document 1

Patent Document 2

Summary of the Invention

Problems to be Solved by the Invention

[0005] However, in the methods disclosed in Patent Documents 1 and 2, when the reliability of subject detection is high, only detection sites with high priority can be set as the focus detection region. Therefore, in a specific scene where detection sites with high priority move irregularly, stable focus control cannot be performed.

[0006] Therefore, an object of the present invention is to provide an imaging device capable of performing stable focus control in a specific scene.

Means for Solving the Problems

[0007] An imaging device according to an aspect of the present invention includes an image sensor, a subject detection unit that detects a subject region based on image data output from the image sensor, a scene detection unit that detects a specific scene based on the image data, and a control unit that performs focus control based on focus information of the subject region. The control unit varies a method of selecting the subject region from which the focus information is acquired according to whether or not the specific scene is detected.

[0008] Other objects and features of the present invention will be described in the following embodiments.

Effects of the Invention

[0009] According to the present invention, it is possible to provide an imaging device capable of performing stable focus control in a specific scene.

Brief Description of the Drawings

[0010]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Embodiments of the Invention

[0011] Hereinafter, embodiments of the invention will be described in detail with reference to the drawings.

[0012] (Configuration of the Imaging System) First, referring to FIG. 1, the configuration of the imaging system in this embodiment will be described. FIG. 1 is a block diagram of the imaging system 10. The imaging system 10 is a lens-exchangeable camera system including a camera body (imaging device) 200 and a lens device (interchangeable lens) 100 detachably attached to the camera body 200. However, this embodiment is not limited thereto, and it is also applicable to an imaging device in which the camera body and the lens device are integrally configured.

[0013] The imaging system 10 includes a focus adjustment device and performs focus adjustment by an imaging plane phase difference detection method using an output signal from an imaging element 201 that images a subject image. When the lens device 100 is attached to the camera body 200 via a mount portion having an electrical contact unit 106, the lens controller 105 and the system control unit (control means) 209 can communicate with each other.

[0014] The lens device 100 includes a photographing lens 101 including a zoom mechanism, an aperture and shutter 102 for controlling the light amount, a focus lens 103 for focusing on the imaging element 201, a motor 104 for driving the focus lens 103, and a lens controller 105. The lens controller 105 comprehensively controls the operation of the lens device 100.

[0015] The camera body 200 is configured to be able to acquire an imaging signal from the light beam that has passed through the optical system (imaging optical system) of the lens device 100. The camera body 200 includes an imaging element 201 that photoelectrically converts reflected light from a subject into an electrical signal, an A / D conversion unit 202 including a CDS circuit for removing output noise of the imaging element 201 and a non-linear amplification circuit performed before A / D conversion, an image processing unit 203, and an AF signal processing unit 204. The camera body 200 also includes a format conversion unit 205, a high-speed built-in memory (for example, a random access memory, hereinafter referred to as DRAM) 206, and an image recording unit 207 including a recording medium such as a memory card and its interface. The camera body 200 also includes a timing generator 208, a system control unit 209 that controls the system such as a photographing sequence, and a lens communication unit 210 that communicates between the camera body 200 and the lens device 100. The system control unit 209 performs focus control based on focus information (focus detection information) of the subject area and comprehensively controls the overall operation of the imaging system 10.

[0016] The camera body 200 also includes a subject detection unit (subject detection means) 211, an image display memory (VRAM) 212, and a scene detection unit (scene detection means) 219. The subject detection unit 211 detects a subject area based on the image data output from the imaging element 201. The scene detection unit 219 detects a specific scene based on the image data output from the imaging element 201. In this embodiment, the specific scene is a sports scene, but it is not limited thereto.

[0017] In addition to image display, the camera body 200 includes an image display unit 213 that displays an image for operation assistance and the camera state, and during shooting, a shooting screen and an image display for displaying a distance measurement area. The camera body 200 also includes an operation unit 214 for operating the camera body 200 from the outside, a shooting mode switch 215 for selecting shooting modes such as macro mode and sports mode, and a main switch 216 for turning on the power to the system. The camera body 200 further includes a switch (SW1) 217 for performing shooting standby operations such as autofocus (AF) and autoexposure (AE), and a shooting switch (SW2) 218 for performing shooting after the operation of SW1. The DRAM of the built-in memory 206 is used as a high-speed buffer as a temporary image storage means, or as a working memory in image compression and decompression. The operation unit 214 includes, for example, a menu switch for performing various settings such as the shooting function of the camera body 200 and settings during image playback, and an operation mode switching switch between the shooting mode and the playback mode.

[0018] The imaging device 201 is a photoelectric conversion device such as a CCD sensor or a CMOS sensor. Each pixel of the imaging device 201 used in this embodiment is composed of two (a pair) of photodiodes A and B and one microlens provided for this pair of photodiodes A and B. Each pixel divides the incident light with the microlens to form a pair of optical images on the pair of photodiodes A and B, and outputs a pair of pixel signals (A signal and B signal) used for an AF signal described later from the pair of photodiodes A and B. Also, an imaging signal (A + B signal) can be obtained by adding the outputs of the pair of photodiodes A and B.

[0019] By synthesizing a plurality of A signals and a plurality of B signals output from a plurality of pixels, a pair of image signals as AF signals (focus detection signals) used for AF (imaging plane phase difference AF) by the imaging plane phase difference detection method are obtained. The AF signal processing unit 204 performs a correlation operation on the pair of image signals to calculate the phase difference (image displacement amount), which is the displacement amount of these pair of image signals, and further calculates the defocus amount (and defocus direction and reliability) of the imaging optical system from the image displacement amount. Further, the AF signal processing unit 204 performs a plurality of calculations in a predetermined region where the defocus amount can be specified.

[0020] (Operation of the imaging system) Next, referring to FIG. 2, the operation of the imaging system 10 in the present embodiment will be described. FIG. 2 is a flowchart of the operation of the imaging system 10, showing the flow of imaging control processing when performing still image imaging from the state of displaying a live view image. The system control unit 209 as a computer executes this processing according to a control program as a computer program.

[0021] First, in step S201, the system control unit 209 determines whether SW1 (217) is ON. If SW1 (217) is OFF, the determination in step S201 is repeated. On the other hand, if SW1 (217) is ON, the process proceeds to step S202. In step S202, the system control unit 209 performs the AF frame setting (setting of the focus detection area) described below on the AF signal processing unit 204. Subsequently, in step S203, the system control unit 209 performs the AF operation described below. Subsequently, in step S204, the system control unit 209 determines whether SW1 (217) is ON. If SW1 (217) is ON, the process proceeds to step S205. On the other hand, if SW1 (217) is OFF, the process returns to step S201. In step S205, the system control unit 209 determines whether SW2 (218) is ON. If SW2 (218) is ON, the process proceeds to step S206. On the other hand, if SW2 (218) is OFF, the process returns to step S204. In step S206, the system control unit 209 performs a shooting operation and returns to step S201.

[0022] (AF frame setting) Next, referring to FIG. 3, the AF frame setting (step S202 in FIG. 2) will be described. FIG. 3 is a flowchart showing the AF frame setting. First, in step S301, the system control unit 209 acquires subject detection information from the subject detection unit 211. The subject in this embodiment is a person, and further, the main area (subject area) within the subject is detected. Here, the main area refers to the pupil, face, and body in a person or animal. These can be detected using known learning methods based on machine learning and recognition processing by image processing means.

[0023] For example, the types of machine learning are as follows.

[0024] (1) Support Vector Machine (Support Vector Machine) (2) Convolutional Neural Network (3) Recurrent Neural Network Also, as an example of recognition processing, there is a method of extracting a skin color area from the gradation colors of each pixel represented by image data and detecting a face based on the degree of matching with a face contour plate prepared in advance. Also, there is a well-known method of performing face detection by extracting feature points of a face such as eyes, nose, mouth, etc. using a well-known pattern recognition technique. Furthermore, the detection method for the main area applicable to the present invention is not limited to these methods, and other methods may be used.

[0025] Subsequently, in step S302, the system control unit 209 determines whether a plurality of main areas are detected based on the detection result of the subject detection unit 211. If a plurality of main areas are detected, it proceeds to step S303. On the other hand, if a plurality of main areas are not detected (if only a single main area is detected), it proceeds to step S304.

[0026] Here, referring to FIGS. 4(a), (b) and FIGS. 5(a), (b), the states in which a single main area and a plurality of main areas are detected will be described. FIGS. 4(a), (b) are explanatory diagrams of a state in which only a single main area is detected. FIGS. 5(a), (b) are explanatory diagrams of a state in which a plurality of main areas are detected.

[0027] FIG. 4(a) shows a state in which only face a is detected (a state in which only a single main area is detected). FIG. 5(a) shows a state in which pupil A, face B, and body C are detected (a state in which a plurality of main areas are detected). In the present embodiment, it is assumed that the subject detection unit 211 can acquire the type of the subject such as a person or an animal, and the center coordinates, horizontal size, and vertical size in each detected main area.

[0028] In step S303, the system control unit 209 inputs the minimum detection main area, that is, the smaller value of the horizontal size or the vertical size of the pupil A in Fig. 5(a), into MinA, and sets MinA as one AF frame size. Subsequently, in step S305, the system control unit 209 obtains the horizontal size H in Fig. 5(b) that encompasses all the main areas from the horizontal coordinates and the horizontal sizes of each detection main area. Then, the system control unit 209 determines the number of horizontal AF frames (H / MinA) by dividing the horizontal size H by the AF frame size MinA.

[0029] Subsequently, in step S307, the system control unit 209 obtains the vertical size V in Fig. 5(b) that encompasses all the main areas from the vertical coordinates and the vertical sizes of each detection main area. Then, the system control unit 209 determines the number of vertical AF frames (V / MinA) by dividing the vertical size V by the AF frame size MinA, and terminates the AF frame setting. In this embodiment, the AF frame size is a square area using the minimum size, but it is not limited to this, and the AF frame sizes may be different horizontally and vertically, or the number of AF frames that can be calculated by the system control unit 209 may be set.

[0030] In step S304, as shown in Fig. 4(b), the system control unit 209 sets an AF frame with an AF frame size X that is a predetermined size for the detected face. The AF frame size X may be set to the pupil size estimated from the face, or may be set to a frame size that can ensure S / N and sufficient focusing performance considering low illuminance environments. In this embodiment, the AF frame size X is set to the estimated pupil size. Subsequently, in step S306, as shown in Fig. 4(b), the system control unit 209 sets the number of AF frames Y that encompasses the area of face a with the AF frame size X and can also cope with the case where the face moves.

[0031] (AF operation) Next, referring to Fig. 6, step S203 (AF operation) in Fig. 2 will be described. Fig. 6 is a flowchart of the AF operation.

[0032] First, at step S401, the system control unit 209 performs focus detection processing to detect the defocus amount and reliability. The focus detection processing will be described later. Subsequently, at step S402, the system control unit 209 performs AF main frame selection, which will be described later, using the reliability obtained at step S401. Subsequently, at step S403, the system control unit 209 determines whether the reliability of the focus detection result in step S401 is higher than a preset reliability threshold 2. If the reliability of the focus detection result is higher than the reliability threshold 2, the process proceeds to step S404. On the other hand, if the reliability of the focus detection result is lower than the reliability threshold 2, the process proceeds to step S413. Here, the reliability threshold 2 is set to a threshold such that if the reliability is less than the reliability threshold 2, the accuracy of the defocus amount cannot be guaranteed, but the direction of the in-focus position of the subject can be guaranteed.

[0033] At step S404, the system control unit 209 determines whether the defocus amount detected at step S401 is equal to or less than a preset Def amount threshold 2. If the defocus amount is equal to or less than the Def amount threshold 2, the process proceeds to step S405. On the other hand, if the defocus amount is greater than the Def amount threshold 2, the process proceeds to step S412. Here, the Def amount threshold 2 is set to a value (for example, an amount five times the depth of focus) such that if the defocus amount is equal to or less than the Def amount threshold 2, the focus lens can be controlled within the depth of focus by driving the lens by the defocus amount within a predetermined number of times (for example, 3 times) thereafter.

[0034] At step S405, the system control unit 209 determines whether the focus lens 103 is stopped. If the focus lens 103 is stopped, the process proceeds to step S406. On the other hand, if the focus lens 103 is not stopped (if the focus lens 103 is moving), the process proceeds to step S410.

[0035] In step S406, the system control unit 209 determines whether the reliability of the focus detection result in step S401 is higher than a preset reliability threshold 1. If the reliability of the focus detection result is higher than the reliability threshold 1, the process proceeds to step S407. On the other hand, if the reliability of the focus detection result is lower than the reliability threshold 1, the process proceeds to step S410. Here, the reliability threshold 1 is set such that if the reliability is greater than or equal to the reliability threshold 1, the variation in the defocus amount accuracy is within a predetermined range (for example, within the depth of focus).

[0036] In step S407, the system control unit 209 determines whether the defocus amount detected in step S401 is less than or equal to a preset Def amount threshold 1. If the defocus amount is less than or equal to the Def amount threshold 1, the process proceeds to step S408. On the other hand, if the defocus amount is greater than the Def amount threshold 1, the process proceeds to step S4 09. Here, the Def amount threshold 1 is set such that if the detected defocus amount is less than or equal to the Def amount threshold 1, it indicates that the focus lens is controlled within the depth of focus.

[0037] In step S408, the system control unit 209 determines that it is in the in-focus state and ends this flow. In step S409, after driving the focus lens 103 by the defocus amount detected in step S401, the system control unit 209 proceeds to step S401. By performing a series of processes in steps S405 to S409, when the reliability detected in step S401 is higher than the reliability threshold 1, the system control unit 209 can perform the in-focus determination with the focus lens 103 stopped.

[0038] In step S410, the system control unit 209 drives the focus lens 103 by a predetermined ratio with respect to the defocus amount detected in step S401. Subsequently, in step S411, the system control unit 209 instructs the focus lens 103 to stop and proceeds to step S401. In step S412, since the defocus amount is not less than the Def amount threshold 2, after driving the focus lens 103 by a predetermined ratio with respect to the defocus amount detected in step S401, the system control unit 209 proceeds to step S401. Here, the predetermined ratio is set so that the lens driving amount decreases with respect to the defocus amount (for example, 80%). Also, the set lens speed is set to be slower than the speed at which the lens can be driven in the time of one frame, for example. Thereby, when the detected defocus amount is incorrect, it is possible to prevent going beyond the subject focus position. Also, while driving the focus lens 103 without stopping it, the next lens driving can be performed (overlap control).

[0039] In step S413, the system control unit ascertains whether the out-of-focus condition is satisfied. If the out-of-focus condition is satisfied, it proceeds to step S414. On the other hand, if the out-of-focus condition is not satisfied, it proceeds to step S415. Here, the out-of-focus condition is a predetermined condition for determining that there is no subject to be focused. For example, a condition is set such that when the lens driving is completed over the entire movable range of the focus lens 103, that is, when the focus lens 103 detects both the far-side and near-side lens ends and returns to the initial position.

[0040] In step S414, the system control unit determines that it is in an out-of-focus state and ends this flow. In step S415, the system control unit determines whether the focus lens 103 has reached the far-side or near-side lens end. If the focus lens 103 has reached the lens end, it proceeds to step S416. On the other hand, if the focus lens 103 has not reached the lens end, it proceeds to step S417.

[0041] In step S416, the system control unit 209 reverses the driving direction of the focus lens 103 and proceeds to step S401. In step S417, the system control unit 209 drives the focus lens 103 in a predetermined direction and proceeds to step S401. The speed of the focus lens 103 is set to the fastest speed within a range of lens speeds such that it does not pass through the in-focus position when, for example, the defocus amount can be detected.

[0042] (Focus detection process) Next, referring to FIG. 7, step S401 (focus detection process) in FIG. 6 will be described. FIG. 7 is a flowchart of the focus detection process.

[0043] First, in step S501, the system control unit 209 sets a focus detection area in an arbitrary range within the image data output from the imaging device 201. Subsequently, in step S502, the system control unit 209 acquires a pair of image signals (A image signal, B image signal) for focus detection from the imaging device 201 corresponding to the focus detection area set in step S501. Subsequently, in step S503, the system control unit 209 performs a vertical row addition averaging process on the pair of image signals acquired in step S502. By this process, the influence of noise in the image signal can be reduced. Subsequently, in step S504, the system control unit 209 performs a filtering process to extract a signal component in a predetermined frequency band from the signal vertically row-added and averaged in step S503.

[0044] Subsequently, in step S505, the system control unit 209 calculates a correlation quantity from the signal filtered in step S504. Subsequently, in step S506, the system control unit 209 calculates a correlation change quantity from the correlation quantity calculated in step S505. Subsequently, in step S507, the system control unit 209 calculates an image displacement quantity from the correlation change quantity calculated in step S506. Subsequently, in step S508, the system control unit 209 calculates a reliability indicating how reliable the image displacement quantity calculated in step S507 is. Subsequently, in step S509, the system control unit 209 converts the image displacement quantity into a defocus quantity and ends the focus detection process.

[0045] (AF Main Frame Selection) Next, referring to FIG. 8, step S402 (AF Main Frame Selection) in FIG. 6 will be described. FIG. 8 is a flowchart of AF main frame selection.

[0046] First, in step S601, the system control unit 209 determines whether a subject's body has been detected by the subject detection unit 211. If the body has been detected, the process proceeds to step S609. On the other hand, if the body has not been detected, the process proceeds to step S602. In step S602, the system control unit 209 determines whether a subject's pupil has been detected by the subject detection unit 211. If the pupil has been detected, the process proceeds to step S603. On the other hand, if the pupil has not been detected, the process proceeds to step S605.

[0047] In step S603, the system control unit 209 sets the main frame selection region, which is the region for selecting the AF main frame, to the pupil detection region. Subsequently, in step S604, the system control unit 209 selects a main frame by central priority main frame selection, which will be described later, from the main frame selection region set in step S603, and ends the AF main frame selection process.

[0048] In step S605, the system control unit 209 determines whether or not the subject detection unit 211 has detected the face of the subject. If the face is detected, the process proceeds to step S606. On the other hand, if the face is not detected, the process proceeds to step S608. In step S606, the main frame selection area is set to the face detection area, and the process proceeds to step S607. In step S607, the system control unit 209 selects a main frame by the closest subject priority main frame selection described below from the main frame selection area set in step S606, and ends the AF main frame selection process. In step S608, the system control unit 209 performs multi-point main frame selection without using the detection information. As the multi-point main frame selection, there are means such as selecting the main frame in a predetermined area within the screen, but the detailed description is omitted.

[0049] In step S609, the system control unit 209 determines whether or not the sports scene detected by the scene detection unit 219 is a body-priority sports scene (a specific scene). Here, the specific scene is a scene in which the focus should be on the body of a person, such as a spin in figure skating, a turn in ballet or dance, during a gymnastics floor exercise or a pole vault jump. If the sports scene is a specific scene, the process proceeds to step S610. On the other hand, if the sports scene is not a specific scene, the process proceeds to step S612.

[0050] Here, the scene detection unit 219 is made to perform machine learning in advance so as to be able to identify a sports scene from the subject's pose information. The subject's pose information may be, for example, a combination of the coordinates and orientation information of the feature parts of the subject detected by the subject detection unit 211, or a detector for detecting joint information of the subject area may be mounted on the camera body 200, and the detection result of the joint information may be used as the pose information. Therefore, the camera body 200 in FIG. 1 may be equipped with a detector for detecting joint information. This detector can be created, for example, by performing machine learning by assigning five types of joint labels, namely head, chest, waist, above the knees, and below the knees, to the image. Note that the detection methods for the main regions applicable to this embodiment are not limited to these methods, and other methods may be used. For example, it may be configured to detect a specific scene based on user settings (operations of the operation unit 214 by the user).

[0051] In step S610, the system control unit 209 sets the main frame selection area as the body detection area. Subsequently, in step S611, the system control unit 209 selects a main frame by majority vote main frame selection described later from the main frame selection area set in step S610, and ends the AF main frame selection process.

[0052] In step S612, the system control unit 209 determines whether the pupil of the subject has been detected by the subject detection unit 211. If the pupil has been detected, the process proceeds to step S616. On the other hand, if the pupil has not been detected, the process proceeds to step S613. In step S613, the system control unit 209 determines whether the face of the subject has been detected by the subject detection unit 211. If the face has been detected, the process proceeds to step S614. On the other hand, if the face has not been detected, the process proceeds to step S610.

[0053] In step S614, the system control unit 209 sets the main frame selection area as the face detection area. Subsequently, in step S615, the system control unit 209 selects a main frame by the nearest priority main frame selection described later from the main frame selection area set in step S614, and ends the AF main frame selection process. In step S616, the system control unit 209 sets the main frame selection area, which is the area for selecting the AF main frame, as the pupil detection area. Subsequently, in step S617, the system control unit 209 selects a main frame by the center priority main frame selection described later from the main frame selection area set in step S616, and ends the AF main frame selection process.

[0054] As described above, the system control unit 209 varies the method of selecting the subject area from which the focus information (focus detection information) is obtained among the plurality of subject areas detected by the subject detection unit 211 according to whether a specific scene is detected (steps S609 to S617).

[0055] (Center Priority Main Frame Selection) Next, referring to FIG. 9, steps S604 and S617 (center priority main frame selection) in FIG. 8 will be described. FIG. 9 is a flowchart of the center priority main frame selection.

[0056] First, in step S701, the system control unit 209 determines whether the center (center frame) of the main frame selection area is within a predetermined depth. If the center frame is within the predetermined depth, the process proceeds to step S703. On the other hand, if the center frame is not within the predetermined depth, the process proceeds to step S702. In step S702, the system control unit 209 performs the nearest priority main frame selection described later and ends the center priority main frame selection process. In step S703, the system control unit 209 sets the center (center frame) of the main frame selection area as the main frame and ends the center priority main frame selection process.

[0057] (Nearest Priority Main Frame Selection) Next, referring to FIG. 10, steps S607 and S615 in FIG. 8 and step S702 (nearest-priority main frame selection) in FIG. 9 will be described. FIG. 10 is a flowchart of nearest-priority main frame selection.

[0058] First, in step S801, the system control unit 209 performs loop processing for all frames in order to select a main frame from the set main frame selection area. The initial value of the main frame is set in advance with information (such as the total number of frames + 1) that can determine that the main frame has not been selected, and the figure is omitted. Subsequently, in step S802, the system control unit 209 determines whether the defocus amount of the target main frame is closer and within a predetermined depth than the main frame selected by the current main frame. If the condition of step S802 is satisfied, it proceeds to step S803, and the system control unit 209 updates the main frame. On the other hand, if the condition of step S802 is not satisfied, the system control unit 209 does not update the main frame.

[0059] Subsequently, in step S804, the system control unit 209 determines whether the main frame could be selected by the loop in step S801 (whether the main frame is the initial value). If the main frame could be selected, the system control unit 209 ends the process of nearest-priority main frame selection. On the other hand, if the main frame has not been selected, it proceeds to step S805. In step S805, the system control unit 209 sets the center of the main frame selection area as the main frame and ends the process of nearest-priority main frame selection.

[0060] (Majority-vote main frame selection) Next, referring to FIG. 11, step S611 (majority-vote main frame selection) in FIG. 8 will be described. FIG. 11 is a flowchart of majority-vote main frame selection. In this embodiment, a histogram, which is an image analysis means, is used, but since it is a general technique, details of the histogram will be omitted.

[0061] First, in step S901, the system control unit 209 creates a histogram by counting the defocus amounts calculated for each AF frame set within the main frame selection area for each predetermined depth. Subsequently, in step S902, the system control unit 209 determines whether the peak value (the number of AF frames of the histogram peak) of the histogram created in step S901 is equal to or greater than a predetermined value. In the present embodiment, the peak value of the histogram is normalized by the total number of AF frames and converted into a ratio for use. If the peak value is equal to or greater than a predetermined ratio (if the number of AF frames of the histogram peak is equal to or greater than a predetermined number), the process proceeds to step S903. On the other hand, if the peak value is less than the predetermined ratio, the process proceeds to step S907. In step S907, the system control unit 209 performs center-priority main frame selection shown in FIG. 9 and ends the process of majority decision main frame selection.

[0062] In step S903, the system control unit 209 performs a loop process for all frames to select a main frame from within the main frame selection area. In step S904, the system control unit 209 determines whether the target AF frame is an AF frame counted as a histogram peak (the AF frame of the histogram peak). If the AF frame is the AF frame of the histogram peak, the process proceeds to step S905. On the other hand, if the AF frame is not the AF frame of the histogram peak, the loop process of step S903 is repeated.

[0063] In step S905, the system control unit 209 determines whether the coordinates of the target main frame are closer to the center of the main frame selection area than the currently selected main frame. If the condition of step S905 is satisfied, the process proceeds to step S906, and the system control unit 209 updates the main frame. On the other hand, if the condition of step S905 is not satisfied, the system control unit 209 does not update the main frame. When the loop of step S903 ends, the system control unit 209 ends the process of majority decision main frame selection. In addition, in the main frame selection after setting the main frame selection area, it may be made different according to whether the subject is a stationary object or a moving object. More specifically, when the subject is a stationary object, the area to be focused is determined based on the information on the number of in-focus areas as described above, and when the subject is a moving object, the area to be focused is determined based on past focus detection information.

[0064] As described above, in the present embodiment, the control means (system control unit 209) varies the method of selecting the subject area for obtaining focus information according to whether or not a specific scene is detected. Preferably, the subject area includes a first subject area and a second subject area. When a specific scene is not detected, the control means performs focus control based on the focus information of the first subject area. On the other hand, when a specific scene is detected, the control means performs focus control based on the focus information of the second subject area.

[0065] Preferably, the first subject area has a higher hierarchy (priority) than the second subject area. Also preferably, the first subject area occupies a smaller proportion in the image data than the second subject area. Also preferably, the first subject area is a person's pupil or face, and the second subject area is a person's torso or whole body. Also preferably, in a specific scene, the first subject area accelerates and decelerates in the depth direction, and the second subject area does not accelerate and decelerate in the depth direction. Also preferably, the control means (AF signal processing unit 204) sets a plurality of focus detection areas (AF frames) divided corresponding to the subject area detected by the subject detection means (subject detection unit 211), and detects focus information for each focus detection area.

[0066] According to the present embodiment, stable focus control can be performed on a subject in which a face or pupil, which is a higher-level detection site (a subject area with a higher hierarchy and higher priority), moves irregularly around the body. For example, it is possible to continuously take a picture in a focused state of a subject whose head rotates at high speed around the body like figure skating.

[0067] (Other embodiments) The present invention can also be realized by supplying a program that implements one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and causing one or more processors in a computer of the system or apparatus to read and execute the program. It can also be realized by a circuit (for example, an ASIC) that implements one or more functions.

[0068] According to this embodiment, by predicting the future movement of a subject that is likely to be misrecognized as changing or having changed from the current state of the subject, optimal focus tracking with minimal delay can be achieved for any subject. Therefore, according to this embodiment, it is possible to provide an imaging apparatus, a control method for the imaging apparatus, and a program that can perform stable focus control in a specific scene.

[0069] As described above, the preferred embodiments of the present invention have been described, but the present invention is not limited to these embodiments, and various modifications and changes are possible within the scope of the gist thereof.

Explanation of Reference Numerals

[0070] 200 Camera body (imaging apparatus) 201 Image sensor 209 System control unit (control means) 211 Subject detection unit (subject detection means) 217 Scene detection unit (scene detection means)

Claims

1. An imaging element; a subject detection means for detecting a subject area based on image data output from the imaging element; a scene detection means for detecting a specific sport scene based on the image data; a control unit that performs focus control based on focus information of the subject area, The imaging device according to claim 1, wherein the control means changes a method of selecting the subject area for obtaining the focus information depending on whether the specific sports scene is detected or not.

2. An imaging element; a subject detection means for detecting a subject area based on image data output from the imaging element; a scene detection means for detecting a specific scene based on joint information of the subject area; a control unit that performs focus control based on focus information of the subject area, The imaging apparatus according to claim 1, wherein the control means changes a method of selecting the subject area for which the focus information is to be obtained depending on whether the specific scene is detected or not.

3. An imaging element; a subject detection means for detecting a subject area based on image data output from the imaging element; A scene determination means for determining a specific scene based on a user setting; a control unit that performs focus control based on focus information of the subject area, The imaging apparatus according to claim 1, wherein the control means changes a method of selecting the subject area for which the focus information is to be obtained depending on whether the scene is determined to be the specific scene.

4. An imaging element; a subject detection means for detecting a subject area based on image data output from the imaging element; A scene detection means for detecting a specific scene based on the image data and machine learning; a control unit that performs focus control based on focus information of the subject area, The imaging apparatus according to claim 1, wherein the control means changes a method of selecting the subject area for which the focus information is to be obtained depending on whether the specific scene is detected or not.

5. An imaging device as described in any one of claims 1 to 4, characterized in that the control means sets a plurality of focus detection areas divided corresponding to the subject area detected by the subject detection means, and detects the focus information for each focus detection area.

6. the subject area includes a first subject area and a second subject area; The control means if the specific sports scene is not detected, performing the focus control based on the focus information of the first subject region; 2. The imaging apparatus according to claim 1, wherein, when the specific sports scene is detected, the focus control is performed based on the focus information of the second subject region.

7. 7. The imaging device according to claim 6, wherein the first subject area has a higher priority than the second subject area.

8. 7. The imaging device according to claim 6, wherein the first subject region occupies a smaller proportion of the image data than the second subject region.

9. the first subject area is a human eye or a face, 7. The imaging device according to claim 6, wherein the second subject area is the torso or the entire body of the person.

10. 7. The imaging device according to claim 6, wherein in the specific sports scene, the first subject region accelerates and decelerates in the depth direction, and the second subject region does not accelerate or decelerate in the depth direction.

11. 2. The imaging device according to claim 1, wherein the specific sports scene is at least one of a turn in ballet or dance, a spin in figure skating, or a jump in gymnastics floor competition or pole vault.

12. The subject area includes a first subject area and a second subject area, The control means If the specific scene is not detected, performing the focus control based on the focus information of the first subject area; 5. The imaging apparatus according to claim 2, wherein, when the specific scene is detected, the focus control is performed based on the focus information of the second subject region.

13. The imaging device of claim 12, wherein the first subject area has a higher priority than the second subject area.

14. The imaging device of claim 12, wherein the first subject area occupies a smaller proportion of the image data than the second subject area.

15. The first subject area is a human eye or a face, The imaging device according to claim 12 , wherein the second subject area is the torso or the entire body of the person.

16. The imaging device described in Claim 12, characterized in that in the specific scene, the first subject region accelerates and decelerates in the depth direction, and the second subject region does not accelerate or decelerate in the depth direction.

17. Detecting a subject area based on image data output from an imaging element; detecting a specific sports scene based on the image data; and performing focus control based on the focus information of the subject area. A control method for an imaging device, characterized in that, in the step of performing focus control, a method of selecting the subject area for obtaining the focus information is changed depending on whether or not the specific sports scene is detected.

18. A step of detecting a subject area based on image data output from an imaging element; detecting a specific scene based on joint information of the subject area; and performing focus control based on the focus information of the subject area. A control method for an imaging apparatus, comprising: a step of: selecting the subject area for which the focus information is to be obtained, the step of performing focus control varying a method for selecting the subject area for which the focus information is to be obtained, depending on whether the specific scene is detected or not.

19. A step of detecting a subject area based on image data output from an imaging element; determining a particular scene based on a user setting; and performing focus control based on the focus information of the subject area. A control method for an imaging apparatus, comprising: a step of performing focus control, the step of selecting the subject area for which the focus information is to be obtained being changed depending on whether the subject area is determined to be the specific scene or not.

20. A step of detecting a subject area based on image data output from an imaging element; detecting a particular scene based on the image data and machine learning; and performing focus control based on the focus information of the subject area. A control method for an imaging apparatus, comprising: a step of: selecting the subject area for which the focus information is to be obtained, the step of performing focus control varying a method for selecting the subject area for which the focus information is to be obtained, depending on whether the specific scene is detected or not.

21. A program for causing a computer to execute the control method according to any one of claims 17 to 20.