Focus controller, imaging apparatus, and focus control method
The focus control device addresses misfocus and switch operation errors by adjusting the focus lens drivable range based on user instructions, enabling accurate focus adjustment.
Patent Information
- Application Number
- JP2024079797
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2025-11-28
AI Technical Summary
Existing focus adjustment methods, such as those using phase difference detection, risk misfocus at the start position and are ineffective when switches are mistakenly operated, leading to inappropriate search operations.
A focus control device with a focus detection means, control means, and setting means that adjusts the drivable range of the focus lens based on user instructions and lens position, allowing for appropriate search operations even when switch directions are changed.
Enables accurate and appropriate focus adjustment by setting the drivable range of the focus lens, ensuring quick and effective focusing on the desired subject.
Smart Images

Figure 2025173924000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to focus control. [Background technology]
[0002] Some imaging devices perform a search operation to move a focus lens to search for a focus position. Patent Document 1 discloses a device that includes first and second switches, and when the first switch is turned on, a search process is performed on the long distance side with the current lens position as the end point on the short distance side. When the second switch is turned on, a search process is performed on the short distance side with the current lens position as the end point on the long distance side. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Application Laid-Open No. 2007-164051 Summary of the Invention [Problem to be solved by the invention]
[0004] However, the method disclosed in Patent Document 1 is premised on focus adjustment using a contrast detection method. If the method of Patent Document 1 were applied to focus adjustment using a phase difference detection method, there is a risk that the amount of defocus near the start position of the search operation would be detected and the lens would refocus at the start position of the search operation based on the amount of defocus.
[0005] Furthermore, Patent Document 1 does not take into consideration the case where the first switch and the second switch are mistakenly operated, which may result in a situation where an appropriate search operation cannot be performed to quickly focus on a subject that the user desires.
[0006] The present invention provides a focus control device that is capable of performing an appropriate search operation during focus adjustment. [Means for solving the problem]
[0007] A focus control device as one aspect of the present invention comprises a focus detection means for performing focus detection, a control means for controlling the drive of a focus lens included in an optical system based on the focus detection result obtained by the focus detection, and a setting means for setting a drivable range based on a search direction of the focus lens in accordance with a user's instruction and a position of the focus lens, wherein when a first search direction is instructed and then a second search direction different from the first search direction is instructed, the setting means sets the drivable range based on the second search direction and the first focus lens position when the first search direction is instructed. [Effects of the Invention]
[0008] According to the present invention, an appropriate search operation can be performed in focus adjustment. [Brief explanation of the drawings]
[0009] [Figure 1] FIG. 1 is a block diagram showing a configuration of an imaging device. [Figure 2] FIG. 2 is a diagram showing a pixel array of an imaging element. [Figure 3] 1A and 1B are a plan view and a cross-sectional view of a pixel; [Figure 4] FIG. 2 is a diagram illustrating pupil division. [Figure 5] FIG. 2 is a diagram illustrating the relationship between an image sensor and pupil division. [Figure 6] FIG. 10 is a diagram illustrating the relationship between the defocus amount and the image shift amount. [Figure 7] 10 is a flowchart showing an imaging process. [Figure 8] 10 is a flowchart showing a search AF process. [Figure 9] 10 is a flowchart showing a process for calculating a driveable range of a focus lens. [Figure 10] FIG. 2 is a diagram showing the positional relationship between a subject and a background. [Figure 11]FIG. 10 is a diagram showing signals of a subject and a background. [Figure 12] FIG. 10 is a diagram showing the relationship between the focus lens position and the defocus amount. [Figure 13] FIG. 10 is a diagram showing the relationship between the search direction, search start position, focus lens position, focus driveable range, defocus amount, and focus lens drive amount when a search direction instruction is given and then the same search direction instruction is given again. [Figure 14] FIG. 10 is a diagram showing the relationship between the search direction, search start position, focus lens position, focus driveable range, defocus amount, and focus lens drive amount when a search direction instruction is given and then a search direction instruction is given again in the opposite direction. DETAILED DESCRIPTION OF THE INVENTION
[0010] Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
[0011] (Embodiment 1) The imaging system 10 of the first embodiment shown in FIG. 1 is an interchangeable-lens single-lens reflex digital camera system capable of image-plane phase-difference detection autofocus (hereinafter referred to as image-plane phase-difference AF). This embodiment and the second embodiment described below are applicable to lens-integrated digital cameras and digital video cameras, as well as various imaging devices such as terminal devices such as tablets and smartphones, surveillance cameras, in-vehicle cameras, and medical cameras. Furthermore, the imaging system is not limited to image-plane phase-difference AF, and other focus detection methods may be employed as long as information regarding the subject distance can be obtained. For example, a ToF (Time of Flight) method is considered, in which light (infrared light or laser) is emitted, hits the subject, reflects, and returns to calculate the distance. Another possible method is to attach an RFID (Radio Frequency Identification) tag or UWB (Ultra-Wideband) tag to the subject, and an antenna receives a signal from the tag to identify the subject's location.
[0012] <Device configuration> The imaging system 10 is made up of a lens unit 100 and a camera body 120 serving as an imaging device. The lens unit 100 is detachably connected to the camera body 120 via a mount M indicated by the dotted line in the center of the figure.
[0013] The lens unit 100 has an imaging optical system including a first lens group 101, an aperture 102, a second lens group 103, and a focus lens group (hereinafter referred to as a focus lens) 104.
[0014] The first lens group 101 is disposed closest to the object in the lens unit 100 and is held so as to be able to move back and forth in the optical axis direction OA. Hereinafter, the optical axis direction OA is referred to as the Z direction, and the direction in which the subject is viewed from the camera side is referred to as the positive direction. In this embodiment, the origin 0 of the Z direction axis corresponds to the position of an image sensor 122 in the camera body 120, which will be described later.
[0015] The aperture 102 adjusts the amount of light by changing its opening diameter. The aperture 102 also functions as a mechanical shutter that controls exposure time when capturing still images. The aperture 102 and second lens group 103 can move together in the optical axis direction OA, and by moving in conjunction with the first lens group 101, a zoom function is achieved.
[0016] The focus lens 104 is movable forward and backward in the optical axis direction OA, and the subject distance (focusing distance) at which the lens unit 100 focuses changes depending on the position of the focus lens 104. In this embodiment, autofocus is achieved by controlling the position of the focus lens 104 in the optical axis direction OA.
[0017] The lens unit 100 has a drive / control system (including devices, circuits, program code, and the like). The drive system of the drive / control system includes a zoom actuator 111, an aperture / shutter actuator 112, a focus actuator 113, a zoom driver 114, an aperture / shutter driver 115, and a focus driver 116. The control system that controls the drive system includes a lens MPU 117 and a lens memory 118.
[0018] The zoom actuator 111 drives the first lens group 101 and the second lens group 103 forward and backward in the optical axis direction OA, thereby performing zoom control to change the angle of view of the imaging optical system. The iris / shutter actuator 112 controls the aperture diameter of the iris 102 to adjust the amount of light, and controls the opening and closing operation of the iris 102 to control the exposure time during imaging. The focus actuator 113 drives the focus lens 104 forward and backward in the optical axis direction OA to perform autofocus, and also has a function of detecting the current position (actual position) of the focus lens 104.
[0019] A zoom driver 114 drives the zoom actuator 111 in response to a user's zoom operation or a control value of a lens MPU 117. An aperture / shutter driver 115 drives the aperture / shutter actuator 112. A focus driver 116 drives the focus actuator 113.
[0020] The lens MPU 117 performs calculations related to the imaging optical system and controls the zoom driver 114, the aperture / shutter driver 115, the focus driver 116, and the lens memory 118. The lens MPU 117 can exchange commands and data with the camera MPU 125 via the mount M. For example, the lens MPU 117 detects the current position of the focus lens 104 and notifies the camera MPU 125 of lens position information in response to a request from the camera MPU 125. The lens position information includes information such as the position of the focus lens 104 in the optical axis direction OA, the position and diameter of the exit pupil in the optical axis direction OA, and the position and diameter of the lens frame that limits the luminous flux of the exit pupil.
[0021] The lens MPU 117 also controls the zoom driver 114, the aperture / shutter driver 115, and the focus driver 116 in response to a request from the camera MPU 125. Optical information necessary for the image plane phase-difference AF of this embodiment is pre-stored in the lens memory 118. The lens memory 118 also stores, for example, a defocus map indicating the correspondence between the position and movement amount of the focus lens 104 and the defocus amount. The defocus map is generated by calculating the defocus amount at each pixel position of the image sensor 122, which will be described later. Upon receiving a request from the camera MPU 125 to change the defocus amount by a predetermined amount, the lens MPU 117 refers to the defocus map stored in the lens memory 118. The lens MPU 117 then controls the focus actuator 113 to move the focus lens 104 by a distance corresponding to the predetermined amount.
[0022] The camera MPU 125 controls the operation of the lens unit 100 by executing programs stored in the ROM 125a, the lens memory 118, etc. The lens memory 118 also stores optical information about the imaging optical system, etc.
[0023] Camera body 120 has optical low-pass filter 121, image sensor 122, and a drive / control system (described later). Optical low-pass filter 121 reduces false colors and moire in captured images.
[0024] The image sensor 122 is configured, for example, with a CMOS image sensor and its peripheral circuitry. The CMOS image sensor has a photoelectric conversion element provided in each pixel that receives light, and has a pixel group (image sensor surface) in which a plurality of unit pixels are arranged two-dimensionally, with each pixel acting as a unit pixel. The image sensor 122 has a plurality of focus detection pixels that receive light beams that pass through different pupil regions of the image sensor, and each pixel can output an independent signal. This makes it possible to detect (calculate) the amount of defocus using image sensor surface phase-difference AF. The image sensor 122 also has a plurality of image sensors that each receive a light beam that passes through the entire exit pupil of the image sensor that forms an image of the subject, and generate an image signal of the subject.
[0025] The drive / control system of the camera body 120 includes an image sensor drive unit 123, an image processing unit 124, a camera MPU 125, a display unit 126, operation switches 127, a memory 128, and a phase difference AF unit 129. It also includes an AE unit 130, a white balance adjustment unit 131, and a subject detection unit 132.
[0026] The image sensor driver 123 controls the charge accumulation operation of the image sensor 122, converts image signals read from the image sensor 122 into digital signals, and sends them to the camera MPU 125. The image processor 124 performs various image processing such as gamma conversion, color interpolation, and JPEG compression on the image signals read from the image sensor 122. The image processor 124 also generates signals for image plane phase difference AF (focus detection signals), signals for exposure adjustment, signals for white balance adjustment, and signals for subject detection, which will be described later.
[0027] The camera MPU 125 serving as control means is a computer having at least one microprocessor. The camera MPU 125 performs calculations related to the camera body 120 and controls the image sensor drive unit 123, image processing unit 124, display unit 126, operation switches 127, memory 128, and phase difference AF unit 129. The camera MPU 125 can communicate with the lens MPU 117 via signal lines arranged in the mount M. This allows the camera MPU 125 to issue requests to the lens MPU 117 to acquire the lens position, requests to zoom, aperture, or lens drive at a predetermined drive amount, and requests to acquire optical information specific to the lens unit 100.
[0028] The camera MPU 125 has built-in ROM 125a that stores a program for controlling the operation of the camera, RAM 125b that stores variables, and EEPROM 125c that stores various parameters. The camera MPU 125 reads out the program stored in ROM 125a, loads it into RAM 125b, and executes focus adjustment processing, subject detection processing, exposure adjustment processing, and white balance adjustment processing in accordance with the program.
[0029] Display unit 126 has a display device such as an LCD (liquid crystal) panel or organic EL display, and displays various information related to the operation mode set in camera body 120. The operation modes include a still image shooting mode, a video shooting mode, and a playback mode in which captured images stored in memory 128 are played back.
[0030] The operation switches 127 include a shutter switch, a power switch, a zoom switch, a mode switch, a search switch (instruction means), etc. The memory 128 is a flash memory that is detachable from the camera and records captured images. Note that, although the present embodiment will be described using the operation switch 127 as a search instruction means, the present invention is not limited to the operation switch 127. For example, a ring member that can be rotated by the user may be attached to the outer periphery of the lens barrel, and information on the amount of operation (rotation direction and amount) may be notified from the lens MPU 117 to the camera MPU 125, thereby determining whether a search instruction has been issued. The search instruction includes an instruction to start search AF processing and an instruction on the search direction (the direction in which the focus lens 104 is driven).
[0031] The phase-difference AF unit 129, which serves as a focus detection means, performs focus detection using an image plane phase-difference detection method based on focus detection signals, which are a pair of image signals having parallax between them and used for focus detection, obtained from the image sensor 122 and the image processing unit 124. Specifically, the image processing unit 124 performs a correlation operation on a pair of phase-difference image data generated from the pair of focus detection signals to calculate the amount of image shift (phase difference) between the pair of phase-difference image data. The image shift amount is then converted into a defocus amount to detect the defocus amount. The phase-difference AF unit 129 performs focus adjustment (AF) processing to control the position of the focus lens 104 using the detected defocus amount (focus detection result). Note that the phase-difference AF unit 129 may perform focus detection using a phase-difference detection method using a focus detection sensor separate from the image sensor 122, rather than using the image plane phase-difference detection method.
[0032] The phase difference AF section 129 in this embodiment has a signal generation block 129a that generates first and second focus detection signals, which will be described later, and a calculation block 129b that calculates the phase difference between the first and second focus detection signals and further calculates a defocus amount from the phase difference. Note that at least a part of the phase difference AF section 129 (a part of the signal generation block 129a or the calculation block 129b) may be provided in the camera MPU 125. The AF processing (focus control processing) performed by the camera MPU 125 and the phase difference AF section 129 will be described later. The camera MPU 125 and the phase difference AF section 129 form a focus control device.
[0033] The subject detection unit 132 performs subject detection processing based on the subject detection signal generated by the image processing unit 124 to detect the type, part, and state of the subject (detection type), the position and size of the subject (detection area), and the like.
[0034] The AE unit 130 controls the exposure conditions by performing photometry based on exposure adjustment signals obtained from the image sensor 122 and the image processing unit 124. Specifically, it calculates the exposure amount at the currently set aperture value, shutter speed, and ISO sensitivity, and calculates appropriate aperture value, shutter speed, and ISO sensitivity for image capture based on the difference between the calculated exposure amount and a predetermined appropriate exposure amount, and sets these as exposure conditions. This realizes automatic exposure control (AE).
[0035] The white balance adjustment unit 131 performs white balance adjustment processing based on white balance adjustment signals obtained from the image sensor 122 and the image processing unit 124. Specifically, it adjusts color weighting based on the difference between white balance parameters obtained from the white balance adjustment signals and predetermined appropriate white balance parameters. This achieves automatic white balance adjustment (AWB).
[0036] The camera body 120 of this embodiment can perform AF, AE, and AWB in combination with subject detection, and can select the position within the imaging range where AF, AE, and AWB are performed according to the subject detection results.
[0037] <Image sensor configuration> Fig. 2 shows the array of imaging pixels in the image sensor 122 as a two-dimensional CMOS sensor in a range of 4 columns x 4 rows, and the array of focus detection pixels in a range of 8 columns x 4 rows. In the 2 columns x 2 rows imaging pixel group 200 shown in Fig. 2, an imaging pixel 200R having a spectral sensitivity of R (red) is arranged in the upper left, imaging pixels 200G having a spectral sensitivity of G (green) are arranged in the upper right and lower left, and an imaging pixel 200B having a spectral sensitivity of B (blue) is arranged in the lower right. Furthermore, each imaging pixel is made up of a first focus detection pixel 201 and a second focus detection pixel 202 arranged in a 2 columns x 1 row.
[0038] By arranging a large number of such imaging pixel groups 200 on the imaging surface, it is possible to obtain a captured image and a focus detection signal.
[0039] Fig. 3(a) shows one imaging pixel (hereinafter simply referred to as pixel) 200G of the imaging element 122 shown in Fig. 2, viewed from the light receiving surface side (+z side) of the imaging element 122. Fig. 3(b) shows a cross section of the aa cross section of Fig. 3(a) viewed from the -y side.
[0040] Pixel 200G is provided with a microlens 305 for collecting incident light, and a photoelectric conversion unit 301 and a photoelectric conversion unit 302 that are divided into two in the x direction. The photoelectric conversion unit 301 and the photoelectric conversion unit 302 correspond to the first focus detection pixel 201 and the second focus detection pixel 202 shown in FIG. 2, respectively.
[0041] The photoelectric conversion units 301 and 302 may be pin structure photodiodes in which an intrinsic layer is sandwiched between a p-type layer and an n-type layer, or may be pn junction photodiodes in which the intrinsic layer is omitted. In the pixel 200G, a color filter 306 is provided between the microlens 305 and the photoelectric conversion units 301 and 302. The spectral transmittance of the color filter may be different for each photoelectric conversion unit, or the color filter may be omitted.
[0042] Light incident on pixel 200G is collected by microlens 305, dispersed by color filter 306, and then received by photoelectric conversion unit 301 and photoelectric conversion unit 302. In photoelectric conversion unit 301 and photoelectric conversion unit 302, pairs of electrons and holes are generated according to the amount of received light, and after being separated by a depletion layer, the negatively charged electrons are accumulated in the n-type layer, while the holes are discharged to the outside of image sensor 122 through a p-type layer connected to a constant voltage source (not shown).
[0043] The electrons stored in the n-type layers of the photoelectric conversion units 301 and 302 are transferred to the capacitance unit (FD) via the transfer gate and converted into a voltage signal.
[0044] Fig. 4 shows the correspondence between the pixel structure and pupil division of the image sensor 122 shown in Fig. 3. Fig. 4 shows a cross section of the pixel structure of the image sensor 122 shown in Fig. 3(a) viewed from the +y side and the pupil plane (pupil distance Ds) of the image sensor 122. Note that in Fig. 4, the x-axis and y-axis of the cross section of the image sensor 122 are shown inverted compared to Fig. 3 in order to correspond to the coordinate axes of the pupil plane of the image sensor 122.
[0045] 4, the first pupil partial region 501 is a region that can receive light by the first focus detection pixel 201, and is generally conjugate by the microlens 305 with the light receiving surface of the photoelectric conversion unit 301, whose center of gravity is decentered in the -x direction. The second pupil partial region 502 is a region that can receive light by the second focus detection pixel 202, and is generally conjugate by the microlens with the light receiving surface of the photoelectric conversion unit 302, whose center of gravity is decentered in the +x direction. Also in Fig. 4, the pupil region 500, which includes the first and second pupil partial regions 501, 502, is a region that can receive light by the entire pixel 200G, which includes the photoelectric conversion units 301, 302 (first and second focus detection pixels 201, 202).
[0046] 5, light beams that pass through a first pupil partial region 501 and a second pupil partial region 502 that are different from each other in a pupil region 500 of the imaging optical system are incident on pixels on the imaging plane 800 at different angles from each other and are received by a first focus detection pixel 201 and a second focus detection pixel 202. While Fig. 5 shows an example in which the pupil region is divided into two in the horizontal direction, the pupil may also be divided in the vertical direction.
[0047] A first focus detection signal is generated by combining photoelectric conversion signals from the first focus detection pixels 201 of multiple pixels, and a second focus signal is generated by combining photoelectric conversion signals from the second focus detection pixels 202. An image pickup signal with a resolution of the effective pixel number N is generated by adding the photoelectric conversion signals from the first and second focus detection pixels 201, 202 at each pixel. The second focus detection signal may also be generated by subtracting the first focus detection signal from the image pickup signal.
[0048] In the above description of the image sensor 122, a plurality of photoelectric conversion units are provided for each microlens, and focus detection signals and image generation signals are output from the photoelectric conversion units. However, the present invention is not limited to this. For example, the image sensor 122 may be configured to include image capture pixels used for image generation and focus detection pixels used for focus adjustment.
[0049] <Relationship between defocus amount and image shift amount> FIG. 6 shows the relationship between the defocus amount and the image shift amount between the first and second focus detection signals. As shown in FIG. 5, the pupil region of the imaging optical system is divided into a first pupil partial region 501 and a second pupil partial region 502. The defocus amount d is the distance from the imaging position of the subject image to the imaging plane 800, |d|, and a front-focus state in which the subject image is formed on the subject side of the imaging plane 800 is indicated by a negative sign (d<0). A back-focus state in which the subject image is formed on the opposite side of the imaging plane 800 from the subject side is indicated by a positive sign (d>0). In FIG. 6, subject 801 represents a subject in a focused state (d=0), and subject 802 represents a subject in a front-focus state (d<0). The front-focus state (d<0) and back-focus state (d>0) are collectively referred to as a defocus state (|d|>0).
[0050] In a front-focus state (d<0), light beams from the subject 802 that pass through the first and second pupil partial regions 501 and 502 are focused once and then spread to widths Γ1 and Γ2 around the center of gravity positions G1 and G2 of the light beams, respectively, forming blurred images on the imaging surface 800. First and second focus detection signals are generated when the blurred images are received by the first and second focus detection pixels 201 and 202. Therefore, the first and second focus detection signals are recorded as subject images of the subject 802 blurred to widths Γ1 and Γ2 at the center of gravity positions G1 and G2 on the imaging surface 800, respectively. The blur widths Γ1 and Γ2 of the subject image increase approximately proportionally as the magnitude of the defocus amount d, |d|, increases. Similarly, the magnitude |p| of the image shift amount p (the difference G1-G2 in the center of gravity positions of the light beams) between the first and second focus detection signals also increases roughly in proportion to the magnitude |d| of the defocus amount d. The same is true in the back-focus state (d>0), except that the direction of the image shift between the first and second focus detection signals is opposite to that in the front-focus state.
[0051] The phase difference AF unit 129 converts the amount of image shift into a defocus amount d using a conversion coefficient calculated based on the distance (baseline length) between the first and second focus detection pixels 201, 202, since the amount of image shift between the first and second focus detection signals increases as the amount of defocus increases.
[0052] <Image capture processing> The flowchart in FIG. 7 shows the imaging process that the camera MPU 125 executes in accordance with a program in this embodiment.
[0053] In step S701, the camera MPU 125 causes the phase-difference AF unit 129 to perform focus detection based on the focus detection signal output from the image sensor, and acquires the defocus amount and its reliability as the focus detection result. Note that the defocus amount includes the defocus direction. At the same time, the camera MPU 125 also generates a captured image based on the image signal output from the image sensor and displays it on the display unit 126.
[0054] Next, in step S702, the camera MPU 125 determines whether or not an AF instruction has been issued, and if an AF instruction has been issued, the process proceeds to step S703, and if an AF instruction has not been issued, the process proceeds to step S704.
[0055] In step S703, the camera MPU 125 executes normal AF (image plane phase difference AF) processing and sets the drive amount of the focus lens 104 (hereinafter referred to as the focus drive amount) according to the defocus amount acquired in step S701. Then, the process proceeds to step S706.
[0056] In step S704, the camera MPU 125 determines whether a search instruction has been issued by the user operating the search switch of the operation switch 127. In this embodiment, a case will be described in which a search direction instruction is issued again after a search direction instruction has been issued. Details of the search direction instruction operation will be described later. If a search instruction has been issued, the process proceeds to step S705, and if a search instruction has not been issued, the process proceeds to step S701.
[0057] In step S705, the camera MPU 125 executes search AF processing, and then proceeds to step S706. The search AF processing will be described later.
[0058] In step S706, the camera MPU 125 transmits the focus drive amount set in step S703 or step S705 to the lens MPU 117 to drive the focus lens 104.
[0059] In step S707, the camera MPU 125 determines whether the imaging optical system is in focus on the subject, and if it is determined that it is in focus, the process proceeds to step S708, and if it is determined that it is not in focus, the process proceeds to step S701.
[0060] In step S708, the camera MPU 125 captures an image for recording, and when the image capture is completed, this process ends.
[0061] <Search AF processing> 8 shows the search AF process (focus control method) executed in step S705. In the search AF process, a search operation (hereinafter simply referred to as a search) is performed to perform focus detection at a predetermined cycle while moving the focus lens 104 to search for the in-focus position of the focus lens 104. Then, the focus lens 104 is moved to the in-focus position identified by the search.
[0062] In step S801, the camera MPU 125 acquires the search direction in the search instruction determined in step S704 of FIG.
[0063] Next, in step S802, the camera MPU 125 acquires the current position (search start position) of the focus lens 104 from the lens MPU 117.
[0064] Next, in step S803, camera MPU 125 calculates the driveable range of focus lens 104 (hereinafter referred to as focus driveable range). The calculation of the focus driveable range will be described later.
[0065] Next, in step S804, the camera MPU 125 determines whether the defocus amount acquired in step S701 of FIG. 7 is for a position within the focus-driveable range calculated in step S803. In other words, it determines whether the target position of the focus lens 104 when driving the focus lens 104 by a focus drive amount based on the defocus amount is within the focus-driveable range. If a defocus amount for a position within the focus-driveable range has been obtained (the target position is within the focus-driveable range), the process proceeds to step S805, and if the defocus amount is not for a position within the focus-driveable range, the process proceeds to step S806. Here, if the reliability of the defocus amount is low and it is not usable, it is determined that the defocus amount is not within the focus-driveable range.
[0066] In step S805, the camera MPU 125 sets the focus driving amount based on the defocus amount acquired in step S701, and then ends this process.
[0067] In step S806, the camera MPU 125 sets a predetermined focus drive amount in the search direction obtained in step S801 without using the defocus amount obtained in step S701. The predetermined focus drive amount is the drive amount during search, and may be set according to the focus detection cycle, shooting distance, aperture value, imaging mode, etc. After step S806, this process ends.
[0068] <Calculation of focus driving range> The calculation of the focus drivable range in step S803 of Fig. 8 will be described. Fig. 10 shows the positional relationship between the subject and the background. The subject is located close to the imaging system 10, and the background is located sufficiently far from the imaging system 10.
[0069] 11(a) and (b) show a signal indicating the subject (hereinafter referred to as the subject signal) and a signal indicating the background (hereinafter referred to as the background signal) acquired from the image sensor 122 when the subject and background are in the positional relationship shown in Fig. 10. Fig. 11(a) shows a subject signal 1102 and a background signal 1101 when the image sensor is focused on the background. Fig. 11(b) shows a subject signal 1104 and a background signal 1103 when the image sensor is focused on the subject. In reality, the subject signal and the background signal are acquired from the image sensor 122 as a signal obtained by adding these together, but here the subject signal and the background signal are shown separately.
[0070] In the background-focused state of FIG. 11(a), the contrast of the background signal 1101 is high and the contrast of the object signal 1102 is very low. Therefore, the background-focused state is heavily influenced by the background signal 1101, and the amount of defocus relative to the background is detected as the focus detection result. On the other hand, in the object-focused state of FIG. 11(b), the contrast of the object signal 1104 is high and the contrast of the background signal 1103 is very low. Therefore, the object-focused state is heavily influenced by the object signal 1104, and the amount of defocus relative to the object is detected as the focus detection result.
[0071] Figure 12 shows the relationship between the focus lens position and the focus detection result when the subject and background are positioned as shown in Figure 10. The horizontal axis represents the focus lens position, and the vertical axis represents the defocus amount. The search direction is from the side with the longest focusing distance (background) to the side with the shortest focusing distance (subject).
[0072] When the focus lens position is near the background in-focus position (1201, 1202), the defocus amount for the background is detected under the significant influence of the background signal, as described above. On the other hand, when the focus lens position is near the subject in-focus position (1203, 1204), the defocus amount for the subject is detected under the significant influence of the subject signal. In the section between the vicinity of the background in-focus position and the vicinity of the subject in-focus position, the contrast of both the background signal and the subject signal is low, so the reliability of the defocus amount is low and it is not possible to detect a defocus amount that can be used for AF.
[0073] 9 shows the process of calculating the focus driveable range by the camera MPU 125. In step S901, a difference x between the search start position of the focus lens 104 acquired in step S802 at the start of search AF (search start) and the current position of the focus lens 104 acquired in step S802 in the current frame is calculated.
[0074] Next, in step S902, it is determined whether the difference x is equal to or less than a predetermined first threshold Th1. If it is equal to or less than the first threshold Th1, the process proceeds to step S903, and if it is not equal to or less than the first threshold Th1, the process proceeds to step S905.
[0075] In step S903, the focus detectable range of the phase difference AF unit 129 is acquired, and further the currently set aperture value and focus sensitivity (optical information of the imaging optical system) are acquired from the lens MPU 117. The focus detectable range is the amount of image blur (amount of spread of the subject image) that can be detected by the phase difference AF unit 129. The focus sensitivity indicates the relationship (ratio) between the unit drive amount of the focus lens 104 and the amount of change in the defocus amount.
[0076] Next, in step S904, an offset amount in the same direction as the search direction obtained in step S801 is calculated based on the difference x calculated in step S901 and the focus detectable range R, aperture value F, and focus sensitivity S obtained in step S903. The offset amount is the drive amount of the focus lens 104 calculated taking into account the case where the search start position is in the opposite direction to the search direction from the background in-focus position, and is calculated, for example, using the following equation (1): α is a predetermined gain value.
[0077] Offset amount = α(R / x)FS If an image blur that exceeds the focus detectable range occurs for a subject near the search start position, focus detection results for that subject cannot be obtained, so there is no need to set an offset amount that will cause an image blur that exceeds the focus detectable range.For this reason, in such cases, the offset amount is set based on the focus detectable range.
[0078] Furthermore, as the current position of the focus lens 104 moves away from the search start position, the possibility that the current position will exceed the background in-focus position increases. For this reason, the offset amount is reduced as the current position moves away from the search start position, so that it is inversely proportional to the difference x between the search start position and the current position, thereby preventing an offset amount from being set that is too large. Note that the aperture value F is used to convert the image blur amount to the defocus amount, and the focus sensitivity is used to convert the defocus amount to the focus drive amount. Note that equation (1) is an example of an equation for calculating the offset amount, and the offset amount may be calculated using other methods. From step S904, the process proceeds to step S909.
[0079] In step S909, the focus driveable range is calculated based on the current position of the focus lens 104, the offset amount calculated in step S904, and the search direction acquired in step S801. The focus driveable range is the range from a position shifted (away) from the current position in the search direction by the offset amount to the drive end (control end or mechanical end) of the focus lens 104 in the search direction. Having calculated the focus driveable range, the camera MPU 125 ends this process.
[0080] Figures 13(a) to (d) show the relationship between the search direction, search start position, focus lens position, focus driveable range, defocus amount, and focus drive amount when a first search direction instruction is issued again after a first search direction instruction has been issued. Figures 14(a) and 14(b) show the relationship between the search direction, search start position, focus lens position, and focus driveable range when a second search direction instruction, which is the opposite direction, is issued after the first search direction instruction has been issued in error. Note that focus positions (current positions) 1201 to 1204 in Figures 13 and 14 correspond to positions 1201 to 1204 shown in Figure 12.
[0081] First, the basic operation after the search direction is specified will be described with reference to FIG.
[0082] FIG. 13(a) shows the state at the start of a search, with the focus lens 104 located at the search start position as the current position 1201. In this state, x (= 0)≦Th1, so an offset amount 1302a is set in the same direction as the search direction based on the focus detectable range, the aperture value, the focus sensitivity, and x (step S904). A focus drivable range 1303a is set in the search direction from a position shifted in the search direction from the search start position by the offset amount 1302a. In this state, a defocus amount 1301a to the background in-focus position is detected. However, the background in-focus position as the target position of the focus lens 104 based on the defocus amount 1301a falls outside the focus drivable range 1303a. Therefore, the defocus amount 1301a is not used, and a predetermined amount for the search is set as the focus drive amount 1304a (step S806).
[0083] In this way, a focus driveable range is set that is shifted in the search direction from the search start position (current position) by the offset amount. This makes it possible to search for the subject focus position without focusing on the background, even if the search start position is in the opposite search direction from the background focus position.
[0084] FIG. 13B shows a state in which the focus lens has moved from the search start position to a current position 1202, which is closer to the subject-focused position than the background-focused position. Since x (>0)≦Th1 holds even in this state, an offset amount 1302b is set in the same direction as the search direction based on the focus detectable range, aperture value, focus sensitivity, and x (step S904). A focus-drivable range 1303b is set in the search direction from a position shifted by the offset amount 1302b from the current position 1202. Note that because x is larger than in the state of FIG. 13A, the offset amount 1302b is smaller than the offset amount 1302a. Even in this state, a defocus amount 1301b to the background-focused position is detected. However, the background-focused position as the target position of the focus lens 104 based on the defocus amount 1301b falls outside the focus-drivable range 1303b. Therefore, the defocus amount 1301b is not used, and a predetermined amount for searching is set as the focus driving amount 1304b (step S806). Note that the focus driving amount 1304b is the same as the focus driving amount 1304a shown in Fig. 13(a), but it may be different, for example, made smaller.
[0085] In this way, a focus driveable range is set that is shifted by the offset amount from the focus lens position after the search starts. This makes it possible to search for the subject in-focus position without focusing on the background, even if the detected defocus amount 1301a is for a position within the focus driveable range (1303a) set at the start of the search.
[0086] In step S905 of FIG. 9, it is determined whether the difference x is equal to or greater than a predetermined second threshold Th2 (>Th1), and if it is equal to or greater than the threshold Th2, the process proceeds to step S906, and if it is not equal to or greater than the threshold Th2, the process proceeds to step S908.
[0087] In step S906, the drive speed and focus detection period of the focus lens 104 are acquired.
[0088] Next, in step S907, an offset amount in the opposite direction to the search direction obtained in step S801 is calculated based on the drive speed and focus detection cycle obtained in step S906, and further based on the difference x calculated in step S901. The offset amount here is set taking into consideration the case where the subject in-focus position is overshot during search due to the relationship between the drive speed v of the focus lens 104 and the focus detection cycle T, and is calculated, for example, using the following equation (2): β is a predetermined gain value.
[0089] Offset amount = βvTx The drive amount of the focus lens 104 between frames in which focus detection is performed is calculated by the product of the drive speed v and the focus detection period T. Because the drive amount of the focus lens 104 between frames represents the maximum amount by which the focus lens 104 overshoots the subject in-focus position, the offset amount is set based on this drive amount. Furthermore, the farther away from the search start position is, the higher the likelihood that the focus lens 104 will overshoot the subject in-focus position. Therefore, by increasing the offset amount in proportion to the difference x between the search start position and the current position of the focus lens 104, it becomes easier to capture the subject in-focus position within the driveable range even in the event of an overshoot. That is, since the possibility of overshooting is low at the start of the search, the range is narrowed to reduce the risk of returning to the background. Then, since the risk of returning to the background decreases and the risk of overshooting increases as the focus lens moves away from the start position, the driveable range is expanded in the search start direction. This makes it easier to bring the subject in-focus position within the driveable range even in the event of an overshoot. The above calculation method for the offset amount is merely an example, and other methods may be used. For example, the offset amount (that is, the focus drivable range) may be set based on only one of the drive speed of the focus lens 104 and the focus detection cycle.
[0090] On the other hand, in step S908, the offset amount is set to 0. Then, the process proceeds to step S909, where the focus driveable range is calculated as described above, and the process ends.
[0091] FIG. 13(c) shows a state in which the focus lens 104 has moved to a current position 1203, which is closer to the subject in-focus position than the state in FIG. 13(b). In this state, x≧Th2, so an offset amount 1302c is set in the direction opposite to the search direction based on the drive speed of the focus lens 104, the focus detection cycle, and the difference x (step S907). A focus drivable range 1303c is set in the search direction from a position shifted by the offset amount 1302c in the direction opposite to the search direction from the current position 1203. In this state, a defocus amount 1301c to the subject in-focus position is detected, and the subject in-focus position as the target position of the focus lens 104 based on the defocus amount 1301c falls within the focus drivable range 1303c. Therefore, a focus drive amount 1304c is set based on the defocus amount 1301c (step S805).
[0092] In this way, the focus driveable range is set in the search direction from a position that is shifted by the offset amount in the opposite direction to the search direction from the current position of the focus lens 104. This makes it possible to drive the focus lens 104 to focus on the subject based on the defocus amount detected at the timing when the subject in-focus position falls within the focus driveable range.
[0093] FIG. 13(d) shows a state in which the focus lens 104 has moved to a current position 1204, past the subject in-focus position. Since x≧Th2 holds even in this state, an offset amount 1302d is set in the direction opposite to the search direction based on the drive speed of the focus lens 104, the focus detection cycle, and the difference x (step S907). A focus drivable range 1303d is set in the search direction from a position shifted by the offset amount 1302d in the direction opposite to the search direction from the current position 1204. Note that because the difference x is larger than in the state of FIG. 13(c), the offset amount 1302d is larger than the offset amount 1302c. In this state, a defocus amount 1301d to the subject in-focus position located in the direction opposite to the search direction is detected, and the subject in-focus position as the target position of the focus lens 104 based on the defocus amount 1301d falls within the focus drivable range 1303d. Therefore, the focus driving amount 1304d is set based on the defocus amount 1301d (step S806).
[0094] In this way, the focus driveable range is set in the search direction from a position that is shifted by the offset amount in the opposite direction to the search direction from the current position of the focus lens 104. This makes it possible to drive the focus lens 104 based on the defocus amount to bring the subject into focus, even if the focus lens 104 passes the subject in-focus position in the search direction.
[0095] Next, we will explain the operation when the first search direction instruction is incorrect and the second search direction instruction is issued again during the search operation with the first search direction instruction, using Figures 14(a) and 14(b). Note that the operation from Figure 14(b) onwards is the same as Figures 13(c) and 13(d).
[0096] FIG. 14(a) shows the state at the start of a search, similar to FIG. 13(a), but the search direction is different from FIG. 13(a). The focus lens 104 is located at the first search start position, which is the current position 1201, where the first search direction instruction was issued. In this state, x (= 0)≦Th1, so an offset amount 1402a is set in the same direction as the search direction based on the focus detectable range, aperture value, focus sensitivity, and x (step S904). The focus drivable range 1403a is set in the search direction from a position shifted in the search direction by the offset amount 1402a from the search start position. In this state, a defocus amount 1401a to the background in-focus position is detected. However, the background in-focus position as the target position of the focus lens 104 based on the defocus amount 1401a falls outside the focus drivable range 1403a. For this reason, the defocus amount 1401a is not used, and a predetermined amount for searching is set as the focus driving amount 1404a (step S806).
[0097] Figure 14(b) shows the operation when the search direction is incorrectly instructed and the search direction is instructed again. Unlike Figure 13(b), this shows a case where the focus lens moves from the search start position to position 1205 on the opposite side of the background in-focus position, and a new search direction is instructed. Unlike Figure 14(a), the direction instructed again is assumed to be from position 1205 toward the subject in-focus position.
[0098] The current position x' at this time is the position when a search direction different from the intended direction is specified and a new search direction is specified. Therefore, an offset amount 1402α is set from the first search start position as the current position 1201 in Figure 14(a) to the second search start position as the current position 1205.
[0099] When a search direction instruction is performed at the second search start position where the second search direction instruction is performed as the current position 1205, the current position x' (>0) is equal to or less than Th1. Therefore, the composite offset amount 1402b is calculated from the offset amount 1402α and an offset amount 1402β that is set in the same direction as the search direction based on the focus detectable range, the aperture value, the focus sensitivity, and x'. The calculated offset amount 1402β is the offset amount 1302a in FIG. 13(a). The focus drivable range 1403b is set in the search direction from a position shifted by the composite offset amount 1402b from the current position 1402.
[0100] Note that although the actual offset amount is larger than that in the state of Fig. 14(a) by offset amount 1402α, the calculated offset amount 1402β is the same. Therefore, the search direction instruction in Fig. 14(b) is the same as that in Fig. 13(a). Note that focus drive amount 1404b is the same as focus drive amount 1404a shown in Fig. 14(a), but may be different, for example, made smaller.
[0101] In this embodiment, a first search direction instruction is given, and then a second search direction instruction is given during the first search operation. However, if the time from when the first search direction instruction is given to when the second search direction instruction is given is within a predetermined time, a search based on the second search direction instruction may be performed.
[0102] As described above, this embodiment devised a method for setting the focus drivable range when the first search direction instruction is erroneously issued and a second search direction instruction is issued again during a search operation based on the first search direction instruction. Specifically, the focus drivable range is set to be offset by an offset amount 1402α from the focus lens position after the start of a search operation based on the second search direction instruction. This makes it possible to search for a subject focus position without focusing on the background, even if the detected defocus amount 1401a is for a position within the focus drivable range (1403b) set at the start of the search. Therefore, appropriate search AF can be performed for the subject desired by the user, allowing for quick focus on the subject.
[0103] (Embodiment 2) Next, a description will be given of embodiment 2. In embodiment 2, in an imaging system 10, the drive speed of the focus lens is controlled in accordance with the imaging method and imaging conditions.
[0104] The configurations and imaging processing of the imaging system 10 and the image sensor 122 of the second embodiment are the same as those of the first embodiment. The positional relationship between the subject and the background, the subject signal and the background signal, and the relationship between the focus lens position and the focus detection result are also the same as those of the first embodiment.
[0105] <Search AF processing> In this embodiment, when driving the focus lens 104, the drive speed is further controlled based on information indicating whether the shooting mode set by the user in the camera MPU 125 is a still image shooting mode or a video shooting mode.
[0106] When the still image shooting mode is selected by the user, the drive speed of the focus lens 104 is set to high because recording is not performed during the search in step S706 of Fig. 7. Then, the camera MPU 125 transmits the set drive speed of the focus lens 104 and the focus drive amount set in step S703 or step S705 to the lens MPU 117, and drives the focus lens 104.
[0107] On the other hand, if the user selects the video shooting mode, the process will be described later.
[0108] First, camera MPU 125 acquires shooting status information indicating whether the camera is in a standby state before the user has set the video shooting mode and video recording has started, or in a recording state after the user has set the video shooting mode and video recording has started, and then controls the drive speed of focus lens 104.
[0109] Specifically, when the shooting state information is in the standby state, no recording is performed, and therefore the drive speed of the focus lens 104 is set to high, as in the case of still image shooting, when the shooting method information is in the recording state. When the shooting state information is in the recording state, the search operation is also recorded, and therefore moving image quality is prioritized, and the drive speed of the focus lens 104 is set to medium to low speed.
[0110] Note that when the shooting method information is video shooting, the speed may be uniformly set to medium to low regardless of the shooting status information. Also, the offset amount 1402α section may be regarded as an unintended section, and the drive speed may be set to high only for the offset amount 1402α section. Furthermore, when the drive speed of the focus lens during video shooting is specified by the user, the specified drive speed may be set.
[0111] As described above, in this embodiment, by controlling the drive speed of the focus lens 104 in accordance with the shooting method information and shooting state information, it is possible to perform a search operation suitable for the still image shooting mode and the video shooting mode.
[0112] (Other Examples) The present invention can also be realized by supplying a program that realizes one or more functions of the above-described embodiments to a system or device via a network or a storage medium, and having one or more processors in the computer of the system or device read and execute the program. It can also be realized by a circuit (e.g., ASIC) that realizes one or more functions.
[0113] The embodiments described above are merely representative examples, and various modifications and alterations are possible to each embodiment when implementing the present invention.
[0114] The above embodiment includes the following configurations.
[0115] (Configuration 1) a focus detection means for performing focus detection; a control unit that controls the driving of a focus lens included in the optical system based on a focus detection result obtained by the focus detection; a setting unit that sets a drivable range based on a search direction of the focus lens and a position of the focus lens in accordance with a user's instruction, The focus control device is characterized in that, when a first search direction is instructed and then a second search direction different from the first search direction is instructed, the setting means sets the drivable range based on the second search direction and the first focus lens position when the first search direction is instructed.
[0116] (Configuration 2) The focus control device according to configuration 1, characterized in that, when the second search direction instruction is given within a predetermined time from the first search direction instruction, the setting means sets the drivable range based on the second search direction and the first focus lens position when the first search direction is instructed.
[0117] (Configuration 3) 2. The focus control device according to configuration 1, wherein the setting means sets the drivable range based on optical information of the optical system.
[0118] (Configuration 4) The focus control device according to any one of configurations 1 to 3, and an image sensor that captures an image of a subject through the optical system.
[0119] (Configuration 5) 5. The imaging device according to configuration 4, wherein the control means changes the drive speed of the focus lens depending on whether the mode is a still image shooting mode or a moving image shooting mode.
[0120] (Configuration 6) The imaging device according to configuration 4, characterized in that when a video shooting mode is set, the control means changes the drive speed of the focus lens depending on whether the device is in a standby state before video recording or in a recording state during video recording.
[0121] (Method 1) a focus detection step for performing focus detection; a control step of controlling the driving of a focus lens included in the optical system based on a focus detection result obtained by the focus detection; a setting step of setting a drivable range based on a search direction of the focus lens and a position of the focus lens in accordance with an instruction from a user, A focus control method characterized in that, in the setting step, if a first search direction is instructed and then a second search direction different from the first search direction is instructed, the drivable range is set based on the second search direction and the first focus lens position when the first search direction was instructed.
[0122] (Program 1) A program for causing a computer to function as each of the means included in the focus control device according to any one of configurations 1 to 3. [Explanation of symbols]
[0123] 100 Lens Unit 104 Focus Lens 120 Camera body 125 Camera MPU 129 Phase difference AF section
Claims
1. a focus detection means for performing focus detection; a control unit that controls the driving of a focus lens included in the optical system based on a focus detection result obtained by the focus detection; a setting unit that sets a drivable range based on a search direction of the focus lens and a position of the focus lens in accordance with a user's instruction, The focus control device is characterized in that, when a first search direction is instructed and then a second search direction different from the first search direction is instructed, the setting means sets the drivable range based on the second search direction and the first focus lens position when the first search direction is instructed.
2. 2. The focus control device according to claim 1, wherein the setting means sets the drivable range based on the second search direction and the first focus lens position when the first search direction is instructed, when the second search direction is instructed within a predetermined time from the first search direction is instructed.
3. 2. The focus control device according to claim 1, wherein the setting means sets the drivable range based on optical information of the optical system.
4. A focus control device according to any one of claims 1 to 3; an imaging element that captures an image of a subject through the optical system.
5. 5. The imaging device according to claim 4, wherein the control means changes the drive speed of the focus lens depending on whether the mode is a still image shooting mode or a moving image shooting mode.
6. 5. The imaging device according to claim 4, wherein, when the video shooting mode is set, the control means changes the drive speed of the focus lens depending on whether the device is in a standby state before video recording starts or in a recording state after video recording has started.
7. a focus detection step for performing focus detection; a control step of controlling the driving of a focus lens included in the optical system based on a focus detection result obtained by the focus detection; a setting step of setting a drivable range based on a search direction of the focus lens and a position of the focus lens in accordance with an instruction from a user, A focus control method characterized in that, in the setting step, if a first search direction is instructed and then a second search direction different from the first search direction is instructed, the drivable range is set based on the second search direction and the first focus lens position when the first search direction is instructed.
8. A program for causing a computer to function as each of the means included in the focus control device according to any one of claims 1 to 3.
Citation Information
Patent Citations
Camera with automatic focusing device
JP2007164051A