Imaging method, imaging device, and program

The machine learning model detects the attributes and range of the focus object and dynamically adjusts the size of the autofocus area, solving the problem of insufficient focus accuracy in the existing technology and achieving high-precision autofocus in multi-object or moving target scenarios.

CN118633295APending Publication Date: 2024-09-10FUJIFILM CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202280089030.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-01-24
Filing Date
2022-12-06
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

It is difficult for existing camera technology to effectively improve the accuracy of focusing objects during the auto-focusing process, especially in the case of multiple objects or moving targets, which can easily lead to focus misalignment.

Method used

The machine learning model is used to detect the attributes and range of the focus object, dynamically adjust the size of the auto focus area, and perform magnification correction based on the object attributes and motion properties to ensure that the focus area contains the focus object and improve focus accuracy.

Benefits of technology

The focus accuracy is significantly improved, especially in scenes with multiple objects or moving targets, reducing the occurrence of focus misalignment and enhancing the automatic focusing capability of the camera device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118633295A
    Figure CN118633295A
Patent Text Reader

Abstract

An imaging method includes: an imaging step of generating image data by an imaging element; a detection step for detecting, from the image data, a first range including a subject to be focused; a determination step of determining an attribute of the subject; and a determination step for determining, on the basis of the attribute, whether the size of a second range for acquiring the distance information of the subject is smaller than the first range or larger than the first range.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The technology of the present invention relates to an imaging method, an imaging device, and a program. Background Art

[0002] Japanese Patent Application Laid-Open No. 2009-098317 discloses an imaging device that suppresses the occurrence of misfocus caused by the image of the background included in the autofocus target area when performing autofocus using the autofocus target area determined based on the face area obtained by face detection. A face detection unit performs face detection to determine a face area including the image of a person's face. An AF target area determination unit determines the AF target area from the face area. The AF target area determination unit is capable of changing the area ratio of the AF target area to the face area. An AF evaluation value calculation unit, a control unit, and a lens driving unit adjust the imaging position of the subject image based on the photographic optical system according to the contrast of the photographic image data corresponding to the AF target area determined by the AF target area determination unit.

[0003] Japanese Patent Application Publication No. 2021-132362 discloses a subject tracking device capable of reducing erroneous tracking of a subject. The subject tracking device described in Japanese Patent Application Publication No. 2021-132362 comprises: an image acquisition mechanism that sequentially acquires images; a tracking mechanism that tracks a subject detected from an image acquired by the image acquisition mechanism in a plurality of images sequentially acquired by the image acquisition mechanism by comparing the images; and a switching mechanism that switches the time for continuing tracking in the tracking mechanism according to the type of the subject detected from the image. Summary of the invention

[0004] Technical issues to be solved by the invention

[0005] One embodiment of the technology according to the present invention provides an imaging method, an imaging device, and a program capable of improving the focusing accuracy on a subject to be focused.

[0006] Means for solving technical problems

[0007] In order to achieve the above-mentioned purpose, the camera method of the present invention includes: a camera process, generating image data through an imaging element; a detection process, detecting a first range of a subject including a focus object from the image data; a judgment process, judging the attributes of the subject; and a determination process, determining whether the size of a second range used to obtain distance information of the subject is smaller than the first range or larger than the first range according to the attributes.

[0008] The detection step and the determination step are preferably performed using a machine learning model.

[0009] Preferably, the method includes an acquisition step of acquiring distance information of a subject in the second range and a focusing step of bringing the subject into focus based on the distance information.

[0010] Preferably, in the determination step, it is determined which object among two or more objects the attribute of the subject corresponds to, or it is determined which part among parts of two or more objects corresponds to.

[0011] Preferred objects are persons, animals, birds, trams, cars, motorcycles, boats or airplanes.

[0012] Preferably, in the determining step, in the determining step, the size of the second range is made different between a case where the attribute is determined to be the first portion of the first object and a case where the attribute is determined to be the first portion of the second object.

[0013] Preferably, the focusing step can selectively execute a continuous focus mode in which a focusing operation is performed continuously as the focus mode, and the determining step varies the size of the second range depending on whether the focus mode is the continuous focus mode.

[0014] Preferably, the determining step includes a correction step of correcting the size of the second range.

[0015] Preferably, the correction step corrects the size of the second range based on the state of the subject, whether the subject is a moving object, or reliability of determination of the attribute.

[0016] Preferably, in the correction step, when the size of the second range exceeds a first threshold, the second range is reduced, and when the size of the second range is smaller than a second threshold that is smaller than the first threshold, the second range is expanded.

[0017] The camera device of the present invention has an imaging element and a processor for generating image data, and the processor performs the following processing: detection processing, detecting a first range of a subject including a focused object from the image data; judgment processing, judging the attributes of the subject; and determination processing, determining whether the size of a second range used to obtain distance information of the subject is smaller than the first range or larger than the first range based on the attributes.

[0018] The program of the present invention enables a computer to perform the following processing: detection processing, detecting a first range of a subject including a focus object from image data; judgment processing, judging an attribute of the subject; and determination processing, determining whether a size of a second range used to obtain distance information of the subject is smaller than the first range or larger than the first range based on the attribute. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 This is a diagram showing an example of the internal structure of the imaging device.

[0020] Figure 2 This is a diagram showing an example of a light receiving surface of an imaging sensor.

[0021] Figure 3 This is a block diagram showing an example of the functional structure of a processor.

