Image processing apparatus, control method for image processing apparatus, imaging apparatus, and control method for imaging apparatus

The image processing device improves main subject selection by prioritizing detected subjects over undetected ones, ensuring accurate focus and exposure on user-intended subjects, even when faces are obscured or not directly facing the camera.

WO2024203796A1PCT designated stage expired Publication Date: 2024-10-03CANON KK
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2024/011190
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-29
Filing Date
2024-03-22
Publication Date
2024-10-03

AI Technical Summary

Technical Problem

Existing image processing technologies struggle to accurately select a main subject for focus and exposure adjustments when the subject's face is not detectable, such as when wearing goggles or masks, and fail to consider subjects facing backwards or sideways.

Method used

An image processing device with first and second detection means to identify objects, a determination means to prioritize subjects detected by the first means over those not detected, and a setting mechanism to allow subjects undetected by the first means to be considered as main subjects if detected by the second means, ensuring user-intended subjects are prioritized.

Benefits of technology

Enhances the ability to select appropriate main subjects that reflect user intention, preventing unintended subjects from being focused or exposed, even when faces are obscured or not directly facing the camera.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2024011190_03102024_PF_FP_ABST
    Figure JP2024011190_03102024_PF_FP_ABST
Patent Text Reader

Abstract

The present invention is characterized by providing a determination means for determining a main subject area that is an area of a main subject, and a setting means for receiving switching between a first setting and a second setting on the basis of an operation from a user, and is characterized in that in the case where the first setting is set, the determination means determines the main subject area by setting, as the main subject, a subject for which a first subject is detected by a first detection means, giving preference to a subject for which the first subject is not detected by the first detection means, and in the case where the second setting is set, the determination means determines the main subject area by setting, as the main subject, a subject for which a second subject is detected by a second detection means, even if the first subject is not detected by the first detection means, giving preference to a subject for which the first and second subjects are not detected.
Need to check novelty before this filing date? Find Prior Art

Description

Image processing device, control method for image processing device, imaging device, and control method for imaging device

[0001] The present invention relates to an image processing device that detects a predetermined subject and sets a main subject area for focus adjustment and exposure adjustment, a control method for the image processing device, an imaging device, and a control method for the imaging device.

[0002] As an image processing method for more reliably detecting a specific subject from an image, there is a method for detecting the upper body or head of a person.

[0003] Japanese Patent Application Laid-Open No. 2022-51280

[0004] Japanese Patent Application Laid-Open No. 2022-51280 discloses a technique for detecting the upper body and head of a person, and for a subject whose face has been detected once facing forward, detects and tracks the head even when the subject turns away. Patent Document 1 states that it is possible to appropriately select a main subject even when multiple people are captured in the image.

[0005] However, Japanese Patent Application Laid-Open No. 2022-51280 did not take into account the situation when a person wearing goggles whose face cannot be detected or a person wearing a mask whose face cannot be detected enters the field of view.

[0006] The present invention has been made in consideration of the above-mentioned problems, and aims to provide an image processing device, a control method for an image processing device, an imaging device, and a control method for an imaging device that enable appropriate main subject selection that better reflects the user's intentions.

[0007] In order to solve the above problem, the image processing device of the present invention has a first detection means that detects a first subject from an image, a second detection means that detects a second subject different from the first subject from the image, a determination means that determines a main subject area that is an area of ​​a main subject from at least one of the detection results by the first and second detection means, and a setting means that accepts switching between a first setting and a second setting based on an operation from a user, wherein when the first setting is set by the setting means, the determination means determines the main subject area as a main subject from a subject for which the first subject is detected by the first detection means in preference to a subject for which the first subject is not detected by the first detection means, and when the second setting is set by the setting means, determines the main subject area as a main subject from a subject for which the first subject is not detected by the first detection means in preference to a subject for which the first and second subjects are not detected,

[0008] According to the present invention, it is possible to select an appropriate main subject that better reflects the user's intentions.

[0009] 1 is a block diagram showing the configuration of an imaging device including an image processing device according to a first embodiment. FIG. 1 is a flowchart showing main subject determination processing in the first embodiment. FIG. 2 is a flowchart showing main subject candidate determination processing in the first embodiment. FIG. 3 is a flowchart showing main subject lock determination processing in the first embodiment. FIG. 4 is a flowchart showing main subject determination processing in the first embodiment. FIG. 5 is a flowchart showing detection weight setting processing in the first embodiment. FIG. 6 is a diagram showing priority weights related to position and size in the first embodiment. FIG. 7 is a diagram showing priority weights related to position and size in the first embodiment. FIG. 8 is a diagram showing detection type weights in the second embodiment. FIG. 9 is a diagram showing detection type weights in the second embodiment. FIG. 10 is a diagram showing the effect of the first embodiment. FIG. 11 is a diagram showing the effect of the first embodiment. FIG. 12 is a diagram showing the effect of the first embodiment. FIG. 13 is a diagram showing the effect of the first embodiment. FIG. 14 is a diagram showing the effect of the first embodiment. The present invention is not limited to the above embodiment, and various changes and modifications may be made without departing from the spirit or scope of the present invention.

[0010] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The best mode for carrying out the present invention will now be described in detail with reference to the accompanying drawings.

[0011] As mentioned above, Patent Document 1 does not take into account the situation where a person whose face cannot be detected, such as a person wearing goggles or a person wearing a mask, enters the field of view. Therefore, it is conceivable to set a setting such that even a person whose face cannot be detected, such as a person wearing goggles or a person wearing a mask, is designated as the main subject, and even a subject whose face has never been detected is designated as the main subject if its head has been detected. However, in the above situation, it is not clear whether the subject is facing away from the camera. Therefore, if a subject whose head has only been detected is excluded from the main subject candidates, as in Patent Document 1, a person whose face cannot be detected will also be excluded from the main subject candidates even if the person is facing forward.

[0012] Therefore, the present invention is characterized in that it solves the above problem by allowing the user to set subjects that should be candidates for the main subject.

[0013] 1 shows the configuration of an imaging device such as a video camera that includes an image processing device according to this first embodiment. Note that this embodiment will be described using a video camera as an example, but the present invention can also be applied to other imaging devices such as digital still cameras.

[0014] In FIG. 1 , the imaging optical system for focusing light from a subject includes a first fixed lens 101, a variable magnification lens 102 that moves in the optical axis direction to change magnification, an aperture 103, a second fixed lens 104, and a focus lens 105. The focus lens 105 functions to correct focal plane movement associated with magnification change and also to perform focusing. The image sensor 106 is an image sensor component, and is composed of a CCD or CMOS sensor or the like. The image sensor 106 has multiple pixel units arranged in a matrix. Light beams passing through the imaging optical system are focused on the light receiving surface of the image sensor 106 and converted into signal charges corresponding to the amount of incident light by photodiodes (photoelectric conversion units) in each pixel unit. When capturing video, an electrical signal is periodically output for each frame. Note that the image sensor 106 of this embodiment has multiple photodiodes (two in this embodiment) per pixel to perform commonly known image-surface phase-difference AF (autofocus). The light beam is separated by a microlens and images are formed on two photodiodes (photodiodes A and B), thereby making it possible to obtain two signals, one for imaging and one for phase difference detection. In this embodiment, the signal obtained by adding the signals from the two photodiodes (image signal A+B) is the imaging signal, and the signals from the individual photodiodes (image signal A and image signal B) are two image signals for phase difference detection (AF).

