Focus detection device and focus detection method
The focus detection device adapts the scan range and duration of focus movement based on subject movement prediction and environmental conditions, ensuring continuous focus tracking on rapidly retreating subjects, addressing the challenge of maintaining clear images in low-contrast or low-light scenarios.
Patent Information
- Application Number
- JP2020202622
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-12-07
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2040-12-07
AI Technical Summary
Existing focus detection devices struggle to maintain focus on rapidly retreating subjects, particularly in low-contrast or low-light conditions, leading to potential loss of focus and inability to capture clear images.
A focus detection device that adjusts the scan range of the focus lens based on predicted subject movement, using duration times to limit focus movement and incorporating angular velocity, motion vector, and brightness changes to adapt the scan operation, ensuring continuous focus tracking.
The device effectively maintains focus on rapidly retreating subjects by dynamically adjusting the scan range and duration of focus movement, allowing for accurate and timely refocusing even when subjects move quickly.
Smart Images

Figure 0007563962000001 
Figure 0007563962000002 
Figure 0007563962000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a focus detection device and a focus detection method that maintains a focused state by tracking a subject using contrast AF. [Background technology]
[0002] Various focus detection devices have been proposed that use contrast AF to maintain focus on a moving subject during continuous shooting, and prevent significant blurring even when the subject is low-contrast or in a low-illumination environment. For example, Patent Document 1 discloses a focus detection device that predicts the focus position for an approaching moving subject and changes the scan range of the focus lens. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2016-061797 A Summary of the Invention [Problem to be solved by the invention]
[0004] By changing the scanning range of the focus lens according to the predicted focus position, it is possible to maintain focus to a certain extent. However, if the subject moves back rapidly on the close side, the AF will not be able to keep up, and the image will be either impossible to shoot or out of focus.
[0005] The present invention has been made in consideration of the above circumstances, and has an object to provide a focus detection device and a focus detection method that enable AF to track a subject even when the subject rapidly retreats. [Means for solving the problem]
[0006] In order to achieve the above object, a focus detection device according to a first aspect of the present invention has an image sensor that performs photoelectric conversion on subject light passing through an imaging optical system to output an image signal, and performs focus detection by calculating an evaluation value indicating contrast based on the image signal while performing a scan operation that changes the focus of an image pickup surface of the image sensor, the focus detection device comprising: a position change detection unit that detects a position change of the focus detection device; a duration setting unit that sets a duration for limiting a focus movement range of the scan operation based on the position change; and a control unit that performs focus detection by limiting a focus movement range of the scan operation based on the duration. The duration setting unit sets the duration to be longer as the position change is larger. .
[0008] No. 2 The focus detection device according to the present invention is 1 of In the present invention, the control unit executes the scanning operation repeatedly and detects focus. Match The focusing time and the focusing position are acquired, and if the elapsed time from the previous focusing time to the current time is less than the above-mentioned duration, the focus movement range from the previous focusing position is limited to a predetermined amount. No. 3 The focus detection device according to the present invention is 2 In the invention, the control section releases the restriction on the focus movement range from the previous focus position when the elapsed time from the previous focus time to the current time is equal to or greater than the duration time.
[0009] No. 4 The focus detection device according to the present invention is the first to third focus detection devices. 3 In any one of the above aspects of the present invention, the position change detection section has an angular velocity detection section and detects the position change based on an angular velocity. No. 5 The focus detection device according to the present invention is the first to third focus detection devices. 3 In any one of the above-mentioned inventions, the position change detection unit detects a position change based on an output of the imaging element. I Motion Vectors Detect the detected motion vector To based on The above-mentioned change in position is detected. No. 6 The focus detection device according to the present invention is the first to third focus detection devices. 3In any one of the above-mentioned inventions, the position change detection unit detects a position change based on an output of the imaging element. I Brightness Change Detects the brightness change detected To based on The above-mentioned change in position is detected.
[0010] No. 7 The focus detection method according to the present invention is a focus detection method for a focus detection device having an image sensor that performs photoelectric conversion on subject light passing through a photographing optical system and outputs an image signal, and performs focus detection by calculating an evaluation value indicating contrast based on the image signal output by the image sensor while performing a scanning operation that changes the focus of an image capturing surface of the image sensor, the focus detection method detecting a position change of the focus detection device, setting a duration for limiting a focus movement range of the scanning operation based on the position change, and limiting the focus movement range of the scanning operation based on the duration, The greater the position change, the longer the duration. . Effect of the Invention
[0011] According to the present invention, it is possible to provide a focus detection device and a focus detection method that are capable of tracking AF even when a subject rapidly retreats. [Brief description of the drawings]
[0012] [Figure 1] 1 is a block diagram showing mainly the electrical circuitry of a camera according to an embodiment of the present invention. [Diagram 2] 11 is a flowchart showing the operation when a first release is pressed in the camera of one embodiment of the present invention. [Figure 3A] 5 is a flowchart showing the operation of contrast C-AF control in a camera according to one embodiment of the present invention. [Figure 3B] 5 is a flowchart showing the operation of contrast C-AF control in a camera according to one embodiment of the present invention. [Figure 4] 5 is a flowchart showing the operation of scan drive limit determination in the camera according to one embodiment of the present invention. [Diagram 5] 5 is a flowchart showing the operation of determining the amount of movement of X, Y in the camera according to one embodiment of the present invention. [Figure 6] 13 is a flowchart showing the operation of a first modified example of X, Y movement amount determination in the camera according to one embodiment of the present invention. [Figure 7] 13 is a flowchart showing the operation of a second modified example of X, Y movement amount determination in the camera according to one embodiment of the present invention. [Figure 8] 1A and 1B are diagrams showing a case where a foot race is photographed and a case where a Tarzan rope is photographed with a camera according to an embodiment of the present invention. [Figure 9] 11A to 11C are diagrams illustrating the movement of a subject when a footrace is photographed from the side with a camera according to one embodiment of the present invention. [Figure 10] 11A and 11B are diagrams illustrating the movement of a subject when photographing a Tarzan rope with a camera according to one embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] An example of application of a focus adjustment device according to a preferred embodiment of the present invention to a camera will be described below. This camera is a digital camera having an image sensor, which converts a subject image into image data, and based on the converted image data, displays the subject image in a live view on a display unit arranged on the rear of the camera body. A user determines the composition and shutter timing by observing the live view display. During a release operation, the image data is recorded on a recording medium. When a playback mode is selected, the image data recorded on the recording medium can be played back and displayed on the display unit. In addition, this focus detection device performs focus detection by calculating an evaluation value indicating contrast based on an image signal while performing a scan operation that changes the focus of the imaging surface of the image sensor.
[0014] In contrast AF for still images, in order to prevent loss of sight due to the subject moving out of the AF target area (hereinafter also referred to as "subject off"), when the contrast becomes low and the direction judgment cannot be confirmed, the scan drive range is limited to facilitate recovery from the subject off. Although such a limit on the scan drive range is effective in preventing loss of sight due to the subject moving out, it becomes impossible to track if the subject moves back rapidly on the close side. Therefore, in this embodiment, the time for which the limit on the scan drive range is continued is changed according to the camera movement and the focus history information.
[0015] Specifically, this is done as follows. Scenes in which the subject goes off the mark often involve panning to chase the subject. In this case, the restriction of the scan drive range is effective, so if a panning motion is detected, the duration for restricting the scan drive range is lengthened. On the other hand, in scenes involving a Tarzan rope or a swing where rapid retreat occurs on the close side, panning motion is rare and subject deviation is unlikely to occur. Therefore, the restriction of the scan drive range is not effective, so if it is detected that there is no panning motion or that the panning motion is small, the duration for restricting the scan drive range is shortened.
[0016] 1 is a block diagram showing mainly the electrical configuration of a camera according to one embodiment of the present invention. The camera according to this embodiment has, broadly speaking, a lens unit 10 and a camera body 20. Note that the camera according to this embodiment is a so-called interchangeable lens camera in which the lens unit 10 is attached to the camera body 20, but the lens unit 10 and the camera body 20 may be configured as one unit. In this case, the lens side CPU 104 and the camera side CPU 107 may be integrated.
[0017] The lens unit 10 has a photographing lens 100, an aperture 101, and a lens / aperture drive motor 102 for driving these, a motor drive circuit 103, and a lens-side CPU 104. The camera body 20 has an image sensor 105, an image capture control / signal processing circuit 106, a camera-side CPU 107, an AF (Auto Focus) evaluation value calculation circuit 108, an angular velocity detection circuit 109, an AE (Auto Exposure) evaluation value calculation circuit 110, an image processing circuit 111, a display device 112, a recording device 113, an operation unit 114, and a memory 115.
[0018] The photographing lens 100 has a plurality of optical lenses for forming a subject image. The plurality of optical lenses include a focus lens, which is a fixed focal length lens or a zoom lens. The aperture 101 is disposed near the exit pupil of the photographing lens 100 and on the optical axis of the photographing lens 100, and adjusts the amount of incident light and the focal depth. The aperture 101 and the focus lens in the photographing lens 100 are controlled by the camera-side CPU 107, the lens-side CPU 104, the motor drive circuit 103, and the motor 102, and focus adjustment and aperture adjustment are realized. The lens-side CPU 104 interprets control commands received from the camera-side CPU 107 and controls the photographing lens 100 and the aperture 101.
[0019] The image sensor 105 is disposed on the optical axis of the photographing lens 100, and converts the subject image formed by the photographing lens 100 into image data. That is, the image sensor 105 has pixels, each including a photodiode, arranged in a two-dimensional matrix, and accumulates electric charge according to the amount of received light. An imaging control / signal processing circuit 106 connected to the output of the image sensor 105 controls the charge accumulation of the image sensor 105 and the readout of image signals. The image sensor 105 functions as an image sensor that photoelectrically converts the subject light passing through the photographing optical system and outputs an image signal.
[0020] The imaging control / signal processing circuit 106 performs amplification processing, AD conversion, etc. on the image signal read from the imaging element 105, and outputs image data. The image data read from the imaging element 105 and processed by the imaging control / signal processing circuit 106 is output to the camera-side CPU 107, the AF evaluation value calculation circuit 108, the AE evaluation value calculation circuit 110, and the image processing circuit 111.
[0021] The camera-side CPU 107 is a processor having a CPU (Central Processing Unit) and peripheral circuits. The camera-side CPU 107 controls each part in the camera body 20 according to a program stored in the memory 115. The camera-side CPU 107 also communicates with the lens-side CPU 104 in the lens unit 10, and controls each part in the lens unit 10 through the lens-side CPU 104. The camera-side CPU 107 also receives various adjustment values of the lens unit 10 and status information of the focus lens and aperture from the lens-side CPU 104.
[0022] The camera-side CPU 107 (processor) also functions as a duration setting unit that sets the duration limiting the focus movement range of the scan operation based on the position change of the focus detection device (see S45, S47 in FIG. 4). The duration setting unit also sets the duration longer as the position change is larger (see S43 Yes → S45 in FIG. 4). In this embodiment, when the user is panning (panning operation) to chase the subject to position it within the AF target, the time limit of the scan drive range is lengthened (see the subject out-of-focus section and time limit Tlim in FIG. 9(b)). When the user changes the camera direction by panning operation and captures the subject again within the AF target, the subject distance is likely to be approximately the same as before the subject was out-of-focus and lost sight of the AF target, so the scan drive range is limited. On the other hand, for example, when photographing a child playing with a Tarzan rope from the front, the subject is unlikely to be out-of-focus from the AF target, so the amount of change in the camera direction by the user is small, and therefore the time limiting the scan drive range is shortened (see Tlim in FIG. 10(b)).
[0023] The camera-side CPU 107 (processor) also functions as a control unit that performs focus detection by limiting the focus movement range of the scan operation based on the duration (see, for example, S27 in FIG. 3A). The control unit acquires the focus time and focus position when the control unit repeatedly executes the scan operation and detects focus, and limits the focus movement range from the previous focus position to a predetermined amount when the elapsed time from the previous focus time to the current time is less than the duration (see, for example, S49, S51 No, S53, and S55 in FIG. 4). The control unit releases the restriction on the focus movement range from the previous focus position when the elapsed time from the previous focus time to the current time is equal to or greater than the duration (see, for example, S51 Yes → S59 in FIG. 4).
[0024] The AF evaluation value calculation circuit 108 has a filter circuit, and extracts high frequency components of the image data output from the image sensor 105 using the filter circuit to calculate an AF evaluation value. The AF evaluation value is calculated for image data corresponding to the AF target. The calculated AF evaluation value is output to the camera-side CPU 107. The AF evaluation value calculation circuit 108 functions as an evaluation value calculation unit that calculates an evaluation value indicating contrast based on the image signal output from the image sensor.
[0025] The angular velocity detection circuit 109 has an angular velocity sensor such as a gyro, and a processing circuit that processes the output signal of this angular velocity sensor. The angular velocity detection circuit 109 detects the angular velocity applied to the camera, such as the shaking of the user holding the camera, or the movement of chasing a subject for panning photography. The angular velocity detection circuit 109 outputs the detection result to the camera-side CPU 107. The amount of movement of the camera can be calculated based on the angular velocity (see FIG. 5).
[0026] The angular velocity detection circuit 109 functions as a position change detection unit that detects a change in the position of the focus detection device. The position change detection unit has an angular velocity detection unit (angular velocity detection sensor) and detects a position change based on the angular velocity (see FIG. 5, for example). Note that the position change detection unit may be any unit that can detect a physical change in the position of the focus detection device, such as acceleration or angular acceleration, in addition to detecting the angular velocity.
[0027] The AE evaluation value calculation circuit 110 has a brightness value calculation circuit, corrects the brightness value of the photometry area when the live view image data is acquired, calculates the brightness value when image data for focus adjustment is acquired, and calculates the exposure time (Tv) and the aperture value (Av) so that the exposure during live view display and focus adjustment is appropriate. The brightness value Y may be temporarily stored in a storage unit such as the memory 115 and acquired by the camera-side CPU 107, or the value calculated by the AE evaluation value calculation circuit 110 may be directly acquired by the camera-side CPU 107.
[0028] The amount of movement of the camera may be calculated using the brightness values in the AF target and its periphery (see FIG. 7). For example, when a person running a footrace is photographed from the side, if the person moves out of the AF target in the camera screen, the image acquired in the AF target changes from the person to the background, and the brightness value in the AF target changes accordingly. Similarly, the brightness value of the image corresponding to the background also changes on the periphery of the photographing screen. Therefore, the position change of the camera can be detected based on the change in the AE evaluation value (brightness value). The AE evaluation value calculation circuit 110 functions as a position change detection unit that detects the position change of the focus detection device. The position change detection unit detects the position change by the brightness change based on the output of the image sensor (see FIG. 7, for example).
[0029] The image processing circuit 111 performs various image processing such as synchronization processing, gradation conversion processing, white balance adjustment, edge processing, etc., on the image data read out from the image sensor 105. The image data that has been subjected to the image processing is recorded on a recording medium provided in a recording device 113 that is detachable from the camera body 20.
[0030] A motion vector calculation circuit 111a is disposed within the image processing circuit 111. The motion vector calculation circuit 111a calculates the motion vector of the subject using multiple image data read out from the image sensor 105. The motion vector indicates the direction and magnitude of the subject's motion within the image. The motion vector calculation circuit 111a outputs the motion vector to the camera-side CPU 107. The amount of movement of the camera may be calculated based on the motion vector within the AF target or the periphery of the shooting screen (see, for example, FIG. 6). The motion vector calculation circuit 111a functions as a position change detection unit that detects a position change of the focus detection device. The position change detection unit detects the position change by the motion vector based on the output of the image sensor (see, for example, FIG. 6).
[0031] The display device 112 has a display panel arranged on the rear surface of the camera body 20 and / or an electronic viewfinder that allows a monitor to be observed through an eyepiece. A live view image, a playback image of a recorded image, a menu screen, etc. are displayed on this display panel or electronic viewfinder.
[0032] The recording device 113 has an electrically rewritable storage medium. The storage medium may be loadable into the camera body, or may be fixed to the camera body. The image data that has been subjected to image processing is recorded on this recording medium. The recording device 113 also reads out the recorded image data.
[0033] The operation unit 114 is an interface for the user to input instructions to the camera, and has operation members such as a release button, a power switch, and a touch panel. The release button has a first release switch that is turned on when the user presses it halfway, and a second release switch that is turned on when the user presses it all the way. The operation unit 114 detects the operation state of the operation members, and outputs the detection result to the camera-side CPU 107. When the user operates the operation unit 114, the camera-side CPU 107 controls the AF evaluation value calculation circuit 108, the angular velocity detection circuit 109, the AE evaluation value calculation circuit 110, the image processing circuit 111, the memory 115, etc. based on this operation state, and performs focus adjustment, exposure control, image processing, etc. For example, when the first release switch is turned on, photometry and distance measurement are started, and when the second release switch is turned on, main exposure is started (see S3 and S5 in FIG. 2). Furthermore, the user can operate the operation unit 114 to set various modes, such as a C-AF (continuous AF) mode or a continuous shooting mode.
[0034] The memory 115 is an electrically rewritable non-volatile memory, and stores programs used by the camera-side CPU 107. The memory 115 also stores various adjustment values and the like used in the camera.
[0035] Next, the C-AF control (focus adjustment operation) in this embodiment will be described with reference to the flowcharts shown in Figures 2 to 7. This flow is executed by the camera-side CPU 107 controlling each part and circuit shown in Figure 1 based on a program stored in memory 114. Note that this flow shows the operation when the continuous shooting mode and C-AF (continuous AF) mode are set.
[0036] When the user presses the release button halfway, the first release press flow shown in FIG. 2 starts, and first, contrast C-AF control is executed (S1). In contrast AF, the AF evaluation value calculation circuit 108 calculates an AF evaluation value corresponding to the contrast of the image each time one frame of image data is output while moving the focus lens, and the position of the focus lens where this AF evaluation value is at its peak is set as the in-focus position. In contrast C-AF control, even if the focus lens reaches the in-focus position, contrast AF control is repeatedly performed, and even if the subject moves, the focus lens is controlled so that it is always at the in-focus position. In step S1, a live view is displayed on the display device 112 based on the image data acquired by the image sensor 105. In this way, contrast C-AF control continuously focuses on the subject, and therefore the subject is displayed in live view in a focused state. The detailed operation of this contrast C-AF control will be described later with reference to FIG. 3A and FIG. 3B.
[0037] In step S1, after contrast C-AF control is performed, it is next determined whether or not the second release has been pressed (S3). When the user determines that he or she has decided to compose the image and perform actual shooting, he or she fully presses the release button in the operation unit 114. When the release button is fully pressed, a second release switch ON signal is output to the camera-side CPU 107. In this step, it is determined whether or not the second release has been pressed based on the state of the second release switch. If the result of this determination is that the second release has not been pressed, the process returns to step S1, and contrast C-AF control is performed.
[0038] On the other hand, if the result of the determination in step S3 is that the second release is pressed, the main exposure process is executed (S5). Here, the aperture 101 is narrowed down to the set aperture value, and the mechanical shutter is once closed, then remains open for the set shutter time, and then closes. During this shutter time, the subject image formed on the image sensor 105 is photoelectrically converted, and the image sensor 105 outputs image data. The image processing circuit 111 processes the image data, and the recording device 113 records the image data that has been subjected to the image processing. Note that if the camera 20 does not have a mechanical shutter, the exposure time is controlled by an electronic shutter.
[0039] When the main exposure process in step S5 is completed, it is next determined whether the second release is open (S7). When the main exposure is completed, if the user wishes to end photography, the release button is released from its fully pressed state. In this case, the second release switch is turned off. Furthermore, if the user also releases the half-pressed state, the first release switch is turned off, i.e., the second release is released.
[0040] If the result of the determination in step S7 is that the second release is not released and the first release switch is still on, the process returns to step S1, the contrast C-AF control continues, the subject is tracked and focused, and a live view display is performed. If the second release is pressed down, the main exposure process is performed. If the second release switch is on when the determination in step S7 is made, continuous shooting is performed under C-AF control. On the other hand, if the result of the determination in step S7 is that the second release is released, this flow ends.
[0041] Next, the detailed operation of the contrast C-AF control in step S1 will be described with reference to the flowcharts shown in FIG. 3A and FIG. 3B. When the flow of the contrast C-AF control in FIG. 3A starts, first, the scan speed is calculated (S11). In contrast C-AF, the focus lens is moved by a predetermined amount (see FIG. 8 and FIG. 9), and the AF evaluation value calculation circuit 108 calculates the AF evaluation value every time one frame of image data is output. In this step, the camera-side CPU 207 calculates the scan speed when moving the focus lens. This scan speed is set to a value such that the scan drive amount per one period of the vertical synchronization signal of the image sensor is a predetermined multiple of Fδ. Here, F is the aperture value of the aperture 101, and δ is the allowable circle of confusion diameter.
[0042] After the scan speed is calculated, the focus lens is then driven to its initial position (S13). Here, the camera-side CPU 107 calculates an initial position by shifting the focus lens position from the current position of the focus lens by an amount equal to a second predetermined multiple of Fδ, and drives the focus lens to the initial position via the lens-side CPU 104.
[0043] Once the focus lens has been driven to the initial position, scan drive is then started (S15). Here, the camera-side CPU 107, via the lens-side CPU 104, starts scan drive of the focus lens from the initial position (see S13) toward the subject estimated position at the calculated scan speed (see S11). The subject estimated position is a predicted position based on moving object prediction for a moving subject, as described below. If the result of moving object prediction has not yet been generated, the position is set to a predetermined distance away from the initial position.
[0044] Once scan driving has started, an AF evaluation value is then acquired (S17). Here, the AF evaluation value calculation circuit 108 calculates an AF evaluation value using image data from the image sensor 105, and outputs the AF evaluation value to the camera-side CPU 107. The camera CPU 107 associates the acquired AF evaluation value with the focus lens position and time information, and saves and holds this in the memory 115 for each frame of the image data as AF evaluation value history data.
[0045] Next, focus detection is performed (S19). Here, the camera side CPU 107 uses the AF evaluation value history data to determine that the focus position has been detected if the rate of decline from the maximum value of the AF evaluation value is equal to or greater than a predetermined value, and determines that the focus position has not been detected if this condition is not met. Then, information on whether the focus position has been detected or not is added to the AF evaluation value, focus lens position, and time information for each frame of the AF evaluation value history data, and stored in the memory 115.
[0046] Next, it is determined whether or not the in-focus position has been detected (S21). Here, the camera-side CPU 107 determines whether or not the in-focus position has been detected based on the detection result in step S19.
[0047] If it is determined in step S21 that the in-focus position has not been detected, a scan drive limit determination is performed (S25). Here, the camera-side CPU 107 determines whether or not to limit the scan drive range while performing scan drive. That is, the position difference and time difference from the time when the in-focus position was detected last time to the present are obtained, and if this time difference is within the scan drive limit duration and the position difference is equal to or greater than the drive limit distance, the scan drive limit is activated. At this time, the length of the drive limit duration is determined according to the magnitude of the angular velocity detected by the angular velocity detection circuit 109. The detailed operation of this scan drive limit determination will be described later with reference to FIG. 4.
[0048] After the scan drive limit determination is performed, it is next determined whether or not the drive limit has been reached (S27). Here, the camera-side CPU 107 makes the determination based on whether the drive limit has been activated in step 25 (see S57 in FIG. 4) or has not been activated (see S59 in FIG. 4).
[0049] If the drive limit has not been activated as a result of the determination in step S27, the process waits for the acquisition of the next AF evaluation value (S29). Here, the AF evaluation value calculation circuit 108 waits until it is in a state where it can calculate the AF evaluation value for the next frame from the image sensor 105. When it is in a state where it is possible to acquire the next AF evaluation value, the process proceeds to the above-mentioned step S17. In this way, if the in-focus position cannot be detected during the scan operation (S21 No) and the drive limit has not been activated (S27 No), the process loop of steps S29, S17, S19, S21 No, S25, and S27 No is repeatedly executed until the in-focus position can be detected (S21 Yes). On the other hand, if the drive limit has been activated as a result of the determination in step S27 as to whether or not the drive limit has been activated, the process proceeds to return.
[0050] Returning to step S21, if the result of the determination in step S19 is that in-focus is detected, then a detailed in-focus position is calculated (S23). Here, the camera-side CPU 107 calculates the AF evaluation value peak position by quadratic function approximation using the AF evaluation values and focus lens positions of a total of three points, the frame with the maximum AF evaluation value and the frames before and after that. The in-focus time is also calculated by linear interpolation. The focus lens position corresponding to the AF evaluation value peak position is the in-focus position.
[0051] After the in-focus position is calculated in step S23, the in-focus history is updated (S31). Here, when the in-focus position is calculated in step S23, the calculated in-focus position and time information are saved and held as history data for each focusing. This history data is recorded in memory 115.
[0052] After updating the focusing history, next, a moving object prediction calculation is performed (S33). Here, the camera-side CPU 107 refers to the focusing history, and predicts the focusing position at the actual exposure time (see S5 in FIG. 2) by using the past focusing positions and their times by using least squares approximation.
[0053] After the moving object prediction calculation is performed, it is next determined whether the second release switch is on or not (S34). If the result of this determination is that the second release switch is on (S34 Yes), the focus lens is driven to the in-focus position (S35). Here, the camera-side CPU 107 drives the focus lens via the lens-side CPU 104 to the in-focus position calculated by the moving object prediction calculation in step S33. Once the focus lens has been driven to the in-focus position, or if the second release switch is off (S34 No), the contrast C-AF control flow ends and the original flow is returned to.
[0054] Next, the detailed operation of the scan drive limit determination in step S25 (see FIG. 3A) will be described with reference to the flow chart shown in FIG. 4. When the subject is out of focus from the AF target due to the subject being out of focus, it is difficult to continue focusing on the subject even if the scan operation is continued by C-AF. On the other hand, when the subject is in front of the camera and moves back rapidly, the subject is unlikely to be out of focus, and it is possible to continue focusing by tracking the subject by continuing the scan operation by C-AF. Therefore, in this embodiment, the time for continuing the restriction of the scan drive range is changed based on the amount of movement of the camera such as during a panning operation. In the scan drive limit determination in FIG. 4, whether or not to activate the scan drive limit is set.
[0055] When the flow of scan drive limit determination in Fig. 4 starts, first, the X and Y movement amounts are determined (S41). Here, it is determined whether the X and Y movement amounts, which are the amounts of movement in the X (horizontal) direction and Y (vertical) direction, are large or small based on the amount of movement of the camera body detected by the angular velocity detection circuit 109. Detailed operations of this X and Y movement amount determination will be described later with reference to Fig. 5. Note that, in addition to detecting the physical amount of movement of the camera by the angular velocity detection circuit 109, the X and Y movement amount determination may be performed based on a motion vector calculated based on image data (see Fig. 6), or based on the luminance value of the subject (see Fig. 7).
[0056] After the X, Y movement amount determination is performed in step S41, it is next determined whether the X, Y movement amount is large or not (S43). In the X, Y movement amount determination, it is determined whether the X, Y movement amount is large or small (see S73 and S75 in FIG. 5), so in this step, the camera side CPU 107 makes a determination based on this determination result.
[0057] If the result of the determination in step S43 is that the X and Y movement amounts are large, a long value is set for the drive limit duration (S45). If the X and Y movement amounts are large, it is assumed that the user is panning the camera body to track the subject in order to capture it within the AF target. In such a case, the subject is likely to be out of focus, and it is effective to limit the scan drive range, so the camera-side CPU 107 sets the time for limiting the scan drive range, i.e., the drive limit duration, to a relatively long time.
[0058] On the other hand, if the X and Y movement amounts are small, the drive limit duration is set to a short-time value (S47). If the X and Y movement amounts are small, it is assumed that the user is holding the camera firmly and aiming at the subject, or that the user is aiming at a subject in a situation where the panning movement is small, such as shooting a scene of a Tarzan rope or a swing where the subject is rapidly retreating at a close range. In such a case, the subject does not go out of focus, so it is not very effective to limit the scan drive range, and therefore the camera-side CPU 107 sets the drive limit duration to a relatively short time. It is of course possible for the short-time value of the drive limit duration to be 0.
[0059] After the drive limit duration value is set in step S45 or S47, the time difference is calculated from the difference between the current time during the scan operation and the previous in-focus time (S49). The previous in-focus time is the time when the in-focus position was detected during the previous scan operation, and is stored in memory 115. Here, the camera-side CPU 107 calculates "time difference = current time - previous in-focus time". In C-AF control, if the peak of the AF evaluation value can be detected, the time when this in-focus position was detected is recorded (see S19 in FIG. 3A). In this step S49, the difference between the most recent time when the in-focus position was detected and the current time is calculated, that is, the elapsed time from the time when the most recent in-focus position was detected is calculated.
[0060] After calculating the time difference in step S49, the camera CPU 107 next determines whether the time difference is equal to or greater than the drive limit duration (S51). Here, the camera CPU 107 determines whether the time difference calculated in step S49 is equal to or greater than the drive limit duration set in step S45 or S47.
[0061] If the result of the determination in step S51 is that the time difference is less than the duration, then the position difference is calculated from the absolute value of the difference between the previous in-focus position and the current position (S53). Here, the camera-side CPU 107 calculates "position difference = | previous in-focus position - current position |". The previous in-focus position is the in-focus position (focus lens position) detected in the most recent scan operation, and the current position is the current focus lens position during the scan operation. In this embodiment, if the elapsed time from the previous in-focus time to the current time is less than the drive limit duration, the scan drive range from the previous in-focus position is limited to the limit distance. In this step, in order to determine whether to limit the scan drive range, it is calculated how far the current focus lens position is from the position where the previous in-focus was detected.
[0062] After the position difference is calculated in step S53, it is next determined whether the position difference is equal to or greater than the limit distance (S55). Here, the camera CPU 107 determines whether the position difference calculated in step S53 is equal to or greater than the limit distance. When a user is using a panning operation to track a subject in an AF target, even if the subject moves out of the AF target, the subject is often at approximately the same distance. Therefore, the limit distance may be set appropriately taking into account the above-mentioned circumstances. For example, the limit distance is set to a scan drive distance (scan speed x number of frames) for 5 to 9 frames.
[0063] If the result of the determination in step S55 is that the position difference is equal to or greater than the limit distance, the drive limit is set to be activated (S57). When the drive limit is set to be activated, the position of the focus lens is limited to a position that is a limit distance from the most recent in-focus position, and the scan drive that is in progress is stopped (see the out-of-subject section and the time limit Tlim in FIG. 9(b)).
[0064] If the result of the determination in step S55 is that the position difference is less than the limit distance, or if the result of the determination in step S51 is that the time difference is equal to or greater than the drive limit duration, the drive limit is set to not be activated (S59). If the drive limit is set to not be activated, the process proceeds to step S29 as a result of the determination in step S27 of Fig. 3A, where the process waits for the acquisition of an AF evaluation value and executes focus detection (see S19, S21). If the drive limit is not activated, the process repeats the acquisition of an AF evaluation value and focus detection, and if the focus position is detected by focus detection (S19) (S21 Yes), the focus position is calculated (see S23), a moving object prediction calculation is performed (see S33), and if the 2nd release is fully pressed, the focus lens is driven to the focus position (see S35).
[0065] When the drive limit is set to be applied in step S57, or when the drive limit is set to be not applied in step S59, the flow of scan drive limit determination is ended, and the originating flow is returned to.
[0066] In this way, in the flow of scan drive limit determination, the X and Y movement amounts are determined based on the angular velocity information obtained for each frame recorded as history data (see S41, and S61 and S64 in FIG. 5 described later). If the X and Y movement amounts based on the angular velocity within a certain period are equal to or greater than a threshold (large panning and tilting), the drive limit duration is lengthened (see S45). If the angular velocity within a certain period is smaller than the threshold (large panning and tilting) the drive limit duration is shortened (see S47). If the elapsed time from the previous focusing time to the current time is less than the drive limit duration (No in S51), and if the position difference from the previous focusing position to the current position is equal to or greater than the drive limit distance, the drive is limited to the limit distance from the previous focusing position (Yes in S55, see S57). Also, if the elapsed time from the previous focusing position to the current time is equal to or greater than the drive limit duration, the drive limit is released and the AF operation can be performed by following the subject by scan drive (Yes in S51, see S59).
[0067] In Fig. 4, the X and Y movement amounts are classified into two values, large and small (S41, 43), but more classifications may be provided. Depending on the classification, the drive limit duration may be set to multiple time values between the long-term value and the short-term value. Also, in Fig. 4, there is one duration (S51) and one limit distance (S55), but multiple durations and limit distances may be provided and selected and switched according to the shooting conditions and shooting parameters such as the focal length and aperture value of the shooting lens.
[0068] Next, the detailed operation of the X, Y movement amount determination in step S41 (see FIG. 4) will be described with reference to the flowchart shown in FIG. 5. When the flow of X, Y movement amount determination starts, first, the angular velocity is acquired (S61). Here, the angular velocity detection circuit 109 detects the angular velocity according to the movement of the camera body during exposure for one frame, and outputs the detection result to the camera-side CPU 107.
[0069] Next, the angular velocity is added to the history data (S64). History data indicating the focus position, focus time, etc. is recorded in memory 115 (see S31 in FIG. 3B). In this step, the camera-side CPU 107 records the angular velocity acquired in step S61 and the time (corresponding to the frame). Note that this history data may be different from the history data recording the focus position, etc.
[0070] Next, the average value of angular velocities within a predetermined number of frames is calculated (S67). Here, the camera-side CPU 107 reads out the angular velocities corresponding to the predetermined number of frames recorded in step S64 from the history data, and calculates the average value of the read angular velocities. When the user performs panning photography, the rate of change of the movement may not be constant, so the average value of angular velocities corresponding to the predetermined number of frames is calculated.
[0071] Next, it is determined whether the average value of the angular velocity is equal to or greater than a threshold value (S71). Here, the camera-side CPU 107 determines whether the average value of the angular velocity calculated in step S67 is equal to or greater than a threshold value. When the user is performing panning photography, the average value of the angular velocity detected by the angular velocity detection circuit 109 becomes large. The threshold value used for this determination may be a value that can determine whether panning photography is being performed. The threshold value is set to, for example, 2 to 4 degrees / second. On the other hand, when photographing a child playing with a Tarzan rope, the user points the camera in almost the same direction, so the average value of the angular velocity does not become greater than the threshold value.
[0072] If the result of the determination in step S71 is that the average value of the angular velocity is equal to or greater than the threshold, the X and Y movement amounts are set to large (S73). When the X and Y movement amounts are set to large, a long-term value is set as the drive limit duration in the flow of scan drive limit determination (see FIG. 4) (see S45 in FIG. 4).
[0073] On the other hand, if the result of the determination in step S71 is that the average value of the angular velocity is less than the threshold, the X and Y movement amounts are set to small (S75). When the X and Y movement amounts are set to small, a short-time value is set as the drive limit duration in the flow of scan drive limit determination (see FIG. 4) (see S47 in FIG. 4).
[0074] Once the X, Y movement amounts have been set in step S73 or S75, the flow for determining the X, Y movement amounts ends, and the originating flow is returned to.
[0075] Next, a detailed operation of a modified example of X,Y movement amount determination in step S41 (see FIG. 4) will be described with reference to the flow chart shown in FIG. 6. In the flow shown in FIG. 5, the movement of the camera is detected by an angular velocity detection circuit 109 having a gyro or the like. In contrast, in the flow shown in FIG. 6, a motion vector is calculated using image data acquired by the imaging element 105, and the movement of the camera is detected based on this motion vector.
[0076] 6 starts, first, a motion vector around the screen is acquired (S62). Here, the motion vector calculation circuit 111a in the image processing circuit 111 calculates a motion vector around the screen based on image data acquired by the imaging element 105.
[0077] Next, the motion vector is added to the history data (S65). In this step, the camera-side CPU 107 records the motion vector acquired in step S62 and its time (corresponding to the frame).
[0078] Next, the average value of the absolute values of the motion vectors within a predetermined number of frames is calculated (S68). Here, the camera-side CPU 107 reads out the motion vectors corresponding to the predetermined number of frames recorded in step S65 from the history data, and calculates the average value of the read motion vectors. When the user performs panning photography, the rate of change of the motion may not be constant, so the average value of the absolute values of the motion vectors corresponding to the predetermined number of frames is calculated.
[0079] Next, it is determined whether the average value of the absolute values of the motion vectors is equal to or greater than a threshold value (S71). Here, the camera-side CPU 107 determines whether the average value of the absolute values of the motion vectors calculated in step S67 is equal to or greater than a threshold value. When the user is performing panning photography, the average value of the absolute values of the motion vectors calculated by the motion vector calculation circuit 111a becomes large. The threshold value used for this determination may be a value that can determine whether panning photography is being performed or not, as in the case of FIG. 5. The threshold value is set to the absolute value of the motion vectors corresponding to an angular velocity of 2 to 4 degrees / second, for example.
[0080] If the result of the determination in step S71 is that the average value of the motion vector is equal to or greater than the threshold, the X and Y movement amounts are set to large (S73). When the X and Y movement amounts are set to large, a long value is set as the drive limit duration in the flow of scan drive limit determination (see FIG. 4) (see S45 in FIG. 4).
[0081] On the other hand, if the result of the determination in step S71 is that the average value of the motion vector is less than the threshold, the X and Y movement amounts are set to small (S75). When the X and Y movement amounts are set to small, a short-time value is set as the drive limit duration in the scan drive limit determination flow (see FIG. 4) (see S47 in FIG. 4).
[0082] Once the X, Y movement amounts have been set in step S73 or S75, the flow for determining the X, Y movement amounts ends, and the originating flow is returned to.
[0083] Next, the detailed operation of the second modified example of the X, Y movement amount determination in step S41 (see FIG. 4) will be described with reference to the flow chart shown in FIG. 7. In the flow chart shown in FIG. 5, the movement of the camera is detected by an angular velocity detection circuit 109 having a gyro or the like, and in the flow chart shown in FIG. 6, the movement vector calculation circuit 111a calculates a movement vector using image data acquired by the image sensor 105, and the movement of the camera is detected based on this movement vector. In contrast, in the flow chart shown in FIG. 7, the movement of the camera is detected using the subject brightness value detected by the AE evaluation value calculation circuit 108.
[0084] 7 starts, first, the brightness value of the periphery of the screen is acquired (S63). Here, the AE evaluation value calculation circuit 110 calculates the subject brightness value of the periphery of the screen based on the image data acquired by the image sensor 105.
[0085] Next, the brightness value is added to the history data (S66). In this step, the camera-side CPU 107 records the brightness value acquired in step S63 and the time (corresponding to the frame).
[0086] Next, the maximum value of the brightness value change rate within the predetermined number of frames is calculated (S69). Here, the camera-side CPU 107 calculates the brightness value change rate within the predetermined number of frames recorded in step S66, and calculates the brightness value with the maximum change rate among these brightness value change rates. When the user performs panning photography, the change rate of the movement may not be constant, so the change rate when the change is the largest among the predetermined number of frames is calculated. In other words, if the camera is moved significantly, the brightness value change rate also increases, so the largest value among the brightness value change rates is detected.
[0087] Next, it is determined whether the maximum value of the brightness change rate is equal to or greater than a threshold value (S72). Here, the camera-side CPU 107 determines whether the brightness value at the maximum brightness change rate calculated in step S69 is equal to or greater than a threshold value. When the user is performing panning photography, the brightness calculated by the AE evaluation value calculation circuit 110 changes significantly. On the other hand, when photographing a child playing with a Tarzan rope, the change in brightness is not large. The threshold value used for this determination may be a value that can determine whether panning photography is being performed or not, as in the case of FIG. 5. For example, the threshold value is set to 30 to 50%.
[0088] If the result of the determination in step S72 is that the maximum value of the luminance change rate is equal to or greater than the threshold value, the X, Y movement amount is set to large (S73). When the X, Y movement amount is set to large, a long value is set as the drive limit duration in the flow of scan drive limit determination (see FIG. 4) (see S45 in FIG. 4).
[0089] On the other hand, if the result of the determination in step S72 is that the maximum value of the luminance change rate is less than the threshold, the X, Y movement amount is set to small (S75). When the X, Y movement amount is set to small, a short-time value is set as the drive limit duration in the flow of scan drive limit determination (see FIG. 4) (see S47 in FIG. 4).
[0090] When the X and Y movement amounts are set in step S73 or S75, the flow of X and Y movement amount determination is ended and the original flow is returned to. Although one type of threshold (S71, 72) is used in each of Figs. 5 to 7, multiple thresholds may be provided. Classification may be performed using multiple thresholds, and multiple intermediate values may be provided between large and small X and Y movement amounts corresponding to the classification, and selected. Furthermore, multiple thresholds may be stored in advance for each of the thresholds in Figs. 5 to 7, and selected and switched according to the shooting conditions and shooting parameters such as the focal length and aperture value of the shooting lens. Furthermore, the X and Y movement amounts may be determined by combining multiple types of methods rather than employing each of the methods in Figs. 5 to 7 individually.
[0091] Next, the C-AF control in this embodiment will be described with reference to Figs. 8 to 10. In this embodiment, a drive limit duration is set, which is a time for limiting the scan drive range according to a predetermined condition (see S27 Yes in Fig. 3A and Fig. 4). A scene in which it is desired to limit the scan drive range is a scene in which the subject moves out of the AF target (subject out of focus). For example, the subject moves out of the AF target, and only the background remains within the AF target (also called background out). On the other hand, when a scene in which a child is playing with a Tarzan rope is photographed from the front, if the child approaches and then rapidly retreats (also called rapid retreat), the subject does not move out of the AF target and remains within the AF target. In this case, there is little need to limit the scan drive range.
[0092] The above-mentioned scene of background loss and rapid retreat will be described in detail with reference to FIG. 8. FIG. 8(a) shows the case of a scene of background loss. The user is shooting a child with the camera 20a pointed at him. The child is moving across in front of the user, and at time T1, the child is in the position indicated by 30a, and at time T2, the child is in the position indicated by 30b. Therefore, the user pans the camera 20a from the direction of 30a to capture the child within the AF target, and at time T2, the camera 20a is facing the direction of 30b. If the camera 20a is in focus at time T1, and then the child moves out of the AF target of the camera 20a and the background comes in, the contrast value of the image acquired within the AF target will be reduced.
[0093] FIG. 8(b) shows a scene of rapid retreat. The user points the camera 20a at a child playing with a Tarzan rope. At time T3, the child is at position 31a, approaches the camera 20a, and at time T4, the child is at position 31b. In this manner, the child rapidly approaches the camera 20a from time T3 to time T4, and after time T4, the child rapidly retreats away from the camera 20a. If the child rapidly approaches the camera 20a by time T4 and then rapidly retreats, the contrast value of the image acquired within the AF target will decrease, although the child is captured within the AF target.
[0094] A case where the scan drive range needs to be limited is a scene where the subject has moved away from the AF target, as shown in FIG. 8(a). However, in contrast AF, this situation cannot be determined based on the AF evaluation value (contrast value). In other words, background loss and rapid retreat appear to have the same effect on the decrease in the AF evaluation value. However, in terms of user usage scenes, the subject moving away from the AF target often occurs when the user is chasing the subject to capture it as the AF target, that is, when panning or tilting (see FIG. 8(a)). On the other hand, when shooting a Tarzan rope or swing scene from the front, where the subject is rapidly retreating, the subject is unlikely to move away from the AF target, and panning or tilting is rarely performed (see FIG. 8(b)).
[0095] In this embodiment, focusing on the above-mentioned points, the period during which the scan driving range is limited is changed according to the change in the position of the camera body. Furthermore, as shown in FIG. 8(a), when the change in the position of the camera is large, the period during which the scan driving range is limited is lengthened so that the scan driving range can be limited and waited for the time required for the user to capture the subject again as the AF target after the subject has moved away. Then, after the user captures the subject as the AF target again, the restriction on the scan driving range is released so that AF can be performed by following the movement of the subject. On the other hand, as shown in FIG. 8(b), when the change in the position of the camera is small, the period during which the scan driving range is limited is shortened (in an extreme case, the period is set to 0), so that AF can be performed by immediately tracking the subject captured as the AF target even if it moves back rapidly.
[0096] Next, the C-AF control in the case of background loss will be described with reference to FIG. 9. FIG. 9 is the same as FIG. 8(a) described above, and shows a case where, for example, a child running a race is photographed from the side, causing the subject to be out of focus. In the graph of FIG. 9, the horizontal axis indicates the flow of time, and the vertical axis indicates the position of the focus lens. In addition, panning is performed over the entire time period on the horizontal axis, and the angular velocity applied to the camera body is large. Furthermore, the solid line Sub indicates the position of the subject (which is replaced by the position of the focus lens on the graph).
[0097] FIG. 9(a) shows an example in which the scan driving range in this embodiment is not limited. In this example, the in-focus positions Fin1 to Fin3 are determined from time t1 to a little before time t4, but the period from time t4 to time t6a is an out-of-subject period, resulting in a large blur and making it impossible to find an in-focus position. The out-of-subject period indicates the time during which the child (subject Sub) is out of the AF target while the user is performing a panning operation to capture the moving child (subject Sub) within the AF target. The out-of-subject period is expected to be about 1 second, including various individual differences of users with respect to a general scene. At time t6, a scan Sc6 is performed and an in-focus position Fin6 is found, but this only detects the in-focus position for the background and does not detect the in-focus position for the subject Sub.
[0098] In FIG. 9(a), when the out-of-subject section ends at time t6a, that is, when the user captures a child (subject Sub) within the AF target again, the focus lens is scanned to detect the in-focus position of the subject Sub. However, since the number of frames corresponding to one scan drive is set to, for example, about 15 frames, the subject Sub at a focus position far away from the focus lens position at time t6a can be focused from the in-focus position Fin10 obtained as a result of the scan Sc10 from time t10. Thus, in the example shown in FIG. 9(a), when shooting a foot race from the side, if the subject suddenly goes out of sight (out-of-subject), the focus is set on something other than the subject (background), and even if the user captures the subject within the AF target again, it takes a considerable amount of time to focus on the subject.
[0099] FIG. 9(b) shows an example in which the scan drive range is limited in this embodiment and a time limit (drive limit duration) Tlim for limiting the scan drive range is set. In this example, from time t1 to a little before time t4, the focus positions Fin1 to Fin3 are detected and confirmed by each scan drive operation. From time t4 to time t7a, as in the case of FIG. 9(a), the subject is out of focus, and while the user performs a panning operation to capture a moving child (subject Sub) within the AF target, the child (subject Sub) is out of focus and becomes greatly blurred. Since the camera is panned, the scan drive range is limited to an upper limit Dulim and a lower limit Ddlim. During this period, that is, during the time limit (drive limit duration) Tlim, the scan drive range is limited so that the scan drive is not performed to a focus position corresponding to the background.
[0100] The correspondence with the scan drive limit determination in FIG. 4 will be described. Since a pan operation is performed, it is determined that the X and Y movement amounts are large (S43 Yes), and the drive limit duration is set to a long value (S45). Then, within the drive limit duration Tlim (S49, S51 Yes), the scan drive range is limited between the upper limit Dulim and the lower limit Ddlim (see S53, S55 Yes in FIG. 4), the drive limit is activated (see S57 in FIG. 4 and S27 in FIG. 3A), and the scan drive range is limited to within the limit distance from the previous focus position. That is, within the drive limit duration Tlim, the focus lens can only move within the limited scan drive range. Therefore, unlike the case of FIG. 9(a), the scan drive to detect the focus position of the background is not performed, and the scan drive range is limited and the focus lens is positioned near the position of the subject Sub.
[0101] At time t7a, the out-of-subject period ends, meaning that the subject is captured within the AF target again. When this state is reached and the time limit (drive limit duration Tlim) has elapsed at time t7b, it becomes possible to focus on the subject by a scan operation using the unrestricted scan drive range, and it becomes possible to detect and track the focus positions Fin8, Fin9, ... and the focus positions of the subject.
[0102] In this way, in the example shown in FIG. 9(b), when a scene of a foot race is shot and the subject moves out of the AF target (subject out), the user pans the camera to try to capture the subject within the AF target. When this camera movement is detected, the scan drive range is limited, so that the focus lens can be positioned near the in-focus position of the subject before the subject was lost. When the user captures the subject within the AF target again and a time limit (drive limit duration Tlim) longer than the time estimated as the subject out-of-focus section has elapsed, the limit on the scan drive range is released, and the subject can be quickly brought into focus. The long-term value of the drive limit duration Tlim is set to, for example, 1.1 to 1.5 seconds. This long-term value may be changed according to the shooting conditions and shooting parameters.
[0103] Next, the C-AF control in the case of a scene where rapid retreat occurs will be described with reference to FIG. 10. FIG. 10 is the same as the case of FIG. 8(b) described above, and shows a case where a child (subject) playing on a Tarzan rope or a swing is photographed from the front, and the subject approaches and then rapidly retreats. In the graph of FIG. 10, the horizontal axis indicates the flow of time, and the vertical axis indicates the position of the focus lens. In addition, there is no panning operation over the entire time period on the horizontal axis, and the angular velocity applied to the camera body is small. Furthermore, the solid line Sub indicates the position of the subject (which is replaced by the position of the focus lens on the graph).
[0104] Fig. 10(a) shows an example of the characteristic process in this embodiment, which does not limit the scan driving range and does not set a time limit Tlim for limiting the scan driving range based on a detected pan operation. In this example, in order to avoid the problem shown in Fig. 9(a) caused by the subject being out of focus, the scan driving range is limited and the time limit for limiting the scan driving range is fixed to a long value. Therefore, it is not possible to follow the rapid retreat of the subject. From time t14 to t16, the subject approaches rapidly, and from time t16 to t19, the subject retreats rapidly. Until time t16, the subject is driven to scan between the upper limit Dulim and the lower limit Ddlim of the scan driving range, and the focus position of the subject is detected (see detected focus positions Fin11 to Fin16).
[0105] After the subject approaches closest at time t16, the subject rapidly retreats, but the focus position at time t17 is predicted to be closer than Fin16 by a moving object prediction calculation based on the information of the detected focus positions Fin11 to Fin16, and a corresponding scan drive range is set and scan drive is performed (Sc17). However, since the subject Sub is rapidly retreating, the focus position cannot be detected by the scan drive Sc17. At time t21, the time limit (long time value) of the scan drive range has elapsed and the limit of the scan drive range is released. However, the position of the subject Sub at time t21 is far from the scan drive range (Dulim to Ddlim) at time t20, and it takes a considerable amount of time to focus on the subject Sub.
[0106] Fig. 10(b) shows an example of limiting the scan driving range and setting a time limit (drive limit duration) Tlim for limiting the scan driving range based on a detected pan operation, which is a characteristic process in this embodiment. In this example, since there is no pan operation or the pan operation is small, the period for limiting the scan driving range is shortened to a short time value (S43 No, S47 in Fig. 4). From time t11 to t16, in the same way as Fig. 10(a), in-focus positions Fin11 to Fin16 are detected by following the approaching movement of the subject Sub.
[0107] At time t16, the focus position at t17 is predicted to be closer than Fin16 by a moving object prediction calculation based on the information of the detected focus positions Fin11 to Fin16, and a corresponding scan drive range is set and scan drive is performed (Sc17). However, after time t16, the subject Sub moves backward rapidly, so the focus position cannot be detected by the scan drive Sc17. Then, since the focus position cannot be detected (S21 No in FIG. 3A), the drive limit is activated (S49, S51 No, S53, S55 Yes, S57 in FIG. 4) by the scan drive limit judgment (S25 in FIG. 3A), and the scan drive is limited by the upper limit Dulim of Dlim (S27 Yes in FIG. 3A).
[0108] After time t17, the limit of the scan driving range is applied, and a short period (short period including 0: see S47 in FIG. 4) is set as Tlim from around the previous detection focusing time t16. The limit of the scan driving range is released (the driving limit is not activated) by detecting the passage of Tlim (see S49, S51 Yes, S59 in FIG. 4), and the position of the object Sub is detected. That is, the scan driving range is limited to the focus movement range (limit distance Dlim) centered on the previous detection focusing position Fin16, but since the limit period Tlim is a short period (short period value), the limit of the scan driving range can be released and the object can be tracked quickly. In the example shown in FIG. 10(b), the limit period (driving limit duration) Tlim is a short period (short period value), and after this period has passed, at time t19, the focusing position Fin17 can be detected by the scan driving SC19. The short period value of the driving limit duration Tlim is set to, for example, 0 to 0.2 seconds. This short-time value may be changed depending on the imaging conditions, imaging parameters, and the like.
[0109] 10(b), in a scene in which a subject such as a child playing on a Tarzan rope or a swing is photographed, the subject is in front of the camera, and when the distance from the camera changes rapidly, the subject remains captured within the AF target, so the camera does not move significantly. When it is detected that the camera movement is small, the period for limiting the scan drive range is set to a short period (a short period value including 0), so that the limit on the scan drive range is released after the short period value has elapsed, and focus detection can be quickly resumed and the subject can be focused, even if the subject moves backward rapidly.
[0110] As described above, the focus detection device according to one embodiment and modification of the present invention has an image sensor (see, for example, image sensor 105 in FIG. 1) that photoelectrically converts the subject light passing through the photographing optical system and outputs an image signal, and performs focus detection by calculating an evaluation value indicating contrast based on the image signal while performing a scan operation that changes the focus of the image sensor (see, for example, S15 to S23 in FIG. 3A). As a focus detection method in this focus detection device, a change in the position of the focus detection device is detected (see, for example, S25 in FIG. 3A and S41 in FIG. 4), a duration that limits the focus movement range of the scan operation is set based on this position change (see, for example, S25 in FIG. 3A and S45 and S47 in FIG. 4), and focus detection is performed by limiting the focus movement range of the scan operation based on the duration (see, for example, S51, S57, and S59 in FIG. 4 and S27 in FIG. 3A). Therefore, in this embodiment, AF can track even if the subject retreats rapidly. In other words, even when limiting the focus movement range of the scan operation, the time for which the limit is applied is changed based on the change in position of the focus detection device, so that the AF can track regardless of the state of the subject (even if the subject retreats rapidly).
[0111] Furthermore, in one embodiment and its modified example, the greater the change in position of the focus detection device, the longer the duration for which the focus movement range of the scan operation is limited (see, for example, S43 to S47 in FIG. 4). If the user moves the position of the focus detection device significantly, it takes time for the user to capture the subject, whereas if the position of the focus detection device is not moved significantly, the subject is captured without any change. In this way, the time limit for the focus movement range is changed according to the change in position of the focus detection device, which allows AF to track regardless of the state of the subject.
[0112] Furthermore, in one embodiment and modified example of the present invention, if the time elapsed from the previous focusing time to the current time is less than the duration, the focus movement range from the previous focusing position is limited to a predetermined amount (see, for example, S49 to S57 in FIG. 4). That is, for a predetermined time (duration) after the focus lens focuses, the movement range of the focus lens is limited to a predetermined amount (limit distance). For this reason, the focus lens does not move significantly during the predetermined time (duration), and if the subject is within the AF target (or returns) after the predetermined time has elapsed, the subject is quickly brought into focus.
[0113] In the embodiment and modification of the present invention, circuits such as the angular velocity detection circuit 109 and the motion vector calculation circuit 111a are provided as the position change detection unit. However, since the position change detection unit can perform any one of angular velocity detection, motion vector detection, and brightness value detection, the unused detection may be omitted. In the embodiment and modification of the present invention, the position change detection unit can perform any one of angular velocity detection, motion vector detection, and brightness value detection, but the position change may be detected by combining these. Therefore, it is sufficient to have at least one of the angular velocity detection circuit, the motion vector calculation circuit, and the brightness value calculation circuit that detects the position change of the focus detection device.
[0114] In addition, in one embodiment of the present invention and the modified example, the AF evaluation value calculation circuit 108, the angular velocity detection unit 109, the AE evaluation value calculation circuit 110, the image processing circuit 110, and the like are provided in addition to the camera-side CPU 107. However, this is not limiting, and all or part of these circuits may be incorporated into the peripheral circuits of the camera-side CPU 107. In addition, instead of these hardware circuits, they may be configured in a software manner using a CPU and a program, or may be configured with hardware such as a gate circuit generated based on a program language described in Verilog, or may be configured using a DSP (Digital Signal Processor). Of course, these may be combined as appropriate. In addition, they are not limited to a CPU, and any element that functions as a controller may be used.
[0115] Furthermore, the CPU in the camera-side CPU 107 may be any element that functions as a controller. The processing of each of the above-mentioned circuits may be performed by one or more processors configured as hardware. For example, each unit may be a processor configured as an electronic circuit, or each circuit unit in a processor configured as an integrated circuit such as an FPGA (Field Programmable Gate Array). Alternatively, a processor configured with one or more CPUs may execute the function of each unit by reading and executing a computer program recorded on a recording medium.
[0116] In addition, in this embodiment, a digital camera has been used as the device for photographing, but the camera may be a digital single-lens reflex camera, a mirrorless camera, a compact digital camera, a video camera such as a video camera or a movie camera, or a camera built into a mobile phone, a smartphone, a personal digital assistant, a personal computer (PC), a tablet computer, a game device, etc., a medical camera (for example, a medical endoscope), a camera for scientific equipment such as a microscope, an industrial endoscope, a camera mounted on an automobile, or a surveillance camera. In any case, the present invention can be applied to any device that performs focusing by contrast AF.
[0117] In addition, among the technologies described in this specification, the controls mainly described in the flowcharts can often be set by a program, and may be stored in a recording medium or a recording unit. The method of recording on this recording medium or recording unit may be recording at the time of product shipment, using a distributed recording medium, or downloading via the Internet.
[0118] In addition, in one embodiment of the present invention, the operation of this embodiment is explained using a flowchart, but the order of the processing procedure may be changed, any step may be omitted, steps may be added, and the specific processing content within each step may be changed.
[0119] Furthermore, even if the operational flow in the claims, specification, and drawings is described using words expressing an order such as "first" and "next" for convenience, this does not mean that it is necessary to carry out the operations in this order unless specifically explained.
[0120] The present invention is not limited to the above-described embodiment, and can be embodied by modifying the components without departing from the gist of the invention in the implementation stage. In addition, various inventions can be formed by appropriately combining the multiple components disclosed in the above-described embodiment. For example, some of the components shown in the embodiment may be deleted. Furthermore, components from different embodiments may be appropriately combined. [Explanation of symbols]
[0121] 10 lens unit, 20 camera body, 100 photographing lens, 101 aperture, 102 lens / aperture drive motor, 103 motor drive circuit, 104 lens CPU, 105 imaging element, 106 imaging control / signal processing circuit, 107 camera CPU, 108 AF evaluation value calculation circuit, 109 angular velocity detection circuit, 110 AE evaluation value calculation circuit, 111 image processing circuit, 111a motion vector calculation circuit, 112 display device, 113 recording device, 114 operation unit, 115 memory
Claims
1. A focus detection device has an image sensor that performs photoelectric conversion on subject light passing through an image pickup optical system to output an image signal, and performs focus detection by calculating an evaluation value indicating contrast based on the image signal while performing a scanning operation that changes the focus of an image pickup surface of the image sensor, a position change detection unit that detects a position change of the focus detection device; a duration setting unit that sets a duration for limiting a focus movement range of the scanning operation based on the position change; a control unit that performs focus detection by limiting a focus movement range of the scanning operation based on the duration time; Equipped with the duration setting unit sets the duration to be longer as the position change is larger; A focus detection device comprising:
2. the control unit repeatedly executes the scanning operation and, when focusing is detected, acquires a focusing time and a focusing position, and, when the elapsed time from the previous focusing time to the current time is less than the duration, limits a focus movement range from the previous focusing position to a predetermined amount.
2. The focus detection device according to claim 1.
3. the control unit cancels the restriction on the focus movement range from the previous focus position when the elapsed time from the previous focus time to the current time is equal to or longer than the duration time.
3. The focus detection device according to claim 2.
4. The position change detection unit has an angular velocity detection unit and detects the position change based on an angular velocity.
4. The focus detection device according to claim 1, wherein the focus detection device is a focus detection device having a focus detection function.
5. the position change detection unit detects a motion vector based on an output of the imaging element, and detects the position change based on the detected motion vector.
4. The focus detection device according to claim 1, wherein the focus detection device is a focus detection device having a focus detection function.
6. the position change detection unit detects a luminance change based on an output of the imaging element, and detects the position change based on the detected luminance change.
4. The focus detection device according to claim 1, wherein the focus detection device is a focus detection device having a focus detection function.
7. A focus detection method for a focus detection device having an image sensor that performs photoelectric conversion on subject light passing through a photographing optical system and outputs an image signal, the focus detection device calculating an evaluation value indicating contrast based on the image signal output from the image sensor while performing a scanning operation that changes the focus of an image pickup surface of the image sensor, the method comprising: Detecting a change in position of the focus detection device; setting a duration for limiting a focus movement range of the scanning operation based on the position change; performing focus detection by limiting a focus movement range of the scanning operation based on the duration; The greater the position change, the longer the duration.
23. A focus detection method comprising:
Citation Information
Patent Citations
Automatic focus device, imaging device and camera system
JP2003051980A
Focus controller, focus control method, imaging apparatus and program
JP2008046181A
Data processing apparatus, data processing method, and program
JP2009069551A
Electronic camera
JP2009157130A
Automatic focusing device and control method therefor
JP2010049176A
