Focus detection device, imaging device, and focus detection method
The focus detection device and method improve focus detection accuracy by using multiple focus detection areas and prioritization based on image signal relationships, addressing issues with overlapping areas and low-contrast subjects.
Patent Information
- Application Number
- JP2020067921
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-04-03
- Publication Date
- 2024-08-13
- Estimated Expiration
- 2040-04-03
AI Technical Summary
Existing focus detection systems face challenges in accurately determining focus areas, particularly for low-contrast subjects, leading to subject omissions and inaccurate focus detection due to overlapping focus detection areas and inconsistent reliability across different focus detection frames.
A focus detection device and method that utilizes first and second focus detection areas of varying sizes, determining priority orders based on image signal relationships and thresholds, and selecting the most appropriate focus detection frame for accurate focus adjustment.
Enhances focus detection accuracy by prioritizing focus frames based on image signal correlations and reliability, reducing subject omissions and improving focus detection performance, especially for low-contrast subjects.
Smart Images

Figure 0007532067000005 
Figure 0007532067000006 
Figure 0007532067000007
Abstract
Description
[Technical field]
[0001] The present invention relates to a focus detection device having a phase difference focus detection function, an imaging device, and a focus detection method. [Background technology]
[0002] In automatic focus adjustment using the image plane phase difference detection method (image plane phase difference AF), the focus lens is moved by an amount of movement corresponding to the defocus amount calculated from the phase difference of a pair of image signals obtained by receiving light beams that have passed through different exit pupil areas in the photographing optical system. In order to achieve stable operation over a wide range and without missing subjects with image plane phase difference AF, it is necessary to set more focus detection areas (AF frames) over a wide range and at a high density. In addition, it is necessary to select or calculate the defocus amount used to calculate the amount of movement of the focus lens until a focused state is obtained from among them. Patent Document 1 discloses an imaging device that selects an AF frame from multiple AF frames based on the reliability judgment result calculated for each of the multiple AF frames in order to perform appropriate focus adjustment even for subjects that are not suitable for focus detection, such as low contrast. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2014-137567 A Summary of the Invention [Problem to be solved by the invention]
[0004] The distance measurement display frames displayed on a display device, etc., are arranged to make the area on the screen where distance measurement is possible and the in-focus position visible, while the focus detection areas are set to reduce the number of subjects missing and to prevent a decrease in distance measurement performance for low-contrast subjects. Therefore, the focus detection areas of adjacent distance measurement display frames have a certain degree of overlap and a certain degree of size. If the number of AF frames is increased while maintaining distance measurement performance, the overlap of the focus detection areas increases. In this case, when measuring the distance to a small subject, the distance measurement display frames that do not include the subject within the frames but include the subject in the focus detection areas will light up as focus display frames.
[0005] In the image capture device of Patent Document 1, among multiple ranging frames that include the same subject in the focus detection area, the reliability of the ranging frame that captures the subject at the center is the same as that of the ranging frame that captures the subject at the edge. Therefore, it is difficult to select a ranging frame that captures the subject's contrast more closely at the center of the focus detection area.
[0006] An object of the present invention is to provide a focus detection device, an imaging device, and a focus detection method that are capable of achieving appropriate focus detection operation. [Means for solving the problem]
[0007] A focus detection device according to one aspect of the present invention includes an acquisition means for acquiring a defocus amount for each of a plurality of AF frames, each of which includes a first focus detection area and a second focus detection area larger than the first focus detection area, using a pair of image signals corresponding to the first focus detection area and the second focus detection area, a determination means for determining a priority order for each of the plurality of AF frames using a pair of image signals acquired from each of the first and second focus detection areas, and a selection means for selecting an AF frame to be focused from the plurality of AF frames using the priority order, wherein the determination means determines the priority order for each of the plurality of AF frames using the relationship between a value based on the pair of image signals acquired from the first focus detection area and a first threshold value, and the relationship between a value based on a pair of image signals acquired from the second focus detection area and a second threshold value.
[0008] Further, a focus detection method according to another aspect of the present invention comprises: Each includes a first focus detection area and a second focus detection area that is larger than the first focus detection area. Multiple AF Frame And , No. 1 focus detection area, and Second and acquiring a defocus amount using a pair of image signals corresponding to each of the first and second focus detection areas. Each A process for determining a priority order; From multiple AF frames A selection step of selecting an AF frame to be focused; In the determination step, a relationship between a value based on a pair of image signals acquired from the first focus detection area and a first threshold value and a relationship between a value based on a pair of image signals acquired from the second focus detection area and a second threshold value are used to determine the priority order of each of the plurality of AF frames. It is characterized by: Effect of the Invention
[0009] According to the present invention, it is possible to provide a focus detection device, an imaging device, and a focus detection method that are capable of achieving appropriate focus detection operation. [Brief description of the drawings]
[0010] [Figure 1] 1 is a block diagram of an imaging device according to an embodiment of the present invention. [Diagram 2] FIG. 2 is a diagram showing a pixel configuration of image-surface phase-difference AF. [Diagram 3] 4 is a flowchart showing the operation of the imaging apparatus. [Figure 4] 11 is a flowchart showing an AF operation. [Diagram 5] 11 is a flowchart showing a focus detection process. [Figure 6] 13 is a flowchart showing a process of setting a priority order for selecting a main frame. [Figure 7] FIG. 4 is a diagram showing a focus detection area used in focus detection processing. [Figure 8] 8 is a diagram showing an image signal obtained from the focus detection area in FIG. 7. [Figure 9] 9 is a diagram showing the relationship between the shift amount and the correlation amount of the image signal in FIG. 8. FIG. [Figure 10] 9 is a diagram showing the relationship between the shift amount and the correlation change amount of the image signal in FIG. 8. FIG. [Figure 11]13 is a flowchart showing a method for evaluating reliability. [Figure 12] FIG. 13 is a diagram showing the relationship between steepness and the standard deviation of the amount of image shift. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings. In each drawing, the same reference numerals are given to the same members, and duplicated explanations will be omitted.
[0012] 1 is a block diagram of a camera system according to an embodiment of the present invention. A lens device (interchangeable lens, photographing optical system) 100 is detachably (replaceably) attached to a digital camera body (imaging device) 200 via a mount unit (not shown) having an electrical contact unit 106.
[0013] The lens device 100 has a photographing lens 101 including a zoom mechanism, an aperture and shutter 102 that controls the amount of light, a focus lens 103, a motor 104 that drives the focus lens 103, and a lens controller 105. The focus lens 103 is a focus adjustment means for adjusting the focus on the image sensor.
[0014] The digital camera body 200 has an image sensor 201, an A / D conversion unit 202, an image processing unit 203, an AF signal processing unit 204, a format conversion unit 205, a DRAM 206, an image recording unit 207, a timing generator 208, and a system control unit 209. The DRAM 206 is a high-speed built-in memory such as a random access memory, and is used as a high-speed buffer as a temporary image storage means, or as a working memory for compressing and decompressing images. The image recording unit 207 is made up of a recording medium such as a memory card and its interface.
[0015] The digital camera body 200 also has a lens communication unit 210, an AE processing unit 211, an image display memory (VRAM) 212, an image display unit 213, and an operation unit 214. In addition to displaying images, the image display unit 213 also displays operation assistance and the camera status, and displays the shooting screen and distance measurement area during shooting. The operation unit 214 is a member for operating the camera from the outside, and includes, for example, a menu switch for setting various settings such as shooting functions and settings for image playback, and an operation mode changeover switch between shooting mode and playback mode.
[0016] The digital camera body 200 also has a shooting mode switch 215, a main switch 216, a switch 217 (SW1), and a switch 218 (SW2). The shooting mode switch 215 is a switch for selecting a shooting mode such as a macro mode or a sports mode. The main switch 216 is a switch for turning on the power to the camera body 200.
[0017] In this embodiment, the AF signal processing unit 204 and the system control unit 209 form a focus detection device.
[0018] The image sensor 201 is composed of a CCD or CMOS sensor, and captures an image of a subject through the lens device 100. Specifically, a light beam passing through the lens device 100 is focused on an imaging surface (light receiving surface) of the image sensor 201, and is converted by a photodiode into a signal charge according to the amount of incident light. The signal charge accumulated in each photodiode is sequentially read out from the image sensor 201 as a voltage signal according to the amount of charge based on a drive pulse provided by a timing generator 208 in accordance with a command from a system control unit 209.
[0019] Each pixel of the image sensor 201 is composed of two (a pair) photodiodes A and B and one microlens provided for the pair of photodiodes A and B. The pair of photodiodes A and B are configured to receive light from different areas of the exit pupil of the photographing lens 101 via one microlens, and a pair of optical images are formed on the pair of photodiodes A and B. The pair of photodiodes A and B output a pair of image signals (signal A and signal B) used as an AF signal, which will be described later. In addition, an imaging signal (signal A+B) can be obtained by adding the outputs of the pair of photodiodes A and B.
[0020] A pair of image signals is generated as an AF signal (a focus detection signal) used for AF by an image plane phase difference detection method (hereinafter, image plane phase difference AF) by performing an addition process on a plurality of A signals and a plurality of B signals output from a plurality of pixels in a direction perpendicular to the pupil division direction. The AF signal processing unit 204 performs a correlation calculation on the pair of image signals to obtain a phase difference (hereinafter, image shift amount) which is the amount of shift between the pair of image signals, and further obtains a defocus amount (and defocus direction) of the lens device 100 from the image shift amount.
[0021] Figure 2(a) shows a pixel configuration that does not support image plane phase difference AF. Figure 2(b) shows a pixel configuration that supports image plane phase difference AF. In both figures, a Bayer array is used, with R representing a red color filter, B representing a blue color filter, and Gr and Gb representing green color filters.
[0022] In the pixel configuration of Fig. 2(b), two photodiodes A and B divided into two in the horizontal direction of the figure are provided in a pixel corresponding to one pixel shown surrounded by a solid line in the pixel configuration of Fig. 2(a). Note that the pixel division method of Fig. 2(b) is one example, and the pixel may be divided into two in the vertical direction of the figure, or into two each in the horizontal and vertical directions (a total of four divisions). Also, the same imaging element may contain multiple types of pixels divided by different division methods.
[0023] The imaging signal and the AF signal read from the imaging element 201 are input to the A / D conversion unit 202. The A / D conversion unit 202 performs correlated double sampling to remove reset noise, adjusts gain, and digitizes the signals on the imaging signal and the AF signal. The A / D conversion unit 202 outputs the imaging signal to the image processing unit 203 and outputs the AF signal to the AF signal processing unit 204. The AF signal processing unit 204 performs correlation calculation based on a pair of image signals that are AF signals, and calculates a defocus amount and reliability information (a degree of coincidence between two images, a degree of steepness between two images, contrast information, saturation information, scratch information, etc.). The calculated defocus amount and reliability information are output to the system control unit 209. In this embodiment, contrast information is used as the reliability information, but a feature amount of a correlation waveform acquired by correlation calculation may be used.
[0024] FIG. 3 is a flowchart showing the operation of the imaging apparatus.
[0025] In step S301, the AE processing unit 211 performs AE processing from the output of the image processing unit 203. Specifically, the AE processing unit 211 calculates exposure conditions based on a photometric value calculated from the output of the image processing unit 203 and a program diagram stored in advance.
[0026] In step S302, the system control unit 209 determines whether or not the switch 217 (SW1) for performing shooting standby operations such as AF and AE is ON. If the switch 217 is ON, the process proceeds to step S303, and if not, the process returns to step S301.
[0027] In step S303, the AF operation is performed.
[0028] In step S304, system control unit 209 determines whether switch 217 is ON. If switch 217 is ON, the process proceeds to step S305, and if not, the process returns to step S301.
[0029] In step S305, the system control unit 209 determines whether the switch 218 (SW2) for shooting is ON. If the switch 218 is ON, the process proceeds to step S306, and if not, the process returns to step S304.
[0030] In step S306, a shooting operation is performed, and then the process returns to step S301.
[0031] FIG. 4 is a flowchart showing the AF operation in step S303 of FIG.
[0032] In step S 401 , the AE processing unit 211 performs AE processing on the output of the image processing unit 203 .
[0033] In step S402, focus detection processing is executed, and the defocus amount and reliability information (reliability of focus detection processing) are acquired.
[0034] In step S403, the system control unit 209 determines whether the reliability of the focus detection process acquired in step S402 is higher than a preset reliability threshold 2. If the reliability is higher than reliability threshold 2, the process proceeds to step S404, and if not, the process proceeds to step S413. The reliability threshold 2 is a value that, if the reliability is less than reliability threshold 2, the accuracy of the defocus amount cannot be guaranteed, but the focus position direction of the subject can be guaranteed.
[0035] In step S404, the system control unit 209 determines whether the defocus amount acquired in step S402 is equal to or less than a preset Def amount threshold 2. If the defocus amount is equal to or less than the Def amount threshold 2, the process proceeds to step S405, and if not, the process proceeds to step S412. The Def amount threshold 2 is a value (e.g., 5 times the focal depth) that allows the focus lens 103 to be controlled to within the focal depth within a predetermined number of times (e.g., 3 times).
[0036] In step S405, system control unit 209 determines whether focus lens 103 is in a stopped state. If focus lens 103 is in a stopped state, the process proceeds to step S406, and if not, the process proceeds to step S410.
[0037] In step S406, the system control unit 209 determines whether the reliability acquired in step S402 is higher than a preset reliability threshold 1. If the reliability is higher than the reliability threshold 1, the process proceeds to step S407, and if not, the process proceeds to step S410. The reliability threshold 1 is a value that causes the accuracy variation of the defocus amount to be within a predetermined range (for example, within the focal depth) if the reliability is equal to or higher than the reliability threshold 1.
[0038] In step S407, the system control unit 209 determines whether the defocus amount acquired in step S402 is equal to or less than a preset Def amount threshold 1. If the defocus amount is equal to or less than the Def amount threshold 1, the process proceeds to step S408, and if not, the process proceeds to step S409. Def amount threshold 1 is a focus determination width for determining whether the focus lens 103 is controlled within a range that can be regarded as in focus.
[0039] In step S408, the system control unit 209 determines that the focus state is achieved, and ends this flow.
[0040] In step S409, the system control unit 209 instructs the lens controller 105 via the lens communication unit 210 to drive the focus lens 103 by the defocus amount acquired in step S402. That is, in this embodiment, the system control unit 209 functions as a control unit that instructs driving of the focus lens 103. Then, the process returns to step S402.
[0041] By performing a series of processes in steps S405 to S409, if the reliability acquired in step S402 is higher than the reliability threshold 1, the defocus amount can be acquired again with the focus lens 103 stopped.
[0042] In step S410, the system control unit 209 instructs the lens controller 105 via the lens communication unit 210 to drive the focus lens 103 by an amount obtained by multiplying the defocus amount acquired in step S402 by a predetermined ratio.
[0043] In step S411, the system control unit 209 instructs the lens controller 105 to stop the focus lens 103 via the lens communication unit 210. After that, the process proceeds to step S402.
[0044] In step S412, the system control unit 209 instructs the lens controller 105 via the lens communication unit 210 to drive the focus lens 103 by an amount obtained by multiplying the defocus amount acquired in step S402 by a predetermined ratio. Then, the process proceeds to step S402.
[0045] The predetermined ratio in step S410 and step S412 is set to, for example, 80% so that the drive amount of focus lens 103 is smaller than the defocus amount. Also, the drive speed of focus lens 103 is set to, for example, slower than the drive speed at which the target position can be reached before distance measurement calculation is completed in the next frame. This makes it possible to prevent the subject focus position from being exceeded when the acquired defocus amount is incorrect, and further makes it possible to drive the next focus lens 103 without stopping the focus lens 103 (overlap control).
[0046] In step S413, the system control unit 209 determines whether or not the out-of-focus condition is satisfied. If the out-of-focus condition is satisfied, the system control unit 209 proceeds to step S414. If not, the system control unit 209 proceeds to step S415. The out-of-focus condition is a condition for determining that a subject to be focused does not exist.
[0047] In step S414, the system control unit 209 determines that the camera is out of focus, and ends this flow.
[0048] In step S415, system control unit 209 determines whether focus lens 103 has reached any of the lens ends. If focus lens 103 has reached any of the lens ends, the process proceeds to step S416; if not, the process proceeds to step S417.
[0049] In step S416, the system control unit 209 instructs the lens controller 105 to reverse the driving direction of the focus lens 103 via the lens communication unit 210. After that, the process proceeds to step S402.
[0050] In step S417, the system control unit 209 causes the lens controller 105 to drive the focus lens 103 in a predetermined direction via the lens communication unit 210. After that, the process proceeds to step S402.
[0051] The driving speed of the focus lens 103 in steps S416 and S417 is set to the fastest speed within the range of speeds at which the focus lens 103 does not pass the focus position when the defocus amount becomes detectable, for example.
[0052] FIG. 5 is a flowchart showing the focus detection process in step S402 in FIG.
[0053] In step S501, a focus detection area of an arbitrary range within the image sensor 201 is set.
[0054] In step S502, a pair of image signals (image A, image B) for focus detection are acquired from the image sensor 201 for the focus detection area set in step S501.
[0055] In step S503, vertical row averaging of the pair of image signals acquired in step S502 is performed, which can reduce the effect of noise on the image signals.
[0056] In step S504, contrast information is calculated from each of the pair of image signals or from the combined signal. The contrast information is a value that serves as an index of the contrast of the image signal, such as the maximum value (Peak), minimum value (Bottom), wave height (Peak-Bottom), or wave height / maximum value of the image signal.
[0057] In step S505, a filtering process is performed to extract signal components in a predetermined frequency band from the signal obtained by performing the vertical row averaging in step S503.
[0058] In step S506, the correlation amount is calculated from the signal filtered in step S505.
[0059] In step S507, the correlation change amount is calculated from the correlation amount calculated in step S506.
[0060] In step S508, the amount of image shift is calculated from the amount of correlation change calculated in step S506.
[0061] In step S509, a reliability indicating how reliable the image shift amount calculated in step S508 is is calculated.
[0062] In step S510, the image shift amount is converted into a defocus amount.
[0063] In step S511, it is determined whether or not the filter processing performed in step S505 has performed calculations for the number of filter types. If the calculations have been performed for the number of filter types, the process proceeds to step S512; if not, the process returns to step S505. In the filter processing in step S504, for example, processing is performed in the horizontal direction using bandpass filters of multiple frequency bands with different bands on the vertical row arithmetic averaged signal. In step S510, it is determined whether or not the series of processes in steps S504 to S509 have been performed for all frequency band types.
[0064] In step S512, it is determined whether or not the same calculations for the multiple types of frame areas have been completed for the areas corresponding to each AF frame. If the calculations have been completed, the process proceeds to step S513, and if not, the process returns to step S501.
[0065] In step S513, a priority order for selecting a main frame is set as a preliminary step for selecting a main frame that identifies the position of the ranging frame that should be more in-focus relative to the entire surface. In this embodiment, the system control unit 209 functions as a determination unit that determines the priority order of multiple AF frames.
[0066] FIG. 6 is a flowchart showing a process of setting a priority order for selecting a main frame.
[0067] In step S1101, subject display frame determination S1101 is performed. Subject display frame determination is a method for determining whether high contrast components are present near the center of the distance measurement area for the focus detection area of each AF frame, and is performed based on the relative relationship of the calculation results for large and small focus detection areas in each AF frame.
[0068] In this embodiment, as an example, a method of implementation based on the relative relationship of contrast information will be described. When the contrast of a small frame relatively close to the distance measurement display frame is extremely low and the contrast of a large frame corresponding to a similar AF frame is high, the contrast component is highly likely to be located at the edge of the focus detection area relative to the attention frame. In such an arrangement state of the distance measurement frames, the defocus detection result fluctuates greatly due to the subject moving in and out due to the defocus state, and if the attention frame is selected as the main frame, the possibility of erroneous distance measurement or out-of-focus increases. In addition, when a subject with high contrast is captured at the edge of the focus detection area of the attention frame, there is a high possibility that the adjacent distance measurement frame can capture contrast in an area closer to the center of the focus detection area, and an appropriate main frame selection is necessary in order to reduce the frequency of erroneous distance measurement, etc. As control trust information when implementing the above-mentioned method, an evaluation value EvaValue expressed by the following formula (1) for evaluating a low contrast state can be used.
[0069] EvaValue=(Peak-Bottom) / (Peak) (1) Here, Peak represents the maximum value of the focus detection signal, and Bottom represents the minimum value of the focus detection signal. In other words, "Peak-Bottom" represents the crest value. Note that, although the focus detection signal is used in this embodiment, an imaging signal at the same position may also be used.
[0070] The evaluation value EvaValue is obtained for the large and small focus detection areas in each AF frame. The subject display frame determination is made as follows: if the evaluation value EvaValue1 of the large frame and the evaluation value EvaValue2 of the small frame satisfy the conditions expressed by the following formulas (2) and (3), it is determined that there is no high-contrast subject in the focus detection display frame (false); otherwise it is determined as "true."
[0071] EvaValue1≧CntTh1 (2) EvaValue2 <CntTh2 (3) Here, CntTh1 is a threshold value at which an object can be determined as a high contrast object, and is set to about 0.5 in this embodiment, and CntTh2 is a threshold value at which an object can be determined as a very low contrast object, and is set to about 0.1 in this embodiment.
[0072] In this embodiment, the subject display frame determination is performed using formula (1), but the present invention is not limited to this. For example, the determination may be performed using a value that can evaluate the contrast arrangement of the subject, such as contrast information ABSCNT expressed by the following formula (4).
[0073] ABSCNT=Σ(S i+1 -S i ) (4) Here, S is a signal for focus detection.
[0074] Furthermore, in this embodiment, the subject display frame interior determination is performed using contrast information, but the determination may also be performed based on the relative relationship of reliability between large and small frames in distance measurement calculations such as correlation calculations.
[0075] In steps S1102 to S1115, the priority order for main frame selection is determined as priority order 1 to 7 based on the subject display frame determination, the acquired defocus reliability, and the position of the ranging frame. When the priority order setting for all ranging frames is completed, the process proceeds to step S514 in Fig. 5. The arrangement of the ranging frames and the like will be described later with reference to Fig. 6.
[0076] In step S514, it is determined whether or not the same calculations have been completed for all AF frames. If the calculations have been completed, the process proceeds to step S515, and if not, the process returns to step S502.
[0077] In step S515, at least one AF frame is selected as the main frame, which is the subject position that should be more in focus, from among the multiple AF frames calculated by the series of processes in steps S501 to S513, based on the result of the priority order setting in step S513. In the main frame selection, the closest frame is set as the main frame from among the ranging frames of each priority order according to the result set in priority orders 1 to 7 in step S513. This selection process is performed in order from priority orders 1 to 7 to select the main frame. When the main frame is selected in this step, the focus detection process ends. In this embodiment, the system control unit 209 functions as a selection unit that selects the ranging frame to be focused.
[0078] Fig. 7 is a diagram showing a focus detection area used in focus detection processing. Fig. 7(a) shows an example of a distance measurement display frame 602 when distance measurement is performed at multiple positions on the pixel array 601 of the image sensor 201 in focus detection processing, and is an image of the distance measurement display frame to be superimposed on a live view image on a rear LCD or the like. In this embodiment, the system control unit 209 functions as an AF frame setting unit that sets multiple AF frames two-dimensionally on the imaging surface of the image sensor 201. Fig. 7(b) shows the relationship between the distance measurement display frame and the focus detection area.
[0079] The distance measurement display frame 602 represents one of the multiple AF frames arranged in FIG. 7A. In this embodiment, multiple types of focus detection areas are set corresponding to the distance measurement display frame 602. Here, the set focus detection area may include at least a first focus detection area (small frame focus detection area) and a second focus detection area (large frame focus detection area) larger than the first focus detection area. The area obtained by combining the large frame focus detection area 604 and the shift area 605 is a pixel area required for correlation calculation of the large frame. p, q, s, and t in FIG. 7B each represent coordinates in the horizontal direction (x-axis direction). The coordinates p and q represent the x coordinates of the start and end points of the pixel area, respectively, and the coordinates s and t represent the x coordinates of the start and end points of the focus detection area 604, respectively. In addition, the area obtained by combining the small frame focus detection area 606 and the shift area 607 is a pixel area required for correlation calculation of the small frame. When multiple frame calculations are performed for each AF frame, it is desirable that the focus detection area of the small frame is an area that matches the size of the distance measurement display frame to some extent. In this embodiment, distance measurement calculations are performed for multiple focus detection areas of different sizes for each AF frame, and the selection priority of each distance measurement frame required when selecting an AF frame is set based on the relative relationship of reliability for the multiple focus detections of different sizes. Also, in this embodiment, the system control unit 209 functions as a focus detection area setting unit that sets multiple focus detection areas of different sizes for each AF frame of the multiple AF frames.
[0080] FIG. 8 is a diagram showing a pair of image signals obtained from multiple pixels included in the focus detection area 604 in FIG. 7. A solid line 701 indicates one image signal A, and a dashed line 702 indicates the other image signal B. FIG. 8(a) shows the image signals A and B before shifting. FIGS. 8(b) and 8(c) show the image signals A and B after being shifted in the plus and minus directions, respectively, from the state in FIG. 8(a). When calculating the correlation amount between image signals A and B, both image signals A and B are shifted by one bit in the direction of the arrow.
[0081] Next, a method for calculating the correlation amount will be described. First, as shown in Fig. 8(b) and (c), image signals A and B are each shifted by one bit, and the sum of the absolute values of the differences between image signals A and B is calculated. When the shift amount is i, the maximum shift amount in the negative direction is ps, the maximum shift amount in the positive direction is qt, x is the start coordinate of the focus detection area 604, and y is the end coordinate of the focus detection area 604, the correlation amount COR is calculated by the following formula (5).
[0082]
number
[0083] Fig. 9 is a diagram showing the relationship between the shift amount and the correlation amount of the image signal in Fig. 8. Fig. 9(a) shows an example of the relationship between the shift amount and the correlation amount COR. The horizontal axis shows the shift amount, and the vertical axis shows the correlation amount COR. Among extreme values 802, 803 in a correlation amount 801 that changes with the shift amount, the degree of match between a pair of image signals A and B is highest at a shift amount corresponding to a smaller correlation amount.
[0084] Next, a method for calculating the correlation change amount will be described. The difference between the correlation amounts for every other shift in the waveform of the correlation amount 801 in Fig. 9(a) is calculated as the correlation change amount. When the shift amount is i, the maximum shift amount in the negative direction is ps, and the maximum shift amount in the positive direction is qt, the correlation change amount ΔCOR is calculated by the following formula (6).
[0085]
number
[0086] Fig. 10 is a diagram showing the relationship between the shift amount of the image signal in Fig. 8 and the correlation change amount. Fig. 10(a) shows an example of the relationship between the shift amount and the correlation change amount ΔCOR. The horizontal axis shows the shift amount, and the vertical axis shows the correlation change amount ΔCOR. The correlation change amount 901, which changes with the shift amount, goes from positive to negative at parts 902 and 903. The state where the correlation change amount becomes 0 is called a zero cross, and the degree of match between the pair of image signals A and B is highest. Therefore, the shift amount that gives the zero cross is the image shift amount.
[0087] Fig. 10(b) is an enlarged view of a portion indicated by 902 in Fig. 10(a). 904 is a portion of the correlation change amount 901. A method of calculating the image shift amount PRD will be described with reference to Fig. 10(b).
[0088] The shift amount (k-1+α) that gives the zero crossing is divided into an integer part β (=k-1) and a decimal part α. The decimal part α is calculated by the following formula (7) based on the similarity between triangles ABC and ADE in the figure.
[0089]
number
[0090] The integer part β is calculated by the following formula (8).
[0091] β=k-1 (8) The image shift amount PRD can be calculated from the sum of the decimal part α and the integer part β. As shown in FIG. 10(a), when there are multiple zero crossings of the correlation change amount ΔCOR, the one in the vicinity of which the change in the correlation change amount ΔCOR has a greater steepness is determined to be the first zero crossing. This steepness is an index showing the ease of AF, and the larger the value, the easier it is to perform accurate AF. The steepness maxder is calculated using the following formula (9).
[0092]
number
[0093] In this way, when there are a plurality of zero crossings in the correlation change amount ΔCOR, the first zero crossing is determined based on the steepness of the zero crossings, and the shift amount that gives the first zero crossing is regarded as the image shift amount.
[0094] Hereinafter, a method for evaluating the reliability calculated in step S509 in Fig. 5 will be described. Fig. 11 is a flowchart showing the method for evaluating the reliability. In this embodiment, the reliability is evaluated in four stages.
[0095] In step S1001, in order to improve the accuracy of reliability, the steepness maxder is normalized by the shooting conditions (sensor gain, the number of added read rows, etc.) and the subject conditions (contrast, etc.).
[0096] In step S1002, it is determined whether the defocus amount acquired in step S510 is greater than the defocus amount threshold. If the defocus amount is greater than the defocus amount threshold, the process proceeds to step S1003; if not, the process proceeds to step S1004.
[0097] In step S1003, the reliability is set to 0. When the reliability is set to 0, the reliability of the defocus amount is evaluated to be low, and this flow ends.
[0098] In step S1004, it is determined whether the normalized steepness maxder (normalized maxder) normalized in step S1001 is equal to or less than the maxder threshold. If the normalized steepness maxder is equal to or less than the maxder threshold, the process proceeds to step S1003; if not, the process proceeds to step S1005.
[0099] In this embodiment, the defocus amount threshold and the maxder threshold are set for each filter. The defocus amount threshold is set according to the defocus amount detection ability of each filter (the limit distance that can be measured in terms of the total shift amount). In addition, in a scene where an erroneous reliability is likely to be output in distance measurement at low brightness or distance measurement of a subject with low contrast, the normalized maxder becomes small, so that the maxder threshold is set to prevent an erroneous reliability from being output.
[0100] In step S1005, the standard deviation of the image shift amount is estimated based on the normalized maxder. As shown in Fig. 12, there is a negative correlation between the normalized maxder and the standard deviation of the image shift amount, so it is possible to estimate the standard deviation of the image shift amount from the normalized maxder.
[0101] In step S1006, the standard deviation of the image shift amount is multiplied by a predetermined conversion coefficient to calculate the standard deviation of the defocus amount. The conversion coefficient is the same as the conversion coefficient used when calculating the defocus amount from the shift amount of two images, and is determined by the aperture value of the aperture, the exit pupil distance of the photographing lens, the individual information of the image sensor, and the coordinates for setting the focus detection area. In addition, the standard deviation of the defocus amount is also normalized by dividing the aperture value F and the permissible circle of confusion δ. If the reliability (standard deviation of the defocus amount) is evaluated based on the steepness maxder, it is necessary to set a threshold value equal to the number of conversion coefficients. In this embodiment, a more desired threshold value can be set without storing a large amount of threshold value data. In addition, since normalization is performed by the aperture value F, it is possible to set a threshold value regardless of the state of the aperture. The reliability of the defocus amount is evaluated according to the standard deviation of the defocus amount calculated as described above. In this embodiment, three threshold values (THRESHOLD1, THRESHOLD2, THRESHOLD3) of the standard deviation of the defocus amount are set. The order of THRESHOLD1, THRESHOLD2, and THRESHOLD3 is larger.
[0102] In step S1007, it is determined whether the standard deviation of the defocus amount is greater than the threshold value THRESHOLD 1. If the standard deviation of the defocus amount is greater than the threshold value THRESHOLD 1, the process proceeds to step S1003, and if not, the process proceeds to step S1008.
[0103] In step S1008, it is determined whether the standard deviation of the defocus amount is greater than the threshold THRESHOLD 2. If the standard deviation of the defocus amount is greater than the threshold THRESHOLD 2, the process proceeds to step S1009, and if not, the process proceeds to step S1010.
[0104] In step S1009, the confidence level is set to one.
[0105] In step S1010, it is determined whether the standard deviation of the defocus amount is greater than the threshold value THRESHOLD 3. If the standard deviation of the defocus amount is greater than the threshold value THRESHOLD 3, the process proceeds to step S1011, and if not, the process proceeds to step S1012.
[0106] In step S1011, the confidence level is set to two.
[0107] In step S1012, the confidence level is set to three.
[0108] As described above, the AF operation, the focus detection process, and the evaluation of the reliability of the defocus amount as an internal process of the focus detection process have been described, and then a method of selecting a main frame from among multiple AF frames has been described.
[0109] In this embodiment, a method for selecting a main frame from a plurality of distance measurement frames based on the result of subject display frame interior determination has been described, but this method may be performed depending on the operation of the camera or the state of the subject.
[0110] As an example, depending on the motion state of the subject, the result of the subject display frame determination can be switched between valid and invalid depending on whether the subject is a still subject or a moving subject, making it possible to implement in more appropriate situations. Accurate display of the depth of field display frame is a more effective method for checking the focus of a still subject, whereas for a moving subject, it is preferable to emphasize continuity of the distance measurement results due to subject omission and continuity of the display frame rather than accurate display of the depth of field.
[0111] In addition, the subject display frame determination result can be enabled / disabled depending on the user's setting of the number of AF frame placements and the result of automatic subject detection, allowing for more appropriate implementation in certain situations. The AF method for placement of the AF frame can be set from the camera menu to either a method in which a single or a small number of frames are placed at any position, or a method that allows distance measurement with multiple AF frames in a relatively wide area. In the method in which a single or a small number of frames are placed at any position, the user actively specifies the position on the screen where the focus is to be adjusted, so there is a possibility that the position selected as the main frame does not necessarily match the result of the subject display frame determination. Therefore, the result of the subject display frame determination is disabled in this AF method and enabled in other AF methods, allowing for more appropriate control. [Other Examples] The present invention can also be realized by a process in which a program for implementing one or more of the functions of the above-mentioned embodiments is supplied to a system or device via a network or a storage medium, and one or more processors in a computer of the system or device read and execute the program. It can also be realized by a circuit (e.g., ASIC) that implements one or more of the functions.
[0112] Although the preferred embodiments of the present invention have been described above, the present invention is not limited to these embodiments, and various modifications and changes are possible within the scope of the gist of the present invention. [Explanation of symbols]
[0113] 100 Lens device (photographic optical system) 103 Focus lens (focus adjustment means) 200 Digital camera body (imaging device) 204 AF signal processing unit (acquisition means) 209 System control unit (decision means, selection means)
Claims
1. an acquisition means for acquiring a defocus amount for each of a plurality of AF frames, each of which includes a first focus detection area and a second focus detection area larger than the first focus detection area, using a pair of image signals corresponding to the first focus detection area and the second focus detection area; a determination unit that determines a priority order of each of the plurality of AF frames using the pair of image signals acquired from the first and second focus detection areas, respectively; a selection unit for selecting an AF frame to be focused from the plurality of AF frames using the priority order, The focus detection device is characterized in that the determination means determines the priority of each of the multiple AF frames using the relationship between a value based on the pair of image signals obtained from the first focus detection area and a first threshold value, and the relationship between a value based on the pair of image signals obtained from the second focus detection area and a second threshold value.
2. the first threshold is less than the second threshold, The focus detection device according to claim 1, characterized in that the determination means lowers the priority of an AF frame included in the plurality of AF frames when a value based on the pair of image signals acquired from the first focus detection area is smaller than the first threshold value and a value based on the pair of image signals acquired from the second focus detection area is larger than the second threshold value.
3. 3. The focus detection device according to claim 1, wherein the pair of image signals are obtained based on a signal generated by an image sensor.
4. 4. The focus detection device according to claim 3, wherein the image sensor captures an object image via a photographing optical system including a focus lens.
5. 5. The focus detection device according to claim 4, further comprising a control unit that controls movement of the focus lens based on a defocus amount corresponding to the AF frame selected by the selection unit.
6. 6. The focus detection device according to claim 1, wherein the reliability of the defocus amount is contrast information based on a pair of image signals acquired from each focus detection area.
7. The focus detection device according to claim 6 , wherein the contrast information includes a maximum value of the pair of image signals obtained from each focus detection area.
8. 8. The focus detection device according to claim 6, wherein the contrast information includes a ratio between a peak value and a maximum value of the pair of image signals acquired from each focus detection area.
9. the acquiring means performs a correlation calculation to calculate a phase difference between a pair of focus detection signals based on the pair of image signals; 6. The focus detection device according to claim 1, wherein the reliability of the defocus amount is a feature amount of a correlation waveform obtained by the correlation calculation.
10. 10. The focus detection device according to claim 1, further comprising an AF frame setting unit that sets the plurality of AF frames two-dimensionally.
11. 11. The focus detection device according to claim 1, further comprising focus detection area setting means for setting the first and second focus detection areas.
12. an image sensor that captures a subject image via an imaging optical system including a focus lens; An imaging apparatus comprising the focus detection device according to claim 1 .
13. An acquisition process for acquiring a defocus amount for each of a plurality of AF frames, each of which includes a first focus detection area and a second focus detection area larger than the first focus detection area, using a pair of image signals corresponding to each of the first focus detection area and the second focus detection area; a determination step of determining a priority order of each of the plurality of AF frames using the pair of image signals acquired from the first and second focus detection areas, respectively; a selection step of selecting an AF frame to be focused from the plurality of AF frames using the priority order, A focus detection method characterized in that the determination process determines the priority order of each of the multiple AF frames using the relationship between a value based on the pair of image signals acquired from the first focus detection area and a first threshold value, and the relationship between a value based on the pair of image signals acquired from the second focus detection area and a second threshold value.
Citation Information
Patent Citations
Imaging device
JP2014137567A
Focus adjustment unit, focus adjustment method, and program
JP2018045101A
Focus adjustment device and imaging apparatus
JP2018045102A
Focus adjustment unit and focus adjustment method
JP2018097253A
Focus control device, focus control method, focus control program, lens device, imaging device
WO2017057071A1
