CN117097982A - Target detection method and system - Google Patents

Target detection method and system Download PDF

Info

Publication number
CN117097982A
CN117097982A CN202311336846.8A CN202311336846A CN117097982A CN 117097982 A CN117097982 A CN 117097982A CN 202311336846 A CN202311336846 A CN 202311336846A CN 117097982 A CN117097982 A CN 117097982A
Authority
CN
China
Prior art keywords
information
shooting
facial organ
determining
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311336846.8A
Other languages
Chinese (zh)
Other versions
CN117097982B (en
Inventor
严炎象
董珍时
严泽荣
高诚达
肖俊杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dctk Ltd
Original Assignee
Beijing Dctk Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dctk Ltd filed Critical Beijing Dctk Ltd
Priority to CN202311336846.8A priority Critical patent/CN117097982B/en
Publication of CN117097982A publication Critical patent/CN117097982A/en
Application granted granted Critical
Publication of CN117097982B publication Critical patent/CN117097982B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • H04N23/632Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals

Abstract

The application discloses a target detection method and a target detection system, and belongs to the technical field of image generation. Wherein the method comprises the following steps: under the condition that N first shooting objects are included in the first preview image, N pieces of first information corresponding to the N first shooting objects one by one are obtained, wherein the first information is used for indicating the facial organ distribution condition of the corresponding first shooting objects, and N is a positive integer larger than 1; determining second information of the indicated facial organ distribution condition meeting preset conditions from the N pieces of first information; and determining the first shooting object corresponding to the second information as a target shooting object.

Description

Target detection method and system
Technical Field
The application belongs to the technical field of image generation, and particularly relates to a target detection method and system.
Background
In general, in a scene where a user uses an electronic device to perform shooting, the electronic device may collect a preview image through a camera, and determine, under the condition that a plurality of shooting objects are included in the preview image, a shooting object closest to the electronic device among the plurality of shooting objects as a shooting object required by the user, and then perform focusing operation according to a position of the shooting object required by the user, so that in the shot image obtained by shooting, the shooting object required by the user is clearer, and other shooting objects are more blurred.
However, since the shooting object required by the user may not be the shooting object closest to the electronic device among the plurality of shooting objects, the shooting object required by the user may be unclear in the shot image obtained by shooting, and thus the user may need to perform shooting multiple times to obtain a satisfactory shot image, which results in lower efficiency of shooting the image.
Disclosure of Invention
The embodiment of the application aims to provide a target detection method and a target detection system, which can solve the problem of lower efficiency of shooting images.
In a first aspect, an embodiment of the present application provides a target detection method, which is applied to an electronic device, where the method includes: under the condition that N first shooting objects are included in the first preview image, N pieces of first information corresponding to the N first shooting objects one by one are obtained, wherein the first information is used for indicating the facial organ distribution condition of the corresponding first shooting objects, and N is a positive integer larger than 1; determining second information of the indicated facial organ distribution condition meeting preset conditions from the N pieces of first information; and determining the first shooting object corresponding to the second information as a target shooting object.
In a second aspect, an embodiment of the present application provides an object detection system, including: the device comprises an acquisition module and a determination module. The acquiring module is configured to acquire N pieces of first information corresponding to the N first shooting objects one by one in the case where the first preview image includes the N first shooting objects, where the first information is used to indicate a facial organ distribution situation of the corresponding first shooting objects, and N is a positive integer greater than 1. The determining module is used for determining second information of the indicated facial organ distribution condition meeting the preset condition from the N pieces of first information acquired by the acquiring module; and determining the first shooting object corresponding to the second information as a target shooting object.
In a third aspect, an embodiment of the present application provides an electronic device comprising a processor and a memory storing a program or instructions executable on the processor, which when executed by the processor, implement the steps of the method as described in the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium having stored thereon a program or instructions which when executed by a processor perform the steps of the method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being configured to execute a program or instructions to implement the steps of the method according to the first aspect.
In a sixth aspect, embodiments of the present application provide a computer program product stored in a storage medium, the program product being executed by at least one processor to carry out the steps of the method according to the first aspect.
In the embodiment of the application, in the case that N first shooting objects are included in the first preview image, the electronic device may first acquire first information corresponding to each first shooting object, where the first information is used to indicate a facial organ distribution situation of the corresponding first shooting object, N is a positive integer greater than 1, and determine, from the N first information, second information that the indicated facial organ distribution situation meets a preset condition, so that the electronic device may determine, as a target shooting object, the first shooting object corresponding to the second information. Because the electronic device determines the distribution condition of the facial organs of each first shooting object and determines a certain shooting object with the facial organs meeting preset conditions as the target shooting image required by the user instead of determining the shooting object closest to the electronic device as the target shooting object required by the user under the condition that the first preview image comprises a plurality of first shooting objects, the probability that the target shooting object required by the user is unclear in the shooting image obtained by shooting because the shooting object required by the user is not the shooting object closest to the electronic device can be reduced, and therefore, the user can shoot once or less times, and satisfactory shooting images can be obtained, and the efficiency of shooting images can be improved.
Drawings
FIG. 1 is a flow chart of a target detection method according to some embodiments of the present application;
FIG. 2 is a second flow chart of a target detection method according to some embodiments of the application;
FIG. 3 is a third flow chart of a target detection method according to some embodiments of the application;
FIG. 4 is a flow chart of a target detection method according to some embodiments of the present application;
FIG. 5 is a fifth flow chart of a target detection method according to some embodiments of the present application;
FIG. 6 is a schematic diagram of an object detection system provided by some embodiments of the application;
FIG. 7 is a schematic diagram of one of the hardware structures of an electronic device provided by some embodiments of the present application;
fig. 8 is a second schematic diagram of a hardware structure of an electronic device according to some embodiments of the present application.
Detailed Description
The technical solutions of the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which are obtained by a person skilled in the art based on the embodiments of the present application, fall within the scope of protection of the present application.
The following will explain terms of the application.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate, such that embodiments of the application may be practiced otherwise than as specifically illustrated and described herein, and that the objects identified by "first," "second," etc. are generally of the same type and are not limited to the number of objects, such as the first interface element may be one or more. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship.
The terms "at least one," "at least one," and the like in the description and in the claims, mean that they encompass any one, any two, or a combination of two or more of the objects. For example, at least one of a, b, c (item) may represent: "a", "b", "c", "a and b", "a and c", "b and c" and "a, b and c", wherein a, b, c may be single or plural. Similarly, the term "at least two" means two or more, and the meaning of the expression is similar to the term "at least one".
The method and system for detecting the target provided by the embodiment of the application are described in detail below through specific embodiments and application scenes thereof with reference to the accompanying drawings.
Currently, in the related art, in a scene where a user uses an electronic device to perform shooting, the electronic device may collect a preview image through a camera, and determine a shooting object closest to the electronic device among a plurality of shooting objects as a shooting object required by the user when the preview image includes the plurality of shooting objects, and then perform focusing operation according to a position of the shooting object required by the user, so that in the shooting image obtained by shooting, the shooting object required by the user is clearer, and other shooting objects are more blurred. However, since the situation that the shooting object required by the user is not the shooting object closest to the electronic device among the plurality of shooting objects may occur, for example, the situation that the shooting object required by the user is far away from the electronic device and the shooting object not required by the user is near to the electronic device may result in the situation that the shooting object required by the user is unclear and the shooting object not required by the user is clearer in the shot image obtained by shooting, the user may need to perform shooting for multiple times to obtain a satisfactory shot image, and thus, the efficiency of shooting the image is low.
However, in the embodiment of the present application, in the case where a plurality of subjects are included in the preview image, the electronic device may first acquire information corresponding to each subject, the information being used to indicate a facial organ distribution situation of the corresponding subject, and determine, from the plurality of information, a certain information that the indicated facial organ distribution situation satisfies a preset condition, so that the electronic device may determine the subject corresponding to the certain information as the subject required by the user. It can be understood that, since the photographic subject required by the user may be a certain fixed person, that is, the facial organ distribution situation of the photographic subject required by the user may satisfy a certain preset condition, the electronic device may determine the facial organ distribution situation of each photographic subject, and determine a photographic subject whose facial organ respectively satisfies the preset condition as the photographic image required by the user, instead of determining the photographic subject closest to the electronic device as the photographic subject required by the user, thereby reducing the probability that the photographic subject required by the user is not the photographic subject closest to the electronic device, but the photographic subject required by the user is not clear in the photographic image obtained by photographing, so that the user performs one or less times of photographing, and may obtain a satisfactory photographic image, and thus, the efficiency of photographing the image may be improved.
According to the target detection method provided by the embodiment of the application, the execution subject can be a target detection system, or electronic equipment, or a functional module or entity in the electronic equipment. In the embodiment of the application, an electronic device is taken as an example to execute a target detection method, and the target detection method provided by the embodiment of the application is described.
Fig. 1 shows a flow chart of a target detection method provided by an embodiment of the application, which is applied to electronic equipment. As shown in fig. 1, a target detection method provided in an embodiment of the present application may include the following steps 101 to 103.
In step 101, when the first preview image includes N first shooting objects, the electronic device obtains N first information corresponding to the N first shooting objects one by one.
In some embodiments of the present application, when a user opens a camera application, the electronic device may display a shooting preview interface of the camera application and open a camera of the electronic device, so that the electronic device may collect a first preview image through the camera, display the first preview image in the shooting preview interface, and detect the number of shooting objects included in the first preview image, and further, when the electronic device determines that N first shooting objects are included in the first preview image, the electronic device may obtain N first information corresponding to the N first shooting objects one by one.
Optionally, the electronic device may detect each of the shooting objects included in the first preview image through an object detection algorithm, and determine a first shooting object of a preset type from the respective shooting objects, so that the electronic device may determine whether the number of the first shooting objects is N, that is, greater than or equal to 1. The preset type may specifically be a human type. It can be understood that each first photographic subject is a person.
In the embodiment of the present application, the first information is used to indicate a facial organ distribution situation of a corresponding first shooting object, and N is a positive integer greater than 1.
In some embodiments of the present application, the first information may include at least one of: positional information of facial organs, positional relationship between facial organs, size information occupied by facial organs, facial organ feature information, and the like. The position information of the facial organ is used for indicating the position of the facial organ in the first preview image, and the size information of the facial organ is used for the size of the image area of the facial organ in the first preview image.
Step 102, the electronic device determines second information that the indicated facial organ distribution condition meets the preset condition from the N pieces of first information.
In the embodiment of the application, when a user shoots a shooting object (namely, a person) required by the user, the face of the shooting object faces the electronic equipment, so that the distribution condition of the facial organs of the shooting object required by the user in N first shooting objects in the first preview image meets the preset condition.
In some embodiments of the present application, the preset condition may include at least one of: the position information of the facial organs is in a preset area, the position relations among the facial organs are matched with the preset relations, the size information occupied by the facial organs is larger than or equal to the preset size information, and the facial organ characteristic information is matched with the preset characteristic information.
It will be appreciated that when a user photographs a subject required by the user, the user will generally require the subject to stand at a certain position, and therefore, the position information of the facial organ may be set in a preset area as a preset condition to determine whether the subject is a subject required by the user.
When a user shoots a shooting object required by the user, the face of the shooting object faces the electronic equipment, and the position relation between the face organs meets a certain preset relation, so that the position relation between the face organs can be matched with the preset relation as a preset condition to judge whether the shooting object is the shooting object required by the user.
When a user shoots a shooting object (namely, a person) required by the user, the face of the shooting object faces the electronic equipment, and the size information occupied by the facial organ is larger than or equal to certain preset size information at the moment, so that the size information occupied by the facial organ can be larger than or equal to the preset size information as a preset condition to judge whether the shooting object is the shooting object required by the user.
When a user photographs a subject (i.e., a person) required by the user, certain feature information of the subject may already be stored in the electronic device, so that facial organ feature information and preset feature information may be matched as a preset condition to determine whether the subject is a subject required by the user.
Step 103, the electronic device determines the first shooting object corresponding to the second information as a target shooting object.
In some embodiments of the present application, after the electronic device determines the target shooting object, the electronic device may perform focusing operation according to a position where the target shooting object is located, and obtain the target image according to shooting input (for example, clicking input performed on a shooting control in a shooting preview interface) of a user. It will be appreciated that in the target image, the target subject is clearer and the other subjects are more blurred.
The embodiment of the application provides a target detection method, under the condition that N first shooting objects are included in a first preview image, electronic equipment can firstly acquire first information corresponding to each first shooting object, the first information is used for indicating the facial organ distribution situation of the corresponding first shooting object, N is a positive integer larger than 1, and second information that the indicated facial organ distribution situation meets preset conditions is determined from the N first information, so that the electronic equipment can determine the first shooting object corresponding to the second information as a target shooting object. Because the electronic device determines the distribution condition of the facial organs of each first shooting object and determines a certain shooting object with the facial organs meeting preset conditions as the target shooting image required by the user instead of determining the shooting object closest to the electronic device as the target shooting object required by the user under the condition that the first preview image comprises a plurality of first shooting objects, the probability that the target shooting object required by the user is unclear in the shooting image obtained by shooting because the shooting object required by the user is not the shooting object closest to the electronic device can be reduced, and therefore, the user can shoot once or less times, and satisfactory shooting images can be obtained, and the efficiency of shooting images can be improved.
A specific scheme of determining the second information by the electronic device will be described below by taking an example that the first information includes different information, respectively.
In the following embodiments, any one of the N pieces of first information is taken as an example, and how the electronic device determines the second information is illustrated.
Example one,
In some embodiments of the application, the first information includes: first eye position information, second eye position information, and first nose position information. Alternatively, as shown in fig. 2 in conjunction with fig. 1, the above step 102 may be specifically implemented by the following steps 102a and 102 b.
Step 102a, the electronic device determines first distance information and second distance information according to the first eye position information, the second eye position information and the first nose position information.
In the embodiment of the present application, the first distance information is used to indicate a distance between the first eye position information and the first nose position information, and the second distance information is used to indicate a distance between the second eye position and the first nose position information.
In some embodiments of the present application, the electronic device may determine the position information of the facial organ of one first subject (any one of the first subjects) to obtain the first eye position information, the second eye position information, and the first nose position information, and then determine the first distance information and the second distance information.
Alternatively, the electronic apparatus may determine the position information of the eyeball center of one eye of the user as the first eye position information and the position information of the eyeball center of the other eye of the user as the second eye position information to determine the first eye position information and the second eye position information.
Alternatively, the electronic device may determine the position information of the line from the root of the nose to the tip of the nose of the user as the first nose position information.
Optionally, the electronic device may calculate a vertical distance between the first eye position information and the first nose position information to obtain first distance information, and calculate a vertical distance between the second eye position information and the first nose position information to obtain second distance information.
It should be noted that, for the description of calculating the vertical distance between the first eye position information (or the second eye position information) and the first nose position information to obtain the first distance information (or the second distance information) for the electronic device, reference may be made to the specific description in the related art, and the embodiments of the present application are not repeated herein.
Step 102b, the electronic device determines the first information as the second information when the distance indicated by the first distance information and the second distance information are matched.
In the embodiment of the present application, if the distance indicated by the first distance information and the second distance information corresponding to the first information corresponding to a certain first shooting object is matched, it may be considered that the distance from one eye to the nose of the certain first shooting object is the same as the distance from the other eye to the nose in the first preview image, that is, the face of the certain first shooting object is facing the electronic device, so it may be considered that the certain first shooting object is likely to be a shooting object required by the user, and thus the first information corresponding to the certain first shooting object may be determined as the second information.
Therefore, the electronic device can determine whether a certain first shooting object is a shooting object required by the user according to the distance information from the two eyes of the user to the nose of the user, instead of determining the shooting object closest to the electronic device as a target shooting object required by the user, so that the probability of unclear target shooting objects required by the user in the shot image obtained by shooting due to the fact that the shooting object required by the user is not the shooting object closest to the electronic device can be reduced, the user can shoot once or less times, satisfactory shot images can be obtained, and the efficiency of shooting the images can be improved.
Example two,
In some embodiments of the application, the first information includes: a first region size and a second region size, the first region size being the size of the image region in which the eyes of the user are located, the second region size being the size of the image region in which the eyeballs of the eyes of the user are located. Alternatively, as shown in fig. 3 in conjunction with fig. 1, the above step 102 may be specifically implemented by the following steps 102c and 102 d.
Step 102c, the electronic device determines a first percentage of the second area size relative to the first area size.
In some embodiments of the present application, the first area size may be specifically a region area, and the second area size may be specifically a region area.
In some embodiments of the present application, the electronic device may determine an area where a facial organ of one first subject (any one of the first subjects) is located, so as to obtain a first image area where one eye of the user is located, and a second image area where an eyeball in the one eye is located, so that the electronic device may calculate an area of the first image area to obtain a first area size, and calculate an area of the second image area to obtain a second area size.
In some embodiments of the application, the electronic device may determine a ratio of the second region size to the first region size as the first percentage.
Step 102d, the electronic device determines the first information as the second information when the first percentage is greater than or equal to a preset percentage.
In the embodiment of the present application, if the first percentage corresponding to the first information corresponding to the certain first shooting object is greater than or equal to the preset percentage, the eyeball of the certain first shooting object is considered to be looking at the electronic device, that is, the face of the certain first shooting object is considered to be facing the electronic device, so that the certain first shooting object is considered to be a shooting object possibly required by the user, and therefore the first information corresponding to the certain first shooting object can be determined as the second information.
As can be seen from this, the electronic device may determine whether a certain first shot object is a shot object required by the user according to a first percentage between the area size of the image area where the eye of the user is located and the area size of the image area where the eyeball in the eye is located, instead of determining the shot object closest to the electronic device as the target shot object required by the user, so that the probability that the target shot object required by the user is unclear in the shot image obtained by shooting due to the fact that the shot object required by the user is not the shot object closest to the electronic device can be reduced, and thus the user performs one or less shots, and a satisfactory shot image can be obtained, and thus, the efficiency of shooting the image can be improved.
Example III,
In some embodiments of the application, the first information includes: first facial organ characteristic information. Alternatively, as shown in fig. 4 in conjunction with fig. 1, the above step 102 may be specifically implemented by the following step 102 e.
Step 102e, the electronic device determines the first information as the second information when the first facial organ feature information matches any one of the M pieces of preset facial organ feature information.
In some embodiments of the present application, the M pieces of preset facial organ feature information may be pre-stored or obtained according to a subject in a picture (and/or video) in the electronic device.
The user may set face recognition information of the unlocking electronic device for a certain person, so that the electronic device may collect facial organ feature information of the certain person as one piece of preset facial organ feature information, and further the electronic device may determine whether a certain first shooting object in the first preview image is the certain person by using the one piece of preset facial organ feature information, and may determine that the certain first shooting object is a shooting object required by the user when determining that the certain first shooting object is the certain person.
It will be appreciated that since the user will often take a photograph of a familiar person, it is possible to determine whether a certain first photographic subject is a photographic subject required by the user by the first facial organ feature information and the M pieces of preset facial organ feature information.
Therefore, the probability of unclear target shooting objects required by the user in the shooting image obtained by shooting because the shooting objects required by the user are not the shooting objects closest to the electronic equipment can be reduced, so that the user can shoot once or less times, and satisfactory shooting images can be obtained, and the efficiency of shooting images can be improved.
The electronic device will be exemplified below to acquire M pieces of preset facial organ feature information, taking the example that the M pieces of preset facial organ feature information are obtained from a photographic subject in a picture (and/or video) in the electronic device
In some embodiments of the present application, as shown in fig. 5 in conjunction with fig. 4, before the step 102e, the target detection method provided in the embodiment of the present application may further include the following steps 201 to 203.
Step 201, the electronic device determines a plurality of second facial organ feature information from a plurality of captured images stored in the electronic device.
In the embodiment of the application, the plurality of second facial organ feature information corresponds to a plurality of second shooting objects.
In some embodiments of the present application, the electronic device may detect the stored plurality of captured images one by one to determine facial organ feature information of the subject in each captured image, thereby obtaining a plurality of second facial organ feature information.
It is understood that, since a plurality of captured images including the same subject may appear among a plurality of captured images stored in the electronic device, a part of the second facial organ feature information may be repeated among the plurality of obtained second facial organ feature information.
Step 202, the electronic device determines the first M second imaging objects with the largest number of corresponding second facial organ feature information from the plurality of second imaging objects.
In some embodiments of the present application, the electronic device may calculate the number of the second facial organ feature information corresponding to each second photographic object one by one, and sort the second photographic objects according to a sequence of at least more than the number, so that the electronic device may determine M second photographic objects before sorting from the sorted second photographic objects.
It will be understood that if the number of second facial organ feature information corresponding to one second photographic subject is large, the number of photographic images corresponding to the one second photographic subject can be considered to be large, that is, the one second photographic subject can be considered to be a person with close relationship with the user, so that the user is highly likely to need to photograph the one second photographic subject again.
Step 203, the electronic device determines second facial organ feature information corresponding to the first M second shooting objects as M preset facial organ feature information.
Therefore, the electronic device can determine M second shooting objects closely related to the user from a plurality of shooting images stored in the electronic device in advance, and determine second facial organ feature information corresponding to the M second shooting objects as M preset facial organ feature information, so that the electronic device can directly determine whether a certain first shooting object is a shooting object required by the user according to the M preset facial organ feature information.
According to the target detection method provided by the embodiment of the application, the execution subject can be a target detection system. In the embodiment of the application, the target detection system is taken as an example to execute the target detection method.
Fig. 6 shows a schematic diagram of one possible configuration of an object detection system involved in an embodiment of the present application. As shown in fig. 6, an object detection system 50 provided in an embodiment of the present application may include: an acquisition module 51 and a determination module 52.
The acquiring module 51 is configured to acquire N pieces of first information corresponding to N first shooting objects in a one-to-one manner, where the first information is used to indicate a facial organ distribution situation of the corresponding first shooting objects when the first preview image includes N first shooting objects, and N is a positive integer greater than 1. A determining module 52, configured to determine, from the N pieces of first information acquired by the acquiring module 51, second information that indicates that the facial organ distribution condition satisfies a preset condition; and determining the first shooting object corresponding to the second information as a target shooting object.
The embodiment of the application provides a target detection system, in the case that N first shooting objects are included in a first preview image, the target detection system can firstly acquire first information corresponding to each first shooting object, the first information is used for indicating the facial organ distribution situation of the corresponding first shooting object, N is a positive integer greater than 1, and from the N first information, second information that the indicated facial organ distribution situation meets preset conditions is determined, so that the target detection system can determine the first shooting object corresponding to the second information as a target shooting object. Because the target detection system determines the distribution condition of the facial organs of each first shooting object and determines a certain shooting object with the facial organs meeting the preset conditions as the target shooting image required by the user instead of determining the shooting object closest to the target detection system as the target shooting object required by the user in the case that a plurality of first shooting objects are included in the first preview image, the probability that the shooting object required by the user is unclear in the shooting image obtained by shooting because the shooting object required by the user is not the shooting object closest to the target detection system can be reduced, and therefore, the user can shoot once or less times to obtain a satisfactory shooting image, and the efficiency of shooting the image can be improved.
In one possible implementation manner, the first information includes: first eye position information, second eye position information, and first nose position information. The determining module 52 is specifically configured to determine first distance information and second distance information according to the first eye position information, the second eye position information, and the first nose position information, where the first distance information is used to indicate a distance between the first eye position information and the first nose position information, and the second distance information is used to indicate a distance between the second eye position and the first nose position information; and determining the first information as the second information in the case that the distances indicated by the first distance information and the second distance information match.
Therefore, the target detection system can determine whether a certain first shooting object is a shooting object required by the user according to the distance information from the two eyes of the user to the nose of the user, instead of determining the shooting object closest to the target detection system as the target shooting object required by the user, so that the probability of unclear target shooting objects required by the user in shooting obtained shooting images due to the fact that the shooting object required by the user is not the shooting object closest to the target detection system can be reduced, the user can shoot once or less times, satisfactory shooting images can be obtained, and the efficiency of shooting images can be improved.
In one possible implementation manner, the first information includes: the first region size is the size of the image region where the eyes of the user are located, and the second region size is the size of the image region where the eyeballs of the eyes of the user are located. The determining module 52 is specifically configured to determine a first percentage of the second area size relative to the first area size; and determining the first information as the second information in the case that the first percentage is greater than or equal to a preset percentage.
As can be seen from this, the target detection system can determine whether a certain first shot object is a user-required shot object according to the first percentage between the area size of the image area where the eyes of the user are located and the area size of the image area where the eyeballs in the eyes are located, instead of determining the shot object closest to the target detection system as the user-required target shot object, so that the probability that the shot object closest to the target detection system is not clear, resulting in the shot image, is reduced, and the user performs one or less shots, so that a satisfactory shot image can be obtained, and the efficiency of shooting the image can be improved.
In one possible implementation manner, the first information includes: first facial organ characteristic information. The determining module 52 is specifically configured to determine the first information as the second information when the first facial organ feature information matches any one of the M pieces of preset facial organ feature information.
Therefore, the target detection system can determine whether a certain first shooting object is a shooting object required by a user according to the first facial organ feature information, instead of determining the shooting object closest to the target detection system as the target shooting object required by the user, so that the probability of unclear target shooting objects required by the user in shooting images obtained by shooting because the shooting object required by the user is not the shooting object closest to the target detection system can be reduced, and the user can shoot once or less times, so that satisfactory shooting images can be obtained, and the efficiency of shooting images can be improved.
In a possible implementation manner, the determining module 52 is further configured to determine, from the stored plurality of captured images, a plurality of second facial organ feature information, where the first facial organ feature information matches any one of the M preset facial organ feature information, and the plurality of second facial organ feature information corresponds to a plurality of second captured objects before determining the first information as the second information; determining the first M second shooting objects with the largest quantity of the corresponding second facial organ characteristic information from the second shooting objects; and determining second facial organ feature information corresponding to the first M second shooting objects as M preset facial organ feature information.
Therefore, the target detection system can determine M second shooting objects closely related to the user from a plurality of shooting images stored in the target detection system in advance, and determine second facial organ feature information corresponding to the M second shooting objects as M preset facial organ feature information, so that the target detection system can directly determine whether a certain first shooting object is a shooting object required by the user according to the M preset facial organ feature information.
The object detection system in the embodiment of the application can be an electronic device, and also can be a component in the electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal, or may be other devices than a terminal. By way of example, the electronic device may be a mobile phone, tablet computer, notebook computer, palm computer, vehicle-mounted electronic device, mobile internet appliance (mobile internet device, MID), augmented reality (augmented reality, AR)/Virtual Reality (VR) device, robot, wearable device, ultra-mobile personal computer, UMPC, netbook or personal digital assistant (personal digital assistant, PDA), etc., but may also be a server, network attached storage (network attached storage, NAS), personal computer (personal computer, PC), television (TV), teller machine or self-service machine, etc., and the embodiments of the present application are not limited in particular.
The object detection system in the embodiment of the application can be a device with an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, and the embodiment of the present application is not limited specifically.
The object detection system provided in the embodiment of the present application can implement each process implemented by the embodiments of the methods of fig. 1 to 5, and in order to avoid repetition, a description is omitted here.
In some embodiments of the present application, as shown in fig. 7, an electronic device 60 is further provided in the embodiments of the present application, which includes a processor 61 and a memory 62, where a program or an instruction that can be executed on the processor 61 is stored in the memory 62, and the program or the instruction when executed by the processor 61 implements each process step of the above-mentioned embodiment of the target detection method, and can achieve the same technical effect, so that repetition is avoided and redundant description is omitted herein.
The electronic device in the embodiment of the application includes the mobile electronic device and the non-mobile electronic device.
Fig. 8 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 100 includes, but is not limited to: radio frequency unit 101, network module 102, audio output unit 103, input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, and processor 110.
Those skilled in the art will appreciate that the electronic device 100 may further include a power source (e.g., a battery) for powering the various components, and that the power source may be logically coupled to the processor 110 via a power management system to perform functions such as managing charging, discharging, and power consumption via the power management system. The electronic device structure shown in fig. 8 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than shown, or may combine certain components, or may be arranged in different components, which are not described in detail herein.
The processor 110 obtains N pieces of first information corresponding to the N first shooting objects one by one in the case that the first preview image includes the N first shooting objects, where the first information is used to indicate a facial organ distribution situation of the corresponding first shooting objects, and N is a positive integer greater than 1; determining second information of the indicated facial organ distribution condition meeting preset conditions from the N pieces of first information; and determining the first shooting object corresponding to the second information as a target shooting object.
The embodiment of the application provides electronic equipment, in the case that N first shooting objects are included in a first preview image, the electronic equipment can firstly acquire first information corresponding to each first shooting object, the first information is used for indicating the facial organ distribution situation of the corresponding first shooting object, N is a positive integer greater than 1, and from the N first information, second information that the indicated facial organ distribution situation meets preset conditions is determined, so that the electronic equipment can determine the first shooting object corresponding to the second information as a target shooting object. Because the electronic device determines the distribution condition of the facial organs of each first shooting object and determines a certain shooting object with the facial organs meeting preset conditions as the target shooting image required by the user instead of determining the shooting object closest to the electronic device as the target shooting object required by the user under the condition that the first preview image comprises a plurality of first shooting objects, the probability that the target shooting object required by the user is unclear in the shooting image obtained by shooting because the shooting object required by the user is not the shooting object closest to the electronic device can be reduced, and therefore, the user can shoot once or less times, and satisfactory shooting images can be obtained, and the efficiency of shooting images can be improved.
In one possible implementation manner, the first information includes: first eye position information, second eye position information, and first nose position information.
The processor 110 is specifically configured to determine first distance information and second distance information according to the first eye position information, the second eye position information, and the first nose position information, where the first distance information is used to indicate a distance between the first eye position information and the first nose position information, and the second distance information is used to indicate a distance between the second eye position and the first nose position information; in the case where the first distance information and the distance indicated by the second distance information match, the first information is determined as the second information.
Therefore, the electronic device can determine whether a certain first shooting object is a shooting object required by the user according to the distance information from the two eyes of the user to the nose of the user, instead of determining the shooting object closest to the electronic device as a target shooting object required by the user, so that the probability of unclear target shooting objects required by the user in the shot image obtained by shooting due to the fact that the shooting object required by the user is not the shooting object closest to the electronic device can be reduced, the user can shoot once or less times, satisfactory shot images can be obtained, and the efficiency of shooting the images can be improved.
In one possible implementation manner, the first information includes: the first region size is the size of the image region where the eyes of the user are located, and the second region size is the size of the image region where the eyeballs of the eyes of the user are located.
A processor 110, specifically configured to determine a first percentage of the second area size relative to the first area size; and determining the first information as the second information in the case that the first percentage is greater than or equal to the preset percentage.
As can be seen from this, the electronic device may determine whether a certain first shot object is a shot object required by the user according to a first percentage between the area size of the image area where the eye of the user is located and the area size of the image area where the eyeball in the eye is located, instead of determining the shot object closest to the electronic device as the target shot object required by the user, so that the probability that the target shot object required by the user is unclear in the shot image obtained by shooting due to the fact that the shot object required by the user is not the shot object closest to the electronic device can be reduced, and thus the user performs one or less shots, and a satisfactory shot image can be obtained, and thus, the efficiency of shooting the image can be improved.
In one possible implementation manner, the first information includes: first facial organ characteristic information.
The processor 110 is specifically configured to determine the first information as the second information in a case where the first facial organ feature information matches any one of the M pieces of preset facial organ feature information.
Therefore, the probability of unclear target shooting objects required by the user in the shooting image obtained by shooting because the shooting objects required by the user are not the shooting objects closest to the electronic equipment can be reduced, so that the user can shoot once or less times, and satisfactory shooting images can be obtained, and the efficiency of shooting images can be improved.
In a possible implementation manner, the processor 110 is further configured to determine a plurality of second facial organ feature information from a plurality of captured images stored in the electronic device, where the plurality of second facial organ feature information corresponds to a plurality of second captured objects; determining the first M second shooting objects with the largest quantity of the corresponding second facial organ characteristic information from the second shooting objects; and determining second facial organ characteristic information corresponding to the first M second shooting objects as M preset facial organ characteristic information.
Therefore, the electronic device can determine M second shooting objects closely related to the user from a plurality of shooting images stored in the electronic device in advance, and determine second facial organ feature information corresponding to the M second shooting objects as M preset facial organ feature information, so that the electronic device can directly determine whether a certain first shooting object is a shooting object required by the user according to the M preset facial organ feature information.
It should be appreciated that in embodiments of the present application, the input unit 104 may include a graphics processor (graphics processing unit, GPU) 1041 and a microphone 1042, the graphics processor 1041 processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 107 includes at least one of a touch panel 1071 and other input devices 1072. The touch panel 1071 is also referred to as a touch screen. The touch panel 1071 may include two parts of a touch detection device and a touch controller. Other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and so forth, which are not described in detail herein.
Memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a first memory area storing programs or instructions and a second memory area storing data, wherein the first memory area may store an operating system, application programs or instructions (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like. Further, the memory 109 may include volatile memory or nonvolatile memory, or the memory 109 may include both volatile and nonvolatile memory. The nonvolatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an electrically Erasable EPROM (EEPROM), or a flash memory. The volatile memory may be random access memory (random access memory, RAM), static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (ddr SDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), and direct memory bus RAM (DRRAM). Memory 109 in embodiments of the present application includes, but is not limited to, these and any other suitable types of memory.
Processor 110 may include one or more processing units; optionally, the processor 110 integrates an application processor that primarily processes operations involving an operating system, user interface, application programs, etc., and a modem processor that primarily processes wireless communication signals, such as a baseband processor. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The embodiment of the application also provides a readable storage medium, on which a program or an instruction is stored, which when executed by a processor, implements the processes of the above-described embodiment of the target detection method, and can achieve the same technical effects, so that repetition is avoided, and no further description is given here.
Wherein the processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes computer readable storage medium such as computer readable memory ROM, random access memory RAM, magnetic or optical disk, etc.
The embodiment of the application further provides a chip, which comprises a processor and a communication interface, wherein the communication interface is coupled with the processor, and the processor is used for running programs or instructions to realize the processes of the embodiment of the target detection method, and can achieve the same technical effects, so that repetition is avoided, and the description is omitted here.
It should be understood that the chips referred to in the embodiments of the present application may also be referred to as system-on-chip chips, chip systems, or system-on-chip chips, etc.
Embodiments of the present application provide a computer program product stored in a storage medium, where the program product is executed by at least one processor to implement the respective processes of the above-described object detection method embodiment, and achieve the same technical effects, and for avoiding repetition, a detailed description is omitted herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in an opposite order depending on the functions involved, e.g., the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a computer software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are to be protected by the present application.

Claims (10)

1. A target detection method applied to an electronic device, the method comprising:
under the condition that N first shooting objects are included in a first preview image, N pieces of first information corresponding to the N first shooting objects one by one are obtained, wherein the first information is used for indicating the facial organ distribution situation of the corresponding first shooting objects, and N is a positive integer larger than 1;
determining second information of the indicated facial organ distribution condition meeting preset conditions from the N pieces of first information;
and determining the first shooting object corresponding to the second information as a target shooting object.
2. The method of claim 1, wherein the first information comprises: first eye position information, second eye position information, and first nose position information;
the determining, from the N pieces of first information, second information that the indicated facial organ distribution condition satisfies a preset condition includes:
determining, according to the first eye position information, the second eye position information and the first nose position information, first distance information for indicating a distance between the first eye position information and the first nose position information, and second distance information for indicating a distance between the second eye position and the first nose position information;
And determining the first information as the second information in the case that the distances indicated by the first distance information and the second distance information are matched.
3. The method of claim 1, wherein the first information comprises: a first region size and a second region size, wherein the first region size is the size of an image region where an eye of a user is located, and the second region size is the size of an image region where an eyeball of the eye of the user is located;
the determining, from the N pieces of first information, second information that the indicated facial organ distribution condition satisfies a preset condition includes:
determining a first percentage of the second area size relative to the first area size;
and determining the first information as the second information when the first percentage is greater than or equal to a preset percentage.
4. The method of claim 1, wherein the first information comprises: first facial organ characteristic information;
the determining, from the N pieces of first information, second information that the indicated facial organ distribution condition satisfies a preset condition includes:
the first information is determined as the second information in the case where the first facial organ feature information matches any one of M pieces of preset facial organ feature information.
5. The method according to claim 4, wherein, in a case where the first facial organ feature information matches any one of M pieces of preset facial organ feature information, before determining the first information as the second information, the method further comprises:
determining a plurality of second facial organ feature information from a plurality of photographed images stored by the electronic device, wherein the plurality of second facial organ feature information corresponds to a plurality of second photographed objects;
determining the first M second shooting objects with the largest quantity of the second facial organ characteristic information from the second shooting objects;
and determining the second facial organ characteristic information corresponding to the first M second shooting objects as M preset facial organ characteristic information.
6. An object detection system, the object detection system comprising: an acquisition module and a determination module;
the acquiring module is configured to acquire N pieces of first information corresponding to N first shooting objects one by one in a case where the first preview image includes N first shooting objects, where the first information is used to indicate a facial organ distribution situation of the corresponding first shooting objects, and N is a positive integer greater than 1;
The determining module is used for determining second information of the indicated facial organ distribution condition meeting a preset condition from the N pieces of first information acquired by the acquiring module; and determining the first shooting object corresponding to the second information as a target shooting object.
7. The system of claim 6, wherein the first information comprises: first eye position information, second eye position information, and first nose position information;
the determining module is specifically configured to determine, according to the first eye position information, the second eye position information, and the first nose position information, first distance information and second distance information, where the first distance information is used to indicate a distance between the first eye position information and the first nose position information, and the second distance information is used to indicate a distance between the second eye position and the first nose position information; and determining the first information as the second information in the case that the distances indicated by the first distance information and the second distance information are matched.
8. The system of claim 6, wherein the first information comprises: a first region size and a second region size, wherein the first region size is the size of an image region where an eye of a user is located, and the second region size is the size of an image region where an eyeball of the eye of the user is located;
The determining module is specifically configured to determine a first percentage of the second area size relative to the first area size; and determining the first information as the second information when the first percentage is greater than or equal to a preset percentage.
9. The system of claim 6, wherein the first information comprises: first facial organ characteristic information;
the determining module is specifically configured to determine the first information as the second information when the first facial organ feature information matches any one of M pieces of preset facial organ feature information.
10. The system according to claim 9, wherein the determining module is further configured to determine, in a case where the first facial organ feature information matches any one of M pieces of the preset facial organ feature information, a plurality of second facial organ feature information from a plurality of captured images stored in the object detection system before determining the first information as the second information, the plurality of second facial organ feature information corresponding to a plurality of second captured objects; determining the first M second shooting objects with the largest quantity of the second facial organ characteristic information from the second shooting objects; and determining the second facial organ feature information corresponding to the first M second shooting objects as M preset facial organ feature information.
CN202311336846.8A 2023-10-17 2023-10-17 Target detection method and system Active CN117097982B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311336846.8A CN117097982B (en) 2023-10-17 2023-10-17 Target detection method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311336846.8A CN117097982B (en) 2023-10-17 2023-10-17 Target detection method and system

Publications (2)

Publication Number Publication Date
CN117097982A true CN117097982A (en) 2023-11-21
CN117097982B CN117097982B (en) 2024-04-02

Family

ID=88780508

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311336846.8A Active CN117097982B (en) 2023-10-17 2023-10-17 Target detection method and system

Country Status (1)

Country Link
CN (1) CN117097982B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101911670A (en) * 2008-01-07 2010-12-08 摩托罗拉公司 Digital camera focusing using stored object recognition
CN103024265A (en) * 2011-09-21 2013-04-03 奥林巴斯映像株式会社 Imaging device and imaging method for imaging device
CN104349207A (en) * 2014-11-11 2015-02-11 无锡科思电子科技有限公司 Automatic control method of set-top box based on image recognition
CN105812652A (en) * 2015-07-29 2016-07-27 维沃移动通信有限公司 Terminal focusing method and terminal
JP2019061704A (en) * 2018-11-30 2019-04-18 富士ゼロックス株式会社 Information processing device and information processing program
CN110418064A (en) * 2019-09-03 2019-11-05 北京字节跳动网络技术有限公司 Focusing method, device, electronic equipment and storage medium
CN110537207A (en) * 2017-03-10 2019-12-03 三菱电机株式会社 Face estimates method towards estimating device and face's direction
US20210015362A1 (en) * 2018-03-22 2021-01-21 Sony Corporation Control device and method, and surgical microscope system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101911670A (en) * 2008-01-07 2010-12-08 摩托罗拉公司 Digital camera focusing using stored object recognition
CN103024265A (en) * 2011-09-21 2013-04-03 奥林巴斯映像株式会社 Imaging device and imaging method for imaging device
CN104349207A (en) * 2014-11-11 2015-02-11 无锡科思电子科技有限公司 Automatic control method of set-top box based on image recognition
CN105812652A (en) * 2015-07-29 2016-07-27 维沃移动通信有限公司 Terminal focusing method and terminal
CN110537207A (en) * 2017-03-10 2019-12-03 三菱电机株式会社 Face estimates method towards estimating device and face's direction
US20210015362A1 (en) * 2018-03-22 2021-01-21 Sony Corporation Control device and method, and surgical microscope system
JP2019061704A (en) * 2018-11-30 2019-04-18 富士ゼロックス株式会社 Information processing device and information processing program
CN110418064A (en) * 2019-09-03 2019-11-05 北京字节跳动网络技术有限公司 Focusing method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN117097982B (en) 2024-04-02

Similar Documents

Publication Publication Date Title
CN110012209B (en) Panoramic image generation method and device, storage medium and electronic equipment
CN112954212B (en) Video generation method, device and equipment
CN112291473B (en) Focusing method and device and electronic equipment
CN112333382B (en) Shooting method and device and electronic equipment
CN112422798A (en) Photographing method and device, electronic equipment and storage medium
CN112511743B (en) Video shooting method and device
CN112887615A (en) Shooting method and device
CN117097982B (en) Target detection method and system
CN115499589A (en) Shooting method, shooting device, electronic equipment and medium
CN114241127A (en) Panoramic image generation method and device, electronic equipment and medium
CN112367464A (en) Image output method and device and electronic equipment
CN112887621B (en) Control method and electronic device
CN114915730B (en) Shooting method and shooting device
CN112367470B (en) Image processing method and device and electronic equipment
CN113489901B (en) Shooting method and device thereof
CN113938597B (en) Face recognition method, device, computer equipment and storage medium
CN112367468B (en) Image processing method and device and electronic equipment
CN114285988B (en) Display method, display device, electronic equipment and storage medium
CN117528227A (en) Shooting method and device thereof
CN117453635A (en) Image deletion method, device, electronic equipment and readable storage medium
CN117745528A (en) Image processing method and device
CN115103119A (en) Shooting method and device and electronic equipment
CN117241126A (en) Shooting method, shooting device, electronic equipment and readable storage medium
CN117676310A (en) Shooting method, shooting device, electronic equipment and medium
CN115589457A (en) Shooting method, shooting device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant