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

The image processing device uses dual detection means to prioritize detected subjects over undetected faces, addressing the challenge of selecting main subjects in imaging devices, particularly for individuals wearing goggles or masks, thereby enhancing focus and exposure adjustments.

JP2024141977APending Publication Date: 2024-10-10CANON KK
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2023053893
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-29
Publication Date
2024-10-10

AI Technical Summary

Technical Problem

Existing image processing technologies fail to accurately select a main subject when individuals wearing goggles or masks, or those whose faces cannot be detected, are within the frame, as they do not account for subjects whose faces are not visible.

Method used

An image processing device that includes first and second detection means to identify both face and head areas, with a determination mechanism to prioritize subjects detected by the first means over those not detected, allowing for appropriate main subject selection even if the face is obscured.

Benefits of technology

Enhances the ability to select a main subject that aligns with user intent by prioritizing detected subjects over undetected faces, improving focus and exposure adjustments in imaging devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024141977000001_ABST
    Figure 2024141977000001_ABST
Patent Text Reader

Abstract

To solve a problem in which, when a subject whose head is only detected is excluded from a main subject candidate, then even people wearing goggles are to be excluded from the main subject candidate, which is inconvenient.SOLUTION: An image processing apparatus includes determination means that determines a main subject area, which is the area of a main subject, and setting means that accepts switching between a first setting and a second setting on the basis of an operation from a user, and the determination means determines the main subject area to be a subject in which a first subject is detected by 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 when the first setting is set, and determines the main subject area to be 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 when the second setting is set even in a case in which the second subject is detected by second detection means.SELECTED DRAWING: Figure 3
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

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

[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] Patent Document 1 discloses a technique for detecting the upper body and head of a person as described above, and a method for detecting and tracking the head of a subject whose face has been detected once facing forward, even if the subject turns away. Patent Document 1 claims that it is possible to appropriately select a main subject even when multiple people are captured in the image. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] Patent Publication No. 2022-51280 Summary of the Invention [Problem to be solved by the invention]

[0005] However, Patent Document 1 did not take into account the situation when a person whose face cannot be detected, such as a person wearing goggles that make it impossible to detect the face, or a person wearing a mask, enters the field of view.

[0006] The present invention has been made in consideration of the above 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. [Means for solving the problem]

[0007] In order to solve the above problem, the image processing device of the present invention has 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 from a user, wherein the determination means, when a first setting is set by the setting means, determines a main subject area from a subject in which a first subject is detected by the first detection means, 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 from a subject in which the first subject is detected by the first detection means, in preference to a subject in which the first subject is not detected by the first detection means, Effect of the Invention

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

[0009] [Figure 1] 1 is a block diagram showing a configuration of an imaging apparatus including an image processing apparatus according to a first embodiment. [Diagram 2] 5 is a flowchart showing a main subject determination process in the first embodiment. [Diagram 3] 5 is a flowchart showing main subject candidate determination processing in the first embodiment. [Figure 4] 6 is a flowchart showing a main subject lock determination process in the first embodiment. [Diagram 5] 5 is a flowchart showing a main subject determination process according to the first embodiment. [Figure 6] 5 is a flowchart showing a process of setting detection weights in the first embodiment. [Figure 7] FIG. 4 is a diagram showing priority weights regarding position and size in the first embodiment. [Figure 8] FIG. 11 is a diagram showing detection type weights in the second embodiment. [Figure 9] FIG. 4 is a diagram showing an effect of the first embodiment. [Figure 10] 10 is a flowchart showing main subject candidate determination processing in the second embodiment. [Figure 11] 10 is a flowchart showing a process of setting detection weights in the second embodiment. [Figure 12] FIG. 10 is a diagram showing an effect of the second embodiment. [Figure 13] FIG. 11 is a block diagram showing the configuration of an image processing device including an automatic focus adjustment device according to a second embodiment of the present invention. [Figure 14] 10 is a flowchart showing a main subject determination process according to a second embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

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