[0022] Figure 4 This is a diagram conceptually showing an example of processing based on machine learning completion model.

[0023] Figure 5 This is a diagram conceptually showing an example of processing by the subject region detection unit.

[0024] Figure 6 This diagram conceptually shows an example of a table.

[0025] Figure 7 This is a diagram conceptually showing an example of processing by the AF area determination unit.

[0026] Figure 8 This is a diagram for explaining the first threshold value used by the magnification correction unit in the correction process.

[0027] Fig. 9 This is a diagram for explaining the second threshold value used by the magnification correction unit in the correction process.

[0028] Fig.10 It is a diagram showing an example of processing by the magnification correction unit.

[0029] Fig.11 This is a flowchart showing an example of an imaging operation by the imaging device.

[0030] Fig.12 This is a diagram showing an example of a plurality of tables stored in a memory in the first modification.

[0031] Fig.13 It is a diagram showing a magnification acquisition process according to the first modification.

[0032] Fig.14 It is a diagram showing the correction processing of the magnification according to the second modification.

[0033] Fig.15 It is a diagram showing the correction processing of the magnification according to the third modification. DETAILED DESCRIPTION

[0034] An example of an embodiment according to the technology of the present invention will be described with reference to the drawings.

[0035] First, the terms used in the following description are explained.

[0036] In the following description, "AF" is the abbreviation of "Auto Focus". "MF" is the abbreviation of "Manual Focus". "IC" is the abbreviation of "Integrated Circuit". "CPU" is the abbreviation of "Central Processing Unit". "ROM" is the abbreviation of "Read Only Memory". "RAM" is the abbreviation of "Random Access Memory". "CMOS" is the abbreviation of "Complementary Metal Oxide Semiconductor".

[0037] “FPGA” is the abbreviation of “Field Programmable Gate Array”. “PLD” is the abbreviation of “Programmable Logic Device”. “ASIC” is the abbreviation of “Application Specific Integrated Circuit”. “OVF” is the abbreviation of “Optical View Finder”. “EVF” is the abbreviation of “Electronic View Finder”.

[0038] As one embodiment of the imaging device, a lens-interchangeable digital camera is taken as an example to explain the technology of the present invention. In addition, the technology of the present invention is not limited to the lens-interchangeable type, and can also be applied to a lens-integrated digital camera.

[0039] Figure 1 An example of the structure of the imaging device 10 is shown. The imaging device 10 is a lens-interchangeable digital camera. The imaging device 10 is composed of a main body 11 and an imaging lens 12 that is replaceably mounted on the main body 11 and includes an autofocus lens 31. The imaging lens 12 is mounted on the front surface side of the main body 11 via a camera side mount 11A and a lens side mount 12A.

[0040] The main body 11 is provided with an operation unit 13 including a dial, a release button, and the like. The operation modes of the imaging device 10 include, for example, a still image capturing mode, a moving image capturing mode, and an image display mode. The operation unit 13 is operated by a user when setting the operation mode. Furthermore, the operation unit 13 is operated by a user when starting still image capturing or moving image capturing.

[0041] Furthermore, the operation unit 13 is operated by the user when selecting a focus mode. The focus modes include an AF mode and an MF mode. The AF mode is a mode in which focus control is performed by setting a subject area selected by the user or a subject area automatically detected by the camera 10 as a focus detection area (hereinafter referred to as an AF area). The MF mode is a mode in which focus control is performed manually by the user operating a focus ring (not shown). In the present embodiment, the subject area and the AF area are respectively set to rectangles.

[0042] The AF mode includes a continuous AF mode (hereinafter referred to as AF-C mode) and a single AF mode (hereinafter referred to as AF-S mode). The AF-C mode is a mode in which focus control is continuously performed (i.e., the position control of the focus lens 31 is continuously performed) while the release button is half-pressed. In addition, the AF-C mode corresponds to the "continuous focus mode in which the focus operation is continuously performed" involved in the technology of the present invention. Furthermore, the so-called continuous means that the focus control on a specific subject is automatically repeated during a plurality of frame periods, and a portion of the plurality of frame periods may include a frame period in which focus control is not performed.

[0043] The AF-S mode is a mode in which focus control is performed once in response to half-pressing the release button, and the position of the focus lens 31 is fixed while the release button is half-pressed. The AF-C mode and the AF-S mode can be switched using the operation unit 13 .

[0044] Furthermore, in the AF mode, the subject of the focus target can be set using the operation unit 13. The subject of the focus target that can be set is an object or a part of an object. The objects of the focus target include, for example, people, animals (dogs, cats, etc.), birds, trains, cars, motorcycles (motorcycles), ships, and airplanes. The part of the focus target is, for example, a person's face, a person's eyes, an animal's eyes, or a bird's eyes. In addition, when the eye is set as the part of the focus target, it can be set which of the right eye and the left eye is prioritized as the subject of the focus target.

[0045] In addition, a viewfinder 14 is provided on the main body 11. Here, the viewfinder 14 is a hybrid viewfinder (registered trademark). The so-called hybrid viewfinder refers to a viewfinder that selectively uses an optical viewfinder (hereinafter referred to as "OVF") and an electronic viewfinder (hereinafter referred to as "EVF"), for example. The user can observe an optical image or a live view image of the subject projected by the viewfinder 14 through a viewfinder eyepiece portion (not shown).

[0046] Furthermore, a display 15 is provided on the back side of the main body 11. An image based on an imaging signal obtained by shooting and various menu screens are displayed on the display 15. The user can also observe a live view image displayed on the display 15 instead of the viewfinder 14.

