BACKGROUND OF THE INVENTION

Field of the Invention

The present invention relates to an image pickup apparatus, a control method therefor, and a storage medium, and in particular to an image pickup apparatus that is capable of creating omnifocal images or fully-focused images with focus bracketing, a control method therefor, and a storage medium.

Description of the Related Art

Conventionally, image pickup apparatuses that create omnifocal images or fully-focused images are known. To create an omnifocal image, such an image pickup apparatus uses focus bracketing to take multiple bracketed shots at different focus positions across the whole range of a camera-to-subject distance at which the image pickup apparatus can focus, extracts areas in focus from the respective shot images, and merges them to form an image that is fully focused over the entire shooting area. When creating an omnifocal image, an image pickup apparatus needs to take multiple images in response to one user's operation for shooting, and hence it may take long time to finish taking all the shots after accepting the operation for shooting (hereafter referred to merely as “the shooting time”).

One of techniques to reduce the shooting time in focus bracketing is a technique of driving a lens during exposure, in which a focus lens is driven during exposure of the image pickup device. In a shooting sequence to create an omnifocal image, the focus lens is stopped at a certain focus position during exposure, and after exposure is completed, the focus lens is driven to a next focus position, and after waiting for the focus lens to be static, a next shooting operation is performed. In focus bracketing using the technique of driving a lens during exposure, multiple shots are taken at times when the focus lens reaches respective focus positions while continuing to be driven, and therefore, it is unnecessary to wait for the focus lens to be driven and static. As a result, the shooting time can be reduced.

Moreover, the amount of camera shake tends to increase as the shooting time increases. Focus bracketing using the technique of driving a lens during exposure, allows a hand-held image pickup apparatus to create an image with less camera shake in comparison with a creation of an omnifocal image without using the lens driving technique.

International Publication No. 2017/090233 discloses a method that switches between the following two shooting modes according to shooting conditions: a normal shooting mode and a focus bracketing mode using the technique of driving a lens during exposure.

However, conventional focus bracketing using the technique of driving a lens during exposure has the problem that it is impossible for a user to select a first shot image obtained in the focus bracketing as a shot image at a desired focus position.

Specifically, in conventional focus bracketing using the technique of driving a lens during exposure, the focus lens continues to be driven even during exposure and readout of the image pickup device. Thus, a focus position at the time of exposure and readout around a first row of the image pickup device is different from a focus position at the time of exposure and readout around a last row of the image pickup device. For this reason, even if a user determines a desired focus position in advance as a focus position at the start of shooting (start focus position), an area focused at the desired focus position in a first shot image is only an area that represents a result of readout around the first row of the image pickup device. Namely, in the first shot image, a focus position in an area that represents a result of readout around the last row of the image pickup device is greatly displaced from the desired focus position. Thus, even if a user wants to select an image focused around the desired focus position, which is determined by him or her in advance as the start focus position, such an image cannot be taken by conventional focus bracketing using the technique of driving a lens during exposure.

Moreover, in the technique of driving a lens during exposure, the focus lens is moved from a standstill and thus cannot be moved from the beginning at a desired focus change speed. Namely, the focus lens starts to be driven at a lower focus change speed than the desired focus change speed and then gradually accelerates to the desired focus change speed. On the other hand, in conventional focus bracketing using the technique of driving a lens during exposure, exposure and readout of the image pickup device are started at the same time when the focus lens starts to be driven, and hence the first shot image is different from second and subsequent shot images in terms of the focus change speed. Namely, in conventional focus bracketing using the technique of driving a lens during exposure, a user cannot select the first shot image as a shot image at his or her desired focus position.

SUMMARY OF THE INVENTION

The present invention provides an image pickup apparatus, a control method therefor, and a storage medium, which allow an user to select a first shot image taken in focus bracketing using the technique of driving a lens during exposure, as a shot image at a focus position desired by the user.

Accordingly, the present invention provides an image pickup apparatus that performs focus bracketing in which exposure and readout of an image pickup device are performed the number of times set in advance while a focus lens is driven without being stopped, so as to generate a set number of shot images. The image pickup apparatus comprises: a focus lens; an image pickup device; a memory device that stores a set of instructions; and at least one processor that executes the set of the following instructions. The at least one processor executes the instructions to: set a focus step that is an amount of change in focus position between adjacent shot images of the set number of shot images; and control driving of the focus lens so as to make the focus lens achieve a focus change speed such that the amount of change in focus per unit time is constant. The at least one processor further executes the instructions to: issue a vertical synchronization signal to the image pickup device on a basis of a start focus position set in advance; and set a reference position at which a focus position comes to the start focus position in a first shot image generated in the focus bracketing. The at least one processor further executes the instructions to: determine a focus position at a start of exposure, based on a time period required for one readout by the image pickup device, an exposure time period determined based on shooting conditions, the focus change speed, and the reference position.

According to the present invention, a first shot image taken in focus bracketing using the technique of driving a lens during exposure can be selected as a shot image at a focus position desired by a user.

Further features of the present invention will become apparent from the following description of exemplary embodiments (with reference to the attached drawings).

