Imaging device

By introducing a dual-focus detection system into the shooting device, and utilizing photoelectric conversion and pupil-segmented phase difference detection, the problem of insufficient focusing accuracy in existing technologies has been solved, and high-precision focusing under different optical systems and image height conditions has been achieved.

CN122029468APending Publication Date: 2026-05-12NIKON CORP
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

In the existing technology, it is difficult to improve the focusing accuracy of the shooting device, especially under different optical systems and image height conditions, the accuracy of focus detection is insufficient.

Method used

A dual-focus detection system is adopted, which configures first and second focus detection pixels on the imaging element, uses photoelectric conversion unit and light-blocking unit to perform photoelectric conversion, and combines pupil segmentation type phase difference detection method to achieve high-precision focus detection.

Benefits of technology

It improves focusing accuracy under different optical systems and image height conditions, ensuring the accuracy and sharpness of the focus point in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122029468A_ABST
    Figure CN122029468A_ABST
Patent Text Reader

Abstract

An imaging device is provided with: an imaging unit having a first pixel that photoelectrically converts light that has passed through an optical system and outputs a signal for focus detection, and a second pixel that photoelectrically converts light that has passed through the optical system and outputs a signal for image generation; a focus detection unit that performs focus detection of the optical system on the basis of a signal output from the first pixel; an evaluation unit that evaluates the contrast of the image on the basis of the signal output from the second pixel in a region including a subject in the image on the basis of the signal output from the second pixel; and a control unit that controls the focus detection by the focus detection unit on the basis of the evaluation by the evaluation unit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to a filming device. Background Technology

[0002] Various methods have been proposed to focus on the desired subject (e.g., Patent Document 1). There has always been a demand for improved focusing accuracy.

[0003] Existing technical documents

[0004] Patent documents

[0005] Patent Document 1: Japanese Patent Application Publication No. 2014-132321 Summary of the Invention

[0006] According to the disclosed technical solution, the imaging device includes: an imaging unit having a first pixel and a second pixel, wherein the first pixel performs photoelectric conversion on light transmitted through an optical system and outputs a signal for focus detection, and the second pixel performs photoelectric conversion on light transmitted through the optical system and outputs a signal for image generation; a focus detection unit that performs focus detection of the optical system based on the signal output from the first pixel; an evaluation unit that evaluates the contrast of the image in a region containing the subject within the image based on the signal output from the second pixel; and a control unit that controls the focus detection of the focus detection unit based on the evaluation of the evaluation unit.

[0007] Furthermore, the configuration of the embodiments described below can be appropriately modified, and at least some components can be replaced with other components. Moreover, the configuration elements that are not particularly limited in their arrangement are not limited to the configuration disclosed in the embodiments, and can be configured in positions where their functions can be realized. Attached Figure Description

[0008] Figure 1 This is a diagram illustrating an example of the configuration of a photographing device according to one embodiment.

[0009] Figure 2 (A) is a diagram representing the first focal point detection area of ​​the imaging surface of the imaging element. Figure 2 (B) is a diagram representing the second focal point detection area of ​​the imaging surface of the imaging element.

[0010] Figure 3 This is a diagram showing an example of the pixel configuration within the first and second focal detection regions.

[0011] Figure 4 (A) ~ Figure 4 (C) is a diagram used to illustrate an example of the configuration of the focus detection pixel and the shooting pixel set in the pixel section.

[0012] Figure 5 It is an image generated based on signals from the captured pixels, and a diagram showing the subject detected by the subject detection unit as the focus object, superimposed on the AF frame.

[0013] Figure 6 This is a flowchart (one of) illustrating an example of the processing performed by the fuselage control unit according to this embodiment.

[0014] Figure 7 This is a flowchart (second example) illustrating an example of the processing performed by the fuselage control unit according to this embodiment.

[0015] Figure 8 This is a flowchart (third example) illustrating an example of the processing performed by the fuselage control unit according to this embodiment.

[0016] Figure 9 (A) ~ Figure 9 (D) is a graph used to explain the contrast evaluation value calculated by the second focus detection unit.

[0017] Figure 10 (A) ~ Figure 10 (D) is a graph used to illustrate the relationship between the focus state of the subject and the contrast evaluation value.

[0018] Figure 11 (A) is a diagram that overlays an image generated based on signals from the captured pixels, a first focus detection region, and an AF frame representing the subject detected by the subject detection unit as the focus object. Figure 11 (B) is a diagram showing the image generated based on the signal from the shooting pixels, the second focus detection area, and the AF frame representing the subject detected by the subject detection unit as the focus object.

[0019] Figure 12 Figure (A) is an example of the position of the focus lens obtained during a scanning operation and the reliability of the subject detection unit detecting the subject as a predetermined subject. Figure 12 (B) indicates that the focusing lens is in the position of Figure 12 The image generated based on the signal output from the captured pixel in the case of position P1 of (A). Figure 12 (C) indicates that in Figure 12 The graph shown in (B) is a distribution of contrast rating values ​​for the region containing the subject in the image.

[0020] Figure 13(A) is a diagram representing the image and AF box generated based on the signal from the captured pixels. Figure 13 (B) is a diagram showing an example of the amount of defocus in each primary focus detection area within the AF frame. Figure 13 (C) is a diagram representing an example of the contrast evaluation value of each first focal detection area within the AF frame. Detailed Implementation

[0021] The following is for reference Figures 1 to 13 An electronic camera 1 (hereinafter referred to as camera 1) will be described as an example of an imaging device involved in one embodiment.

[0022] Figure 1 This diagram illustrates an example configuration of an electronic camera 1 (hereinafter referred to as camera 1) according to one embodiment. Camera 1 includes a camera body 2 and an interchangeable lens 3. Because camera 1 includes a camera body 2 and an interchangeable lens 3, it is sometimes also referred to as a camera system.

[0023] (Shot 3)

[0024] The interchangeable lens 3 includes a lens-side mount 301, an imaging optical system 31, a lens control unit 32, and a lens memory 33. The lens-side mount 301 includes a lens-side connector 302. The lens-side connector 302 has multiple terminals, such as a clock signal terminal and / or a data signal terminal, and a power supply terminal. The interchangeable lens 3 is detachably mounted to the camera body 2 via the lens-side mount 301 and the body-side mount 201 (described later).

[0025] The imaging optical system 31 includes multiple lenses and an aperture 31c, and forms an image of the subject on the imaging surface 22a of the imaging element 22. The multiple lenses include a zoom lens (magnification lens) 31a for changing the focal distance (focal length) and a focus lens (focus adjustment lens) 31b. Furthermore, in Figure 1 The diagram illustrates zoom lens 31a and focusing lens 31b, but typical shooting optical systems generally consist of a large number of optical elements.

[0026] The imaging optical system 31 of the interchangeable lens 3 has the optical characteristic that the position of its exit pupil, i.e., the exit pupil distance, varies with the image height. In other words, the exit pupil distance of the imaging optical system 31 varies with the position of the imaging surface 22a, i.e., the distance of the imaging surface 22a along the optical axis OA1 of the imaging optical system 31. The optical axis OA1 of the imaging optical system 31 intersects the imaging surface 22a at the center position. The exit pupil distance of the imaging optical system 31 can also be said to vary with the distance from the center of the imaging surface 22a. Here, the exit pupil distance refers to the distance between the exit pupil of the imaging optical system 31 and the image plane formed based on the image formed by the imaging optical system 31. Furthermore, the imaging surface 22a of the imaging element 22 may be, for example, a surface where a photoelectric conversion unit described later is disposed, or a surface where a microlens is disposed.

[0027] The imaging optical system 31 varies depending on the type of interchangeable lens 3 mounted on the side mounting section 201 of the camera body. Therefore, the exit pupil distance of the imaging optical system 31 varies depending on the type of interchangeable lens 3. Furthermore, the optical characteristics of the exit pupil distance, which vary according to the image height, also vary depending on the type of interchangeable lens 3.

[0028] The lens control unit 32 consists of processors such as CPU, FPGA, and ASIC, and memories such as ROM and RAM. It controls various parts of the interchangeable lens 3 based on a control program. The lens control unit 32 controls the position of the zoom lens 31a, the position of the focusing lens 31b, and the drive of the aperture 31c based on signals output from the body control unit 21 of the camera body 2. When the lens control unit 32 receives signals from the body control unit 21 indicating the direction and / or amount of movement of the focusing lens 31b, it moves the focusing lens 31b back and forth along the optical axis OA1 to adjust the focus position of the shooting optical system 31.

[0029] The lens memory 33 is constructed, for example, from a non-volatile storage medium. Information associated with the interchangeable lenses 3 is stored (recorded) in the lens memory 33 as lens information. This lens information includes data related to the optical characteristics of the shooting optical system 31, data related to the infinity and closest positions of the focusing lens 31b, and data related to the shortest and longest focal distances of the interchangeable lenses 3. The optical characteristics of the shooting optical system 31 include exit pupil distance, F-number (aperture value of aperture 31c), etc. Furthermore, the lens information varies depending on the type of interchangeable lens 3. Alternatively, the lens information can be stored in the memory inside the lens control unit 32. Alternatively, the lens information can be stored in the camera body memory 23, which will be described later. In this case, the camera body memory 23 stores lens information for multiple interchangeable lenses 3.