[0011] As mentioned above, Patent Document 1 does not consider the case where a person whose face cannot be detected, such as a person wearing goggles whose face cannot be detected or a person wearing a mask, enters the angle of view. Therefore, it is possible to set a subject whose face has never been detected as the main subject if its head can be detected, just as a person whose face cannot be detected, such as a person wearing goggles or a person wearing a mask, can be set as the main subject. However, since it is not known whether the subject is facing backwards in the above situation, 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 he or she 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] <First embodiment> 1 shows the configuration of an image capture device such as a video camera including an image processing device according to the first embodiment. Note that, although the present embodiment will be described taking a video camera as an example, the present invention can also be applied to other image capture devices such as a digital still camera.

[0014] In FIG. 1, the imaging optical system for forming an image of 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 has both a function of correcting the movement of the focal plane accompanying the change in magnification and a function of focusing. The image sensor 106 is a member as an image sensor, and is composed of a CCD or CMOS sensor. The image sensor 106 has a plurality of pixel units arranged in a matrix. A light beam that has passed through the imaging optical system forms an image on the light receiving surface of the image sensor 106, and is converted into a signal charge according to the amount of incident light by a photodiode (photoelectric conversion unit) that each pixel unit has. When shooting a moving image, an electrical signal for each frame is periodically output. Note that the image sensor 106 of this embodiment holds a plurality of photodiodes (two in this embodiment) in one pixel in order to perform the commonly known image plane phase difference AF (autofocus). The light beam is separated by a microlens and imaged by two photodiodes (photodiodes A and B), so that two signals for imaging and phase difference detection can be obtained. In this embodiment, a signal (image signal A+B) obtained by adding the signals of the two photodiodes is the imaging signal, and the signals of the individual photodiodes (image signal A and image signal B) are two image signals for phase difference detection (AF). Since each photodiode receives a light beam that has passed through a different area of ​​the exit pupil of the photographing optical system, the image signal B has parallax with respect to the image signal A. The AF signal processing unit 113 described later performs a correlation calculation on the two image signals for AF, and performs focus detection by the phase difference detection method to calculate the image shift amount and various reliability information. Note that the configuration of the image sensor compatible with the image plane phase difference AF is not limited to the configuration in which multiple photodiodes are provided in one pixel as in this embodiment. 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 areas of the exit pupil of the photographing optical system.

[0015] 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 disk, or a semiconductor memory.

[0016] The zoom driving source 110 moves the variable magnification lens 102, and the focusing driving source 111 moves the focus lens 105. The zoom driving source 110 and the focusing driving source 111 are each constituted by an actuator such as a stepping motor, a DC motor, a vibration type motor, or a voice coil motor.

[0017] The AF gate 112 passes only signals from an area (focus detection area) used for focus detection among all the output signals of the pixels from the CDS / AGC circuit 107. The AF signal processing circuit 113 extracts high-frequency components from the signal that has 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, but since the 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 image signals for AF output from the CDS / AGC circuit 107, calculate a defocus amount, and output the result to the control unit 114.

[0018] 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, which may execute some of the arithmetic functions performed by the processor. The control unit 114 is responsible for controlling the operation of the entire video camera, and also controls the focusing drive source 111 based on the AF evaluation value, the defocus amount, etc. to move the focus lens 105, thereby performing AF control for focus adjustment.

[0019] The face area detection unit 116 performs a known face detection process on the image signal to detect the face area of ​​a person in the shooting screen. 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. As the face area detection process, for example, there 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 matching with a face outline plate prepared in advance. There is also a method of detecting a face by extracting facial feature points such as eyes, nose, and mouth using a known pattern recognition technology, but the present invention is not limited by the method of face detection process, and any method may be used. In addition, in this embodiment, the face is selected as the first part detected in the subject, but the first part may be other parts such as arms and legs as long as they are part of the subject. A known method similar to the face described above can also be used to detect these other parts.