[0047] The body 11 and the imaging lens 12 are electrically connected to each other by contact between an electrical contact 11B provided on the camera-side mount 11A and an electrical contact 12B provided on the lens-side mount 12A.

[0048] The imaging lens 12 includes an objective lens 30, a focusing lens 31, a rear lens 32, and an aperture 33. The components are arranged in order from the objective lens side along the optical axis A of the imaging lens 12 to form the objective lens 30, the aperture 33, the focusing lens 31, and the rear lens 32. The objective lens 30, the focusing lens 31, and the rear lens 32 constitute an imaging optical system. The type, number, and arrangement order of the lenses constituting the imaging optical system are not limited to Figure 1 Example shown.

[0049] Furthermore, the imaging lens 12 includes a lens drive control unit 34. The lens drive control unit 34 is composed of, for example, a CPU, a RAM, and a ROM, etc. The lens drive control unit 34 is electrically connected to a processor 40 in the main body 11 via the electrical contacts 12B and the electrical contacts 11B.

[0050] The lens drive control unit 34 drives the focus lens 31 and the diaphragm 33 based on the control signal sent from the processor 40. The lens drive control unit 34 controls the drive of the focus lens 31 based on the control signal for focus control sent from the processor 40 in order to adjust the position of the focus lens 31.

[0051] The diaphragm 33 has an opening with a variable opening diameter centered on the optical axis A. To adjust the amount of incident light on the light receiving surface 20A of the imaging sensor 20 , the lens drive control unit 34 controls the drive of the diaphragm 33 based on a diaphragm adjustment control signal sent from the processor 40 .

[0052] Furthermore, the imaging sensor 20, the processor 40, and the memory 42 are provided inside the main body 11. The operations of the imaging sensor 20, the memory 42, the operation unit 13, the viewfinder 14, and the display 15 are controlled by the processor 40.

[0053] The processor 40 is composed of, for example, a CPU, a RAM, and a ROM. In this case, the processor 40 performs various processes based on the program 43 stored in the memory 42. In addition, the processor 40 may be composed of a collection of multiple IC chips. In addition, the memory 42 stores a machine learning model LM that has completed machine learning for subject detection.

[0054] The imaging sensor 20 is, for example, a CMOS image sensor. In the imaging sensor 20, the optical axis A is orthogonal to the light receiving surface 20A, and the optical axis A is configured to be located at the center of the light receiving surface 20A. Light (subject image) passing through the imaging lens 12 is incident on the light receiving surface 20A. A plurality of pixels that generate imaging signals by photoelectric conversion are formed on the light receiving surface 20A. The imaging sensor 20 generates image data PD including imaging signals by photoelectric conversion of the light incident on each pixel, and outputs the image data PD. In addition, the imaging sensor 20 is an example of an "imaging element" involved in the technology of the present invention.

[0055] A color filter array of a Bayer arrangement is arranged on the light receiving surface 20A of the image sensor 20, and one of the color filters of R (red), G (green), and B (blue) is arranged opposite to each pixel. In addition, some of the plurality of pixels arranged on the light receiving surface of the image sensor 20 are phase difference detection pixels that output phase difference detection signals for focus control.

[0056] Figure 2 An example of a light receiving surface 20A of an imaging sensor 20 is shown. A plurality of imaging pixels 21 and a plurality of phase difference detection pixels 22 are arranged on the light receiving surface 20A. The imaging pixels 21 are pixels provided with the above-mentioned color filter. The imaging pixels 21 receive a light beam that passes through the entire area of ​​the exit pupil of the imaging optical system. The phase difference detection pixels 22 receive a light beam that passes through a half area of ​​the exit pupil of the imaging optical system. Figure 2 In the example shown, in the Bayer arrangement, part of the G pixels arranged diagonally are replaced by phase difference detection pixels 22. The phase difference detection pixels 22 are arranged at predetermined intervals in the vertical direction and the horizontal direction on the light receiving surface 20A. The phase difference detection pixels 22 are divided into first phase difference detection pixels that receive a light beam that has passed through a half area of ​​the exit pupil and second phase difference detection pixels that receive a light beam that has passed through the other half area of ​​the exit pupil.

[0057] The plurality of imaging pixels 21 output imaging signals for generating an image of a subject. The plurality of phase difference detection pixels 22 output phase difference detection signals. The image data PD output from the imaging sensor 20 includes imaging signals and phase difference detection signals.

[0058] Figure 3 FIG. 4 shows an example of the functional structure of the processor 40. The processor 40 executes processing by the program 43 stored in the memory 42, thereby realizing various functional units. Figure 3As shown, for example, the processor 40 implements a main control unit 50 , an imaging control unit 51 , an image processing unit 52 , a display control unit 53 , an image recording unit 54 , a subject detection unit 55 , an AF area determination unit 56 , and a distance information acquisition unit 57 .

[0059] The main control unit 50 controls the operation of the imaging device 10 as a whole based on the command signal input from the operation unit 13. The imaging control unit 51 controls the imaging sensor 20 to perform imaging processing for causing the imaging sensor 20 to perform imaging operation. The imaging control unit 51 drives the imaging sensor 20 in a still image imaging mode or a moving image imaging mode. The imaging sensor 20 outputs image data PD generated by imaging through the imaging lens 12. The image data PD output from the imaging sensor 20 is provided to the image processing unit 52, the subject detection unit 55, and the distance information acquisition unit 57.