[0015] Because each photodiode receives a light beam that has passed through a different region of the exit pupil of the photographing optical system, image signal B has parallax with respect to image signal A. The AF signal processing unit 113, which will be described later, performs a correlation calculation on the two AF image signals and performs focus detection using a phase difference detection method to calculate the amount of image shift and various reliability information. Note that the configuration of an image sensor compatible with image-surface phase difference AF is not limited to the configuration in this embodiment in which multiple photodiodes are provided per pixel. For example, the image sensor may be configured to have multiple types of focus detection pixels (one photodiode per pixel) that receive light beams that have passed through different regions of the exit pupil of the photographing optical system.

[0016] A CDS / AGC circuit 107 (Correlated Double Sampling / Auto Gain Control) samples the output of the image sensor 106 and adjusts the gain. A camera signal processing circuit 108 performs various image processing on the output signal from the CDS / AGC circuit 107 to generate a video signal. A monitor 109 is configured with an LCD or the like and displays the video signal from the camera signal processing circuit 108. A recording unit 115 records the video signal from the camera signal processing circuit 108 on a recording medium such as a magnetic tape, an optical disc, or a semiconductor memory.

[0017] The zoom drive source 110 moves the variable magnification lens 102, and the focusing drive source 111 moves the focus lens 105. The zoom drive source 110 and the focusing drive source 111 are each composed of an actuator such as a stepping motor, a DC motor, a vibration motor, or a voice coil motor.

[0018] The AF gate 112 passes only signals from the area used for focus detection (focus detection area) among all pixel output signals from the CDS / AGC circuit 107. The AF signal processing circuit 113 extracts high-frequency components from the signal that passed through the AF gate 112 to generate an AF evaluation value. The generated AF evaluation value is output to the control unit 114. The AF evaluation value represents the sharpness (contrast state) of an image generated based on the output signal from the image sensor 106. However, since sharpness varies depending on the focus state (degree of focus) of the imaging optical system, the AF evaluation value ultimately becomes a signal representing the focus state of the imaging optical system. In addition, the AF signal processing unit 113 may use a known phase difference focus detection method to perform a correlation calculation on two AF image signals output from the CDS / AGC circuit 107, calculate a defocus amount, and output the calculated amount to the control unit 114.

[0019] The control unit 114 is composed of a processor such as a CPU or MPU and a storage means such as a memory. The control unit 114 may also include an arithmetic circuit that executes some of the arithmetic functions that the processor performs. The control unit 114 not only controls the overall operation of the video camera, but also controls the focusing drive source 111 to move the focus lens 105 based on the AF evaluation value, defocus amount, etc., thereby performing AF control to adjust the focus.

[0020] The face area detection unit 116 performs a known face detection process on the image signal to detect the face area of ​​a person within the captured image. That is, the face area detection unit 116 detects a predetermined subject from the electrical signal. The detection result is transmitted to the control unit 114. One example of face area detection processing is a method of extracting a skin-color area from the gradation color of each pixel represented by the image data and detecting a face based on the degree of match with a pre-prepared face outline plate. Another method involves using known pattern recognition technology to detect faces by extracting facial features such as the eyes, nose, and mouth. However, the present invention is not limited to a specific face detection processing method, and any method may be used. Furthermore, in this embodiment, a face is selected as the first part to be detected within the subject, but the first part may also be another part, such as an arm or a leg, as long as it is part of the subject. Similar known methods to the face described above can also be used to detect these other parts.

[0021] The head region detection unit 117 detects a predetermined region from the image, with the target subject region being the head region. That is, the head region detection unit 117 detects a predetermined subject (here, the head region) from an electrical signal. In the head region detection of this embodiment, the head region is detected from image data based on learning data, and the detection result is transmitted to the control unit 114. Furthermore, although this embodiment describes a block that detects the head region, it may be any block that detects a region of a person, such as the head region other than the face, the upper body region, the torso region, or the whole body region. Furthermore, although the head region is selected as the second region in this embodiment, this may also be any other region that is part of the subject, as long as it is not the first region.

[0022] The control unit 114 transmits information to the AF gate 112 to set a focus detection area at a position including the face area and head area within the shooting screen based on the detection results of the face area detection unit 116 and the head area detection unit 117. In the first embodiment, if a face is detected, the focus detection area is set based on the position / size of the face area. On the other hand, if no face is detected and only the head area is detected, the focus detection area is set based on the position / size of the head area. Note that if only the head area is detected, the position / size of the subject's face area may be estimated from the head area detection result, and the focus detection area may be set based on the estimated position / size.

[0023] Control unit 114 also includes main subject candidate determination unit 120, main subject decision unit 121, and main subject candidate reset determination unit 123. Main subject candidate determination unit 120 determines whether a subject can be a main subject candidate based on the detection results of the face region detected by face region detection unit 116 and the head region detected by head region detection unit 117. Then, from among the subjects determined to be main subject candidates, a main subject is selected by a main subject decision process described below, and a process is performed to superimpose frames indicating the face region and head region on the captured image, which is then displayed on monitor device 109 or the like.

[0024] In this embodiment, the control unit 114 performs focus adjustment control based on the focus detection results (information such as AF evaluation value and defocus amount) obtained from the focus detection areas set in the face area and head area of ​​the main subject selected by the main subject determination unit 121. However, focus adjustment control may also be performed using the focus detection results of the face area and head area of ​​a subject other than the main subject determined as a main subject candidate by the main subject candidate determination unit 120. Note that focus adjustment control is a well-known technique, so details of the control will be omitted. This focus adjustment control is executed in accordance with a computer program stored in the control unit 114.

[0025] The aperture drive source 118 includes an actuator and its driver for driving the aperture 103. From the signal read by the CDS / AGC circuit 107, a photometric value is acquired by a luminance information detection / calculation circuit 119 to obtain the luminance value of the photometric frame within the screen, and the photometric value is normalized by calculation. The control unit 114 then calculates the difference between the photometric value and a target value set to obtain proper exposure. The control unit 114 then calculates a correction drive amount for the aperture from the calculated difference, and controls the drive of the aperture drive source 118. Note that, in this embodiment, the photometric frame set within the screen is described as being fixed, but it may also be set to track the face or head region of the main subject.

[0026] The operation unit 122 is a variety of operation members that serve as an input unit for accepting operations from the user. The operation unit 122 includes at least some of the following operation units: a shutter button, a main electronic dial, a power switch, a sub electronic dial, a cross key, a SET button, a video button, an AF lock button, a magnification button, a playback button, a menu button, a touch bar, and a touch panel.

[0027] Next, the flow of the main subject determination process in this embodiment will be described with reference to FIGS.

[0028] First, the overall flow of the main subject determination process will be described using Figure 2. This process is executed in accordance with a computer program stored in the camera microcomputer 114. Note that, although the series of processes in this embodiment are assumed to be performed in a system synchronized with the image capture cycle, this is not a limitation.

[0029] First, in S200, control unit 114 acquires setting information for the main subject candidate determination method set by the user from the memory in control unit 114. In this embodiment, there are two main subject candidate determination methods that can be set:

[0030] The first determination method is based on the idea that a subject whose first part (face) cannot be detected even once after entering the frame cannot be a main subject. In other words, this determination method (hereinafter referred to as the first setting) determines that only a subject whose first part (face) is detected at least once in multiple frames within a predetermined period is a candidate for the main subject.