[0020] The head region detection unit 117 detects a predetermined region from the image, with the head region being the target subject 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 in this embodiment, the head region is detected from the image data based on the learning data, and the detection result is transmitted to the control unit 114. In this embodiment, the head region is described as a block for detecting the head region, but 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 trunk region, or the whole body region. In this embodiment, the head region is selected as the second region, but this may also be another region that is part of the subject, as long as it is other than the first region.

[0021] Based on the detection results of the face area detection section 116 and the head area detection section 117, the control section 114 transmits information to the AF gate 112 to set the focus detection area at a position including the face area and the head area in the shooting screen. 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.

[0022] 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 or not 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 a frame display indicating the face region and the head region on the captured image, and the selected image is displayed on monitor device 109 or the like.

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

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

[0025] The operation unit 122 is a variety of operation members that serve as an input unit for receiving 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.

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

[0027] First, the overall flow of the main subject determination process will be described with reference to Fig. 2. This process is executed according to a computer program stored in the camera microcomputer 114. Note that, although a series of processes in this embodiment is assumed to be performed in a system synchronized with the imaging cycle, this is not limiting.

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

[0029] 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 is a determination method (hereinafter referred to as the first setting) in which only a subject whose first part (face) is detected at least once in multiple frames within a predetermined period becomes a candidate for the main subject.

[0030] The second determination method is based on the idea that even 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 whose first part (face) cannot be detected due to goggles, etc. In other words, when either the first part (face) or a second part (head) different from the first part is detected, the subject having that part is determined to be a main subject candidate (hereinafter referred to as the second setting).

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

[0032] The control unit 114 also determines which face and which head belong to the same person from the acquired face detection result and head detection result. The control unit 114 also determines which face and which head belong to the same person from the face detection result and head detection result acquired in the current frame are the same person as the person acquired in the previous frame based on the position and size. Then, the detection result of a person determined to be the same as the detection result in the previous frame is assigned the same ID as the detection result of the same person in the previous frame and the subsequent processing is performed.

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

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

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

[0036] Next, in S204, main subject lock unit 121 performs main subject lock processing. The main subject lock processing is processing for determining 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.

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

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

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

[0040] 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 by superimposing it 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 sub-subject is displayed on the face or head of a subject (subject determined as a sub-subject) that was determined as a main subject candidate by main subject candidate determination unit 120 but not determined as a main subject. In this embodiment, when the main subject is locked in S204, a frame is displayed to the user to indicate that the main subject is locked, while no frame is displayed on the face or head of a person who was determined as a main subject candidate but not determined as a main subject.

[0041] Next, in S207, the control unit 114 sets the subject area of ​​the main subject to the AF gate 112, and performs AF control based on the AF evaluation value acquired from the AF signal processing unit 113. As the AF evaluation value described above, a contrast evaluation value representing the contrast or sharpness of the subject may be used, or a method using a defocus amount to the in-focus position calculated based on a phase difference may be used.

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

[0043] 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 a person of interest) from the detection result 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 by the ID.

[0044] 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.

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

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

[0047] Next, in S303, 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 based on 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 a main subject candidate up until now (never within a predetermined period), including the previous frame (the main subject candidate flag is OFF), the process proceeds to S312.

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

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

[0050] In S305, when the head detection area is stored as the subject area data of the person of interest, it is effective to shift the head detection area slightly downward (toward the body with respect to the head) from the position of the stored head detection area. The reason is that while the head area detection unit 117 can detect a person even when the person is facing backwards or sideways, the back and sides of the head of the person tend to have low contrast compared to the face, making it difficult to focus on them. In addition, the brightness may be adjusted to the hair part 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 area toward the body by about 1 / 4 of the head detection size, it becomes more likely that not only the hair part at the back of the head but also the nape part can be included and the contrast of the neck and collar can be captured, which is expected to improve the accuracy of focusing and the accuracy of exposure control.

[0051] 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.

[0052] 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 are no face detection or head detection results several times (a predetermined number of frames) in a row.

[0053] Next, in S312, it is determined whether or not all of the detection results obtained in S201 have been checked. If all of the detection results 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.

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

