Imaging device, control method thereof, program, and storage medium
The imaging device stabilizes autofocus by detecting phase differences in two orthogonal directions and only switching when the new direction's reliability is high, addressing sudden focus loss issues in existing technologies.
Patent Information
- Application Number
- JP2023204911
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2023-12-04
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2043-12-04
AI Technical Summary
Existing imaging devices face issues with sudden focus loss when switching phase difference detection directions, particularly for subjects with edges in specific orientations, leading to unstable autofocus operations.
The imaging device employs phase difference detection in two orthogonal directions and ensures stable focus adjustment by transitioning to a new detection direction only when the reliability of the new direction exceeds a predetermined threshold, maintaining focus until scene changes or reliability is established.
This approach stabilizes autofocus operations by preventing sudden focus loss during direction switches, ensuring consistent focus on subjects with edges in any orientation.
Smart Images

Figure 0007797461000001 
Figure 0007797461000002 
Figure 0007797461000003
Abstract
Description
[Technical Field]
[0001] The present invention relates to an imaging apparatus and a control method thereof. [Background technology]
[0002] In recent years, there has been a demand for higher resolution in imaging devices such as digital cameras, and the number of pixels has been increasing. This has led to an increase in the processing time and power consumption when reading out image signals from the imaging element, but these can be reduced by thinning out pixels or averaging them before reading out.
[0003] Also, a commonly known focus detection method used in general imaging devices is the image plane phase difference detection method, which divides the pupil using one microlens and a pair of photoelectric conversion units provided for each pixel of the image sensor, and determines the focus state (defocus amount) from the phase difference between a pair of image signals obtained from the pair of photoelectric conversion units.
[0004] In Patent Document 1, the readout mode is changed depending on the shooting control state. Specifically, when shooting a still image, a mode is set in which all pixels are read out (non-thinning readout), and when shooting video or in other situations (during autofocus (AF) control or standby mode), a mode is set in which pixels are thinned out and read out (thinning readout). This achieves both the acquisition of high-resolution still images and the reduction of processing time during video shooting, etc. In particular, during AF control immediately before shooting a still image, pixels are not thinned out in the pupil division direction, thereby achieving high-precision autofocus.
[0005] Furthermore, as the definition increases, more accurate focus detection is required. In the above-mentioned focus detection method, if the pupil is divided in only one direction, focus detection may not be possible. For example, if the subject has edges only in the same direction as the pupil division direction, the phase difference cannot be detected and the defocus amount cannot be calculated (focus detection).
[0006] Patent Document 2 discloses the following imaging device. In pixels where a pair of photoelectric conversion units is arranged horizontally, horizontal pupil division is performed, and in pixels where a pair of photoelectric conversion units is arranged vertically, vertical pupil division is performed. This allows for the determination of defocus amounts in both the horizontal and vertical directions. In this case, because both the horizontal and vertical directions are pupil division directions, to achieve highly accurate autofocus, it is necessary to read all pixels without thinning them out in both the horizontal and vertical directions. In other words, it is necessary to set the non-thinning readout mode even during AF control before capturing a still image.
[0007] On the other hand, during standby, it is necessary to set the camera to thinning readout mode to reduce processing time and power consumption. Furthermore, when performing autofocus (standby AF control) during standby, it is necessary to limit the pupil division direction to one direction and thin out pixels. For example, if the pupil division direction is horizontal, it is necessary to set a mode that thins out and reads pixels vertically (vertical thinning readout mode). In this case, the phase difference detection direction differs between the AF control before still image capture and the AF control during standby. Therefore, when switching from AF control during still image capture to AF control during standby, a problem occurs in which the image suddenly goes out of focus, even though the subject has not changed.
[0008] Specifically, in AF control before still image capture, omnidirectional focus detection is possible by combining the focus detection results of image signals with pupil division in the horizontal and vertical directions. On the other hand, in standby AF control, the pupil division direction is only horizontal, so as mentioned above, focus detection is not possible for subjects that have edges only in the same direction as the pupil division direction (such as subjects with horizontal stripes). For this reason, the focus may suddenly go out when switching to standby AF control.
[0009] Patent Document 3 discloses a measure to prevent changes in calculation results when the phase difference detection direction is switched due to the movement of the subject in a case where areas in which horizontal and vertical phase difference detection are performed are mixed within a single image area. [Prior art documents] [Patent documents]
[0010] [Patent Document 1] Japanese Patent Application Laid-Open No. 2005-107252 [Patent Document 2] Japanese Patent Publication No. 2020-141122 [Patent Document 3] Japanese Patent Application Laid-Open No. 2017-187589 Summary of the Invention [Problem to be solved by the invention]
[0011] However, Patent Document 3 assumes that phase difference detection is possible in both the horizontal and vertical directions, and does not take into consideration subjects where focus detection is possible only in one direction or the other. As a result, in the case of a subject with horizontal or vertical stripes, there is a possibility that the subject may suddenly go out of focus when the phase difference detection direction is switched.
[0012] The present invention has been made in consideration of the above-mentioned problems, and its purpose is to provide an imaging device that can perform stable focus adjustment operations even when the phase difference detection direction is switched. [Means for solving the problem]
[0013] The imaging device according to the present invention comprises a phase difference detection means for detecting a phase difference in a first direction of an optical image formed by light passing through different pupil regions of an optical system and a phase difference in a second direction different from the first direction, a focus detection means for detecting 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 acquiring reliability of the detected focus state, an adjustment means for driving the optical system to perform focus adjustment based on the focus state detected by the focus detection means, and 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, The transition to the second state is not allowed until the reliability of the focus state detected based on the phase difference in the second direction becomes higher than a predetermined value. and a control means for controlling the adjusting means. [Effects of the Invention]
[0014] According to the present invention, even when the phase difference detection direction is switched, a stable focus adjustment operation can be performed. [Brief explanation of the drawings]
[0015] [Figure 1] 1 is a block diagram showing the configuration of an imaging apparatus according to a first embodiment of the present invention. [Figure 2] FIG. 2 is a diagram showing the configuration of a pixel array of an imaging element. [Figure 3] 5 is a flowchart showing a shooting process in the first embodiment. [Figure 4] 5 is a flowchart showing standby AF processing in the first embodiment. [Figure 5] 6 is a flowchart showing a scene change determination process in the first and second embodiments. [Figure 6] 6 is a flowchart showing focus detection processing in the first and second embodiments. [Figure 7] 1 is a flowchart showing an AF control process in the first and second embodiments. [Figure 8] 10 is a flowchart showing a shooting process in the second embodiment. [Figure 9] 10 is a flowchart showing a read mode setting process in the second embodiment. [Figure 10] 10 is a flowchart showing standby AF processing in the second embodiment. DETAILED DESCRIPTION OF THE INVENTION
[0016] Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. Note that the following embodiments do not limit the scope of the invention claimed. Although multiple features are described in the embodiments, not all of these multiple features are necessarily essential to the invention, and multiple features may be combined arbitrarily. Furthermore, in the accompanying drawings, the same reference numerals are used to designate the same or similar components, and redundant explanations will be omitted.
[0017] (First embodiment) 1 is a block diagram showing the configuration of an image capture device 100 according to a first embodiment of the present invention. The image capture device 100 of this embodiment is mainly composed of a lens unit 101 and a camera body 102. A lens control unit 117 that controls the overall operation of the lens unit 101 and a camera control unit 141 that controls the overall operation of the image capture device 100 including the lens unit 101 can communicate with each other via terminals provided on the lens mount.
[0018] First, the configuration and operation of the lens unit 101 will be outlined.
[0019] The lens unit 101 is a type of interchangeable lens that can be attached to and detached from the camera body 102. The lens unit 101 in Fig. 1 is a single lens, and is an example of a normal lens. The photographing lens 111 (optical system) is configured with a fixed lens 112, an aperture 113, and a focus lens 114.
[0020] The aperture control unit 115 adjusts the aperture diameter of the aperture 113 by driving the aperture 113, thereby adjusting the amount of light during shooting. The focus lens 114 is a focus adjustment lens, and although it is simply shown as a single lens in FIG. 1, it is usually made up of multiple lenses. As will be described later, the focus control unit 116 receives the lens drive amount determined by the camera control unit 141 via the lens control unit 117, and drives the focus lens 114 to adjust the focus. AF control is achieved by the movement control of the focus lens 114 by this focus control unit 116. The aperture control unit 115 and the focus control unit 116 are controlled by the lens control unit 117.
[0021] Next, an outline of the configuration and operation of the camera body 102 will be described. The image sensor 121 has a plurality of photoelectric conversion elements that photoelectrically convert a subject image (optical image) into electric charges, and is configured by, for example, a CCD or CMOS sensor. A light beam incident through the photographing lens 111 of the lens unit 101 is focused on the light receiving surface of the image sensor 121, and is converted into electric charges in each photoelectric conversion element according to the amount of light, and is accumulated. The electric charges accumulated in each photoelectric conversion element are sequentially read out from the image sensor 121 as voltage signals according to the electric charges, in response to drive pulses output by a timing generator 122.
[0022] Here, the configuration of the image sensor 121 will be described with reference to FIGS. 2(a), (b), and (c).
[0023] 2(a) shows an arrangement of pixels 211 in a range of 8 pixel columns (horizontal direction in the x direction) by 6 pixel rows (vertical direction in the y direction) on the imaging surface of the image sensor 121 as seen from the lens unit 111. Color filters in a Bayer array are provided on the imaging surface, with red (R) and green (G) color filters alternately arranged from left to right on the odd-numbered rows of pixels, and green (G) and blue (B) color filters alternately arranged from left to right on the even-numbered rows of pixels.
[0024] 2(b) shows a pixel 211R in which a red (R) color filter is arranged. 212 denotes an on-chip microlens. A pair of photoelectric conversion units (first pair of photoelectric conversion units) 213A and 213B separated in the x direction are arranged inside the on-chip microlens 212. Pixel 211Gr in which a green (G) color filter is arranged and pixel 211B in which a blue (B) color filter is arranged are also configured in the same way.
[0025] 2(c) shows a pixel 211Gb in which a green (G) color filter is arranged. Inside the on-chip microlens 212, a pair of photoelectric conversion units (a second pair of photoelectric conversion units) 213C and 213D separated in the y direction are arranged.
[0026] As described above, the image sensor 121 in this embodiment has pixels 211R, 211Gr, and 211B whose photoelectric conversion unit is divided into two in the x direction, and pixel 211Gb whose photoelectric conversion unit is divided into two in the y direction. Here, the horizontal and vertical directions are shown as the pupil division directions, but it may also be divided in a diagonal direction.
[0027] A pair of image signals (signals for focus detection) and parallax image data as image data for display / recording for 3D image observation are generated using photoelectric conversion signals output from each pair of photoelectric conversion units in a plurality of pixels. Also, image data for luminance determination and normal image data for display / recording are generated using imaging signals output by adding together the pair of photoelectric conversion signals from each of the plurality of pixels.
[0028] 1, the CDS / AGC / AD circuit 123 performs correlated double sampling to remove reset noise, adjusts the sensor gain, and digitizes the voltage signals (image pickup signals and focus detection signals) read out from the image sensor 121. The CDS / AGC / AD circuit 123 then outputs the processed image pickup signals to an image pickup signal processing unit 124 and the processed focus detection signals to a focus detection signal processing unit 125.
[0029] The focus detection signal processor 125 sets and arranges a focus detection area for focus detection. Here, it extracts focus detection signals output from pixels included in a predetermined area from the focus detection signals output from the CDS / AGC / AD circuit 123.
[0030] Here, focus detection using the imaging surface phase difference detection method will be described. In pixel 211R (211Gr, 211B) shown in FIG. 2(b), the microlens 212 performs pupil division in the x direction by focusing light beams from different regions of the exit pupil of the optical system in the x direction on photoelectric conversion units 213A and 213B. In pixel 211Gb shown in FIG. 2(c), the microlens 212 performs pupil division in the y direction by focusing light beams from different regions of the exit pupil of the optical system in the y direction on photoelectric conversion units 213C and 213D. In other words, the phase difference in a first direction and a phase difference in a second direction different from the first direction between optical images formed by light passing through different pupil regions of the optical system are detected.
[0031] The focus detection signal processing unit 125 generates an image A signal by combining photoelectric conversion signals obtained from one of the paired photoelectric conversion units 213A, 213B in each of the multiple pixels 211R within a predetermined range (focus detection area), and generates an image B signal by combining photoelectric conversion signals obtained from the other one.
[0032] Similarly, the focus detection signal processing unit 125 generates a C image signal by combining photoelectric conversion signals obtained from one of the paired photoelectric conversion units 211C, 211D in each of the multiple pixels 211Gb in the focus detection area, and generates a D image signal by combining photoelectric conversion signals obtained from the other pair.
[0033] A correlation calculation is performed between these pairs of image signals (image signals A and B, and image signals C and D) to determine the amount of defocus and reliability information (degree of coincidence between the two images, degree of steepness between the two images).
[0034] In this embodiment, AF control before still image capture involves reading out in non-thinning readout mode, and using both the results of correlation calculation (horizontal focus detection) between the image signals A and B and the results of correlation calculation (vertical focus detection) between the image signals C and D. AF control during standby involves reading out in vertical thinning readout mode, and using only the results of correlation calculation (horizontal focus detection) between the image signals A and B.
[0035] The imaging signal processing unit 124 performs predetermined image processing such as gamma 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.
[0036] 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.
[0037] The brightness determination image data is used to measure (meter) the brightness of the subject in the photometry unit 142, and the photometry result is output to the camera control unit 141.
[0038] The exposure setting (AE) is determined based on the photometry results and camera control values such as charge accumulation time, photographing sensitivity, and aperture value.
[0039] Vibration detection unit 143 detects angular velocity around a predetermined axis using a shake sensor such as a gyro sensor, and outputs the detected angular velocity to camera control unit 141. Based on these detection signals, camera control unit 141 drives a correction optical system for image stabilization and detects the attitude of the camera body.
[0040] The ROM 137 stores the control program executed by the camera control unit 141 and various data necessary for control, and the flash ROM 138 stores various setting information related to the operation of the camera body 102, such as user setting information.
[0041] A shooting preparation switch (SW1) 139 is turned on by, for example, half-pressing a shutter release button (not shown) or the like, and instructs the start of shooting preparation operations such as AF, AE, etc. (hereinafter referred to as "SW1"). After SW1 is turned on, a shooting switch (SW2) 140 is turned on by, for example, fully pressing a shutter release button (not shown) and instructs shooting (hereinafter referred to as "SW2").
[0042] 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 drives the focus lens 114 to achieve AF.
[0043] Next, the photographing process performed by the camera body 102 will be described with reference to Fig. 3. This process is realized by the camera control unit 141 executing a control program stored in the ROM 137. Note that the operations of the other flowcharts that follow are similar.
[0044] First, in step S301, the camera control unit 141 performs initialization processing for camera settings, etc., and proceeds to step S302. In this embodiment, initialization of a scene change flag and a vertical focus flag is also performed here. The scene change flag is a flag that is set in step S401 (described later) after determining whether the user has changed the shooting scene, and is initially set to zero. The vertical focus flag is a flag that is set in step S306 (described later) to determine whether focus has been achieved using vertical focus detection, and is initially set to zero.
[0045] In step S302, the camera control unit 141 sets the readout mode to the vertical thinning readout mode, and proceeds to step S303.
[0046] In step S303, standby AF control processing is executed, and the process proceeds to step S304. In the standby AF control processing in step S303, since the readout mode is set to vertical thinning readout mode, AF control is performed using the horizontal focus detection result. Details will be described later using FIG. 4.
[0047] In step S304, the camera control unit 141 determines whether SW1 has been pressed. If SW1 has not been pressed, the process returns to step S303 and the standby operation (steps S303 and S304) is repeated; if SW1 has been pressed, the process proceeds to step S305.
[0048] In step S305, the camera control unit 141 sets the readout mode to the non-thinning-out readout mode, and proceeds to step S306.
[0049] In step S306, the camera control unit 141 executes AF control processing, and proceeds to step S307. In the AF control processing in step S306, since the readout mode is set to the non-thinning readout mode, AF control is performed using both the horizontal focus detection result and the vertical focus detection result. Details will be described later using FIG. 7.
[0050] In step S307, the camera control unit 141 determines whether or not the camera is in focus. If the camera is not in focus, the process returns to step S306, and the AF operation (steps S306 and S307) is repeated. If the camera is in focus, the camera becomes able to press SW2 in step S308, and pressing SW2 executes still image capture.
[0051] After capturing the still image, the process returns to step S302, the readout mode is switched to the vertical thinning readout mode, and the process transitions to standby operation (steps S303 and S304).
[0052] Also, if SW2 is not pressed in step S308 and the pressing of SW1 is released (not shown), the process returns to step S302, the readout mode is switched to the vertical thinning readout mode, and a transition to standby operation (steps S303 and S304) occurs.
[0053] This process is repeated until the shooting process is stopped, which can occur when the power to the camera body 102 is turned off or when an interruption occurs for an operation other than shooting, such as a user setting process for the camera or a playback process for checking shot images and videos.
[0054] Next, the standby AF control process performed in step S303 in FIG. 3 will be described with reference to the flowchart in FIG.
[0055] In step S401, the camera control unit 141 performs a scene change determination process to determine whether or not the photographed scene has changed.
[0056] Here, the process of scene change determination in step S401 will be described with reference to FIG.
[0057] In step S501, the camera control unit 141 compares the detection results of the photometry unit 142 and the vibration detection unit 143 with the detection results from the previous determination and determines whether or not there has been a change. If it is determined in step S501 that there has been a change in the camera's posture or brightness, this means that the user has changed the shooting scene, and the subject has also changed, so focus detection must be performed again. Therefore, in step S502, the camera control unit 141 sets the scene change flag to 1, and at the same time resets (sets to zero) the vertical focus state flag, and ends the processing.
[0058] If it is determined in step S501 that there has been no change in the camera's posture or brightness, then in step S503 the camera control unit 141 sets the scene change flag to 0 and ends the process. In this case, the vertical focus state needs to be maintained, so no flag is set.
[0059] It is preferable to determine the continuity of posture changes and brightness changes against a threshold value, taking into consideration camera shake, etc. For example, the detection results of the photometry unit 142 and vibration detection unit 143 are stored in a dedicated memory, and if multiple stored results exceed a predetermined threshold value a predetermined number of times, it is determined that a change has occurred.
[0060] In this embodiment, a case where a change in the shooting scene is determined based on a change in posture or brightness has been described as an example, but it can also be determined based on a change in the subject detection state. When a detected subject exists, this is useful because it is easier to reflect the user's intention. A change in the subject detection state refers to when a subject cannot be detected, when there are multiple subjects and another subject is selected, or when a subject moves. The movement of a subject can be determined based on whether the change in size or position of the subject relative to the angle of view exceeds a certain amount.
[0061] When the scene change determination process in step S401 is completed, the camera control unit 141 advances the process to the focus detection process in step S402.
[0062] The focus detection process in step S402 will be described with reference to the flowchart in FIG.
[0063] First, in step S601, the camera control unit 141 sets zero to the vertical direction calculation flag i and sets the calculation result to an initial value, and proceeds to step S602. The vertical direction calculation flag i is a flag that determines whether or not the focus detection calculation is for the vertical direction (whether or not the focus detection calculation is for the horizontal direction).
[0064] In step S602, the camera control unit 141 extracts focus detection signals within the focus detection area from the focus detection signals output from the image sensor 121. A pair of image signals (images A and B when the vertical direction calculation flag i=0, and images C and D when the vertical direction calculation flag i=1) is generated from the extracted focus detection signals. Then, the process proceeds to step S603.
[0065] In step S603, the camera control unit 141 performs averaging on each of the pair of image signals generated in step S602 in a direction perpendicular to the pupil division direction (the y direction when the vertical direction calculation flag i=0, and the x direction when the vertical direction calculation flag i=1). Then, the process proceeds to step S604. The averaging process in step S603 can reduce the influence of noise on the image signals.
[0066] In step S604, the camera control unit 141 performs filtering to extract signal components in a predetermined frequency band from the pair of image signals obtained by the averaging process in step S603, and proceeds to step S605. Here, a low-pass filter that extracts low-pass components of the signal and a high-pass filter that extracts high-pass components may be used, or a mid-pass filter that can extract frequency components intermediate between the low-pass and high-pass filters may be used, or three or more types of filters may be used.
[0067] In step S605, the camera control unit 141 calculates the amount of correlation using the pair of image signals filtered in step S604.
[0068] In step S606, the camera control unit 141 calculates the amount of change in correlation from the amount of correlation calculated in step S605.
[0069] In step S607, the camera control unit 141 calculates the amount of image shift from the amount of correlation change calculated in step S606.
[0070] In step S608, the camera control unit 141 acquires Defocus_0 (horizontal calculation result) or Defocus_1 (vertical calculation result) obtained by multiplying the image shift amount by a conversion coefficient and converting it into a defocus amount. This conversion coefficient is a value according to the zoom lens position, aperture value, and image height on the imaging surface, and is stored in the camera. In step S609, the camera control unit 141 acquires Reliability_0 (evaluation result of the horizontal calculation result) or Reliability_1 (evaluation result of the vertical calculation result), which is an evaluation result of the reliability indicating how reliable the defocus amount calculated in step S608 is, and proceeds to step S610.
[0071] The reliability is determined by estimating the standard deviation of the defocus amount based on the values calculated in the processes in steps S605 and S606 and setting a stepwise threshold for the standard deviation. However, the method for determining the reliability is not limited to this method, and other known methods may also be used.
[0072] In addition, in this embodiment, the reliability evaluation result is expressed as high when there is reliability (reliability is a predetermined value or more: the defocus amount can be used for the focus operation), and as low when there is no reliability (reliability is less than the predetermined value: the defocus amount cannot be used for the focus operation). Here, for ease of understanding, there are two levels of reliability, but it is also possible to use a level of reliability between high and low, or to divide it into three or more levels.
[0073] In step S610, the camera control unit 141 determines whether focus detection calculation in the vertical direction is necessary (the readout mode is the non-thinning readout mode).
[0074] In step S401 of Fig. 4, focus detection calculation in the vertical direction is not required during standby AF (the readout mode is the vertical thinning readout mode). Therefore, when the process proceeds from step S401 to the flow of Fig. 6, the camera control unit 141 determines in step S610 that focus detection calculation in the vertical direction is not required, and ends the processing of this flow, returning to step S403 of Fig. 4. Note that the case where focus detection calculation in the vertical direction is required (the readout mode is the non-thinning readout mode), including steps S611 and S612, will be described in the focus detection processing in step S701 of Fig. 7.
[0075] In step S403 of FIG. 4, the camera control unit 141 determines the reliability acquired in step S609, and if the reliability of the horizontal focus detection calculation is high, proceeds to step S404. In this case, the reliability of the result of the horizontal focus detection calculation is high, and there is a high possibility that the subject will be in focus. Therefore, in step S404, the camera control unit 141 sets the defocus amount obtained by the horizontal focus detection calculation acquired in step S608 as the lens drive amount. Then, because the result of the horizontal focus detection calculation has been switched to, the vertical focus state flag is set to zero, and the process proceeds to step S408.
[0076] 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 proceeds to step S405, where it determines whether the camera is in vertical focus and whether there is a scene change. If the camera is in vertical focus and there is no scene change, the camera control unit 141 proceeds to step S406.
[0077] In this case, the defocus amount of the horizontal focus detection calculation acquired in step S608 is unreliable, and the scene has not changed, so the vertical focus state is maintained. Therefore, in step S406, the camera control unit 141 sets the lens drive amount to zero, and proceeds to step S408.
[0078] If step S405 determines that the camera is not in vertical focus or if a scene change has occurred, the process proceeds to step S407. In this case, the defocus amount of the horizontal focus detection calculation acquired in step S608 is also unreliable, so the search drive amount is set as the lens drive amount, and the process proceeds to a search operation to search for the subject (focus position). The camera control unit 141 sets the vertical focus flag to zero, cancels the vertical focus state, and proceeds to step S408.
[0079] In step S408, the camera control unit 141 determines whether the lens drive amount set in the previous step is larger than the focus monitoring width. The focus monitoring width is a threshold for preventing unnecessary lens movement when the subject is already in focus, and is desirably set to about 1Fδ. If the lens drive amount is larger than the focus monitoring width, the camera control unit 141 proceeds to step S409, drives the lens by the set lens drive amount, and ends the process. If the lens drive amount is equal to or smaller than the focus monitoring width, the lens is not driven and the process ends.
[0080] Next, the AF control in step S306 in FIG. 3 will be described with reference to the flowchart in FIG.
[0081] First, the focus detection process in step S701 will be described with reference to the flowchart of Fig. 6. Steps S601 to S609 are the same as the focus detection process in step S402 of Fig. 4, and therefore description thereof will be omitted.
[0082] In step S701 of the focus detection process in FIG. 7, since the readout mode is the non-thinning readout 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 process to step S611.
[0083] In step S611, the camera control unit 141 determines whether the focus detection calculation in the vertical direction is completed. If the vertical direction calculation flag i is zero, the focus detection calculation in the vertical direction is not completed, and the process proceeds to step S612.
[0084] In step S612, the camera control unit 141 sets the vertical direction calculation flag i to 1, returns to step S602, and executes vertical direction focus detection calculation. When the process proceeds to step S611 again, the vertical direction calculation flag is 1, so the process ends and returns to step S702 in FIG. 7.
[0085] In this case, in steps S608 and S609, the horizontal direction calculation results (Defocus_0, Reliability_0) and the vertical direction calculation results (Defocus_1, Reliability_1) are obtained.
[0086] Next, in step S702, the camera control unit 141 determines the reliability of the vertical focus detection calculation result and the horizontal focus detection calculation result. If the reliability is low for both, the camera control unit 141 proceeds to step S706.
[0087] In this case, since the defocus amount acquired in step S608 is not reliable, in step S706, the camera control unit 141 sets the lens drive amount to the search drive amount, and proceeds to a search operation to search for a subject. The vertical focus flag is set to zero, the vertical focus state is canceled, and the process proceeds to step S707.
[0088] On the other hand, if the reliability of the vertical direction calculation result or the horizontal direction calculation result is higher than low in step S702, the camera control unit 141 proceeds to step S703, where it compares the reliability and determines which calculation result to use. If the reliability of the vertical direction focus detection calculation is higher, the camera control unit 141 sets the vertical direction focus detection calculation result as the lens drive amount in step S704, sets the vertical direction focus flag to 1, and proceeds to step S707.
[0089] If the reliability of the horizontal focus detection calculation result is higher, the horizontal focus detection calculation result is set as the lens drive amount in step S705 (transition to the horizontal calculation result is permitted), the vertical focus flag is set to zero, and processing proceeds to step S707.
[0090] 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 range. The focus management range is a threshold for determining whether or not the camera is in focus, and is preferably set to approximately 0.25 to 0.5Fδ, which is smaller than the focus monitoring range (approximately 1Fδ) in step S408.
[0091] If the lens driving amount is greater than the focus management width, the camera control unit 141 advances the process to step S708, drives the lens by the set lens driving amount, and ends the process.
[0092] If the lens driving amount is equal to or less than the focus control width, the camera control unit 141 advances the process to step S709, determines that the lens is in focus, and ends the process.
[0093] The effect of this embodiment will now be described with reference to FIG. 3, taking as an example the case of focus detection of a horizontally striped subject.
[0094] In the case of a horizontally striped subject, the vertical thinning mode is set in step S302, so focus detection is not possible, and the standby operation immediately after camera startup (steps S303 and S304) results in a blurred state during standby.
[0095] When SW1 is pressed in step S304 and the mode is switched to non-thinning readout mode in step S305, focus detection becomes possible using vertical focus detection calculations. Therefore, during AF operation (steps S306 and S307), the vertical focus state is achieved (the vertical focus flag is set to 1 in step S704 in FIG. 7), the process proceeds to step S308, and still image capture becomes possible.
[0096] After capturing a still image in step S308, the process returns to step S302 and switches to vertical thinning mode, whereby focus detection becomes impossible again. In the past, this meant that even though the subject had not changed, the camera would switch to a search operation to find the subject, resulting in problems such as sudden blurring.
[0097] In this embodiment, when the vertical focus flag is 1, it is determined in step S405 of Fig. 4 that the vertical focus state should be maintained, and the lens is not moved, so the state in which the horizontally striped subject is in focus is maintained. This state is maintained until the scene change determination in step S401 of Fig. 4 determines that the shooting scene has changed (the user has switched subjects), or until it is determined in step S403 of Fig. 4 that the reliability (Reliability_0) of the standby horizontal focus detection calculation result is high. Therefore, as long as the subject does not change from a horizontally striped subject, it is possible to stabilize the state in which the horizontally striped subject is in focus.
[0098] As described above, by using this embodiment, it is possible to perform stable AF control even when the phase difference detection direction is switched.
[0099] (Second embodiment) Next, the shooting process performed by the camera body 102 in the second embodiment will be described with reference to Figures 8 to 10. In the first embodiment, when the phase difference detection direction is switched, focus adjustment is stabilized by not moving the lens until there is a scene change or until the reliability of focus detection in the detection direction after the switch becomes high.
[0100] In the second embodiment, the readout mode is not changed and focus detection is maintained to stabilize focus adjustment. Note that the same steps as those in the flowcharts of the first embodiment described in Figures 3 to 7 are given the same reference numerals, and their explanations will be omitted.
[0101] In FIG. 8, in step S301, the camera control unit 141 performs initialization processing, and the process proceeds to step S801.
[0102] In step S801, the camera control unit 141 sets the read mode, and the process proceeds to step S802.
[0103] In step S802, the camera control unit 141 executes standby AF control, and the process proceeds to step S304. Steps from step S304 onwards are the same as those in FIG.
[0104] The read mode setting in step S801 will now be described with reference to the flowchart in FIG.
[0105] In step S401, the camera control unit 141 executes the scene change determination process (FIG. 5), and proceeds to step S901.
[0106] 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 proceeds to step S902. In this case, since it is desired to continue the vertical direction focus detection calculation, the camera control unit 141 sets the readout mode to the non-thinning readout mode, ends the process, and proceeds to step S802 in FIG. 8.
[0107] Also, if it is determined in step S901 that the image is not in vertical focus or that there is a scene change, the camera control unit 141 does not need to perform vertical calculations, so it sets the readout mode to vertical thinning readout mode, terminates the processing, and proceeds to step S802.
[0108] Next, the standby AF control process in step S802 according to the second embodiment will be described with reference to the flowchart of FIG.
[0109] In step S701, the camera control unit 141 performs focus detection processing (FIG. 6). In step S701, if the non-decimation readout mode is set as the readout mode in step S801, the horizontal direction calculation results (Defocus_0, Reliability_0) and vertical direction calculation results (Defocus_1, Reliability_1) are acquired in steps S608 and S609 in FIG.
[0110] On the other hand, if the readout mode is set to vertical thinning readout mode in step S801, only the horizontal calculation results (Defocus_0, Reliability_0) are obtained in steps S608 and S609, and initial values are assigned to the vertical calculation results (Defocus_1, Reliability_1).
[0111] 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 the initial value. If the vertical thinning readout mode is set as the readout mode in step S801, the initial value is set for Defocus_1, and the process proceeds to step S1002.
[0112] In step S1002, the camera control unit 141 determines the reliability of the horizontal direction calculation result acquired in step S609, and if it is high, the process proceeds to step S1003.
[0113] In step S1003, the camera control unit 141 sets the defocus amount (Defocus_0) acquired in step S608 as the lens driving amount, and proceeds to step S408.
[0114] Furthermore, 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 process to step S1004.
[0115] In step S1004, since the defocus amount (Defocus_0) acquired in step S608 is not reliable, the camera control unit 141 sets the lens driving amount to the search driving amount, and proceeds to step S408.
[0116] On the other hand, if the non-thinning readout mode is set as the readout mode in step S801, the defocus amount (Defocus_1) of the vertical focus detection calculation result in step S1001 is not the initial value, so the camera control unit 141 proceeds to step S1005.
[0117] In step S1005, the camera control unit 141 determines the reliability of the vertical focus detection calculation result acquired in step S609. If the reliability is low, the process proceeds to step S1006 to cancel the vertical focus state, the vertical focus flag is set to zero, and the process proceeds to step S1002.
[0118] 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.
[0119] Furthermore, if it is determined in step S1005 that the reliability of the vertical focus detection calculation result acquired in step S609 is high, the camera control unit 141 advances the process to step S1007.
[0120] In step S1007, the camera control unit 141 determines the reliability of the horizontal focus detection calculation result acquired in step S609. If the reliability is low, the vertical focus state continues, so the process proceeds to step S1008, where the defocus amount (Defocus_1) of the vertical calculation result acquired in step S608 is set as the lens drive amount, and the process proceeds to step S408.
[0121] 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, where the camera control unit 141 determines whether the phase difference detection direction can be switched.
[0122] In step S1009, it is determined whether the absolute value of the difference in defocus amount between the horizontal focus detection calculation result and the vertical focus detection calculation result acquired in step S608 (|Defocus_0-Defocus_1|) is greater than a threshold value Th. The threshold value Th for switching the phase difference detection direction is a threshold value for determining whether switching from the vertical focus detection calculation result to the horizontal focus detection calculation result will not cause any discomfort, so it is preferable to set it to about 1Fδ.
[0123] If it is determined in step S1009 that the absolute value of the difference in defocus amount is greater than the threshold value Th, the camera control unit 141 proceeds to step S1008 to maintain the vertical focus state. Then, the camera control unit 141 sets the defocus amount (Defocus_1) of the vertical focus detection calculation result acquired in step S608 as the lens driving amount, and proceeds to step S408.
[0124] If it is determined in step S1009 that the absolute value of the difference in defocus amount is equal to or less than the threshold value Th, the camera control unit 141 proceeds to step S1010. Then, to switch to the horizontal focus detection calculation result, the vertical focus flag is set to zero, the vertical focus state is canceled, and the process proceeds to step S1003.
[0125] In step S1003, the camera control unit 141 sets the defocus amount (Defocus_0) of the horizontal focus detection calculation result acquired in step S608 to the lens driving amount, and proceeds to step S408.
[0126] Steps S408 and S409 are the same as those in FIG. 4, and therefore their explanation will be omitted.
[0127] The effect of this embodiment will now be described with reference to FIG. 8, taking as an example a case where focus detection is performed on a horizontally striped subject.
[0128] In the case of a horizontally striped subject, the vertical thinning mode is set in step S801 immediately after the camera is started, so focus detection is not possible during standby operation immediately after the camera is started (steps S303 and S304), and the image is blurred during standby. When SW1 is pressed in step S304 and the mode is switched to non-thinning readout mode in step S305, focus detection becomes possible using vertical calculations. Therefore, during AF operation (steps S306 and S307), the vertical focus state is achieved (the vertical focus flag is set to 1 in step S704 of FIG. 7), and the process proceeds to step S308, enabling still image capture.
[0129] After capturing a still image in step S308, the process returns to step S801. If the vertical focus state is achieved (vertical focus flag = 1), it is determined in step S901 of FIG. 9 that vertical calculation is necessary. Then, in step S902, the non-thinning readout mode is set and vertical calculation is continued, so that the horizontal stripe-shaped object can continue to be focused on. As in the first embodiment, this state is maintained until the scene change determination in step S401 of FIG. 9 determines that the shooting scene has changed (the user has switched the object), or until the reliability (Reliability_1) of the vertical calculation result being on standby in step S1005 of FIG. 10 decreases. Therefore, as long as the object does not change from a horizontal stripe-shaped object, it is possible to stably focus on the horizontal stripe-shaped object.
[0130] Alternatively, the defocus result (Defocus_0) of the horizontal calculation on standby and the defocus result (Defocus_1) of the vertical calculation are maintained until it is determined in step S1009 of Fig. 10 that they are comparable, that is, that they can be handed over to the horizontal calculation result. If it is determined that they can be handed over to the horizontal calculation result, focus driving is performed using the defocus result (Defocus_0) of the horizontal calculation in step S1003 of Fig. 10, and stable focus control can be performed even if the readout mode is also switched to the vertical thinning readout mode in step S903 of Fig. 9.
[0131] As described above, by using this embodiment, AF control can be performed stably even when the phase difference detection direction is switched.
[0132] The disclosure of this specification includes the following imaging apparatus, its control method, program, and storage medium.
[0133] (Item 1) a phase difference detection means for detecting a phase difference in a first direction between optical images formed by light passing 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 that detects 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 acquires the reliability of the focus state; an adjustment unit that drives the optical system to perform focus adjustment based on the focus state detected by the focus detection unit; a control means for controlling the adjustment means so as not to perform the focus adjustment based on the phase difference in the second direction until reliability of the focus state detected based on the phase difference in the second direction becomes higher than a predetermined value 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; An imaging device comprising:
[0134] (Item 2) Item 1 is a diagram illustrating an imaging device according to an embodiment of the present invention. When transitioning from the first state to the second state, the control means allows the focus adjustment based on the phase difference in the second direction after the reliability of the focus state detected based on the phase difference in the second direction becomes higher than a predetermined value.
[0135] (Item 3) 3. The imaging device according to item 1 or 2, characterized in that when transitioning from the first state to the second state, the control means stops driving the optical system after transitioning to the second state until the reliability of the focus state detected based on the phase difference in the second direction becomes higher than a predetermined value.
[0136] (Item 4) The imaging device described in item 1, characterized in that when transitioning from the first state to the second state, the control means controls so as not to transition to the second state until the reliability of the focus state detected based on the phase difference in the second direction becomes higher than a predetermined value.
[0137] (Item 5) Item 4. The imaging device according to item 4, characterized in that, when transitioning from the first state to the second state, the control means allows transition to the second state when 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 becomes smaller than a threshold value.
[0138] (Item 6) 6. The imaging device according to item 4 or 5, wherein the control means permits transition to the second state when there is a change in the photographic scene.
[0139] (Item 7) 7. The imaging device according to item 6, wherein the control means determines a change in the photographic scene based on a change in the posture of the imaging device.
[0140] (Item 8) 7. The imaging device according to item 6, wherein the control means determines a change in the photographed scene based on a change in luminance of the image.
[0141] (Item 9) 7. The imaging device according to item 6, wherein the control means determines a change in the photographic scene based on a change in the detected subject.
[0142] (Item 10) The imaging device described in any one of items 1 to 9, characterized in that the control means controls the optical system to perform a search drive to search for a focus position when there is a change in the shooting scene.
[0143] (Item 11) The imaging device described in any one of items 1 to 10, characterized in that, in the second state, the focus detection means detects the focus state based on a signal obtained by thinning out signals of pixels in a direction perpendicular to the second direction.
[0144] (Item 12) The imaging device described in any one of items 1 to 11, characterized in that in the first state, the focus detection means is capable of detecting a focus state based on a phase difference in the first direction and a focus state based on a phase difference in the second direction, and in the second state, is capable of detecting a focus state based on a phase difference in the second direction.
[0145] (Item 13) a phase difference detection step of detecting a phase difference in a first direction between optical images formed by light passing through different pupil regions of the optical system and a phase difference in a second direction different from the first direction; a focus detection step of detecting 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 acquiring reliability of the focus state; an adjustment step of driving the optical system to perform focus adjustment based on the focus state detected in the focus detection step; a control process for controlling the adjustment process so as not to perform the focus adjustment based on the phase difference in the second direction until reliability of the focus state detected based on the phase difference in the second direction becomes higher than a predetermined value 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; 10. A method for controlling an imaging device, comprising:
[0146] (Item 14) Item 14. A program for causing a computer to execute each step of the control method described in Item 13.
[0147] (Item 15) A computer-readable storage medium storing a program for causing a computer to execute each step of the control method described in item 13.
[0148] (Other embodiments) The present invention can also be realized by supplying a program that realizes one or more of the 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.The present invention can also be realized by a circuit (e.g., ASIC) that realizes one or more of the functions.
[0149] The invention is not limited to the above-described embodiments, and various changes and modifications can be made without departing from the spirit and scope of the invention. Accordingly, the following claims are appended to apprise the public of the scope of the invention. [Explanation of symbols]
[0150] 101: lens unit, 102: camera body, 111: photographing lens, 112: fixed lens, 113: aperture, 114: focus lens, 115: aperture control unit, 116: focus control unit, 117: lens control unit, 121: image sensor, 122: timing generator, 123: CDS / AGC / AD circuit, 124: image capture signal processing unit, 125: focus detection signal processing unit, 131: bus, 132: display control unit, 133: display unit, 134: recording medium control unit, 135: recording medium, 136: SDRAM, 137: ROM, 138: flash ROM, 139: SW1, 140: SW2, 141: camera control unit
Claims
1. a phase difference detecting means for detecting a phase difference in a first direction between optical images formed by light passing 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 that detects 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 acquires the reliability of the focus state; an adjustment unit that drives the optical system to perform focus adjustment based on the focus state detected by the focus detection unit; a control means for controlling the adjusting means so as not to transition to the second state until reliability of the focus state detected based on the phase difference in the second direction becomes higher than a predetermined value 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; An imaging device comprising:
2. 2. The imaging device according to claim 1, wherein, when transitioning from the first state to the second state, the control means permits transition to the second state when a difference between a focus state detected based on a phase difference in the first direction and a focus state detected based on a phase difference in the second direction becomes smaller than a threshold value.
3. 2. The imaging apparatus according to claim 1, wherein the control means permits the transition to the second state when a change in the photographic scene occurs.
4. 4. The imaging device according to claim 3, wherein the control means determines the change in the photographic scene based on a change in the posture of the imaging device.
5. 4. The imaging apparatus according to claim 3, wherein said control means determines the change in the photographed scene based on a change in luminance of the image.
6. 4. The imaging apparatus according to claim 3, wherein said control means determines a change in the photographic scene based on a change in a detected subject.
7. 2. The image pickup apparatus according to claim 1, wherein said control means controls said optical system to perform a search drive for searching for a focal position when there is a change in the photographing scene.
8. 2. The imaging apparatus according to claim 1, wherein, in the second state, the focus detection means detects the focus state based on a signal obtained by thinning out signals from pixels in a direction perpendicular to the second direction.
9. 2. The imaging device according to claim 1, wherein, in the first state, the focus detection means is capable of detecting a focus state based on a phase difference in the first direction and a focus state based on a phase difference in the second direction, and, in the second state, is capable of detecting a focus state based on a phase difference in the second direction.
10. a phase difference detection step of detecting a phase difference in a first direction between optical images formed by light passing through different pupil regions of the optical system and a phase difference in a second direction different from the first direction; a focus detection step of detecting 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 acquiring reliability of the focus state; an adjustment step of driving the optical system to perform focus adjustment based on the focus state detected in the focus detection step; a control step of controlling the adjustment step so as not to transition to the second state until reliability of the focus state detected based on the phase difference in the second direction becomes higher than a predetermined value 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; 10. A method for controlling an imaging device, comprising:
11. A program for causing a computer to execute each step of the control method according to claim 10.
12. A computer-readable storage medium storing a program for causing a computer to execute each step of the control method according to claim 10.
Citation Information
Patent Citations
Solid-state imaging apparatus
JP2005107252A
Autofocus camera
JP2006243350A
Automatic focus device and control method of the same, as well as program and recording medium
JP2016130793A
Focus adjustment device, method for the same, imaging apparatus, program, and storage medium
JP2017187589A
Interchangeable lens, and camera body
JP2020012982A