[0060] The image processing unit 52 acquires the image data PD output from the imaging sensor 20 , and performs image processing including white balance correction, gamma correction, and the like on the image data PD.

[0061] The display control unit 53 displays the image data PD image-processed by the image processing unit 52 as a live view image on the display 15. When the release button is fully pressed, the image recording unit 54 records the image data PD image-processed by the image processing unit 52 in the memory 42 as a recorded image PR.

[0062] The subject detection unit 55 reads the machine learning completed model LM stored in the memory 42. The subject detection unit 55 performs a detection process of detecting a subject area of ​​a subject including a focus object from the image data PD using the machine learning completed model LM, and a determination process of determining the attribute of the subject using the machine learning completed model LM. Specifically, the subject detection unit 55 includes a subject area detection unit 55A that performs a detection process and an attribute determination unit 55B that performs a determination process. In addition, the subject area is an example of the "first range" involved in the technology of the present invention. And, the attribute is, for example, a category for classifying the type of the subject.

[0063] The machine learning completion model LM is composed of, for example, a convolutional neural network, detects objects appearing in the image data PD, and outputs the detection information of the object together with the attributes of the detected object and the detection score. The machine learning completion model LM can detect more than two objects. The objects detected by the machine learning completion model LM are, for example, more than two objects selected from the group consisting of humans, animals, birds, trams, cars, motorcycles, ships, and airplanes.

[0064] Furthermore, the machine learning model LM detects the part of the object, and outputs the detection information of the part of the object together with the attribute of the detected part of the object and the detection score. The machine learning model LM can detect the parts of two or more objects. The parts of the object detected by the machine learning model LM are, for example, two or more objects selected from the group consisting of a human face, a human eye, an animal eye, and a bird eye.

[0065] Based on the detection information output from the machine learning completion model LM, the subject area detection unit 55A detects an area including the subject of the focus object as the subject area according to the object and the part of the object included in the detection information. The subject area detection unit 55A detects an area including the object or the part of the object that matches the category of the subject of the focus object set using the operation unit 13 as the subject area according to the object and the part of the object included in the detection information. For example, when "right eye of a person" is set as the category of the subject of the focus object, the subject area detection unit 55A sets the area including the right eye of a person as the subject area.

[0066] Furthermore, when there are objects or object parts having multiple attributes, the subject region detection unit 55A defines a region including the center of the image represented by the image data PD or the object or object part closest to the initially set AF region as the subject region.

[0067] The attribute determination unit 55B determines the attribute of the subject included in the subject region detected by the subject region detection unit 55A. Specifically, the attribute determination unit 55B determines which object of two or more objects the attribute of the subject corresponds to, or which part of two or more parts of an object the attribute of the subject corresponds to. For example, when the subject included in the subject region detected by the subject region detection unit 55A is an eye, it is determined whether the eye is an eye of a person, an animal, or a bird.

[0068] The AF area determination unit 56 determines the AF area based on the subject area detected by the subject area detection unit 55A and the attribute determined by the attribute determination unit 55B. The AF area is an area for acquiring distance information of the subject. The AF area is an example of the "second range" involved in the technology of the present invention.

[0069] Basically, the AF area determination unit 56 sets the subject area detected by the subject area detection unit 55A as the AF area, but reduces or expands the AF area according to the attribute determined by the attribute determination unit 55B. That is, the AF area determination unit 56 determines whether to make the size of the AF area smaller or larger than the subject area (that is, whether to make the second range smaller than the first range or larger than the first range) according to the attribute. In addition, the AF area determination unit 56 may determine the AF area to be the same size as the subject area (that is, to make the second range the same size as the first range).

[0070] Specifically, the AF area determination section 56 includes a magnification acquisition section 56A and a magnification correction section 56B. The magnification acquisition section 56A acquires a magnification corresponding to the attribute of the object determined by the attribute determination section 55B by referring to a table TB stored in the memory 42. In the table TB, magnifications are set for various attributes of the object.

[0071] The magnification correction unit 56B corrects the magnification acquired by the magnification acquisition unit 56A. That is, the magnification correction unit 56B corrects the size of the AF area. In the present embodiment, the magnification correction unit 56B corrects the magnification using the first threshold and the second threshold. Here, the second threshold is smaller than the first threshold. When the size of the AF area obtained by multiplying the magnification acquired by the magnification acquisition unit 56A exceeds the first threshold, the magnification correction unit 56B corrects the magnification in a manner that reduces the AF area. Furthermore, when the size of the AF area obtained by multiplying the magnification acquired by the magnification acquisition unit 56A is lower than the second threshold, the magnification is corrected in a manner that expands the AF area.

[0072] In this way, the AF area determination section 56 determines the size of the AF area relative to the object area based on the magnification acquired by the magnification acquisition section 56A and corrected by the magnification correction section 56B.

[0073] The distance information acquisition unit 57 performs an acquisition process for acquiring the distance information of the subject in the AF area determined by the AF area determination unit 56. Specifically, the distance information acquisition unit 57 acquires a phase difference detection signal from a portion of the image data PD output from the image sensor 20 corresponding to the AF area, and calculates a defocus amount as distance information based on the acquired phase difference detection signal. The defocus amount indicates the amount of displacement of the focus lens 31 from the in-focus position.

