Control apparatus, image pickup apparatus, control method, and storage medium setting a first or a second depth of field in a case where objects are superimposed and in a case where a main object is switched
A control apparatus includes a memory storing instructions, and a processor configured to execute the instructions to select a main object as a target to be focused on from among objects included in an image, perform a first setting that sets a first depth of field to a second depth of field deeper than the first depth of field in a case where the objects are superimposed in a depth direction, and perform a second setting that sets the second depth of field to the first depth of field in a case where the main object is switched after the first setting is performed.
1 . A control apparatus comprising:
a memory storing instructions; and
a processor configured to execute the instructions to:
select a main object as a target to be focused on from among objects included in an image,
perform a first setting that sets a first depth of field to a second depth of field deeper than the first depth of field in a case where the objects are superimposed in a depth direction, and
perform a second setting that sets the second depth of field to the first depth of field in a case where the main object is switched after the first setting is performed.
2 . The control apparatus according to claim 1 , wherein in a case where the number of objects is reduced, the processor is configured not to perform the first setting.
3 . The control apparatus according to claim 1 , wherein in a case where the number of objects is reduced, the processor is configured to determine a width of the second depth of field in accordance with a distance to a disappeared object.
4 . The control apparatus according to claim 2 , wherein the processor is configured to:
compare information on the objects acquired from a first image at a first timing and information on the objects acquired from a second image at a second timing later than the first timing, and
determine whether the number of objects is reduced based on determining whether the number of objects at the second timing is smaller than the number of objects at the first timing.
5 . The control apparatus according to claim 4 , wherein the processor is configured not to perform the first setting in a case where an object not detected from the second image exists in a predetermined area on an end side in the first image.
6 . The control apparatus according to claim 3 , wherein the processor is configured to:
compare information on the objects acquired from a first image at a first timing and information on the objects acquired from a second image at a second timing later than the first timing, and
determine whether the number of objects is reduced based on determining whether the number of objects at the second timing is smaller than the number of objects at the first timing.
7 . The control apparatus according to claim 6 , wherein the disappeared object is an object not detected from the second image.
8 . The control apparatus according to claim 1 , wherein in a case where the number of the objects reduces, the processor is configured to set an in-focus depth and performs the first setting in accordance with the in-focus depth.
9 . The control apparatus according to claim 1 , wherein the processor is configured to perform the second setting a predetermined time after the first setting is performed.
10 . The control apparatus according to claim 1 , wherein the processor is configured to perform the second setting in a case where the main object is switched after the first setting is performed and the main object switched is in focus at the first depth of field.
11 . The control apparatus according to claim 1 , wherein the processor is configured to select a foremost object in a moving direction as the main object.
12 . An image pickup apparatus comprising:
the control apparatus according to claim 1 ; and
an imaging unit configured to acquire an image.
13 . A control method comprising the steps of:
selecting a main object as a target to be focused on from among objects included in an image;
performing a first setting that sets a first depth of field to a second depth of field deeper than the first depth of field in a case where the objects are superimposed in a depth direction; and
performing a second setting that sets the second depth of field to the first depth of field in a case where the main object is switched after the first setting is performed.
14 . A non-transitory computer-readable storage medium storing a program that causes a computer to execute the control method according to claim 13 .