[0030] In this embodiment, the lens information includes information related to the exit pupil distance of the shooting optical system 31. This exit pupil distance information includes the exit pupil distance (Co) at the position where the shooting surface 22a intersects the optical axis OA1 (the position where the image height is zero), and information about the coefficients included in the formula representing the relationship between the exit pupil distance and the image height. The writing of data to the lens memory 33 and the reading of data from the lens memory 33 are controlled by the lens control unit 32. When the interchangeable lens 3 is mounted on the camera body 2, the lens control unit 32 sends lens information to the body control unit 21 via the terminals of the lens-side connector 302 and the body-side connector 202. Additionally, the lens control unit 32 sends to the body control unit 21 information such as the controlled position information (focal distance information) of the zoom lens 31a, the controlled position information of the focusing lens 31b, and the controlled F-value of the aperture 31c.

[0031] The lens control unit 32 communicates bidirectionally between the camera body 2 and the interchangeable lens 3 via terminals of the lens-side connector 302 and the body-side connector 202. When the lens control unit 32 receives a signal from the camera body 2 requesting the transmission of information related to the exit pupil distance, it transmits such information to the camera body 2. Furthermore, the information related to the exit pupil distance varies depending on the type of interchangeable lens 3. Alternatively, the lens control unit 32 may transmit the information related to the exit pupil distance to the camera body 2 every time the imaging element 22 takes a picture. The lens control unit 32 may also transmit the information related to the exit pupil distance to the camera body 2 when the zoom lens 31a moves, thereby changing the focal length of the imaging optical system 31. The lens control unit 32 can also transmit both the focal length information of the imaging optical system 31 and the information related to the exit pupil distance to the camera body 2 in a single bidirectional communication.

[0032] (Camera body 2)

[0033] The camera body 2 includes a body-side mounting section 201, an image sensor 22, a camera memory 23, a display section 24, an operation section 25, and a body control section 21.

[0034] The fuselage-side mounting section 201 includes a fuselage-side connecting section 202. The fuselage-side connecting section 202 has multiple terminals, including terminals for clock signals, terminals for data signals, and terminals for power supply.

[0035] When the interchangeable lens 3 is mounted on the camera body 2, the terminal provided on the body-side connection portion 202 is electrically connected to the terminal provided on the lens-side connection portion 302. This enables power supply from the camera body 2 to the interchangeable lens 3 and communication between the camera body 2 and the interchangeable lens 3.

[0036] The imaging element 22 is a CMOS image sensor or a CCD image sensor. The imaging element 22 captures an image of the subject formed by the imaging optical system 31. The imaging element 22 includes: a pixel unit 221, which has multiple pixels with photoelectric conversion units arranged in a two-dimensional (row and column direction); and a control unit 222, which controls the pixel unit 221. The photoelectric conversion unit is composed of a photodiode (PD).

[0037] As will be explained later, the pixel unit 221 includes: a capturing pixel that performs photoelectric conversion on the received light via a photoelectric conversion unit and outputs a signal for image generation; and a focus detection pixel that performs photoelectric conversion on the received light via a photoelectric conversion unit and outputs a signal for focus detection. The capturing pixel includes: a pixel (hereinafter referred to as an R pixel) having a filter that has a beam splitting characteristic for splitting light (red (R) light) in the first wavelength region of the incident light; a pixel (hereinafter referred to as a G pixel) having a filter that has a beam splitting characteristic for splitting light (green (G) light) in the second wavelength region of the incident light; and a pixel (hereinafter referred to as a B pixel) having a filter that has a beam splitting characteristic for splitting light (blue (B) light) in the third wavelength region of the incident light. The R pixel, G pixel, and B pixel are arranged in a Bayer arrangement. The focus detection pixel is disposed in a permutation manner on a portion of the capturing pixel and is distributed over approximately the entire surface of the capturing surface 22a of the capturing element 22.

[0038] Based on the instruction signal from the body control unit 21, the control unit 222 causes the focus detection pixel to output a signal. Additionally, based on the instruction signal from the body control unit 21, the control unit 222 causes the imaging pixel to output a signal.

[0039] The camera's internal memory 23 is constructed, for example, from a non-volatile storage medium. Image data, control programs, etc., are recorded in the internal memory 23. The writing of data to and reading of data from the internal memory 23 is controlled by the camera control unit 21. The display unit 24 displays images based on image data, images representing the focus detection area (AF area) such as the AF frame, shooting-related information such as shutter speed and F-stop, as well as menu screens, etc.

[0040] The operation unit 25 includes a release button, a power switch, and various setting switches such as switches for switching between different modes, and outputs operation signals corresponding to their respective operations to the body control unit 21. Furthermore, the operation unit 25 is a setting unit capable of setting any focus detection area from multiple focus detection areas, allowing the user to select any focus detection area by operating the operation unit 25.

[0041] The camera control unit 21 consists of processors such as CPU, FPGA, and ASIC, and memories such as ROM and RAM, and controls various parts of the camera 1 based on a control program. The camera control unit 21 includes an image data generation unit 211, a subject detection unit 212, a region setting unit 213, a selection unit 214, a focus detection unit 215, an evaluation unit 216, and a position control unit 217. The image data generation unit 211, subject detection unit 212, region setting unit 213, selection unit 214, focus detection unit 215, evaluation unit 216, and position control unit 217 are implemented, for example, by a processor executing a program.

[0042] The image data generation unit 211 performs various image processing operations on the signal output from the imaging pixel 13 of the imaging element 22 to generate image data. Alternatively, the image data generation unit 211 may also use the signal output from the focus detection pixel to generate image data.

[0043] The subject detection unit 212 detects a predetermined subject from an image based on the image data generated by the image data generation unit 211. For example, when a "bird mode" suitable for photographing wild birds is set as the shooting mode, the subject detection unit 212 detects a bird as the subject. Similarly, when an "airplane mode" suitable for photographing airplanes is set as the shooting mode, the subject detection unit 212 detects an airplane as the subject. Furthermore, when a "portrait mode" suitable for photographing people is set as the shooting mode, the subject detection unit 212 detects a person as the subject.

[0044] Region setting section 213 settings (selection) in Figure 2 At least one of the plurality of first focus detection areas 101 provided on the imaging surface 22a of the imaging element 22 shown in (A).

[0045] Figure 2 (A) is a diagram showing the first focus detection area 101 of the imaging surface 22a of the imaging element 22. Figure 2 Figure (B) shows the second focus detection region 102 of the imaging surface 22a of the imaging element 22. The height H1 in the Y direction of the first focus detection region 101 is equal to the height H2 in the Y direction of the second focus detection region 102. On the other hand, the length L1 in the X direction of the first focus detection region 101 is shorter than the length L2 in the X direction of the second focus detection region 102. Therefore, the second focus detection region 102 is larger than the first focus detection region 101. The second focus detection region 102 is configured to overlap with at least one first focus detection region 101 (including at least one first focus detection region 101).

[0046] The multiple AF frames displayed on the display unit 24 correspond to the multiple first focus detection areas 101 provided on the imaging element 22. The area setting unit 213 sets, for example, the first focus detection area 101 corresponding to the AF frame selected by the user through the operation unit 25 among the multiple AF frames displayed on the display unit 24, or the first focus detection area 101 corresponding to the AF frame containing the subject detected by the subject detection unit 212, as the area for focus detection.

[0047] In addition to the shooting pixels, each first focus detection area 101 is also equipped with a variety of focus detection pixel pairs (AF pixel pairs). Furthermore, since the second focus detection area 102 includes at least one first focus detection area 101, it is also equipped with a variety of focus detection pixel pairs (AF pixel pairs) in addition to the shooting pixels, just like the first focus detection area 101.

[0048] Figure 3 This is a diagram showing an example of the pixel configuration within the first focal detection region 101 and the second focal detection region 102. Figure 3 In the image, a first pixel group 401 and a second pixel group 402 are alternately arranged in the ±Y direction, i.e., the column direction. The first pixel group 401 is alternately arranged with R pixels 13 and G pixels 13 in the ±X direction, i.e., the row direction. The second pixel group 402 is alternately arranged with G pixels 13 and B pixels 13 in the row direction. The shooting pixels 13 are arranged according to the Bayer arrangement.

[0049] A portion of the plurality of second pixel groups 402 includes a first focus detection pixel 11 or a second focus detection pixel 12. The first focus detection pixel 11 and the second focus detection pixel 12 each have a light-shielding portion 43. Figure 3 In the diagram, second pixel groups 402 including the first focus detection pixel 11 are referred to as second pixel groups 402a, 402c, and 402e, and second pixel groups 402 including the second focus detection pixel 12 are referred to as second pixel groups 402b, 402d, and 402f. The second pixel groups 402a, 402c, and 402e including the first focus detection pixel 11 and the second pixel groups 402b, 402d, and 402f including the second focus detection pixel 12 will be described below.