[0031] The second determination method is based on the idea that a subject whose first part (face) cannot be detected even once in multiple frames within a predetermined period after entering the frame can be a main subject, in order to photograph the subject wearing goggles or the like. In other words, if either the first part (face) or a second part (head) different from the first part is detected, the subject having that part becomes a main subject candidate (hereinafter referred to as the second setting).

[0032] Next, in S201, the control unit 114 acquires a face detection result and a head detection result from the face area detection unit 116 and the head area detection unit 117. In this embodiment, the face or head detection results acquired include position information, size information, tilt information, and detection reliability information of the face or head area, but are not limited to this.

[0033] The control unit 114 also determines which face and which head belong to the same person based on the acquired face detection results and head detection results. The control unit 114 also determines, based on position and size, whether the face detection results and head detection results acquired in the current frame belong to the same person as those acquired in the previous frame. If the detection result of a person is determined to be the same as the detection result in the previous frame, the control unit 114 assigns the same ID as the detection result of the same person in the previous frame and performs subsequent processing.

[0034] Next, in S202, the main subject candidate determination unit 120 performs a main subject candidate determination process, in which it is determined for each person among the detected people whether or not the person is a candidate subject that can be the main subject for which focus and brightness are adjusted.

[0035] The main subject candidate determination process will be described in detail later with reference to FIG.

[0036] Next, in S203, the control unit 114 determines whether or not an instruction to designate a subject has been given by the user via the operation unit 122. If it is determined that an instruction to designate a subject has been given, the process proceeds to S204, and if it is determined that an instruction to designate a subject has not been given, the process proceeds to S205. Note that the operation unit 122 may be a touch panel designation method, or may be a designation method that detects a direction or depression, like a cross key.

[0037] Next, in S204, the main subject locking unit 121 performs a main subject locking process, which determines the area of ​​the main subject based on the detection result acquired in S201 and the subject designation instruction information acquired in S203, regardless of the main subject candidate result determined in S202.

[0038] The main subject locking process will be described in detail later with reference to FIG.

[0039] Next, in S205, a main subject determination process is performed to determine a main subject from the main subject candidates determined based on the process of the main subject candidate determination unit.

[0040] The main subject determination process will be described in detail later with reference to FIG.

[0041] Next, in S206, control unit 114 performs frame display control processing on monitor device 109. Specifically, a frame indicating that the subject is a main subject is displayed superimposed on the face or head of the area of ​​the main subject determined in S204 and S205. Also, a frame indicating that the subject is a secondary subject is displayed on the face or head of a subject that was determined to be a main subject candidate by main subject candidate determination unit 120 but not determined to be a main subject (a subject determined to be a secondary subject). Note that in this embodiment, when the main subject is locked in S204, a frame is displayed to the user indicating that the main subject has been locked, while no frame is displayed on the face or head of a person who was determined to be a main subject candidate but not determined to be a main subject.

[0042] Next, in S207, the control unit 114 sets the subject area of ​​the main subject in the AF gate 112 and performs AF control based on the AF evaluation value acquired from the AF signal processing unit 113. The AF evaluation value may use a contrast evaluation value that indicates the contrast or sharpness of the subject, or may use a method that uses a defocus amount to the in-focus position calculated based on a phase difference.

[0043] Next, the subject candidate determination process will be described in detail with reference to FIG.

[0044] First, in S300, the subject candidate determination unit 120 of the control unit 114 obtains the detection result of the first person (hereinafter referred to as the person of interest) from the detection results obtained in S201, and determines whether or not a face has been detected. In this embodiment, the detection result includes position and size information of areas such as the face and head detected in the image, and an ID for distinguishing them from other parts, and whether or not a face has been detected is determined based on the ID.

[0045] If it is determined that a face has been detected, the process proceeds to S301, and if it is determined that a face has not been detected, the process proceeds to S302.

[0046] Next, in S301, the control unit 114 stores information (position, size, etc.) about the detected face area as subject area data of the person of interest, and proceeds to S310.

[0047] Next, in S302, the control unit 114 refers to the setting information of the main subject candidate determination method acquired in S200, and if it is the first setting, proceeds to S303, and if it is the second setting, proceeds to S304.

[0048] Next, in S303, the control unit 114 determines whether or not the subject has already been determined to be a main subject candidate in the previous main subject candidate determination process using the main subject candidate flag. If the subject has already been determined to be a main subject candidate in the previous main subject candidate determination process (the main subject candidate flag is ON), the process proceeds to S304. On the other hand, if the subject has not been determined to be a main subject candidate up to now (at least once within a predetermined period), including the previous frame (the main subject candidate flag is OFF), the process proceeds to S312.

[0049] Next, in S304, it is determined whether or not the detection result of the person of interest includes a head detection result. If a head detection result is included, the process proceeds to S305, and if a head detection result is not included, the process proceeds to S311.

[0050] Next, in S305, information (position, size, etc.) about the detected head area is stored as subject area data of the person of interest, and the process proceeds to S310.

[0051] When storing the head detection region as subject region data for the person of interest in S305, it is effective to shift the head detection region slightly downward (toward the body relative to the head) from the stored position. The reason for this is that while the head region detection unit 117 can detect a person even when facing backwards or sideways, the back and sides of a person's head tend to have lower contrast than the face, making it difficult to focus on. Furthermore, there is a possibility that the brightness will be adjusted to the hair at the back of the head, resulting in a setting that is too bright for the subject as a whole. Specifically, by shifting the position of the subject region toward the body by approximately one-quarter of the head detection size, it becomes more likely that the contrast of the neck and collar will be captured, including not only the hair at the back of the head but also the nape of the neck, which is likely to improve the accuracy of focusing and exposure control.

[0052] Next, in S310, since the face detection area or head detection area is substituted for the subject area in S301 or S305 and the subject area becomes a main subject candidate, the main subject candidate flag is set to ON and the process proceeds to S312.

[0053] On the other hand, in S311, if it is determined that there is no face detection result or head detection result in an area that was a main subject candidate area in the previous frame, it is determined that it is not a main subject candidate, the main subject candidate flag is turned OFF, and the process proceeds to S312. Note that the timing for turning OFF the main subject candidate flag may be when there is no face detection or head detection result even once, or when there is no face detection or head detection result several times in a row (a predetermined number of frames).

[0054] Next, in S312, it is determined whether or not all the detection results acquired in S201 have been checked. If all have been checked, the process ends; if not, the next detection result is treated as a person of interest and the process returns to S300.

[0055] In the first setting, a subject becomes a main subject candidate only if it is determined that a face has been detected in the processing of S300, or if the main subject candidate flag is ON in the processing of S303 and a head has been detected in S304. This realizes the idea that a subject whose face cannot be detected even once after entering the frame under the above conditions cannot become a main subject. This is because a subject whose face cannot be detected even once is not facing the camera, and is unlikely to be a subject that you want to adjust the focus and brightness on as a main subject in photography.

[0056] Furthermore, in the case of the second setting, a subject becomes a main subject candidate only if it is determined that a face has been detected in the processing of S300 or that a head has been detected in S304. This realizes the idea that even a subject whose face cannot be detected even once after entering the frame due to the conditions described above can become a main subject. The second setting is a setting for when you want to photograph a subject whose face cannot be detected, such as a goggle or mask, so it is irrelevant whether or not the face has been detected once. Furthermore, even if only the head of a subject has been detected, there is a possibility that the subject may be a subject for which you want to adjust the focus and brightness as the main subject in photography.

