Image pickup apparatus, control method thereof, computer program product, and storage medium
By designing multi-directional detection capabilities for phase difference detection and focus adjustment in the imaging equipment, and performing reliability control during detection direction switching, the problem of unstable focus adjustment during the phase difference detection direction switching in the prior art is solved, and high-precision automatic focus adjustment capability is achieved.
Patent Information
- Application Number
- CN202411759593.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-12-04
- Filing Date
- 2024-12-03
- Publication Date
- 2025-06-06
AI Technical Summary
Existing cameras cannot adjust the focus stably when switching the phase difference detection direction, resulting in sudden out-of-focus.
An imaging device is designed, which includes a phase difference detection unit, a focus detection unit, an adjustment unit and a control unit. By detecting the phase difference in the first direction and the second direction of the optical image, and when switching the detection direction, the focus adjustment is controlled to ensure that the reliability of the focus state reaches a predetermined value, the focus adjustment based on the new direction is not performed.
It realizes the ability to adjust the focus stably when switching the phase difference detection direction, avoids the problem of sudden out of focus, and ensures the high-precision automatic focus capability of the camera device in different shooting states.
Smart Images

Figure CN120111203A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an imaging device and a control method thereof. Background Art
[0002] In recent years, imaging devices such as digital cameras are required to have high definition, and the increase in pixels has been promoted. Along with this, the processing time and power consumption when reading image signals from imaging elements increase, and this increase is suppressed by thinning out pixels or averaging and reading.
[0003] As a focus detection method in a general imaging device, an imaging plane phase difference detection method is known. The imaging plane phase difference detection method is a method in which pupil division is performed by a microlens and a pair of photoelectric conversion units provided for each pixel of an imaging element, and a focusing state (defocus amount) is obtained based on the phase difference between a pair of image signals obtained from the pair of photoelectric conversion units.
[0004] In Japanese Patent Laid-Open No. 2005-107252, the reading mode is changed in response to the shooting control state. Specifically, a mode of reading out all pixels (reading out without thinning out) is set when shooting a still image, and a mode of reading out pixels by thinning out (reading out with thinning out) is set when shooting a moving image or other times (during autofocus (AF) control or standby state). This achieves both obtaining a high-definition still image and shortening the processing time in moving image shooting, etc. In particular, during AF control immediately before shooting a still image, high-precision autofocus is achieved by not thinning out pixels in the pupil division direction.
[0005] Along with high definition, more accurate focus detection is required. In the case where pupil division is performed only in one direction by the above-mentioned focus detection method, there are cases where focus detection cannot be performed. For example, in the case where the subject has an edge only in the same direction as the pupil division direction, the phase difference cannot be detected, and the defocus amount (focus detection) cannot be calculated.
[0006] Japanese Patent Laid-Open No. 2020-141122 discloses the following imaging device. Pupil division in the horizontal direction is performed in pixels having a pair of photoelectric conversion units arranged in the horizontal direction, and pupil division in the vertical direction is performed in pixels having a pair of photoelectric conversion units arranged in the vertical direction. This obtains the amount of defocus in both the horizontal and vertical directions. In this case, since both the horizontal and vertical directions are pupil division directions, it is necessary to read out all pixels without eliminating pixels in both the horizontal and vertical directions in order to achieve high-precision automatic focusing. That is, it is also necessary to set the non-interval elimination reading mode during AF control before taking a still image.
[0007] On the other hand, during the standby state, it is necessary to set an interval elimination reading mode to suppress processing time and power consumption. In the case where autofocus is also performed during the standby state (standby AF control), it is necessary to limit the pupil division direction to one direction and eliminate pixels at intervals. For example, in the case where the pupil division direction is the horizontal direction, a mode is set to eliminate pixels in the vertical direction and read pixels (vertical interval elimination reading mode). In this case, the phase difference detection direction is different between the AF control before taking a still image and the standby AF control. Therefore, when the AF control when taking a still image is switched to the standby AF control, problems such as sudden loss of focus may occur even if the subject has not changed.
[0008] Specifically, in the AF control before taking a still image, by using the focus detection result of the image signal that is pupil-divided in the horizontal direction and the vertical direction, focus detection can be performed in all directions. On the other hand, in the standby AF control, since the pupil division direction is only the horizontal direction, as described above, focus detection of a subject having an edge only in the same direction as the pupil division direction (for example, a subject having horizontal stripes) is impossible. Therefore, when the AF control is switched to the standby AF control, there is a case where the focus is suddenly lost.
[0009] Japanese Patent Laid-Open No. 2017-187589 discloses a countermeasure for a change in calculation results when the phase difference detection direction is switched due to movement of a subject, when areas where phase difference detection is performed in the horizontal direction and the vertical direction are mixed in one image area.
[0010] However, Japanese Patent Laid-Open No. 2017-187589 assumes a situation where phase difference detection can be performed in both the horizontal and vertical directions, and does not assume a subject for which focus detection can be performed only in one direction. Therefore, in the case of a subject with horizontal stripes or vertical stripes, there is a possibility of sudden loss of focus when the phase difference detection direction is switched. Summary of the invention
[0011] The present invention has been made in view of the above-mentioned problems, and provides an image pickup apparatus that can perform a stable focus adjustment operation even when the detection direction of the phase difference is switched.
[0012] According to a first aspect of the present invention, there is provided an image capturing device comprising: a phase difference detection unit configured to detect a phase difference in a first direction of an optical image of light that has passed through different pupil regions of an optical system and a phase difference in a second direction different from the first direction; a focus detection unit configured to detect a focus state based on at least one of the phase difference in the first direction and the phase difference in the second direction, and to obtain the reliability of the focus state; an adjustment unit configured to perform focus adjustment by driving the optical system based on the focus state detected by the focus detection unit; and a control unit configured to control the adjustment unit not to perform focus adjustment based on the phase difference in the second direction in the case of a transition from a first state in which focus adjustment is performed based on the phase difference in the first direction to a second state in which focus adjustment is performed based on the phase difference in the second direction, until the reliability of the focus state detected based on the phase difference in the second direction becomes higher than a predetermined value.
[0013] According to a second aspect of the present invention, a control method for a camera device is provided, which includes: performing phase difference detection, the phase difference detection being used to detect the phase difference in a first direction of an optical image of light that has passed through different pupil regions of an optical system and the phase difference in a second direction different from the first direction; performing focus detection, the focus detection being used to detect a focus state based on at least one of the phase difference in the first direction and the phase difference in the second direction, and to obtain the reliability of the focus state; performing focus adjustment by driving the optical system based on the focus state detected by the focus detection; and in the event of a transition from a first state in which focus adjustment is performed based on the phase difference in the first direction to a second state in which focus adjustment is performed based on the phase difference in the second direction, controlling the focus adjustment so as not to perform focus adjustment based on the phase difference in the second direction until the reliability of the focus state detected based on the phase difference in the second direction becomes higher than a predetermined value.
[0014] According to a third aspect of the present invention, a computer program product is provided, which is used to enable a computer to execute each process of the above control method.
[0015] According to a fourth aspect of the present invention, there is provided a non-transitory computer-readable storage medium storing a program for causing a computer to execute each process of the above control method.
[0016] Further features of the present invention will become apparent from the following description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a block diagram showing the configuration of an image pickup apparatus according to a first embodiment of the present invention.
[0018] FIG. 2A to FIG. 2C A diagram showing the arrangement of a pixel array of an imaging element.
[0019] Figure 3 is a flowchart showing the photographing process in the first embodiment.
[0020] Figure 4 is a flowchart showing the standby AF process in the first embodiment.
[0021] Figure 5 : is a flowchart showing the scene change determination processing in the first embodiment and the second embodiment.
[0022] Figure 6 : is a flowchart showing the focus detection processing in the first embodiment and the second embodiment.
[0023] Figure 7 : is a flowchart showing the AF control process in the first embodiment and the second embodiment.
[0024] Figure 8 is a flowchart showing the photographing process in the second embodiment.
[0025] Fig. 9 is a flowchart showing the reading mode setting process in the second embodiment.
[0026] Fig.10 is a flowchart of the standby AF process in the second embodiment. DETAILED DESCRIPTION
[0027] Hereinafter, the embodiments will be described in detail with reference to the accompanying drawings. Note that the following embodiments are not intended to limit the scope of the claimed invention. A plurality of features are described in the embodiments, but there is no limitation to the invention requiring all such features, and a plurality of such features may be appropriately combined. In addition, in the accompanying drawings, the same reference numerals are given to the same or similar configurations, and redundant descriptions thereof are omitted.
[0028] First embodiment
[0029] Figure 1 1 is a block diagram showing a configuration of an image pickup apparatus 100 according to a first embodiment of the present invention. The image pickup apparatus 100 of the present embodiment mainly includes a lens unit 101 and a camera body 102. A lens control unit 117 for integrally controlling the operation of the entire lens unit 101 and a camera control unit 141 for integrally controlling the operation of the entire image pickup apparatus 100 including the lens unit 101 can communicate with each other through terminals provided on a lens mount.
[0030] First, an overview of the configuration and operation of the lens unit 101 will be described.
[0031] The lens unit 101 is a kind of interchangeable lens that is attachable to and detachable from a camera body 102 . Figure 1 The lens unit 101 in FIG. 1 is a single lens and is an example of a normal lens. A photographing lens 111 (optical system) is configured to include a fixed lens 112 , an aperture 113 , and a focus lens 114 .
[0032] The aperture control unit 115 adjusts the aperture diameter of the aperture 113 by driving the aperture 113 and adjusts the light amount during shooting. The focus lens 114 is a focus adjustment lens, and although Figure 1 14, but generally includes a plurality of lenses. As described later, the focus control unit 116 receives the lens drive amount obtained by the camera control unit 141 via the lens control unit 117, and adjusts the focus by driving the focus lens 114. AF control is achieved by the focus control unit 116 controlling the movement of the focus lens 114. The aperture control unit 115 and the focus control unit 116 are controlled by the lens control unit 117.
[0033] Next, an overview of the configuration and operation of the camera body 102 will be described. The imaging element 121 includes a plurality of photoelectric conversion elements for photoelectrically converting a subject image (optical image) into electric charge, and includes, for example, a CCD or CMOS sensor. The light beam incident through the taking lens 111 of the lens unit 101 is imaged on the light receiving surface of the imaging element 121, is converted into electric charge in each photoelectric conversion element according to the amount of light, and is accumulated. By the drive pulse output from the timing generator 122, the electric charge accumulated in each photoelectric conversion element is sequentially read out from the imaging element 121 as a voltage signal corresponding to the electric charge.
[0034] Here, we will refer to FIG. 2A to FIG. 2C The configuration of the image pickup element 121 is described.
[0035] Figure 2A The array of pixels 211 in the range of 8 horizontal pixel columns (x direction: horizontal direction) × 6 vertical pixel rows (y direction: vertical direction) on the imaging plane of the imaging element 121 when viewed from the lens unit 101 side is shown. The imaging plane is provided with a Bayer array color filter, and the red (R) and green (G) color filters are arranged alternately from the left in the pixels of the odd-numbered rows, and the green (G) and blue (B) color filters are arranged alternately from the left in the pixels of the even-numbered rows.
[0036] Figure 2BA pixel 211R in which a red (R) color filter is arranged is shown. 212 denotes an on-chip microlens. A pair of photoelectric conversion units (first pair of photoelectric conversion units) 213A and 213B divided in the x direction are arranged inside the on-chip microlens 212. A pixel 211Gr in which a green (G) color filter is arranged and a pixel 211B in which a blue (B) color filter is arranged are similarly configured.
[0037] Figure 2C A pixel 211Gb in which a color filter of green (G) is arranged is shown. A pair of photoelectric converters (a second pair of photoelectric converters) 213C and 213D divided in the y direction are arranged inside the on-chip microlens 212 .
[0038] As described above, the imaging element 121 in this embodiment includes pixels 211R, 211Gr, and 211B whose photoelectric conversion section is divided into two in the x direction and pixel 211Gb whose photoelectric conversion section is divided into two in the y direction. Here, the horizontal direction and the vertical direction are shown as directions of pupil division, but pupil division can be performed in an oblique direction.
[0039] A pair of image signals (focus detection signals) and parallax image data as display / record image data for 3D image observation are generated using photoelectric conversion signals output from each of a pair of photoelectric conversion units in a plurality of pixels. Brightness determination image data and normal display / record image data are generated using an imaging signal obtained by adding and outputting a pair of photoelectric conversion signals from each of a plurality of pixels.
[0040] Return to Figure 1 The CDS / AGC / AD circuit 123 performs correlated double sampling for removing reset noise, adjusting sensor gain, and signal digitization on the voltage signal (imaging signal and focus detection signal) read from the imaging element 121. Then, the CDS / AGC / AD circuit 123 outputs the processed imaging signal to the imaging signal processing unit 124, and outputs the processed focus detection signal to the focus detection signal processing unit 125.
[0041] The focus detection signal processing unit 125 sets and arranges a focus detection area for performing focus detection Here, among the focus detection signals output from the CDS / AGC / AD circuit 123, focus detection signals output from pixels included in a predetermined area are extracted.
[0042] Here, focus detection by an imaging plane phase difference detection method will be described. Figure 2BIn the pixel 211R (211Gr and 211B) shown in FIG. 1 , the microlens 212 performs pupil division in the x direction by causing the photoelectric converter 213A and the photoelectric converter 213B to form images in the exit pupil of the optical system using light beams from different regions in the x direction. Figure 2C In the pixel 211Gb shown, the microlens 212 performs pupil division in the y direction by causing the photoelectric conversion unit 213C and the photoelectric conversion unit 213D to form images in the exit pupil of the optical system using light beams from different regions in the y direction. In other words, the phase difference in the first direction of the optical image and the phase difference in the second direction different from the first direction of the light that has passed through different pupil regions in the optical system are detected.
[0043] The focus detection signal processing unit 125 generates an A image signal by synthesizing the photoelectric conversion signal obtained from one of the pair of photoelectric conversion sections 213A and 213B in each of the plurality of pixels 211R in a predetermined range (focus detection area), and generates a B image signal by synthesizing the photoelectric conversion signal obtained from the other photoelectric conversion section.
[0044] Similarly, the focus detection signal processing unit 125 generates a C image signal by synthesizing the photoelectric conversion signal obtained from one of the pair of photoelectric conversion sections 213C and 213D in each of the plurality of pixels 211Gb in the focus detection area, and generates a D image signal by synthesizing the photoelectric conversion signal obtained from the other photoelectric conversion section.
[0045] Correlation calculation is performed on these image signal pairs (A image signal and B image signal and C image signal and D image signal) to obtain defocus amount and reliability information (two-image matching level and two-image steepness).
[0046] In the present embodiment, in the AF control before shooting a still image, reading in the non-thinning reading mode is performed, and the correlation calculation result (horizontal direction focus detection) between the A image signal and the B image signal and the correlation calculation result (vertical direction focus detection) between the C image signal and the D image signal are used in combination. In the standby AF control, reading in the vertical thinning reading mode is performed, and only the correlation calculation result (horizontal direction focus detection) between the A image signal and the B image signal is used.
[0047] The imaging signal processing unit 124 performs predetermined image processing such as γ conversion processing, white balance processing, and various correction processing on the imaging signal output from the CDS / AGC / AD circuit 123 , and stores the processed image data in the SDRAM 136 via the bus 131 .
[0048] The display image data stored in the SDRAM 136 is read by the display control unit 132 via the bus 131, and displayed on the display unit 133. The recording image data is recorded on the recording medium 135 by the recording medium control unit 134 in the operation mode for recording.
[0049] Measurement of subject brightness in the photometry unit 142 (photometry) is performed using the brightness determination image data, and the photometry result is output to the camera control unit 141 .
[0050] The exposure setting (AE) is determined based on the light metering result and camera control values such as charge accumulation time, shooting sensitivity, and aperture value.
[0051] The vibration detection unit 143 detects angular velocity around a predetermined axis using a shake sensor (such as a gyro sensor) and outputs it to the camera control unit 141. The camera control unit 141 drives the correction optical system for camera shake correction based on these detection signals and detects the posture of the camera body.
[0052] The ROM 137 stores a control program executed by the camera control unit 141 and various types of data necessary for control and the like, and the flash ROM 138 stores various types of setting information related to the operation of the camera body 102 such as user setting information and the like.
[0053] The shooting preparation switch (SW1) 139 is turned on, for example, by half-pressing a shutter release button (not shown), and the start of a shooting preparation operation such as AF or AE is instructed (hereinafter referred to as "SW1"). After SW1 is turned on, the shooting switch (SW2) 140 is turned on, for example, by fully pressing a shutter release button (not shown), and shooting is instructed (hereinafter referred to as "SW2").
[0054] The camera control unit 141 determines the lens driving amount based on the defocus amount and reliability information output from the focus detection signal processing unit 125. The lens driving amount is transmitted to the focus control unit 116 via the lens control unit 117, and the focus control unit 116 realizes AF by driving the focus lens 114.
[0055] Next, we will refer to Figure 3The following describes a photographing process performed by the camera body 102. This process is realized by the camera control unit 141 executing a control program stored in the ROM 137. The same applies to the operations of other flowcharts described below.
[0056] First, in step S301, the camera control unit 141 performs initialization processing such as camera settings, and causes the processing to proceed to step S302. In the present embodiment, initialization of the scene change flag and the vertical direction focus flag is also performed here. The scene change flag is a flag set by determining whether the user has caused the shooting scene to change in step S401 described later, and is set to zero as an initial state. The vertical direction focus flag is a flag for setting whether it is in a focused state by using vertical direction focus detection in step S306 described later, and the initial state is set to zero.
[0057] In step S302 , the camera control unit 141 sets the reading mode to the vertical thinning reading mode, and advances the process to step S303 .
[0058] In step S303, standby AF control processing is performed, and the processing proceeds to step S304. In the standby AF control processing in step S303, since the reading mode is set to the vertical thinning reading mode, the horizontal direction focus detection result is used for AF control. Figure 4 Describe the details.
[0059] In step S304, the camera control unit 141 determines whether SW1 is pressed. If not, the process returns to step S303 and repeats the standby operation (steps S303 and S304), and if pressed, the process proceeds to step S305.
[0060] In step S305 , the camera control unit 141 sets the reading mode to the non-thinning reading mode, and advances the process to step S306 .
[0061] In step S306, the camera control unit 141 performs AF control processing, and the process proceeds to step S307. In the AF control processing of step S306, since the reading mode is set to the non-thinning reading mode, AF control is performed using both the horizontal direction focus detection result and the vertical direction focus detection result. Figure 7 Describe the details.
[0062] In step S307, the camera control unit 141 determines whether it is in a focused state. If it is not in a focused state, the process returns to step S306 and repeats the AF operation (step S306 and step S307). If it is in a focused state, SW2 can be pressed in step S308, and still image shooting is performed by pressing SW2.
[0063] After the shooting of the still image, the process returns to step S302 , the reading mode switches to the vertical thinning reading mode, and the process shifts to the standby operation (step S303 and step S304 ).
[0064] Furthermore, if SW2 is not pressed and pressing of SW1 is released in step S308 (not shown), the process returns to step S302, the reading mode switches to the vertical thinning reading mode, and the process transitions to the standby operation (steps S303 and S304).
[0065] This process is repeated until the shooting process is stopped. The time when the shooting process is stopped is the time when the camera body 102 is powered off, or the time when the interruption process of operations other than shooting, such as user setting process of the camera and reproduction process for checking shot images or moving images, is performed.
[0066] Next, we will refer to Figure 4 Flowchart description in Figure 3 Standby AF control processing performed in step S303 in .
[0067] In step S401 , the camera control unit 141 performs scene change determination processing to determine whether the shooting scene has changed.
[0068] Here, we will refer to Figure 5 The processing in the scene change determination in step S401 is described.
[0069] In step S501, the camera control unit 141 compares the detection results of the light metering unit 142 and the vibration detection unit 143 with the detection results of the previous judgment, and judges whether there is a change. If it is judged in step S501 that there is a change in the posture of the camera or a change in brightness, it is when the user changes the shooting scene, and the subject also changes, so it is necessary to perform focus detection again. Therefore, in step S502, the camera control unit 141 sets the scene change flag to 1, resets the vertical focus flag (sets the vertical focus flag to zero), and ends the processing.
[0070] If it is determined in step S501 that there is neither a change in the camera posture nor a change in brightness, then in step S503, the camera control unit 141 sets the scene change flag to zero and ends the process. In this case, since the vertical focus state needs to be maintained, the flag is not set.
[0071] Regarding posture changes and brightness changes, it is preferable to determine thresholds and continuity in consideration of camera shake, etc. For example, the detection results of the light metering unit 142 and the vibration detection unit 143 are stored in a dedicated memory, and when the stored plurality of results exceeds a predetermined threshold a predetermined number of times, it is determined that there is a change.
[0072] Note that in the present embodiment, the case where the change of the shooting scene is judged based on the posture change or the brightness change has been described as an example, but it can also be judged by the change of the subject detection state. It is useful when there is a detected subject because it easily reflects the user's intention. The change of the subject detection state indicates the case where the subject cannot be detected, other subjects are selected when there are multiple subjects, or the subject moves. The movement of the subject can be judged based on a benchmark related to whether the change in size and position of the subject relative to the angle of view exceeds a certain amount.
[0073] When step S401 as the scene change determination processing ends, the camera control unit 141 advances the processing to focus detection processing of step S402 .
[0074] Reference Figure 6 The flowchart in describes the focus detection processing in step S402.
[0075] First, in step S601, the camera control unit 141 sets the vertical direction calculation flag i to zero and sets the calculation result to an initial value, and the process proceeds to step S602. The vertical direction calculation flag i is a flag for determining whether it is focus detection calculation in the vertical direction (focus detection calculation in the horizontal direction).
[0076] In step S602, the camera control unit 141 extracts a focus detection signal in the focus detection area from the focus detection signal output from the image pickup element 121. A pair of image signals (image A and image B when the vertical direction calculation flag i=0, and image C and image D when the vertical direction calculation flag i=1) are generated from the extracted focus detection signal. Then, the process proceeds to step S603.
[0077] In step S603, the camera control unit 141 performs averaging processing on each of the pair of image signals generated in step S602 in a direction orthogonal to the pupil division direction (y direction when the vertical direction calculation flag i = 0, and x direction when the vertical direction calculation flag i = 1). Thereafter, the process proceeds to step S604. The averaging processing in step S603 can reduce the influence of noise on the image signal.
[0078] In step S604, the camera control unit 141 performs a filtering process of extracting a signal component in a predetermined frequency band from the pair of image signals obtained by the averaging process in step S603, and causes the process to proceed to step S605. Here, a low-pass filter for extracting a low-frequency component of a signal and a high-pass filter for extracting a high-frequency component may be used, a middle-pass filter capable of extracting a middle-frequency component between the low-pass filter and the high-pass filter may be used, or three or more types of filters may be used.
[0079] In step S605 , the camera control unit 141 calculates a correlation amount using the pair of image signals subjected to the filter processing in step S604 .
[0080] In step S606 , the camera control unit 141 calculates a correlation change amount from the correlation amount calculated in step S605 .
[0081] In step S607 , the camera control unit 141 calculates the image shift amount based on the correlation change amount calculated in step S606 .
[0082] In step S608, the camera control unit 141 obtains Defocus_0 (horizontal calculation result) or Defocus_1 (vertical calculation result) converted into a defocus amount by multiplying the image shift amount by a conversion coefficient. The conversion coefficient is a value corresponding to the zoom lens position, the aperture value, and the image height of the imaging plane, and is held by the camera.
[0083] In step S609 , the camera control unit 141 acquires the reliability evaluation result Reliability_0 (evaluation result of horizontal direction calculation result) or Reliability_1 (evaluation result of vertical direction calculation result) indicating the reliability of the defocus amount calculated in step S608 , and advances the process to step S610 .
[0084] Reliability is determined by estimating the standard deviation of the defocus amount based on the values calculated in the processes of step S605 and step S606 and setting a stepwise threshold value for the standard deviation. However, the method of reliability determination is not limited to this method, and other known methods may be used.
[0085] In the present embodiment, as the evaluation result of reliability, the case where there is reliability (reliability is a predetermined value or more: the defocus amount can be used for the focusing operation) is represented as high, and the case where there is no reliability (reliability is less than a predetermined value: the defocus amount cannot be used for the focusing operation) is represented as low. Here, for easy understanding of the description, the reliability is divided into two levels, but an intermediate reliability between high and low, etc. may be used, or the reliability may be divided into three or more levels.
[0086] In step S610 , the camera control unit 141 determines whether focus detection calculation in the vertical direction is necessary (whether the reading mode is the non-thinning reading mode).
[0087] exist Figure 4 In step S401 of FIG. 1 , in standby AF, focus detection calculation in the vertical direction is not necessary (the reading mode is the vertical thinning reading mode). Therefore, if the processing proceeds from step S401 to Figure 6 If the camera control unit 141 determines in step S610 that the focus detection calculation in the vertical direction is unnecessary, it ends the processing of the flow and returns to step S620. Figure 4 Note that in the step S403 including steps S611 and S612 Figure 7 The case where focus detection calculation in the vertical direction is necessary (the reading mode is the non-thinning reading mode) is described in the focus detection processing in step S701 of FIG.
[0088] exist Figure 4 In step S403, the camera control unit 141 determines the reliability acquired in step S609, and when the reliability of the focus detection calculation in the horizontal direction is high, the process proceeds to step S404. In this case, the reliability of the result of the focus detection calculation in the horizontal direction is high, and the possibility that the subject can be focused is high. Therefore, in step S404, the camera control unit 141 sets the defocus amount calculated using the focus detection calculation in the horizontal direction acquired in step S608 as the lens driving amount. Then, since the focus detection calculation result is switched to the focus detection calculation result in the horizontal direction, the vertical direction focus flag is set to zero, and the process proceeds to step S408.
[0089] On the other hand, if it is determined in step S403 that the reliability acquired in step S609 is low, the camera control unit 141 advances the process to step S405, and determines whether it is in the vertical direction focus state and whether there is a scene change. If it is in the vertical direction focus state and there is no scene change, the camera control unit 141 advances the process to step S406.
[0090] In this case, since the defocus amount calculated by the focus detection in the horizontal direction acquired in step S608 is unreliable and the scene has not changed, the vertical focus state is maintained. Therefore, in step S406, the camera control unit 141 sets the lens driving amount to zero and proceeds to step S408.
[0091] If the vertical direction focus state is not in step S405 or there is a scene change, the process proceeds to step S407. In this case, since the defocus amount calculated by the focus detection in the horizontal direction acquired in step S608 is also unreliable, the search drive amount is set to the lens drive amount, and the process shifts to the search operation of searching for the object (focus position). The camera control unit 141 sets the vertical direction focus flag to zero, releases the vertical direction focus state, and proceeds to step S408.
[0092] In step S408, the camera control unit 141 determines whether the lens drive amount set in the previous step is greater than the focus monitoring width. The focus monitoring width is a threshold for preventing unnecessary movement of the lens when the focus is already in focus, and is desirably set to about 1Fδ. If the lens drive amount is greater than the focus monitoring width, the camera control unit 141 causes the process to proceed to step S409, drives the lens with the set lens drive amount, and ends the process. If the lens drive amount is equal to or less than the focus monitoring width, the camera control unit 141 does not drive the lens, and ends the process.
[0093] Next, we will refer to Figure 7 Flowchart description in Figure 3 AF control in step S306 in .
[0094] First, refer to Figure 6 The flowchart in FIG. 1 describes the focus detection processing in step S701. Since steps S601 to S609 are similar to those described above Figure 4 This is the same processing as the focus detection processing in step S402 in , so its description is omitted.
[0095] exist Figure 7 In step S701 of the focus detection processing, since the reading mode is the non-thinning reading mode, it is determined in step S610 that focus detection calculation in the vertical direction is necessary, and the camera control unit 141 advances the processing to step S611.
[0096] In step S611, the camera control unit 141 determines whether the focus detection calculation in the vertical direction has ended. When the vertical direction calculation flag i is zero, since the focus detection calculation in the vertical direction has not ended, the process proceeds to step S612.
[0097] In step S612, the camera control unit 141 sets the vertical direction calculation flag i to 1, and returns to step S602 to perform focus detection calculation in the vertical direction. When the process proceeds to step S611 again, since the vertical direction calculation flag is 1, the process ends, and the process returns to step S602. Figure 7 Step S702 in .
[0098] In this case, in steps S608 and S609, the horizontal direction calculation results (Defocus_0 and Reliability_0) and the vertical direction calculation results (Defocus_1 and Reliability_1) are acquired.
[0099] Next, in step S702, the camera control unit 141 determines the reliability of the focus detection calculation result in the vertical direction and the focus detection calculation result in the horizontal direction. When both reliability are low, the camera control unit 141 advances the process to step S706.
[0100] In this case, since the defocus amount acquired in step S608 is unreliable, in step S706, the camera control unit 141 sets the search drive amount to the lens drive amount and transitions to the search operation of searching for the subject. The vertical focus flag is set to zero, the vertical focus state is released, and the process proceeds to step S707.
[0101] On the other hand, in step S702, if the reliability of the vertical direction calculation result or the horizontal direction calculation result is better than low, the camera control unit 141 advances the processing to step S703, and compares the reliability to determine which calculation result to use. If the reliability of the focus detection calculation in the vertical direction is higher, the camera control unit 141 sets the focus detection calculation result in the vertical direction as the lens driving amount, sets the vertical direction focus flag to 1, and advances the processing to step S707 in step S704.
[0102] If the reliability of the focus detection calculation result in the horizontal direction is higher, the camera control unit 141 sets the focus detection calculation result in the horizontal direction as the lens drive amount (permitting transition to the horizontal direction calculation result) in step S705, sets the vertical direction focus flag to zero, and proceeds to step S707.
[0103] In step S707, the camera control unit 141 determines whether the lens driving amount set in the previous step is greater than the focus management width. The focus management width is a threshold for determining whether it is in a focused state, and is desirably set to about 0.25 to 0.5Fδ smaller than the focus monitoring width (about 1Fδ) in step S408.
[0104] If the lens driving amount is larger than the focus management width, the camera control unit 141 advances the process to step S708 , drives the lens at the set lens driving amount, and ends the process.
[0105] If the lens driving amount is equal to or smaller than the focus management width, the camera control unit 141 advances the process to step S709, determines that it is in the focused state, and ends the process.
[0106] Here, we will refer to Figure 3 , taking the case of performing focus detection on a subject having horizontal stripes as an example, the effects of the present embodiment are described.
[0107] In the case of a subject with horizontal stripes, since the vertical thinning reading mode is set in step S302, focus detection cannot be performed, and in the standby operation (steps S303 and S304) immediately after the camera is activated, a blurred state is established during standby.
[0108] When SW1 is pressed in step S304 and the reading mode is switched to the non-thinning reading mode in step S305, focus detection can be performed by focus detection calculation in the vertical direction. Therefore, in the AF operation (steps S306 and S307), the state becomes the vertical direction focused state (in the Figure 7 In step S704, vertical direction focus flag = 1 is set), the process proceeds to step S308, and it becomes possible to capture a still image.
[0109] After capturing a still image in step S308, the processing returns to step S302, and when the mode is switched to the vertical interval elimination mode, focus detection cannot be performed again, and therefore in the known technology, although the subject has not changed, problems such as sudden blurring may occur due to the transition to the search operation for searching for the subject.
[0110] In this embodiment, when the vertical focus flag = 1, Figure 4 In step S405, it is determined that the vertical focus state is maintained and the lens is not moved, and thus the state in which the subject with horizontal stripes is focused is maintained. This state is maintained until Figure 4 In the scene change determination in step S401, it is determined that the shooting scene has changed (the user has switched the subject) or Figure 4 In step S403, it is determined that the reliability (Reliability_0) of the focus detection calculation result in the horizontal direction during the standby period is high. Therefore, when the subject does not change from the subject with horizontal stripes, the state in which the subject with horizontal stripes is focused can be stabilized.
[0111] As described above, according to the present embodiment, even when the phase difference detection direction is switched, AF control can be performed stably.
[0112] Second embodiment
[0113] Next, we will refer to Figures 8 to 10 The photographing process performed by the camera body 102 in the second embodiment is described. In the first embodiment, when the phase difference detection direction is switched, the focus adjustment is stabilized by not moving the lens until there is a scene change or until the reliability of focus detection in the switched detection direction becomes high.
[0114] In the second embodiment, the focus adjustment is stabilized by maintaining the focus detectable state without changing the reading mode. Figures 3 to 7 The same steps as those in the flowchart of the first embodiment described in FIG. 1 are denoted by the same reference numerals, and description thereof is omitted.
[0115] exist Figure 8 In step S301, the camera control unit 141 performs initialization processing and advances the process to step S801.
[0116] In step S801 , the camera control unit 141 sets the reading mode, and proceeds with the process to step S802 .
[0117] In step S802, the camera control unit 141 performs standby AF control and advances the process to step S304. Step S304 and subsequent steps are similar to the Figure 3 The steps are the same as in .
[0118] Here, we will refer to Fig. 9 The flowchart in describes the reading mode setting in step S801.
[0119] In step S401, the camera control unit 141 executes a process of scene change determination ( Figure 5 ) and proceeds to step S901.
[0120] In step S901, the camera control unit 141 determines whether the vertical direction is in focus and whether there is a scene change. If the vertical direction is in focus and there is no scene change, the camera control unit 141 advances the process to step S902. In this case, since it is desired to continue the focus detection calculation in the vertical direction, the non-thinning reading mode is set as the reading mode, the process is terminated, and the process advances to step S903. Figure 8 Step S802 in .
[0121] If it is determined in step S901 that it is not in vertical focus or there is a scene change, the camera control unit 141 does not need to perform vertical calculation and therefore sets the vertical thinning reading mode as the reading mode, ends the processing, and advances the processing to step S802.
[0122] Next, we will refer to Fig.10 The flowchart describes the standby AF control processing in the second embodiment of step S802.
[0123] In step S701, the camera control unit 141 performs focus detection processing ( Figure 6 ). In step S701, if the non-thinning reading mode is set as the reading mode in step S801, then Figure 6 In steps S608 and S609, the horizontal direction calculation results (Defocus_0 and Reliability_0) and the vertical direction calculation results (Defocus_1 and Reliability_1) are obtained.
[0124] On the other hand, if the vertical thinning reading mode is set as the reading mode in step S801, only the horizontal calculation results (Defocus_0 and Reliability_0) are acquired in steps S608 and S609, and initial values are substituted into the vertical calculation results (Defocus_1 and Reliability_1).
[0125] In step S1001, the camera control unit 141 determines whether the defocus amount (Defocus_1) of the focus detection calculation result in the vertical direction is an initial value. If the vertical thinning reading mode is set as the reading mode in step S801, the initial value is set to Defocus_1, and the process proceeds to step S1002.
[0126] In step S1002 , the camera control unit 141 determines the reliability of the horizontal direction calculation result acquired in step S609 , and if the reliability is high, the process proceeds to step S1003 .
[0127] In step S1003 , the camera control unit 141 sets the defocus amount (Defocus_0) acquired in step S608 as the lens driving amount, and advances the process to step S408 .
[0128] If it is determined in step S1002 that the reliability of the horizontal direction calculation result acquired in step S609 is low, the camera control unit 141 advances the processing to step S1004 .
[0129] In step S1004 , since the defocus amount ( Defocus — 0 ) acquired in step S608 is not reliable, the camera control unit 141 sets the search drive amount as the lens drive amount, and advances the process to step S408 .
[0130] On the other hand, if the non-thinning reading mode is set as the reading mode in step S801, the defocus amount (Defocus_1) of the focus detection calculation result in the vertical direction in step S1001 is not an initial value, so the camera control unit 141 advances the processing to step S1005.
[0131] In step S1005, the camera control unit 141 determines the reliability of the focus detection calculation result in the vertical direction acquired in step S609. If the reliability is low, the process proceeds to step S1006 to release the vertical focus state, and the vertical focus flag is set to zero, and the process proceeds to step S1002.
[0132] In step S1002 , similarly to the above, the camera control unit 141 determines the reliability of the horizontal direction calculation result, sets the lens driving amount, and advances the process to step S408 .
[0133] If it is determined in step S1005 that the reliability of the focus detection calculation result in the vertical direction acquired in step S609 is high, the camera control unit 141 advances the processing to step S1007.
[0134] In step S1007, the camera control unit 141 determines the reliability of the focus detection calculation result in the horizontal direction acquired in step S609. If the reliability is low, since the vertical direction focused state continues, the process proceeds to step S1008, the defocus amount (Defocus_1) of the vertical direction calculation result acquired in step S608 is set to the lens driving amount, and the process proceeds to step S408.
[0135] If it is determined in step S1007 that the reliability of the horizontal direction calculation result acquired in step S609 is high, the process proceeds to step S1009 and the camera control unit 141 determines whether the phase difference detection direction can be switched.
[0136] In step S1009, it is determined whether the absolute value of the difference between the defocus amounts of the focus detection calculation result in the horizontal direction and the focus detection calculation result in the vertical direction acquired in step S608 (|Defocus_0-Defocus_1|) is greater than a threshold value Th. The threshold value Th for switching of the phase difference detection direction is a threshold value for determining that there is no sense of incongruity even if switching from the focus detection calculation result in the vertical direction to the focus detection calculation result in the horizontal direction is performed, and therefore it is preferable to set the threshold value Th to about 1Fδ.
[0137] If it is determined in step S1009 that the absolute value of the difference between the defocus amounts is greater than the threshold value Th, the camera control unit 141 advances the process to step S1008 to maintain the vertical direction focused state. Then, the defocus amount (Defocus_1) of the focus detection calculation result in the vertical direction acquired in step S608 is set as the lens driving amount, and the process advances to step S408.
[0138] If it is determined in step S1009 that the absolute value of the difference between the defocus amounts is equal to or less than the threshold value Th, the camera control unit 141 advances the process to step S1010. Then, in order to switch to the focus detection calculation result in the horizontal direction, the vertical direction focus flag is set to zero, the vertical direction focus state is released, and the process advances to step S1003.
[0139] In step S1003 , the camera control unit 141 sets the defocus amount (Defocus_0 ) of the focus detection calculation result in the horizontal direction acquired in step S608 as the lens driving amount, and advances the processing to step S408 .
[0140] Since steps S408 and S409 are Figure 4 The steps in are the same, so their description will be omitted.
[0141] Here, we will refer to Figure 8 , the effects of the present embodiment are described using an example of a case where focus detection is performed on a subject having horizontal stripes.
[0142] In the case of a subject with horizontal stripes, since the vertical thinning mode is set in step S801 immediately after the camera is activated, in the standby operation (step S303 and step S304) immediately after the camera is activated, focus detection cannot be performed, and a blurred state is established during the standby period. When SW1 is pressed in step S304 and the reading mode is switched to the non-thinning reading mode in step S305, focus detection can be performed by vertical direction calculation. Therefore, in the AF operation (steps S306 and step S307), the state becomes a vertical direction focused state (in the Figure 7In step S704, vertical direction focus flag = 1 is set), the process proceeds to step S308, and it becomes possible to capture a still image.
[0143] After capturing a still image in step S308, the process returns to step S801, and if the vertical focus state is in place (vertical focus flag = 1), the image is captured. Fig. 9 In step S901, it is determined that vertical calculation is necessary. Then, in step S902, the non-thinning reading mode is set, and vertical calculation is continued, so that the subject with horizontal stripes can be kept in focus. Similar to the first embodiment, this state is maintained until Fig. 9 In the scene change determination in step S401, it is determined that the shooting scene has changed (the user has switched the subject) or Fig.10 The reliability (Reliability_1) of the vertical direction calculation result during the standby period in step S1005 becomes low. Therefore, when the subject does not change from the subject with horizontal stripes, the subject with horizontal stripes can be stably focused.
[0144] Alternatively, in Fig.10 In step S1009, the process is maintained until it is determined that the defocus result (Defocus_0) calculated in the horizontal direction and the defocus result (Defocus_1) calculated in the vertical direction during the standby period are almost at the same level (that is, they can be received as the horizontal direction calculation results). If it is determined that they can be received as the horizontal direction calculation results, then Fig.10 In step S1003, the defocus result (Defocus_0) calculated in the horizontal direction is used to perform focus driving, and even if Fig. 9 In step S903, the reading mode is also switched to the vertical thinning reading mode, and stable focus control can also be performed.
[0145] As described above, according to the present embodiment, even when the phase difference detection direction is switched, AF control can be performed stably.
[0146] Other embodiments
[0147] The embodiments of the present invention may also be implemented by providing software (program) for performing the functions of the above-described embodiments to a system or device via a network or various storage media, and a computer or a central processing unit (CPU) or a microprocessing unit (MPU) of the system or device reads and executes the program.
[0148] While the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.
Claims
1. A camera device, comprising: a phase difference detection unit configured to detect a phase difference in a first direction of an optical image of light having passed through different pupil regions of the optical system and a phase difference in a second direction different from the first direction; a focus detection unit configured to detect a focus state based on at least one of a phase difference in the first direction and a phase difference in the second direction, and to acquire reliability of the focus state; an adjustment unit configured to perform focus adjustment by driving the optical system based on the focus state detected by the focus detection unit; as well as A control unit configured to control the adjustment unit not to perform focus adjustment based on the phase difference in the second direction when transitioning from a first state in which focus adjustment is performed based on the phase difference in the first direction to a second state in which focus adjustment is performed based on the phase difference in the second direction, until the reliability of the focus state detected based on the phase difference in the second direction becomes higher than a predetermined value.
2. The imaging device according to claim 1, wherein: In the case of transition from the first state to the second state, the control unit permits focus adjustment based on the phase difference in the second direction after reliability of the in-focus state detected based on the phase difference in the second direction becomes higher than the predetermined value.
3. The imaging device according to claim 1, wherein: In the case of transitioning from the first state to the second state, the control unit stops driving the optical system after transitioning to the second state until reliability of the in-focus state detected based on the phase difference in the second direction becomes higher than the predetermined value.
4. The imaging device according to claim 1, wherein: In the case of transitioning from the first state to the second state, the control unit performs control not to transition to the second state until the reliability of the in-focus state detected based on the phase difference in the second direction becomes higher than the predetermined value.
5. The imaging device according to claim 4, wherein: In the case of transition from the first state to the second state, the control unit permits transition to the second state if the difference between the focus state detected based on the phase difference in the first direction and the focus state detected based on the phase difference in the second direction is smaller than a threshold.
6. The imaging device according to claim 4, wherein: The control unit permits transition to the second state when there is a change in the photographing scene.
7. The imaging device according to claim 6, wherein: The control unit determines a change in the shooting scene by a change in the posture of the imaging device.
8. The imaging device according to claim 6, wherein: The control unit determines the change of the shooting scene according to the change of the brightness of the image.
9. The imaging device according to claim 6, wherein: The control unit determines the change of the shooting scene according to the detected change of the subject.
10. The imaging device according to claim 1, wherein The control unit controls the optical system to perform search driving for searching a focus position when a shooting scene changes.
11. The imaging device according to claim 1, wherein: In the second state, the focus detection unit detects an in-focus state based on a signal in which signals of pixels in a direction orthogonal to the second direction are thinned out.
12. The imaging device according to claim 1, wherein: The focus detection unit can detect the in-focus state based on the phase difference in the first direction and the in-focus state based on the phase difference in the second direction in the first state, and can detect the in-focus state based on the phase difference in the second direction in the second state.
13. A method for controlling a camera device, comprising: performing phase difference detection for detecting a phase difference in a first direction of an optical image of light having passed through different pupil regions of the optical system and a phase difference in a second direction different from the first direction; performing focus detection, the focus detection being used to detect a focus state based on at least one of a phase difference in the first direction and a phase difference in the second direction, and to obtain reliability of the focus state; Based on the focus state detected by the focus detection, performing focus adjustment by driving the optical system; as well as In the case of a transition from a first state in which focus adjustment is performed based on the phase difference in the first direction to a second state in which focus adjustment is performed based on the phase difference in the second direction, the focus adjustment is controlled not to be performed based on the phase difference in the second direction until the reliability of the focus state detected based on the phase difference in the second direction becomes higher than a predetermined value. 14 . A computer program product comprising a program for causing a computer to execute each process of the control method according to claim 13 . 15 . A non-transitory computer-readable storage medium storing a program for causing a computer to execute each process of the control method according to claim 13 .
Citation Information
Patent Citations
Solid-state imaging apparatus
JP2005107252A
Focus adjustment device, method for the same, imaging apparatus, program, and storage medium
JP2017187589A
Photoelectric conversion device, imaging system, and mobile apparatus
JP2020141122A