Image acquisition method, electronic equipment and readable storage medium
By displaying the preview screen at the terminal and evaluating the screen structure and posture, the problem of low image quality when shooting a target object is easily moved is solved, and a higher quality image acquisition is achieved.
Patent Information
- Application Number
- CN202410110721.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-25
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-01-25
AI Technical Summary
When shooting target objects that are easily moved, it is difficult to obtain high-quality images because the target objects are not easily controlled, making it difficult to maintain a stable posture and clear composition during the shooting process.
By displaying the preview screen on the terminal, evaluating the screen structure and the pose of the target object, high-quality images are obtained using the evaluation results. The specific steps include detecting the target object, evaluating the screen structure and posture, deciding whether to take a picture based on the evaluation results, and obtaining the image when the preset conditions are met.
It improves the controllability and image quality of the shooting process, especially when shooting target objects that are not easy to fix poses such as young children and animals, it can capture better shooting moments and composition effects.
Smart Images

Figure CN119255092A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to an image acquisition method, an electronic device and a readable storage medium. Background Art
[0002] With the development of computer technology and terminal technology, terminals have become popular among the public. At the same time, almost all mobile terminals have a camera function. Therefore, mobile terminal users basically have the habit of using mobile terminals to take photos and videos. However, in some cases, the subject is easy to move, and it is difficult to obtain high-quality images when shooting such a subject. Summary of the invention
[0003] The present application provides an image acquisition method, an electronic device and a readable storage medium. The technical solution is as follows:
[0004] In a first aspect, an image acquisition method is provided, comprising: displaying a preview screen of image acquisition on a terminal; acquiring a first evaluation result of a screen structure in the preview screen in response to a target object detected in the preview screen; acquiring a second evaluation result of a posture of the target object in the preview screen when the first evaluation result satisfies a first preset condition; and acquiring an image of the preview screen based on the second evaluation result.
[0005] In an embodiment of the present application, with respect to a target object in a preview screen of a terminal, the screen structure of the preview screen and the posture of the target object are evaluated, and an image of the preview screen is acquired based on the evaluation result, thereby being able to improve the quality of the photographed photo in terms of the screen structure and the posture of the target object.
[0006] In one embodiment, after the terminal displays the preview screen, it also includes: obtaining the object in the preview screen; judging whether the type of the object is the target object and obtaining a judgment result; displaying an inquiry control on the terminal according to the judgment result; and in response to a user clicking operation on the inquiry control, entering the step of obtaining a first evaluation result of the screen structure in the preview screen.
[0007] After detecting the object in the preview screen, the user is asked to determine whether to enter the first evaluation operation, that is, the user decides whether to trigger the process of taking a photo of the target object provided in the embodiment of the present application, thereby improving the controllability of the photo taking process.
[0008] In a possible implementation, obtaining a first evaluation result of a picture structure in a preview picture includes: obtaining picture structure evaluation parameters of the preview picture according to coordinates of a target object in the preview picture; the picture structure evaluation parameters include at least one of an area size parameter, a visual balance parameter, and a rule of thirds composition parameter; and obtaining a first evaluation result according to the picture structure evaluation parameters.
[0009] In an embodiment of the present application, the picture structure of the preview picture is evaluated through area size parameters, visual balance parameters and rule of thirds composition parameters, and whether the preview picture structure meets the requirements is measured from multiple dimensions to obtain a first evaluation result. The photographed image obtained according to the first evaluation result has a better visual effect in terms of picture structure.
[0010] In one embodiment, the picture structure evaluation parameters include area size parameters, visual balance parameters and rule of thirds composition parameters. According to the coordinates of the target object in the preview picture, the picture structure evaluation parameters of the preview picture are obtained, including: according to the coordinates, determining the proportion of the area size of the target object in the preview picture; using the proportion as the area size parameter; according to the coordinates, determining the vertical position and horizontal position of the target object in the preview picture; using the horizontal position and the vertical position as visual balance parameters; according to the coordinates, determining the minimum distance between the target object and the rule of thirds node in the preview picture; the rule of thirds node is a node in the preview picture that meets the rule of thirds composition rules; and using the minimum distance as the rule of thirds composition parameter.
[0011] In this embodiment, according to the coordinates of the target object in the preview picture, relatively objective and accurate evaluation data can be obtained in terms of picture structure, visual balance, and general composition rules, thereby achieving a comprehensive evaluation of the picture structure of the preview picture.
[0012] In one embodiment, obtaining a second evaluation result of the posture of the target object in the preview screen includes: obtaining the action semantic features of the target object; determining the score corresponding to the action semantic features; and obtaining a second evaluation result based on the score when the score is higher than a preset threshold.
[0013] In this embodiment, a second evaluation result of the target object's posture is obtained based on the action semantic features of the target object, so that it is possible to judge whether the preview image is suitable from the action and posture dimensions of the target object, which is conducive to obtaining an image with better action and posture effects.
[0014] In one embodiment, when the score is higher than a preset threshold, a second evaluation result is obtained based on the score, including: when the score is higher than the preset threshold, assigning a category label of a corresponding action semantic feature to the image frame of the preview screen; sorting the scores corresponding to the image frames including the category labels in the continuous image frames of the preview screen; determining a target category label in the category labels based on the sorting results; and using the target category label as the second evaluation result.
[0015] In this embodiment, the continuous image frames are sorted by posture type or action type using scores, and then the target category labels of the continuous image frames are determined based on the sorting, which helps to select images with the best posture or action dimension effects from the continuous image frames.
[0016] In one embodiment, based on the second evaluation result, an image of the preview screen is obtained, including: when the second evaluation result indicates that there is an image frame with a target category label in the preview screen, displaying a photo prompt control on the terminal; in response to a user clicking operation on the photo prompt control, obtaining an image frame with an action target category label as the image of the preview screen.
[0017] In this embodiment, by receiving the information of the click operation manually sent by the user, the image of the preview screen is obtained, thereby improving the user's control over the photographing process and avoiding obtaining images that the user does not want to keep.
[0018] In one embodiment, acquiring an image of the preview screen according to the second evaluation result includes: when the second evaluation result indicates that there are image frames with target category labels in the preview screen, acquiring image frames with target category labels as the image of the preview screen.
[0019] Images with target category labels have better effects in posture or action dimensions. In this embodiment, when the target object presents a better posture or action effect in the preview screen, an image of the preview screen is acquired, thereby obtaining an image of better quality when the movement of the target object is not easily controlled by the photographer or is irregular.
[0020] In one embodiment, the target object is at least one of an animal and a human being of a preset age group.
[0021] In this embodiment, the movements of animals are generally not easily controlled by the photographer, and the movements of humans in special age groups or in some special occasions are also not easily controlled by the photographer. Therefore, for special types of target objects such as animals and humans in preset age groups, the image acquisition method provided in the embodiment of the present application can be used to take photos, which helps to improve the photo effect.
[0022] In a second aspect, a computer-readable storage medium is provided, in which instructions are stored. When the instructions stored in the storage medium are executed on a computer, the computer can execute the method of the first aspect.
[0023] According to a third aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the method according to the first aspect.
[0024] The technical effects obtained by the above-mentioned second and third aspects are similar to the technical effects obtained by the corresponding technical means in the above-mentioned first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1This is a schematic diagram of an application scenario of an embodiment of the present application;
[0026] Figure 2 is another application scenario schematic diagram of an embodiment of the present application;
[0027] Figure 3 This is another application scenario schematic diagram of an embodiment of the present application;
[0028] Figure 4 A schematic diagram of a flow chart of an image acquisition method provided in an embodiment of the present application;
[0029] Figure 5A This is a schematic diagram of starting the photo taking interface in the embodiment of the present application;
[0030] Figure 5B This is a schematic diagram of a photo taking interface according to another embodiment of the present application;
[0031] Figure 6 This is a schematic diagram of a photo taking interface in another example of this application;
[0032] Figure 7 This is a schematic diagram of an implementation process of an image acquisition method in an example of the present application;
[0033] Figure 8 This is a schematic diagram of the interactive interface before the photo-taking operation is performed in another example of the present application;
[0034] Fig.9A This is a schematic diagram of the interactive interface before the photo-taking operation is performed in another example of the present application;
[0035] Fig. 9B This is a schematic diagram of an interactive interface before a photo-taking operation is performed in another example of the present application;
[0036] Fig. 9C This is a schematic diagram of an interactive interface before a photo-taking operation is performed in another example of the present application;
[0037] Fig.9D This is a schematic diagram of an interactive interface before a photo-taking operation is performed in another example of the present application;
[0038] Fig. 10A This is a schematic diagram of an interactive interface presented before taking a photo in an example of this application;
[0039] Fig. 10B This is a schematic diagram of an interactive interface presented before taking a photo in another example of the present application;
[0040] Fig. 10C This is a schematic diagram of an interactive interface presented before taking a photo in another example of the present application;
[0041] Fig.11AThis is a schematic diagram of a process of obtaining scores of image frames of a preview screen in an example of the present application;
[0042] Fig. 11B This is a schematic diagram of a process for obtaining a picture structure score in an example of the present application;
[0043] Fig. 11C This is a schematic diagram of the process of obtaining a posture score in an example of this application;
[0044] Fig.12 A schematic diagram of an image acquisition device according to an embodiment of the present application;
[0045] Fig.13 is a schematic diagram of the software structure of the electronic device involved in the embodiment of the present application;
[0046] Fig.14 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0047] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0048] It should be understood that the "multiple" mentioned in this application refers to two or more. In the description of this application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate the clear description of the technical solution of this application, the words "first" and "second" are used to distinguish between the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first" and "second" do not limit the quantity and execution order, and the words "first" and "second" do not limit them to be different.
[0049] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0050] The camera function of mobile terminals has become one of the basic functions of mobile terminals, and most non-mobile terminals also have a camera function. At the same time, the development of specialized camera devices is also getting faster and faster, and there are endless types. There are many kinds of objects photographed by terminal users. Some special objects are easy to move and difficult to maintain in a good shooting state during the shooting process, so it is difficult to obtain satisfactory images for users through terminals or specialized camera devices. For example, users often need to use the terminal's camera device or a specialized camera device to shoot animals, children and other objects. Since animals, children and other objects are difficult to control during the shooting process, they often move and change their expressions at the moment the camera captures the image, resulting in problems such as distortion and blurring of the image.
[0051] As users' lives become more colorful, users often hope to capture images of better quality in situations where children or animals are present. Therefore, the present application proposes an image acquisition method for obtaining images of higher quality for a specific target object.
[0052] Figure 1 It is a schematic diagram of an application scenario of the image acquisition method provided in an embodiment of the present application. Figure 1 In the scene shown, the target objects being photographed include a child object 101 and a pet 102. Figure 1 In a, the user turns on the camera of the mobile terminal 103, turns on the camera function of the mobile terminal 103, and points the camera at the child object 11 to take a photo. Then, Figure 1 In step b, the user wants to use the mobile terminal 103 to take photos to record the beautiful moments of the pet 102, so the user turns on the camera function of the mobile terminal 103 and points the camera at the pet 102 to take photos. Figure 1 In c, the child object 101 and the pet 102 are in the same shooting range, and the user turns on the camera of the mobile terminal 103 to shoot the child object 101 and the pet 102 at the same time.
[0053] Figure 2 It is a schematic diagram of another application scenario of the image acquisition method provided in an embodiment of the present application. Figure 2 In the scenario shown, a user conducts a video chat with other users through a terminal 21 with a camera function. During the chat, the other user points the camera of the other user's terminal at a child 22, and the user wants to take a screenshot on the terminal 21 to obtain and record the beautiful moments of the child 22 during the chat, so the user activates the screenshot tool of the terminal to obtain a screenshot picture 23 of the current chat interface.
[0054] Figure 33 is a schematic diagram of an application scenario of an image acquisition method provided by another embodiment of the present application. A user uses a camera device 32 to shoot a video file 31 of a subject in advance, and the user edits the video file 31 through another terminal 33. During the editing process, the user hopes to obtain a picture of the subject in the video file 31, so the user filters the video frames in the video file 31 and captures the picture in the video file 31 when the picture to be obtained appears. The subject may be a person of any age, an animal, a vehicle, the starry sky, or other objects that can be photographed.
[0055] The embodiments of the present application are also applicable to many other scenarios, which will not be described one by one here.
[0056] exist Figures 1 to 3 Based on the scenario shown, an embodiment of the present application also provides an image acquisition method. Figure 4 is a flow chart of an image acquisition method provided in an embodiment of the present application. An image acquisition method provided in an embodiment of the present application includes Figure 4 Steps S41 to S44 are shown.
[0057] Step S41: displaying a preview screen on the terminal.
[0058] In the embodiment of the present application, the terminal can be a desktop computer, a laptop computer, a tablet computer, a mobile phone, a PDA, a wearable smart device, smart furniture, a smart cabinet, or other electronic device with a display screen that can display images or pictures.
[0059] Displaying a preview screen on the terminal may be displaying a preview screen of a camera interface on the terminal, such as Figure 5A As shown in a in FIG. 1 , the user clicks the icon 51 of the camera application of the terminal to start the camera application and open Figure 5A The photo taking interface 52 shown in b in FIG. 5 includes a preview screen of the photographed object. Figure 5A The preview screen shown in b in the figure can be used to observe the position of the photographed object in the preview screen, the photographing effect, etc. in advance during the photographing process. When the state of the photographed object presented in the preview screen meets the user's expectations, the user can click the photographing control 53 to obtain the preview screen of the photographed object as the acquired image.
[0060] In another possible implementation, the preview screen displayed on the terminal may be a chat interface during the chat process. In the chat interface, two clients that establish a chat link through the network, at least two different users can see the screen of the user of the other client on their own clients. This screen can also be the preview screen in step S41.
[0061] Alternatively, in another possible implementation, the preview screen displayed on the terminal may be a video file played through a video playback application or a web page, wherein the video frame of the video file is the preview screen. During the video playback, the pause button may be clicked to display a preview screen of a video frame of the video file. Alternatively, during the video playback, the preview control may be clicked or a preview instruction may be issued to display a preview screen of the video file. Alternatively, during the video file editing process, the video segment of the video file may be determined according to the positioning instruction, and a video frame representing the content of the video segment may be displayed as a preview screen.
[0062] Step S42: in response to the target object detected in the preview picture, obtaining a first evaluation result of the picture structure in the preview picture.
[0063] In an embodiment of the present application, before step S42, it also includes: performing target detection on the preview screen (i.e., detecting the target included in the image frame corresponding to the preview screen), obtaining the target in the preview screen, and determining whether the obtained target is of a preset type. If so, the target detected in the preview screen is used as the target object.
[0064] The target object can be a variety of preset types of objects, such as people, animals, vehicles, etc. After the terminal opens the preview screen, a neural network can be used to detect the target on the preview screen to determine the probability that the target is of multiple preset types, and determine whether the target is a target object based on the probability that the target belongs to multiple preset types. For example, a neural network model is used to detect the target on the preview screen, and a target in the preview screen is obtained. A binary classification neural network is used for the target to determine that the probability that the target is a preset type of person, animal, or vehicle is 0.1, 0.2, and 0.7, respectively. Then, it can be determined that the detected target is a vehicle type.
[0065] In a possible implementation, the target object may be an object with a fast-moving property, such as: young children, animals, vehicles, airplanes, trains, meteors, flowing water, waves, etc. Among them, young children may be children of a set age group, such as children aged 0-3. When a user shoots young children or animals, it may be difficult to control the photographed object to be in the state required by the photographer and maintain the state until the end of the shooting. Therefore, it is difficult to shoot suitable images for young children and animals. It may be difficult to shoot clear images and it may be difficult to keep the photographed target object within the shooting range of the lens during the shooting process. In addition, since objects such as vehicles, airplanes, trains, meteors, flowing water, waves, etc. may have the property of fast movement under normal circumstances, the embodiment of the present application detects the picture structure of this type of object that is likely to move quickly under normal conditions in the preview picture, and evaluates the picture structure to determine whether the current lens has properly captured the photographed object.
[0066] In one embodiment, the screen structure includes: when the target object is located in the preview screen, the structure formed by the portion of the preview screen occupied by the target object and the remaining portion of the preview screen. For example, when the target object is a young child, the screen structure includes the portion of the preview screen occupied by the young child and the portion of the preview screen occupied by the remaining content.
[0067] In another embodiment, the picture structure includes: a structure composed of: a portion occupied by the target object in the preview picture, a portion occupied by other targets in the preview picture, and a portion of the remaining content in the preview picture. For example, when the target object includes multiple characters, one of which is a young child, the picture structure may include: a portion occupied by the characters in the preview picture, a portion occupied by the young child, and a portion occupied by the remaining content in the preview picture. For another example, when the target object includes a vehicle, a road, and a building, the picture structure may include a portion occupied by the vehicle in the preview picture, a portion occupied by the road in the preview picture, a portion occupied by the building in the preview picture, and a portion occupied by the remaining content in the preview picture.
[0068] In another embodiment, different target objects may have different evaluation criteria for the corresponding picture structure. For example, when the photographed object is a moving car, a flying airplane, or a meteor, the general public may be far away from the moving car, the flying airplane, or the meteor when photographing the moving car, the flying airplane, or the meteor flowing in the sky, and it is difficult to make the car, the airplane, or the meteor occupy the main part of the picture. Therefore, for the car, the airplane, or the meteor, a looser evaluation standard may be used to evaluate the picture structure.
[0069] In another possible implementation, the target object may also be a fast-moving target detected in the preview image. Among the targets identified in the preview image, if the target is moving at a speed within a set threshold range, the target is regarded as the target object. Thus, when a human body is moving, dancing, or jumping, the human body may also be recognized as the target object. Furthermore, when a user jumps in a shooting scene and wants to capture the jumping appearance in the image, the preview image can also be evaluated to capture an image that satisfies the user.
[0070] Step S43: when the first evaluation result satisfies the first preset condition, obtaining a second evaluation result of the posture of the target object in the preview screen.
[0071] In this embodiment, the first evaluation result may be a score, and the first preset condition may be a score threshold; or the first evaluation result may be a type identifier, and the first preset condition may be at least one of the multiple type identifiers. For example, if the first evaluation result is one of the five categories of A, B, C, D, and E, and the first preset condition is B or C, then when the first evaluation result is B or C, it is considered that the first evaluation result meets the first preset condition.
[0072] In a possible implementation, the quality of an image is related to multiple factors, and it is not necessary for the target object to meet certain structural requirements in order to provide a good user experience. Based on this, the first evaluation result may be a score corresponding to a type identification symbol, and the first preset condition may be a threshold range of a score corresponding to a type identification symbol, or a combination of threshold ranges of scores corresponding to two or more type identification symbols, or in other words, the first evaluation result includes scores of multiple dimensions, or includes scores of a single dimension, and the first preset condition may include a threshold range of scores of at least one dimension. For example, the first evaluation result includes scores corresponding to five categories of A, B, C, D, and E, and the scores are A: 10 points, B: 10 points, C: 50 points, D: 60 points, and E: 30 points, respectively. At the same time, the first preset condition is that the total score of each category is more than 100 points, or C is more than 30 points and D is more than 50 points. Then, it can be determined that the first evaluation result meets the first preset condition.
[0073] When a combination of multiple types is used as the first preset condition, and each type corresponds to a scoring threshold range, a more accurate judgment can be made on some target objects in special states. For example, a child wearing an animal-shaped coat may be identified as both an animal type and a child type in the preview screen. Different judgment criteria in terms of screen structure are set for target objects of child type and animal type, and a comprehensive judgment is made, and it can be considered that the first evaluation result meets the first preset condition.
[0074] When it is possible to detect that the preview screen has a special background, the image that the user hopes to capture may have a different picture structure from that of a general person image. For example, the user stands in front of a landscape to take a photo, and the landscape serves as the background and occupies a large part of the preview screen. Although the structure of the preview screen may not be optimal based on the part occupied by the human body and the part occupied by the background in the preview screen, the image needs to be captured according to the picture structure of the current preview screen in order to capture the complete landscape as the background. Therefore, in such a scenario, a first preset condition corresponding to the landscape background may be set.
[0075] The posture of the target object may include at least one of the posture, state, appearance, style, bearing, and action of the target object. In a possible implementation, the posture of the target object mainly includes the action of the target object. The posture of the target object may include the body posture of the target object. For example, if the target object is an animal or a person, the set animal posture or the set person posture is considered to be a posture that meets the second preset condition. For another example, if the target object is an object, the posture of the object may be the state of the object presented in the picture. If the posture of some target objects does not change significantly when in motion or at rest, such as vehicles, airplanes, etc., then the second preset condition may include the general state of the target object when in motion or at rest, or it is assumed that the posture of this type of target object meets the second preset condition in any case. For example, in the case of the target object vehicle, airplane, etc., it is assumed that the posture of the target object meets the second preset condition. Then, when target recognition is performed in the preview picture, and it is determined that the target object in the preview picture is a target object of a set type such as a vehicle or airplane, a judgment result that the posture of the target object meets the second preset condition is obtained.
[0076] In one implementation, when there is a target object in the preview screen, a first evaluation operation is performed on the preview screen to obtain a first evaluation result, and when the first evaluation result meets a first preset condition, a second evaluation operation is performed on the preview screen to obtain a second evaluation result.
[0077] In another implementation, when there is a target object in the preview screen, a first evaluation result and a second evaluation result are obtained, and when the first evaluation result meets the first preset condition and the second evaluation result meets the second preset condition, the subsequent step S44 is performed.
[0078] In an embodiment of the present application, a combination of scores of multiple dimensions or a score of a single dimension can be used to determine the second evaluation result. For example, the posture of the target object includes scores of multiple dimensions such as posture, state, style, appearance, demeanor, and action as the second evaluation result. In a possible implementation, for some target objects, the second evaluation result can be a default value. For example, when the target object is a car or an airplane, the posture of this type of target object may not change, so the second evaluation result can be a default value.
[0079] When the target object is a person or an animal, the second evaluation result of the posture of the target object in the preview screen may include the result obtained by evaluating the degree of conformity between the action in the preview screen and the set action. Alternatively, an exclusion setting method may be adopted, and when the action of the target object meets the exclusion condition, a lower evaluation information is given as the second evaluation result.
[0080] In a possible implementation, obtaining a second evaluation result of the posture of the target object in the preview screen may include: obtaining the type of the target object's action, and obtaining the second evaluation result according to the type of the target object's action. Some reference action types may be preset, and when the type of the target object's action is a reference action type, the target object may be scored for the degree of conformity with the reference action type. For example, when the reference action type is a human body jumping action, when the preview screen detects that the extension of the target object's jumping action is half-open (just taking off), a relatively low score may be given, and when the extension of the target object's jumping action is fully open (jumping to the highest point), a relatively high score may be given.
[0081] In another possible implementation, when there is a target object in the preview screen, a first evaluation result and a second evaluation result are obtained, and when the first evaluation result meets the first preset condition and the second evaluation result meets the second preset condition, the subsequent step S44 is performed.
[0082] Step S44: acquiring an image of the preview screen according to the second evaluation result.
[0083] In the embodiment of the present application, acquiring the image of the preview screen according to the second evaluation result may include: acquiring the image in the preview screen when the second evaluation result meets the second preset condition. Alternatively, when the second evaluation result meets the second preset condition, displaying shooting prompt information in the preview screen, and capturing the image in the preview screen when detecting that the user clicks the shooting operation control according to the shooting prompt information.
[0084] In a possible implementation, acquiring the image in the preview screen may include: acquiring the image in the preview screen and storing the image when the preview screen at the current time node meets the image acquisition condition. Thus, in the case of automatic image acquisition, if the preview screen meets the second evaluation result, the image of the preview screen is automatically acquired, and the acquired image includes at least one image frame of the preview screen.
[0085] Thus, in the embodiment of the present application, Figure 5B As shown, the preview screen is a preview screen 54 in the photo taking interface. When the preview screen 54 meets the first preset condition and the second preset condition, a prompt icon 55 can be generated in the preview screen 54. The prompt icon 55 indicates that the current screen quality is good and the photo taking operation can be performed. Alternatively, a prompt text "The current screen quality is very good, you can take a photo" can be displayed in the preview screen 54, and other similar contents can also be used to enable the user to know the meaning of the prompt icon 55.
[0086] In a possible implementation, when the user's terminal uses Figure 4 In the case of the method shown, a prompt icon can be generated when the preview screen meets the first preset condition and the second preset condition, and a layer can be generated on the preview screen. Functional introduction information about the prompt icon can be displayed through the prompt layer, so that the user can know how to operate after the prompt icon is generated based on the functional introduction information.
[0087] In an embodiment of the present application, it is possible to evaluate a preview screen containing a target object, determine whether the preview screen meets preset conditions (including the aforementioned first preset condition and second preset condition), and acquire an image of the preview screen if the preview screen meets the preset conditions, thereby improving the quality of the acquired image, especially for target objects with fast-moving properties, and assisting users in acquiring higher quality images.
[0088] When the embodiments of the present application are applied to photographic scenarios, multiple judgments can be made for target objects such as young children and animals that are not easy to fix in photographic postures. When the target object is in a better or optimal photographic state, the image of the target object can be acquired, thereby helping the user to take pictures of certain specific types of targets and automatically detecting high-quality images that are difficult for the user's naked eye to perceive. When the target object is in a better photographic state, the user can capture the image in time, which is difficult to complete by naked eye observation combined with manual operation, or the user can be prompted to capture the image in time to generate a high-quality image.
[0089] In the photo-taking scene, the embodiment of the present application sets a three-level trigger for subjects with distinct features such as children, cats, dogs, etc. First, the preview screen is detected at the detection end (terminal), and the first-level trigger uses artificial intelligence (AI) detection and recognition technology to detect the target object of the preview screen, and identifies whether children, cats, dogs, etc. appear in the photographed scene corresponding to the preview screen. If subjects such as children, cats, and dogs appear in the photographed scene, the second-level trigger is activated. The second-level trigger performs the evaluation operation related to the aforementioned step S42 based on the screen rating detection algorithm for subjects such as children, cats, and dogs. The second-level trigger performs the first evaluation operation by real-time monitoring of the comprehensive status information of the subject in the preview screen and the overall preview screen to obtain a first evaluation result. If the first evaluation result reaches the expected indicator of the rating algorithm, that is, after the threshold of the second-level trigger reaches the expected judgment condition, the third-level trigger is activated. The third-level trigger performs the evaluation operation related to the aforementioned step S43 based on the cute pet action detection algorithm of AI technology. Identify the action of the subject in the current scene, output the evaluation index of the action and send it to the decision engine to calculate the decision factor. If the set threshold standard is reached, the automatic photo-taking process is triggered, or a prompt message is displayed to prompt the user to take a photo.
[0090] The aforementioned first-level trigger, second-level trigger and third-level trigger can be triggered in layers, and the triggering of the first-level trigger is the condition for the subsequent second-level trigger and third-level trigger to be triggered. Among them, the first-level trigger executes the first part of the detection operation of the method provided in the embodiment of the present application, that is, to detect and identify the object in the preview screen. The second-level trigger executes the second part of the detection operation of the method provided in the embodiment of the present application, that is, to score the picture structure. The third-level trigger executes the third part of the detection operation of the method provided in the embodiment of the present application, that is, to score the posture of the target object. Through the hierarchical triggers, when it is determined that the subsequent operation cannot be performed, the new image of the preview screen is re-detected, so as to effectively solve the balance of algorithm power consumption, memory and performance during preview, and improve the filming rate of the subject.
[0091] When the embodiment of the present application is applied to the screenshot scenario, during the user chat, the moment that meets the quality requirements can be automatically detected and a prompt can be given at the moment that meets the quality requirements, or after the user sends a screenshot instruction, the image frame with the relatively best quality among the multiple preview image frames generated before and after the screenshot quality is captured as the image obtained by the screenshot operation. This helps the user obtain a higher quality image when taking a screenshot, and avoids the situation where it is difficult to capture a high-quality image during the screenshot process.
[0092] When the embodiment of the present application is applied to a video processing scenario, the first preset condition, the second preset condition, and the evaluation condition for the third evaluation result can be determined based on the processed video; the target object can also be determined based on the processed video. Through the method provided by the embodiment of the present application, multiple image frames of the video can be detected during the video processing process to assist the user in obtaining the image frames he or she wants to obtain in the video.
[0093] In one embodiment, after the terminal displays the preview screen, the image acquisition method also includes: acquiring the object in the preview screen; determining whether the type of the object is a target object and obtaining a determination result; based on the determination result, displaying an inquiry control on the terminal; and in response to a user clicking the inquiry control, entering the step of acquiring a first evaluation result of the screen structure in the preview screen.
[0094] When the method provided in the embodiment of the present application is applied to a photo shooting scene, such as Figure 6 As shown in a, when the user clicks the camera application icon on the terminal, then enters Figure 6In the photographing interface 61 shown in b in the figure, if the target object is detected in the photographing interface, a mode selection control 62, i.e., an inquiry control, can be displayed. The user can change the photographing mode to a photographing mode for the target object through the mode selection control 62, and then perform an evaluation operation on the preview screen. The evaluation operation performed on the preview screen may include at least one of the aforementioned first evaluation operation, the second evaluation operation, and the third evaluation operation. If the user does not operate the mode selection control 62, it is assumed that the user wants or does not want to continue taking photos in the current photographing mode, and the default content can be changed according to the user setting.
[0095] In another possible implementation, the object in the preview screen may not be determined and the image may be directly displayed in the preview screen of the photo. Figure 6 The mode selection control 62 shown in b in FIG. 1 can be used to enable a specific photographing function for a target object even when the target object is not detected. Figure 6 In the example shown, the user operates the mode selection control 62, so that the terminal's camera application enters the mode of taking photos of the target object. Then, in the mode of taking photos of the target object, if it is determined that the state of the target object meets at least one of the first preset condition and the second preset condition, a prompt icon indicating that the picture quality meets the preset condition can be displayed at the position of the mode selection control 62. The prompt icon indicating that the picture quality meets the preset condition can be used as follows Figure 5B The prompt icon 55 is shown.
[0096] In the case where the query control is triggered after the target object is detected, if at least one target object is detected among the multiple targets in the preview screen, the query control may be displayed in the preview screen.
[0097] Similarly, when a user establishes a video call with other terminals, watches a live broadcast, or processes a video through a terminal, an inquiry control can also be displayed, allowing the user to analyze the preview screen of the video call, the preview screen of the live broadcast, or the preview screen of the video processing to obtain high-quality images in the video call, live broadcast, or video.
[0098] The embodiment of the present application can receive a user's click operation through an inquiry control, and start a function of evaluating the quality of the preview image according to the user's intention, thereby improving the user's control over the image acquisition function.
[0099] In one implementation, obtaining a first evaluation result of a picture structure in a preview picture includes: obtaining picture structure evaluation parameters of the preview picture according to coordinates of a target object in the preview picture; the picture structure evaluation parameters include at least one of an area size parameter, a visual balance parameter, and a rule of thirds composition parameter; and obtaining a first evaluation result according to the picture structure evaluation parameters.
[0100] In this embodiment, the coordinates of the target object in the preview screen may include the coordinates of the edge of the target object in the coordinate system of the preview screen. The area of the target object may be determined based on the coordinates of the edge of the target object as the region size parameter in the screen structure evaluation parameters of the preview screen.
[0101] When the picture structure evaluation parameters include region size parameters, the region size parameters may be determined according to the region surrounded by the edge of the target object and other regions outside the target object in the preview picture, and the first evaluation result may be obtained according to the region size parameters.
[0102] The visual balance parameters may include: the relative position of the target object in the preview image determined according to the coordinates of the target object in the preview image. The rule of thirds composition parameters may include: the parameters of the degree of conformity of the target object determined according to the rule of thirds composition. The rule of thirds composition may include: the rule of thirds in photography. Among them, the rule of thirds in photography is a composition method often used in photography, painting, design and other arts, sometimes also called tic-tac-toe composition. The rule of thirds composition refers to dividing the picture horizontally into three parts, and the center of each part can be placed in the main form. This composition is suitable for subjects with multiple forms and parallel focal points.
[0103] The embodiment of the present application evaluates the picture structure of the preview picture through at least one of the area size parameter, the visual balance parameter and the rule of thirds composition parameter, which helps to improve the picture structure quality of the obtained image and improve the visual coordination of the obtained image.
[0104] In one embodiment, the picture structure evaluation parameters include a region size parameter, a visual balance parameter, and a rule of thirds composition parameter. According to the coordinates of the target object in the preview picture, obtaining the picture structure evaluation parameters of the preview picture includes: determining the proportion of the region size of the target object in the preview picture according to the coordinates; using the proportion as the region size parameter; determining the vertical position and horizontal position of the target object in the preview picture according to the coordinates; using the horizontal position and the vertical position as the visual balance parameter;
[0105] According to the coordinates, the minimum distance between the target object and the rule of thirds node in the preview image is determined; the rule of thirds node is a node in the preview image that complies with the rule of thirds composition rule; the minimum distance is used as the rule of thirds composition parameter.
[0106] In this embodiment, the edge position of the target object in the preview screen can be determined according to the coordinates of the target object in the preview screen, and then the area size of the target object can be determined. The ratio of the area size of the target object to the preview screen can be expressed by dividing the area size of the target object by the total size of the preview screen.
[0107] In this embodiment, the horizontal position and the vertical position in the preview screen, when the preview screen is a rectangular screen, can be determined according to the parallel directions of the rectangular sides of the preview screen, and then the horizontal position and the vertical position of the target object are determined. When the preview screen is a rectangular screen or a screen of other shapes, the horizontal position and the vertical position of the target object can be determined according to the vertical and horizontal directions of the terminal display screen.
[0108] In the embodiment of the present application, the rule of thirds nodes in the preview screen can be points included on the dividing line formed by dividing the preview screen using the rule of thirds. When the preview screen is divided using the rule of thirds, the preview screen can be divided horizontally and vertically to form horizontal dividing lines and vertical dividing lines, and the intersection of the horizontal dividing lines and the vertical dividing lines is used as the rule of thirds node. Alternatively, the points on the horizontal dividing lines and the vertical dividing lines can be used as the rule of thirds nodes.
[0109] In an embodiment of the present application, the preview screen can be evaluated based on the area size of the target object, the position of the target object in the preview screen, and whether the distribution of the target object in the screen conforms to certain segmentation rules, so that the obtained image can be more in line with the composition rules.
[0110] In another possible implementation, any one or any two of the region size parameter, the visual balance parameter, and the rule of thirds composition parameter may be used as picture structure evaluation parameters, and then the picture structure evaluation parameters are calculated using the method provided in the above embodiment to obtain a first evaluation result.
[0111] In one implementation, obtaining a second evaluation result of the posture of the target object in the preview screen includes: obtaining an action semantic feature of the target object; determining a score corresponding to the action semantic feature; and obtaining a third evaluation result based on the score when the score is higher than a preset threshold.
[0112] In this embodiment, a neural network model can be used to analyze the preview screen to obtain the action semantic features of the target object. The action semantic features may include the semantic features of the action. The semantic features may include semantic components, or semantic elements, etc., and may specifically include semantic components of different dimensions, which may be expressed by vectors. Different dimensions may include, for example: attributes of the action, classification of the action, function of the action, relationship of the action, etc., so that through multiple different dimensions, the semantic features of the action can be divided into: attribute features of the action, classification features of the action, functional features of the action, relationship features of the action, etc.
[0113] The action semantic features may include semantic features of multiple different types of actions. When the score corresponding to any action semantic feature is higher than a preset threshold, the current image frame of the preview screen may be considered to be a valid image frame, and then a third evaluation operation may be performed to obtain a third evaluation result. If the scores of all action semantic features are not higher than the preset threshold, then the current image frame of the preview screen may be considered to be an invalid image frame, and then the third evaluation operation may not be performed, and the first evaluation operation, the second evaluation operation, and the third evaluation operation may be performed again on the image frame of the next time sequence.
[0114] In the embodiment of the present application, the score corresponding to the action semantic feature may include scores corresponding to multiple different types of action semantic features, and the preset threshold may be scores corresponding to action semantic features of multiple different types of set combinations.
[0115] For example, the preset threshold refers to the threshold of the score of any action semantic feature, and the preset threshold is 0, and the scores of multiple types of action semantic features are all 0, then the condition that the score is higher than the preset threshold is not met; if among multiple different types of action semantic features, there is one type of action semantic feature with a score higher than 0, then it can be considered that the score is higher than the preset threshold. Alternatively, the preset threshold refers to the threshold of the score of any two action semantic features, and the preset threshold is N, then among multiple action semantic features, if there are at least two preset dimensions with scores greater than N, it can be considered that the score is higher than the preset threshold.
[0116] When the score is higher than the preset threshold, a third evaluation result is obtained based on the score, and it can be that when the score of any type of action semantic features is higher than the preset threshold, it is confirmed that there is a valid third evaluation result, and the third evaluation result is output. Alternatively, a preset threshold is set for each type of action semantic features, and when there is a type of action semantic features with a score greater than the corresponding preset threshold, it is confirmed that there is a valid third evaluation result, and the third evaluation result is output. Alternatively, a preset threshold is set for all types of action semantic features, and when the sum of the scores of all types of action semantic features is greater than the corresponding preset threshold, it is confirmed that there is a valid third evaluation result.
[0117] If the third evaluation result is valid, the current image frame corresponding to the preview picture can be considered as a valid image frame, otherwise the current image frame corresponding to the preview picture can be determined to be an invalid image frame and the current invalid image frame can be discarded.
[0118] In a possible implementation, different target objects correspond to different types of action semantic features, and the action semantic features are the semantic features of the actions that the target object may perform. For example, when the target object is a young child, the types of actions that the target object may perform may include: crawling, walking, running, jumping, raising hands, and in some cases, the actions may include the facial expressions of the target object, so the types of actions that the young child may perform may also include: smiling, crying, crying loudly, laughing, making faces, frowning, being cute, etc. When the target object is an animal, the types of actions that the target object may perform may be the same as those of the young child, or it may have other types of actions that are different from those of the young child. When the target object is an object such as flowing water or waves, the action type may be different from that of a person or an animal. For the types of actions that may occur in the target object, an action semantic feature can be set respectively.
[0119] When there are two or more target objects in the preview screen, if one of the target objects has a score of action semantic features higher than a preset threshold, then the image frame of the current preview screen can be considered to have a valid third evaluation result, or the current image frame of the preview screen can be considered to be a valid image frame.
[0120] In another possible implementation manner, if the current image frame of the preview picture does not have a valid third evaluation result, output data without a valid third evaluation result may be generated.
[0121] In one embodiment, when the score is higher than a preset threshold, a second evaluation result is obtained based on the score, including: when the score is higher than the preset threshold, assigning a category label of a corresponding action semantic feature to the image frame of the preview screen; sorting the scores corresponding to the image frames including the category labels in the continuous image frames of the preview screen; determining a target category label in the category labels based on the sorting results; and using the target category label as the third evaluation result.
[0122] In the embodiment of the present application, each type of action semantic feature has a category label, that is, each action type corresponds to a type of action semantic feature, each type of action semantic feature corresponds to a category label, and thus each action type also corresponds to a category label. For example, when the target object is a young child, the types of actions that the young child may perform include: crawling, walking, running, jumping, raising hands, etc., among which the action semantic feature of crawling has a category label of crawling, the action semantic feature of walking has a category label of walking, and so on, the action semantic feature of each action type corresponds to a category label.
[0123] Therefore, if a preset threshold value of a score is configured corresponding to each type of action semantic feature, then when the scores of more than two action semantic features among multiple types of action semantic features exceed the preset threshold value, the image frame of the preview screen has more than two category labels.
[0124] For example, the types of actions that young children may perform include: crawling, walking, running, jumping, raising hands, laughing, crying, etc. For an image frame of the preview screen, the scores of the action semantic features corresponding to crawling, laughing, and crying are all higher than the preset threshold, then the image frame has three category labels of crawling, crying, and laughing.
[0125] In this embodiment, determining the target category label in the category label according to the sorting result may include: taking the first N category labels in the sorting as the target category label, where N is a positive integer. Taking the target category label as the third evaluation result may include taking all the target category labels as the second evaluation result.
[0126] Among the continuous image frames of the preview screen, there may be multiple image frames with target category labels, so the target category labels may be annotated for the multiple image frames.
[0127] In this embodiment, the scores corresponding to the image frames including category labels in the continuous image frames of the preview screen are sorted, which can be to sort the scores corresponding to the image frames including category labels in a set number of continuous image frames (or within a set time period) of the preview screen.
[0128] In another possible implementation, the image frames of the preview screen may be extracted at a set time interval, and multiple image frames may be extracted within a set total time period as continuous image frames. Alternatively, the image frames of the preview screen may be extracted at a set image frame number interval, and multiple image frames may be extracted within a set total time period as continuous image frames.
[0129] In one embodiment, based on the second evaluation result, an image of the preview screen is obtained, including: when the second evaluation result indicates that there is an image frame with a target category label in the preview screen, displaying a photo prompt control on the terminal; in response to a user clicking operation on the photo prompt control, obtaining an image frame with the target category label as the image of the preview screen.
[0130] In this embodiment, the photo prompt control may be an icon. For example, when a young child is detected in the preview image, a reduced icon of the young child is displayed; or, when an animal is detected in the preview image, a reduced icon of the animal is displayed. Alternatively, when a target object of any set type is detected in the preview image, an icon indicating that the target object is detected is displayed.
[0131] In a possible implementation, the photo prompt control may be a control for receiving a photo instruction issued by a user. For example, when it is determined that the target object in the current preview screen is in a state suitable for photographing, the state of the photo control in the photo interface may be changed, indicating that the user may issue a photo instruction.
[0132] In another possible implementation, due to the particularity of the object being photographed, it may not be possible to obtain corresponding better evaluation results when the first evaluation operation, the second evaluation operation, and the third evaluation operation are performed before the image of the preview screen is obtained. For example, during the execution of the third evaluation operation, since the action of the target object does not completely conform to the preset action type, it is difficult to obtain a higher third evaluation result. In this case, if there is a better second evaluation result, the image of the preview screen can still be obtained after the third evaluation operation is performed.
[0133] When a click operation of the user on the photo prompt control is detected, the image frame evaluated as the best among the image frames within a set time period before and after the click operation or within a range of image frame numbers can be captured as an image of the preview screen.
[0134] In one embodiment, acquiring an image of the preview screen according to the third evaluation result includes: when the third evaluation result indicates that there are image frames with target category labels in the preview screen, acquiring image frames with target category labels as the image of the preview screen.
[0135] In a possible implementation, the image in the preview screen can be automatically obtained, or the user can be prompted to take a photo, and the image in the preview screen is obtained according to the user's photo taking instruction.
[0136] In one embodiment, the target object is at least one of an animal and a human being of a preset age group.
[0137] The human bodies of the preset age groups may be young human bodies, such as human bodies aged 0-13, or human bodies aged 0-18, or human bodies of other age groups.
[0138] The animals in the embodiments of the present application may be pets or wild animals, and the humans in the preset age group may include adult humans.
[0139] In a specific implementation, algorithms such as subject detection algorithms, gender and age detection algorithms, face detection algorithms, and scene detection algorithms can be used to detect target objects such as animals and humans of preset age groups. Through subject detection, it can be determined whether there are animals or humans in the preview screen. In the case where it is determined that there is a human body in the preview screen, a gender and age detection algorithm can be used on the human body to perform gender and age detection to obtain an estimated age value of the human body in the preview screen. At the same time, if the target object is a young child, since the proportion of facial features and the proportion of face and body of children are different from those of mature adults, in the process of age detection of the human body, algorithms such as face detection algorithms and human body detection algorithms can also be used to assist in determining at least one of the data such as facial structure information, facial features information, the proportion of face and body, and the proportion of facial features in the face, and the proportion data can be used to assist in determining the age of the human body.
[0140] In the case where the target object includes a pet, scene detection can be used in conjunction with an action evaluation algorithm to determine whether the target in the preview image includes a pet. Non-domesticated animals photographed by users in the wild, in zoos, etc. can also be identified as pets.
[0141] From the statistical results of user surveys, it is learned that the number of photographing scenes with humans (especially young children) and cats, dogs and pets as the subjects (i.e., the targets in the preview screen in other embodiments of the present application) is increasing year by year. At the same time, in such scenes, the photographers face some troubles, which increases the requirements that the image acquisition device needs to meet in order to achieve a better photographing experience for users in the photographing scenes of children and pets.
[0142] In the process of taking photos with children, cats, dogs and pets as the subject, the main problem encountered is that the subject is not easily controlled by the photographer, the subject is easy to move and unstable, the subject of the photo is blurred, the composition is chaotic, and the success rate is low. For such subjects, the image acquisition method provided in the application embodiment can be used to solve the problems faced by shooting scenes where the subject is a special type of subject such as a young child or a pet, thereby improving the shooting experience and success rate of children, pets and the like as the subject.
[0143] In a specific example of the present application, a first-level trigger, a second-level trigger, and a third-level trigger may be set to assist in executing the steps of the image acquisition method.
[0144] like Figure 7As shown, the user can use the mode selection control 79 to determine whether to use the automatic shooting mode for taking pictures of the target object, or use the manual shooting mode for taking pictures of the target object. The first-level trigger 71 obtains the object in the preview screen and determines whether the object in the preview screen is the target object. Different target objects can be detected using different detection algorithms. For example, if it is necessary to detect a human body 77 as a target object, a child detection algorithm is used for detection. If it is necessary to detect a pet (such as Figure 7 The cat 76 and dog 74 in the figure are used as target objects, and the pet detection algorithm is used for detection. Pets can include animals in a broad sense, such as Figure 7 Wild animals such as pandas 78 in the zoo, captive animals in the zoo, etc.
[0145] The primary trigger 71 detects whether the subject in the preview screen is a child, a human body, a pet or other target object by implementing a detection algorithm on the preview screen. If there is a target object, the coordinates of the subject in the preview screen are calculated and output, and the target object in the subject is used as the input of the secondary trigger 72. If there are multiple subjects in the preview screen, one of which is a target object, then the subsequent secondary trigger 72 or tertiary trigger 73 can be triggered automatically or in response to the detected user's instruction.
[0146] As an example, the secondary trigger 72 may include a screen structure scorer, which calculates the screen structure evaluation parameters according to the coordinates provided by the primary trigger 71. The screen structure scorer can calculate the centroid and main line of the target object in the preview screen based on the coordinates. The centroid of the target object can be the centroid of the geometric figure of the area occupied by the target object in the preview screen. The main line of the target object can be the centroid line of the target object. It can be analyzed whether the centroid and the main line meet the preset first rule.
[0147] At the same time, a structural reference line can also be generated for the preview screen. The structural reference lines include: a third line, a golden section line, and a spiral line. The structural reference lines are combined to determine whether the center of mass or the main line of the target object in the preview screen meets the second rule. The center of mass, main line, and structural reference line of the target object can be displayed to the user in the preview screen, or not. The content displayed in the preview screen may be unrelated to the calculation behavior inside the terminal. For the target object in the preview screen, a face frame can be calculated and / or displayed, and a body frame can be calculated and / or displayed. The face frame and / or body frame can also be used for auxiliary judgment to analyze whether the picture structure meets the pre-set requirements.
[0148] After the secondary trigger 72 is triggered, the picture structure scorer calculates the area size parameter, the visual balance parameter and the rule of thirds composition parameter (ThirdRulescore in this example) according to the coordinate data provided by the primary trigger 71 .
[0149] In this example, RegionSizescore is used to measure whether the size (area or size) of the target object occupies an appropriate proportion of the entire preview screen. According to the prior composition knowledge base, two thresholds α and β of the region size (RegionSize) are set. Among them, α is set as the small region threshold and β is set as the large region threshold. Here, the small region threshold and the large region threshold are relative values. According to the size of the target object and the size of the current preview screen, the ratio of the two is calculated, and the calculated ratio is compared and calculated with α and β. In this example, there may be three situations for the ratio of the size of the preview screen to the size of the target, that is, the ratio is less than α, the ratio is greater than β, or the ratio is between α and β. When there are multiple target objects in the preview screen, at least one ratio of data can be calculated for each target object. The ratios corresponding to each target object are normalized to obtain RegionSizescore, and after weighting with the prior weight, the region size parameter is obtained, which is used as a dimension of the total score of the screen structure scorer to participate in subsequent calculations.
[0150] In this example, the symmetry balance score (VisualBalancescore) is calculated to measure whether the position of the target object in the preview screen is appropriate. The symmetry balance score of the target object in the preview screen is determined by calculating the relative position of the center of mass of the target object in the horizontal and vertical directions. There may be multiple target objects in the preview screen, and a symmetry balance score can be calculated for each target object. After normalizing the symmetry balance scores of all target objects in the preview screen, the VisualBalancescore is obtained, and then weighted according to the pre-set prior weights to obtain the visual balance parameter, which is used as another dimension of data for the total score of the screen structure scorer.
[0151] In this example, the rule of thirds score (ThirdRulescore) is used to measure the degree to which the target object in the preview screen complies with the rule of thirds composition rules. By calculating the position of the target object corresponding to the rule of thirds composition node in the screen, the position information of the nearest node is found, and the ThirdRulescore is calculated after normalization. Then, the prior weight is used for weighted calculation to obtain the rule of thirds composition parameters, which are used as another dimension of the total score of the screen structure scorer.
[0152] After obtaining the area size parameters, visual balance parameters and rule of thirds composition parameters, the data of the three dimensions are integrated to obtain normalized data. Then, combined with prior information, the normalized data is weighted and calculated to obtain the final evaluation score of the picture structure scorer.
[0153] The final evaluation score obtained by the screen structure scorer included in the secondary trigger 72 has a wide range of applications, which can expand the applicable scenarios of the image acquisition method. It can be used as the screen structure evaluation parameter in the embodiment table of the present application as the first evaluation result of the secondary trigger 72, and can also be used as reference data for the subsequent tertiary trigger 73 to perform the second evaluation operation. At the same time, the screen structure scorer also has the scalability of the scoring dimension.
[0154] Figure 7 The three-level trigger 73 shown includes a posture scorer for scoring the target object. Through the output result of the second-level trigger, it is detected whether the posture of the target object such as a cute pet or a young child meets the preset prior wonderful moment, and when the user selects the mode of automatic image acquisition, the data obtained by scoring the posture is used as the second evaluation result, and sent to the decision engine 75 as decision information, so that the decision engine 75 can automatically generate a decision to obtain the image of the preview screen according to the second evaluation result, and send the decision to the enhancement engine 710. The enhancement engine 710 can capture a good quality image from a series of image frames of the preview screen as the image for taking a photo. In the mode where the user selects manual image acquisition, the score information or the detection results of the three triggers are displayed in real time on the photo interface to prompt the user to take a photo. The user triggers the photo by issuing a photo command. In response to the photo command issued by the user, the enhancement engine 710 can capture a good quality image from a series of image frames of the preview screen as the image for taking a photo. In a possible implementation, the enhancement engine 710 can also perform preset image processing on the captured image to improve the image quality.
[0155] In one possible implementation, when the final evaluation score of the secondary trigger 72 for the preview screen is greater than the set threshold, it is necessary to evaluate and classify the actions of the current target object. Since the actions of pet target objects are not easy to define, it is relatively difficult to directly detect and classify the actions of pet target objects. Therefore, a posture scorer for the target object can be designed based on a multimodal model.
[0156] For the target object of the young children category, common action types can be defined as the semantic categories of the secondary trigger 72, including the semantic categories of limb stretching, jumping, running, turning, laughing, etc. At the same time, customized actions can also be set. For example, a pre-shot reference image is used to extract the action of the target as a customized action, and the semantic information of the customized action is generated according to the reference image. For actions such as limb stretching, jumping, running, turning, laughing, etc., a customized action amplitude can be set. When acquiring photos, the image frames with the same action are associated, and the image frames with the action amplitude closest to the customized action amplitude are saved. For the target object in the main frame output by the primary trigger 71, the secondary trigger 72 can combine the defined semantic categories to determine the action type and the corresponding score one by one. Considering the continuity of the action, it is necessary to detect multiple image frames before and after the frame sequence as a supplement, and each image frame is scored for action detection.
[0157] In a possible implementation, the secondary trigger 72 performs a second evaluation operation on the target object in the preview screen by first scoring and then determining the action category. The secondary trigger 72 first estimates the semantic category score corresponding to the action of the target object in the current preview screen. If the scores of all semantic categories of an image frame are 0, the current image frame is discarded. If an image frame has a semantic category score that is not 0, it can be further determined whether the score of the semantic category that is not 0 is greater than the determination threshold of the category corresponding to the action semantics, and the semantic category is assigned a corresponding action label. Finally, it is determined whether the number of action labels of the image frame is greater than 0. If the number of action labels of an image frame is greater than 0, the image frame is considered to be a valid image frame. If there are multiple action labels for an image frame, the scores of the semantic categories corresponding to the action labels are sorted, and the action label corresponding to the highest score is taken as the final action label output to the decision engine 75.
[0158] After the user selects manual mode, the pet's detection status information, picture rating score and other data can be displayed in real time on the preview screen, and a prompt message is generated to prompt the user to press the manual shutter button for taking photos.
[0159] If the user uses the automatic mode to take photos, the photo application will display the first evaluation result of the target object, the second evaluation result of the target object, the score obtained by the screen structure scorer for scoring the image frame of the preview screen, the score obtained by the posture scorer for scoring the image frame of the preview screen, and other data in real time on the interface of the preview screen. If the user uses the manual mode to take photos, the first evaluation result, the second evaluation result of the target object, the score obtained by the screen structure scorer for scoring the image frame of the preview screen, the score obtained by the posture scorer for scoring the image frame of the preview screen, and other data can still be displayed on the interface of the preview screen. After performing the second evaluation operation or the third evaluation operation, the decision engine 75 will automatically decide to take photos and send shutter information based on the information of the current secondary trigger and the tertiary trigger, and automatically complete the photo function. In the automatic photo mode, the interface of the preview screen can display a prompt message that the photo is completed, informing the user that a quick shot of the target object has been completed and the result can be viewed in the gallery.
[0160] In one possible implementation, after the user initiates a photo shutter action in the preview screen interface, the underlying system completes a series of quick-shooting strategies to ensure basic capture, basic performance, and basic effects based on the preview screen information, to ensure that the subject has the most appropriate exposure, color temperature, and clarity at the moment of photographing, thereby providing the user with the best photo experience.
[0161] In one possible implementation, the target object may include a subject that is easy to move and uncontrollable. A layered triggering and three-level detection decision evaluation mechanism is adopted for one or more image frames of the target object in the preview screen. At the same time, a mechanism for enhancing the subject in the preview screen is added based on the decision result. The best image frame is selected from the multiple image frames corresponding to the preview screen as the final photo, providing an intelligent photo solution that automatically or manually improves the photo success rate and effect enhancement of subjects with moving behaviors.
[0162] In another example of the present application, the preview process when the image acquisition method is executed is as follows: Figure 8 To begin, you can include Figure 8 , 9A to 9C process. Figure 8 As shown in a in FIG. 1 , after the user clicks the icon 81 of the camera application on the terminal desktop, the camera interface is started. Figure 8As shown in b in FIG. 8 , the photo taking interface includes a preview screen 82, a shutter control 83 and other controls. The preview screen 82 is used to preview the image frames taken. When the photo taking operation is performed based on a user instruction or when the photo taking operation is performed automatically, the image frames in the preview screen 82 are captured as the photos taken. Through the preview screen 82, the user can preview the photos to be taken. At the same time, the content displayed on the preview screen is consistent with the shooting range of the camera lens and changes in real time as the content in the camera lens changes.
[0163] When a target object is detected in the preview screen, an icon corresponding to the type of the target object may be displayed on the photo taking interface. When the target object includes young children or pets, when the young child falls within the shooting range of the camera lens, Fig.9A As shown in a, Figure 7 In the example shown, the first trigger 71 is triggered, and a child icon 91 is displayed in the photo taking interface, prompting the user to enter a photo taking mode for a specific target object. Fig.9A As shown in b in the figure, if a pet is detected in the preview screen, Figure 7 In the example shown, the first-level trigger 71 is triggered, and a pet icon 92 is presented in the photographing interface, prompting the user to enter a photographing mode for a specific target object.
[0164] like Fig. 9B As shown in a in FIG. 1 , the user can click on the child icon 91 that appears in the photo taking interface, so that the child icon 91 changes from Fig.9A The unselected state shown in a in Fig. 9B The selected state shown in a in FIG. 1 is thus turned on for a photo shooting mode for a target object of a young child type. Fig. 9B As shown in b in FIG. 1 , the user can also click on the pet icon 92 in the photo taking interface to start the photo taking mode for the target object of the pet type, so that the pet icon 92 is Fig.9A b in the unselected state, enter Fig. 9B As shown in b.
[0165] Or, except Fig.9A , Fig. 9B In addition to the examples shown, you can also Fig. 10A As shown in a in FIG. 1 , when a child is detected in the preview screen, a thumbs-up icon 1001 is displayed, and the icon 1001 indicates that a target object is detected in the preview screen. Fig. 10A As shown in b in FIG. 1 , when a pet is detected in the preview image, an icon 1001 is also displayed to indicate that a target object is detected in the preview image. The user can Fig. 10A Click the icon 1001 in the image to enter the photo taking mode for the target object.
[0166] In another possible implementation, when the target object is detected in the preview screen, the mode of photographing the target object may be automatically entered, and the user may configure to cancel the function of automatically entering the mode of photographing the target object when the target object is detected in the preview screen. Alternatively, the user may configure to enter the function of photographing the target object based on a user instruction when the target object is detected in the preview screen.
[0167] In another possible implementation, when a target object is detected in the preview screen, a control corresponding to automatic shooting of the target object and a control corresponding to manual shooting of the target object may be displayed. The user may click on the corresponding control to enter the automatic shooting mode or the manual shooting mode for the target object. Fig. 10B In a, no matter what kind of target object is detected, icons corresponding to various types of target objects can be displayed in the preview screen, such as Fig. 10B In the case where a child is detected in the preview screen, the child icon 1002 is used as a trigger control for adopting the automatic photo mode for the child. After the user clicks the child icon 1002, the automatic photo mode is adopted for the target object of the child type. Fig. 10B In b, an animal is detected in the preview screen, but the child icon 1002 can still be used as a trigger control for the manual photography mode for children. In the automatic photography mode, the image of the target object is automatically acquired, and in the manual photography mode, the image of the target object is acquired according to the instruction manually issued by the user. In the case where the target object is a pet, two different pet icons can be displayed accordingly, respectively as a trigger control for the automatic photography mode for the pet and a trigger control for the manual photography mode for the pet.
[0168] In another possible implementation, the icon of the target object is displayed regardless of whether the target object exists in the preview image, and the icon of the target object is changed to another state when the target object is detected. Fig. 10C As shown in a in FIG. 1 , when no young child is detected in the preview screen, the child icon 1002 in the photo taking interface is in an unselected state (or a first display state). Fig. 10C As shown in b in FIG. 1 , when a young child is detected in the preview screen, the child icon 1002 in the photo taking interface is in the selected state (or the second display state). Fig. 10C When the target object is of other types, you can use the same Fig. 10CAlternatively, if all different types of target images are displayed using the same icon, the icon can be Fig. 10C There are two different states related to the preview image, indicating whether the target object is detected in the preview image.
[0169] In another possible implementation, when the user clicks Fig. 9B After the child icon 91 or pet icon 92 in the Figure 7 The secondary trigger 72 and the tertiary trigger 73 shown in the figure obtain the score information of the image frame in the preview screen, and the score information can be displayed in the photo taking interface, such as Fig. 9C The score corresponding to the picture structure evaluation parameter shown in a in FIG. 2 is 2.1 and the score corresponding to the pose of the target object is 6.3, and Fig. 9C The score corresponding to the screen structure evaluation parameter shown in b is 2.2 and the score for the posture of the target object is 7.5. If there is a target object in the preview screen, a detection frame 93 of the target object can also be displayed. If the target object includes a face, a detection frame 94 of the face can also be displayed.
[0170] When it is determined according to the second evaluation result of the third-level trigger that the target object in the current preview screen meets the photographing condition, the following display may be displayed: Fig.9D In the automatic photo mode, Fig.9D As shown in a in FIG. 1 , the decision engine inside the camera application can execute the decision of taking a photo and obtain the image 95 of the preview screen. In the manual camera mode, as shown in FIG. Fig.9D As shown in b, the score of the preview screen (including the score corresponding to the second evaluation result and / or the score corresponding to the third evaluation result) is displayed in real time in the photo taking interface, and in response to the user clicking the photo taking control 97, an image 96 of the preview screen is obtained.
[0171] In another example, based on Figure 7 In the example shown, the secondary trigger 72 and the tertiary trigger 73 may include: Fig.11A , Fig. 11B , Fig. 11C Among the modules shown, some of the modules can be used by both the secondary trigger 72 and the tertiary trigger 73 .
[0172] like Fig.11AAs shown, the picture structure scorer and the posture scorer may include a best moment estimation algorithm module (Best Moment Estimate Algorithm) 1101, a human body detection module (Human Body Detect) 1102, a best moment detection module (Best Moment Detect) 1103, an action score module (Action Score) 1104, and a best moment score module (Best Moment Score) 1105. Among them, the best moment estimation algorithm module 1101 can be used to determine whether the current moment is the best moment. If the target object is in the preparation stage for taking a photo, the best moment estimation algorithm module 1101 can determine that the current moment is not the best moment. After the target object is ready, the best moment estimation algorithm module 1101 can output the determination result that the current moment is the best moment. In response to the determination result of the best moment, the human body detection module 1102 outputs a human body detection frame information list (human_bbox_list, human body box list). According to the human body detection frame information list, a human body detection frame (rectangle) and a score (score) of the human body detection frame can be obtained. Among them, the human body detection module 1102, the human body detection frame information list, and the human body detection frame score only use the word "human body" in the name. During the application process, they can be used to detect other types of target objects. For example, the human body detection module 1102 can obtain the pet detection frame of the pet type target object, as well as the corresponding score of the pet detection frame.
[0173] The centroid and primary line of the human body detection frame can be obtained according to the human body detection frame obtained by the human body detection frame module 1102. The region size parameter, the visual balance parameter and the rule of thirds composition parameter can be obtained according to the centroid and the primary line, and the picture structure score of the image frame of the preview picture can be obtained. The picture structure score can be weightedly calculated to obtain the first evaluation result of the aforementioned embodiment, or the picture structure score can be used as the first evaluation result of the aforementioned embodiment.
[0174] At the same time, still refer to Fig.11A According to the data output by the human body detection module 1102, the best moment monitoring module 1103 can calculate the action score, and can obtain the second evaluation result of the aforementioned embodiment according to the action score, or use the action score as the second evaluation result of the aforementioned embodiment. The best moment score can be obtained by combining the picture structure score and the action score, and can be determined according to the best moment score whether to obtain the image frame of the current preview picture.
[0175] In one possible implementation, referring to Fig. 11B According to the detection frame 1106 (of the target object) and the score of the detection frame (of the target object) output by the human detection module, the picture structure score obtaining algorithm (getcomposition score) can be executed. In the case where the target object is a person, according to the human detection frame and the score corresponding to the human detection frame, the centroid 1107 and the main line 1108 of the human detection frame can be obtained, and the area size score, the visual balance score and the rule of thirds composition score can be obtained according to the centroid 1107 and the main line 108. Among them, the area size score can be determined for a single detection frame 1106, and the area size score can be determined according to the relative area size of the detection frame 1106 of the human body or the detection frames 1106 of multiple target objects in the preview picture and the preview picture. According to the detection frame 1106, the centroid 1107 and the main line 1108 of the target object, the visual balance score of the preview picture can be determined. According to the horizontal third line 1109 of the preview picture and the vertical third line 1110 of the preview picture, the rule of thirds composition score can be obtained. Based on the area size score, visual balance score and rule of thirds composition score, you can get the picture structure score.
[0176] If the screen structure score reaches the preset screen structure score threshold, Fig.11A The best moment detection module 1103 shown in FIG. 1 is triggered, and the action score module 1104 is called to score the action of the target object in the preview image. The process of scoring the action is as follows: Fig. 11C As shown. Taking the target object as an animal as an example, in the preview screen, when the target object is detected, the multiple image frames 1111 corresponding to the preview screen are first determined. The pre-defined action semantics for the target object include the categories of stretching limbs, jumping, running, turning the head, and laughing. The score threshold of each category is 0.5. For the multiple image frames 1111, the scores corresponding to each action semantics are output in the order of stretching limbs, jumping, running, turning the head, and laughing. Fig. 11CAs shown, the action scores of the first image frame 1111 corresponding to the action semantics of stretching, jumping, running, turning the head, and laughing are 0.3 / 0.4 / 0.0 / 0.0 / 0.0, which means that the action score of the first image frame 1111 corresponding to the semantics of stretching is 0.3, the action score of the first image frame 1111 corresponding to the action semantics of jumping is 0.4, the action score of the first image frame 1111 corresponding to the action semantics of running is 0.0, and the action score of the first image frame 1111 corresponding to the action semantics of laughing is 0.0. In other words, in the first image frame 1111, the probability that the target object performs the action of stretching and jumping is 0.3 and 0.4, respectively, while in the first image frame 1111, the probability that the target object performs the action of running, turning the head, and laughing is 0. Similarly, the action scores of the second image frame 1111 corresponding to the action semantics of stretching limbs, jumping, running, turning the head, and laughing are: 0.5 / 0.2 / 0.0 / 0.0 / 0.0; the action scores of the third image frame 1111 corresponding to the action semantics of stretching limbs, jumping, running, turning the head, and laughing are: 0.7 / 0.2 / 0.0 / 0.0 / 0.0; the action scores of the third image frame 1111 corresponding to the action semantics of stretching limbs, jumping, running, turning the head, and laughing are: 0.2 / 0.3 / 0.0 / 0.0 / 0.0. If the judgment threshold of each action semantic category is 0.5, then, Fig. 11C The category label corresponding to the second image frame in is limbs stretched, Fig. 11C The category label corresponding to the third image frame in is limbs stretching. Through score verification, the category label with the highest action score is limbs stretching, and the corresponding image frame is Fig. 11C The third image frame 1111 in the image frame is determined as the image frame at the best moment. If the camera is in automatic shooting mode, the third image frame 1111 can be used as the photo obtained by shooting. If the camera is in manual shooting mode, the third image frame 1111 can be obtained as the photo obtained by shooting in response to a shooting instruction sent by the user.
[0177] The present application further provides an image acquisition device, such as Fig.12 As shown, it includes: a preview screen display module 1201, a first evaluation result module 1202, a second evaluation result module 1203, and an acquisition module 1204.
[0178] The preview screen display module 1201 is used to display the preview screen of the image acquisition on the terminal.
[0179] The first evaluation result module 1202 is used to obtain a first evaluation result of the picture structure in the preview picture in response to the target object detected in the preview picture.
[0180] The second evaluation result module 1203 is used to obtain a second evaluation result of the posture of the target object in the preview screen when the first evaluation result meets the first preset condition.
[0181] The acquisition module 1204 is used to acquire the image of the preview screen according to the second evaluation result.
[0182] It should be noted that: when the image acquisition device provided in the above embodiment is in operation, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0183] At the same time, the image acquisition device of the embodiment of the present application may also include other functional modules to implement any steps and functions in the image acquisition method provided by any embodiment of the present application.
[0184] In the embodiment of the present application, a user can use an electronic device as a user terminal to take a photo, and apply the image acquisition method provided in any embodiment of the present application to obtain an image of the target object. Before introducing the process of the image acquisition method provided in the embodiment of the present application in detail, the software architecture of the electronic device involved in the embodiment of the present application is briefly introduced. Fig.13 is a schematic diagram of a software architecture of an electronic device according to an exemplary embodiment. Fig.13 The electronic device shown runs an Android system. In other embodiments, the electronic device can be equipped with other types of operating systems.
[0185] Fig.13 is a block diagram of a software system of an electronic device to which the method provided in the embodiment of the present application is applied. Fig.13 The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system includes multiple layers, from top to bottom, the application layer, the application framework layer, the hardware abstraction layer, the driver layer, and the hardware layer. In the case where the electronic device is a touch screen, the user can send the user's operation instructions for the schedule information from the kernel layer to the application layer layer by layer through the touch screen.
[0186] The application layer can include a series of application packages. Fig.13 As shown, the application package may include applications such as a camera and a gallery. These applications can send information to each other. For example, the gallery application can store images obtained when taking pictures, or be used to cache the image frame sequence generated by the camera application when taking pictures.
[0187] The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Fig.13 As shown, the application framework layer may include camera management, camera devices, etc. The camera management and camera devices may access the camera application of the application layer through the camera access interface. When the user operates the camera application through hardware such as a touch screen, mouse, keyboard, and trackpad, the user's operation instructions may be transmitted through the corresponding modules in the application framework layer.
[0188] The hardware abstraction layer is a layer between the camera hardware and the software system, such as Fig.13 As shown, the hardware abstraction layer includes a camera hardware abstraction layer, wherein the camera hardware abstraction layer includes a camera device corresponding to the terminal camera, such as Fig.13 Camera device 1, camera device 2, etc. in the camera application. When the camera application is running, the camera application can call the algorithm in the camera algorithm library to perform a photo operation. When the camera application calls the algorithm in the camera algorithm library, the image acquisition method provided in any embodiment of the present application can be implemented to acquire an image by taking a photo. At the same time, the image acquisition method provided in the embodiment of the present application, before automatically acquiring an image or acquiring an image in response to a user's instruction, the implementation process can be concentrated in the hardware abstraction layer (HAL) for execution.
[0189] The driver layer includes drivers for hardware devices, wherein the drivers for hardware devices may include, for example, a camera device driver as shown in 13, for driving camera device 1, camera device 2, etc. At the same time, the driver layer also includes a digital signal processor driver for driving a digital signal processor and a graphics processor driver for driving a graphics processor.
[0190] Under the above four-layer architecture, the receiving device is also provided with a hardware layer, which may include the aforementioned electronic equipment hardware components, such as sensors, image signal processors, digital signal processors, graphics processors, etc. The digital signal processor and the graphics processor may call the algorithms in the camera algorithm library to implement the steps in the method in the embodiment of the present application.
[0191] The functional units and modules in the above embodiments may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit, and the above integrated units may be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present application.
[0192] The image acquisition device and the image acquisition method provided in the above embodiments belong to the same concept. The specific working process of the units and modules in the above embodiments and the technical effects brought about can be found in the method embodiment part and will not be repeated here.
[0193] As an example of the present application, the electronic device can access the base station and also has the ability to access the wireless local area network, for example, the electronic device is a mobile phone, a tablet, a smart watch, a portable notebook, etc. Please refer to Fig.14 , Fig.14 1 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0194] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0195] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0196] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0197] The processor 110 may also be provided with a memory for storing data such as instructions and images. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used, such as cyclically performing a recording operation on target information.
[0198] In some embodiments, the processor 110 may include one or more interfaces, such as an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.
[0199] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0200] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is an integer greater than 1. During the image acquisition process, the display screen can be used to display a preview screen or an acquired image.
[0201] The touch sensor 180K is also called a “touch panel.” The touch sensor 180K may be disposed on the display screen 194 , and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen.”
[0202] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0203] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing computer instructions on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (such as: coaxial cable, optical fiber, data subscriber line (Digital Subscriber Line, DSL)) or wireless (such as: infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server, data center, etc. that contains one or more available media integrated. The available media may be magnetic media (such as floppy disks, hard disks, and magnetic tapes), optical media (such as digital versatile discs (DVD)), or semiconductor media (such as solid state disks (SSD)).
[0204] The above are optional embodiments provided for the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the technical scope disclosed in the present application shall be included in the protection scope of the present application.
Claims
1. An image acquisition method, characterized in that: include: Display the preview screen of image acquisition on the terminal; In response to the target object detected in the preview picture, obtaining a first evaluation result of the picture structure in the preview picture; When the first evaluation result satisfies a first preset condition, obtaining a second evaluation result of the posture of the target object in the preview screen; According to the second evaluation result, an image of the preview screen is acquired.
2. The method according to claim 1, characterized in that: After the terminal displays the preview screen, the method further includes: Obtaining the object in the preview screen; Determine whether the type of the object is a target object, and obtain a determination result; According to the determination result, displaying a query control on the terminal; In response to a user clicking operation on the query control, the step of obtaining a first evaluation result of the screen structure in the preview screen is entered.
3. The method according to claim 1 or 2, characterized in that: The obtaining a first evaluation result of the picture structure in the preview picture includes: Obtaining a picture structure evaluation parameter of the preview picture according to the coordinates of the target object in the preview picture; the picture structure evaluation parameter includes at least one of a region size parameter, a visual balance parameter, and a rule of thirds composition parameter; The first evaluation result is obtained according to the picture structure evaluation parameter.
4. The method according to claim 3, characterized in that: The picture structure evaluation parameters include a region size parameter, a visual balance parameter, and a rule of thirds composition parameter. The obtaining of the picture structure evaluation parameters of the preview picture according to the coordinates of the target object in the preview picture includes: According to the coordinates, determining the ratio of the area size of the target object to the preview screen; and using the ratio as the area size parameter; Determine the longitudinal position and the transverse position of the target object in the preview image according to the coordinates; and use the transverse position and the longitudinal position as the visual balance parameters; According to the coordinates, the minimum distance between the target object and a rule of thirds node in the preview image is determined; the rule of thirds node is a node in the preview image that complies with the rule of thirds composition rule; and the minimum distance is used as the rule of thirds composition parameter.
5. The method according to any one of claims 1 to 4, characterized in that: The obtaining a second evaluation result of the posture of the target object in the preview screen includes: Obtaining action semantic features of the target object; Determining a score corresponding to the action semantic feature; When the score is higher than a preset threshold, the second evaluation result is obtained according to the score.
6. The method according to claim 5, characterized in that When the score is higher than a preset threshold, obtaining the second evaluation result according to the score includes: When the score is higher than a preset threshold, assigning a category label of a corresponding action semantic feature to the image frame of the preview screen; sorting scores corresponding to image frames including the category labels in the continuous image frames of the preview screen; Determine a target category label among the category labels according to the sorting result; The target category label is used as the second evaluation result.
7. The method according to any one of claims 1 to 6, characterized in that: The acquiring the image of the preview screen according to the second evaluation result includes: When the second evaluation result indicates that there is an image frame with a target category label in the preview screen, displaying a photo prompt control on the terminal; In response to a user clicking operation on the photo prompt control, an image frame having an action target category label is acquired as an image of the preview screen.
8. The method according to any one of claims 1 to 7, characterized in that: The acquiring the image of the preview screen according to the second evaluation result includes: When the second evaluation result indicates that there is an image frame with a target category label in the preview picture, an image frame with a target category label is acquired as an image of the preview picture.
9. The method according to any one of claims 1 to 8, characterized in that: The target object is at least one of an animal and a human body of a preset age group.
10. An electronic device, characterized in that: The electronic device comprises: a processor and a memory; The memory is used to store a program for the electronic device to execute the method according to any one of claims 1 to 9, and to store data involved in implementing the method according to any one of claims 1 to 9; The processor is configured to execute the program stored in the memory.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Image shooting method and device
CN105323491A
Patterning method, terminal, and storage medium
CN109068055A
Shooting method and device
CN115086556A
Evaluation method, device and equipment and computer readable storage medium
CN116912894A
Varying camera self-determination based on subject motion
US20070237514A1