[0057] The above processing prevents unwanted people who should not be the main subject from becoming candidates for the main subject among the faces and heads detected in the screen when the first setting is used. Furthermore, while it is possible to prevent the focus and brightness from being adjusted to an unintended person, when the second setting is used, it is possible to set even a subject whose face cannot be detected, such as a person wearing goggles, as a main subject candidate. This improves the likelihood that the user will be able to adjust the focus and brightness to the person they intend.

[0058] Next, a main subject lock determination method performed by main subject determination section 121 of control section 114 will be described with reference to FIG.

[0059] First, in S401, it is determined whether or not a face detection result or a head detection result, which is the detection result acquired in S201, is present within a predetermined range from the position (touch position in the case of a touch panel) within the image (within the screen, in the XY plane) of the subject accepted by the operation unit 122. The predetermined range may be within the size of the detected face or head, or may include an area outside the size of the detected face or head, such as within a distance twice the size of the face or head. Furthermore, a condition may also be that the depth direction (Z direction perpendicular to the XY plane) from the current subject is also within a predetermined distance. If a face detection result or a head detection result is present within the predetermined range, processing proceeds to S402; if not, processing proceeds to S409.

[0060] Next, in S402, it is determined whether there are multiple face detection results and head detection results that are determined to be within a predetermined range of the touch position, and if it is determined that there is only one person, the process proceeds to S403, and if it is determined that there are multiple people, the process proceeds to S404.

[0061] Next, in S403, it is determined whether the reliability of the face detection result and head detection result determined to be within a predetermined range of the touch position is equal to or greater than a threshold value. If it is determined that the reliability is equal to or greater than the threshold value, the process proceeds to S405; if it is determined that the reliability is less than the threshold value, the process proceeds to S406.

[0062] Next, in S404, it is determined whether the sizes of all face detection results and head detection results determined to be within a predetermined range of the touch position are equal to or smaller than a threshold value. If it is determined that they are equal to or smaller than the threshold value, the process proceeds to S407, and if it is determined that there is a detection result with a size equal to or larger than the threshold value, the process proceeds to S408.

[0063] Next, in S405 and S408, the face detection result or head detection result closest to the touched position within the range of the touched position is locked. If a face detection result is available, the face detection result is used, and if there is no face detection result but there is a head detection result, the head detection result is used.

[0064] Next, in S406, S407, and S409, the features of the subject are extracted based on the touch position, and an object other than the person's face or head is tracked (hereinafter referred to as object tracking).

[0065] Next, in S410, the locked subject is determined to be the main subject, and the main subject candidate flag of the locked person is set to ON.

[0066] Next, in S411, the main subject candidate flags of subjects other than the locked person are turned OFF, thereby preventing subjects other than the locked person from becoming candidates, and the process ends.

[0067] The reason for performing object tracking in S406 when it is determined in SS403 that the reliability is less than the threshold is that if the reliability of head detection is low, such as when part of the head is out of frame, the detection position and size may become unstable, which may result in unstable AF.

[0068] Therefore, when face detection is in progress or head detection reliability is low, the subject at the position specified by the user is temporarily tracked as an object by specifying the tracking area using color and brightness information at the time of touch. Also, if a face or a highly reliable head is detected nearby during tracking, the tracking target can be switched to the face or head, reducing AF instability.

[0069] Furthermore, in S404, the reason for performing object tracking when there are multiple small faces or heads detected within the specified range of the touch position is that there is a possibility that an unintended person will become the tracking target due to a shift in the touch position or other reasons at the position specified by the user. Therefore, the subject at the position specified by the user is temporarily tracked as an object, and then when a face or head of a specified size or larger is detected within the specified range, the tracking target is switched to the face or head. This reduces the possibility of focusing on an unintended person.

[0070] Next, the main subject determination process performed by main subject determination unit 121 on the main subject candidate region in S205 will be described with reference to FIGS. 5, 7A, and 7B.

[0071] First, in S501, the setting information of the main subject candidate determination method acquired in S200 is referenced, and if it is the first setting, the process proceeds to S502, and if it is the second setting, the process proceeds to S503.

[0072] Next, in S502, a priority weight relating to the position is set based on position weights 1 and 2 according to the distance from the center of the screen of the main subject candidate region, and the process proceeds to S504.

[0073] On the other hand, in S503, a priority weight relating to the position is set based on position weights 3 and 4 according to the distance from the center of the screen of the main subject candidate region, and the process proceeds to S505.

[0074] Here, the above-mentioned position weights 1, 2, 3, and 4 will be explained with reference to FIG. 7A.

[0075] FIG. 7A shows how the position weight is calculated depending on the distance from the center position.

[0076] In the figure, the solid line represents a graph for calculating the priority weight set in S502, and the dotted line represents a graph for calculating the priority weight set in S503.

[0077] When the setting information for the main subject candidate determination method is the first setting, the weight related to position is position weight 1 up to a distance of 1 from the center of the screen, and decreases linearly from position weight 1 to position weight 2 as the distance from 1 becomes distance 2. Furthermore, when the distance from the center is distance 2 or more, the weight is fixed at position weight 2.

[0078] When the setting information for the main subject candidate determination method is the second setting, the weight related to position is position weight 3 up to a distance of 3 from the center of the screen, and decreases linearly from position weight 3 to position weight 4 as the distance from 3 becomes 4. Furthermore, when the distance from the center is 4 or more, the weight is fixed at position weight 4.

[0079] Next, in S504, a weight is set according to the size of the main subject candidate region, and the process proceeds to S506.

[0080] The above-mentioned size weights 1, 2, 3, and 4 will be explained with reference to FIG. 7B.

[0081] FIG. 7B shows how the size weight is calculated depending on the size of the main subject candidate region.

[0082] In the figure, the solid line represents a graph for calculating the priority weight set in S504, and the dotted line represents a graph for calculating the priority weight set in S505.

[0083] When the setting information for the main subject candidate determination method is the first setting, if the size of the detection area is size 1 or less, the weight related to size is size weight 1, and increases linearly from size weight 1 to size weight 2 as the size increases from size 1 to size 2. Furthermore, if the size increases to size 2 or more, the weight is fixed at size weight 2.

[0084] When the setting information for the main subject candidate determination method is the second setting, the size weight is set to size weight 3 when the size of the detection area is size 3 or less, and increases linearly from size weight 3 to size weight 4 when the size is between size 3 and size 4. Furthermore, when the size is size 4 or greater, the weight is fixed at size weight 4.

[0085] In the second setting, subjects consisting of only the head are also considered as main subject candidates, which may result in a larger main subject candidate area than in the first setting, and therefore increases the possibility of an unintended subject being selected as the main subject. Considering that photographers tend to photograph the main subject relatively large and relatively centered, they set the weight of larger, more central subjects to be heavier than in the first setting, as shown in Figures 7A and 7B. This makes it possible to prevent an unintended subject from being selected as the main subject.