[0050] The B pixel 13 of the second pixel group 402a is replaced by the first focus detection pixel 11a. The second pixel group 402a is alternately configured with the first focus detection pixel 11a and the G pixel 13. Furthermore, the photoelectric conversion unit of the first focus detection pixel 11a receives a light beam passing through one of the first pupil region and the second pupil region of the exit pupil of the imaging optical system 31. The light-blocking part 43 of the first focus detection pixel 11a blocks the light beam passing through the other of the first pupil region and the second pupil region of the exit pupil of the imaging optical system 31. In the following description, the photoelectric conversion unit of the first focus detection pixel 11a is configured to receive a light beam passing through the first pupil region of the exit pupil of the imaging optical system 31. The light-blocking part 43 of the first focus detection pixel 11a is configured to block a light beam passing through the second pupil region of the exit pupil of the imaging optical system 31.

[0051] B pixel 13, which has left the predetermined row of the second pixel group 402b from the second pixel group 402a, is replaced by the second focus detection pixel 12a. The second pixel group 402b is alternately configured with the second focus detection pixel 12a and G pixel 13. Furthermore, the photoelectric conversion unit of the second focus detection pixel 12a receives a light beam passing through a pupil region different from the exit pupil of the first focus detection pixel 11a. The light-blocking part 43 of the second focus detection pixel 12a blocks the light beam passing through a pupil region different from the exit pupil of the first focus detection pixel 11a. In the following description, the photoelectric conversion unit of the second focus detection pixel 12a is configured to receive a light beam passing through a second pupil region of the exit pupil of the imaging optical system 31. The light-blocking part 43 of the second focus detection pixel 12a is configured to block the light beam passing through a first pupil region of the exit pupil of the imaging optical system 31.

[0052] Furthermore, the configuration position of the first focus detection pixel 11a in the second pixel group 402a is the same as the configuration position of the second focus detection pixel 12a in the second pixel group 402b. That is, the first focus detection pixel 11a and the second focus detection pixel 12a are configured in the same column.

[0053] The first focus detection pixel 11a of the second pixel group 402a and the second focus detection pixel 12a of the second pixel group 402b constitute the first AF pixel pair PR1. Alternatively, the second pixel group 402a and the second pixel group 402b can be configured in multiple rows, and multiple first AF pixel pairs PR1 can be configured.

[0054] B pixel 13, which has left the predetermined row of the second pixel group 402c from the second pixel group 402b, is replaced by the first focus detection pixel 11b. The second pixel group 402c is alternately configured with the first focus detection pixel 11b and G pixel 13. The photoelectric conversion unit of the first focus detection pixel 11b, like the first focus detection pixel 11a, receives the light beam passing through the first pupil region of the exit pupil of the imaging optical system 31. The light-shielding part 43 of the first focus detection pixel 11b, like the light-shielding part 43 of the first focus detection pixel 11a, blocks the light beam passing through the second pupil region of the exit pupil of the imaging optical system 31.

[0055] B pixel 13, which has left the predetermined row of the second pixel group 402d from the second pixel group 402c, is replaced by the second focus detection pixel 12b. The second pixel group 402d is alternately configured with the second focus detection pixel 12b and the G pixel 13. The photoelectric conversion unit of the second focus detection pixel 12b, like the second focus detection pixel 12a, receives the light beam passing through the second pupil region of the exit pupil of the imaging optical system 31. The light-shielding part 43 of the second focus detection pixel 12b, like the light-shielding part 43 of the second focus detection pixel 12a, blocks the light beam passing through the first pupil region of the exit pupil of the imaging optical system 31.

[0056] Furthermore, the configuration position of the first focus detection pixel 11b in the second pixel group 402c is the same as the configuration position of the second focus detection pixel 12b in the second pixel group 402d. That is, the first focus detection pixel 11b and the second focus detection pixel 12b are configured in the same column.

[0057] The first focus detection pixel 11b of the second pixel group 402c and the second focus detection pixel 12b of the second pixel group 402d constitute the second AF pixel pair PR2. Alternatively, the second pixel group 402c and the second pixel group 402d can be configured in multiple rows, and multiple second AF pixel pairs PR2 can be configured.

[0058] B pixel 13, which has left the predetermined row of the second pixel group 402e from the second pixel group 402d, is replaced by the first focus detection pixel 11c. The second pixel group 402e is alternately configured with the first focus detection pixel 11c and G pixel 13. The photoelectric conversion unit of the first focus detection pixel 11c, like the first focus detection pixels 11a and 11b, receives the light beam passing through the first pupil region of the exit pupil of the imaging optical system 31. The light-shielding part 43 of the first focus detection pixel 11c, like the light-shielding parts 43 of the first focus detection pixels 11a and 11b, blocks the light beam passing through the second pupil region of the exit pupil of the imaging optical system 31.

[0059] Pixel 13, which has left the predetermined row of second pixel group 402f from second pixel group 402e, is replaced by second focus detection pixel 12c. Second focus detection pixel 12c and G pixel 13 are alternately arranged in second pixel group 402f. Furthermore, the photoelectric conversion section of second focus detection pixel 12c receives light beams passing through the second pupil region of the exit pupil of the imaging optical system 31. The light-shielding section 43 of second focus detection pixel 12c, like the light-shielding sections 43 of second focus detection pixels 12a and 12b, blocks light beams passing through the first pupil region of the exit pupil of the imaging optical system 31.

[0060] Furthermore, the configuration position of the first focus detection pixel 11c in the second pixel group 402e is the same as the configuration position of the second focus detection pixel 12c in the second pixel group 402f. That is, the first focus detection pixel 11c and the second focus detection pixel 12c are configured in the same column.

[0061] The first focus detection pixel 11c of the second pixel group 402e and the second focus detection pixel 12c of the second pixel group 402f constitute the third AF pixel pair PR3. Alternatively, the second pixel group 402e and the second pixel group 402f can be configured in multiple rows, and multiple third AF pixel pairs PR3 can be configured.

[0062] Apart from the pixel pairs located around the optical axis OA1 (center of the shooting surface 22a) of the shooting optical system 31, the areas of the light-shielding portions 43 of the first AF pixel pair PR1, the second AF pixel pair PR2, and the third AF pixel pair PR3 are different. When the exit pupil distance is different, the angle of incidence of light incident on the focus detection pixels, except for the focus detection pixels located around the optical axis OA1 of the shooting optical system 31, is different. When the exit pupil distance is shorter, the angle of incidence is larger, and when the exit pupil distance is longer, the angle of incidence is smaller. In order to block a portion of the light that is incident at an angle of incidence that varies depending on the exit pupil distance, the area of ​​the light-shielding portion 43 varies depending on the AF pixel pair. As a result, the focus detection unit 215 and the evaluation unit 216 can detect the amount of defocus with high accuracy even if the exit pupil distances are different. However, the pixel pairs located around the optical axis OA1 (center of the shooting surface 22a) of the shooting optical system 31 have an angle of incidence of 0° regardless of the exit pupil distance. Therefore, the light-shielding portions 43 of the first AF pixel pair PR1, the second AF pixel pair PR2, and the third AF pixel pair PR3, which are located around the optical axis OA1 (center of the shooting surface 22a) of the shooting optical system 31, are all the same size. The area of ​​the light-shielding portion 43 also varies depending on the position (image height) of the focus detection pixel.

[0063] In this embodiment, the first focus detection pixels 11a-11c and the second focus detection pixels 12a-12c each have a filter, which has a beam splitting characteristic that splits the second band of light (green (G) light) in the incident light. Furthermore, the filters of the focus detection pixels 11a-11c and 12a-12c can also be filters that have a beam splitting characteristic that splits the first band of light (red (R) light) or the third band of light (blue (B) light). Additionally, the first focus detection pixels 11a-11c and 12a-12c can also have filters that have a beam splitting characteristic that splits the first, second, and third bands of light in the incident light.

[0064] Figure 4 (A) ~ Figure 4 (C) is a diagram used to explain an example of the configuration of the focus detection pixel and the shooting pixel provided in the pixel unit 221. Figure 4 (A) represents an example of a cross-section of the first focus detection pixel 11 in the first focus detection pixel 11 and the second focus detection pixel 12 that constitute the AF pixel pair. Figure 4 (B) represents an example of a cross-section of the second focus detection pixel 12 in the first focus detection pixel 11 and the second focus detection pixel 12 (first and second focus detection pixels 11, 12). Figure 4 (C) represents an example of a cross-section of 13 pixels (R pixel, G pixel, B pixel).

[0065] exist Figure 4 (A) ~ Figure 4 In (C), the first and second focus detection pixels 11, 12 and the capturing pixel 13 each have a microlens 44, a color filter 51, and a photoelectric conversion unit 42 (PD42). The photoelectric conversion unit 42 performs photoelectric conversion on the light that passes through the microlens 44 and the color filter 51. The first beam 61 is a beam that passes through a first pupil region that roughly bisectes the exit pupil of the capturing optical system 31. The second beam 62 is a beam that passes through a second pupil region that roughly bisectes the exit pupil of the capturing optical system 31.

