Shooting method and device
The method and device guide users to the reference image position and optimize composition, ensuring high-quality image capture by aligning with the reference.
Patent Information
- Application Number
- CN202510458644.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2025-07-15
AI Technical Summary
It is difficult for users to capture high-quality similar images by simply imitating reference images, due to personal photography experience and location differences.
By determining the reference shooting position of the reference image, navigation information is generated to guide the user to move to the position, and composition prompt information is displayed upon arrival, helping the user to adjust the composition method, and finally shooting when the composition deviation of the preview image and the reference image is less than the threshold.
Ensure that the captured images accurately match the reference images, improve shooting quality and efficiency, and achieve efficient shooting of high-quality images similar to the reference images.
Smart Images

Figure CN120321490A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of camera technology, and particularly relates to a shooting method and device. Background Art
[0002] Nowadays, with the continuous progress of smartphone photography technology, more and more users want to take high-quality photos when traveling. Especially under the influence of social media, tourists often hope to restore or replicate the reference images they see on the Internet. For example, the reference images may include landmark buildings at specific angles, natural landscapes under specific lighting conditions, or even portrait photos in specific poses.
[0003] However, simply relying on visual observation and simple imitation of reference images for shooting often makes it difficult to obtain ideal shooting effects. Limited by the user's personal photography experience, even if the user stands in a similar position, it is difficult to take high-quality images similar to the reference images. Summary of the Invention
[0004] The objective of the embodiments of this application is to provide a shooting method and device, which can solve the technical problem that it is difficult to take high-quality images similar to reference images in the related art.
[0005] In a first aspect, the embodiments of this application provide a shooting method, which includes:
[0006] Determine the reference shooting position of the reference image;
[0007] Generate navigation information based on the reference shooting position and the current position of the electronic device, where the navigation information is used to guide the user to move from the current position to the reference shooting position;
[0008] When the user moves to the reference shooting position, display the composition prompt information corresponding to the reference image on the electronic device, where the composition prompt information is used to guide the user to adjust the composition method;
[0009] When the composition deviation between the preview image in the electronic device and the reference image is less than the deviation threshold, capture the target image.
[0010] In a second aspect, the embodiments of this application provide a shooting device, which includes:
[0011] A first determination module, configured to determine the reference shooting position of the reference image;
[0012] A first generation module, configured to generate navigation information based on the reference shooting position and the current position of the electronic device, where the navigation information is used to guide the user to move from the current position to the reference shooting position;
[0013] A first display module, configured to display composition prompt information corresponding to the reference image on the electronic device when the user moves to the reference shooting position, where the composition prompt information is used to guide the user to adjust the composition method;
[0014] A shooting module, configured to capture a target image when the composition deviation between the preview image and the reference image in the electronic device is less than a deviation threshold.
[0015] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory. The memory stores a program or instruction that can run on the processor. When the program or instruction is executed by the processor, the steps of the method provided in the first aspect are implemented.
[0016] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method provided in the first aspect are implemented.
[0017] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method provided in the first aspect.
[0018] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method provided in the first aspect.
[0019] In the shooting method and device of the present application, the reference shooting position of the reference image can be determined first, and then navigation information is generated and displayed according to the current position of the user and the reference shooting position to guide the user to move to the reference shooting position, and then the composition prompt information corresponding to the reference image is displayed to help the user adjust the shooting composition method. When the composition deviation between the preview image and the reference image is lower than the set threshold, shooting is automatically triggered. In this way, the electronic device can accurately guide the user to the correct shooting position and guide the user to optimize the shooting angle and composition in real time. Compared with the user simply imitating the reference image for manual adjustment, this solution can ensure that the captured image exactly matches the reference image, so as to efficiently capture high-quality images similar to the reference image. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a schematic flowchart of a shooting method provided by an embodiment of the present application;
[0021] Figure 2 is a schematic structural diagram of a shooting device provided by another embodiment of the present application;
[0022] Figure 3It is a schematic structural diagram of an electronic device provided by another embodiment of the present application;
[0023] Figure 4 It is a schematic hardware structure diagram of an electronic device provided in an embodiment of the present application. Detailed implementation manners
[0024] Next, the technical solutions in the embodiments of the present application will be clearly described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art belong to the scope of protection of the present application.
[0025] The terms "first", "second", etc. in the specification of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such terms can be interchanged under appropriate circumstances so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same category, and the number of objects is not limited. For example, the first object can be one or multiple. In addition, "and / or" in the specification means at least one of the connected objects, and the character " / ", generally represents an "or" relationship between the associated objects before and after.
[0026] To solve the above technical problems, the present application provides a shooting method. Next, the shooting method provided in the embodiments of the present application will be described in detail in conjunction with the accompanying drawings, through specific embodiments and their application scenarios.
[0027] As Figure 1 shown, Figure 1 It is a schematic flowchart of a shooting method provided by an embodiment of the present application. The embodiment of the present application provides a shooting method, and the method may include:
[0028] S101, determine the reference shooting position of the reference image;
[0029] In this embodiment, the reference image is an image that the user hopes to replicate or use as a reference for shooting. The reference image can be sourced from content that the user sees on social media, short video platforms, or experience sharing communities. It can be a specific image frame in a short video, or a photo included in a topic post, and the user expects to shoot an image similar to it in terms of composition, angle, lighting, atmosphere, etc.
[0030] Exemplarily, in some embodiments, before determining the reference shooting position of the reference image, the method further includes:
[0031] Obtain at least one content item that has an interaction behavior with the user;
[0032] Determine the interaction scores of each of the content entries according to the interaction behaviors;
[0033] Determine the content entry with the highest interaction score as the target content entry;
[0034] Determine a reference image according to the target content entry.
[0035] In this embodiment, the content entry is an object interacted by a user on a social platform or a short video platform, and the content entry can be a video, an image or a topic post. The interaction behaviors can include liking, favoriting, sharing and viewing. Then, the content entries having interaction behaviors with the user can include the videos liked by the user, the images favorited by the user or the topic posts viewed by the user.
[0036] The system can obtain all the content entries having interaction behaviors with the user, and then determine the interaction scores of each content entry according to the interaction behaviors of the user with each content entry. Among them, the interaction score can represent the preference degree of the user for the content entry. The higher the interaction score, the more interested the user is in the content entry, that is, the more the user hopes to reproduce the shooting method or composition effect therein.
[0037] Therefore, the user can determine the content entry with the highest interaction score as the target content entry, and then select a reference image from the target content entry. For example, when the target content entry is a photo, the user can directly determine the photo as the reference image; when the target content entry is a video, the user can determine a certain video frame in the video as the reference image; when the target content entry is a topic post, the user can determine the image with the most likes in the topic post as the reference image.
[0038] In this embodiment, the interest degree of the user in each content entry can be quantified by analyzing the interaction behaviors of the user, so as to accurately screen out the target content entry that best meets the user's preference, and determine the reference image according to the target content entry, so as to ensure that the obtained reference image is the image that the user most wants to reproduce.
[0039] In some embodiments, the interaction behaviors include at least one of liking, favoriting, sharing and viewing, and the determining the interaction scores of each of the content entries according to the interaction behaviors includes:
[0040] For any first content entry among the at least one content entry, obtain at least one of the number of likes, the number of favorites, the number of shares and the viewing duration of the user for the first content entry;
[0041] Determine the interaction score of the first content entry according to at least one of the number of likes, the number of favorites, the number of shares and the viewing duration.
[0042] In this embodiment, the interaction score can numerically represent the degree of a user's interest in a certain content item. The interaction score can be calculated by weighting according to the user's specific interaction behaviors on the content item. Among them, the user's specific interaction behaviors can include the user's likes, collections, shares, and views of the content item.
[0043] Then, for any first content item, the user can obtain the number of likes, the number of collections, the number of shares, and the viewing duration of the user for the first content item, and then set a weight coefficient for each interaction behavior. Based on the weight coefficients and interaction behaviors, the interaction score of the first content item can be obtained. Among them, the weight coefficients can include a first weight coefficient corresponding to likes, a second weight coefficient corresponding to collections, a third weight coefficient corresponding to shares, and a fourth weight coefficient corresponding to views.
[0044] For example, if the first content item is a video, then the interaction score of the video can be calculated by the following formula (1):
[0045] S v = w1L v + w2C v + w3S v + w4T v (1)
[0046] Among them, L v is the number of likes of the user for the video, C v is the number of collections of the user for the video, S v is the number of shares of the user for the video, T v is the time proportion of the user watching the video, where the time proportion is the viewing duration / the total video duration, and w1, w2, w3, w4 are the first weight coefficient, the second weight coefficient, the third weight coefficient, and the fourth weight coefficient corresponding to the video respectively. And, the sum of the first weight coefficient, the second weight coefficient, the third weight coefficient, and the fourth weight coefficient is 1. For example, the first weight coefficient can be 0.4, the second weight coefficient can be 0.3, the third weight coefficient can be 0.2, and the fourth weight coefficient can be 0.1.
[0047] For example, if the first content item is a topic post, then the interaction score of the topic post can be calculated by the following formula (2):
[0048] S p = w5L p + w6C p + w7S p + w8V p (2)
[0049] Among them, L pC is the number of likes of the user for the topic post p S is the number of collections of the user for the topic post p V is the number of shares of the user for the topic post p w5, w6, w7, and w8 are the first weight coefficient, the second weight coefficient, the third weight coefficient, and the fourth weight coefficient corresponding to the topic post respectively. w is the viewing duration of the topic post
[0050] Through the above methods, interaction data of the user in multiple dimensions such as likes, collections, shares, and viewing duration can be obtained, and an interaction score can be calculated based on these behaviors, so as to more accurately measure the user's interest in different content items
[0051] In some embodiments, determining the reference image according to the target content item includes
[0052] When the target content item is a video, determining the number of key points in each video frame of the video
[0053] Determining the video frame with the largest number of key points in the video as the reference image
[0054] In this embodiment, the video determined as the target content item can be one or multiple. If the target content item is a video, a video frame can be selected from the video as the reference image
[0055] Specifically, all video frames in the video can be obtained, and then the number of key points in each video frame is counted. Here, the key points refer to the pixel points with significant features in the image that can be used for matching and recognition, and the key points usually correspond to corner points, edge features, or regions with obvious local texture changes
[0056] Since the key points are important feature points in the image and are usually located at edges, corner points, and complex texture regions, the more key points there are, the more detailed information, higher clarity, and better visual structure the image has, which also means that the image contains more distinguishable visual elements, its features are richer, and then the quality of the image is higher. Therefore, the video frame with the largest number of key points can be determined as the reference image
[0057] Exemplarily, the Scale-invariant feature transform (SIFT) algorithm can be used to detect and match the key points of each video frame, so as to determine the number of key points in each video frame, and determine the video frame with the largest number of key points as the reference image
[0058] Specifically, the key frame detection algorithm can be shown as the following formula (3)
[0059] F k = argmax Σ i ||K i || (3)
[0060] where i represents the i-th video frame in the video, and K i represents the number of key points in the i-th video frame.
[0061] In the above manner, the number of key points in each video frame in the video can be calculated, and then the video frame with the most key points is selected as the reference image, so as to ensure that the extracted reference image has high image quality, clarity and composition stability.
[0062] In some embodiments, determining the reference image according to the target content item includes:
[0063] When the target content item includes at least one first image, determining the clarity, complexity, and exposure of each of the first images;
[0064] Determining the image quality of each of the first images according to the clarity, the complexity, and the exposure;
[0065] Determining the first image with the highest image quality as the reference image.
[0066] In this embodiment, if the target content item is a topic post or an image set or other content item including at least one first image, then a first image can also be selected from at least one first image in the target content item as the reference image.
[0067] Specifically, all the first images can be obtained, and then the clarity, complexity, and exposure of each first image are determined. Among them, clarity represents the sharpness of the image, and the gradient change of the image can be calculated through Laplace transform. The greater the gradient, the higher the clarity of the image. Complexity refers to the richness of the image. The SIFT algorithm can be used to detect the key points in the image. The more key points, the more details in the image, and the higher the richness of the image. Exposure represents the balance degree of the image brightness.
[0068] Since an image with high clarity is not blurred and ensures that the details of the image are clearly visible; an image with high complexity contains more rich information and makes the picture more expressive; an image with moderate exposure can ensure a good visual experience and avoid information loss caused by being too dark or too bright. Therefore, the image quality of each first image can be determined based on the clarity, complexity, and exposure of each first image, and then the first image with the highest image quality is determined as the reference image.
[0069] Exemplarily, the calculation formula for the image quality of the first image can be calculated by formula (4) shown as follows:
[0070] Q i = αS i + βC i + γE i (4)
[0071] Wherein, i represents the i-th first image in the target content entry, S i represents the sharpness of the i-th first image, C i represents the complexity of the i-th first image, E i is the exposure of the i-th first image. Q i represents the image quality of the i-th first image. α represents the weight coefficient of complexity, β represents the weight coefficient of sharpness, γ represents the weight coefficient of exposure,
[0072] In this embodiment, at least one image can be extracted from the target content entry, and the quality score of each image can be calculated based on sharpness, complexity, and exposure, so as to screen out the reference image with the highest quality.
[0073] Moreover, after determining the user's reference image, the reference shooting position of the reference image and the reference composition information of the reference image can be further determined. Among them, the reference shooting position refers to the position where the reference image is taken, and the reference shooting position can be inferred through the geographical metadata of the reference image, location tags, or the GPS coordinates of other images uploaded by the user and related to the reference image.
[0074] Specifically, in some embodiments, determining the reference shooting position of the reference image includes:
[0075] Determining a first shooting position according to the geographical metadata associated with the reference image; or,
[0076] Determining a second shooting position according to the location tags corresponding to the reference image; or,
[0077] Obtaining a third shooting position by performing clustering calculation on the shooting positions of N second images, where the second images are images associated with the reference image, and N is a positive integer; or,
[0078] Obtaining a third image with the highest matching degree with the reference image from a preset database, and determining the fourth shooting position of the third image;
[0079] Determining the reference shooting position according to at least one of the first shooting position, the second shooting position, the third shooting position, and the fourth shooting position.
[0080] In this embodiment, the geographic metadata refers to the geographic location information embedded in the metadata of a photo or video, which records the GPS coordinates when the photo or video was taken. The GPS coordinates include the longitude, latitude, and altitude of the photo or video. If the reference image or the video containing the reference image includes geographic metadata, the geographic metadata can be directly determined as the first shooting location.
[0081] In a social media platform, when a user publishes a content item, the user can usually manually select a location tag (POI, Point of Interest), or the social media platform can generate a location tag based on the user's location. The location tag refers to the annotation information of a specific location by the social media platform or the map platform, which is used to indicate the possible shooting location of a photo or video. Therefore, the location tag corresponding to the reference image can be directly determined as the second shooting location.
[0082] The system also obtains P second images associated with the reference image from the social media platform, and then determines the shooting location information of each second image according to the geographic metadata or location tag of each second image. If the number of second images is large enough, dense position point coordinates can be formed. Clustering calculation can be performed on the shooting locations of the P second images to obtain the clustering center point, and the clustering center point is determined as the third shooting location. Among them, the second image can be an image with the same or similar image content as the reference image.
[0083] In addition, the SIFT algorithm can be used to extract each key point in the reference image and obtain the key points of each image in the database, and then match the key points of the reference image and each image in the database, and determine the shooting location of the third image with the highest matching degree with the reference image in the database as the fourth shooting location.
[0084] Then, the reference shooting location can be determined according to at least one of the first shooting location, the second shooting location, the third shooting location, and the fourth shooting location.
[0085] For example, if the first shooting location can be determined according to the geographic metadata associated with the reference image, the first shooting location can be directly determined as the target geographic location. If the geographic metadata associated with the reference image cannot be obtained, then an attempt can be made to determine the second shooting location according to the location tag corresponding to the reference image. If the second shooting location can be determined, the second shooting location can be determined as the reference shooting location. If neither the geographic metadata associated with the reference image nor the location tag corresponding to the reference image can be obtained, then the third shooting location and the fourth shooting location can be determined as the reference shooting location.
[0086] Exemplarily, if the first shooting position, the second shooting position, the third shooting position, and the fourth shooting position can all be determined, the reference shooting position can be determined by combining the first shooting position, the second shooting position, the third shooting position, and the fourth shooting position. Exemplarily, the geographical metadata associated with the reference image can be directly extracted as the first shooting position, then the first shooting position can be:
[0087] P geo =(lat,lon,alt)
[0088] where P geo is the first shooting position, (lat, lon) are the GPS coordinates of the shooting location of the reference image. alt is the altitude of the shooting location.
[0089] The location label corresponding to the reference image can be directly extracted as the second shooting position, then the coordinates of the second shooting position P poi can be expressed as P poi =(lat poi ,lon poi ,alt poi ).
[0090] The third shooting position can also be calculated by a clustering algorithm. The formula (5) of the clustering algorithm is:
[0091]
[0092] where i represents the i-th second image, P cluster represents the third shooting position, and P i represents the shooting position of the i-th second image.
[0093] The fourth shooting position can also be extracted by key point matching:
[0094] P match =(lat match ,lon match ,alt match ).
[0095] During the process of key point matching, the reference image and the images in the database can be vectorized, then the matching degree between the reference image and the images in the database can be calculated, and finally the third image with the highest matching degree is selected.
[0096] The calculation formula of the matching degree is shown in the following formula (6):
[0097]
[0098] where D(i,j) is the matching degree score between the reference image i and the image j in the database. and They are the feature vectors obtained by converting the reference image i and the image j in the database respectively. The higher the matching degree score, the higher the matching degree.
[0099] After obtaining the first shooting position, the second shooting position, the third shooting position, and the fourth shooting position, the reference shooting position can be calculated according to the weighted algorithm, where the formula of the weighted algorithm is as shown in Formula 7 below:
[0100] P final = arg max(w9P geo + w 10 P poi + w 11 P cluster + w 12 P match ) (7)
[0101] Where P geo is the first shooting position, the second shooting position is P poi , P cluster represents the third shooting position, the fourth shooting position is P match , P final is the reference shooting position. w9, w 10 , w 11 , w 12 are the weight coefficients corresponding to the first shooting position, the second shooting position, the third shooting position, and the fourth shooting position respectively.
[0102] In the above way, the position information from multiple sources can be fused, combined with geographical metadata, location tags, user shooting cluster analysis, and database matching, to comprehensively infer the most accurate reference shooting position.
[0103] S102. Generate navigation information according to the reference shooting position and the current position of the electronic device, and the navigation information is used to guide the user to move from the current position to the reference shooting position.
[0104] In this embodiment, since the user needs to take pictures at the reference shooting position. Therefore, after determining the reference shooting position of the reference image, the current position where the user is currently located can be further determined, and then the current position is set as the starting point and the reference shooting position is set as the ending point to generate navigation information, which can guide the user to move from the current position to the reference shooting position.
[0105] In some embodiments, the generating navigation information according to the reference shooting position and the current position of the electronic device includes:
[0106] Obtain the geographical environment information and the pedestrian flow information in the target area, where the target area is the area between the current position and the reference shooting position;
[0107] Generate the navigation information according to the geographical environment information, the pedestrian flow information, the current position and the reference shooting position.
[0108] In this embodiment, the target area refers to the area where the reference image is taken. This area may include the reference shooting position, the current position, and the surrounding areas. The target area may be a scenic spot park or a specific shooting area. Both the current position where the user is located and the reference shooting position are in the target area.
[0109] The navigation information is the navigation path for the user to reach the reference shooting position from the current position. Therefore, the navigation path can be generated based on the current position where the user is currently located, the reference shooting position, and the geographical environment information and the pedestrian flow information in the target area.
[0110] Among them, the geographical environment information refers to the physical environment information such as the terrain, roads, buildings, and obstacles in the target area, and the pedestrian flow information refers to the tourist density, dynamic pedestrian flow distribution, and congestion degree in the target area. By combining the geographical environment information and the pedestrian flow information, the best navigation path from the current position to the reference shooting position can be calculated.
[0111] Exemplarily, based on the A (A-Star) path planning algorithm, the optimal path for the user to reach the reference shooting position from the current current position can be calculated, while considering the terrain influence and the pedestrian flow information, and dynamically adjusting the navigation path to ensure that the user can reach the reference shooting position efficiently.
[0112] In the A (A-Star) path planning algorithm, the coordinates of the current position can be determined as P u =(lat u , lon u , alt u ), and the coordinates of the reference shooting position are determined as P t =(lat t , lon t , alt t ). Then the starting point in the path planning algorithm is u, the ending point is t, and different nodes n can be gradually expanded as intermediate nodes between the starting point u and the ending point t.
[0113] The shortest path between the current position and the reference shooting position can be evaluated by the following formula (8)
[0114] f(n)=g(n)+h(n) (8)
[0115] Among them, n is an intermediate node, f(n) is the total evaluation cost of node n. g(n) is the actual path cost from the starting point u to the current node n. h(n) is the heuristic estimated value from the current node n to the target node t. Among them, the heuristic estimated value can be calculated using the Euclidean distance, and the calculation formula (9) is:
[0116]
[0117] Among them, h(n) is the heuristic estimated value from the current node n to the target node t, lat t , lon t are the coordinates of point t, lat n , lon n are the coordinates of point n.
[0118] In addition, if the target area is a mountainous area or a ramp area with a height difference, etc., the heuristic estimated value can also be calculated using the Manhattan distance, and the calculation formula (10) of the Manhattan distance is:
[0119] h(n) = |lat t - lat n | + |lon t - lon n | (10)
[0120] Among them, h(n) is the heuristic estimated value from the current node n to the target node t, lat t , lon t are the coordinates of point t, lat n , lon n are the coordinates of point n.
[0121] In addition, the navigation path can be adjusted based on real-time geographical environment information and pedestrian flow information. Specifically, the pedestrian flow density can be calculated by the following formula (11):
[0122]
[0123] Among them, D congestion is the pedestrian flow density, i represents the i-th sub-region in the target area, v i is the number of tourists in sub-region i. d i is the distance from sub-region i to the current location n. If the pedestrian flow density in the sub-regions passed by the planned path is greater than the preset density threshold, the route needs to be re-planned. Among them, the witness threshold can be the product of the average congestion degree multiplied by a preset value, and the preset value can be any constant between 1.5 and 2.5.
[0124] Through the above method, the finally planned path is path:
[0125] Path = A * (P u , P t , geographical environment information, pedestrian flow information)
[0126] In the above solution, geographical environment information and pedestrian flow information can be comprehensively considered, and combined with the current location and the reference shooting location, to generate navigation information. This method can dynamically select a path, facilitating avoidance of crowded areas and unsuitable terrains, thereby improving the efficiency of the user reaching the reference shooting location.
[0127] S130, when the user moves to the reference shooting location, display composition prompt information corresponding to the reference image on the electronic device, where the composition prompt information is used to guide the user to adjust the composition method.
[0128] In this embodiment, when it is detected that the user has come to the reference shooting location, composition prompt information corresponding to the reference image can be further generated and displayed to guide the user to adjust the composition method so as to take a picture in accordance with the composition method of the reference image.
[0129] In some embodiments, before displaying the composition prompt information corresponding to the reference image on the electronic device, the method further includes:
[0130] Determine the reference composition information of the reference image;
[0131] When the user is at the reference shooting location and the electronic device displays a shooting preview interface, generate composition prompt information according to the reference composition information.
[0132] In this embodiment, when it is detected that the electronic device is at the reference shooting location, it indicates that the user has come to the reference shooting location, and if a preview image is displayed on the electronic device, it indicates that the user has opened the shooting interface of the camera application in the electronic device to prepare for taking pictures. Therefore, the reference composition information of the reference image can be determined, and composition prompt information can be generated and displayed based on the reference composition information to guide the user to slightly adjust the shooting angle and position so as to take a high-quality image that the user desires.
[0133] Among them, the reference composition information is the composition feature of the reference image, and the reference composition information may include the target shooting angle, target composition mode, and target shooting parameters of the reference image. For example, the target shooting angle may include a reference pitch angle and a reference yaw angle, the target composition mode may be the rule of thirds, leading line composition, or symmetrical composition, and the target shooting parameters may include focal length, aperture, etc.
[0134] In the above solution, when it is detected that the user is at the reference shooting position and the shooting preview interface is displayed, composition prompt information is automatically generated to ensure that the user can obtain immediate feedback during the shooting process, ensure the achievement of the target composition, improve the composition quality during shooting, and thus improve the shooting quality.
[0135] In some embodiments, the reference composition information includes a reference angle, and the reference angle includes a reference pitch angle and a reference yaw angle. Generating the composition prompt information according to the reference composition information includes:
[0136] Obtain the first position of the target object to be photographed;
[0137] Determine the first pitch angle and the first yaw angle between the electronic device and the target object according to the first position and the reference shooting position;
[0138] The first angle difference obtained by subtracting the first yaw angle from the reference yaw angle;
[0139] The second angle difference obtained by subtracting the first pitch angle from the reference pitch angle;
[0140] Generate first composition prompt information according to at least one of the first angle difference and the second angle difference, wherein the first composition prompt information is used to guide the user to adjust the shooting angle of the electronic device.
[0141] In this embodiment, the shooting angle includes a pitch angle and a yaw angle. The pitch angle represents the angle at which the shooting electronic device tilts up or down, and is used to control the electronic device to align with the target object in the vertical direction; the yaw angle represents the angle at which the electronic device rotates left or right, and is used to control the electronic device to align with the target object in the horizontal direction.
[0142] When the user arrives at the reference shooting position and the user opens the shooting preview interface, the system can detect the first position of the target object to be photographed. Subsequently, the system can obtain the current first pitch angle and first yaw angle of the electronic device, as well as the reference pitch angle and reference yaw angle of the electronic device. Among them, the target object can be the main shooting object that the user wants to photograph, that is, the main shooting object in the reference image. The target object can be a building, a street or a person.
[0143] After obtaining the reference yaw angle, reference pitch angle, first pitch angle, and first yaw angle, it is also possible to determine the first angle difference between the reference yaw angle and the first yaw angle, and the second angle difference between the reference pitch angle and the first pitch angle. Subsequently, first composition prompt information can be generated and displayed according to at least one of the first angle difference and the second angle difference to guide the user to adjust the shooting angle of the electronic device so that the shooting angle of the electronic device conforms to the shooting angle of the reference image.
[0144] Exemplarily, if the first angle difference is greater than 0, the first composition prompt information may instruct the user to control the electronic device to rotate to the right; if the first angle difference is less than 0, the first composition prompt information may instruct the user to control the electronic device to rotate to the left; if the second angle difference is greater than 0, the first composition prompt information may instruct the user to control the electronic device to adjust upward, and if the second angle difference is less than 0, the first composition prompt information may instruct the user to control the electronic device to adjust downward.
[0145] Exemplarily, the reference pitch angle and the reference yaw angle can be calculated by the following formula (12):
[0146]
[0147] where θ pitch is the reference pitch angle, h obj is the height of the target object, h cam is the altitude of the camera position when taking the reference image. d is the horizontal distance between the camera and the target object when taking the reference image. That is, (x obj , y obj ) are the GPS coordinates of the target object. (x cam , y cam ) are the GPS coordinates of the camera when taking the reference image.
[0148] Subsequently, after the electronic device is in the reference shooting position, the GPS coordinates of the reference shooting position can be determined as P t =(lat t , lon t , alt t ), the coordinates of the first position where the target object is located are determined as P o =(lat o , lon o , alt o ), and according to the first position and the reference shooting position, the first pitch angle and the first yaw angle of the electronic device relative to the target object at the current moment can be calculated by formula thirteen:
[0149]
[0150] where θ yaw is the first yaw angle, θ pitch is the first pitch angle, d is the horizontal distance between the electronic device and the target object, and the GPS coordinates of the reference shooting position are P t =(lat t , lon t , alt t ), and the coordinates of the first position where the target object is located are P o=(lat o , lon o , alt o ).
[0151] In the above solution, the yaw angle and pitch angle differences between the electronic device and the target object can be calculated, and composition prompt information can be generated based on the differences to guide the user to adjust the shooting direction of the electronic device in real time, so that it can more accurately align with the target object and meet the composition requirements of the reference image.
[0152] In some embodiments, the reference composition information includes the image reference size of the target object in the reference image, and generating the composition prompt information according to the reference composition information includes:
[0153] Determine the first size of the target object in the shooting preview interface;
[0154] Determine the horizontal distance between the target object and the user according to the reference shooting position and the first position of the target object;
[0155] Generate second composition prompt information according to the first size, the image reference size and the horizontal distance, where the second composition prompt information is used to guide the user to adjust the shooting position of the electronic device.
[0156] In this embodiment, when the user arrives at the reference shooting position, the shooting preview interface of the electronic device can be opened to prepare for taking pictures, and at this time, a preview image will be displayed in the shooting preview interface. Since the reference shooting position is only a rough position, in order to make the captured image better meet the composition requirements of the reference image, the second composition prompt information can be generated and displayed based on the preview image displayed in the shooting preview interface of the electronic device. The second composition prompt information can guide the user to finely adjust the shooting position of the electronic device, so that the captured reference image better meets the shooting requirements.
[0157] Specifically, the image reference size in the target object reference image can be obtained first, and the first size of the target object in the shooting preview interface can be determined.
[0158] After obtaining the first size, the image reference size and the horizontal distance, the first distance can be calculated according to the following formula (14) based on the first size, the image reference size and the horizontal distance:
[0159]
[0160] Where S target is the image reference size, S current is the first size, d is the horizontal distance, d newIf the first distance is greater than the horizontal distance, the second composition prompt information can prompt the user to step back to increase the shooting distance. If the first distance is less than the horizontal distance, the second composition prompt information can prompt the user to step forward to decrease the shooting distance.
[0161] In the embodiments of the present application, the composition prompt information can be dynamically generated by calculating the size of the target object in the current shooting preview interface, combining the size of the target object in the reference image, and the horizontal distance between the user and the target object, so as to guide the user to adjust the shooting position and make the composition ratio of the target object in the preview image match the reference image.
[0162] In some embodiments, the reference composition information includes the reference composition method of the reference image, and generating the composition prompt information according to the reference composition information includes:
[0163] Obtain the reference composition elements corresponding to the reference composition method in the reference image;
[0164] Obtain the initial composition elements in the shooting preview interface;
[0165] Generate the third composition prompt information according to the reference composition elements and the initial composition elements, where the third composition prompt information is used to guide the user to adjust the composition method based on the reference composition method.
[0166] In this embodiment, the composition elements refer to the visual key points or lines that affect the image composition, and are used to guide the placement, proportion, direction, etc. of the object during shooting, so that the picture conforms to the composition rules more. Among them, under different composition methods, there are different composition elements.
[0167] For example, if the composition method is the rule of thirds composition, the rule of thirds composition is to divide the picture into three equal parts horizontally and vertically to form a nine-grid composition method, then the corresponding composition elements are the intersection points of the nine-grid; if the composition method is the leading line composition method, the composition elements are the leading lines; if the composition method is the symmetry axis composition method, then the composition elements are the symmetry axis.
[0168] Therefore, after determining the reference composition method, the reference composition elements in the reference image under this reference composition method can be determined, and the initial composition elements in the shooting preview interface under the reference composition method can also be obtained. Then, the reference composition elements and the initial composition elements are compared. If the deviation between the reference composition elements and the initial composition elements is large, it is necessary to generate and display the third composition prompt information to prompt the user to adjust the shooting position or shooting angle of the electronic device according to the reference composition method, so as to adjust the composition method. If the deviation between the reference composition elements and the initial composition elements is small, the shooting can be directly performed or the user can be prompted to perform the shooting.
[0169] Exemplarily, if the reference composition method is the rule of thirds composition, it is necessary to make the target object in the shooting preview interface fall on the intersection points of the nine-square grid. The intersection points of the nine-square grid include the center point. If the center point in the shooting preview interface is (x current , y current ), and the center point corresponding to the reference composition method is (x target , y target ).
[0170] The horizontal deviation and vertical deviation between the center points can be calculated according to the following formula (15):
[0171]
[0172] Among them, the center point corresponding to the reference composition method is (x target , y target ), the center point in the shooting preview interface is (x current , y current ), Δx is the horizontal deviation between the center points, Δy is the vertical deviation between the center points. If the horizontal deviation is greater than the preset first deviation threshold, the third composition prompt message can be displayed, and this third composition prompt message prompts the user to move the electronic device to the right or adjust the viewfinder; if the horizontal deviation is less than the preset second deviation threshold, the third composition prompt message can be displayed, and this third composition prompt message prompts the user to move the electronic device to the left or adjust the viewfinder; if the vertical deviation is greater than the third deviation threshold, the third composition prompt message can be displayed, and this third composition prompt message prompts the user to lower the shooting angle of the electronic device; if the vertical deviation is less than the fourth deviation threshold, the third composition prompt message can be displayed, and this third composition prompts the user to raise the shooting angle of the electronic device. For example, the first deviation threshold can be any value between 10 and 30, and the second deviation threshold can be the opposite of the first deviation threshold; the third deviation threshold can be any value between 5 and 15, and the fourth deviation threshold can be the opposite of the third deviation threshold.
[0173] For example, if the reference composition method is the guiding line composition, the initial composition element is the first guiding line, and the reference composition element is the target guiding line. The first guiding line can be extracted from the preview image displayed on the shooting preview interface through the Hough Transform, and the first slope of the first guiding line can be calculated, and the target slope of the target guiding line can be determined. The slope difference can be obtained by subtracting the first slope from the target slope. If the slope difference is greater than the first slope threshold, the third composition prompt information can be used to indicate that the user tilts the electronic device to the right for shooting. If the slope difference is less than the second slope threshold, the third composition prompt information can be used to indicate that the user tilts the electronic device to the left for shooting. For example, the first slope threshold can be any constant between 0.017 and 0.087, and the second slope threshold can be the opposite of the first slope threshold. In addition, if the direction of the first guiding line deviates from the direction of the target guiding line, the third composition prompt information can prompt the user to adjust the standing position and change the shooting angle.
[0174] For example, if the reference composition method is the axis of symmetry composition method, the initial composition element is the first axis of symmetry, and the reference composition element is the target axis of symmetry. The first axis of symmetry in the preview image can be determined through the Fourier transform. If the first axis of symmetry deviates to the left relative to the target axis of symmetry, the third composition prompt information can prompt the user to move the shooting electronic device to the left. If the first axis of symmetry deviates to the right relative to the target axis of symmetry, the third composition prompt information can prompt the user to move the electronic device to the right.
[0175] In this embodiment, the reference composition elements in the reference image can be extracted and compared with the initial composition elements in the current shooting preview interface to dynamically generate composition prompt information to guide the user to adjust the shooting angle, position or framing method to make it more in line with the reference composition method. This method can provide accurate composition prompt information to assist the user in reducing composition errors and improving shooting efficiency.
[0176] S104, when the composition deviation between the preview image of the electronic device and the reference image is less than the deviation threshold, a target image is captured.
[0177] In this application, during the process of the user continuously adjusting the electronic device, the system can also calculate the composition deviation between the preview image and the reference image in real time. If it is detected that the composition deviation between the preview image and the reference image is less than the deviation threshold, the content displayed in the preview image can be directly captured, or the content displayed in the preview image can be captured to prompt the user to take a photo.
[0178] Among them, the composition deviation includes the deviation of composition elements, the deviation of shooting angle, and the deviation of shooting parameters. That is to say, only when the composition method, shooting angle, and shooting parameters of the preview image are all relatively close to those of the reference image can the image be taken.
[0179] The shooting parameters can include parameters such as the exposure value, color temperature, and focal length of the image. The target exposure value of the reference image and the first exposure value of the preview image can be obtained, and the exposure value difference obtained by subtracting the target exposure value from the first exposure value can be calculated. If the exposure value difference is greater than the first exposure threshold, it can be considered that the current picture is too bright. Then, the electronic device can automatically reduce the sensitivity or shorten the shutter time to reduce the amount of light entering and prevent overexposure. If the exposure value difference is less than the second exposure threshold, it can be considered that the current picture is too dark, and the sensitivity can be automatically increased or the shutter time can be extended to increase the amount of light entering and prevent underexposure. Among them, the first exposure threshold can be 0 or any positive number, and the second exposure threshold can be 0 or any negative number. In addition, if the deviation of the color temperature is greater than the deviation threshold, the system can automatically adjust the color temperature of the electronic device.
[0180] In the embodiment of the present application, the reference shooting position of the reference image can be determined first, and then navigation information can be generated and displayed according to the current position of the user and the reference shooting position to guide the user to move to the reference shooting position. Then, the composition prompt information corresponding to the reference image is displayed to help the user adjust the composition method of the shooting. When the composition deviation between the preview image and the reference image is lower than the set threshold, the shooting is automatically triggered. In this way, the electronic device can accurately guide the user to the correct shooting position and guide the user to optimize the shooting angle and composition in real time. Compared with the user simply imitating the reference image for manual adjustment, this solution can ensure that the captured image exactly matches the reference image, so as to efficiently capture high-quality images similar to the reference image.
[0181] Figure 2 It is a schematic structural diagram of a shooting device provided by another embodiment of the present application, as Figure 2 shown. The shooting device may include:
[0182] A first determination module 201, configured to determine the reference shooting position of the reference image;
[0183] A first generation module 202, configured to generate navigation information according to the reference shooting position and the current position of the electronic device, where the navigation information is used to guide the user to move from the current position to the reference shooting position;
[0184] A first display module 203, configured to display the composition prompt information corresponding to the reference image on the electronic device when the user moves to the reference shooting position, where the composition prompt information is used to guide the user to adjust the composition method;
[0185] The shooting module 204 is configured to capture a target image when the composition deviation between the preview image and the reference image in the electronic device is less than a deviation threshold.
[0186] In this application, the reference shooting position of the reference image can be determined first, and then navigation information can be generated and displayed based on the user's current position and the reference shooting position to guide the user to move to the reference shooting position. Then, the composition prompt information corresponding to the reference image is displayed to help the user adjust the shooting composition method. When the composition deviation between the preview image and the reference image is lower than the set threshold, shooting is automatically triggered. In this way, the electronic device can accurately guide the user to the correct shooting position and guide the user to optimize the shooting angle and composition in real time. Compared with the user simply imitating the reference image for manual adjustment, this solution can ensure that the captured image exactly matches the reference image, thus efficiently capturing high-quality images similar to the reference image.
[0187] In another optional example, the shooting device includes:
[0188] A first obtaining module, configured to obtain at least one content item having an interaction behavior with the user;
[0189] A second determining module, configured to determine the interaction score of each content item according to the interaction behavior;
[0190] A third determining module, configured to determine the content item with the highest interaction score as the target content item;
[0191] A fourth determining module, configured to determine a reference image according to the target content item.
[0192] In another optional example, the second determining module further includes:
[0193] A first obtaining unit, configured to obtain, for any first content item among the at least one content item, at least one of the number of likes, the number of collections, the number of shares, and the viewing duration of the user for the first content item;
[0194] A first determining unit, configured to determine the interaction score of the first content item according to at least one of the number of likes, the number of collections, the number of shares, and the viewing duration.
[0195] In another optional example, the fourth determining module further includes:
[0196] A second determining unit, configured to determine the number of key points in each video frame in the video when the target content item is a video;
[0197] A third determination unit, configured to determine the video frame with the largest number of key points in the video as the reference image.
[0198] In another optional example, the fourth determination module further includes:
[0199] A fourth determination unit, configured to determine the clarity, complexity, and exposure of each of the first images when the target content entry includes at least one first image;
[0200] A fifth determination unit, configured to determine the image quality of each of the first images according to the clarity, the complexity, and the exposure;
[0201] A sixth determination unit, configured to determine the first image with the highest image quality as the reference image.
[0202] In another optional example, the first determination module 201 further includes:
[0203] A seventh determination unit, configured to determine a first shooting location according to the geographical metadata associated with the reference image;
[0204] An eighth determination unit, configured to determine a second shooting location according to the location label corresponding to the reference image;
[0205] A first calculation unit, configured to obtain a third shooting location by performing clustering calculation on the shooting locations of N second images, where the second images are images associated with the reference image, and N is a positive integer;
[0206] A ninth determination unit, configured to obtain a third image with the highest matching degree with the reference image from a preset database, and determine a fourth shooting location of the third image;
[0207] A tenth determination unit, configured to determine the reference shooting location according to at least one of the first shooting location, the second shooting location, the third shooting location, and the fourth shooting location.
[0208] In another optional example, the first generation module 202 further includes:
[0209] A second acquisition unit, configured to acquire geographical environment information and pedestrian flow information in a target area, where the target area is an area between the current location and the reference shooting location;
[0210] A first generation unit, configured to generate the navigation information according to the geographical environment information, the pedestrian flow information, the current location, and the reference shooting location.
[0211] In another optional example, the photographing device further includes:
[0212] A fifth determination module, configured to determine the reference composition information of the reference image;
[0213] A second generation module, configured to generate composition prompt information according to the reference composition information when the user is at the reference shooting position and the electronic device displays a shooting preview interface.
[0214] In another optional example, the second generation module is specifically configured to:
[0215] Obtain the first position of the target object to be photographed;
[0216] Determine a first pitch angle and a first yaw angle between the electronic device and the target object according to the first position and the reference shooting position;
[0217] A first angle difference obtained by subtracting the first yaw angle from the reference yaw angle;
[0218] A second angle difference obtained by subtracting the first pitch angle from the reference pitch angle;
[0219] Generate first composition prompt information according to at least one of the first angle difference and the second angle difference, where the first composition prompt information is used to guide the user to adjust the shooting angle of the electronic device.
[0220] In another optional example, the second generation module is specifically configured to:
[0221] Determine the first size of the target object in the shooting preview interface;
[0222] Determine the horizontal distance between the target object and the user according to the reference shooting position and the first position of the target object;
[0223] Generate second composition prompt information according to the first size, the image reference size, and the horizontal distance, where the second composition prompt information is used to guide the user to adjust the shooting position of the electronic device.
[0224] In another optional example, the second generation module is specifically configured to:
[0225] Obtain the reference composition elements corresponding to the reference composition method in the reference image;
[0226] Obtain the initial composition elements in the shooting preview interface;
[0227] Generate third composition prompt information according to the reference composition elements and the initial composition elements, where the third composition prompt information is used to guide the user to adjust the composition method based on the reference composition method.
[0228] The photographing device in the embodiments of the present application may be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal or other devices other than terminals. Exemplarily, the electronic device may be a mobile phone, a tablet computer, a laptop computer, a handheld computer, a vehicle-mounted electronic device, a Mobile Internet Device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. It may also be a server, a Network Attached Storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc. The embodiments of the present application do not make specific limitations.
[0229] The photographing device in the embodiments of the present application may be a device with an operating system. The operating system may be an Android operating system, an IOS operating system, or other possible operating systems. The embodiments of the present application do not make specific limitations.
[0230] The photographing device provided by the embodiments of the present application can implement Figure 1 each process implemented by the method embodiments, achieving the same technical effects. To avoid repetition, it will not be elaborated here.
[0231] Optionally, as Figure 3 shown, the embodiments of the present application further provide an electronic device 100, including a processor 101, a memory 102, a program or instruction stored on the memory 102 and executable on the processor 101. When the program or instruction is executed by the processor 101, it implements each process of the above-mentioned photographing method embodiments and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.
[0232] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0233] Please refer toFigure 4 , Figure 4 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. The electronic device 100 includes, but is not limited to: a radio frequency unit 121, a network module 122, an audio output unit 123, an input unit 124, a sensor 125, a display unit 126, a user input unit 127, an interface unit 128, a memory 129, and a processor 120, etc.
[0234] Those skilled in the art can understand that the electronic device 100 may further include a power supply (such as a battery) for supplying power to each component. The power supply can be logically connected to the processor 120 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system. Figure 4 The structure of the electronic device shown does not limit the electronic device. The electronic device may include more or fewer components than shown, or combine some components, or have different component arrangements, which will not be elaborated here.
[0235] Among them, the processor 120 is used to determine the reference shooting position of the reference image;
[0236] The processor 120 is used to generate navigation information according to the reference shooting position and the current position of the electronic device, and the navigation information is used to guide the user to move from the current position to the reference shooting position;
[0237] The display unit 126 is used to display composition prompt information corresponding to the reference image on the electronic device when the user moves to the reference shooting position, and the composition prompt information is used to guide the user to adjust the composition method;
[0238] The processor 120 is used to capture a target image when the composition deviation between the preview image and the reference image in the electronic device is less than a deviation threshold.
[0239] In the present application, the reference shooting position of the reference image can be determined first, and then navigation information is generated and displayed according to the user's current position and the reference shooting position to guide the user to move to the reference shooting position, and then the composition prompt information corresponding to the reference image is displayed to help the user adjust the composition method of shooting. When the composition deviation between the preview image and the reference image is lower than the set threshold, shooting is automatically triggered. In this way, the electronic device can accurately guide the user to the correct shooting position and guide the user to optimize the shooting angle and composition in real time. Compared with the user simply imitating the reference image for manual adjustment, this solution can ensure that the captured image precisely matches the reference image, so as to efficiently capture high-quality images similar to the reference image.
[0240] In another optional example, the processor 120 is further used for:
[0241] Obtain at least one content item that has an interaction behavior with the user;
[0242] Determine the content item with the highest interaction score as the target content item;
[0243] Determine a reference image according to the target content item.
[0244] In another optional example, the processor 120 is further configured to:
[0245] For any first content item among the at least one content item, obtain at least one of the number of likes, the number of collections, the number of shares, and the viewing duration of the user for the first content item;
[0246] Determine the interaction score of the first content item according to at least one of the number of likes, the number of collections, the number of shares, and the viewing duration.
[0247] In another optional example, the processor 120 is further configured to:
[0248] When the target content item is a video, determine the number of key points in each video frame of the video;
[0249] Determine the video frame with the largest number of key points in the video as the reference image.
[0250] In another optional example, the processor 120 is further configured to:
[0251] When the target content item includes at least one first image, determine the image quality of each first image according to the clarity, the complexity, and the exposure;
[0252] Determine the first image with the highest image quality as the reference image.
[0253] In another optional example, the processor 120 is further configured to:
[0254] Determine a first shooting location according to the geographical metadata associated with the reference image;
[0255] Determine a second shooting location according to the location tag corresponding to the reference image;
[0256] Obtain a third shooting location by performing clustering calculation on the shooting locations of N second images, where the second images are images associated with the reference image and N is a positive integer;
[0257] Obtain a third image with the highest matching degree with the reference image from a preset database and determine the fourth shooting location of the third image;
[0258] Determine the reference shooting position according to at least one of the first shooting position, the second shooting position, the third shooting position, and the fourth shooting position.
[0259] In another alternative example, the processor 120 is further configured to:
[0260] Obtain geographical environment information and pedestrian flow information in the target area, where the target area is the area between the current position and the reference shooting position;
[0261] Generate the navigation information according to the geographical environment information, the pedestrian flow information, the current position, and the reference shooting position.
[0262] In another alternative example, the processor 120 is further configured to:
[0263] Determine the reference composition information of the reference image;
[0264] When the user is at the reference shooting position and the electronic device displays a shooting preview interface, generate composition prompt information according to the reference composition information.
[0265] In another alternative example, the processor 120 is specifically configured to:
[0266] Obtain the first position of the target object to be photographed;
[0267] Determine a first pitch angle and a first yaw angle between the electronic device and the target object according to the first position and the reference shooting position;
[0268] A first angle difference obtained by subtracting the first yaw angle from the reference yaw angle;
[0269] A second angle difference obtained by subtracting the first pitch angle from the reference pitch angle;
[0270] Generate first composition prompt information according to at least one of the first angle difference and the second angle difference, where the first composition prompt information is used to guide the user to adjust the shooting angle of the electronic device.
[0271] In another alternative example, the processor 120 is specifically configured to:
[0272] Determine a first size of the target object in the shooting preview interface;
[0273] Determine a horizontal distance between the target object and the user according to the reference shooting position and the first position of the target object;
[0274] Generate second composition prompt information based on the first dimension, the image reference dimension, and the horizontal distance, where the second composition prompt information is used to guide a user to adjust a shooting position of the electronic device.
[0275] In another optional example, the processor 120 is specifically configured to:
[0276] Obtain reference composition elements corresponding to the reference composition method in the reference image;
[0277] Obtain initial composition elements in the shooting preview interface;
[0278] Generate third composition prompt information based on the reference composition elements and the initial composition elements, where the third composition prompt information is used to guide the user to adjust the composition method based on the reference composition method.
[0279] It should be understood that in the embodiments of the present application, the input unit 124 may include a graphics processing unit (GPU) 1241 and a microphone 1242. The graphics processing unit 1241 processes image data of static images or videos obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 126 may include a display panel 1261, and the display panel 1261 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 127 includes at least one of a touch panel 1271 and other input devices 1272. The touch panel 1271 is also referred to as a touch screen. The touch panel 1271 may include two parts: a touch detection device and a touch controller. The other input devices 1272 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be elaborated herein.
[0280] The memory 129 can be used to store software programs and various data. The memory 129 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data. Among them, the first storage area may store an operating system, application programs or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory 129 may include a volatile memory or a non-volatile memory, or the memory 129 may include both a volatile and a non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synch link dynamic random access memory (SLDRAM), and a direct rambus random access memory (DRRAM). The memory 129 in the embodiments of the present application includes but is not limited to these and any other suitable types of memories.
[0281] The processor 120 may include one or more processing units; optionally, the processor 120 integrates an application processor and a modem processor. Among them, the application processor mainly processes operations related to the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor may not be integrated into the processor 120 either.
[0282] The embodiments of the present application also provide a readable storage medium. A program or instruction is stored on the readable storage medium. When the program or instruction is executed by a processor, it implements each process of the above-mentioned shooting method embodiments and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.
[0283] Among them, the processor is the processor in the electronic device in the above-mentioned embodiment. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk, or an optical disc, etc.
[0284] Another embodiment of the present application provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement each process of the above-mentioned embodiment of the shooting method, and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.
[0285] It should be understood that the chip mentioned in the embodiment of the present application may also be referred to as a system-on-chip, a system chip, a chip system, or a system-on-chip, etc.
[0286] The embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement each process of the above-mentioned embodiment of the shooting method, and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.
[0287] It should be noted that in this article, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including that element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in a reverse order according to the functions involved. For example, the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0288] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc), and includes several instructions to enable a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application.
[0289] The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above specific embodiments. The above specific embodiments are merely illustrative rather than restrictive. Under the inspiration of the present application, those of ordinary skill in the art can also make many forms without departing from the gist of the present application and the scope protected by the claims, and all of them fall within the protection scope of the present application.
Claims
1. A shooting method, characterized in that, Including: Determine the reference shooting position of the reference image; Generate navigation information based on the reference shooting position and the current position of the electronic device, where the navigation information is used to guide the user to move from the current position to the reference shooting position; When the user moves to the reference shooting position, display the composition prompt information corresponding to the reference image on the electronic device, where the composition prompt information is used to guide the user to adjust the composition method; When the composition deviation between the preview image and the reference image in the electronic device is less than the deviation threshold, capture the target image.
2. The method according to claim 1, wherein Before determining the reference shooting position of the reference image, the method further includes: Obtain at least one content item that has an interaction behavior with the user; Determine the interaction score of each content item according to the interaction behavior; Determine the content item with the highest interaction score as the target content item; Determine the reference image according to the target content item.
3. The method according to claim 2, wherein The interaction behavior includes at least one of liking, favoriting, sharing, and viewing. Determining the interaction score of each content item according to the interaction behavior includes: For any first content item among the at least one content item, obtain at least one of the number of likes, the number of favorites, the number of shares, and the viewing duration of the user for the first content item; Determine the interaction score of the first content item according to at least one of the number of likes, the number of favorites, the number of shares, and the viewing duration.
4. The method according to claim 2, wherein Determining the reference image according to the target content item includes: When the target content item is a video, determine the number of key points in each video frame of the video; Determine the video frame with the largest number of key points in the video as the reference image.
5. The method according to claim 2, wherein Determining the reference image according to the target content item includes: When the target content item includes at least one first image, determine the clarity, complexity, and exposure of each first image; Determine the image quality of each first image according to the clarity, the complexity, and the exposure; Determine the first image with the highest image quality as the reference image.
6. The method according to claim 1, wherein Determining the reference shooting position of the reference image includes: Determine the first shooting position according to the geographical metadata associated with the reference image; or, Determine the second shooting position according to the location tag corresponding to the reference image; or, Obtain the third shooting position by performing clustering calculation on the shooting positions of N second images, where the second images are images associated with the reference image and N is a positive integer; or, Obtain the third image with the highest matching degree with the reference image from a preset database and determine the fourth shooting position of the third image; Determine the reference shooting position according to at least one of the first shooting position, the second shooting position, the third shooting position, and the fourth shooting position.
7. The method according to claim 1, characterized in that Generating navigation information based on the reference shooting position and the current position of the electronic device includes: Obtain the geographical environment information and the pedestrian flow information in the target area, where the target area is the area between the current position and the reference shooting position; Generate the navigation information based on the geographical environment information, the pedestrian flow information, the current position, and the reference shooting position.
8. The method according to claim 1, wherein Before displaying the composition prompt information corresponding to the reference image on the electronic device, the method further includes: Determine the reference composition information of the reference image; When the user is at the reference shooting position and the electronic device displays a shooting preview interface, generate composition prompt information according to the reference composition information.
9. The method according to claim 8, wherein The reference composition information includes a reference angle, and the reference angle includes a reference pitch angle and a reference yaw angle. Generating the composition prompt information according to the reference composition information includes: Determine the first position of the target object to be photographed; Determine the first pitch angle and the first yaw angle between the electronic device and the target object according to the first position and the reference shooting position; Subtract the first yaw angle from the reference yaw angle to obtain a first angle difference; Subtract the first pitch angle from the reference pitch angle to obtain a second angle difference; Generate first composition prompt information according to at least one of the first angle difference and the second angle difference, where the first composition prompt information is used to guide the user to adjust the shooting angle of the electronic device.
10. The method according to claim 8, wherein The reference composition information includes the image reference size of the target object in the reference image. Generating the composition prompt information according to the reference composition information includes: Determine the first size of the target object in the shooting preview interface; Determine the horizontal distance between the target object and the user according to the reference shooting position and the first position of the target object; Generate second composition prompt information according to the first size, the image reference size, and the horizontal distance, where the second composition prompt information is used to guide the user to adjust the shooting position of the electronic device.
11. The method according to claim 8, wherein The reference composition information includes the reference composition method of the reference image. Generating the composition prompt information according to the reference composition information includes: Obtain the reference composition elements corresponding to the reference composition method in the reference image; Obtain the initial composition elements in the shooting preview interface; Generate third composition prompt information according to the reference composition elements and the initial composition elements, where the third composition prompt information is used to guide the user to adjust the composition method based on the reference composition method.
12. A photographing device, characterized in that, Includes: A first determination module, configured to determine the reference shooting position of the reference image; A first generation module, configured to generate navigation information according to the reference shooting position and the current position of the electronic device, where the navigation information is used to guide the user to move from the current position to the reference shooting position; A first display module, configured to display the composition prompt information corresponding to the reference image on the electronic device when the user moves to the reference shooting position, where the composition prompt information is used to guide the user to adjust the composition method; A shooting module, configured to capture a target image when the composition deviation between the preview image in the electronic device and the reference image is less than a deviation threshold.