[0074] The main control unit 50 moves the position of the focus lens 31 via the lens drive control unit 34 based on the distance information calculated by the distance information acquisition unit 57, thereby performing a focus process to bring the subject included in the AF area into focus. In this way, in this embodiment, focus control using a phase difference detection method is performed.

[0075] The main control unit 50 performs exposure control, etc. in addition to focus control. Exposure control is a control for obtaining an exposure evaluation value from the image data PD by calculation and adjusting the exposure (shutter speed and aperture value) according to the exposure evaluation value.

[0076] Figure 4 A diagram conceptually showing an example of processing based on a machine learning completion model LM. Image data PD is input to the machine learning completion model LM. The machine learning completion model LM detects the area containing the object shown in the image data PD and the area containing the part of the object, respectively, and outputs them together with the attributes and the detection score. The detection score indicates the correctness of the attributes of the detected object or object part. Figure 4 In the example shown, "people" and "birds" are detected as objects, and "people's faces", "people's eyes (right eyes)", "people's eyes (left eyes)", and "bird's eyes" are detected as parts of objects. The detection score is expressed as a percentage, and the closer it is to 100%, the higher the reliability of the attribute determination. The detection score is an example of the "reliability of attribute determination" involved in the technology according to the present invention. In addition, the detection score may not be displayed on the screen. In addition, a detection frame whose color or shape changes according to the value of the detection score may also be displayed on the screen.

[0077] Figure 5 An example of processing by the subject region detection unit 55A is conceptually shown. The subject region detection unit 55A detects a subject region including a subject to be focused, based on a plurality of objects and object parts detected by the machine learning model LM. Figure 5 The example shown shows a case where "right eye of a person" is set as the category of the subject to be focused. In this example, the subject region detection unit 55A detects the region including the eye (right eye) of a person as the subject region SR. The attribute determination unit 55B determines the attribute of the subject included in the subject region SR. In this example, the attribute determined by the attribute determination unit 55B is "eye of a person".

[0078] The machine learning model LM is a model generated by performing machine learning on the machine learning model using a plurality of teacher data in the learning phase. The machine learning model that has been machine-learned in the learning phase is stored in the memory 42 as the machine learning model LM. In addition, the learning process of the machine learning model is performed, for example, by an external device.

[0079] The machine learning model LM is not limited to a model composed of software, but may be composed of hardware such as an IC chip, etc. Furthermore, the machine learning model LM may be composed of a collection of multiple IC chips.

[0080] Figure 6An example of table TB is conceptually shown. In table TB, magnifications are set for attributes of various objects and parts of objects. The magnification acquisition unit 56A of the AF area determination unit 56 acquires the magnification corresponding to the attribute determined by the attribute determination unit 55B from table TB. In this example, the magnification acquisition unit 56A acquires the magnification "3.0" corresponding to the human eye.

[0081] In Table TB, the magnification is predetermined according to the difficulty of predicting the motion of the object and the size of the object or part. In Table TB, basically, the more difficult it is to predict the motion of the object, the larger the corresponding magnification. And, in Table TB, basically, the smaller the size of the object or the part of the object, the larger the corresponding magnification.

[0082] If the subject area is directly set as the AF area, there is a high possibility that an object such as an animal or bird whose movement is difficult to predict will move out of the AF area after the next frame period. Therefore, for an object whose movement is difficult to predict, the AF area is enlarged by increasing the magnification, and the possibility of the object being included in the AF area is increased even if the object moves. In addition, since the parts of an object such as an eye are tiny and the subject area is small, the possibility of the object being included in the AF area is increased by increasing the magnification to enlarge the AF area.

[0083] Airplanes, trains, and the like are moving objects that move at high speeds, but in most cases, they are shot from a distance and their movements are easily predictable, so the magnification is set to "1.0" in order to use the subject area as the AF area directly.

[0084] Furthermore, in Table TB, the magnification for the bird's eye is made larger than the magnification for the human eye. This is because the movement of a bird is more difficult to predict than that of a human, and the bird's eye is smaller than that of a human. Thus, in order to make the size of the AF area different in the case where the attribute is determined to be the first part of the first object and the case where the attribute is determined to be the first part of the second object, it is also preferable to make the magnification different. In this example, the first object is a "human" and the second object is a "bird". Furthermore, the first part is the "eye" of both the first object and the second object.

[0085] Figure 7 An example of the processing by the AF area determination section 56 is conceptually shown. In this way, the AF area determination section 56 determines the size of the AF area AR based on the magnification acquired by the magnification acquisition section 56A and corrected by the magnification correction section 56B. Figure 7 In the illustrated example, the AF area determination unit 56 enlarges the AF area AR to a size three times that of the subject area SR.

[0086] Figure 8The first threshold used by the magnification correction unit 56B in the correction process is described. The magnification correction unit 56B compares the length LH of the AF area AR in the horizontal direction obtained by multiplying the magnification obtained by the magnification acquisition unit 56A with the first threshold T1H, and when LH>T1H, corrects the magnification in the horizontal direction so that LH≤T1H. Similarly, the magnification correction unit 56B compares the length LV of the AF area AR in the vertical direction obtained by multiplying the magnification obtained by the magnification acquisition unit 56A with the first threshold T1V, and when LV>T1V, corrects the magnification in the vertical direction so that LV≤T1V.

[0087] In this way, Figure 8 In the example shown, the first threshold value is set in the horizontal direction and the vertical direction of the image data PD. The first threshold value T1H is defined based on the length FH of the image data PD in the horizontal direction. For example, the first threshold value T1H is 70% of the length FH. Similarly, the first threshold value T1V is defined based on the length FV of the image data PD in the vertical direction. For example, the first threshold value T1V is 70% of the length FV.