[0055] In addition, 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 above-mentioned conditions can become a main subject. Since the second setting is a setting for when you want to shoot a subject whose face cannot be detected, such as a goggle or mask, it is irrelevant whether or not the face has been detected once. In addition, even if only the head of a subject has been detected, it may be a subject that you want to focus on and adjust the brightness as the main subject in shooting.

[0056] The above process makes it possible to prevent 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 in the first setting. Furthermore, while it is possible to prevent the focus and brightness from being adjusted to an unintended person, in the second setting, it is possible to make even a subject whose face cannot be detected, such as goggles, a candidate for the main subject. This improves the possibility that the user can adjust the focus and brightness to the person intended.

[0057] 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.

[0058] 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) in the image (within the screen, the XY plane) of the subject accepted by the operation unit 122. The above-mentioned 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. In addition, a condition may 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.

[0059] Next, in S402, it is determined whether there are multiple face detection results and head detection results that are determined to be within a specified 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.

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

[0061] 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 the sizes 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 whose size is equal to or larger than the threshold value, the process proceeds to S408.

[0062] 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 there is a face detection result, 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.

[0063] 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). Next, in S410, the locked subject is determined to be the main subject, and the main subject candidate flag of the locked person is turned ON.

[0064] 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.

[0065] The reason for performing object tracking in S406 when it is determined in SS403 that the reliability is below 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.

[0066] Therefore, when face detection is in progress or head detection reliability is low, the camera temporarily tracks the subject at the position specified by the user as an object by specifying the area for tracking 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.

[0067] In addition, 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 may become the tracking target due to the shift of the touch position 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 makes it possible to reduce the possibility of focusing on an unintended person.

[0068] Next, the main subject determination process performed by main subject determination section 121 on the main subject candidate region in S205 will be described with reference to FIGS.

[0069] 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.

[0070] Next, in S502, a priority weight for 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.

[0071] On the other hand, in S503, a priority weight for 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.

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

[0073] FIG. 7(a) shows how the position weight is calculated according to the distance from the central position.

[0074] 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.

[0075] When the setting information for the main subject candidate determination method is the first setting, the weighting for position is position weight 1 until the distance from the center of the screen is 1, 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 weighting is fixed at position weight 2.

[0076] When the setting information for the main subject candidate determination method is the second setting, the position weight is 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.

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

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

[0079] FIG. 7(b) shows how the size weight is calculated according to the size of the main subject candidate region.

[0080] 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.

[0081] 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.

[0082] When the setting information for the main subject candidate determination method is the second setting, the size weight is 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 more, the weight is fixed at size weight 4.

[0083] In the second setting, subjects with only the head are also considered as main subject candidates, so there is a possibility that the main subject candidate area will be larger than in the first setting, and there is a higher possibility that an unintended subject will be selected as the main subject. Considering that the photographer will shoot a relatively large main subject relatively in the center, as shown in Figure 7, the setting is made so that subjects closer to the center and larger in size are heavier than in the first setting. This makes it possible to prevent an unintended subject from being selected as the main subject.

[0084] In addition, for position weights 1-4, distances 1-4, size weights 1-4, and sizes 1-4 in the figure, the weights of the objects closer to the center of the screen are heavier in the second setting than in the first setting. Furthermore, as long as the weights of the objects larger in size are set to be heavier, the shape of the graph shown in the figure and the number and positions of the change points are not limited. Furthermore, in this embodiment, the weights that change linearly as described above and the weights that clip the minimum and maximum are adopted, but any method of setting the weights is acceptable as long as it does not deviate from the idea of ​​heavier weights closer to the center and heavier weights larger in size.

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

[0086] The process of setting weights according to the detection state will be described later with reference to FIG.

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

[0088] As an example of a method for calculating the priority, the following formula is used to add up the above-mentioned weights at a predetermined ratio.

[0089] Priority = α × (position weight) + β × (size weight) + γ × (detection weight) α, β, and γ are coefficients by which each weight is multiplied, and can be freely set.

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

