Control device, imaging device, control method, and program
The control device and method enhance autofocus by setting focus detection frames based on subject type and area, addressing the issue of focusing on unintended subjects, particularly for vehicles, ensuring precise and optimal focusing.
Patent Information
- Application Number
- JP2021075889
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-04-28
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2041-04-28
AI Technical Summary
Existing autofocus methods struggle to optimally focus on fast-moving subjects like vehicles, often setting focus on unintended subjects due to inadequate focus detection area selection.
A control device and method that utilize subject information to set a subject area and multiple focus detection frames, selecting a main focus detection frame based on subject type, with priority given to specific areas like the pupil, face, or local regions, and adjusting focus detection frames to avoid unintended subjects.
Achieves optimal focusing on vehicles and other fast-moving subjects by accurately selecting focus detection frames, preventing focus on adjacent objects and ensuring precise autofocus.
Smart Images

Figure 0007721311000001 
Figure 0007721311000002 
Figure 0007721311000003
Abstract
Description
[Technical Field]
[0001] The present invention relates to a control device, an imaging device, a control method, and a program. [Background technology]
[0002] In recent years, techniques have been proposed for identifying and focusing on the area of a main subject using various AF methods, such as image-plane phase-difference AF and contrast AF. Patent Document 1 discloses a method for setting a focus detection area depending on the reliability of detection results for facial organs. Patent Document 2 also discloses a method for changing the speed of a focusing operation depending on the movement speed of a detected subject in a direction within the plane of a captured image, in order to accommodate focusing on a moving subject. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Application Publication No. 2019-121860 [Patent Document 2] Patent No. 6145822 Summary of the Invention [Problem to be solved by the invention]
[0004] However, in the method of Patent Document 1, because the focus detection area is set for the main subject, focus detection may not be performed in an area suitable for focus detection. In particular, when targeting a fast-moving subject such as a vehicle such as a two-wheeled or four-wheeled vehicle that is likely to be adjacent to another subject such as the ground, there is a problem that the focus may be set on an unintended subject (for example, the ground).
[0005] Furthermore, the method of Patent Document 2 also does not take any particular measures regarding the selection of the main focus detection frame, so the above problem occurs when a vehicle is used as the subject.
[0006] An object of the present invention is to provide a control device, an imaging device, a control method, and a program that are capable of achieving optimal focusing on a vehicle. [Means for solving the problem]
[0007] According to one aspect of the present invention, a control device detects a subject using subject information including information about a part of a subject based on an image signal converted from a subject image. Part of of It is an area that encompasses a setting unit that sets a subject area and sets a plurality of focus detection frames using the subject area; Contains two or more focus detection frames among multiple focus detection frames Selection Area Set 2 or more a selection unit for selecting a main focus detection frame for performing focus adjustment from the focus detection frames, Part of is a vehicle The whole of If so, the selected area is narrower than the subject area. [Effects of the Invention]
[0008] According to the present invention, it is possible to provide a control device, an imaging device, a control method, and a program that are capable of achieving optimal focusing on a vehicle. [Brief explanation of the drawings]
[0009] [Figure 1] 1 is a block diagram showing a configuration of a camera system according to a first embodiment. [Figure 2] 5 is a flowchart showing processing during shooting by the camera system of the first embodiment. [Figure 3] 5 is a flowchart showing AF frame setting according to the first embodiment. [Figure 4] FIG. 4 is a diagram illustrating the relationship between detected main parts of a person and a subject area in the first embodiment. [Figure 5] FIG. 4 is a diagram illustrating the relationship between the detected main parts of an animal or vehicle and the subject area in the first embodiment. [Figure 6] FIG. 4 is a diagram illustrating the relationship between a subject area and a focus detection area according to the first embodiment. [Figure 7]5 is a flowchart showing an AF operation according to the first embodiment. [Figure 8] 5 is a flowchart showing focus detection processing according to the first embodiment. [Figure 9] 5 is a flowchart showing AF main frame selection according to the first embodiment. [Figure 10] 10 is a flowchart showing the selection of the AF main frame with priority given to the detection center according to the first embodiment. [Figure 11] 10 is a flowchart showing selection of an AF main frame with priority given to a central area closest to the subject according to the first embodiment. [Figure 12] 10 is a flowchart showing selection of an AF main frame with priority given to central region prediction according to the first embodiment. [Figure 13] 10 is a flowchart showing AF main frame selection according to the second embodiment. [Figure 14] 10 is a flowchart showing the selection of the AF main frame with priority given to detection area reliability according to the second embodiment. [Figure 15] 10 is a flowchart showing central area reliability priority AF main frame selection according to the second embodiment. DETAILED DESCRIPTION OF THE INVENTION
[0010] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the drawings, the same reference numerals are used to designate the same components, and redundant explanations will be omitted. (First embodiment) 1 is a block diagram showing the configuration of a camera system according to this embodiment. The camera system includes a lens device (interchangeable lens) 100 and a camera body (imaging device) 200. The lens device 100 is detachably (replaceably) attached to the camera body 200 via a mount (not shown) that includes an electrical contact unit 106.
[0011] The lens device 100 has an optical system, a motor 104, and a lens controller 105. The optical system includes a photographing lens 101, an aperture and shutter 102, and a focus lens 103. The photographing lens 101 includes a zoom mechanism. The aperture and shutter 102 controls the amount of light. The focus lens 103 moves along the optical axis of the optical system to focus on the light receiving surface of the image sensor 201. The motor 104 drives the focus lens 103.
[0012] The camera body 200 has an image sensor 201, an A / D conversion unit 202, an image processing unit 203, an AF signal processing unit 204, a format conversion unit 205, a memory (hereinafter referred to as DRAM) 206, an image recording unit 207, and a timing generator 208. The camera body 200 also has a system control unit 209, a lens communication unit 210, a subject detection unit 211, an image display memory (VRAM) 212, and an image display unit 213. The camera body 200 also has an operation unit 214, a shooting mode switch 215, a main switch 216, a switch 217 (hereinafter referred to as SW1), and a shooting switch 218 (hereinafter referred to as SW2).
[0013] The image sensor 201 is composed of a CCD sensor or CMOS sensor and converts a subject image formed via an optical system into an image signal. The A / D converter 202 includes a CDS circuit and a nonlinear amplifier circuit that removes output noise from the image sensor 201. The DRAM 206 is an internal memory, such as a random access memory, and is used as a temporary buffer and a working memory for image compression and decompression. The image recording unit 207 includes a recording medium, such as a memory card, and its interface. The lens communication unit 210 communicates with the lens device 100. The image display unit 213 displays images, provides operational assistance, and displays the status of the camera system. During shooting, the image display unit 213 can also display a subject area and a focus detection frame on the same screen. The operation unit 214 includes a menu switch for configuring various settings, such as the shooting functions of the camera body 200 and settings for image playback, and a switch for switching between shooting mode and playback mode, and is used to externally operate the camera system. The shooting mode switch 215 is used to select a shooting mode, such as macro mode or sports mode. A main switch 216 is used to turn on the power to the camera system. SW1 is used to perform shooting standby operations such as AF and AE. SW2 is used to shoot after operating SW1.
[0014] The system control unit 209 controls the entire camera system. Fig. 1(b) is a block diagram of the system control unit 209. The system control unit 209 has a setting unit 209a, a selection unit 209b, and a focus adjustment unit 209c. In this embodiment, the system control unit 209 is mounted inside the camera body 200, but it may also be configured as a control device separate from the camera body 200.
[0015] A light beam incident on the light receiving surface of the image sensor 201 from the lens device 100 is converted by the photodiodes into signal charges corresponding to the amount of incident light. The signal charges accumulated in each photodiode are sequentially read out from the image sensor 201 as voltage signals based on drive pulses provided by a timing generator 208 in accordance with commands from a system control unit 209.
[0016] Each pixel of the image sensor 201 used in this embodiment is composed of two (a pair) photodiodes A and B and one microlens provided for the pair of photodiodes A and B. Each pixel splits an incident light beam 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 (signal A and signal B) used as an AF signal from the pair of photodiodes A and B. In addition, an image signal (signal A+B) can be obtained by adding the outputs of the pair of photodiodes A and B.
[0017] By combining a plurality of A signals and a plurality of B signals output from a plurality of pixels, a pair of image signals is obtained as an AF signal (focus detection signal) used for autofocus using an image plane phase difference detection method (image plane phase difference AF). The AF signal processing unit 204 performs a correlation calculation on the pair of image signals to obtain a phase difference (hereinafter referred to as image shift amount) that is the amount of shift between the pair of image signals, and also obtains focus information including the defocus amount (focus state), defocus direction, and reliability of the optical system using the image shift amount. The AF signal processing unit 204 obtains a plurality of defocus amounts in a plurality of specifiable predetermined regions.
[0018] FIG. 2 is a flowchart showing the processing performed by the camera system of this embodiment during shooting.
[0019] In step S201, the system control unit 209 determines whether SW1 is turned on. If it is determined that SW1 is turned on, the process proceeds to step S202, and if it is determined that SW1 is not turned on, the process of this step is repeated.
[0020] In step S202 (setting step), the system control unit 209 (setting unit 209a) performs AF frame setting for setting a plurality of AF frames (focus detection frames).
[0021] In step S203, the system control unit 209 performs an AF operation.
[0022] In step S204, the system control unit 209 determines whether SW1 is turned on. If it is determined that SW1 is turned on, the process proceeds to step S205, and if it is determined that SW1 is not turned on, the process returns to step S201.
[0023] In step S205, the system control unit 209 determines whether SW2 is ON. If it is determined that SW2 is ON, the process proceeds to step S206, and if it is determined that SW2 is not ON, the process returns to step S204.
[0024] In step S206, the system control unit 209 causes the camera system to perform a photographing operation.
[0025] FIG. 3 is a flowchart showing the AF frame setting in step S202 of FIG.
[0026] In step S301, the system control unit 209 acquires subject information from the subject detection unit 211. In this embodiment, the subject detection unit 211 detects subjects such as people, animals (for example, dogs or wild birds), and vehicles (for example, motorcycles or four-wheeled vehicles) using deep learning or image processing means. The subject detection unit 211 also detects the main parts of the subject. The main parts are the eyes, face, and body for people and animals, and local areas and the body for vehicles. The subject information is information about the subject detected by the subject detection unit 211, including the type of subject (whether it is a person, animal, or vehicle).
[0027] In step S302, the system control unit 209 uses the subject information to determine whether the subject detection unit 211 has detected a subject. If it is determined that the subject detection unit 211 has detected a subject, the process proceeds to step S303; if it is determined that the subject has not detected a subject, the process proceeds to step S306.
[0028] In step S303, the system control unit 209 determines whether one main part is detected using the subject information. If it is determined that one main part is detected, the process proceeds to step S304. If it is determined that no main part is detected, i.e., if it is determined that multiple main parts are detected, the process proceeds to step S305.
[0029] In step S304, system control unit 209 sets the detection area of one detected main part as the subject area. For example, as shown in Fig. 4(a), when one main part (face) is detected, the detection area of the face (face area) indicated by diagonal lines becomes the subject area.
[0030] In step S305, the system control unit 209 sets the area including the detected multiple main parts as the subject area. For example, as shown in FIG. 4(b), if multiple main parts (eyes, face, body) are detected, the area including the eyes, face, and body indicated by diagonal lines becomes the subject area. Also, as shown in FIGS. 5(a) to 5(c), even if the subject is an animal or a vehicle, if multiple main parts (eyes, face, and body for animals, and local areas and body for vehicles) are detected, the area including all the main parts indicated by diagonal lines becomes the subject area. Note that, in this embodiment, the area including all the main parts is set as the subject area, but the size of the subject area may be changed appropriately based on the actually detected main parts depending on the type, size, movement, detection accuracy, etc. of the subject.
[0031] In step S306, the system control unit 209 sets a predetermined fixed area as the subject area.
[0032] In step S307, the system control unit 209 sets a focus detection area for performing focus detection on the subject area set in steps S304 to S306. FIG. 6 is a diagram showing the relationship between the subject area indicated by diagonal lines in FIGS. 4 and 5 and the focus detection area set by applying a predetermined gain to the subject area. The predetermined gain can be changed as appropriate, for example, by increasing it when the subject is expected to move quickly depending on the AF operation status or the characteristics of the subject. Furthermore, any method may be used to divide the AF frame within the focus detection area, such as determining the size of each AF frame depending on the detected main part of the subject.
[0033] FIG. 7 is a flowchart showing the AF operation in step S203 of FIG.
[0034] In step S401, the system control unit 209 causes the AF signal processing unit 204 to execute focus detection processing and acquires focus information including the defocus amount and reliability.
[0035] In step S402 (selection step), the system control unit 209 (selection unit 209b) selects the AF main frame using the reliability acquired in step S401.
[0036] In step S403, the system control unit 209 determines whether the reliability acquired in step S401 is higher than a preset first threshold. The first threshold is set so that the accuracy of the defocus amount cannot be guaranteed if the reliability is lower than the first threshold, but the focus position direction of the subject can be guaranteed. If it is determined that the reliability is higher than the first threshold, the process proceeds to step S404; if it is determined that the reliability is not higher than the first threshold, the process proceeds to step S413. Note that if the reliability is equal to the first threshold, it is possible to arbitrarily set which step to proceed to.
[0037] In step S404, the system control unit 209 determines whether the defocus amount acquired in step S401 is smaller than a preset second threshold. The second threshold is a value (e.g., five times the depth of focus) that allows the focus lens 103 to be controlled within the depth of focus by driving the focus lens 103 a predetermined number of times (e.g., three times) by the defocus amount when the defocus amount is smaller than the second threshold. If it is determined that the defocus amount is smaller than the second threshold, the process proceeds to step S405; if it is determined that the defocus amount is not smaller than the second threshold, the process proceeds to step S412. Note that if the defocus amount is equal to the second threshold, it is possible to arbitrarily set which step to proceed to.
[0038] In step S405, the system control unit 209 determines whether the focus lens 103 is stopped. If it is determined that the focus lens 103 is stopped, the process proceeds to step S406, and if it is determined that the focus lens 103 is not stopped, the process proceeds to step S410.
[0039] In step S406, the system control unit 209 determines whether the reliability acquired in step S401 is higher than a preset third threshold. The third threshold is set so that the accuracy variation of the defocus amount falls within a predetermined range (for example, within the depth of focus) when the reliability is higher than the third threshold. If it is determined that the reliability is higher than the third threshold, the process proceeds to step S407; if it is determined that the reliability is not higher than the third threshold, the process proceeds to step S410. Note that if the reliability is equal to the third threshold, it is possible to arbitrarily set which step to proceed to.
[0040] In step S407, the system control unit 209 determines whether the defocus amount acquired in step S401 is smaller than a preset fourth threshold. The fourth threshold is set so that the focus lens 103 is controlled to be within the depth of focus when the defocus amount is smaller than the fourth threshold. If it is determined that the defocus amount is smaller than the fourth threshold, the process proceeds to step S408; otherwise, the process proceeds to step S409. Note that if the defocus amount is equal to the fourth threshold, it can be arbitrarily set which step to proceed to.
[0041] In step S408, the system control unit 209 determines that the focus lens 103 is in an in-focus state.
[0042] In step S409, the system control unit 209 drives the focus lens 103 by the defocus amount acquired in step S401 via the lens controller 105. By performing the processes of steps S405 to S409, if the reliability acquired in step S401 is higher than the third threshold, the defocus amount can be detected again with the focus lens 103 stopped.
[0043] In step S410, the system control unit 209 drives the focus lens 103 via the lens controller 105 by a drive amount that is a predetermined ratio of the defocus amount acquired in step S401.
[0044] In step S411, the system control unit 209 stops the focus lens 103 via the lens controller 105.
[0045] In step S412, the system control unit 209 drives the focus lens 103 via the lens controller 105 by a drive amount that is a predetermined ratio of the defocus amount acquired in step S401. The predetermined ratio is set to, for example, 80%, so that the drive amount of the focus lens 103 is small relative to the defocus amount. The speed of the focus lens 103 is set, for example, to be slower than the speed at which drive is completed in the time of one frame. This makes it possible to prevent the subject focus position from being exceeded when the defocus amount is incorrect, and also makes it possible to perform the next drive while driving the focus lens 103 without stopping it (overlap control).
[0046] In step S413, the system control unit 209 determines whether a defocusing condition for determining that a subject to be focused does not exist is satisfied. For example, the defocusing condition may be set such that the focus lens 103 has been driven throughout its entire movable range, i.e., the focus lens 103 has detected both the far-side and near-side lens ends and returned to its initial position. If it is determined that the defocusing condition is satisfied, the process proceeds to step S414; if it is determined that the defocusing condition is not satisfied, the process proceeds to step S415.
[0047] In step S414, the system control unit 209 determines that the focus lens 103 is out of focus.
[0048] In step S415, the system control unit 209 determines whether the focus lens 103 has reached the lens end on the far side or the near side. If it is determined that the focus lens 103 has reached the lens end, the process proceeds to step S416, and if it is determined that the focus lens 103 has not reached the lens end, the process proceeds to step S417.
[0049] In step S416, the system control unit 209 reverses the driving direction of the focus lens 103 via the lens controller 105.
[0050] In step S417, the system control unit 209 drives the focus lens 103 in a predetermined direction via the lens controller 105. The speed of the focus lens 103 is set to, for example, the fastest speed within a range of speeds that will not cause the focus lens 103 to pass the focus position when the defocus amount becomes detectable.
[0051] FIG. 8 is a flowchart showing the focus detection process in step S401 of FIG.
[0052] In step S501, the system control unit 209 sets a focus detection area of an arbitrary range within the image sensor 201.
[0053] In step S502, the AF signal processing unit 204 acquires a pair of image signals from the image sensor 201 in the focus detection area set in step S501.
[0054] In step S503, the AF signal processing unit 204 performs row averaging processing in the vertical direction on the pair of image signals acquired in step S502 in order to reduce the effect of noise on the pair of image signals.
[0055] In step S504, the AF signal processing unit 204 performs filtering to extract signal components in a predetermined frequency band from the signal that has been subjected to the vertical row averaging process in step S503.
[0056] In step S505, the AF signal processing unit 204 acquires the amount of correlation using the signal that has been subjected to the filter processing in step S504.
[0057] In step S506, the AF signal processing unit 204 acquires the correlation change amount using the correlation amount acquired in step S505.
[0058] In step S507, the AF signal processing unit 204 acquires the amount of image shift using the amount of correlation change acquired in step S506.
[0059] In step S508, the AF signal processing unit 204 acquires a reliability indicating how reliable the image shift amount acquired in step S507 is.
[0060] In step S509, the AF signal processing unit 204 converts the amount of image shift into a defocus amount.
[0061] 9 is a flowchart showing the AF main frame selection in step S402 of FIG. 6 in this embodiment. In this flow, the AF main frame (primary focus detection frame) is selected from the detection area of the part with the highest priority. In this embodiment, the order of priority is pupil, face, and body, but different priorities may be set as needed.
[0062] In step S601, the system control unit 209 determines whether the subject detected by the subject detection unit 211 is a person or an animal. If it is determined that the subject is a person or an animal, the process proceeds to step S602, and if it is determined that the subject is not a person or an animal, the process proceeds to step S614.
[0063] In step S602, the system control unit 209 determines whether the subject detection unit 211 has detected the subject's eyes. If it is determined that the subject detection unit 211 has detected the subject's eyes, the system control unit 209 proceeds to step S603, and if it is determined that the subject detection unit 211 has not detected the subject's eyes, the system control unit 209 proceeds to step S606.
[0064] In step S603, the system control unit 209 sets the selection area (search area) of the AF main frame to the pupil area (pupil detection area).
[0065] In step S604, the system control unit 209 executes AF main frame selection with priority given to the detection center.
[0066] In step S605, the system control unit 209 determines whether the reliability of the defocus amount of the AF main frame selected in the pupil region is higher than a threshold, i.e., whether the defocus amount of the AF main frame selected in the pupil region is within a predetermined variation. The threshold may be set to, for example, a third threshold. If it is determined that the reliability is higher than the threshold, this flow ends. If it is determined that the reliability is not higher than the threshold, i.e., if it is determined that it is difficult to select an AF main frame in the pupil region, the flow proceeds to step S606. Note that if the reliability is equal to the threshold, it is possible to arbitrarily set which step to proceed to.
[0067] In step S606, system control unit 209 determines whether or not the subject's face has been detected by subject detection unit 211. If it is determined that the subject detection unit 211 has detected the subject's face, the process proceeds to step S607, and if it is determined that the subject's face has not been detected, the process proceeds to step S610.
[0068] In step S607, the system control unit 209 sets the selected area of the AF main frame to the face area.
[0069] In step S608, the system control unit 209 executes AF main frame selection with priority given to the detection center.
[0070] In step S609, the system control unit 209 determines whether the reliability of the defocus amount of the AF main frame selected in the face area is higher than a threshold, i.e., whether the defocus amount of the AF main frame selected in the face area is within a predetermined variation. The threshold may be set to, for example, a third threshold. If it is determined that the reliability is higher than the threshold, this flow ends. If it is determined that the reliability is not higher than the threshold, i.e., if it is determined that it is difficult to select the AF main frame in the face area, the flow proceeds to step S610. Note that if the reliability is equal to the threshold, it is possible to arbitrarily set which step to proceed to.
[0071] In step S610, the system control unit 209 sets the selected area of the AF main frame to the subject area set in any one of steps S304 to S306 in FIG.
[0072] In step S611, the system control unit 209 determines whether or not the subject has been brought into focus once (whether or not the subject has been captured). If it is determined that the subject has been captured, the process proceeds to step S612; if it is determined that the subject has not been captured, the process proceeds to step S613.
[0073] In step S612, the system control unit 209 selects an AF main frame with priority given to the closest AF frame in the central area where the probability of the subject being present is high and no subject is missing.
[0074] In step S613, the system control unit 209 predicts the subject position in the target frame from historical information on the subject position in multiple past frames, and performs AF main frame selection with center area prediction priority, which prioritizes an AF frame that indicates a position close to the subject position.
[0075] In step S614, system control unit 209 determines whether the subject detected by subject detection unit 211 is a vehicle. If it is determined that the subject is a vehicle, the process proceeds to step S615, and if it is determined that the subject is not a vehicle, the process proceeds to step S623.
[0076] In step S615, system control unit 209 determines whether or not subject detection unit 211 has detected a local portion of the subject. If it is determined that subject detection unit 211 has detected a local portion of the subject, the process proceeds to step S616; if it is determined that subject detection unit 211 has not detected a local portion of the subject, the process proceeds to step S619.
[0077] In step S616, the system control unit 209 sets the selected area of the AF main frame to a local area (local detection area).
[0078] In step S617, the system control unit 209 executes AF main frame selection with priority given to the detection center.
[0079] In step S618, the system control unit 209 determines whether the reliability of the defocus amount of the AF main frame selected in the local region is higher than a threshold, i.e., whether the defocus amount of the AF main frame selected in the local region is within a predetermined variation. The threshold may be set to, for example, a third threshold. If it is determined that the reliability is higher than the threshold, this flow ends. If it is determined not to be higher than the threshold, i.e., if it is determined that it is difficult to select an AF main frame in the local region, the flow proceeds to step S619. Note that if the reliability is equal to the threshold, it is possible to arbitrarily set which step to proceed to.
[0080] In step S619, the system control unit 209 sets the selection area of the AF main frame to an area narrower than the subject area set in any of steps S304 to S306 in Fig. 3. This makes it possible to avoid the problem of focusing on an unintended subject when targeting a subject that moves quickly and is likely to be adjacent to another subject, such as the ground, such as a vehicle such as a motorcycle or four-wheeled vehicle. Furthermore, if the size of the subject is larger than a predetermined size or if the subject distance is shorter than a predetermined distance, the selection area may be narrower than the subject area.
[0081] In step S620, system control unit 209 determines whether or not the subject has been brought into focus once (whether or not the subject has been captured). If it is determined that the subject has been captured, the process proceeds to step S621; if it is determined that the subject has not been captured, the process proceeds to step S622.
[0082] In step S621, the system control unit 209 selects an AF main frame with priority given to the closest central area.
[0083] In step S622, the system control unit 209 executes AF main frame selection with center region prediction priority.
[0084] In step S623, the system control unit 209 sets the selection area of the AF main frame to the focus detection area set in step S307.
[0085] In step S624, the system control unit 209 determines whether or not the subject has been brought into focus once (whether or not the subject has been captured). If it is determined that the subject has been captured, the process proceeds to step S625; if it is determined that the subject has not been captured, the process proceeds to step S626.
[0086] In step S625, the system control unit 209 executes AF main frame selection with priority given to the closest subject, for example, by selecting the AF frame that has detected the focus of the closest subject.
[0087] In step S626, the system control unit 209 executes AF main frame selection with center region prediction priority.
[0088] 10 is a flowchart showing the AF main frame selection with priority given to the detection center according to this embodiment. The flow in FIG. 10 is applied to all AF frames within the selection area of the AF main frame.
[0089] In step S701, the system control unit 209 determines whether the current AF main frame is close to the center of the detection area. If it is determined that it is close to the center of the detection area, the process proceeds to step S702. If it is determined that it is not close to the center of the detection area, the process ends.
[0090] In step S702, the system control unit 209 updates the AF main frame.
[0091] FIG. 11 is a flowchart showing the selection of the AF main frame with priority given to the closest object in the central area in this embodiment.
[0092] In step S801, the system control unit 209 performs an initial setting for the number of frames N. In this embodiment, the number of frames N is set to 3.
[0093] In step S802, the system control unit 209 sets the selected area of the AF main frame to an area of N number of frames × N number of frames at the center of the detection area.
[0094] In step S803, the system control unit 209 determines whether the AF frame is within the selection area of the AF main frame. If it is determined that the AF frame is within the selection area, the process proceeds to step S804. If it is determined that the AF frame is not within the selection area, the process proceeds to step S806.
[0095] In step S804, the system control unit 209 determines whether the defocus amount of the AF frame is the closest to the current AF main frame. If it is determined that it is the closest, the process proceeds to step S805, and if it is determined that it is not the closest, the process proceeds to step S806.
[0096] In step S805, the system control unit 209 updates the AF main frame.
[0097] The processes from step S803 to step S805 are executed for all AF frames within the focus detection area.
[0098] In step S806, the system control unit 209 determines whether the reliability of the defocus amount of the AF main frame is higher than a threshold. If it is determined that the reliability is higher than the threshold, this flow ends, and if it is determined that the reliability is not higher than the threshold, the flow proceeds to step S807. Note that if the reliability is equal to the threshold, it is possible to arbitrarily set which step to proceed to.
[0099] In step S807, the system control unit 209 determines whether the search for the AF main frame within the focus detection area is complete. If it is determined that the search is complete, this flow ends. If it is determined that the search is not complete, the process proceeds to step S808.
[0100] In step S808, the system control unit 209 increases the number of frames N by one.
[0101] FIG. 12 is a flowchart showing the selection of the AF main frame with priority given to central region prediction in this embodiment.
[0102] In step S901, the system control unit 209 performs an initial setting for the number of frames N. In this embodiment, the number of frames N is set to 3.
[0103] In step S902, the system control unit 209 sets the selected area of the AF main frame to the body area (body detection area).
[0104] In step S903, the system control unit 209 determines whether the AF frame is within the selection area of the AF main frame. If it is determined that the AF frame is within the selection area, the process proceeds to step S904. If it is determined that the AF frame is not within the selection area, the process proceeds to step S906.
[0105] In step S904, the system control unit 209 determines whether the AF frame is close to the current AF main frame relative to the predicted position of the subject determined from the defocus amount and the current position of the focus lens 103. If it is determined that it is close, the process proceeds to step S905, and if it is determined that it is not close, the process proceeds to step S906.
[0106] In step S905, the system control unit 209 updates the AF main frame.
[0107] The processes from step S903 to step S905 are executed for all AF frames within the focus detection area.
[0108] In step S906, the system control unit 209 determines whether the reliability of the defocus amount of the AF main frame is higher than a threshold. If it is determined that the reliability is higher than the threshold, this flow ends, and if it is determined that the reliability is not higher than the threshold, the flow proceeds to step S907. Note that if the reliability is equal to the threshold, it is possible to arbitrarily set which step to proceed to.
[0109] In step S907, the system control unit 209 determines whether the search for the AF main frame within the focus detection area is complete. If it is determined that the search is complete, this flow ends. If it is determined that the search is not complete, the process proceeds to step S908.
[0110] In step S908, the system control unit 209 increases the number of frames N by one.
[0111] As described above, with the configuration of this embodiment, when multiple main parts of a subject are detected, it is possible to accurately adjust focus in a higher priority area while avoiding areas where focus detection is difficult. In particular, optimal focusing can be achieved even when targeting a subject that moves quickly and is likely to be adjacent to other subjects, such as the ground, such as a vehicle such as a motorcycle or automobile. (Second embodiment) In this embodiment, differences from the first embodiment will be described. The configuration of the camera system of this embodiment is the same as that of the camera system of the first embodiment.
[0112] In the first embodiment, when a detection area of a relatively small subject, such as the pupil or face of a person or animal, or a local part of a vehicle, is set as the selection area of the AF main frame, the AF main frame is selected with priority given to the detection center, assuming that there is almost no deviation in the detection position. However, when it is necessary to take deviation in the detection position into consideration, a process may be performed in which an AF frame with a higher reliability of the defocus amount is selected as the AF main frame.
[0113] Furthermore, in the first embodiment, when the reliability of the AF main frame selected in the local detection area of the eyes or face of a person or animal, or a vehicle, is low, the complexity of the subject shape is taken into consideration and the AF main frame is selected with an emphasis on an AF frame in the central area where the probability of the subject being present is high and no subject is missing. However, when the complexity of the subject shape does not need to be taken into consideration, a process may be performed in which an AF frame with a higher reliability of the defocus amount is selected as the AF main frame.
[0114] 13 is a flowchart showing the AF main frame selection in step S402 of FIG. 6 according to this embodiment. The processes of steps S1001 to S1003 are similar to the processes of steps S601 to S603 of FIG. 9, respectively, and therefore will not be described in detail. The processes of steps S1005 to S1007 are similar to the processes of steps S605 to S607 of FIG. 9, respectively, and therefore will not be described in detail. The processes of steps S1009 to S1011 are similar to the processes of steps S609 to S611 of FIG. 9, respectively, and therefore will not be described in detail. The processes of steps S1013 to S1016 are similar to the processes of steps S613 to S616 of FIG. 9, respectively, and therefore will not be described in detail. The processes of steps S1018 to S1020 are similar to the processes of steps S618 to S620 of FIG. 9, respectively, and therefore will not be described in detail. Furthermore, the processes in steps S1022 to S1026 are similar to the processes in steps S622 to S626 in FIG. 9, respectively, and therefore will not be described in detail.
[0115] In steps S1004, S1008, and S1017, the system control unit 209 executes AF main frame selection with priority given to detection area reliability.
[0116] In steps S1012 and S1021, the system control unit 209 executes AF main frame selection with priority given to central area reliability, which prioritizes an AF frame with a high reliability of the defocus amount within the detection area.
[0117] 14 is a flowchart showing the AF main frame selection with priority given to the detection area reliability according to this embodiment. The flow of FIG. 14 is applied to all AF frames within the selection area of the AF main frame.
[0118] In step S1101, the system control unit 209 determines whether the AF frame is within the detection area for the main part of the subject. If it is determined that the AF frame is within the area, the process proceeds to step S1103; if it is determined that the AF frame is not within the area, the process ends.
[0119] In step S1102, the system control unit 209 determines whether the reliability of the defocus amount of the AF frame is higher than the reliability of the defocus amount of the current AF main frame. If it is determined that it is higher, the process proceeds to step S1104; if it is determined that it is not higher, the process ends.
[0120] In step S1103, the system control unit 209 updates the AF main frame.
[0121] FIG. 15 is a flowchart showing the selection of the AF main frame with priority given to the reliability of the central area according to this embodiment.
[0122] In step S1201, the system control unit 209 performs an initial setting for the number of frames N. In this embodiment, the number of frames N is set to 3.
[0123] In step S1202, the system control unit 209 sets the selected area of the AF main frame to an area of N×N frames at the center of the body area.
[0124] In step S1203, the system control unit 209 determines whether the AF frame is within the selection area of the AF main frame. If it is determined that the AF frame is within the selection area, the process proceeds to step S1204. If it is determined that the AF frame is not within the selection area, the process proceeds to step S1206.
[0125] In step S1204, the system control unit 209 determines whether the reliability of the defocus amount of the AF frame is higher than the current defocus amount of the AF main frame. If it is determined that it is higher, the process proceeds to step S1205, and if it is determined that it is not higher, the process proceeds to step S1206.
[0126] In step S1205, the system control unit 209 updates the AF main frame.
[0127] The processes from step S1203 to step S1205 are executed for all AF frames within the focus detection area.
[0128] In step S1206, the system control unit 209 determines whether the reliability of the defocus amount of the AF main frame is higher than a threshold. If it is determined that the reliability is higher than the threshold, this flow ends, and if it is determined that the reliability is not higher than the threshold, the flow proceeds to step S1207. Note that if the reliability is equal to the threshold, it is possible to arbitrarily set which step to proceed to.
[0129] In step S1207, the system control unit 209 determines whether the search for the AF main frame within the focus detection area is complete. If it is determined that the search is complete, this flow ends. If it is determined that the search is not complete, the process proceeds to step S1208.
[0130] In step S1208, the system control unit 209 increases the number of frames N by one.
[0131] As described above, with the configuration of this embodiment, when multiple main parts of a subject are detected, it is possible to accurately adjust focus in a higher priority area while avoiding areas where focus detection is difficult. In particular, optimal focusing can be achieved even when targeting a subject that moves quickly and is likely to be adjacent to other subjects, such as the ground, such as a vehicle such as a motorcycle or automobile. [Other Examples] The present invention can also be realized by supplying a program that realizes one or more functions of the above-described embodiments to a system or device via a network or a storage medium, and having one or more processors in the computer of the system or device read and execute the program. It can also be realized by a circuit (e.g., ASIC) that realizes one or more functions.
[0132] Although the preferred embodiments of the present invention have been described above, the present invention is not limited to these embodiments, and various modifications and changes are possible within the scope of the gist of the present invention. [Explanation of symbols]
[0133] 209 System control unit (control device) 209a Setting section 209b Selection section
Claims
1. a setting unit that sets a subject area that includes a part of the subject using subject information that includes information about the part of the subject based on an image signal converted from an image of the subject, and that sets a plurality of focus detection frames using the subject area; a selection unit that sets a selection area including two or more focus detection frames from the plurality of focus detection frames and selects a main focus detection frame for focus adjustment from the two or more focus detection frames, The control device is characterized in that, when the part of the subject is the entire vehicle, the selection unit makes the selection area narrower than the subject area.
2. 2. The control device according to claim 1, further comprising a focus adjustment unit that performs focus adjustment by moving a focus lens along an optical axis in accordance with a focus state of the main focus detection frame.
3. 3. The control device according to claim 1, wherein the selection unit makes the selection area narrower than the subject area when the part of the subject is a local part of a vehicle and the reliability of the focus state of the main focus detection frame is high.
4. 4. The control device according to claim 1, wherein the selection unit narrows the selection area to be smaller than the object area when the size of the object is larger than a predetermined size or when the object distance is shorter than a predetermined distance.
5. an image sensor that converts a subject image into an image signal; An imaging device comprising the control device according to any one of claims 1 to 4.
6. 6. The imaging apparatus according to claim 5, further comprising a display unit capable of displaying the subject area and the focus detection frame on the same screen.
7. a setting step of setting a subject area that is an area including a part of the subject using subject information including information about the part of the subject based on an image signal converted from an image of the subject, and setting a plurality of focus detection frames using the subject area; a selection step of setting a selection area including two or more focus detection frames from the plurality of focus detection frames, and selecting a main focus detection frame for focus adjustment from the two or more focus detection frames, A control method characterized in that, in the selecting step, when the part of the subject is the entire vehicle, the selected area is made narrower than the subject area.
8. A program that causes a computer to execute the control method according to claim 7.
Citation Information
Patent Citations
Method and device for ascending fish, etc. in conduit
JP1986045822A
Imaging device and method of controlling ranging area
JP2009284462A
Imaging apparatus and automatic focusing method
JP2016080738A
Focus adjustment device, and focus adjustment device control method
JP2018087864A
Image processing apparatus and control method therefor
JP2019121860A