Shooting method and device, electronic equipment, storage medium and computer program product
By obtaining scene description information, selecting a matching viewfinder template, and adjusting the shooting position, the problem of poor shooting results caused by limitations in user shooting skills is solved and high-quality shooting results are achieved.
Patent Information
- Application Number
- CN202411088699.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-10-22
AI Technical Summary
In the prior art, when electronic devices take photos or videos, due to limitations in the user's shooting skills, the shooting effect is poor and difficult to meet actual needs.
By obtaining the scene description information of the target shooting scene, select a matching viewfinder template from the viewfinder template database based on this information, and adjust the shooting position according to the overlap between the preview screen and the viewfinder frame to ensure that the best shooting position is used when shooting.
Even if the user is not good at shooting, he can still take high-quality photos or videos to meet the user's shooting needs.
Smart Images

Figure CN118828191A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and more specifically, to a shooting method, a device, an electronic device, a storage medium, and a computer program product. Background Art
[0002] With the development of science and technology, electronic devices have more and more functions, which provide great convenience for people's work and life. For example, users can use electronic devices to take pictures, shop online, watch videos, and so on.
[0003] In the related art, when using electronic devices to take photos or videos, the final shooting effect often does not satisfy the user. This is because if you want to obtain an excellent shooting work, the user's shooting skills are very high. However, most users have not received special shooting training and are unlikely to have high shooting skills, which will result in the shooting effect not being able to truly reflect the beauty and value of the actual object. It can be seen that due to the limitations of shooting skills, the shooting effect may be poor and difficult to meet actual needs. Summary of the invention
[0004] The present disclosure provides a shooting method, an apparatus, an electronic device, a storage medium and a computer program product to at least solve the problem in the above-mentioned related technologies that, due to the limitation of shooting skills, the shooting effect may be poor and it is difficult to meet actual needs.
[0005] According to a first aspect of an embodiment of the present disclosure, there is provided a shooting method, which is applied to an electronic device, and includes: acquiring scene description information of a target shooting scene, wherein the target shooting scene is a scene of a preview screen to be shot of the electronic device; based on the scene description information, selecting a target framing frame template that matches the scene description information from a framing frame template database, wherein the framing frame template database includes a plurality of framing frame templates, each of which corresponds to scene information; and performing shooting based on the preview screen and the target framing frame template.
[0006] Optionally, selecting a target framing frame template that matches the scene description information from a framing frame template database based on the scene description information includes: extracting keywords from the scene description information; obtaining a degree of match between the target shooting scene and each framing frame template based on the extracted keywords and scene information of each framing frame template in the framing frame template database; and determining the framing frame template with the highest degree of match in the framing frame template database as the target framing frame template.
[0007] Optionally, obtaining the degree of matching between the target shooting scene and each framing frame template based on the extracted keywords and the scene information of each framing frame template in the framing frame template database includes: determining, for each framing frame template in the framing frame template database, the number of identical keywords between scene keywords corresponding to the scene information of each framing frame template and the extracted keywords; and determining the degree of matching between the target shooting scene and each framing frame template based on the number of identical keywords, wherein a greater number of identical keywords indicates a higher degree of matching.
[0008] Optionally, there are multiple identical keywords, and there are multiple corresponding framing templates with the highest degree of matching, and determining the corresponding framing template with the highest degree of matching in the framing template database as the target framing template includes: determining the priority of each identical keyword in the multiple identical keywords under each framing template for each of the multiple corresponding framing templates with the highest degree of matching; determining the score of each identical keyword in each framing template based on the priority of each identical keyword under each framing template and the correspondence between preset priorities and scores; calculating the sum of the scores of each identical keyword in the multiple identical keywords as the scene score corresponding to each framing template; and determining the framing template with the highest scene score among the multiple corresponding framing templates with the highest degree of matching as the target framing template.
[0009] Optionally, performing shooting based on the preview screen and the target framing frame template includes: determining at least one preview frame in the preview screen and at least one framing frame in the target framing frame template, wherein each of the preview frames surrounds an object in the preview screen and each of the framing frames surrounds the object in the target framing frame template; calculating the degree of overlap between the at least one preview frame and the at least one framing frame; performing shooting when the degree of overlap is greater than or equal to a preset threshold; and controlling the electronic device to adjust the preview screen position and perform shooting when the degree of overlap is less than the preset threshold.
[0010] Optionally, controlling the electronic device to adjust the preview screen position includes: automatically controlling the electronic device to adjust the preview screen position; or displaying adjustment guidance information to guide the user to adjust the preview screen position.
[0011] Optionally, the calculating the degree of overlap between the at least one preview frame and the at least one framing frame comprises: for a target preview frame in the at least one preview frame and a target framing frame corresponding to the target preview frame in the at least one framing frame, calculating, based on vertex coordinates of the target framing frame and vertex coordinates of the target preview frame, an overlap length and an overlap width of an overlap area between the target framing frame and the target preview frame; calculating the product of the overlap length and the overlap width to obtain an area of the overlap area; and calculating the degree of overlap between the target preview frame and the target framing frame based on the area of the overlap area, the area of the target preview frame, and the area of the target framing frame.
[0012] Optionally, before obtaining the scene description information of the target shooting scene, it also includes: for each scene in a plurality of scenes, obtaining a plurality of pictures; for each picture in the plurality of pictures, performing object recognition on the each picture to obtain at least one type of framing frame corresponding to at least one recognized object; for each type of framing frame in the at least one type of framing frame, based on the vertex coordinates of the target vertex of each type of framing frame contained in the plurality of pictures, determining the best coordinates of the target vertex; determining a best framing frame in which the vertex coordinates of the target vertex in each type of framing frame contained in the plurality of pictures are the best coordinates; and generating a framing frame template corresponding to each scene based on the best framing frame corresponding to each type of framing frame.
[0013] Optionally, it also includes: for each scene, determining the number of times each type of object among the multiple types of objects identified appears in multiple pictures in each scene; based on the number of times each type of object appears in multiple pictures in each scene, determining the priority of each type of object in each scene, wherein the more the number, the higher the priority.
[0014] Optionally, the acquiring scene description information of the target shooting scene includes: inputting the preview image into a large language model to acquire the scene description information.
[0015] Optionally, the acquiring scene description information of the target shooting scene includes: acquiring a user's voice input for the preview screen; and converting the voice input into the scene description information.
[0016] According to a second aspect of an embodiment of the present disclosure, a shooting device is provided, comprising: a scene description information acquisition module, configured to acquire scene description information of a target shooting scene, wherein the target shooting scene is a scene of a preview screen to be shot of an electronic device; a framing frame template selection module, configured to select a target framing frame template matching the scene description information from a framing frame template database based on the scene description information, wherein the framing frame template database includes a plurality of framing frame templates, each of which corresponds to scene information; and a shooting module, configured to perform shooting based on the preview screen and the target framing frame template.
[0017] Optionally, the framing frame template selection module is configured to: extract keywords from the scene description information; obtain the degree of matching between the target shooting scene and each framing frame template based on the extracted keywords and the scene information of each framing frame template in the framing frame template database; and determine the framing frame template with the highest degree of matching in the framing frame template database as the target framing frame template.
[0018] Optionally, the framing template selection module is configured to: for each framing template in the framing template database, determine the number of identical keywords between the scene keywords corresponding to the scene information of each framing template and the extracted keywords; based on the number of identical keywords, determine the degree of matching between the target shooting scene and each framing template, wherein the greater the number of identical keywords, the higher the degree of matching.
[0019] Optionally, there are multiple identical keywords, and there are multiple corresponding framing templates with the highest degree of matching, and the framing template selection module is configured to: determine the priority of each identical keyword in the multiple identical keywords under each framing template for each of the multiple corresponding framing templates with the highest degree of matching; determine the score of each identical keyword in each framing template based on the priority of each identical keyword under each framing template and the correspondence between preset priorities and scores; calculate the sum of the scores of each identical keyword in the multiple identical keywords as the scene score corresponding to each framing template; and determine the framing template with the highest corresponding scene score among the multiple corresponding framing templates with the highest degree of matching as the target framing template.
[0020] Optionally, the shooting module is configured to: determine at least one preview frame in the preview screen and at least one framing frame in the target framing frame template, wherein each of the preview frames surrounds an object in the preview screen, and each of the framing frames surrounds an object in the target framing frame template; calculate the degree of overlap between the at least one preview frame and the at least one framing frame; execute shooting when the degree of overlap is greater than or equal to a preset threshold; and control the electronic device to adjust the preview screen position and execute shooting when the degree of overlap is less than the preset threshold.
[0021] Optionally, the shooting module is configured to: automatically control the electronic device to adjust the preview screen position; or display adjustment guidance information to guide the user to adjust the preview screen position.
[0022] Optionally, the shooting module is configured to: for a target preview frame in the at least one preview frame and a target framing frame corresponding to the target preview frame in the at least one framing frame, calculate an overlap length and an overlap width of an overlap area between the target framing frame and the target preview frame based on vertex coordinates of the target framing frame and vertex coordinates of the target preview frame; calculate the product of the overlap length and the overlap width to obtain an area of the overlap area; and calculate a degree of overlap between the target preview frame and the target framing frame based on the area of the overlap area, the area of the target preview frame and the area of the target framing frame.
[0023] Optionally, the photographing device further includes: a picture acquisition module, configured to acquire multiple pictures for each of the multiple scenes; an object recognition module, configured to perform object recognition on each of the multiple pictures to obtain at least one type of framing frame corresponding to at least one recognized object; an optimal coordinate determination module, configured to determine the optimal coordinates of the target vertex for each type of framing frame in the at least one type of framing frame based on the vertex coordinates of the target vertex of each type of framing frame contained in the multiple pictures; the optimal framing frame determination module, configured to determine the best framing frame in which the vertex coordinates of the target vertex in each type of framing frame contained in the multiple pictures are the optimal coordinates; and a framing frame template generation module, configured to generate a framing frame template corresponding to each scene based on the optimal framing frame corresponding to each type of framing frame.
[0024] Optionally, the photographing device also includes: a number determination module, configured to determine, for each scene, the number of times each type of object among the multiple types of objects identified appears in multiple pictures in the scene; a priority determination module, configured to determine the priority of each type of object in each scene based on the number of times each type of object appears in multiple pictures in the scene, wherein the more the number, the higher the priority.
[0025] Optionally, the scene description information acquisition module is configured to: input the preview screen into a large language model to obtain the scene description information.
[0026] Optionally, the scene description information acquisition module is configured to: acquire a user's voice input for the preview screen; and convert the voice input into the scene description information.
[0027] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the shooting method according to the present disclosure.
[0028] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the shooting method according to the present disclosure.
[0029] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the shooting method according to the present disclosure is implemented.
[0030] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:
[0031] In the present disclosure, a target frame template matching the preview image can be obtained, and then the target frame template can be used as a shooting basis to guide the electronic device to shoot at the best shooting position. In this way, even if the user is not good at shooting, high-quality photos or videos that satisfy the user can be taken.
[0032] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0034] Figure 1 is a flowchart illustrating a photographing method according to an exemplary embodiment of the present disclosure;
[0035] Figure 2 is a schematic diagram showing scene matching in a viewfinder template database based on keywords extracted from scene description information according to an exemplary embodiment of the present disclosure;
[0036] Figure 3 is a schematic diagram illustrating determining a matching degree between a target shooting scene and a framing frame template according to an exemplary embodiment of the present disclosure;
[0037] Figure 4 is a schematic diagram showing at least one preview frame and at least one viewfinder frame according to an exemplary embodiment of the present disclosure;
[0038] Figure 5 is a schematic diagram showing adjustment of a preview screen position according to an exemplary embodiment of the present disclosure;
[0039] Figure 6 is a schematic diagram showing the generation of a framing frame template according to an exemplary embodiment of the present disclosure;
[0040] Figure 7 is a schematic diagram showing application of a photographing method to a birthday scene according to an exemplary embodiment of the present disclosure;
[0041] Figure 8 is a schematic diagram showing application of a photographing method to a wedding ring exchange scene according to an exemplary embodiment of the present disclosure;
[0042] Fig. 9 is a schematic diagram showing application of a photographing method to a family portrait scene according to an exemplary embodiment of the present disclosure;
[0043] Fig.10 is a schematic diagram showing application of a photographing method to a pet monitoring scene according to an exemplary embodiment of the present disclosure;
[0044] Fig.11 is a schematic diagram showing application of a photographing method to a scene of monitoring children according to an exemplary embodiment of the present disclosure;
[0045] Fig.12 is a block diagram illustrating a photographing device according to an exemplary embodiment of the present disclosure;
[0046] Fig.13 is a block diagram illustrating an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0047] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0048] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The implementation methods described in the following examples do not represent all implementation methods consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the attached claims.
[0049] It should be noted that the phrase "at least one of the items" in the present disclosure includes three types of parallel situations: "any one of the items", "a combination of any number of the items", and "all of the items". For example, "including at least one of A and B" includes the following three parallel situations: (1) including A; (2) including B; (3) including A and B. Another example is "executing at least one of step 1 and step 2" which means the following three parallel situations: (1) executing step 1; (2) executing step 2; (3) executing step 1 and step 2.
[0050] Figure 1 is a flowchart illustrating a photographing method according to an exemplary embodiment of the present disclosure, which is applied to an electronic device.
[0051] Reference Figure 1 In step 101, scene description information of a target shooting scene may be obtained, wherein the target shooting scene may be a scene of a preview screen to be shot by an electronic device. It should be noted that in the present disclosure, the electronic device may be, but is not limited to, a robot, a drone, a mobile phone, a tablet computer, and the like.
[0052] According to an exemplary embodiment of the present disclosure, the preview screen can be input into a large language model (LLM) to obtain scene description information. The large language model is a statistical language model trained based on a large amount of data, which can be used to generate and translate text and perform other natural language processing (NLP) tasks.
[0053] In this way, the preview screen can be input into the large language model to obtain scene description information, which can avoid various operations caused by manually obtaining the scene description information. The implementation process of obtaining the scene description information is simple, convenient and fast.
[0054] According to an exemplary embodiment of the present disclosure, the user's voice input for the preview screen may also be acquired, and the voice input may be converted into the above-mentioned scene description information.
[0055] In this way, since the user's description of the preview screen can more accurately reflect the information content contained in the preview screen, the scene description information can also be obtained through user voice input, which can ensure the comprehensiveness and accuracy of the obtained scene description information and avoid inaccurate recognition and missed recognition caused by obtaining scene description information only through model recognition.
[0056] In step 102, based on the scene description information, a target framing frame template matching the scene description information may be selected from a framing frame template database, wherein the framing frame template database may include multiple framing frame templates, each of which may correspond to scene information.
[0057] For example, the scene information corresponding to the frame template may be: "birthday" scene, "wedding" scene, "family portrait" scene, etc. Moreover, the scene information of each frame template may also correspond to scene keywords. For example, the scene keywords corresponding to the above "birthday" scene may be: "people", "cake", "table", etc.; the scene keywords corresponding to the above "wedding" scene may be: "people", "flowers", "ring", "table", etc.
[0058] According to an exemplary embodiment of the present disclosure, keywords can be extracted from the above scene description information. Then, the matching degree between the target shooting scene and each framing template can be obtained based on the extracted keywords and the scene information of each framing template in the framing template database. Next, the framing template with the highest matching degree in the framing template database can be determined as the target framing template.
[0059] In this way, since the role of keywords is to describe the scene and characterize the core characteristics of the scene, framing frame template matching, that is, scene matching, can be performed based on the keywords extracted from the scene description information. This can ensure that the matched framing frame template is a framing frame template that is truly similar to the scene of the preview image to be shot and is truly instructive.
[0060] Figure 2 is a schematic diagram showing scene matching in a view frame template database based on keywords extracted from scene description information according to an exemplary embodiment of the present disclosure. Figure 2As mentioned above, before keyword extraction, the preview screen can be input into the large language model to obtain scene description information; or, the user's voice input for the preview screen can be obtained, and the voice input can be converted into scene description information. For example, it is assumed that the "scene description information" is: "This is a birthday party, one or more people stand behind the cake and make a wish (the cake is on the table)".
[0061] Then, keywords can be extracted from the above scene description information. For example, keywords extracted from the scene description information "This is a birthday party, one or more people stand behind the cake and make a wish (the cake is on the table)" can be: "people", "cake" and "other items". Next, the best view frame template can be matched in the view frame template database based on the extracted keywords, that is, the best scene matching can be performed in the vector database based on the extracted keywords.
[0062] According to an exemplary embodiment of the present disclosure, for each framing template in the framing template database, the number of identical keywords between the scene keywords corresponding to the scene information of each framing template and the extracted keywords can be determined. Then, based on the number of identical keywords, the degree of matching between the target shooting scene and each framing template can be determined, wherein the greater the number of identical keywords, the higher the degree of matching can be.
[0063] Figure 3 is a schematic diagram showing a method of determining a matching degree between a target shooting scene and a view frame template according to an exemplary embodiment of the present disclosure. Figure 3 As mentioned above, the keywords extracted from the scene description information are: "people", "cake" and "other items", then the number of identical keywords between these three extracted keywords and the scene keywords corresponding to the scene information of each framing frame template in the framing frame template database can be determined. Exemplarily, the three keywords "people", "cake" and "other items" extracted above are identical to the scene keywords "people", "cake" and "table" corresponding to the "birthday" scene, that is, the number of identical keywords is: 2; the three keywords "people", "cake" and "other items" extracted above are identical to the scene keywords "people", "flowers", "ring" and "table" corresponding to the "wedding" scene, that is, the number of identical keywords is: 1.
[0064] As mentioned above, the more identical keywords there are, the higher the matching degree is, and the number of identical keywords between the keywords extracted from the scene description information and the scene keywords of the "birthday" scene is 2, which is more than the number of identical keywords between the scene keywords of the "wedding" scene: 1. Therefore, the matching degree between the target shooting scene and the framing frame template under the "birthday" scene is the highest, that is, the framing frame template under the "birthday" scene can be determined as the above-mentioned target framing frame template.
[0065] As mentioned above, the role of keywords is to describe scenes and characterize the core features of scenes. Therefore, the more the same keywords are, the more similar the two scenes are. In this way, in the present disclosure, the framing frame templates can be screened based on the number of the same keywords, and the screened framing frame templates can be guaranteed to be the framing frame templates with the highest degree of fit, the most similarity, and the most guiding significance to the scene of the preview image to be shot.
[0066] According to an exemplary embodiment of the present disclosure, the number of the above-mentioned identical keywords may be multiple, and there may also be multiple corresponding framing templates with the highest degree of matching. At this time, for each of the multiple corresponding framing templates with the highest degree of matching, the priority of each identical keyword in the multiple identical keywords under each framing template may be determined. It should be noted that the priority of the same keyword under different framing templates may be different. For example, for the keyword "people", the priority under the framing template "birthday" may be the highest priority, while the priority under the framing template "famous buildings" may not be the highest priority, but may be the second priority or even a lower priority.
[0067] Then, the score of each identical keyword in each frame template may be determined based on the priority of each identical keyword in each frame template and the correspondence between the preset priority and the score. Figure 3 , the above-mentioned "correspondence between preset priorities and scores" can be: when the priority of a keyword is the highest priority (i=highest priority), the score corresponding to the keyword can be the highest, for example, it can be 3 points; when the priority of a keyword is the normal priority (i=normal priority), the score corresponding to the keyword can be lower than the above-mentioned highest score of 3 points, for example, it can be 1 point; when a keyword extracted from the scene description information does not hit any scene keyword corresponding to the corresponding framing template, that is, when i=none, the score corresponding to the keyword can be 0 points.
[0068] Next, the sum of the scores of each of the multiple identical keywords can be calculated as the scene score corresponding to each frame template. Figure 3 , the scene score corresponding to the frame template can be:
[0069]
[0070] Among them, GOAL.scene is the scene score corresponding to the viewfinder template, objects is all the same keywords, and GOAL.i represents the score corresponding to the i-th same keyword.
[0071] Then, the framing frame template with the highest corresponding scene score among the plurality of corresponding framing frame templates with the highest matching degrees may be determined as the target framing frame template.
[0072] In this way, when screening framing frame templates, in addition to considering the number of identical keywords, the priority of each identical keyword under the corresponding framing frame template can also be considered, that is, the influence of each identical keyword under the corresponding framing frame template can also be considered. The information considered is more comprehensive and granular, which can further ensure the degree of fit between the screened target framing frame template and the scene of the preview screen to be shot, thereby ensuring that better quality works are shot.
[0073] In step 103, shooting may be performed based on the preview image and the target view frame template.
[0074] According to an exemplary embodiment of the present disclosure, at least one preview frame in the preview picture and at least one framing frame in the target framing frame template may be determined, wherein each preview frame may surround an object in the preview picture and each framing frame may surround an object in the target framing frame template.
[0075] Figure 4 is a schematic diagram showing at least one preview frame and at least one viewfinder frame according to an exemplary embodiment of the present disclosure. Figure 4 The target framing frame template may be a framing frame template for a "birthday" scene, and the target framing frame template may include two framing frames, namely, framing frame M and framing frame N, and the object enclosed by framing frame M may be a "person", and the object enclosed by framing frame N may be a "cake"; the preview screen may include two preview frames, namely, preview frame K and preview frame L.
[0076] Then, the degree of overlap between at least one preview frame and at least one viewfinder frame may be calculated. Figure 4The degree of overlap between the two viewfinders and the two corresponding preview frames. When the degree of overlap is greater than or equal to a preset threshold, for example, when the sum of the degrees of overlap between the two pairs of preview frames and the viewfinders is greater than or equal to the preset threshold, shooting can be performed; otherwise, that is, when the degree of overlap is less than the preset threshold, that is, when the sum of the degrees of overlap between the two pairs of preview frames and the viewfinders is less than the preset threshold, the electronic device can be controlled to adjust the preview screen position and perform shooting. For example, the preset threshold can be, but is not limited to, 90%.
[0077] In this way, when the preview frame and the viewfinder have a high degree of overlap, it means that the electronic device is currently close to the best shooting position, and the electronic device can be controlled to shoot directly; if the preview frame and the viewfinder have a low degree of overlap, it means that the electronic device is currently far from the best shooting position, that is, the shooting quality of the work to be shot has a lot of room for improvement, and the orientation of the electronic device can be adjusted to put the electronic device in the best shooting position. In this way, the shooting guidance role of the viewfinder template can be maximized, and the work with high shooting quality can be guaranteed.
[0078] According to an exemplary embodiment of the present disclosure, the electronic device can be automatically controlled to adjust the preview screen position. Exemplarily, the electronic device can be automatically controlled to move / automatically adjust the rotation angle of the electronic device camera to adjust the preview screen position; or, adjustment guidance information can be displayed to guide the user to adjust the preview screen position. Exemplarily, guidance information for guiding the user to move / adjust the shooting posture can be displayed to adjust the preview screen position.
[0079] Figure 5 is a schematic diagram showing adjustment of the preview screen position according to an exemplary embodiment of the present disclosure. Figure 5 When the overlap degree is less than a preset threshold, the electronic device may determine which frame to attach first based on the priority of the frame, that is, the priority of the object surrounded by the frame. Figure 5 In the example, assuming that the object "person" has the highest priority in the scene of "birthday", the view frame M surrounding the object "person" also has the highest priority. At this time, it can be decided to give priority to the view frame M with the highest priority. For example, the electronic device can be controlled to move left and right, up and down, forward and backward to make the preview frame K fit the view frame M as closely as possible. By continuously adjusting the orientation of the electronic device, the best shooting position with the highest sum of overlap between each preview frame and the corresponding view frame can be finally determined.
[0080] For example, refer to Figure 5When controlling the electronic device to adjust the preview screen position, a rectangular coordinate system can be established with the left and bottom borders of the image, and the adjustment can be performed according to the following rules:
[0081]
[0082] Among them, M a .x represents the horizontal coordinate of vertex a of the viewfinder M, M b .x represents the horizontal coordinate of vertex b of the viewfinder M, K a .x represents the horizontal coordinate of vertex a of preview box K, K b .x represents the horizontal coordinate of vertex b of preview box K, M a .y represents the ordinate of vertex a of the viewfinder M, K a .y represents the ordinate of vertex a of the preview box K, M c .y represents the ordinate of the vertex c of the viewfinder M, K c .y represents the ordinate of the vertex c of the preview box K, horizontal.right represents horizontal movement to the right, horizontal.left represents horizontal movement to the left, vertical.up represents vertical movement upward, vertical.down represents vertical movement downward, zaxis.front represents forward movement, and zaxis.back represents backward movement.
[0083] Thus, in the present disclosure, two different ways of adjusting the preview screen position can be provided, namely, the electronic device can be automatically controlled to move to the best shooting position for shooting; and adjustment guidance information can be displayed to guide the user to move to adjust the preview screen position. The user can choose which way to use to adjust the preview screen position according to their own needs and actual scenarios, and the autonomy and flexibility of adjusting the preview screen position are better.
[0084] According to an exemplary embodiment of the present disclosure, for a target preview frame in at least one preview frame and a target viewfinder corresponding to the target preview frame in at least one viewfinder frame, an overlap length L and an overlap width W of an overlap area of the target viewfinder and the target preview frame may be calculated based on the vertex coordinates of the target viewfinder and the vertex coordinates of the target preview frame. Then, the product of the overlap length L and the overlap width W may be calculated to obtain an area S of the overlap area. overlapping Next, we can calculate the overlap area S based on the area of the overlapped region. overlapping , the area of the target preview box S K and the area S of the target frame M , calculate the overlap degree S of the target preview frame and the target viewfinder frame coincidencedegree .
[0085] For example, the overlap length L, overlap width W, and overlap area S can be calculated by the following formula: overlapping And the overlap degree S coincidencedegree :
[0086] L=min(May,Kay)-max(Mcy,Kcy)
[0087] W=min(Mbx,Kbx)-max(Max,Kax)
[0088] S overlapping =L×W
[0089]
[0090] Among them, May represents the ordinate of vertex a of the viewfinder M, Kay represents the ordinate of vertex a of the preview frame K, Mcy represents the ordinate of vertex c of the viewfinder M, Kcy represents the ordinate of vertex c of the preview frame K, Mbx represents the abscissa of vertex b of the viewfinder M, Kbx represents the abscissa of vertex b of the preview frame K, Max represents the abscissa of vertex a of the viewfinder M, and Kax represents the abscissa of vertex a of the preview frame K.
[0091] According to an exemplary embodiment of the present disclosure, before obtaining the scene description information of the target shooting scene, multiple pictures can be obtained for each of the multiple scenes. Then, for each of the multiple pictures, object recognition can be performed on each picture to obtain at least one type of framing frame corresponding to at least one recognized object. That is, for each scene, a large number of known excellent shooting pictures can be obtained, and then image recognition (ImageRecognition) technology can be used to perform object recognition on each picture to obtain at least one type of framing frame corresponding to at least one recognized object.
[0092] For example, for a "birthday" scene, a person frame, a cake frame, etc. can be identified; for a "wedding" scene, a person frame, a flower frame, a ring frame, etc. can be identified. It should be noted that the above-mentioned "image recognition" technology may refer to a technology that uses a computer to analyze and understand an image to identify targets and objects of various different modes.
[0093] Next, for each type of framing frame in at least one type of framing frame, the optimal coordinates of the target vertex can be determined based on the vertex coordinates of the target vertex of each type of framing frame included in the multiple images. Then, the optimal framing frame in which the vertex coordinates of the target vertex of each type of framing frame included in the multiple images are the optimal coordinates can be determined. Next, based on the optimal framing frame corresponding to each type of framing frame, a framing frame template corresponding to each scene can be generated. Figure 6 FIG. 4 is a schematic diagram showing the generation of a framing frame template according to an exemplary embodiment of the present disclosure.
[0094] Exemplarily, for the person framing frame and the person framing frame in the "birthday" scene, the best coordinates of the target vertex a can be determined based on the vertex coordinates of the target vertex a among the four vertices of the person framing frames contained in multiple pictures. Then, the best person framing frame with the vertex coordinates of the target vertex a in the person framing frames contained in multiple pictures as the best coordinates can be determined; similarly, the best cake framing frame corresponding to the cake framing frame in the "birthday" scene can also be obtained. Next, based on the best person framing frame and the best cake framing frame, a framing frame template corresponding to the "birthday" scene can be generated.
[0095] In this way, since the optimal coordinates of the target vertex of each type of framing frame are obtained by comprehensively considering the vertex coordinates of the target vertex of the framing frame of this type contained in multiple known excellent pictures, the framing frame corresponding to the optimal coordinates is most likely the framing frame with the best shooting effect among the framing frames of this type. Therefore, based on the optimal framing frame corresponding to each type of framing frame, a framing frame template corresponding to each scene can be generated, which can ensure that the best shooting guidance is provided to the user, so that the user can shoot high-quality works.
[0096] According to an exemplary embodiment of the present disclosure, for each scene, the number of times each type of object among the multiple types of objects identified appears in multiple pictures in each scene can also be determined. Then, based on the number of times each type of object appears in multiple pictures in each scene, the priority of each type of object in each scene can be determined, wherein the greater the number of times, the higher the priority.
[0097] Exemplarily, for the "birthday" scene, the number of times the recognized person object and cake object appear in multiple pictures in the "birthday" scene can be determined. Exemplarily, it is assumed that the number of times the person object appears is 100 times, and the number of times the cake object appears is 80 times. Then, based on the number of times the person object and the cake object appear in multiple pictures in the "birthday" scene, the priority of the person object and the cake object in the "birthday" scene can be determined. Since the number of times the person object appears is 100 times, which is higher than the number of times the cake object appears 80 times, it can be determined that the priority of the person object in the "birthday" scene is higher than the priority of the cake object.
[0098] In this way, if a certain type of object appears more frequently in a certain scene, it means that the object of this type is more important, that is, it is an important part of the scene. Therefore, the priority of each type of object can be determined based on the number of occurrences of the object, which can ensure the objectivity and accuracy of the determined priority.
[0099] The following examples illustrate the application of the shooting method provided by the present disclosure in various scenarios.
[0100] Figure 7 is a schematic diagram showing the application of a photographing method to a birthday scene according to an exemplary embodiment of the present disclosure. Figure 7 At this time, the electronic device used for shooting can be a mobile robot or a drone.
[0101] First, the robot can obtain a preview screen through a camera, and then input the preview screen into a large language model to obtain scene description information; or, the scene description information can be obtained through voice input. Then, keywords can be extracted from the scene description information, for example, the extracted keywords can be "character", "cake", etc. Next, the keywords extracted from the scene description information can be used to perform scene matching in the viewfinder template database, and then the best viewfinder template can be obtained. Then, the mobile robot can calculate the degree of overlap between the preview frame in the preview screen and the viewfinder in the best viewfinder template. When the overlap is greater than or equal to a preset threshold, such as 90%, the shooting can be performed directly; otherwise, that is, when the overlap is less than the preset threshold, the mobile robot can automatically move to the best shooting position where the overlap is greater than or equal to the preset threshold, and then the shooting can be performed at the best shooting position.
[0102] Figure 8 is a schematic diagram showing the application of a photographing method to a wedding ring exchange scene according to an exemplary embodiment of the present disclosure. Figure 8At this time, the electronic device used for shooting can be a mobile phone (Phone) / tablet computer (Pad), that is, the user can take the phone / pad to shoot.
[0103] First, you can use the camera of the Phone / Pad to obtain a preview image, and then you can input the preview image into a large language model to obtain scene description information; or you can also obtain scene description information through voice input. Then, you can extract keywords from the scene description information. For example, the extracted keywords can be "human hands", "rings", "flowers", etc. Then, you can use the keywords extracted from the scene description information to perform scene matching in the framing template database to obtain the best framing template. Next, based on the framing included in the best framing template, the user can move the Phone / Pad until the object, such as a ring, hand, etc., appears in the best framing frame and then take a photo.
[0104] Fig. 9 is a schematic diagram showing the application of a photographing method to a family portrait scene according to an exemplary embodiment of the present disclosure. Fig. 9 At this time, the electronic device used for shooting can be a robot / drone, that is, the robot / drone can be used to take selfies.
[0105] First, the user can voice input the scene description information "take a family portrait of three people", and then the mobile robot can extract keywords from the scene description information, such as "family portrait", "three people", etc. Then, the keywords extracted from the scene description information can be used to perform scene matching in the framing frame template database, and then the best framing frame template can be obtained. Next, the mobile robot can calculate the degree of overlap between the preview frame in the preview screen and the framing frame in the best framing frame template. When the degree of overlap is greater than or equal to a preset threshold, such as 90%, the shooting can be performed directly; otherwise, that is, when the degree of overlap is less than the preset threshold, the mobile robot can automatically move to the best shooting position where the degree of overlap is greater than or equal to the preset threshold, and then the shooting can be performed at the best shooting position.
[0106] Fig.10 is a schematic diagram showing an example of applying a photographing method to a pet monitoring scene according to an exemplary embodiment of the present disclosure. Fig.10 In pet shops / veterinary hospitals, there are many pets that are undergoing treatment or are temporarily boarding, and their owners want to know the latest status of their pets.
[0107] First, the user can voice input the scene description information "shoot pet dog A at 9:00, shoot for 5 minutes", and then the mobile robot can extract keywords from the scene description information, such as "dog", etc. Then, the keywords extracted from the scene description information can be used to perform scene matching in the framing template database, and then the best framing template can be obtained. Next, the mobile robot can track the location of pet dog A through its smart tag (SmartTag), and then shoot a 5-minute video based on the best framing template, and send the captured video to its owner's terminal.
[0108] In this way, you can also set the mobile robot's scheduled shooting tasks, for example, you can set: "shoot pet dog A at 9:00, shoot for 5 minutes"; "shoot pet cat B at 10:00, shoot for 10 minutes"; "shoot pet dog C at 11:00, shoot for 8 minutes" and so on.
[0109] Fig.11 is a schematic diagram showing an example of applying a photographing method to a scene for monitoring children according to an exemplary embodiment of the present disclosure. Fig.11 , parents want to know how their children are doing at home when they are at work or away.
[0110] First, the user can input the scene description information "shoot the child at 9:00, shoot for 2 minutes" by voice, and then the mobile robot can extract keywords from the scene description information, such as "children", etc. Then, the keywords extracted from the scene description information can be used to perform scene matching in the framing template database, and then the best framing template can be obtained. Next, the mobile robot can track the child's position through the SmartTag of the child, and then shoot a 2-minute video based on the best framing template, and send the video to the terminal of the child's parents.
[0111] In this way, the mobile robot can be set up with a scheduled shooting task, for example, it can be set up to: "8:00-17:00, shoot the children at home for 2 minutes every hour". In this way, parents can receive videos of their children on time and know the children's situation at home.
[0112] Fig.12 is a block diagram illustrating a photographing device 1200 according to an exemplary embodiment of the present disclosure.
[0113] Reference Fig.12 The shooting device 1200 may include a scene description information acquisition module 1201, a framing template selection module 1202 and a shooting module 1203.
[0114] The scene description information acquisition module 1201 can acquire scene description information of a target shooting scene, wherein the target shooting scene can be a scene of a preview screen to be shot by an electronic device. It should be noted that in the present disclosure, the electronic device can be, but is not limited to: a robot, a drone, a mobile phone, a tablet computer, etc.
[0115] According to an exemplary embodiment of the present disclosure, the scene description information acquisition module 1201 can input the preview screen into a large language model to obtain scene description information. The large language model is a statistical language model trained based on a large amount of data, which can be used to generate and translate text and perform other natural language processing tasks.
[0116] In this way, the preview screen can be input into the large language model to obtain scene description information, which can avoid various operations caused by manually obtaining the scene description information. The implementation process of obtaining the scene description information is simple, convenient and fast.
[0117] According to an exemplary embodiment of the present disclosure, the scene description information acquisition module 1201 may also acquire the user's voice input for the preview screen, and then convert the voice input into the above-mentioned scene description information.
[0118] In this way, since the user's description of the preview screen can more accurately reflect the information content contained in the preview screen, the scene description information can also be obtained through user voice input, which can ensure the comprehensiveness and accuracy of the obtained scene description information and avoid inaccurate recognition and missed recognition caused by obtaining scene description information only through model recognition.
[0119] The framing frame template selection module 1202 may select a target framing frame template matching the scene description information from a framing frame template database based on the scene description information, wherein the framing frame template database may include multiple framing frame templates, each of which may correspond to scene information.
[0120] According to an exemplary embodiment of the present disclosure, the framing template selection module 1202 can extract keywords from the above scene description information. Then, the framing template selection module 1202 can obtain the matching degree between the target shooting scene and each framing template based on the extracted keywords and the scene information of each framing template in the framing template database. Next, the framing template selection module 1202 can determine the framing template with the highest matching degree in the framing template database as the target framing template.
[0121] In this way, since the role of keywords is to describe the scene and characterize the core characteristics of the scene, framing frame template matching, that is, scene matching, can be performed based on the keywords extracted from the scene description information. This can ensure that the matched framing frame template is a framing frame template that is truly similar to the scene of the preview image to be shot and is truly instructive.
[0122] According to an exemplary embodiment of the present disclosure, for each framing template in the framing template database, the framing template selection module 1202 may determine the number of identical keywords between the scene keywords corresponding to the scene information of each framing template and the extracted keywords. Then, the framing template selection module 1202 may determine the degree of matching between the target shooting scene and each framing template based on the number of identical keywords, wherein the greater the number of identical keywords, the higher the degree of matching may be.
[0123] As mentioned above, the role of keywords is to describe scenes and characterize the core features of scenes. Therefore, the more the same keywords are, the more similar the two scenes are. In this way, in the present disclosure, the framing frame templates can be screened based on the number of the same keywords, and the screened framing frame templates can be guaranteed to be the framing frame templates with the highest degree of fit, the most similarity, and the most guiding significance to the scene of the preview image to be shot.
[0124] According to an exemplary embodiment of the present disclosure, the number of the above-mentioned identical keywords may be multiple, and there may also be multiple corresponding framing templates with the highest degree of matching. At this time, for each of the multiple corresponding framing templates with the highest degree of matching, the framing template selection module 1202 may determine the priority of each identical keyword in the multiple identical keywords under each framing template. It should be noted that the priority of the same keyword under different framing templates may be different. For example, for the keyword "people", the priority under the framing template "birthday" may be the highest priority, while the priority under the framing template "famous buildings" may not be the highest priority, but may be the second priority or even a lower priority.
[0125] Then, the framing template selection module 1202 may determine the score of each identical keyword in each framing template based on the priority of each identical keyword in each framing template and the correspondence between the preset priority and the score.
[0126] Next, the framing template selection module 1202 may calculate the sum of the scores of each of the multiple identical keywords as the scene score corresponding to each framing template. Then, the framing template selection module 1202 may determine the framing template with the highest scene score among the multiple corresponding framing templates with the highest matching degree as the target framing template.
[0127] In this way, when screening framing frame templates, in addition to considering the number of identical keywords, the priority of each identical keyword under the corresponding framing frame template can also be considered, that is, the influence of each identical keyword under the corresponding framing frame template can also be considered. The information considered is more comprehensive and granular, which can further ensure the degree of fit between the screened target framing frame template and the scene of the preview screen to be shot, thereby ensuring that better quality works are shot.
[0128] The shooting module 1203 can perform shooting based on the preview image and the target view frame template.
[0129] According to an exemplary embodiment of the present disclosure, the shooting module 1203 can determine at least one preview frame in the preview picture and at least one framing frame in the target framing frame template, wherein each preview frame can surround an object in the preview picture, and each framing frame can surround an object in the target framing frame template.
[0130] Then, the shooting module 1203 can calculate the overlap degree of at least one preview frame and at least one viewfinder frame. When the overlap degree is greater than or equal to a preset threshold, the shooting module 1203 can perform shooting; otherwise, that is, when the overlap degree is less than the preset threshold, the shooting module 1203 can control the electronic device to adjust the preview screen position and perform shooting. Exemplarily, the above preset threshold can be but not limited to: 90%.
[0131] In this way, when the preview frame and the viewfinder have a high degree of overlap, it means that the electronic device is currently close to the best shooting position, and the electronic device can be controlled to shoot directly; if the preview frame and the viewfinder have a low degree of overlap, it means that the electronic device is currently far from the best shooting position, that is, the shooting quality of the work to be shot has a lot of room for improvement, and the orientation of the electronic device can be adjusted to put the electronic device in the best shooting position. In this way, the shooting guidance role of the viewfinder template can be maximized, and the work with high shooting quality can be guaranteed.
[0132] According to an exemplary embodiment of the present disclosure, the shooting module 1203 can automatically control the electronic device to adjust the preview screen position. Exemplarily, the electronic device can be automatically controlled to move / automatically adjust the rotation angle of the electronic device camera to adjust the preview screen position; or, the shooting module 1203 can also display adjustment guidance information to guide the user to adjust the preview screen position. Exemplarily, guidance information for guiding the user to move / adjust the shooting posture can be displayed to adjust the preview screen position.
[0133] Thus, in the present disclosure, two different ways of adjusting the preview screen position can be provided, namely, the electronic device can be automatically controlled to move to the best shooting position for shooting; and adjustment guidance information can be displayed to guide the user to move to adjust the preview screen position. The user can choose which way to use to adjust the preview screen position according to their own needs and actual scenarios, and the autonomy and flexibility of adjusting the preview screen position are better.
[0134] According to an exemplary embodiment of the present disclosure, for a target preview frame in at least one preview frame and a target framing frame corresponding to the target preview frame in at least one framing frame, the shooting module 1203 may calculate the overlap length L and overlap width W of the overlap area of the target framing frame and the target preview frame based on the vertex coordinates of the target framing frame and the vertex coordinates of the target preview frame. Then, the shooting module 1203 may calculate the product of the overlap length L and the overlap width W to obtain the area S of the overlap area. overlapping Next, the shooting module 1203 may calculate the area S of the overlapped region based on the area S of the overlapped region. overlapping , the area of the target preview box S and the area of the target viewfinder box S M , calculate the overlap degree S of the target preview frame and the target viewfinder frame coincidencedegree .
[0135] According to an exemplary embodiment of the present disclosure, the above-mentioned photographing device 1200 may further include a picture acquisition module, an object recognition module, an optimal coordinate determination module, an optimal framing determination module, and a framing template generation module.
[0136] Before acquiring the scene description information of the target shooting scene, the picture acquisition module can acquire multiple pictures for each of the multiple scenes. Then, for each of the multiple pictures, the object recognition module can perform object recognition on each picture to obtain at least one type of framing frame corresponding to at least one recognized object. That is, for each scene, a large number of known excellent shooting pictures can be acquired, and then the image recognition technology can be used to perform object recognition on each picture to obtain at least one type of framing frame corresponding to at least one recognized object.
[0137] For example, for a "birthday" scene, a person frame, a cake frame, etc. can be identified; for a "wedding" scene, a person frame, a flower frame, a ring frame, etc. can be identified. It should be noted that the above-mentioned "image recognition" technology may refer to a technology that uses a computer to analyze and understand an image to identify targets and objects of various different modes.
[0138] Next, for each type of framing frame in at least one type of framing frame, the optimal coordinate determination module can determine the optimal coordinates of the target vertex based on the vertex coordinates of the target vertex of each type of framing frame included in the multiple images. Then, the optimal framing frame determination module can determine the optimal framing frame in which the vertex coordinates of the target vertex in each type of framing frame included in the multiple images are the optimal coordinates. Next, the framing frame template generation module can generate a framing frame template corresponding to each scene based on the optimal framing frame corresponding to each type of framing frame.
[0139] Exemplarily, for the person framing frame and the person framing frame in the "birthday" scene, the best coordinates of the target vertex a can be determined based on the vertex coordinates of the target vertex a among the four vertices of the person framing frames contained in multiple pictures. Then, the best person framing frame with the vertex coordinates of the target vertex a in the person framing frames contained in multiple pictures as the best coordinates can be determined; similarly, the best cake framing frame corresponding to the cake framing frame in the "birthday" scene can also be obtained. Next, based on the best person framing frame and the best cake framing frame, a framing frame template corresponding to the "birthday" scene can be generated.
[0140] In this way, since the optimal coordinates of the target vertex of each type of framing frame are obtained by comprehensively considering the vertex coordinates of the target vertex of the framing frame of this type contained in multiple known excellent pictures, the framing frame corresponding to the optimal coordinates is most likely the framing frame with the best shooting effect among the framing frames of this type. Therefore, based on the optimal framing frame corresponding to each type of framing frame, a framing frame template corresponding to each scene can be generated, which can ensure that the best shooting guidance is provided to the user, so that the user can shoot high-quality works.
[0141] According to an exemplary embodiment of the present disclosure, the photographing device 1200 may further include a number determination module and a priority determination module.
[0142] For each scene, the number determination module can also determine the number of times each type of object among the multiple types of objects identified appears in multiple pictures in each scene. Then, the priority determination module can determine the priority of each type of object in each scene based on the number of times each type of object appears in multiple pictures in each scene, wherein the more times each type of object appears, the higher the priority can be.
[0143] Exemplarily, for the "birthday" scene, the number of times the recognized person object and cake object appear in multiple pictures in the "birthday" scene can be determined. Exemplarily, it is assumed that the number of times the person object appears is 100 times, and the number of times the cake object appears is 80 times. Then, based on the number of times the person object and the cake object appear in multiple pictures in the "birthday" scene, the priority of the person object and the cake object in the "birthday" scene can be determined. Since the number of times the person object appears is 100 times, which is higher than the number of times the cake object appears 80 times, it can be determined that the priority of the person object in the "birthday" scene is higher than the priority of the cake object.
[0144] In this way, if a certain type of object appears more frequently in a certain scene, it means that the object of this type is more important, that is, it is an important part of the scene. Therefore, the priority of each type of object can be determined based on the number of occurrences of the object, which can ensure the objectivity and accuracy of the determined priority.
[0145] Fig.13 is a block diagram illustrating an electronic device 1300 according to an exemplary embodiment of the present disclosure.
[0146] Reference Fig.13 The electronic device 1300 includes at least one memory 1301 and at least one processor 1302. The at least one memory 1301 stores instructions. When the instructions are executed by the at least one processor 1302, the shooting method according to the exemplary embodiment of the present disclosure is executed.
[0147] As an example, the electronic device 1300 may be a PC, a tablet device, a personal digital assistant, a smart phone, or other device capable of executing the above instructions. Here, the electronic device 1300 is not necessarily a single electronic device, but may also be any device or circuit capable of executing the above instructions (or instruction sets) individually or in combination. The electronic device 1300 may also be part of an integrated control system or system manager, or may be configured as a portable electronic device interconnected with a local or remote (e.g., via wireless transmission) interface.
[0148] In the electronic device 1300, the processor 1302 may include a central processing unit (CPU), a graphics processing unit (GPU), a programmable logic device, a dedicated processor system, a microcontroller or a microprocessor. As an example and not limitation, the processor may also include an analog processor, a digital processor, a microprocessor, a multi-core processor, a processor array, a network processor, etc.
[0149] The processor 1302 may execute instructions or codes stored in the memory 1301, wherein the memory 1301 may also store data. Instructions and data may also be sent and received over a network via a network interface device, wherein the network interface device may employ any known transmission protocol.
[0150] The memory 1301 may be integrated with the processor 1302, for example, by placing RAM or flash memory within an integrated circuit microprocessor or the like. In addition, the memory 1301 may include a separate device, such as an external disk drive, a storage array, or any other storage device that can be used by a database system. The memory 1301 and the processor 1302 may be operationally coupled, or may communicate with each other, such as through an I / O port, a network connection, etc., so that the processor 1302 can read files stored in the memory.
[0151] In addition, the electronic device 1300 may also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, a mouse, a touch input device, etc.) All components of the electronic device 1300 may be connected to each other via a bus and / or a network.
[0152] According to an exemplary embodiment of the present disclosure, a computer-readable storage medium may also be provided, and when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is able to perform the above-mentioned shooting method. Examples of computer-readable storage media here include: read-only memory (ROM), random access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD+R, CD-RW, CD+RW, DVD-ROM, DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, Blu-ray or optical disk storage, hard disk drive (HDD), solid state drive (SSD), card storage (such as, multimedia card, secure digital (SD) card or extreme digital (XD) card), magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk and any other device, any other device is configured to store computer programs and any associated data, data files and data structures in a non-transitory manner and provide the computer programs and any associated data, data files and data structures to a processor or computer so that the processor or computer can execute the computer program. The computer program in the above-mentioned computer-readable storage medium can be run in an environment deployed in a computer device such as a client, a host, an agent device, a server, etc. In addition, in one example, the computer program and any associated data, data files and data structures are distributed on a networked computer system, so that the computer program and any associated data, data files and data structures are stored, accessed and executed in a distributed manner by one or more processors or computers.
[0153] According to an exemplary embodiment of the present disclosure, a computer program product may also be provided, including a computer program, and when the computer program is executed by a processor, the shooting method according to the present disclosure is implemented.
[0154] According to the shooting method, device, electronic device, storage medium and computer program product disclosed in the present invention, a target frame template matching the preview image can be obtained, and then the target frame template can be used as a shooting basis to guide the electronic device to shoot at the best shooting position. In this way, even if the user is not good at shooting, high-quality photos or videos that satisfy the user can be taken.
[0155] According to an exemplary embodiment of the present disclosure, the preview screen can be input into a large language model to obtain scene description information, which can avoid various operations caused by manually obtaining the scene description information. The implementation process of obtaining the scene description information is simple, convenient and fast.
[0156] According to an exemplary embodiment of the present disclosure, since the user's description of the preview screen can more accurately reflect the information content contained in the preview screen, the scene description information can also be obtained through user voice input, which can ensure the comprehensiveness and accuracy of the obtained scene description information and avoid inaccurate recognition and missed recognition caused by obtaining the scene description information only through model recognition.
[0157] According to an exemplary embodiment of the present disclosure, since the role of keywords is to describe the scene to characterize the core features of the scene, framing frame template matching, i.e., scene matching, can be performed based on the keywords extracted from the scene description information, which can ensure that the matched framing frame template is a framing frame template that is truly similar to the scene of the preview image to be shot and is truly instructive.
[0158] According to an exemplary embodiment of the present disclosure, the role of keywords is to describe a scene to characterize the core features of the scene. Therefore, the more the same keywords are, the more similar the two scenes are. In this way, in the present disclosure, the framing templates can be screened based on the number of the same keywords, and the screened framing templates can be guaranteed to be the framing templates with the highest degree of fit, the most similarity, and the most guiding significance to the scene of the preview image to be shot.
[0159] According to an exemplary embodiment of the present disclosure, when screening framing frame templates, in addition to considering the number of identical keywords, the priority of each identical keyword under the corresponding framing frame template may also be considered, that is, the influence of each identical keyword under the corresponding framing frame template may also be considered. The information considered is more comprehensive and has a finer granularity, which can further ensure the degree of fit between the screened target framing frame template and the scene of the preview screen to be shot, thereby ensuring that better quality works are shot.
[0160] According to an exemplary embodiment of the present disclosure, when the preview frame and the viewfinder have a high degree of overlap, it means that the electronic device is currently close to the best shooting position, and the electronic device can be controlled to shoot directly; if the preview frame and the viewfinder have a low degree of overlap, it means that the electronic device is currently far from the best shooting position, that is, the shooting quality of the work to be shot has a large room for improvement, and the orientation of the electronic device can be adjusted to put the electronic device in the best shooting position. In this way, the shooting guidance role of the viewfinder template can be maximized, and works with high shooting quality can be obtained.
[0161] According to an exemplary embodiment of the present disclosure, two different ways can be provided to adjust the preview screen position, namely, the electronic device can be automatically controlled to move to the best shooting position for shooting; or adjustment guidance information can be displayed to guide the user to move to adjust the preview screen position. The user can choose which way to use to adjust the preview screen position according to their own needs and actual scenarios, and the autonomy and flexibility of adjusting the preview screen position are better.
[0162] According to the exemplary embodiments of the present disclosure, since the optimal coordinates of the target vertex of each type of framing frame are obtained by comprehensively considering the vertex coordinates of the target vertex of the framing frame of this type contained in multiple known excellent pictures, the framing frame corresponding to the optimal coordinates is most likely the framing frame with the best shooting effect among the framing frames of this type. Therefore, based on the optimal framing frame corresponding to each type of framing frame, a framing frame template corresponding to each scene can be generated, which can ensure that the best shooting guidance is provided to the user, so that the user can shoot high-quality works.
[0163] According to an exemplary embodiment of the present disclosure, if a certain type of object appears more frequently in a certain scene, it means that the object of this type is more important, that is, it is an important part of the scene. Therefore, the priority of each type of object can be determined based on the number of occurrences of the object, and the objectivity and accuracy of the determined priority can be guaranteed.
[0164] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0165] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A shooting method, applied to an electronic device, It is characterized in that include: Acquire scene description information of a target shooting scene, wherein the target shooting scene is a scene of a preview screen to be shot of the electronic device; Based on the scene description information, selecting a target framing frame template that matches the scene description information from a framing frame template database, wherein the framing frame template database includes a plurality of framing frame templates, each of which corresponds to scene information; Based on the preview image and the target view frame template, shooting is performed.
2. The photographing method according to claim 1, It is characterized in that The step of selecting a target framing frame template matching the scene description information from a framing frame template database based on the scene description information includes: extracting keywords from the scene description information; Based on the extracted keywords and the scene information of each framing frame template in the framing frame template database, obtaining a matching degree between the target shooting scene and each framing frame template; The framing frame template with the highest degree of matching in the framing frame template database is determined as the target framing frame template.
3. The photographing method according to claim 2, It is characterized in that The step of obtaining a matching degree between the target shooting scene and each framing frame template based on the extracted keywords and the scene information of each framing frame template in the framing frame template database includes: For each framing frame template in the framing frame template database, determining the number of identical keywords between scene keywords corresponding to the scene information of each framing frame template and the extracted keywords; Based on the number of the same keywords, the matching degree between the target shooting scene and each framing frame template is determined, wherein the greater the number of the same keywords, the higher the matching degree.
4. The photographing method according to claim 3, It is characterized in that The number of the same keywords is multiple, and there are multiple corresponding framing templates with the highest matching degree, and determining the corresponding framing template with the highest matching degree in the framing template database as the target framing template includes: For each of the plurality of corresponding framing frame templates with the highest matching degree, determining the priority of each of the plurality of identical keywords under each of the framing frame templates; Determine the score of each identical keyword in each framing template based on the priority of each identical keyword in each framing template and the correspondence between the preset priority and the score; Calculating the sum of the scores of each of the multiple identical keywords as the scene score corresponding to each framing frame template; The framing frame template with the highest corresponding scene score among the multiple framing frame templates with the highest corresponding matching degrees is determined as the target framing frame template.
5. The photographing method according to claim 1, It is characterized in that The performing of shooting based on the preview image and the target view frame template includes: Determine at least one preview frame in the preview picture and at least one framing frame in the target framing frame template, wherein each of the preview frames surrounds an object in the preview picture, and each of the framing frames surrounds the object in the target framing frame template; Calculating the degree of overlap between the at least one preview frame and the at least one framing frame; When the overlap degree is greater than or equal to a preset threshold, performing photographing; When the overlap degree is less than the preset threshold, the electronic device is controlled to adjust the preview screen position and perform shooting.
6. The photographing method according to claim 5, It is characterized in that The controlling the electronic device to adjust the preview screen position includes: Automatically controlling the electronic device to adjust the preview screen position; Alternatively, adjustment guidance information is displayed to guide the user to adjust the preview image position.
7. The photographing method according to claim 5, It is characterized in that The calculating the overlap degree between the at least one preview frame and the at least one framing frame includes: For a target preview frame in the at least one preview frame and a target framing frame corresponding to the target preview frame in the at least one framing frame, calculating an overlap length and an overlap width of an overlap area between the target framing frame and the target preview frame based on vertex coordinates of the target framing frame and vertex coordinates of the target preview frame; Calculate the product of the overlap length and the overlap width to obtain the area of the overlap region; Based on the area of the overlapped region, the area of the target preview frame and the area of the target framing frame, the overlap degree between the target preview frame and the target framing frame is calculated.
8. The photographing method according to claim 1, It is characterized in that Before obtaining the scene description information of the target shooting scene, it also includes: For each of the multiple scenes, obtain multiple pictures; For each of the multiple pictures, perform object recognition on each of the pictures to obtain at least one type of framing frame corresponding to at least one recognized object; For each type of framing frame in the at least one type of framing frames, based on the vertex coordinates of the target vertex of each type of framing frame included in the multiple pictures, determine the best coordinates of the target vertex; determine the best framing frame in which the vertex coordinates of the target vertex in each type of framing frame included in the multiple pictures are the best coordinates; Based on the best framing frame corresponding to each type of framing frame, a framing frame template corresponding to each scene is generated.
9. The photographing method according to claim 8, It is characterized in that Also includes: For each of the scenes, determining the number of times each type of object among the identified multiple types of objects appears in the multiple pictures in each of the scenes; Based on the number of times each type of object appears in the multiple pictures in each scene, the priority of each type of object in each scene is determined, wherein the greater the number of times, the higher the priority.
10. The photographing method according to claim 1, It is characterized in that The step of obtaining scene description information of a target shooting scene includes: The preview image is input into a large language model to obtain the scene description information.
11. The photographing method according to claim 1, It is characterized in that The step of obtaining scene description information of a target shooting scene includes: Obtaining a user's voice input for the preview screen; The speech input is converted into the scene description information.
12. A photographing device, It is characterized in that include: A scene description information acquisition module is configured to acquire scene description information of a target shooting scene, wherein the target shooting scene is a scene of a preview screen to be shot of the electronic device; A framing frame template selection module is configured to select a target framing frame template matching the scene description information from a framing frame template database based on the scene description information, wherein the framing frame template database includes a plurality of framing frame templates, each of which corresponds to scene information; The shooting module is configured to perform shooting based on the preview image and the target view frame template.
13. The photographing device according to claim 12, It is characterized in that The view frame template selection module is configured as follows: extracting keywords from the scene description information; Based on the extracted keywords and the scene information of each framing frame template in the framing frame template database, obtaining a matching degree between the target shooting scene and each framing frame template; The framing frame template with the highest degree of matching in the framing frame template database is determined as the target framing frame template.
14. The photographing device according to claim 13, It is characterized in that The view frame template selection module is configured as follows: For each framing frame template in the framing frame template database, determining the number of identical keywords between scene keywords corresponding to the scene information of each framing frame template and the extracted keywords; Based on the number of the same keywords, the matching degree between the target shooting scene and each framing frame template is determined, wherein the greater the number of the same keywords, the higher the matching degree.
15. The photographing device according to claim 14, It is characterized in that There are multiple identical keywords, and there are multiple corresponding view frame templates with the highest matching degree. The view frame template selection module is configured as follows: For each of the plurality of corresponding framing frame templates with the highest matching degree, determining the priority of each of the plurality of identical keywords under each of the framing frame templates; Determine the score of each identical keyword in each framing template based on the priority of each identical keyword in each framing template and the correspondence between the preset priority and the score; Calculating the sum of the scores of each of the multiple identical keywords as the scene score corresponding to each framing frame template; The framing frame template with the highest corresponding scene score among the multiple framing frame templates with the highest corresponding matching degrees is determined as the target framing frame template.
16. The photographing device according to claim 12, It is characterized in that The shooting module is configured as follows: Determine at least one preview frame in the preview picture and at least one framing frame in the target framing frame template, wherein each of the preview frames surrounds an object in the preview picture, and each of the framing frames surrounds the object in the target framing frame template; Calculating the degree of overlap between the at least one preview frame and the at least one framing frame; When the overlap degree is greater than or equal to a preset threshold, performing photographing; When the overlap degree is less than the preset threshold, the electronic device is controlled to adjust the preview screen position and perform shooting.
17. The photographing device according to claim 16, It is characterized in that The shooting module is configured as follows: Automatically controlling the electronic device to adjust the preview screen position; Alternatively, adjustment guidance information is displayed to guide the user to adjust the preview image position.
18. The photographing device according to claim 16, It is characterized in that The shooting module is configured as follows: For a target preview frame in the at least one preview frame and a target framing frame corresponding to the target preview frame in the at least one framing frame, calculating an overlap length and an overlap width of an overlap area between the target framing frame and the target preview frame based on vertex coordinates of the target framing frame and vertex coordinates of the target preview frame; Calculate the product of the overlap length and the overlap width to obtain the area of the overlap region; Based on the area of the overlapped region, the area of the target preview frame and the area of the target framing frame, the overlap degree between the target preview frame and the target framing frame is calculated.
19. The photographing device according to claim 12, It is characterized in that The photographing device also includes: The picture acquisition module is configured to acquire a plurality of pictures for each of the plurality of scenes; an object recognition module, configured to perform object recognition on each of the plurality of pictures, and obtain at least one type of framing frame corresponding to at least one recognized object; an optimal coordinate determination module, configured to determine, for each type of viewfinder in the at least one type of viewfinder, the optimal coordinates of the target vertex based on the vertex coordinates of the target vertex of each type of viewfinder included in the multiple images; An optimal framing frame determination module is configured to determine an optimal framing frame in which the vertex coordinates of the target vertex in each type of framing frame included in the multiple pictures are the optimal coordinates; The framing frame template generating module is configured to generate a framing frame template corresponding to each scene based on the best framing frame corresponding to each type of framing frame.
20. The photographing device according to claim 19, It is characterized in that The photographing device also includes: A frequency determination module is configured to determine, for each scene, the number of times each type of object among the identified multiple types of objects appears in the multiple pictures in each scene; The priority determination module is configured to determine the priority of each type of object in each scene based on the number of times each type of object appears in multiple pictures in each scene, wherein the greater the number, the higher the priority.
21. The photographing device according to claim 12, It is characterized in that The scene description information acquisition module is configured as follows: The preview image is input into a large language model to obtain the scene description information.
22. The photographing device according to claim 12, It is characterized in that The scene description information acquisition module is configured as follows: Obtaining a user's voice input for the preview screen; The speech input is converted into the scene description information.
23. An electronic device, It is characterized in that include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the shooting method according to any one of claims 1 to 11.
24. A computer-readable storage medium, It is characterized in that When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the shooting method according to any one of claims 1 to 11.
25. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the shooting method according to any one of claims 1 to 11 is implemented.