[0091] Next, in S508, it is determined whether or not all of the obtained 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.

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

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

[0094] 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 (the result of processing in S300 is Yes).

[0095] 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 detection and head detection results, whether detection is performed by both face detection and head detection means or only one of them, etc. Also, if a subject is locked as the main subject in S204, it may always be determined as the main subject.

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

[0097] First, in S601, 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.

[0098] 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 or not a face has been detected.

[0099] In the process of S602, the determination may be made based on whether or not the face area detection unit 116 detects a face, or, even if a face is not detected, the determination may be made based on whether or not an pupil area detection unit (not shown) in the face detects 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.

[0100] 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.

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

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

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

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

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

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

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

[0108] 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.

[0109] As an example, if Pr1>Pr2>Pr3>Pr4 and TH2>TH1≠0, the detection weight when a face is detected is the highest in Pr1, and the subject with the face detected is prioritized. When the face cannot be detected and only the head remains, the detection weight is lowered to Pr2, so that if there are other subjects with faces detected, the subject with the face detected is likely to have a higher detection weight and higher priority. Furthermore, if the state where there is no face detection result continues for a predetermined time period equal to or greater than TH1, the detection weight becomes Pr3 after the predetermined time has elapsed and is further lowered. By setting a time threshold value of TH2 and a detection weight of Pr3, if the face cannot be detected temporarily and the priority is lowered, it becomes Pr2. On the other hand, if the face cannot be detected continuously for a predetermined period of time and the priority is lowered, it becomes Pr3, so that the two can be distinguished. Furthermore, if the state where there is no face detection result continues for a time period equal to or greater than TH2, the detection weight becomes Pr4 and is the lowest.

[0110] Note that Pr4 may be set to a value that ensures that the priority is less than a predetermined threshold in S509, and by setting the priority to less than the threshold, 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.

[0111] As another example, if Pr1=Pr2>Pr3≧Pr4, the calculation is performed with the same detection weight as for a subject with a detected face from immediately after the state in which the face is not detected and only the head is detected until TH1. This is to control the subject with only the head not to be unintentionally moved away from the main subject, in the hope that the face will be detected again immediately after the head is detected.

[0112] Also, in the above example, Pr1 is not changed whether the first setting or the second setting is used, 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 want to prioritize subjects whose faces cannot be detected over subjects whose faces can be detected, since the user has deliberately set the setting so that even subjects from the head are to be selected as the main subject.

[0113] The above-mentioned processing will be explained with reference to FIG.

[0114] 9(a) to (d) show the case where the main subject candidate determination method is set to the first setting, and FIGS. 9(e) to (g) explain the case where the main subject candidate determination method is set to the second setting.

[0115] 9A shows a scene in which a single person 901 comes into the frame facing away from the camera. In this case, it is difficult to imagine that the person 901 is being photographed as the main subject, so no area is set as a main subject candidate area and no frame is displayed.

[0116] 9(b) shows a case where a person 901 faces forward. In this case, since the person faces the camera, it is considered that the person is photographed as the main subject, and an area setting and a frame 902 are displayed for the person 901 as a main subject candidate area. Also, since there is only one main subject candidate, the person 901 is automatically selected as the main subject.

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

[0118] 9(d) shows a case where the person 901 continues to face backwards. In this case, since it is considered that the person 901 is 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 can be detected (when the person faces forward), as determined in S605 or S607. Priorities are calculated in S507 using the weights set in the above process. However, as a result of the calculated priorities, main subject candidate areas whose priorities are less than a predetermined threshold value may be processed with the main subject candidate flag set to OFF so that they do not become main subject candidate areas until it is determined that there is a face detection result again in a subsequent frame (Yes in S300).

[0119] The above processing can prevent a subject who 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 focus and brightness from being adjusted to an unintended subject area.

[0120] Next, Figure 9(e) 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.

[0121] Although the face of person 903 has not been detected, the head has been detected. In addition, the faces and heads of two people in the background, person 904 and person 905, have been detected.