[0088] If the AF area is too large, the processing time required for focus control becomes longer. Therefore, when the AF area is larger than the first threshold, the AF area is reduced in a manner to shorten the processing time. In addition, if the AF area is too large, the possibility that an object other than the subject to be focused is included in the AF area becomes higher. In this way, if an object other than the subject to be focused is included in the AF area, the focus accuracy is reduced. Therefore, there is also an advantage of improving the focus accuracy by reducing the AF area.

[0089] Fig. 9 The second threshold used by the magnification correction unit 56B in the correction process will be conceptually described. Fig. 9 In the example shown, the second threshold value T2H in the horizontal direction and the second threshold value T2V in the vertical direction are determined according to the number of the phase difference detection pixels 22 in the horizontal direction and the vertical direction. This is because if the AF area is too small, the number of the phase difference detection pixels 22 included in the AF area is reduced, thereby reducing the calculation accuracy of the distance information and reducing the focusing accuracy.

[0090] In this example, the second threshold value T2H has a length including four phase difference detection pixels 22 arranged in the horizontal direction. Furthermore, the second threshold value T2V has a length including two phase difference detection pixels 22 arranged in the vertical direction. Since the phase difference detection pixel 22 detects the phase difference in the horizontal direction, it is preferable to set T2H>T2V.

[0091] The magnification correction unit 56B compares the length LH of the AF area AR in the horizontal direction obtained by multiplying the magnification acquired by the magnification acquisition unit 56A with the second threshold value T2H, and when LH<T2H, corrects the magnification in the horizontal direction so that LH≥T2H. Similarly, the magnification correction unit 56B compares the length LV of the AF area AR in the vertical direction obtained by multiplying the magnification acquired by the magnification acquisition unit 56A with the second threshold value T2V, and when LV<T2V, corrects the magnification in the vertical direction so that LV≥T2V.

[0092] Fig.10 An example of processing by the magnification correction unit 56B is shown. Fig.10 In the example shown, the horizontal length LH and the vertical length LV of the AF area AR obtained by multiplying the size of the subject area SR by the magnification acquired by the magnification acquisition unit 56A exceed the first threshold value T1H and the first threshold value T1V, respectively. In this example, the magnification correction unit 56B corrects the magnification so that LH<T1H and LV<T1V.

[0093] Before the magnification correction unit 56B performs correction, if the relationship of T2H<LH<T1H and T2V<LV<T1V is satisfied, the magnification correction unit 56B does not perform correction processing. Figures 8 to 10 In the example shown, T1H≠T1V and T2H≠T2V, but T1H=T1V and T2H=T2V may also be satisfied.

[0094] And, in Fig. 9 In the example shown, the second threshold T2H and the second threshold T2V are determined based on the number of phase difference detection pixels 22, but when the AF area is displayed on the display 15 or the viewfinder 14, the second threshold T2H and the second threshold T2V can be determined based on the minimum size that the user can recognize as a rectangular area.

[0095] Fig.11 A flowchart showing an example of an imaging operation by the imaging device 10 is shown. Fig.11 The case where the AF-C mode is selected as the focus mode and a mode in which the image pickup apparatus 10 automatically detects a subject area is selected is shown.

[0096] First, the main control unit 50 determines whether the release button is half pressed by the user (step S10). When the release button is half pressed (step S10: Yes), the main control unit 50 controls the imaging control unit 51 to make the imaging sensor 20 perform an imaging operation (step S11). The image data PD output from the imaging sensor 20 is input to the subject detection unit 55.

[0097] The subject region detection unit 55A of the subject detection unit 55 performs a detection process of detecting a first range of the subject including the focused object, i.e., the subject region, from the image data PD using the machine learning model LM (step S12). The attribute determination unit 55B performs a determination process of determining the attribute of the subject included in the subject region detected in step S12 (step S13).

[0098] The magnification acquisition unit 56A of the AF area determination unit 56 acquires the magnification corresponding to the attribute determined in step S13 by referring to the table TB (step S14). The magnification correction unit 56B performs a correction process for correcting the magnification acquired in step S14 (step S15). In addition, the magnification correction unit 56B does not perform a correction process when there is no need to correct the magnification. The second range, i.e., the AF area, is determined based on the magnification acquired in step S14 and corrected in step S15 and the size of the first range.

[0099] The distance information acquisition unit 57 performs an acquisition process of acquiring distance information of the subject in the AF area (step S16). The main control unit 50 performs a focus process of bringing the subject included in the AF area into focus based on the distance information acquired in step S16 (step S17).

[0100] The main control unit 50 determines whether the release button is fully pressed by the user (step S18). If the release button is not fully pressed (i.e., it is continuously half-pressed) (step S18: No), the main control unit 50 returns the process to step S11 and causes the imaging sensor 20 to perform an imaging operation again. The processes of steps S11 to S17 are repeatedly executed until it is determined in step S18 that the release button is fully pressed by the main control unit 50.

[0101] When the release button is fully pressed (step S18: Yes), the main control unit 50 causes the imaging sensor 20 to perform an imaging operation (step S19). The image recording unit 54 records the image data PD output from the imaging sensor 20 and processed by the image processing unit 52 as a recorded image PR in the memory 42 (step S20).