[0086] Note that with respect to position weights 1 to 4, distances 1 to 4, size weights 1 to 4, and sizes 1 to 4 in the figure, the weights of subjects closer to the center of the screen are heavier in the second setting than in the first setting. Furthermore, as long as the weights are set so that larger subjects are weighted more, the shape of the graph shown in the figure and the number and positions of change points are not limited. Furthermore, while this embodiment employs weights that change linearly as described above and weights that clip the minimum and maximum, any weight setting method is acceptable as long as it does not deviate from the idea of ​​assigning heavier weights to subjects closer to the center and larger sizes.

[0087] Next, in S506, a weight is set according to the detection state, and the process proceeds to S507.

[0088] The weight setting process according to the detection state will be described later with reference to FIG.

[0089] Next, in S507, the priority of the region of interest is calculated according to the weight set in S502 to S506.

[0090] As an example of a method for calculating the priority, the following formula is used to add the above-mentioned weights at a predetermined ratio: Priority = α × (position weight) + β × (size weight) + γ × (detection weight), where α, β, and γ are coefficients by which each weight is multiplied, and can be set freely.

[0091] The priority calculation is not limited to the above.

[0092] Next, in S508, it is determined whether or not all the acquired detection results have been checked. If all have been checked, the process ends; if not, the next detection result is treated as a person of interest and the process returns to S501.

[0093] Next, in S509, the area with the highest priority among the priorities of the areas calculated in S507 is determined as the main subject area.

[0094] When determining the main subject area, the main subject candidate area with the highest priority may be determined as the main subject area each time processing is performed for each frame, or a specific main subject candidate area may be determined as the main subject area when it has the highest priority for a predetermined period of time.

[0095] In addition, a main subject candidate area whose priority falls below a predetermined threshold may be processed with the main subject candidate flag set to OFF so that it does not become a main subject candidate area until it is determined that there is a face detection result again in a subsequent frame (processing in S300 results in Yes).

[0096] In this embodiment, weights related to position and size are used as parameters for determining the main subject. However, the parameters are not limited to these, and may be based on the reliability and orientation of the face and head detection results, whether the face and head are detected by both means or only one of them, etc. Furthermore, if a subject is locked as the main subject in S204, it may always be determined as the main subject.

[0097] Next, the weight setting according to the detection state in step S506 will be described with reference to FIG.

[0098] First, in S601, the control unit 114 refers to the setting information of the main subject candidate determination method acquired in S200, and if it is the first setting, proceeds to S602, and if it is the second setting, proceeds to S603.

[0099] Next, in S602, the subject candidate determination unit 120 of the control unit 114 acquires a person of interest from the detection result acquired in S201, and determines whether a face has been detected.

[0100] In the process of S602, the determination may be made based on whether the face area detection unit 116 has detected a face, or even if a face has not been detected, the determination may be made based on whether an pupil area detection unit (not shown) in the face has detected pupils. For example, in the case of a person wearing sunglasses, even if the face area detection unit 116 cannot detect the face, the pupil area detection unit can detect the pupils based on the area detected by the head area detection unit 117. This is because this is considered to be equivalent to a situation in which a face is detected.

[0101] If it is determined that a face has been detected, the process proceeds to S603, and if it is determined that a face has not been detected, the process proceeds to S605.

[0102] Next, in S603, a timer that stores the period of time during which no face has been detected and only the head has been detected is reset. This timer is compared with TH1 and TH2 in S605 and S607, which will be described later.

[0103] Next, in S604, the face / head detection weight is set to Pr1, and the process ends.

[0104] Next, in S605, it is determined whether the state in which the face has not been detected and only the head is present has lasted for less than TH1. If it has lasted less than TH1, the process proceeds to S606, and if TH1 or more has passed, the process proceeds to S607.

[0105] Next, in S606, the face / head detection weight is set to Pr2, and the process ends.

[0106] Next, in S607, it is determined whether the state in which the face has not been detected and only the head is present has lasted for less than TH2. If it has lasted less than TH2, the process proceeds to S608, and if TH2 or more has passed, the process proceeds to S609.

[0107] Next, in S608, the face / head detection weight is set to Pr3, and the process ends.

[0108] Next, in S609, the face / head detection weight is set to Pr4, and the process ends.

[0109] The above-mentioned detection weights Pr1 to Pr4 have a relationship of Pr1≧Pr2≧Pr3≧Pr4, and when the main subject candidate determination method is set to the first setting, the priority settings of the detection weights are decreased over time.

[0110] As an example, if Pr1 > Pr2 > Pr3 > Pr4 and TH2 > TH1 ≠ 0, when a face is detected, Pr1 is the highest detection weight, and the subject with a detected face is prioritized. When a face cannot be detected and only the head remains, the detection weight drops to Pr2. Therefore, if there are other subjects with detected faces, the subject with the detected face is likely to be assigned a higher detection weight and given a higher priority. Furthermore, if a state in which there are no face detection results continues for a predetermined time period equal to or greater than TH1, the detection weight drops further to Pr3 after the predetermined time period has elapsed. By setting a time threshold for TH2 and a detection weight for Pr3, if the priority is only lowered because a face cannot be detected temporarily, the weight is set to Pr2. On the other hand, if the priority is lowered because a face cannot be detected for a predetermined period of time, the weight is set to Pr3, making it possible to distinguish between the two. Furthermore, if a state in which there are no face detection results continues for a time period equal to or greater than TH2, the detection weight drops to Pr4, the lowest.

[0111] Note that Pr4 may be set to a value that ensures that the priority in S509 is less than a predetermined threshold value, and by setting the priority below the threshold value, a subject that has been facing away for a long time can be prevented from becoming the main subject regardless of the position or size of the area until a face is detected again. This makes it possible to prevent an unintended subject from becoming the main subject.

[0112] As another example, if Pr1 = Pr2 > Pr3 ≥ Pr4, then from immediately after the state where the face is not detected and only the head is detected until TH1, the same detection weight as for a subject where a face is detected is used for calculations. This is because, immediately after the state where only the head is detected, it is expected that a face will be detected again, and control is performed to prevent the subject where only the head is detected from unintentionally moving away from the main subject.

[0113] Furthermore, in the above example, Pr1 is not changed in either the first or second setting, but a method of setting Pr1 to a larger value when the second setting is used than when the first setting is used is also conceivable. This is because the user may have set the setting so that even subjects with heads up are selected as the main subject, and so may want to prioritize subjects whose faces cannot be detected over subjects whose faces can be detected.

[0114] The above processing will be explained with reference to FIGS. 9A to 9G.

[0115] 9A to 9D show the case where the main subject candidate determination method is set to the first setting, and FIGS. 9E to 9G show the case where the main subject candidate determination method is set to the second setting.

[0116] 9A shows a scene in which a person 901 walks into the frame alone, facing away from the camera. In this case, it is unlikely that the person 901 is being photographed as the main subject, so no region is set as a main subject candidate region and no frame is displayed.

[0117] 9B shows a case where person 901 is facing forward. In this case, since the person is facing the camera, it is considered that the person is being photographed as the main subject, and an area is set for person 901 as a main subject candidate area, and a frame 902 is displayed. Also, since there is only one main subject candidate, person 901 is automatically selected as the main subject.

[0118] Next, Figure 9C shows a case where person 901 turns away from the forward facing state shown in Figure 9B. In this case, since person 901 has once turned forward, it is considered highly likely that person 901 will turn forward again, so the area continues to be set as a main subject candidate area. By continuing to set the area as a main subject candidate area, focus on person 901 continues, and it is possible to prevent focus and brightness from being adjusted to an unintended area.