[0122] In the above-mentioned scene, the main subject is determined only by the position and size because the detection weight is set to be the same whether the subject is only the head or a face is detected. 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. In addition, because the priority is not lowered even if the head-only state continues, it is also possible to avoid the head detection tracking being cut off after a certain time has passed.

[0123] Also, 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 decreases, and the possibility that person 903 will continue to be the main subject increases.

[0124] Fig. 9(f) shows a situation where persons 906 and 907 are photographed, but the faces of neither person are detected and only the heads are detected. Fig. 9(g) shows a situation where person 906 has gone out of the frame from the state shown in Fig. 9(f), leaving only person 907, and person 907 is being photographed as the main subject.

[0125] In Fig. 9(f), the head tracking of neither person 907 nor person 908 is stopped at a specific time due to the determination in S601. Therefore, even after person 906 goes out of the frame in Fig. 9(g), person 907 can be immediately moved onto as the main subject, and the focus and brightness can be adjusted to person 907, making it possible to record natural video.

[0126] As described above, it is possible to increase the likelihood that the intended subject will be the main subject according to the user's settings, and to reduce shooting errors.

[0127] <Second embodiment> Next, a second embodiment of the present invention will be described. In the above-mentioned first embodiment, the weight is changed according to the detection state of the first part (face area) and parts different from the first part (head area, upper body area, trunk area, whole body area, etc.). Also, the detection weight used for priority calculation is changed according to which part of the person is detected.

[0128] 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 a priority subject (hereafter referred to as a priority subject) and other subjects (hereafter referred to as non-priority subjects) are detected, some cameras can adjust the focus and brightness to the subject intended by the user by setting the priority subject as the main subject.

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

[0130] 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 depending on the scene are made the main subject without having to change the settings.

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

[0132] The person area detection unit 131 performs a known person detection process on the image signal to detect the area of ​​the person (such as the face area, head area, upper body area, torso area, and whole body area of ​​the person) in the shooting screen. The detection result is transmitted to the control unit 114. As the person area detection process, for example, there is a method of extracting a skin color area from the gradation color of each pixel represented by the image data, and detecting the person area based on the degree of matching with a contour plate of the person prepared in advance. There is also a method of detecting the area of ​​the person from the image data based on learning data. There is also a method of detecting the face by extracting facial features such as the eyes, nose, and mouth using a known pattern recognition technology, but the present invention is not limited by the method of the person detection process, and any method may be used.