[0102] In the above flowchart, step S11 corresponds to the "camera process" involved in the technology of the present invention. Step S12 corresponds to the "detection process" involved in the technology of the present invention. Step S13 corresponds to the "determination process" involved in the technology of the present invention. Step S14 and step S15 correspond to the "determination process" involved in the technology of the present invention. Step S15 corresponds to the "correction process" involved in the technology of the present invention. Step S16 corresponds to the "acquisition process" involved in the technology of the present invention. Step S17 corresponds to the "focusing process" involved in the technology of the present invention.

[0103] In addition, although omitted in the above schematic diagram, the image represented by the image data PD can be displayed on the display 15 or the viewfinder 14 while the release button is half pressed. In this case, a frame representing the AF area can be displayed on the image. The size of the frame can be different from the size of the AF area. For example, by enlarging the frame representing the display area, the user can easily determine whether there is a subject, so the frame of the display area can be displayed larger than the AF area.

[0104] As described above, according to the camera device 10 of the present invention, based on the properties of the subject included in the subject area of ​​the focus object, it is determined whether the size of the AF area is smaller than or exceeds the subject area, thereby improving the focusing accuracy of the focus object in the subject.

[0105] Various modifications of the above-described embodiment will be described below.

[0106] [First Modification]

[0107] In the above-described embodiment, one table TB is stored in the memory 42 . However, a configuration may be adopted in which a plurality of tables are stored in the memory 42 and the magnification factor acquisition unit 56A selects a table for acquiring a magnification factor.

[0108] Fig.12 1 is an example of a plurality of tables stored in the memory 42 in the first variant. The first table TB1 is a table for the AF-C mode. The second table TB2 is a table for the AF-S mode. The first table TB1 has a larger magnification for the same attribute setting than the second table TB2. This is because the AF-C mode is generally used in scenes where the subject moves more than the AF-S mode.

[0109] Fig.13 FIG. 4 shows the acquisition process of the magnification involved in the first modification. Fig.11 In step S14 shown in FIG. 1 , the magnification ratio acquisition unit 56A determines whether the AF-C mode is set (step S140). If the AF-C mode is set (step S140: Yes), the magnification ratio acquisition unit 56A selects the first table TB1 (step S141). If the AF-C mode is not set (that is, if the AF-S mode is set) (step S140: No), the magnification ratio acquisition unit 56A selects the second table TB2 (step S142).

[0110] The magnification factor acquisition unit 56A reads the magnification factor corresponding to the attribute determined in step S13 from the first table TB1 selected in step S141 or the second table TB2 selected in step S142 (step S143 ).

[0111] In this way, the camera device 10 can selectively execute the AF-C mode as the focus mode, and in the determination process involved in this modification, the size of the AF area is different depending on whether the focus mode is the AF-C mode. Thus, the size of the AF area is rationalized according to the focus mode, and the focus accuracy is further improved.

[0112] [Second Modification]

[0113] Fig.14 FIG. 2 shows the correction process of the magnification involved in the second modification. Fig.11 In step S15 shown, the magnification correction unit 56B performs scene recognition based on the image data PD (step S150). In scene recognition, the magnification correction unit 56B can perform scene recognition by considering the attributes of the subject determined by the attribute determination unit 55B. In addition, during scene recognition, a moving object determination is performed to determine whether the subject is an actual moving object.

[0114] The magnification correction unit 56B determines whether the subject to be focused is a moving object (step S151). If the subject to be focused is a moving object (step S151: Yes), the magnification correction unit 56B corrects the magnification so that the AF area becomes larger (step S152). If the subject to be focused is not a moving object (step S151: No), the magnification correction unit 56B does not perform correction.

[0115] In addition, when the subject to be focused is not a moving object, the magnification correction unit 56B may correct the magnification so that the AF area becomes smaller.

[0116] [Third Modification]

[0117] Fig.15 FIG. 4 shows the correction process of the magnification involved in the third modification. Fig.11 In step S15 shown in FIG. 1 , the magnification correction unit 56B acquires the detection score of the attribute of the object determined by the attribute determination unit 55B (step S160 ). The detection score indicates the reliability of the attribute determination.

[0118] The magnification correction unit 56B determines whether the detection score is less than a threshold value (step S161). If the detection score is less than the threshold value (step S161: Yes), the magnification correction unit 56B corrects the magnification so that the AF area becomes larger (step S162). If the detection score is not less than the threshold value (step S161: No), the magnification correction unit 56B does not perform correction.

[0119] In addition, when the detection score is equal to or less than the threshold value, the magnification correction unit 56B may correct the magnification so that the AF area becomes smaller.

[0120] Furthermore, the magnification correction unit 56B can perform magnification correction processing based on the state of the subject to be focused. The state of the subject is the brightness of the subject, the color of the subject, etc. For example, when the brightness of the subject is below a specified value, the magnification correction unit 56B corrects the magnification so that the AF area becomes larger. This is because in a scene with a darker subject, the focusing accuracy decreases when the AF area is smaller. The brightness of the subject can be obtained using the exposure evaluation value calculated by the main control unit 50 during exposure control.

[0121] In the second and third modified examples, the magnification correction unit 56B performs a primary correction process on the magnification for determining the size of the AF area based on the result of determination of whether the subject is a moving object, the value of the detection score, or the state of the subject. Fig.10 Similar to the example shown, the magnification correction unit 56B may perform secondary correction processing on the magnification based on the first threshold value or the second threshold value so that the size of the AF area in the primary correction processing is within the range defined by the first threshold value and the second threshold value.

