Imaging apparatus and method for controlling the same, program, and storage medium
The imaging device addresses the challenge of maintaining stable focus adjustment during phase difference detection direction switches by using a dual-direction phase difference detection system and controlling focus adjustment based on reliability thresholds, ensuring accurate and stable focus detection.
Patent Information
- Application Number
- JP2023204911
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-12-04
- Publication Date
- 2025-06-16
- Estimated Expiration
- 2043-12-04
AI Technical Summary
Existing imaging devices face challenges in maintaining stable focus adjustment when switching the phase difference detection direction, leading to sudden loss of focus, especially when dealing with subjects that have edges only in one direction.
The imaging device incorporates a phase difference detection unit for both horizontal and vertical directions, a focus detection unit to assess the reliability of focus state, and an adjustment unit for focus adjustment. It controls the focus adjustment to only use the phase difference in the second direction once its reliability exceeds a predetermined value during a state shift.
This solution enables stable focus adjustment operations even when switching phase difference detection directions, preventing sudden loss of focus and maintaining accurate focus detection across various subject orientations.
Smart Images

Figure 2025089931000001_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 have been required to have higher definition, and the number of pixels has been increasing. Along with this, the processing time and power consumption when reading an image signal from an image sensor increase, but this is suppressed by thinning out pixels or performing averaging addition and then reading.
[0003] Also, 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 one microlens provided for each pixel of an image sensor and a pair of photoelectric conversion units, and the focus state (defocus amount) is obtained from the phase difference between a pair of image signals obtained from the pair of photoelectric conversion units.
[0004] In Patent Document 1, the read mode is changed according to the shooting control state. Specifically, at the time of still image shooting, it is set to a mode of reading all pixels (non-thinning reading), and at the time of moving image shooting or otherwise (during autofocus (AF) control or standby state), it is set to a mode of thinning out pixels and then reading (thinning reading). Thereby, it is possible to obtain a high-definition still image and shorten the processing time in moving image shooting or the like. In particular, during AF control immediately before still image shooting, high-precision autofocus is realized by not thinning out pixels in the pupil division direction.
[0005] Also, with the increase in high definition, more accurate focus detection is required. When pupil division is in only one direction in the above-described focus detection method, there are cases where focus detection cannot be performed. For example, when a 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 an imaging device as follows. In pixels where a pair of photoelectric conversion units are arranged horizontally, horizontal pupil division is performed, and in pixels where a pair of photoelectric conversion units are arranged vertically, vertical pupil division is performed. Thereby, defocus amounts in both the horizontal and vertical directions are obtained. In this case, since both the horizontal and vertical directions are pupil division directions, in order to achieve high-precision autofocus, it is necessary to read out all pixels without thinning out pixels in both the horizontal and vertical directions. That is, even during AF control before still image shooting, it is necessary to set it to the non-thinning readout mode.
[0007] On the other hand, during the standby state, it is necessary to set it to the thinning readout mode to suppress processing time and power consumption. Also, when performing autofocus (AF control during standby) even during the standby state, it is necessary to limit the pupil division direction to one direction and thin out pixels. For example, when the pupil division direction is horizontal, it is set to a mode (vertical thinning readout mode) in which pixels are thinned out and read out in the vertical direction. In this case, the phase difference detection directions are different between the AF control before still image shooting and the AF control during standby. Therefore, when switching from the AF control in still image shooting to the AF control during standby, a problem occurs where the focus suddenly goes out of focus even though the subject has not changed.
[0008] Specifically, in the AF control before still image shooting, by using the focus detection results of the image signals obtained by pupil division in both the horizontal and vertical directions, omnidirectional focus detection is possible. On the other hand, in the AF control during standby, since the pupil division direction is only horizontal, a subject (such as a horizontally striped subject) that has no edges in the same direction as the pupil division direction as described above cannot be focus-detected. Therefore, when switching to the AF control during standby, the focus may suddenly go out of focus.
[0009] Patent Document 3 discloses a countermeasure against the change in the calculation result when the phase difference detection direction is switched due to the movement of the subject in the case where regions for performing horizontal and vertical phase difference detections are mixed in one image region.
Prior Art Documents
Patent Document
[0010]
Patent Document 1
Patent Document 2
Patent Document 3
Summary of the Invention
Problems to be Solved by the Invention
[0011] However, Patent Document 3 assumes a case where phase difference detection can be performed both horizontally and vertically, and does not consider a subject for which focus detection can be performed only in one direction. Therefore, in the case of a subject with horizontal or vertical stripes, when the phase difference detection direction is switched, the focus may suddenly go out of focus.
[0012] The present invention has been made in view of the above-described problems, and an object thereof is to provide an imaging device capable of performing a stable focus adjustment operation even when the phase difference detection direction is switched.
Means for Solving the Problems
[0013] The imaging device according to the present invention includes a phase difference detection unit that detects 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 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 obtains its reliability, an adjustment unit that drives the optical system to perform focus adjustment based on the focus state detected by the focus detection unit, and 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 the reliability of the focus state detected based on the phase difference in the second direction becomes higher than a predetermined value when shifting from a first state of performing focus adjustment based on the phase difference in the first direction to a second state of performing focus adjustment based on the phase difference in the second direction.
Advantages of the Invention
[0014] According to the present invention, even when the detection direction of the phase difference is switched, a stable focus adjustment operation can be performed.
Brief Description of the Drawings
[0015]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
[0016] Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. Note that the following embodiments do not limit the invention according to the claims. Although a plurality of features are described in the embodiments, not all of these plurality of features are essential to the invention, and the plurality of features may be arbitrarily combined. Further, in the accompanying drawings, the same or similar configurations are denoted by the same reference numerals, and redundant descriptions are omitted.
[0017] (First Embodiment) FIG. 1 is a block diagram showing the configuration of an imaging device 100 according to a first embodiment of the present invention. The imaging device 100 of the present embodiment mainly includes a lens unit 101 and a camera body 102. A lens control unit 117 that comprehensively controls the operation of the entire lens unit 101 and a camera control unit 141 that comprehensively controls the operation of the entire imaging device 100 including the lens unit 101 can communicate with each other through terminals provided on the lens mount.
[0018] First, an outline of the configuration and operation of the lens unit 101 will be described.
[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 reflex lens and is an example of a normal lens. The photographing lens 111 (optical system) includes a fixed lens 112, a diaphragm 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 to control the amount of light during imaging. The focus lens 114 is a lens for focus adjustment. Although it is simply shown as a single lens in FIG. 1, it is usually composed of a plurality of lenses. As will be described later, the focus control unit 116 receives the lens driving amount obtained by the camera control unit 141 via the lens control unit 117, and adjusts the focus by driving the focus lens 114. The AF control is realized by the movement control of the focus lens 114 by the 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, the configuration and operation of the camera body 102 will be briefly described. The imaging device 121 has a plurality of photoelectric conversion elements that photoelectrically convert a subject image (optical image) into electric charges, and is composed of, for example, a CCD or a CMOS sensor. The light beam incident through the imaging lens 111 of the lens unit 101 is imaged on the light receiving surface of the imaging device 121, and is converted into electric charges in each photoelectric conversion element according to the amount of light and accumulated. The electric charges accumulated in each photoelectric conversion element are sequentially read out from the imaging device 121 as voltage signals corresponding to the electric charges by the drive pulses output by the timing generator 122.
[0022] Here, the configuration of the imaging device 121 will be described with reference to FIGS. 2(a), (b), and (c).
[0023] FIG. 2(a) shows the arrangement of the pixels 211 in the range of 8 pixel columns in the horizontal (x - direction) and 6 pixel rows in the vertical (y - direction) on the imaging surface of the imaging device 121 as viewed from the lens unit 111 side. A color filter with a Bayer array is provided on the imaging surface. In the pixels of odd rows, red (R) and green (G) color filters are alternately arranged in order from the left, and in the pixels of even rows, green (G) and blue (B) color filters are alternately arranged in order from the left.
[0024] Figure 2(b) shows pixel 211R where a red (R) color filter is arranged. 212 indicates an on-chip microlens. Inside the on-chip microlens 212, a pair of photoelectric conversion units (first pair of photoelectric conversion units) 213A and 213B divided in the x direction are arranged. Also, pixel 211Gr where a green (G) color filter is arranged and pixel 211B where a blue (B) color filter is arranged are similarly configured.
[0025] Figure 2(c) shows pixel 211Gb where a green (G) color filter is arranged. Inside the on-chip microlens 212, a pair of photoelectric conversion units (second pair of photoelectric conversion units) 213C and 213D divided in the y direction are arranged.
[0026] Thus, the imaging device 121 in this embodiment has pixels 211R, 211Gr, 211B in which the photoelectric conversion unit is divided into two in the x direction, and pixel 211Gb in which the photoelectric conversion unit is divided into two in the y direction. Here, the horizontal direction and the vertical direction are shown as the directions of pupil division, but division in an oblique direction may also be possible.
[0027] Using the photoelectric conversion signals output from each of the pair of photoelectric conversion units in a plurality of pixels, a pair of image signals (signals for focus detection) and parallax image data as display / recording image data for 3D image observation are generated. Also, using the imaging signal obtained by adding and outputting a pair of photoelectric conversion signals from each of the plurality of pixels, image data for luminance determination and normal display / recording image data are generated.
[0028] Returning to FIG. 1, the CDS / AGC / AD circuit 123 performs correlated double sampling for removing reset noise, adjustment of the sensor gain, and digitization of the voltage signals (imaging signal and focus detection signal) read from the imaging device 121. Then, the CDS / AGC / AD circuit 123 outputs the processed imaging signal to the imaging signal processing unit 124 and the focus detection signal to the focus detection signal processing unit 125, respectively.
[0029] 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, the focus detection signals output from the pixels included in a predetermined area are extracted.
[0030] Here, the focus detection using the imaging surface phase difference detection method will be described. In the pixel 211R (211Gr, 211B) shown in Fig. 2(b), the microlens 212 forms images of light beams from different regions in the x direction of the exit pupil of the optical system on the photoelectric conversion unit 213A and the photoelectric conversion unit 213B, thereby performing pupil division in the x direction. In the pixel 211Gb shown in Fig. 2(c), the microlens 212 forms images of light beams from different regions in the y direction of the exit pupil of the optical system on the photoelectric conversion unit 213C and the photoelectric conversion unit 213D, thereby performing pupil division in the y direction. In other words, the phase difference in the first direction of the optical images formed by the light passing through different pupil regions of the optical system and the phase difference in the second direction different from the first direction are detected.
[0031] In the focus detection signal processing unit 125, an A image signal is generated by synthesizing the photoelectric conversion signals obtained from one of the paired photoelectric conversion units 213A and 213B in each of the plurality of pixels 211R within a predetermined range (focus detection area). Also, a B image signal is generated by synthesizing the photoelectric conversion signals obtained from the other.
[0032] Similarly, in the focus detection signal processing unit 125, a C image signal is generated by synthesizing the photoelectric conversion signals obtained from one of the paired photoelectric conversion units 211C and 211D in each of the plurality of pixels 211Gb within the focus detection area. Also, a D image signal is generated by synthesizing the photoelectric conversion signals obtained from the other.
[0033] Correlation operations are performed on these pairs of image signals (A image signal and B image signal, C image signal and D image signal) to obtain the defocus amount and reliability information (two-image consistency, two-image sharpness).
[0034] In this embodiment, in the AF control before still image shooting, reading is performed in the non-decimated readout mode, and the correlation calculation results (horizontal direction focus detection) between the A image signal and the B image signal and the correlation calculation results (vertical direction focus detection) between the C image signal and the D image signal are used in combination. In the standby AF control, reading is performed in the vertical decimated readout mode, and only the correlation calculation result (horizontal direction focus detection) between the A image signal and the B image signal is used.
[0035] The imaging signal processing unit 124 performs predetermined image processing such as γ conversion processing, white balance processing, and various correction processes 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 out by the display control unit 132 via the bus 131 and displayed on the display unit 133. Also, 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] Also, the luminance determination image data is used for measuring the subject luminance ( photometry ) in the photometry unit 142, and the photometry result is output to the camera control unit 141.
[0038] Based on the photometry result and camera control values such as the charge accumulation time, shooting sensitivity, and aperture value, the exposure setting (AE) is determined.
[0039] The shake detection unit 143 is a shake sensor such as a gyro sensor that detects the angular velocity around a predetermined axis and outputs it to the camera control unit 141. The camera control unit 141 drives the correction optical system for shake correction or detects the posture of the camera body based on these detection signals.
[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] The shooting preparation switch (SW1) 139 is turned on by, for example, a half-press of a shutter release button (not shown), and instructs the start of shooting preparation operations such as AF and AE (hereinafter referred to as "SW1"). The shooting switch (SW2) 140 is turned on by, for example, a full-press of a shutter release button (not shown) after SW1 is turned on, 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 realize AF.
[0043] Next, the shooting 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 the control program stored in the ROM 137. Note that the operations of other flowcharts hereinafter are the same.
[0044] First, in step S301, the camera control unit 141 performs initialization processing such as camera settings, and proceeds to step S302. In the present embodiment, here, initialization of the scene change flag and the vertical focusing flag is also performed. The scene change flag is a flag that is set by determining whether the user has changed the shooting scene in step S401 described later, and the initial state is set to zero. The vertical focusing flag is a flag that is set to indicate whether focusing has been performed using vertical direction focus detection in step S306 described later, and the initial state is set to zero.
[0045] In step S302, the camera control unit 141 sets the readout mode to the vertical subsampling readout mode, and proceeds to step S303.
[0046] In step S303, the standby AF control process is executed, and the process proceeds to step S304. In the standby AF control process of step S303, since the read mode is set to the vertical interlaced read mode, AF control is performed using the horizontal direction focus detection result. Details will be described later with reference to FIG. 4.
[0047] In step S304, the camera control unit 141 determines whether SW1 has been pressed. If it has not been pressed, the process returns to step S303, and the standby operation (steps S303 and S304) is repeated. If it has been pressed, the process proceeds to step S305.
[0048] In step S305, the camera control unit 141 sets the read mode to the non-interlaced read mode and proceeds to step S306.
[0049] In step S306, the camera control unit 141 executes the AF control process and proceeds to step S307. In the AF control process of step S306, since the read mode is set to the non-interlaced read mode, AF control is performed using both the horizontal direction focus detection result and the vertical direction focus detection result. Details will be described later with reference to FIG. 7.
[0050] In step S307, the camera control unit 141 determines whether it is in the in-focus state. If it is not in the in-focus state, the process returns to step S306, and the operation during AF (steps S306 and S307) is repeated. If it is in the in-focus state, SW2 can be pressed in step S308, and still image shooting is executed when SW2 is pressed.
[0051] After still image shooting, the process returns to step S302, the read mode is switched to the vertical interlaced read mode, and the process transitions to the standby operation (steps S303 and S304).
[0052] Also, when SW2 is not pressed in step S308 and the pressing of SW1 is released (not shown), the process also returns to step S302, switches the reading mode to the vertical thinning reading mode, and transitions to the standby operation (step S303, step S304).
[0053] This process is repeated until the shooting process is stopped. The shooting process is stopped when the power of the camera body 102 is turned off, or when an interrupt process of an operation other than shooting, such as the user setting process of the camera or the playback process for confirming the captured image / video, enters.
[0054] Next, the standby AF control process performed in step S303 in FIG. 3 will be described with reference to the flowchart of FIG. 4.
[0055] In step S401, the camera control unit 141 performs a scene change determination process to determine whether the shooting scene has changed.
[0056] Here, the process in the scene change determination in step S401 will be described with reference to FIG. 5.
[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 at the time of the previous determination, and determines whether there is a change. If it is determined in step S501 that there has been a change in the camera's attitude or brightness, it means that the user has changed the shooting scene and the subject has also changed, 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, and at the same time resets (sets to zero) the vertical focus state flag and ends the process.
[0058] If it is determined in step S501 that there has been no change in the camera's attitude or brightness, in step S503, the camera control unit 141 sets the scene change flag to zero and ends the process. In this case, since it is necessary to maintain the vertical focus state, the flag setting is not performed.
[0059] Regarding posture changes and brightness changes, it is preferable to determine the threshold value and continuity in consideration of camera shake and the like. For example, the detection results from the photometric unit 142 and the vibration detection unit 143 are stored in a dedicated memory, and when the stored multiple results exceed a predetermined threshold value a predetermined number of times, it is determined that there has been a change.
[0060] In this embodiment, although the case where it is determined that the shooting scene has changed based on posture changes and brightness changes has been described as an example, it can also be determined based on changes in the subject detection state. When there is a detected subject, it is useful because it is easy to reflect the user's intention. Changes in the subject detection state refer to cases where the subject cannot be detected, or when another subject is selected when there are multiple subjects, or when there is movement of the subject. Whether or not the size change and position change of the subject with respect to the angle of view exceed a certain amount can be used as a determination criterion for the movement of the subject.
[0061] When the scene change determination process in step S401 is completed, the camera control unit 141 proceeds to the focus detection process in step S402.
[0062] The focus detection process in step S402 will be described with reference to the flowchart of FIG. 6.
[0063] First, in step S601, the camera control unit 141 sets the vertical direction operation flag i to zero and sets an initial value for the operation result, and then proceeds to step S602. The vertical direction operation flag i is a flag for determining whether it is a focus detection operation in the vertical direction (or a focus detection operation in the horizontal direction).
[0064] In step S602, the camera control unit 141 extracts the focus detection signal within the focus detection region from the focus detection signals output from the imaging device 121. From the extracted focus detection signals, a pair of image signals (image A and image B when the vertical direction operation flag i = 0, image C and image D when the vertical direction operation flag i = 1) are generated. Then, the process proceeds to step S603.
[0065] In step S603, the camera control unit 141 performs addition averaging processing on each of the pair of image signals generated in step S602 in a direction orthogonal 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. By the addition averaging processing in step S603, the influence of noise in the image signal can be reduced.
[0066] In step S604, the camera control unit 141 performs filter processing to extract signal components in a predetermined frequency band from the pair of image signals obtained by the addition averaging processing in step S603, and the process proceeds to step S605. Here, a low-pass filter for extracting the low-frequency component of the signal and a high-pass filter for extracting the high-frequency component may be used, or a band-pass filter that can extract the frequency components in the middle between the low-pass filter and the high-pass filter may be used, and three or more types of filters may also be used.
[0067] In step S605, the camera control unit 141 calculates a correlation amount using the pair of image signals that have been filter-processed in step S604.
[0068] In step S606, the camera control unit 141 calculates a correlation change amount from the correlation amount calculated in step S605.
[0069] In step S607, the camera control unit 141 calculates an image shift amount from the correlation change amount calculated in step S606.
[0070] In step S608, the camera control unit 141 obtains Defocus_0 (horizontal direction calculation result) or Defocus_1 (vertical direction calculation result) that has been converted to a defocus amount by multiplying the image shift amount by a conversion coefficient. This conversion coefficient is a value corresponding to the zoom lens position, the aperture value, and the image height on the imaging surface, and is held by the camera. In step S609, the camera control unit 141 obtains Reliability_0 (the evaluation result of the horizontal direction calculation result) or Reliability_1 (the evaluation result of the vertical direction calculation result), which is the evaluation result of the reliability indicating how reliable the defocus amount calculated in step S608 is, and proceeds with the process 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 value for the standard deviation. However, the method for reliability determination is not limited to this method, and other known methods may be used.
[0072] Also, in this embodiment, as the evaluation result of the reliability, a case where the reliability is high (the reliability is equal to or greater than a predetermined value: the defocus amount can be used for the focusing operation) is expressed as high, and a case where the reliability is low (the reliability is less than the predetermined value: the defocus amount cannot be used for the focusing operation) is expressed as low. Here, for the sake of easy understanding, the reliability is divided into two levels, but intermediate reliability levels between high and low may be used, or it may be divided into three or more levels.
[0073] In step S610, the camera control unit 141 determines whether vertical direction focus detection calculation is necessary (the readout mode is non-thinning readout mode).
[0074] In step S401 of FIG. 4, vertical direction focus detection calculation is not necessary (the readout mode is vertical thinning readout mode) in standby AF. Therefore, when proceeding from step S401 to the flow of FIG. 6, the camera control unit 141 ends the process of this flow based on the determination that vertical direction focus detection calculation in step S610 is not necessary, and returns to step S403 of FIG. 4. For the case where vertical direction focus detection calculation is necessary (the readout mode is non-thinning readout mode), including steps S611 and S612, it will be described in the focus detection process 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. If 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 there is a high possibility of focusing on the subject. Therefore, in step S404, the camera control unit 141 sets the defocus amount obtained by the focus detection calculation in the horizontal direction acquired in step S608 to the lens drive amount. Then, since the focus detection calculation result in the horizontal direction is switched, zero is set to the vertical focus state flag, and the process proceeds to step S408.
[0076] On the other hand, in step S403, if it is determined that the reliability acquired in step S609 is low, the camera control unit 141 proceeds to step S405 and determines whether it is in the vertical focus state and whether there is a scene change. If the camera control unit 141 is in the vertical focus state and there is no scene change, the process proceeds to step S406.
[0077] In this case, the defocus amount of the focus detection calculation in the horizontal direction acquired in step S608 cannot be trusted, and the scene has not changed, so the vertical focus state is maintained. Therefore, in step S406, the camera control unit 141 sets zero to the lens drive amount and proceeds to step S408.
[0078] If it is not in the vertical focus state or there is a scene change in step S405, the process proceeds to step S407. In this case, since the defocus amount of the focus detection calculation in the horizontal direction acquired in step S608 cannot be trusted either, the search drive amount is set to the lens drive amount, and the process shifts to the search operation for finding the subject (focus position). The camera control unit 141 sets the vertical focus flag to zero, releases 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 greater than the focus monitoring width. The focus monitoring width is a threshold value for preventing unnecessary movement of the lens when the focus is already in focus, and it is desirable to set it to about 1Fδ. If the lens drive amount is greater 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 it is less than or equal to the focus monitoring width, the process ends without driving the lens.
[0080] Next, the AF control in step S306 of FIG. 3 will be described with reference to the flowchart of FIG. 7.
[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 processes as the focus detection process in step S402 of FIG. 4 described above, so the description will be omitted.
[0082] In step S701 of the focus detection process in FIG. 7, since the readout mode is the non-decimated readout mode, it is determined in step S610 that vertical focus detection calculation is necessary, and the camera control unit 141 proceeds to step S611.
[0083] In step S611, the camera control unit 141 determines whether the vertical focus detection calculation has been completed. If the vertical operation flag i is zero, since the vertical focus detection calculation has not been completed, the process proceeds to step S612.
[0084] In step S612, the camera control unit 141 sets 1 to the vertical operation flag i, returns to step S602, and executes the vertical focus detection calculation. When the steps proceed to step S611 again, since the vertical operation flag is 1, the process ends and returns to step S702 of 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 focus detection calculation results in the vertical direction and the horizontal direction. If the reliability of both is low, the camera control unit 141 proceeds to step S706.
[0087] In this case, since the defocus amount obtained in step S608 is not reliable, in step S706, the camera control unit 141 sets the search drive amount to the lens drive amount and shifts to the search operation for finding the subject. The vertical direction focus flag is set to zero, the vertical direction focused state is released, and the process proceeds to step S707.
[0088] 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 proceeds to step S703 and determines which calculation result to use by comparing the reliabilities. If the reliability of the focus detection calculation in the vertical direction is higher, the camera control unit 141 sets the vertical direction focus detection calculation result to the lens drive amount in step S704, sets 1 to the vertical direction focus flag, and proceeds to step S707.
[0089] Also, if the reliability of the horizontal direction focus detection calculation result is higher, in step S705, the horizontal direction focus detection calculation result is set to the lens drive amount (permission to shift to the horizontal direction calculation result), 0 is set to the vertical direction focus flag, and the process proceeds to step S707.
[0090] In step S707, the camera control unit 141 determines whether the lens drive amount set in the previous step is larger than the focus management width. The focus management width is a threshold value for determining whether it is in the focused state, and it is desirable to set it to about 0.25 to 0.5Fδ, which is smaller than the focus monitoring width (about 1Fδ) in step S408.
[0091] When the lens driving amount is larger than the focusing management width, the camera control unit 141 proceeds to step S708, drives the lens by the set lens driving amount, and ends the process.
[0092] When the lens driving amount is less than or equal to the focusing management width, the camera control unit 141 proceeds to step S709, determines that it is in the in-focus state, and ends the process.
[0093] Here, regarding the effect of this embodiment, taking the case of detecting the focus of a horizontal-striped subject as an example, it will be described with reference to FIG. 3.
[0094] In the case of a horizontal-striped subject, since the vertical subsampling mode is set in step S302, focus detection cannot be performed, and during the standby operation immediately after the camera is activated (steps S303 and S304), it will be in a blurred state during standby.
[0095] When SW1 is pressed in step S304 and the subsampling-free reading mode is switched in step S305, focus detection can be performed by the vertical focus detection calculation. Therefore, during the AF operation (steps S306 and S307), it becomes in the vertical in-focus state (the vertical in-focus flag is set to 1 in step S704 of FIG. 7), and proceeds to step S308, enabling still image shooting.
[0096] After shooting a still image in step S308 and returning to step S302 and switching to the vertical subsampling mode, focus detection can no longer be performed. Therefore, conventionally, even though the subject has not changed, it has shifted to the search operation for the subject, resulting in problems such as suddenly becoming blurred.
[0097] In this embodiment, when the vertical focusing flag = 1, in step S405 of FIG. 4, it is determined that the vertical focusing state is maintained and the lens is not moved, so that the state of being in focus on a striped subject is maintained. This state is maintained until it is determined in the scene change determination of step S401 of FIG. 4 that the shooting scene has changed (the user has switched the subject), or until it is determined in step S403 of FIG. 4 that the reliability (Reliability_0) of the horizontal focus detection calculation result during standby is high. Therefore, while the subject does not change from a striped subject, the state of being in focus on the striped subject can be stabilized.
[0098] As described above, by using this embodiment, even when the phase difference detection direction is switched, it is possible to stably perform AF control.
[0099] (Second Embodiment) Next, the shooting process performed by the camera body 102 in the second embodiment will be described with reference to FIGS. 8 to 10. 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 the focus detection in the switched detection direction becomes high.
[0100] In the second embodiment, the focus adjustment is stabilized by maintaining the state in which focus detection is possible without changing the readout mode. The same steps as the flowchart of the first embodiment described with reference to FIGS. 3 to 7 are given the same reference numerals and the description thereof is omitted.
[0101] In FIG. 8, in step S301, the camera control unit 141 performs an initialization process and proceeds to step S801.
[0102] In step S801, the camera control unit 141 sets the readout mode and proceeds to step S802.
[0103] In step S802, the camera control unit 141 executes the standby AF control and proceeds with the process to step S304. After step S304, the steps are the same as those in FIG. 3.
[0104] Here, the read mode setting in step S801 will be described with reference to the flowchart of FIG. 9.
[0105] In step S401, the camera control unit 141 executes the scene change determination process (FIG. 5) and proceeds with the process to step S901.
[0106] In step S901, the camera control unit 141 determines whether the vertical focus state is achieved and whether there is a scene change. If the vertical direction is in the focused state and there is no scene change, the camera control unit 141 proceeds with the process to step S902. In this case, since it is desired to continue the focus detection calculation in the vertical direction, the read mode is set to the non - decimated read mode and the process ends, and the process proceeds to step S802 in FIG. 8.
[0107] Also, in step S901, if it is determined that the vertical focus state is not achieved or there is a scene change, the camera control unit 141 does not need to perform the vertical direction calculation. Therefore, the vertical decimated read mode is set in the read mode and the process ends, and the process proceeds to step S802.
[0108] Next, the standby AF control process in the second embodiment of step S802 will be described with reference to the flowchart of FIG. 10.
[0109] In step S701, the camera control unit 141 performs the focus detection process (FIG. 6). In step S701, if the non - decimated read mode is set in the read mode in step S801, the horizontal direction calculation results (Defocus_0, Reliability_0) and the vertical direction calculation results (Defocus_1, Reliability_1) are obtained in steps S608 and S609 of FIG. 6.
[0110] On the other hand, when the vertical subsampling read mode is set in the read mode in step S801, only the horizontal direction calculation results (Defocus_0, Reliability_0) are acquired in steps S608 and S609, and initial values are assigned to the vertical direction 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 an initial value. When the vertical subsampling read mode is set in the read mode in step S801, since an initial value is set for Defocus_1, 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. 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 to the lens drive amount, and the process proceeds to step S408.
[0114] Also, in step S1002, when it is determined that the reliability of the horizontal direction calculation result acquired in step S609 is low, the camera control unit 141 proceeds 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 search drive amount to the lens drive amount, and the process proceeds to step S408.
[0116] On the other hand, when the non-subsampling read mode is set in the read mode in step S801, since the defocus amount (Defocus_1) of the focus detection calculation result in the vertical direction is not an initial value in step S1001, 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 obtained in step S609. If the reliability is low, in order to release the vertical focusing state, the process proceeds to step S1006, zero is set in the vertical focus flag, and the process proceeds to step S1002.
[0118] In step S1002, as described above, the camera control unit 141 determines the reliability of the horizontal direction calculation result, sets the lens driving amount, and proceeds to step S408.
[0119] Also, in step S1005, if it is determined that the reliability of the vertical focus detection calculation result obtained in step S609 is high, the camera control unit 141 proceeds to step S1007.
[0120] In step S1007, the camera control unit 141 determines the reliability of the horizontal focus detection calculation result obtained in step S609. If the reliability is low, since the vertical focusing state continues, the process proceeds to step S1008, the defocus amount (Defocus_1) of the vertical direction calculation result obtained in step S608 is set in the lens driving amount, and the process proceeds to step S408.
[0121] Also, in step S1007, if it is determined that the reliability of the horizontal direction calculation result obtained 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.
[0122] In step S1009, it is determined whether the absolute value of the difference between the defocus amounts (|Defocus_0 - Defocus_1|) of the horizontal focus detection calculation result and the vertical focus detection calculation result obtained in step S608 is greater than the threshold Th. The threshold Th for switching the phase difference detection direction is a threshold for determining that there is no discomfort even when switching from the vertical focus detection calculation to the horizontal focus detection calculation result, so it is preferably set to about 1Fδ.
[0123] In step S1009, when it is determined that the absolute value of the difference in defocus amount is greater than the threshold Th, the camera control unit 141 proceeds to step S1008 in order to maintain the in-focus state in the vertical direction. 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 proceeds to step S408.
[0124] In step S1009, when it is determined that the absolute value of the difference in defocus amount is less than or equal to the threshold Th, the camera control unit 141 proceeds to step S1010. Then, in order to switch to the focus detection calculation result in the horizontal direction, zero is set in the vertical in-focus flag, the vertical in-focus state is released, and the process proceeds to step S1003.
[0125] 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 the process proceeds to step S408.
[0126] Since steps S408 and S409 are the same as the steps in FIG. 4, the description thereof is omitted.
[0127] Here, the effect of the present embodiment will be described with reference to FIG. 8 by taking the case of performing focus detection on a horizontally striped subject as an example.
[0128] In the case of a horizontally striped subject, in step S801 immediately after the camera is activated, since the vertical subsampling mode is set, focus cannot be detected during the standby operation (steps S303 and S304) immediately after the camera is activated, and the subject is out of focus during standby. When SW1 is pressed in step S304 and the readout mode without subsampling is switched in step S305, focus can be detected by the vertical direction calculation. Therefore, during the AF operation (steps S306 and S307), the in-focus state in the vertical direction (the vertical in-focus flag is set to 1 in step S704 of FIG. 7) is achieved, and the process proceeds to step S308, enabling still image shooting.
[0129] After still image shooting in step S308, if it returns to step S801 and the vertical focusing state (vertical focusing flag = 1) is established, in step S901 of FIG. 9, it is determined that vertical direction calculation is necessary. Then, in step S902, the non-decimated readout mode is set, and in order to continue the vertical direction calculation, the focus can be continuously adjusted on the horizontal stripe subject. This state, similar to the first embodiment, is maintained until it is determined in the scene change determination of step S401 of FIG. 9 that the shooting scene has changed (the user has switched the subject), or until the reliability (Reliability_1) of the vertical direction calculation result during standby becomes low in step S1005 of FIG. 10. Therefore, as long as the subject does not change from a horizontal stripe subject, the focus can be stably adjusted on the horizontal stripe subject.
[0130] Or, in step S1009 of FIG. 10, it is maintained until it is determined that the defocus result (Defocus_0) of the horizontal direction calculation during standby and the defocus result (Defocus_1) of the vertical direction calculation are of the same degree, that is, it can be taken over by the horizontal direction calculation result. If it is determined that it can be taken over by the horizontal direction calculation result, in step S1003 of FIG. 10, focus driving is performed with the defocus result (Defocus_0) of the horizontal direction calculation, and even if the readout mode is switched to the vertical decimated readout mode in step S903 of FIG. 9, stable focus control can be performed.
[0131] As described above, by using this embodiment, AF control can be stably performed 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) Phase difference detection means for detecting the phase difference in the first direction of the optical image by the light passing through different pupil regions of the optical system and the phase difference in the second direction different from the first direction; Focus detection means for detecting the focus state based on at least one of the phase difference in the first direction and the phase difference in the second direction and obtaining its reliability; Adjusting means for driving the optical system to perform focus adjustment based on the focus state detected by the focus detection means; When shifting from a first state of performing focus adjustment based on the phase difference in the first direction to a second state of performing focus adjustment based on the phase difference in the second direction, the control means controls the adjusting means so as not to perform the 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; An imaging device, characterized by comprising the above.
[0134] (Item 2) When shifting from the first state to the second state, the control means permits 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. The imaging device according to Item 1, characterized by the above.
[0135] (Item 3) When shifting from the first state to the second state, the control means stops driving the optical system until the reliability of the focus state detected based on the phase difference in the second direction becomes higher than a predetermined value after shifting to the second state. The imaging device according to Item 1 or 2, characterized by the above.
[0136] (Item 4) When shifting from the first state to the second state, the control means controls so as not to shift 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. The imaging device according to Item 1, characterized by the above.
[0137] (Item 5) When shifting from the first state to the second state, the control means permits the shift 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. The imaging device according to Item 4, characterized by the above.
[0138] (Item 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 shooting scene.
[0139] (Item 7) The imaging device according to item 6, wherein the control means determines the change in the shooting scene based on a change in the posture of the imaging device.
[0140] (Item 8) The imaging device according to item 6, wherein the control means determines the change in the shooting scene based on a change in the luminance of the image.
[0141] (Item 9) The imaging device according to item 6, wherein the control means determines the change in the shooting scene based on a change in the detected subject.
[0142] (Item 10) The imaging device according to any one of items 1 to 9, wherein the control means controls to cause a search drive for searching a focus position with respect to the optical system when there is a change in the shooting scene.
[0143] (Item 11) The imaging device according to any one of items 1 to 10, wherein the focus detection means detects a focus state based on a signal obtained by thinning out signals of pixels in a direction orthogonal to the second direction in the second state.
[0144] (Item 12) The imaging device according to any one of items 1 to 11, wherein the focus detection means can detect a focus state based on a phase difference in the first direction and can detect a focus state based on a phase difference in the second direction in the first state, and can detect a focus state based on a phase difference in the second direction in the second state.
[0145] (Item 13) A phase difference detection step of detecting a phase difference in a first direction of an optical image due to 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 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 obtaining its reliability; An adjustment step of driving the optical system to perform focus adjustment based on the focus state detected in the focus detection step; When shifting from a first state of performing focus adjustment based on the phase difference in the first direction to a second state of performing 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, controlling the adjustment step so as not to perform the focus adjustment based on the phase difference in the second direction; A control method for an imaging device, characterized by comprising the above.
[0146] (Item 14) A program for causing a computer to execute each step of the control method according to 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 according to Item 13.
[0148] (Other embodiments) The present invention can also be realized by supplying a program that realizes one or more functions of the above-described embodiments to a system or device via a network or a storage medium, and having one or more processors in the computer of the system or device read and execute the program. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
[0149] The invention is not limited to the above embodiments, and various changes and modifications are possible without departing from the spirit and scope of the invention. Therefore, claims are attached to disclose the scope of the invention.
Explanation of reference numerals
[0150] 101: Lens unit, 102: Camera body, 111: Shooting lens, 112: Fixed lens, 113: Diaphragm, 114: Focus lens, 115: Diaphragm control unit, 116: Focus control unit, 117: Lens control unit, 121: Image sensor, 122: Timing generator, 123: CDS / AGC / AD circuit, 124: Image signal processing unit, 125: Signal processing unit for focus detection, 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 detection means for detecting a phase difference in a first direction of an optical image due to light passing through different pupil regions of an optical system and a phase difference in a second direction different from the first direction; 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 obtaining its reliability; Adjustment means for driving the optical system based on the focus state detected by the focus detection means to perform focus adjustment; When shifting from a first state of performing focus adjustment based on the phase difference in the first direction to a second state of performing focus adjustment based on the phase difference in the second direction, the control means does not perform the 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. Control means for controlling the adjustment means; An imaging device, characterized by comprising the above.
2. When shifting from the first state to the second state, the control means permits 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. The imaging device according to claim 1, characterized in that.
3. When shifting from the first state to the second state, the control means stops driving the optical system until the reliability of the focus state detected based on the phase difference in the second direction becomes higher than a predetermined value after shifting to the second state. The imaging device according to claim 1, characterized in that.
4. When shifting from the first state to the second state, the control means controls so as not to shift 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. The imaging device according to claim 1, characterized in that.
5. When transitioning from the first state to the second state, the control means permits the 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 is less than a threshold value. The imaging device according to claim 4.
6. The control means permits the transition to the second state when there is a change in the shooting scene. The imaging device according to claim 4.
7. The control means determines the change in the shooting scene based on a change in the posture of the imaging device. The imaging device according to claim 6.
8. The control means determines the change in the shooting scene based on a change in the luminance of the image. The imaging device according to claim 6.
9. The control means determines the change in the shooting scene based on a change in the detected subject. The imaging device according to claim 6.
10. When there is a change in the shooting scene, the control means controls the optical system to perform a search drive for searching the focus position. The imaging device according to claim 1.
11. The focus detection means detects the focus state based on a signal obtained by thinning out signals of pixels in a direction orthogonal to the second direction in the second state. The imaging device according to claim 1.
12. In the first state, the focus detection means can detect the focus state based on the phase difference in the first direction and the focus state based on the phase difference in the second direction. In the second state, the focus detection means can detect the focus state based on the phase difference in the second direction. The imaging device according to claim 1.
13. A phase difference detection step of detecting a phase difference in a first direction of an optical image due to 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 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 obtaining its reliability; An adjustment step of driving the optical system based on the focus state detected in the focus detection step to perform focus adjustment; When shifting from a first state of performing focus adjustment based on the phase difference in the first direction to a second state of performing 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, a control step of controlling the adjustment step so as not to perform the focus adjustment based on the phase difference in the second direction; A control method for an imaging device, characterized by comprising the above.
14. A program for causing a computer to execute each step of the control method according to claim 13.
15. A computer-readable storage medium storing a program for causing a computer to execute each step of the control method according to claim 13.
Citation Information
Patent Citations
Autofocus camera
JP2006243350A
Automatic focus device and control method of the same, as well as program and recording medium
JP2016130793A
Interchangeable lens, and camera body
JP2020012982A
Detection apparatus and detection method
JP2023121622A
Solid-state imaging apparatus
JP2005107252A