[0133] The animal region detection unit 132 performs a known animal detection process on the image signal to detect the animal region (such as the animal's face region, head region, upper body region, torso region, and whole body region) in the shooting screen. The detection result is transmitted to the control unit 114. As the animal region detection process, for example, there is a method of detecting the animal region based on the degree of matching with a contour plate of an animal prepared in advance. There is also a method of detecting the animal region from image data based on learning data. There is also a method of detecting the animal region from image data based on learning data. There is also a method of detecting the animal's face region by extracting facial feature points such as the eyes, nose, and mouth using a known pattern recognition technology, but the present invention is not limited to the method of human detection process and any method may be used.

[0134] The vehicle area detection unit 133 performs a known vehicle detection process on the image signal to detect the vehicle area (the entire vehicle, the driver, the tires, the vicinity of the windshield, etc.) in the shooting screen. The detection result is transmitted to the control unit 114. As the vehicle area detection process, for example, there is a method of detecting the vehicle area based on the degree of matching with a contour plate of the vehicle prepared in advance. There is also a method of detecting the vehicle area from image data based on learning data. There is also a method of detecting the vehicle area from image data based on learning data. There is also a method of detecting the vehicle area by extracting the feature points of the vehicle using a known pattern recognition technology, but the present invention is not limited by the method of vehicle detection process and any method may be used.

[0135] Next, in the main subject determination process of FIG. 2, S200 has the first and second settings in the first embodiment, but in this embodiment, the following three settings are available.

[0136] The first setting (called the third setting to distinguish it from the first embodiment) is a setting that prioritizes the human region (hereinafter, the human priority setting). The second setting (fourth setting) is a setting that prioritizes the areas of animals, such as dogs, cats, and birds. (Hereafter, it is called the Animal Priority Setting.) The third setting (fifth setting) is a setting that prioritizes areas for vehicles such as cars, motorcycles, and trains. (Hereinafter, vehicle priority setting) 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 dogs, the second setting being cats, and the third setting being birds.

[0137] Furthermore, in this embodiment, all types can be detected regardless of which of the three settings above is used; however, for example, only when the people priority setting is used, people have the highest priority, so processing may be performed so as not to detect subjects other than people.

[0138] 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 to acquire a human detection result, an animal detection result, and a vehicle detection result from the human area detection unit 131, the animal area detection unit 132, and the vehicle area detection unit 133, respectively.

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

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

[0141] This process is executed according to a computer program stored in the camera microcomputer 114. Note that, although a series of processes in this embodiment is assumed to be performed in a system in which the processes are performed in synchronization with an image capture cycle, this is not limiting.

[0142] 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 or not a person has been detected.

[0143] 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.

[0144] 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.

[0145] 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.

[0146] 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.

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

[0148] 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.

[0149] Next, the main subject determination process in the second embodiment will be described with reference to the flowchart in FIG. 14 and the graph in FIG.

[0150] 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.

[0151] 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.

[0152] 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 other than animal priority (if it is determined that it is vehicle priority in this embodiment), the process proceeds to S1405.

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

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

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

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

[0157] Next, the priorities Pr_H, Pr_A, and Pr_V set in S1402, S1404, and S1405 will be described in detail with reference to FIG.

[0158] 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 used, the priority weighting 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.

[0159] 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 a weight according to the distance from the center of the screen and the size of the subject.

[0160] By setting as described above, the subject set by the user is given priority as the main subject, while non-priority subjects that are 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 a situation 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.

[0161] FIG. 8(b) is a diagram showing the priorities when the setting information for the main subject candidate determination method is set to animal priority. When the animal priority setting is selected, 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. 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 the animal priority setting is selected, people are more likely to be the main subject than vehicles, which are both non-priority subjects. Therefore, it is effective to set the priority weight for people to a higher value than the priority weight for vehicles, even if they are both non-priority subjects.

[0162] Furthermore, the priority weighting Pr_H of people when the animal priority setting or vehicle priority setting is set higher than the priority weightings Pr_A and Pr_V of 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.

[0163] In addition, FIG. 8(c) is a setting in which the animals and vehicles are reversed in FIG. 8(b), so a description thereof will be omitted.

[0164] Next, the setting of weights according to the detection type in S1406 will be described with reference to FIG.

[0165] 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 or not.

[0166] 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.

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

[0168] 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 the detected subject is an animal or not.

[0169] 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.

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

[0171] Next, in S1105, a priority weight for vehicles Pr_V is set to a priority weight according to the priority type setting, and the process ends.

[0172] Next, we will explain what the priority values ​​of people, animals, and vehicles are when the setting information of 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 using examples of actual setting values ​​of position weights 1 and 2, size weights 1 and 2, Pr_A, Pr_V, and Pr_H and Fig. 12.

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

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

[0175] 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 people are prioritized, Pr_H = 255, Pr_A = 100, Pr_V = 100, when animals are prioritized, Pr_H = 150, Pr_A = 255, Pr_V = 100, when vehicles are prioritized, Pr_H = 150, Pr_A = 100, Pr_V = 255. Also, coefficients α, β, and γ used in priority calculation are α = 1, β = 1, and γ = 2, respectively.

[0176] First, in the case of people priority, in FIG. 12(a), a person 1200 is shown almost in the center, and an animal 1201 is shown near the edge of the screen.

[0177] 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, then 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.

[0178] Next, in FIG. 12(b), an animal 1201 is shown almost at the center, and a person 1200 is shown near the edge of the screen.

[0179] 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, then 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.

[0180] Next, in FIG. 12(c), 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.

[0181] 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, then 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.

[0182] Next, in the case of animal priority, in FIG. 12(d) an animal 1201 is shown almost in the center, and a person 1200 is shown near the edge of the screen.

[0183] 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, then 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.

[0184] Next, in FIG. 12(e), a person 1200 is shown almost in the center, and an animal 1201 is shown near the edge of the screen.

[0185] 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, then 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.

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

[0187] 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, then 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.

[0188] 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.

[0189] 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 the face region and head region of a person are used for the description, but combinations of the face region and body region of a person, or the face region and head region or body region of an animal, etc. may also be used.

[0190] Although the present invention has been described in detail based on the preferred embodiments, 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.

[0191] 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 capable of executing the program directly from a recording medium or via wired / wireless communication, and the program is executed.

[0192] Therefore, the program code itself that is supplied to and installed in 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.

[0193] In this case, so long as the program has the functions of a program, the form of the program is not important, such as object code, a program executed by an interpreter, or script data supplied to an OS.

[0194] 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.

[0195] As a method of supplying the program, a method is also conceivable in which the computer program constituting the present invention is stored in a server on a computer network, and a connected client computer downloads the computer program to program it. [Explanation of symbols]

[0196] 105 Focus Competition Lens 106 Image sensor 113 AF signal processing circuit 114 Control section 116 Face area detection unit 117 Head Region Detection Unit 120 Main subject candidate determination section 121 Main subject lock section 122 Operation section 123 Main subject candidate reset determination unit

Claims

1. a first detection means for detecting a first subject from an image; a second detection means for detecting a second object different from the first object from the image; a determining 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 detecting means; a setting means for accepting switching between the first setting and the second setting based on an operation by a user; when a first setting is set by the setting means, the determining means determines a main subject area by giving priority to a subject for which a first subject is detected by the first detecting means as a main subject over a subject for which the first subject is not detected by the first detecting means; When the second setting is set by the setting means, even if the first subject is not detected by the first detection means, if the second subject is detected by the second detection means, the main subject area is determined as the main subject in preference to subjects in which the first and second subjects are not detected.

1. An image processing device comprising:

2. 2. The image processing device according to claim 1, wherein the determining means determines the main subject area as a main subject by giving priority to a subject in which the first subject is detected by the first detecting means among a plurality of frames acquired within a predetermined period in the first setting.

3. 3. The image processing device according to claim 2, wherein the determining 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 detecting means among a plurality of frames acquired within a predetermined period.

4. The determining 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.

2. The image processing device according to claim 1, wherein:

5. In the second setting, 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 time, the determination means lowers the weight to be added to the priority compared to before the predetermined time has elapsed.

5. The image processing device according to claim 4.

6. The determining means weights a case where the first subject is not detected by the first detecting means more heavily in the second setting than in the first setting.

5. The image processing device according to claim 4.

7. the first subject is a facial region of the subject, 7. The image processing apparatus according to claim 1, wherein the second subject is any part of the subject, including the head, torso, or whole body, other than the face.

8. the first subject is at least a part of a person; 7. The image processing device according to claim 1, wherein the second subject is at least a part of a subject other than the person, including an animal or a vehicle.

9. a first detection step of detecting a first object from an image; a second detection step of detecting a second object different from the first object from the image; a determining step of determining a main subject area, which is an area of ​​a main subject, from at least one of the areas detected in the first and second detecting steps; a setting step of accepting switching between the first setting and the second setting based on an operation by a user, In the determining step, when a first setting is set in the setting step, a main subject area is determined by setting a subject in which a first subject is detected in the first detecting step as a main subject in preference to a subject in which the first subject is not detected in the first detecting step; When the 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 subjects in which the first and second subjects are not detected.

2. A method for controlling an image processing apparatus comprising:

Citation Information

Patent Citations

  • Focusing device and method, and imaging apparatus

    JP2022051280A