[0119] 9D shows a case where person 901 continues to face backward. In this case, since person 901 is considered unlikely to be the main subject, the weight according to the detection state is set to Pr2, Pr3, or Pr4, which is a lower value than when a face is detected (when the person is facing forward), as determined in S605 or S607. Priorities are calculated in S507 using the weights set in the above process. However, for main subject candidate areas whose priorities are below a predetermined threshold as a result of the calculated priorities, the main subject candidate flag may be set to OFF so that the area will not become a main subject candidate area until it is determined that a face detection result is present again in a subsequent frame (Yes in S300).

[0120] The above processing prevents a subject that continues to look away from the user when the second setting is used from continuing to be a candidate for the main subject, thereby preventing the focus and brightness from being adjusted to an unintended subject area.

[0121] Next, FIG. 9E shows a scene in which there is a person wearing goggles whose face cannot be detected but whose head can be detected, and there is a subject in the background whose face can be detected.

[0122] The situation is such that the face of person 903 cannot be detected, but the head can be detected, and the faces and heads of two people 904 and 905 in the background can be detected.

[0123] In the above-described scene, the main subject is determined only by position and size because the same detection weight is set for both the head-only subject and the face-detected subject. Therefore, the largest person 903 at the center is selected as the main subject, making it possible to adjust the focus and brightness to the subject as intended by the user. Furthermore, because the priority is not lowered even if the head-only state continues, it is possible to avoid the head detection tracking being cut off after a certain time has passed.

[0124] Furthermore, as mentioned above, when the second setting is used, if Pr1 is set to a larger value than when the first setting is used, the possibility that person 904 or person 905 will become the main subject becomes lower, and the possibility that person 903 will continue to be the main subject becomes higher.

[0125] 9F shows a situation in which person 906 and person 907 are photographed, but the faces of both people cannot be detected and only the heads are detected. Fig. 9G shows a situation in which person 906 has been framed out of the state shown in Fig. 9F, leaving only person 907, and person 907 is being photographed as the main subject.

[0126] 9F, the determination in S601 indicates that tracking by the head of neither person 907 nor person 908 is discontinued at a specific time. Therefore, even after person 906 leaves the frame in FIG. 9G, person 907 can be immediately transferred to as the main subject, and the focus and brightness can be adjusted to person 907, making it possible to record natural video.

[0127] As described above, it is possible to increase the possibility that the intended subject will be the main subject according to the user's settings, and reduce mistakes in photography.

[0128] Second Embodiment Next, a second embodiment of the present invention will be described. In the first embodiment described above, the weights are changed according to the detection states of the first region (face region) and regions different from the first region (head region, upper body region, trunk region, whole body region, etc.). Furthermore, the detection weights used in priority calculation are changed according to which region of a person is detected.

[0129] In recent years, it has become possible to detect not only people but also various types of subjects such as animals, vehicles, etc. When a subject set by the user as the subject they want to prioritize (hereinafter referred to as the priority subject) and other subjects (hereinafter referred to as the non-priority subjects) are detected, some cameras can set the priority subject as the main subject, allowing them to focus and adjust brightness to the subject intended by the user.

[0130] However, in situations where there are priority and non-priority subjects in the frame, but the non-priority subject is clearly more suitable as the main subject depending on the scene, it was necessary to change the setting each time.

[0131] This embodiment is characterized in that even in the above-mentioned situation, the intended subject is made the main subject by prioritizing the subject set by the user, while non-priority subjects that are plausible as the main subject are made the main subject depending on the scene without having to change the settings.

[0132] 13 shows the configuration of an imaging device such as a video camera including an automatic focus adjustment device according to the second embodiment. Note that blocks with the same numbers as those in FIG. 1 are the same as those in FIG. 1, and therefore their explanations will be omitted.