[0066] exist Figure 4 In (A), the first focus detection pixel 11 is provided with a light-shielding part 43 that blocks the second beam 62 of the first beam 61 and the second beams 61 and 62. The light-shielding part 43 is located between the color filter 51 and the photoelectric conversion unit 42, and is disposed on the photoelectric conversion unit 42. Figure 4In the example shown in (A), the light-shielding part 43 is configured to block the left half (-X direction side) of the photoelectric conversion part 42. The right end (the end in the +X direction) of the light-shielding part 43 is approximately aligned with the center line that divides the photoelectric conversion part 42 into two equal parts. The photoelectric conversion part 42 of the first focus detection pixel 11 receives the first light beam 61. The photoelectric conversion part 42 of the first focus detection pixel 11 performs photoelectric conversion on the first light beam 61 to generate a charge, and the first focus detection pixel 11 outputs a first signal Sig1 based on the charge generated by the photoelectric conversion part 42.

[0067] Furthermore, the area of ​​the light-shielding portion 43 varies depending on the position (image height) of the first focus detection pixel 11, except for the first focus detection pixel 11 located around the optical axis OA1 (center of the imaging surface 22a) of the imaging optical system 31. When the position of the first focus detection pixel 11 is different, i.e., the image height is different, the angle of incidence of the light incident on the first focus detection pixel 11 is different. When the image height increases, the angle of incidence increases; when the image height decreases, the angle of incidence decreases; if the image height is 0, the angle of incidence is 0°. In order to block the second beam 62 in the light incident at an angle of incidence that varies according to the image height, the area of ​​the light-shielding portion 43 varies according to the image height.

[0068] exist Figure 4 In (B), the second focus detection pixel 12 is provided with a light-shielding part 43 that blocks the first beam 61 of the first beam 61 and the second beam 62 (first and second beams 61, 62). The light-shielding part 43 is located between the color filter 51 and the photoelectric conversion unit 42, and is disposed on the photoelectric conversion unit 42. Figure 4 In the example shown in (B), the light-shielding part 43 is configured to block the right half (+X direction side) of the photoelectric conversion part 42. The left end (the end in the -X direction) of the light-shielding part 43 is approximately aligned with the center line that divides the photoelectric conversion part 42 into two equal parts. The photoelectric conversion part 42 of the second focus detection pixel 12 receives the second beam 62. The photoelectric conversion part 42 of the second focus detection pixel 12 performs photoelectric conversion on the second beam 62 to generate a charge, and the second focus detection pixel 12 outputs a second signal Sig2 based on the charge generated by the photoelectric conversion part 42.

[0069] Furthermore, similar to the first focus detection pixel 11, the area of ​​the light-shielding portion 43 varies depending on the position (image height) of the second focus detection pixel 12, except for the second focus detection pixel 12 located around the optical axis OA1 (center of the imaging surface 22a) of the imaging optical system 31. In order to block the first beam 61 of light incident at an angle varying according to the image height, the area of ​​the light-shielding portion 43 varies according to the image height. The area of ​​the light-shielding portion 43 can be set according to the position (image height) of the focus detection pixel, for example, as disclosed in International Publication 2020 / 017640.

[0070] exist Figure 4 In (C), the photoelectric conversion unit 42 of the imaging pixel 13 receives a first light beam 61 and a second light beam 62 that have passed through the first pupil region and the second pupil region of the imaging optical system 31, respectively. The photoelectric conversion unit 42 of the imaging pixel 13 performs photoelectric conversion on the first light beam 61 and the second light beam 62 to generate an electric charge, and the imaging pixel 13 outputs a signal (imaging signal) based on the electric charge generated by the photoelectric conversion unit 42.

[0071] In addition, such as Figure 2 As shown in (A), multiple first focus detection regions 101 are arranged along a two-dimensional direction (row and column direction) and positioned at different image heights. The image height of the first focus detection region 101 increases as it moves away from the center of the imaging surface 22a (optical axis OA1 of the imaging optical system 31). In other words, the image height of the first focus detection region 101 increases as its distance from the center of the imaging surface 22a increases.

[0072] Furthermore, the first focus detection region 101 has a predetermined area; therefore, the image height varies for each focus detection pixel depending on its position within the first focus detection region 101. However, in this embodiment, the image height value at the center position of a first focus detection region 101 is taken as the image height value of the entire first focus detection region 101.

[0073] The selection unit 214 selects which of the signals Sig1 and Sig2 output from the first AF pixel pair PR1 to the third AF pixel pair PR3 configured in the first focus detection area 101 set by the area setting unit 213 to perform focus detection.

[0074] Specifically, the selection unit 214 first calculates the exit pupil distance of the imaging optical system 31 at the image height IH. The selection unit 214 calculates the exit pupil distance Po(IH) of the imaging optical system 31 at the image height IH of the first focus detection area 101 set by the area setting unit 213 using a predetermined formula. The selection unit 214 selects AF pixel pairs suitable for the calculated exit pupil distance Po(IH) from the first AF pixel pair PR1 to the third AF pixel pair PR3. Furthermore, when multiple first focus detection areas 101 are set by the area setting unit 213, the selection unit 214 selects AF pixel pairs of the same type in each selected first focus detection area 101. Additionally, the selection unit 214 selects AF pixel pairs of the same type as those in the first focus detection areas 101 in the second focus detection area 102.

[0075] The focus detection unit 215 performs focus detection processing required for the automatic focus adjustment (AF) of the shooting optical system 31. The focus detection unit 215 uses the signals Sig1 and Sig2 output from the AF pixel pair selected by the selection unit 214 to calculate the defocus amount using a pupil-segmented phase difference detection method.

[0076] The focus detection unit 215 performs correlation calculations on the first signal Sig1 and the second signal Sig2 to calculate the offset between the image plane of the image of the imaging optical system 31 and the imaging plane 22a of the imaging element 22. The first signal Sig1 is a signal generated by capturing an image produced by a first light beam passing through the first pupil region of the exit pupil of the imaging optical system 31, and the second signal Sig2 is a signal generated by capturing an image produced by a second light beam passing through the second pupil region. The focus detection unit 215 converts this offset into a defocus amount based on a predetermined conversion formula.

[0077] In this embodiment, the focus detection unit 215 performs first focus detection to calculate the defocus amount for each first focus detection region 101 and second focus detection to calculate the defocus amount for each second focus detection region 102. The focus detection unit 215 calculates the defocus amount based on the signals Sig1 and Sig2 from the AF pixel pair selected by the selection unit 214.

[0078] The evaluation unit 216 evaluates the contrast of the image in the region containing the subject within the image based on the signal output from the imaging pixel 13. Specifically, the evaluation unit 216 calculates an evaluation value (hereinafter referred to as the contrast evaluation value) related to the contrast of the image based on the signal output from the imaging pixel 13.

[0079] The position control unit 217 controls the position of the focusing lens 31b. Specifically, based on the defocus amount calculated by the focus detection unit 215, the focus position of the focusing lens 31b (the amount of movement of the focusing lens 31b up to the focus position) for focusing (imaging) the image generated by the imaging optical system 31 onto the imaging surface 22a of the imaging element 22 is calculated.

[0080] In this embodiment, the position control unit 217 calculates the focusing position of the focusing lens 31b (the amount of movement of the focusing lens 31b up to the focusing position) based on the evaluation of the image contrast by the evaluation unit 216 and based on either the amount of defocus calculated for the first focus detection area 101 or the amount of defocus calculated for the second focus detection area 102.

[0081] The position control unit 217 determines whether the amount of defocus is within the allowable value. If the amount of defocus is within the allowable value, it determines that the focus is on. On the other hand, if the amount of defocus exceeds the allowable value, the position control unit 217 determines that the focus is off and sends a signal to the lens control unit 32 of the interchangeable lens 3 instructing the amount of movement of the focusing lens 31b and the lens movement. The lens control unit 32 moves the focusing lens 31b according to the amount of movement, thereby automatically adjusting the focus.