[0122] [Other Modifications]

[0123] In the above embodiment, the subject detection unit 55 uses the machine learning model LM to perform detection processing and determination processing, but is not limited to the machine learning model LM, and detection processing and determination processing can be performed by image analysis using an algorithm.

[0124] Furthermore, in the above-described embodiment, the main control unit 50 performs focus control in a phase difference detection method based on phase difference detection signals outputted from the plurality of phase difference detection pixels 22, but a contrast detection method based on the contrast of the image data PD may be performed. In the contrast detection method, the distance information acquisition unit 57 acquires the contrast of a portion of the image data PD corresponding to the AF area as distance information.

[0125] Furthermore, the technology of the present invention is not limited to digital cameras, but can also be applied to electronic devices such as smartphones and tablet terminals that have a camera function.

[0126] In the above-mentioned embodiment, as the hardware structure of the control unit, the processor 40 is used as an example, and various processors shown below can be used. Among the above-mentioned various processors, in addition to the CPU which is a common processor that functions by executing software (program), there are also processors such as FPGA whose circuit structure can be changed after manufacturing. FPGA includes a dedicated circuit, which is a processor having a circuit structure specially designed to execute specific processing such as PLD or ASIC.

[0127] The control unit may be composed of one of these various processors, or may be composed of a combination of two or more processors of the same type or different types (for example, a combination of multiple FPGAs or a combination of a CPU and an FPGA). Furthermore, multiple control units may be composed of one processor.

[0128] There are multiple examples of multiple control units composed of one processor. In the first example, as represented by computers such as clients and servers, there is a method in which one processor is composed of a combination of one or more CPUs and software, and the processor functions as multiple control units. In the second example, as represented by a system on chip (System On Chip: SOC), a processor that implements the functions of the entire system including multiple control units by one IC chip is used. In this way, the control unit can use one or more of the above-mentioned various processors to form a hardware structure.

[0129] Furthermore, as the hardware configuration of these various processors, more specifically, a circuit combining circuit elements such as semiconductor elements can be used.

[0130] The recorded contents and illustrated contents shown above are detailed descriptions of the parts involved in the technology of the present invention, and are only an example of the technology of the present invention. For example, the description of the above-mentioned structure, function, action and effect is a description of an example of the structure, function, action and effect of the parts involved in the technology of the present invention. Therefore, without departing from the scope of the main purpose of the technology of the present invention, it is of course possible to delete unnecessary parts of the recorded contents and illustrated contents shown above, or add new elements, or replace them. In addition, in order to avoid complexity and facilitate understanding of the parts involved in the technology of the present invention, in the recorded contents and illustrated contents shown above, descriptions related to technical common sense that does not need to be specifically explained are omitted on the basis of being able to implement the technology of the present invention.

[0131] All documents, patent applications, and technical specifications described in this specification are incorporated herein by reference in the same manner as if each document, patent application, and technical specification was specifically and individually described as being incorporated by reference.

Claims

1. A camera method, comprising: The camera process generates image data through an imaging element; a detection step of detecting a first range of a subject including a focus target from the image data; A determination step of determining the attributes of the subject; and A determining step of determining whether a size of a second range for acquiring distance information of the subject is smaller than the first range or larger than the first range according to the attribute.

2. The imaging method according to claim 1, wherein: The detection process and the determination process are performed using a machine learning completion model.

3. The imaging method according to claim 2, comprising: An acquisition step of acquiring distance information of the subject in the second range; and A focusing step is to bring the subject into a focused state according to the distance information.

4. The imaging method according to any one of claims 1 to 3, wherein: In the determination step, it is determined which object of two or more objects the attribute of the subject corresponds to, or which part of two or more objects the attribute of the subject corresponds to.

5. The imaging method according to claim 4, wherein: The object is a person, an animal, a bird, a tram, a car, a motorcycle, a boat or an airplane.

6. The imaging method according to claim 4 or 5, wherein: The determining step, in the determining step, makes the size of the second range different when the attribute is determined to be the first part of the first object and when the attribute is determined to be the first part of the second object.

7. The imaging method according to claim 3, wherein: The focusing process can selectively execute a continuous focusing mode for continuously performing focusing operations as a focusing mode, The determining step varies the size of the second range depending on whether the focus mode is the continuous focus mode.

8. The imaging method according to any one of claims 1 to 7, wherein: The determining step includes a correcting step of correcting the size of the second range.

9. The imaging method according to claim 8, wherein: The correction step corrects the size of the second range based on the state of the subject, whether the subject is a moving object, or reliability of the determination of the attribute.

10. The imaging method according to claim 8, wherein: In the correction step, when the size of the second range exceeds a first threshold, the second range is reduced; When the size of the second range is smaller than a second threshold value that is smaller than the first threshold value, the second range is expanded.

11. An imaging device comprising an imaging element and a processor for generating image data, The processor performs the following processing: Detection processing of detecting a first range of a subject including a focus object from the image data; Determination processing, determining the attributes of the subject; and A determination process is performed to determine whether a size of a second range for acquiring distance information of the subject is smaller than the first range or larger than the first range according to the attribute.

12. A program that causes a computer to execute the following processing: Detection processing of detecting a first range of a subject including a focus object from the image data; Determination processing, determining the attributes of the subject; and A determination process is performed to determine whether a size of a second range for acquiring distance information of the subject is smaller than the first range or larger than the first range according to the attribute.