[0133] The person area detection unit 131 performs a known person detection process on the image signal to detect the area of ​​a person (such as the person's face area, head area, upper body area, torso area, and whole body area) within the captured image. The detection results are transmitted to the control unit 114. One example of the person area detection process is to extract a skin color area from the gradation color of each pixel represented in the image data and detect the person area based on the degree of match with a prepared person outline plate. Another method is to detect the person area from the image data based on learning data. Another method is to use known pattern recognition technology to extract facial features such as the eyes, nose, and mouth for face detection. However, the present invention is not limited to the method of person detection process, and any method may be used.

[0134] The animal region detection unit 132 performs a known animal detection process on the image signal to detect animal regions (such as the animal's face region, head region, upper body region, torso region, and whole body region) within the captured image. The detection results are transmitted to the control unit 114. Examples of animal region detection processes include a method of detecting an animal region based on the degree of matching with a pre-prepared animal outline plate. Another method is to detect an animal region from image data based on learning data. Another method is to detect an animal region from image data based on learning data. Other methods include a method of detecting an animal's face region by extracting facial features such as the eyes, nose, and mouth using known pattern recognition technology. However, the present invention is not limited to the method of human detection processing, and any method may be used.

[0135] The vehicle region detection unit 133 performs a known vehicle detection process on the image signal to detect the vehicle region (the entire vehicle, the driver, tires, the area around the windshield, etc.) within the captured image. The detection results are transmitted to the control unit 114. One example of the vehicle region detection process is a method of detecting the vehicle region based on the degree of matching with a vehicle outline plate prepared in advance. Another method is to detect the vehicle region from image data based on learning data. Another method is to detect the vehicle region from image data based on learning data. There are also other methods, such as using known pattern recognition technology to detect the vehicle region by extracting feature points of the vehicle, but the present invention is not limited to the method of vehicle detection process and any method may be used.

[0136] Next, in the main subject determination process of Fig. 2, S200 in the first embodiment had the first and second settings, but in this embodiment, the following three settings are used: The first setting (referred to as the third setting to distinguish it from the first embodiment) is a setting that prioritizes areas of people (hereinafter referred to as the people priority setting). The second setting (fourth setting) is a setting that prioritizes areas of animals such as dogs, cats, and birds (hereinafter referred to as the animal priority setting). The third setting (fifth setting) is a setting that prioritizes areas of vehicles such as cars, motorcycles, and trains (hereinafter referred to as the vehicle priority setting).

[0137] In this embodiment, the above types are detected, but the present invention is not limited to the above as long as there is a setting for switching the type of subject to be detected. Also, settings may be made to switch between different types of animals, such as the first setting being for dogs, the second setting being for cats, and the third setting being for birds.

[0138] Furthermore, in this embodiment, all types of objects can be detected regardless of which of the three settings above is selected, but, for example, only when the people priority setting is selected, people are given top priority, so processing may be performed so that subjects other than people are not detected.

[0139] In the first embodiment, S201 is a process in which the control unit 114 acquires a face detection result and a head detection result from the face area detection unit 116 and the head area detection unit 117. However, in the present embodiment, the process is a process in which the control unit 114 acquires a person detection result, an animal detection result, and a vehicle detection result from the person area detection unit 131, the animal area detection unit 132, and the vehicle area detection unit 133, respectively.

[0140] In the following description, the same processes as those described in the first embodiment are denoted by the same numbers and the description thereof will be omitted.

[0141] Next, the flow of the main subject candidate determination process, which is a feature of this embodiment, will be described with reference to FIG.

[0142] This processing is executed in accordance with a computer program stored in the camera microcomputer 114. Note that, although the series of processing in this embodiment is assumed to be performed in a system synchronized with the image capture cycle, this is not limiting.

[0143] First, in S1000, the subject candidate determination unit 120 of the control unit acquires the first detection result (hereinafter referred to as a subject of interest) from the detection results acquired in S201, and determines whether a person has been detected.

[0144] If it is determined that a person has been detected, the process proceeds to S1001, and if it is determined that a person has not been detected, the process proceeds to S1002.

[0145] Next, in S1001, the area of ​​the detected person is stored as subject area data (position, size, etc.) of the target subject, and the process proceeds to S310.

[0146] Next, in S1002, it is determined whether or not the detection result of the target subject includes an animal detection result. If an animal detection result is included, the process proceeds to S1003, and if an animal detection result is not included, the process proceeds to S1004.

[0147] Next, in S1003, the area of ​​the detected animal is stored as subject area data of the target subject, and the process proceeds to S310.

[0148] Next, in S1004, it is determined whether or not the detection result of the target object includes a vehicle detection result. If a vehicle detection result is included, the process proceeds to S1005. If a vehicle detection result is not included, it is determined that nothing has been detected in the target area, and the process proceeds to S311.

[0149] Next, in S1005, the area of ​​the detected vehicle is stored as subject area data of the target subject, and the process proceeds to S310.

[0150] Next, the main subject determination process in the second embodiment will be described with reference to the flowchart in FIG. 14 and the graphs in FIGS. 8A to 8C.

[0151] First, in S1401, it is determined whether the setting information of the main subject candidate determination method is people priority. If it is determined that it is people priority, the process proceeds to S1402, and if it is determined that it is not people priority, the process proceeds to S1403.

[0152] Next, in S1402, the detection type weights are set so that Pr_H>Pr_A and Pr_H>Pr_V, and the process proceeds to S1406.

[0153] Next, in S1403, it is determined whether the setting information of the main subject candidate determination method is animal priority. If it is determined that it is animal priority, the process proceeds to S1404, and if it is determined that it is not animal priority (in this embodiment, it is determined that it is vehicle priority), the process proceeds to S1405.

[0154] Next, in S1404, the detection type weights are set so that Pr_A>Pr_H>Pr_V, and the process proceeds to S1406.

[0155] Next, in S1405, the detection type weights are set so that Pr_V>Pr_H>Pr_A, and the process proceeds to S1406.

[0156] Next, in S1406, a weight is set according to the detection type, and the process proceeds to S507.

[0157] This process will be described later with reference to FIG.

[0158] Next, the priorities Pr_H, Pr_A, and Pr_V set in S1402, S1404, and S1405 will be described in detail with reference to FIGS. 8A to 8C.

[0159] 8A is a diagram showing the priorities when the setting information for the main subject candidate determination method is set to people priority setting. When people priority setting is set, the priority weight Pr_H for people is set to the largest value, and the priorities Pr_A and Pr_V for animals and vehicles are set to values ​​lower than Pr_H. In this embodiment, since people priority setting is used, the priorities Pr_A and Pr_V for animals and vehicles are set to the same value, but they do not necessarily have to be the same value as long as they are set to a value lower than Pr_H.

[0160] In addition, the priorities Pr_A and Pr_V of animals and vehicles must be set so that the priority when an animal or vehicle is detected at the center of the screen and at its largest size is higher than the priority of the smallest person, which is calculated using weights based on the distance from the center of the screen and the size of the subject.

[0161] By setting it as described above, the subject set by the user is given priority as the main subject, while a non-priority subject that is plausible as the main subject can be set as the main subject depending on the scene without having to change the settings. Therefore, even in situations where a non-priority subject is clearly more suitable as the main subject depending on the scene, it is possible to adjust the focus and brightness to the intended subject as the main subject without having to change the settings each time.

[0162] 8B is a diagram showing the priorities when the setting information for the main subject candidate determination method is set to animal priority. When animal priority is set, the priority weight Pr_A for animals is set to the largest value, and the priorities Pr_H and Pr_V for people and vehicles are set to values ​​lower than Pr_A. Furthermore, the priority weight Pr_H for people is set to a higher value than the priority weight Pr_V for vehicles, which are non-priority subjects other than people. This is based on the idea that even when animal priority is set, people are often the main subject when compared to the same non-priority subjects, people and vehicles. Therefore, it is effective to set the priority weight for people to a higher value than the priority weight for vehicles, even when they are the same non-priority subjects.

[0163] Furthermore, the priority weight Pr_H for people when the animal priority setting or vehicle priority setting is set higher than the priority weights Pr_A and Pr_V for non-priority subjects (animals and vehicles) when the person priority setting is set. This is based on the idea that people are more likely to become the main subject when the animal or vehicle priority setting is set than animals or vehicles are more likely to become the main subject when the person priority setting is set.

[0164] Note that FIG. 8C is a setting in which the animals and vehicles are reversed in FIG. 8B, and therefore a description thereof will be omitted.

[0165] Next, the weight setting according to the detection type in step S1406 will be described with reference to FIG.

[0166] Next, in S1101, the subject candidate determination unit 120 of the control unit acquires a person of interest from the detection result acquired in S201, and determines whether the type of the detected subject is a person.

[0167] If it is determined that a person has been detected, the process proceeds to S1102, and if it is determined that an object other than a person has been detected, the process proceeds to S1103.

[0168] Next, in S1102, the person priority weight Pr_H is set as the priority weight according to the priority type setting, and the process ends.

[0169] Next, in S1103, the subject candidate determination unit 120 acquires a person of interest from the detection result acquired in S201, and determines whether the type of subject detected is an animal.

[0170] If it is determined that an animal has been detected, the process proceeds to S1104, and if it is determined that something other than an animal has been detected (in this embodiment, if it is determined that a vehicle has been detected), the process proceeds to S1105.

[0171] Next, in S1104, the priority weight for animals Pr_A is set as the priority weight according to the priority type setting, and the process ends.

[0172] Next, in S1105, a vehicle priority weight Pr_V is set as the priority weight according to the priority type setting, and the process ends.

[0173] Next, we will explain what the priority values ​​for people, animals, and vehicles are when the main subject candidate determination method is set to each setting, and which type of subject is prioritized as a result. Specifically, we will explain this using examples of actual setting values ​​for position weights 1 and 2, size weights 1 and 2, Pr_A, Pr_V, and Pr_H, and Figures 12A to 12F.

[0174] The possible values ​​of the distance from the center of the screen, the size, the position weight, the size weight, and the type weight are normalized with a minimum value of 0 and a maximum value of 255.

[0175] The set values ​​are not limited to the following values, but may be any values ​​within the range described above.

[0176] In this embodiment, distance 1 = 20, distance 2 = 200, position weight 1 = 200, position weight 2 = 20, size 1 = 20, size 2 = 200, size weight 1 = 20, size weight 2 = 200, when prioritizing people, Pr_H = 255, Pr_A = 100, Pr_V = 100, when prioritizing animals, Pr_H = 150, Pr_A = 255, Pr_V = 100, when prioritizing vehicles, Pr_H = 150, Pr_A = 100, Pr_V = 255. Furthermore, the coefficients α, β, and γ used in priority calculation are α = 1, β = 1, and γ = 2, respectively.

[0177] First, in the case of people priority, in FIG. 12A, a person 1200 is shown in the image at approximately the center, and an animal 1201 is shown at the edge of the screen.

[0178] If the distance from the center of the person 1200 is 0 and the size is 50, and the distance from the center of the animal 1201 is 200 and the size is 30, the priority of each is 750 for the person 1200 and 250 for the animal 1201, and the person 1200 is selected as the main subject.

[0179] Next, in FIG. 12B, an animal 1201 is shown almost in the center, and a person 1200 is shown at the edge of the screen.

[0180] If the distance from the center of the person 1200 is 150 and the size is 40, and the distance from the center of the animal 1201 is 0 and the size is 50, the priority of each is 620 for the person 1200 and 450 for the animal 1201, and the person 1200 is selected as the main subject.

[0181] Next, in FIG. 12C, an animal 1201 is shown large and almost in the center, while a person 1200 is shown small and near the edge of the screen.

[0182] If the distance from the center of the person 1200 is 200 and the size is 20, and the distance from the center of the animal 1201 is 0 and the size is 180, the priority of each is 550 for the person 1200 and 580 for the animal 1201, and the animal 1201 is selected as the main subject.

[0183] Next, in the case of prioritizing animals, in FIG. 12D, an animal 1201 is shown in the image at approximately the center, and a person 1200 is shown at the edge of the screen.

[0184] If the distance from the center of the person 1200 is 200 and the size is 30, and the distance from the center of the animal 1201 is 0 and the size is 50, the priority of each is 350 for the person 1200 and 760 for the animal 1201, and the animal 1201 is selected as the main subject.

[0185] Next, in FIG. 12E, a person 1200 is shown in the center, and an animal 1201 is shown at the edge of the screen.

[0186] If the distance from the center of the person 1200 is 0 and the size is 50, and the distance from the center of the animal 1201 is 150 and the size is 40, the priority of each is 550 for the person 1200 and 620 for the animal 1201, and the animal 1201 is selected as the main subject.

[0187] Next, in FIG. 12F, a person 1200 is shown large in the center, and an animal 1201 is shown small at the edge of the screen.

[0188] If the distance from the center of the person 1200 is 0 and the size is 180, and the distance from the center of the animal 1201 is 200 and the size is 20, the priority of each is 680 for the person 1200 and 550 for the animal 1201, and the person 1200 is selected as the main subject.

[0189] By performing the processing described above, the intended subject is made the main subject by prioritizing the subject set by the user, while non-priority subjects that are plausible as the main subject can be made the main subject depending on the scene without having to change the settings.

[0190] Although the preferred embodiment of the present invention has been described above, the present invention is not limited to the above embodiment, and various modifications and changes are possible within the scope of the gist. For example, in this embodiment, the detection results of a human face region and head region have been described, but combinations of a human face region and body region, or a face region and head region or body region of an animal, etc. may also be used.

[0191] Although the present invention has been described in detail above based on preferred embodiments thereof, the present invention is not limited to these specific embodiments, and various forms within the scope of the gist of the present invention are also included in the present invention. Parts of the above-described embodiments may be combined as appropriate.

[0192] The present invention also includes cases where a software program that realizes the functions of the above-described embodiments is supplied to a system or device having a computer that can execute the program directly from a recording medium or via wired or wireless communication, and the program is executed.

[0193] Therefore, the program code itself that is supplied to and installed on a computer to realize the functional processing of the present invention also realizes the present invention. In other words, the computer program itself for realizing the functional processing of the present invention is also included in the present invention.

[0194] In this case, as long as the program functions are provided, the program may be in any form, such as object code, a program executed by an interpreter, or script data supplied to an OS.

[0195] The recording medium for supplying the program may be, for example, a hard disk, a magnetic recording medium such as a magnetic tape, an optical / magneto-optical storage medium, or a non-volatile semiconductor memory.

[0196] Another method of supplying the program is to store the computer program forming the present invention in a server on a computer network, and have connected client computers download the computer program.

[0197] The present invention is not limited to the above-described embodiments, and various modifications and variations can be made without departing from the spirit and scope of the present invention. Therefore, the following claims are appended to apprise the public of the scope of the present invention.

[0198] This application claims priority based on Japanese Patent Application No. 2023-053893, filed on March 29, 2023, the entire contents of which are incorporated herein by reference.

Claims

1. An image processing device comprising: a first detection means for detecting a first subject from an image; a second detection means for detecting a second subject different from the first subject from the image; a determination means for determining a main subject area which is an area of ​​a main subject from at least one of the detection results by the first and second detection means; and a setting means for accepting switching between a first setting and a second setting based on an operation by a user, wherein when a first setting is set by the setting means, the determination means determines a main subject area of ​​a subject in which a first subject is detected by the first detection means as the main subject, in preference to a subject in which the first subject is not detected by the first detection means; and when a second setting is set by the setting means, determines a main subject area of ​​a subject in which the first subject is not detected by the first detection means as the main subject, in preference to a subject in which the first and second subjects are not detected.

2. The image processing device according to claim 1, characterized in that the determination means, in the first setting, determines the main subject area as the main subject by giving priority to the subject in which the first subject is detected by the first detection means among multiple frames acquired within a specified period.

3. The image processing device according to claim 2, characterized in that the determination means determines the main subject area as the main subject in the second setting, regardless of whether the first subject is a subject detected by the first detection means among multiple frames acquired within a specified period.

4. The image processing device according to claim 1, characterized in that the determination means calculates the priority of the subject by weighting at least one of the position and size of the subject more heavily in the second setting than in the first setting, and determines the main subject based on the priority.

5. The image processing device according to claim 4, characterized in that, in the second setting, the determination means adds a lower weight to the priority for a subject in which a state in which the first subject has not been detected by the first detection means continues for a predetermined period of time than before the predetermined period of time had elapsed.

6. The image processing device according to claim 4, characterized in that the determining means weights the case where the first subject is not detected by the first detecting means in the second setting more heavily than in the first setting.

7. An image processing device according to any one of claims 1 to 6, characterized in that the first subject is a facial part of the subject, and the second subject is any part of the subject other than the face, including the head, torso, or entire body.

8. An image processing device according to any one of claims 1 to 6, characterized in that the first subject is at least a part of a person, and the second subject is at least a part of a subject other than the person, including an animal or a vehicle.

9. A control method for an image processing device comprising: a first detection step of detecting a first subject from an image; a second detection step of detecting a second subject different from the first subject from the image; a determination step of determining a main subject area which is an area of ​​a main subject from at least one of the subjects detected in the first and second detection steps; and a setting step of accepting switching between a first setting and a second setting based on an operation from a user, wherein in the determination step, if a first setting is set in the setting step, a subject in which a first subject is detected in the first detection step is determined as the main subject area in preference to a subject in which the first subject is not detected in the first detection step; and, if a second setting is set in the setting step, even if the first subject is not detected in the first detection step, if the second subject is detected in the second detection step, the main subject area is determined as the main subject in preference to a subject in which the first and second subjects are not detected.

Citation Information

Patent Citations

  • Image processor, imaging apparatus, and program

    JP2012156704A

  • Mobile platform, flying object, support apparatus, portable terminal, method for assisting in photography, program, and recording medium

    JP2018201119A

  • Electronic devices, programs and storage media

    JP2022027841A

  • Focusing device and method, and imaging apparatus

    JP2022051280A

  • Electronic device, control method for the same, program, and storage medium

    JP2022190237A