[0082] Figure 5 It is an image generated based on the signal from the shooting pixel 13, a first focus detection region 101, and a representation of the subject to be detected by the subject detection unit 212 (in Figure 5 The image shows the AF frame FR1 overlapping with the focus object (the bird in the center). Figure 5 In the image shown, the focus is on the background, and the bird, as the subject, is blurred (out of focus) while the background is clear (sharp). In this case, among the multiple first focus detection areas 101 within the AF frame FR1 that overlap with the background, the absolute value of the defocus amount becomes the smallest. Therefore, when calculating the focus position of the focusing lens 31b based on the defocus amount of the first focus detection area 101, calculating the focus position of the focusing lens 31b based on the defocus amount of the first focus detection area 101 that overlaps with the background will cause the focus to remain on the background (resulting in continuous focusing on the background).

[0083] Therefore, in this embodiment, by evaluating the contrast of the image (focusing state toward the subject) based on the evaluation unit 216, the focusing lens 31b is driven based on the detection result of the first focus detection, the focusing lens 31b is driven based on the detection result of the second focus detection, or the focusing lens 31b is driven without using the detection result of focus detection, thereby improving the focusing accuracy toward the desired subject.

[0084] Figures 6-8This is a flowchart illustrating an example of the processing performed by the fuselage control unit 21 according to this embodiment. Figures 6-8 For example, starting when the release button is half-pressed, the process is repeated at predetermined time intervals (predetermined frame rate) during the period when the release button is half-pressed.

[0085] First, the position control unit 217 determines whether it is before capturing the subject (whether it is currently capturing the subject) (step S11). If it is before capturing the subject (step S11 / No), the position control unit 217 calculates the focus position of the focusing lens 31b based on the defocus amount calculated in the first focus detection area 101, and instructs the driving of the focusing lens 31b (step S23). For example, the position control unit 217 calculates the focus position of the focusing lens 31b based on the defocus amount in the first focus detection area 101 included in the AF frame of the camera body 2, which is used when the subject cannot be captured, and instructs the driving of the focusing lens 31b.

[0086] Furthermore, in the following description, when the position control unit 217 performs processing based on the defocus amount calculated in the first focus detection area 101 (processing using the defocus amount calculated in the first focus detection area 101), the position control unit 217 may also cause the focus detection unit 215 to perform at least the first focus detection at the beginning of the processing to obtain the defocus amount in the first focus detection area 101. Figures 6-8 At the start of the process, first focus detection and second focus detection are performed. The position control unit 217 can also obtain the result of the first focus detection by the focus detection unit 215. Alternatively, when the position control unit 217 performs processing based on the defocus amount calculated in the second focus detection area 102 (processing using the defocus amount calculated in the second focus detection area 102), the position control unit 217 can also cause the focus detection unit 215 to perform at least the second focus detection at the start of the process to obtain the defocus amount in the second focus detection area 102. Alternatively, the focus detection unit 215 can... Figures 6-8 At the start of the process, a first focus detection and a second focus detection are performed, and the position control unit 217 obtains the result of the second focus detection from the focus detection unit 215.

[0087] If the subject is captured (step S11 / Yes), the position control unit 217 determines whether "Bird Mode" is set for the shooting mode (step S13). If "Bird Mode" is not set for the shooting mode (step S13 / No), the position control unit 217 calculates the focus position of the focusing lens 31b based on the defocus amount calculated for the first focus detection area 101, and instructs the driving of the focusing lens 31b (step S23). The position control unit 217 calculates the focus position of the focusing lens 31b, for example, based on the defocus amount in the first focus detection area 101 included in the AF frame corresponding to the shooting mode in the camera body 2, which is preset.

[0088] On the other hand, when the shooting mode is set to "Bird Mode" (step S13 / Yes), the position control unit 217 determines whether a bird is detected as the subject (step S15).

[0089] If a bird is detected as the subject of the photograph (step S15 / Yes), the position control unit 217 determines whether the detected part is the pupil (step S17).

[0090] If the detected location is the pupil (step S17 / Yes), the position control unit 217 calculates the focusing position of the focusing lens 31b based on the defocus amount calculated in the first focus detection area 101 near the detected pupil, and instructs the driving of the focusing lens 31b (step S23).

[0091] If the detected area is not the pupil (step S17 / No), the position control unit 217 determines whether the detection size of the subject (the size of the subject detection frame) is smaller than a predetermined size (step S19). This is because when the size of the subject is smaller than the size of the captured image, it is easy for the subject to be blurry (out of focus) while the background is clear (sharp).

[0092] If the detected size of the subject is greater than or equal to a predetermined size (step S19 / No), the position control unit 217 calculates the focus position of the focusing lens 31b based on the defocus amount calculated for the first focus detection area 101, and instructs the driving of the focusing lens 31b (step S23). The position control unit 217 calculates the focus position of the focusing lens 31b, for example, based on the defocus amount in the first focus detection area 101 included in the AF frame set according to the subject detection frame.

[0093] On the other hand, if the detected size of the subject is smaller than the predetermined size (step S19 / Yes), the position control unit 217 determines the focus state toward the subject based on the contrast evaluation value calculated by the evaluation unit 216 (step S21). Specifically, based on the contrast evaluation value calculated by the evaluation unit 216, it determines whether the focus is on the subject or on the background.

[0094] The process of step S21 is explained in detail. Figure 9 (A) ~ Figure 9 (D) is a graph used to explain the contrast evaluation value calculated by the evaluation unit 216. Figure 9 (A) shows an image generated based on the signal from the captured pixel 13. Furthermore, in Figure 9 In (A), the background is omitted from the perspective of easy observation.

[0095] like Figure 9 As shown in (A), the evaluation unit 216 calculates a contrast evaluation value based on the signal from the shooting pixel 13 in each of the multiple small regions ar contained in the region AR1 containing the subject. Furthermore, each small region ar contains multiple shooting pixels 13.

[0096] The evaluation unit 216 calculates, for example, the maximum value of the F1 filter, the F1 focus evaluation value, the maximum value of the F2 filter, and the F2 focus evaluation value for each captured pixel 13. The maximum value of the F1 filter is the maximum value of the frequency signal obtained by extracting the low-frequency components of the signal output from the captured pixel 13 using a low-frequency transmission filter. The F1 focus evaluation value is the cumulative value of this frequency signal. The maximum value of the F2 filter is the maximum value of the frequency signal obtained by extracting the high-frequency components of the signal output from the captured pixel 13 using a high-frequency transmission filter. The F2 focus evaluation value is the cumulative value of this frequency signal.

[0097] The evaluation unit 216 calculates the average F1 filter maximum value ave, the maximum F1 filter maximum value max, the average F1 focus evaluation value ave, and the maximum F1 focus evaluation value max for each small region ar. The average F1 filter maximum value ave is the average of the F1 filter maximum values ​​calculated for the multiple shooting pixels 13 contained in the small region ar. The maximum F1 filter maximum value max is the maximum value of the F1 filter maximum value. The average F1 focus evaluation value ave is the average of the F1 focus evaluation values. The maximum F1 focus evaluation value max is the maximum value of the F1 focus evaluation value. In addition, the evaluation unit 216 calculates the average F2 filter maximum value ave, the maximum F2 filter maximum value max, the average F2 focus evaluation value ave, and the maximum F2 focus evaluation value max for each small region ar. The average F2 filter maximum value ave is the average of the F2 filter maximum values ​​calculated for the multiple shooting pixels 13 contained in the small region ar. The maximum F2 filter maximum value max is the maximum value of the F2 filter maximum value. The average F2 focus evaluation value ave is the average of the F2 focus evaluation values. The maximum F2 focus evaluation value max is the maximum value of the F2 focus evaluation values.

[0098] This section explains the relationship between the focus state of the subject and the contrast rating. Figure 10 (A) ~ Figure 10 (D) is a graph used to illustrate the relationship between the focus state of the subject and the contrast evaluation value.

[0099] Figure 10 (A) represents an image generated based on the signal from the captured pixel 13, in Figure 10 In image (A), the focus is set to be aligned with the subject. As described above, the evaluation unit 216 calculates the average F1 filter maximum value ave, the maximum F1 filter maximum value max, the average F1 focus evaluation value ave, the maximum F1 focus evaluation value max, the average F2 filter maximum value ave, the maximum F2 filter maximum value max, the average F2 focus evaluation value ave, and the maximum F2 focus evaluation value max for each of the multiple small regions ar contained in the region AR1 containing the subject detected by the subject detection unit 212. Region AR1 is preferably set such that the center of region AR1 coincides with the center of the subject detected by the subject detection unit 212.

[0100] Figure 10 (B) is a graph showing the contrast rating values ​​calculated for each small area in three dimensions with the focus on the subject. Figure 10The contrast rating value of (B) represents, for example, the maximum F2 filter value (max) for each small area (ar). However, even the average F1 filter value (ave), maximum F1 filter value (max), average F1 focus rating value (ave), maximum F1 focus rating value (max), average F2 filter value (ave), average F2 focus rating value (ave), and maximum F2 focus rating value (max) can achieve the same distribution. When the focus is on the subject, such as... Figure 10 As shown in (B), when the contrast evaluation value within region AR1 is represented by a three-dimensional shape, it becomes an upwardly convex shape with the center of region AR1 (the center of the subject) as the maximum value.

[0101] Figure 10 (C) represents the image generated based on the signal from the captured pixel 13, in Figure 10 In the image (C), the focus is set to be on the background.

[0102] Figure 10 (D) is a graph showing the contrast ratings calculated for each small area in three dimensions when the focus is not on the subject (but on the background). Figure 10 The contrast rating value of (D) represents, for example, the maximum F2 filter value (max) for each small area (ar). However, even the average F1 filter value (ave), maximum F1 filter value (max), average F1 focus rating value (ave), maximum F1 focus rating value (max), average F2 filter value (ave), average F2 focus rating value (ave), and maximum F2 focus rating value (max) can achieve the same distribution. In cases where the focus is not on the subject (focus is on the background), such as... Figure 10 As shown in (D), when the contrast evaluation value within region AR1 is represented by a three-dimensional shape, it becomes a downward convex shape with the center of region AR1 as the minimum value.

[0103] As described above, the three-dimensional shape represented by the contrast evaluation value differs depending on whether the focus is on the subject or not. Therefore, in step S21, the focus state towards the subject is determined based on the three-dimensional shape represented by the contrast evaluation value in the region AR1 containing the subject. Specifically, as... Figure 9 (B) ~ Figure 9 As shown in (D), region AR1 is divided into a central region CR, a first peripheral region SR1 that is outside the central region CR and surrounds the central region CR, and a second peripheral region SR2 that is outside the first peripheral region SR1 and surrounds the first peripheral region SR1.

[0104] The central region CR is composed of a small region ar1 located at the center of region AR1. The first peripheral region SR1 is composed of a small region ar2 surrounding the small region ar1. The second peripheral region SR2 is composed of a small region ar3 surrounding the small region ar2.

[0105] The position control unit 217, for example, compares the contrast evaluation value in the central region CR with the same type of contrast evaluation value in the second peripheral region SR2 to determine whether the three-dimensional shape represented by the contrast evaluation value is an upward convex shape or a downward convex shape, and determines whether the focus is on the subject or the background.

[0106] For example, the position control unit 217 determines whether the value obtained by dividing the maximum F2 filter value max in the central region CR (small region ar1) by the average value of the maximum F2 filter value max in the second peripheral region SR2 is greater than 1. Here, if Val1 is set to be the maximum F2 filter value max in the central region CR (small region ar1) and Val2 is set to be the average value of the maximum F2 filter value max in the second peripheral region SR2, the position control unit 217 determines whether Val1 / Val2 > 1. The average value of the maximum F2 filter value max in the second peripheral region SR2 can be obtained by dividing the sum of the maximum F2 filter value max in the multiple small regions ar2 included in the second peripheral region SR2 by the number of small regions ar2 included in the second peripheral region SR2.

[0107] Val1 / Val2 > 1 indicates that the three-dimensional shape represented by the contrast evaluation value is an upward convex shape. Therefore, in step S21, the position control unit 217 determines whether Val1 / Val2 is greater than 1.

[0108] Val1 can also be the maximum F1 filter value (max) in the central region CR. In this case, Val2 can be set to the average of the maximum F1 filter values ​​(max) in the second peripheral region SR2. Alternatively, Val2 can be set to the average of the maximum F1 filter values ​​(max) in the first peripheral region SR1. Furthermore, Val1 can also be the average F1 filter value (ave), average F1 focus evaluation value (ave), maximum F1 focus evaluation value (max), average F2 filter value (ave), average F2 focus evaluation value (ave), or maximum F2 focus evaluation value (max) in the central region CR. In this case, Val2 can be set to the average of the average F1 filter value (ave), average F1 focus evaluation value (ave), maximum F1 focus evaluation value (max), average F2 filter value (ave), average F2 focus evaluation value (ave), or maximum F2 focus evaluation value (max) in the second peripheral region SR2, respectively. Furthermore, Val2 can be set to the average of the average F1 filter maximum value ave, the average of the average F1 focus evaluation value ave, the average of the maximum F1 focus evaluation value max, the average of the average F2 filter maximum value ave, the average of the average F2 focus evaluation value ave, or the average of the maximum F2 focus evaluation value max in the first peripheral region SR1. That is, Val1 and Val2 can be the same type of contrast evaluation value in the central region CR and the first or second peripheral region SR1, SR2, respectively. In addition, the size of region AR1, the size of each sub-region ar, and the number of shooting pixels 13 contained in each sub-region ar can be set appropriately.

[0109] return Figure 6 When Val1 / Val2 is greater than 1 (step S21 / Yes), it is assumed that the focus is on the subject being photographed. Therefore, the position control unit 217 calculates the focus position of the focusing lens 31b based on the defocus amount calculated for the first focus detection area 101 and instructs the driving of the focusing lens 31b (step S23).

[0110] If Val1 / Val2 is less than 1 (step S21 / No), it is assumed that the focus is on the background, and therefore, the position control unit 217 performs the first process (step S100).

[0111] Figure 7This is a flowchart illustrating the details of the first process. In the first process, firstly, the position control unit 217 determines whether the amount of defocus in the second focus detection area 102 near the face of the subject detected by the subject detection unit 212 is a value indicating the nearest point in time (step S101). A value indicating the nearest point in time is a negative value. The position control unit 217 determines whether the amount of defocus is a value indicating the nearest point in time, for example, by determining whether the amount of defocus in the second focus detection area 102 is negative and its absolute value is greater than the absolute value of a value indicating the nearest point in time. For example, if the value indicating the nearest point in time is set to a value below -120 μm, the position control unit 217 determines whether the amount of defocus in the second focus detection area 102 is negative and its absolute value is greater than 120, which is the absolute value of -120. Furthermore, the value indicating the nearest point in time can be set appropriately.

[0112] Here, the reasoning for determining whether the amount of defocus in the second focus detection area 102 near the face of the subject is the closest value will be explained.

[0113] Figure 11 (A) is an overlay showing an image generated based on the signal from the shooting pixel 13, the first focus detection region 101, and a representation of the subject to be detected by the subject detection unit 212 (in...). Figure 5 The image shows the AF frame FR1 with the bird in the center as the focus object. Additionally, Figure 11 (B) is a diagram showing, overlaid, an image generated based on signals from the shooting pixel 13, a second focus detection region 102, and an AF frame FR1 representing the subject detected by the subject detection unit 212 as the focus object. Figure 11 (A) and Figure 11 In the image shown in (B), the bird, which is in focus on the background and is the subject, is blurred.

[0114] The first step is to... Figure 6 The process begins in step S21 when the focus is determined to be aligned with the background. At this time, it is highly likely that the defocus amount calculated from the multiple first focus detection areas 101 near the face of the subject is the one closest to 0 (focus state) (smallest absolute value) and is the defocus amount in the first focus detection area 101a that overlaps with the background.

[0115] When the focus position of the focusing lens 31b is calculated based on the amount of defocus in the first focus detection area 101a, the focus will always be on the background.

[0116] Therefore, the position control unit 217 obtains the defocus amount in the second focus detection area 102a near the face of the subject. If the subject is included in the second focus detection area 102a, since the subject is further forward than the background (on the camera 1 side), the value representing the closest distance is calculated as the defocus amount. In this case, if the position control unit 217 calculates the focus position of the focusing lens 31b based on the defocus amount in the second focus detection area 102a containing the image of the subject, and drives the focusing lens 31b, the focusing lens 31b moves towards the closest side. Therefore, it is possible to suppress the situation where the focus is always on the background.

[0117] Thus, in the case where the defocus amount in the second focus detection area 102 near the face of the subject is the closest value ( Figure 7 (Step S101 / Yes) The position control unit 217 calculates the focus position of the focusing lens 31b based on the defocus amount calculated for the second focus detection area 102 near the face of the subject, instructs the driving of the focusing lens 31b (step S105), and ends the first process.

[0118] On the other hand, if the amount of defocus in the second focus detection area 102 near the face of the subject is not the most recent value (step S101 / No), the position control unit 217 determines whether the amount of defocus in the second focus detection area 102 near the body of the subject is the most recent value (step S103).

[0119] If the amount of defocus in the second focus detection area 102 near the body of the subject is the nearest value (step S103 / Yes), the position control unit 217 calculates the focus position of the focusing lens 31b based on the amount of defocus calculated for the second focus detection area 102 near the body of the subject, instructs the driving of the focusing lens 31b (step S105), and ends the first process.

[0120] On the other hand, if the amount of defocus in the second focus detection area 102 near the body of the subject is not the closest value (step S103 / No), the position control unit 217 determines whether the reliability of the subject detected by the subject detection unit 212 as the predetermined subject (bird) is less than the threshold, and the three-dimensional shape represented by the contrast evaluation value calculated by the evaluation unit 216 is a downward convex shape (step S107).

[0121] The processing of step S107 will be explained. Figure 12(A) is a diagram showing an example of the position of the focusing lens 31b obtained when the scanning operation is performed, and the reliability of the subject detected by the subject detection unit 212 at each position of the focusing lens 31b as a predetermined subject (bird). Figure 12 (B) indicates that when the focusing lens 31b is in the position of Figure 12 The image generated based on the signal output from the captured pixel 13 in the case of position P1 of (A). Figure 12 (C) indicates that in Figure 12 The image shown in (B) is a diagram showing the distribution of contrast evaluation values ​​in the region AR1 containing the subject. Furthermore, the scanning operation refers to the following operation: while the position control unit 217 moves the focusing lens 31b of the imaging optical system 31 in the direction of the optical axis OA1, the evaluation unit 216 sequentially calculates the contrast evaluation value of the subject image based on the signal output from the imaging pixel 13 and detects the focus position.

[0122] The first processing (step S100) is in Figure 6 The processing that begins in step S21 when the focus is on the background is executed. If the defocus amount in the second focus detection area 102 near the face of the subject is not the most recent value, and the defocus amount in the second focus detection area 102 near the body of the subject is not the most recent value, then step S107 is executed. In this case, the image of the subject detected by the subject detection unit 212 is likely to be in a heavily blurred state where the degree of defocus cannot be calculated in the second focus detection area 102. When the image of the subject detected by the subject detection unit 212 is in a heavily blurred state, it is difficult to determine whether the subject detected by the subject detection unit 212 is the intended subject (bird), and therefore, the reliability calculated by the subject detection unit 212 also becomes low. Therefore, the position control unit 217 determines whether the image of the subject is in a heavily blurred state based on whether the reliability calculated by the subject detection unit 212 is less than a threshold. Furthermore, the position control unit 217 confirms whether the three-dimensional shape represented by the contrast evaluation value calculated by the evaluation unit 216 is a downward convex shape, thus confirming that the focus is not aligned with the subject.

[0123] If the reliability of the subject detected by the subject detection unit 212 as a predetermined subject is less than a threshold, and the three-dimensional shape represented by the contrast evaluation value calculated by the evaluation unit 216 is a downward convex shape (step S107 / Yes), the position control unit 217 drives the focusing lens 31b toward the nearest side (step S108), ending the first process. The position control unit 217 can either drive the focusing lens 31b to the nearest end or drive it toward the nearest side by a predetermined amount. That is, in step S108, the focusing lens 31b is not driven based on the defocus amount calculated by the focus detection unit 215.

[0124] On the other hand, if the determination in step S107 is negative, the position control unit 217 calculates the focusing position of the focusing lens 31b based on the defocus amount calculated for the first focus detection area 101, instructs the driving of the focusing lens 31b (step S109), and ends the first process.

[0125] exist Figure 6 If no bird is detected as the subject in step S15 (step S15 / No), the position control unit 217 performs the second process (step S200).

[0126] Figure 8 This is a flowchart illustrating the details of the second process. In the second process, firstly, the position control unit 217 determines whether the defocus amount is the nearest value in two or more adjacent second focus detection areas 102 (step S201). The two or more adjacent second focus detection areas 102 can be adjacent in either the X direction or the Y direction.

[0127] If the defocus amount is the most recent value in two or more adjacent second focus detection areas 102 (step S201 / Yes), the position control unit 217 determines whether the number of times the defocus amount is the most recent value in two or more adjacent second focus detection areas 102 in the N-times focus detection history is M or more (step S203). Here, N is, for example, 5, and M is, for example, 3.

[0128] If the determination in step S203 is negative, the position control unit 217 calculates the focusing position of the focusing lens 31b based on the defocus amount calculated for the first focus detection area 101, instructs the driving of the focusing lens 31b (step S211), and ends the second process.

[0129] If the determination in step S203 is yes, the position control unit 217 calculates the focusing position of the focusing lens 31b based on the defocus amount calculated for the second focus detection area 102, instructs the driving of the focusing lens 31b (step S205), and ends the second process.

[0130] On the other hand, if the defocus amount in two or more adjacent second focus detection areas 102 is not the nearest value (step S201 / No), the position control unit 217 determines whether there is an area in the multiple areas obtained by dividing the AF frame where all the defocus amounts are values ​​near focus but the contrast evaluation value is extremely low (step S207). Furthermore, the second process is performed when no subject is detected; therefore, the AF frame is, for example, an AF frame of a predetermined size set by the user in the camera body 2.

[0131] Figure 13 (A) ~ Figure 13 (C) is a diagram illustrating the process of step S207. Figure 13 (A) is a diagram representing the image generated based on the signal from the captured pixel 13 and the AF box FR1. Figure 13 (B) is a diagram showing an example of the amount of defocus in each first focus detection area 101 within the AF frame FR1. Figure 13 (C) is a graph representing the contrast evaluation values ​​in each first focal detection region 101 within the AF frame FR1. Figure 13 In the image shown in (A), the focus is on the background, and the bird, which is the subject, is blurred while the background is clear. In addition, subject detection based on the subject detection unit 212 is not possible, and the AF frame FR1, which is of a predetermined size including the center of the shooting surface 22a, is shown, which is set by the user in advance in the camera body 2.

[0132] exist Figure 13 In (B), the defocus amount is defined as the value near focus in all of the multiple first focus detection areas 101 within the AF frame FR1. The value near focus refers to a value within a predetermined range including 0, for example, a value within the range of -100μm to 100μm.

[0133] On the other hand, Figure 13 In (C), although the contrast evaluation value is high in most of the multiple first focus detection areas 101 within the AF frame FR1, there are areas where the contrast evaluation value becomes extremely low. This results in a defocus amount and contrast evaluation value when the subject image is so blurred that the subject detection unit 212 cannot detect the subject. The position control unit 217 can determine that an area with an extremely low contrast evaluation value exists when the contrast evaluation value of a portion of the multiple first focus detection areas 101 is lower than the contrast evaluation value of other portions of the multiple first focus detection areas 101 by a predetermined value (e.g., 300, etc.).

[0134] Therefore, in this embodiment, if the determination in step S207 is yes, the position control unit 217 drives the focusing lens 31b toward the nearest side (step S209), ending the second process. This is because it is believed that if the determination in step S207 is yes, the image of the subject is in a heavily blurred state to the point that the subject detection unit 212 cannot detect the subject. In addition, the body control unit 21 may also instruct the lens control unit 32 to reduce the aperture opening diameter of the aperture 31c (increase the F-number) until the amount of defocus indicating the nearest point is calculated in the second focus detection area 102.

[0135] On the other hand, if the determination in step S207 is negative, the position control unit 217 calculates the focusing position of the focusing lens 31b based on the defocus amount calculated for the second focus detection area 102, instructs the driving of the focusing lens 31b (step S205), and ends the second process.

[0136] As explained in detail above, according to this embodiment, the camera 1 includes: an imaging element 22 having first and second focus detection pixels 11, 12 (first focus detection pixel 11 and second focus detection pixel 12) and an imaging pixel 13, wherein the first and second focus detection pixels 11, 12 perform photoelectric conversion on light passing through the imaging optical system 31 and output signals for focus detection, and the imaging pixel 13 performs photoelectric conversion on light passing through the imaging optical system 31 and output signals for image generation; a focus detection unit 215 that performs focus detection of the imaging optical system 31 based on signals Sig1 and Sig2 output from the first focus detection pixel 11 and the second focus detection pixel 12; an evaluation unit 216 that evaluates the contrast of an image in a region AR1 containing the subject within an image based on signals output from the imaging pixel 13; and a position control unit 217 that controls the focus detection of the focus detection unit 215 based on the evaluation of the evaluation unit 216. This improves the focusing accuracy towards the desired subject (the probability of focusing on the desired subject).

[0137] Furthermore, in this embodiment, the position control unit 217 controls whether to perform focus detection by the focus detection unit 215 based on the evaluation of the evaluation unit 216. When the focusing lens 31b is driven based on the focus detection result of the focus detection unit 215, there is a situation where the focus remains continuously aligned with the background. However, by controlling whether to perform focus detection by the focus detection unit 215 based on the evaluation of the evaluation unit 216, the focusing accuracy towards the desired subject (the probability of the focus being aligned with the desired subject) can be improved.

[0138] Furthermore, in this embodiment, the camera includes a subject detection unit 212 that detects a subject within an image, and a position control unit 217 performs focus detection by a focus detection unit 215 when a subject is detected by the subject detection unit 212. This improves the focusing accuracy (the probability of focusing on the desired subject) of the subject detected by the subject detection unit 212.

[0139] Furthermore, in this embodiment, when the subject detection unit 216 detects a subject by the subject detection unit 212 (step S15 / Yes), it evaluates the contrast of the image in region AR1 (step S19) and performs focus detection by the focus detection unit 215. Therefore, based on the evaluation of the contrast of the image of the subject detected by the subject detection unit 212, and based on the focus detection result of the focus detection unit 215, it is possible to determine whether to drive the focusing lens 31b, thereby improving the focusing accuracy towards the subject detected by the subject detection unit 212.

[0140] Furthermore, in this embodiment, when the contrast evaluation value calculated by the evaluation unit 216 indicates that the image is not in focus (step S21 / No), the position control unit 217 drives the focusing lens 31b based on the focus detection result of the focus detection unit 215 (step S105). More specifically, the focus detection unit 215 performs first focus detection and second focus detection. The first focus detection is performed in the first focus detection area 101 to detect the focus of the imaging optical system 31, and the second focus detection is performed in the second focus detection area 102, which includes the first focus detection area 101 and is larger than the first focus detection area 101. When the contrast evaluation value calculated by the evaluation unit 216 indicates that the image is not in focus, the position control unit 217 drives the focusing lens 31b based on the detection result of the second focus detection. By driving the focusing lens 31b based on the focus detection result in the second focus detection area 102, which is larger than the first focus detection area 101, the situation of continuous focusing on the background can be suppressed.

[0141] Furthermore, in this embodiment, the evaluation unit 216 calculates the contrast evaluation value of the central region CR, which includes the center of region AR1, and the contrast evaluation value of the first peripheral region SR1 or the second peripheral region SR2 surrounding the central region CR in region AR1. Therefore, based on the relationship between the contrast evaluation value of the central region CR and the contrast evaluation values ​​of the first peripheral region SR1 or the second peripheral region SR2, it is possible to determine whether the image is in focus on the subject.

[0142] Furthermore, in this embodiment, if the relationship between the contrast evaluation value of the central region CR and the contrast evaluation value of the first peripheral region SR1 or the second peripheral region SR2 indicates a state where the image is not in focus (step S21 / No), and the defocus amount in the second focus detection region 102 corresponding to a part of the image (e.g., face) is the closest value (step S101 / Yes), the focusing lens 31b is driven based on the detection result of the second focus detection (step S105). This improves the focusing accuracy towards the image.

[0143] Furthermore, in this embodiment, if the position control unit 217 cannot detect the subject in the image (step S15 / No), and the defocus amount in each of the adjacent plurality of second focus detection areas 102 is the most recent value (step S201 / Yes), and the most recent defocus amount is detected more than a predetermined number of times in the multiple detection history of defocus amount (step S203 / Yes), the focusing lens 31b is driven based on the detection result of the second focus detection (step S205). This improves the focusing accuracy towards the subject.

[0144] Furthermore, in this embodiment, the camera 1 includes a subject detection unit 212, which calculates the reliability that the subject in the image is a pre-specified predetermined subject (e.g., a bird). When the reliability is less than a threshold and the relationship between the contrast evaluation value of the center region CR and the contrast evaluation value of the first peripheral region SR1 or the second peripheral region SR2 indicates that the image is not in focus on the subject (step S107 / Yes), the position control unit 217 changes the position of the shooting optical system 31 to the closest side. This suppresses the situation where the image is continuously focused on the background.

[0145] Furthermore, in this embodiment, the focus detection unit 215 detects a pre-defined area (AF frame FR1, as referenced) including a plurality of first focus detection areas 101. Figure 13In step (A), the amount of defocus is detected in each of the plurality of first focus detection areas 101, and the evaluation unit 216 calculates a contrast evaluation value in each of the plurality of first focus detection areas 101. The position control unit 217 changes the position of the focusing lens 31b based on the amount of defocus and the contrast evaluation value in the plurality of first focus detection areas 101 (step S209). More specifically, if the amount of defocus in each of the plurality of first focus detection areas 101 is within a predetermined range indicating the vicinity of focus, and the contrast evaluation value in a part of the plurality of first focus detection areas 101 is lower than the contrast evaluation value in other parts of the plurality of first focus detection areas 101 by a predetermined value or more (step S207), the position of the focusing lens 31b is changed to the nearest side position (step S209). As a result, the situation of continuous focusing on the background can be suppressed.

[0146] Furthermore, in the above embodiment, a first AF pixel pair PR1, a second AF pixel pair PR2, and a third AF pixel pair PR3 are configured in each first focus detection region 101. However, it is sufficient to configure at least one of the first AF pixel pair PR1, the second AF pixel pair PR2, and the third AF pixel pair PR3 in each first focus detection region 101. For example, if only the first AF pixel pair PR1 is configured in each first focus detection region 101, the first AF pixel pair PR1 can be configured throughout the entire first focus detection region 101. In this case, the defocus amount can be calculated based on the signals Sig1 and Sig2 from the first AF pixel pair PR1, regardless of the image height of the first focus detection region 101.

[0147] Furthermore, in the above embodiments, in Figure 6 The process determines whether "Bird Mode" is set to shooting mode (step S13), but step S13 can be omitted, and step S15 can determine whether a subject is detected. That is, regardless of the type of subject being detected, if the detection part of the subject is not the pupil (step S17 / No) and the size of the subject detected by the subject detection unit 212 (the size of the subject detection frame) is smaller than the predetermined size (step S19 / Yes), the focus state toward the subject can be determined based on the contrast evaluation value (step S21).

[0148] Furthermore, in the above embodiments, in Figure 6 If the subject detection unit 212 fails to detect the subject (step S15 / No), the second process (step S200) is performed, but the scanning operation can also be performed without performing the second process. That is, if the subject detection unit 212 fails to detect the subject (step S15 / No), the focus detection unit 215 may not perform focus detection.

[0149] Additionally, in the above embodiment, for example, if the release button is half-pressed more than a predetermined number of times within a predetermined time when the shooting mode is set to "Bird Mode", a scanning operation may be performed. This is because if the release button is half-pressed more than a predetermined number of times within a predetermined time, although the user can capture the subject through the viewfinder, the subject detection unit 212 will not be able to detect the subject because the subject image is in a heavily blurred state (severe out of focus).

[0150] Furthermore, in the above embodiment, multiple actions can be performed by operating any one of the operation units 25 in a single operation. For example, when a predetermined button is pressed once, automatic focusing can be performed after the scanning action. This improves user convenience.

[0151] The above-described embodiments are preferred embodiments of the present invention. However, they are not limited thereto, and various modifications can be made without departing from the spirit of the present invention.

[0152] Explanation of reference numerals in the attached figures

[0153] 1 camera

[0154] 2. Camera body

[0155] 3. Change the camera angle

[0156] 11 and 12 focus detection pixels

[0157] 13 shooting pixels

[0158] 21. Fuselage Control Department

[0159] 22 camera components

[0160] 25 Operations Department

[0161] 31. Imaging Optical System

[0162] 31b Focusing lens

[0163] 31c aperture

[0164] 101 First focal detection area

[0165] 102 Second focal detection area

[0166] 212 Subject Inspection Department

[0167] 215 Focus Inspection Department

[0168] 216 Evaluation Department

[0169] 217 Position Control Unit

[0170] AR1 area.

Claims

1. A shooting device, comprising: The imaging unit has a first pixel and a second pixel. The first pixel performs photoelectric conversion on the light that has passed through the optical system and outputs a signal for focus detection. The second pixel performs photoelectric conversion on the light that has passed through the optical system and outputs a signal for image generation. A focus detection unit performs focus detection of the optical system based on a signal output from the first pixel; An evaluation unit evaluates the contrast of an image in a region containing the subject within an image based on a signal output from the second pixel. as well as The control unit controls the focus detection of the focus detection unit based on the evaluation of the evaluation unit.

2. The shooting device according to claim 1, The control unit controls whether to perform focus detection by the focus detection unit based on the evaluation of the evaluation unit.

3. The shooting device according to claim 1 or 2, It includes a subject detection unit that detects a subject from the image. When the subject is detected by the subject detection unit, the control unit performs focus detection by the focus detection unit.

4. The shooting device according to claim 3, When the subject detection unit detects a subject, the evaluation unit evaluates the contrast of the image in the region and performs focus detection by the focus detection unit.

5. The shooting device according to claim 3 or 4, The control unit does not perform focus detection by the focus detection unit when the subject is not detected by the subject detection unit.

6. The imaging device according to any one of claims 1 to 5, When the evaluation unit indicates that the image is not in focus on the subject, the control unit performs focus detection by the focus detection unit.

7. The imaging apparatus according to any one of claims 1 to 6, The focus detection unit performs first focus detection of the optical system in a first region of the imaging surface of the imaging unit, and performs second focus detection of the optical system in a second region that includes the first region and is larger than the first region. The control unit controls which focus detection, the first focus detection or the second focus detection, is to be performed based on the evaluation of the evaluation unit.

8. The shooting device according to claim 7, The focus detection unit detects a first offset between the image plane of the optical system and the imaging plane of the imaging unit in the second region as the first focus detection, and detects a second offset between the image plane of the optical system and the imaging plane of the imaging unit in the second region as the second focus detection. The evaluation unit calculates a first evaluation value related to the contrast of the image for a third region containing the center of the region, and a second evaluation value related to the contrast of the image for a fourth region surrounding the third region within the region.

9. The shooting device according to claim 8, When the relationship between the first evaluation value and the second evaluation value indicates that the image is not in focus on the subject, the control unit performs the second focus detection.

10. The imaging device according to claim 8 or 9, The control unit performs the second focus detection when the relationship between the first evaluation value and the second evaluation value indicates that the subject is not in focus and the second offset in the second region corresponding to the first part of the subject is the closest value.

11. The imaging apparatus according to any one of claims 8 to 10, When the control unit cannot detect the subject in the image, and when the second offset is the most recent value in each of the adjacent second regions, and the most recent second offset is detected more than a predetermined number of times in the detection history of the second offset, the second focus detection is performed.

12. The imaging apparatus according to any one of claims 8 to 11, The system includes a calculation unit that calculates the reliability that the subject in the image is a pre-specified predetermined subject. When the reliability is less than a threshold and the relationship between the first evaluation value and the second evaluation value indicates that the image is not in focus on the subject, the control unit changes the position of the optical system to the closest side.

13. The imaging apparatus according to any one of claims 8 to 12, The focus detection unit detects the first offset in each of the multiple first regions within a pre-defined region comprising the multiple first regions. The evaluation unit calculates an evaluation value related to the contrast of the image in each of the plurality of first regions. The control unit changes the position of the optical system or changes the aperture opening diameter based on the first offset in multiple first regions and the evaluation value.

14. The imaging device according to claim 13, If the first offset in each of the plurality of first regions is within a predetermined range indicating the vicinity of focus, and the evaluation value of a portion of the plurality of first regions is more than a predetermined value smaller than the evaluation value of the other portions of the plurality of first regions, the position of the optical system is changed to the nearest side, or the aperture opening diameter is reduced.