Recommendation method and device, electronic equipment, chip and storage medium
By analyzing the composition information of the background image, combining deep learning and user preferences to generate recommendation windows, the problems of low composition recommendation efficiency and unstable effect in the existing technology are solved, and intuitive and convenient photography composition assistance is achieved, which improves user experience and picture quality.
Patent Information
- Application Number
- CN202510579241.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-06
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-05-06
AI Technical Summary
In the field of photography, composition recommendation solutions require the construction of dedicated training data sets, which are not efficient and have unstable effects, making it difficult to meet the personalized needs of ordinary users.
By analyzing the composition information of the background image, a recommendation window matching the composition information is provided, indicating the recommended photography area of the shooting subject in the picture, using deep learning, multi-network fusion and reinforcement learning methods, combined with the user's preference generation scoring mechanism, to achieve intuitive composition assistance.
Even users without photography experience can easily shoot high-quality pictures, which lowers the technical threshold for photography, improves the shooting experience and picture quality, and meets the needs of professional photographers and ordinary users.
Smart Images

Figure CN120378737A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and particularly to a recommendation method, apparatus, electronic device, chip, and storage medium. Background Art
[0002] In the context of the rapid development of digitalization and intelligence, photography and related technologies have undergone earth-shaking changes. With the widespread popularity of electronic devices such as smartphones and digital cameras, photography has become an indispensable part of people's daily lives. Whether it is capturing beautiful moments in life or expressing personal creativity through visual content, users are eager to be able to easily take professional-level photos. For this reason, the composition recommendation technology has emerged. It provides composition suggestions for aesthetic optimization by intelligently analyzing the captured image, helping users easily achieve high-quality photography effects. Summary of the Invention
[0003] This application aims to solve at least one of the technical problems in the related technologies to some extent.
[0004] To this end, this application proposes a recommendation method, apparatus, electronic device, chip, and storage medium to intuitively indicate the recommended photography area of the shooting subject in the captured image, making the composition process more intuitive and convenient. Even users without photography experience can easily take high-quality images with the help of this function, greatly enhancing the user's shooting experience.
[0005] An embodiment of one aspect of this application proposes a recommendation method, including:
[0006] Responding to a shooting operation, obtaining the captured image; wherein, the image includes a background image;
[0007] According to the composition information of the background image, displaying a recommendation window in the image; wherein, the recommendation window is used to indicate the recommended photography area of the shooting subject in the image.
[0008] An embodiment of another aspect of this application proposes a recommendation apparatus, including:
[0009] An acquisition module, configured to respond to a shooting operation and obtain the captured image; wherein, the image includes a background image;
[0010] A display module, configured to display a recommendation window in the image according to the composition information of the background image; wherein, the recommendation window is used to indicate the recommended photography area of the shooting subject in the image.
[0011] In another aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the recommendation method described in the foregoing aspect is implemented.
[0012] In yet another aspect, an embodiment of the present application provides a chip, which includes an interface circuit and a processing circuit coupled to each other. The interface circuit is used for inputting or outputting signals, and the processing circuit is configured to execute the recommendation method described in the foregoing aspect.
[0013] In still another aspect, an embodiment of the present application provides a non-transitory computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the recommendation method described in the foregoing aspect is implemented.
[0014] In yet another aspect, an embodiment of the present application provides a computer program product, on which a computer program is stored. When the program is executed by a processor, the recommendation method described in the foregoing aspect is implemented.
[0015] The recommendation method, device, electronic device, chip, and storage medium provided by the present application analyze the composition information of the background image and provide a recommended window that matches the composition information to intuitively indicate the recommended photography area of the shooting subject in the captured image, making the composition process more intuitive and convenient. Even users without photography experience can easily capture high-quality images with the help of this function, greatly enhancing the user's shooting experience. At the same time, the method has wide applicability, which can not only meet the needs of professional photographers for efficient composition but also help ordinary users get started quickly, reducing the technical threshold of photography, reducing the time and difficulty of manual adjustment by users, and effectively improving the overall quality and aesthetic feeling of the captured image.
[0016] Some of the additional aspects and advantages of the present application will be given in the following description, some will become apparent from the following description, or will be understood through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above and / or additional aspects and advantages of the present application will become apparent and easier to understand from the following description of the embodiments in conjunction with the drawings, where:
[0018] Figure 1 is a schematic flowchart of the first recommendation method provided by the embodiment of the present application;
[0019] Figure 2 is a schematic flowchart of the second recommendation method provided by the embodiment of the present application;
[0020] Figure 3 is a schematic flowchart of the third recommendation method provided by the embodiment of the present application;
[0021] Figure 4 It is a schematic flowchart of the fourth recommendation method provided by the embodiments of the present application;
[0022] Figure 5 It is a schematic diagram of the implementation principle of any embodiment of the present application;
[0023] Figure 6 It is a schematic structural diagram of a recommendation device provided by the embodiments of the present application;
[0024] Figure 7 It is a schematic structural diagram of an electronic device provided by the embodiments of the present application;
[0025] Figure 8 It is a schematic structural diagram of a chip proposed by the embodiments of the present application. Specific embodiments
[0026] The embodiments of the present application will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to explain the present application and should not be construed as limiting the present application.
[0027] For ease of understanding, the terms related to the present application will be introduced first.
[0028] 1. Composition recommendation technology
[0029] Composition recommendation technology is a technology that uses advanced technologies such as computer vision, artificial intelligence, and machine learning to help users optimize the layout of the shooting screen. It provides aesthetically optimized composition suggestions through intelligent analysis of the shooting scene.
[0030] Among them, composition recommendation technology mainly includes the following:
[0031] (1) Deep learning method: In the field of composition recommendation, deep learning models such as the View Proposal Network (VPN for short) have been widely used. Such models can be trained using a large amount of image data, quickly generate and score candidate composition schemes, and exhibit excellent real-time performance.
[0032] (2) Multi-network fusion method: Some cutting-edge research attempts to combine the salient object detection network with the aesthetic evaluation network to optimize the composition recommendation process. First, the key regions (or salient object regions) in the image are identified by the salient object detection network, and the position of the cropping box is initially determined. Subsequently, a series of candidate cropping boxes are generated with various sizes and ratios around the cropping box. Finally, the aesthetic evaluation network scores these candidate cropping boxes, and the option with the highest score is selected as the ideal cropping box for the final output; among them, the ideal cropping box is used to indicate the best composition scheme in the image. This method not only greatly improves the efficiency of obtaining the ideal cropping box but also enhances the overall composition quality.
[0033] (3) Reinforcement learning method: Reinforcement learning can be introduced into the field of composition recommendation to search for the best cropping box more efficiently. Compared with traditional methods, reinforcement learning can reduce the number of candidate cropping boxes and shorten the running time, thereby more accurately locating the position of the best cropping box. This strategy not only improves the accuracy of composition recommendation but also significantly improves the processing speed, providing a smoother service experience for users.
[0034] 2. User preferences
[0035] Composition is a highly subjective task, and different users have their own unique aesthetic standards and composition preferences. For example, relevant experiments show that even when faced with the same image, the preferred composition methods chosen by different users may vary greatly. Therefore, how to incorporate users' personalized preferences into the composition recommendation algorithm has become an important research direction in this field.
[0036] In related technologies, methods such as retraining and fine-tuning are used to enable the model to learn and adapt to user preferences. However, this method faces challenges such as insufficient data volume, resulting in certain difficulties in practical applications. To solve these problems, some cutting-edge research has proposed a new solution, that is, introducing a dedicated module to generate a scoring mechanism for user preferences. Through this scoring mechanism, the system can dynamically adjust the composition recommendation results according to the user's personal preferences, thereby more accurately meeting the user's personalized needs.
[0037] 3. Application fields of composition recommendation technology
[0038] The application fields of composition recommendation technology mainly include the following fields:
[0039] Photography field: The application of composition recommendation technology in the photography field has evolved from the initial post - production composition adjustment of photos to real - time composition recommendation before shooting. This progress not only helps non - professional users better master photography composition skills but also significantly improves the shooting effect. Through an intuitive user interface (UI for short) and diverse functions, the composition recommendation technology seamlessly integrates into photography practice, providing users with convenient and efficient composition assistance. Whether recording wonderful moments in life or creating artistic works, users can easily achieve professional - level composition effects with the help of this technology.
[0040] Graphic design and UI design fields: In the fields of graphic design and UI design, the composition recommendation technology also demonstrates its great application potential. It can help designers layout pages and arrange elements more efficiently, thereby enhancing the overall aesthetic feeling and information transmission effect of design works. For example, the system can recommend the best composition methods and element combinations according to different design themes and user requirements. This intelligent design assistance tool not only accelerates the design process but also ensures that the final work can precisely meet the aesthetic preferences and functional requirements of the target audience.
[0041] In related technologies, in the photography field, the following scheme is mainly adopted to recommend the best shooting point (or the best standing position) to users: Using the relative position relationship between people and scenery in sample images, learning positive rules, and analyzing where people should stand in the shooting scene; Defining anti - rules based on empirical composition rules to determine the areas in the shooting scene where it is not suitable for people to stand; Obtaining the total standing score for each person according to the positive rule score and the anti - rule score, and performing an optimal standing position search for the shooting scene based on this; Finally, marking a human - shaped icon in the shooting frame to indicate the best standing position for the portrait and recommending it to the user.
[0042] However, this scheme requires constructing a dedicated training data set and supplementing many examples of empirical composition, resulting in low efficiency and unstable effects of the scheme.
[0043] Therefore, in view of at least one of the problems existing in the above - mentioned related technologies, this application proposes a recommendation method, device, electronic device, chip, and storage medium.
[0044] The following describes the recommendation method, device, electronic device, chip, and storage medium of the embodiments of this application with reference to the accompanying drawings. Before specifically describing the embodiments of this application, for the convenience of understanding, first, introduce common technical terms:
[0045] 1. The rule of thirds: Divide the picture horizontally and vertically into three equal parts to form a nine - grid, and place the shooting subject at the intersection points or on the dividing lines of the four dividing lines.
[0046] Features of the rule of thirds: 1) Balance and dynamics: Avoid the dullness caused by placing the subject in the center of the shot and increase the dynamism of the frame; 2) Visual guidance: It conforms to human visual habits and naturally attracts the audience's attention; 3) Flexibility: Applicable to various shooting scenarios, such as landscapes, portraits, architecture, etc.
[0047] Example: When shooting a landscape, place the horizon at the upper or lower third, rather than in the center of the frame.
[0048] 2. The rule of the nine-grid composition (the rule of the well grid): Similar to the rule of thirds, use the nine-grid to divide the frame and place the subject at the intersection points or on the lines.
[0049] Features of the rule of the nine-grid composition: 1) Emphasize the offset of the subject, enhancing the dynamism and sense of hierarchy of the frame; 2) Applicable to scenarios such as portraits, animals, architecture, etc. that require highlighting the subject but avoiding dullness.
[0050] Example: When shooting landscapes, such as vast grasslands, magnificent mountains, peaceful lakes, etc., the rule of thirds and the rule of the nine-grid composition are commonly used. Elements such as the horizon can be placed on the third lines or the intersection points of the nine-grid, making the frame more hierarchical and balanced, enabling the audience's line of sight to flow naturally in the frame and better appreciate the overall view and details of the landscape.
[0051] 3. The symmetric composition method: Place the subject in the center of the frame to form a symmetric or stable visual effect.
[0052] Features of the symmetric composition method: 1) Emphasize the subject: Directly highlight the core element of the frame; 2) Sense of stability: Applicable to scenarios that need to show solemnity and solemnity.
[0053] Example: Shoot symmetric buildings (such as churches, palaces) or frames that need to emphasize the center point (such as product advertisements). Or, when shooting people, symmetric composition can highlight the human subject. Placing the person in the center of the frame can clearly show the person's expression and posture.
[0054] 4. The diagonal composition method: Arrange the subject or the main line along the diagonal of the frame to form a dynamic visual effect.
[0055] Features of the diagonal composition method: 1) Dynamism and tension: The diagonal direction has a guiding nature, enhancing the vitality of the frame; 2) Sense of extension: Stretch the frame space to create a visual effect of depth or vastness; 3) Application scenarios: roads, bridges, rivers, human dynamics, etc.
[0056] Example: In the case of shooting a winding road or a slanted building, the diagonal line can be used to guide the viewer's line of sight. Or, when shooting a person and wanting to create a lively and dynamic atmosphere, the diagonal composition can be used, aligning the person's body or the direction of their gaze with the diagonal line to increase the tension and sense of extension in the frame.
[0057] 5. Leading line composition method: Use the lines in the frame (such as roads, rivers, railings, etc.) to guide the viewer's line of sight to the shooting subject.
[0058] Characteristics of the leading line composition method: 1) Visual guidance: Naturally direct the viewer's attention to the key point of the frame; 2) Enhance depth: Increase the sense of depth in the frame through the sense of extension of the line; 3) Diversity: The lines can be straight lines, curves, converging lines, etc.
[0059] Example: In the case of shooting a city street, use the road as a leading line to direct the viewer's line of sight to the building in the distance. Or, when shooting sports events, dance performances and other sports scenes, the leading line composition can be used, using the lines of the runway, stage, etc. as leading lines to direct the viewer's line of sight to the shooting subject in motion, making the frame more dynamic and coherent, and better capturing the moment of the movement and the wonderful performances of the athletes.
[0060] Figure 1 It is a flowchart of the first recommended method provided by the embodiments of the present application.
[0061] It should be noted that the recommended method of the embodiments of the present application can be applied to a recommendation device. In some possible embodiments, the recommendation device can be configured in an electronic device or a chip so that the electronic device or the chip can perform the recommendation function. Additionally, in some possible embodiments, the recommendation device can also be software in the electronic device, etc.
[0062] In any embodiment of the present application, the chip can be integrated into an electronic device. The chip includes, among others, a Central Processing Unit (CPU), an Image Signal Processing (ISP), an Application-Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Field-Programmable Gate Array (FPGA), a System On A Chip (SOC), a Reduced Instruction Set Computer (RISC), etc., which are not listed one by one here.
[0063] Among them, the electronic device includes, but is not limited to, a terminal, a shooting device (such as a digital camera), etc. A terminal is an entity on the user side for receiving or transmitting signals, such as a mobile phone. A terminal can also be referred to as a terminal device, a user equipment (UE), a mobile station (MS), a mobile terminal (MT), etc. The terminal can be a car with communication functions, a smart car, a mobile phone, a wearable device, a tablet (Pad), a computer with wireless transceiver functions, a virtual reality (VR) terminal, an augmented reality (AR) terminal, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, and so on. Embodiments of the present application do not limit the specific technologies and specific device forms adopted by the terminal.
[0064] As Figure 1 shown, the recommendation method may include the following steps S101 to S102:
[0065] Step S101: In response to a shooting operation, obtain the captured picture; wherein, the picture includes a background image.
[0066] Wherein, the shooting operation includes a preview operation, a photo-taking operation, and a video-recording operation.
[0067] Wherein, the picture is a picture captured or shot by a camera, including but not limited to: a photo-taking preview picture, a video-recording picture. Wherein, the camera includes but not limited to: a front camera, a rear camera.
[0068] Wherein, the picture includes a background image, and the background image refers to the part of the picture captured by the camera except the main shooting subject or the foreground subject during the shooting operation. Simply put, the background image is the part of the picture behind the shooting subject that provides environmental information for the entire shooting scene.
[0069] Wherein, the shooting subject includes but not limited to: people, animals, scenery, etc.
[0070] Wherein, the background image can contain various visual elements, such as natural or man-made scenery like buildings, landscapes, the sky, etc. These visual elements together constitute the environment or situation where the shooting subject is located. The background image not only provides visual richness and a sense of hierarchy but also helps tell a story about the shooting subject or create a certain mood and atmosphere.
[0071] In the embodiments of the present application, when a trigger operation triggered by a user is detected, the picture captured by the camera can be obtained. Wherein, the picture includes a background image.
[0072] Exemplarily, based on a target detection algorithm or an object recognition algorithm, each object image in the picture can be recognized. Wherein, each object image belongs to a candidate object, and the distance between the candidate object to which each object image belongs and the camera is obtained. According to the distances of the respective candidate objects, the background object (or the background object) is detected from the respective candidate objects, so that the object image corresponding to the background object can be used as the background image. Wherein, the distance of the background object is greater than the object distance parameter associated with the camera.
[0073] It should be noted that the present application does not limit the manner of obtaining the distance between the candidate object and the camera. For example, the distance between the candidate object and the camera can be calculated based on the phase difference technology, or alternatively, the distance between the candidate object and the camera can also be detected based on a structured light sensor, a Time of Flight (ToF) sensor, a Light Detection and Ranging (Lidar) sensor, etc. The embodiments of the present application do not limit this.
[0074] Step S102: Display a recommendation window on the screen according to the composition information of the background image; wherein, the recommendation window is used to indicate the recommended photography area of the subject in the screen.
[0075] Among them, the composition information is used to indicate the composition method of the background image. The composition methods include symmetric composition (centered composition) and asymmetric composition. The asymmetric composition includes, but is not limited to: the rule of thirds, the tic-tac-toe composition, the diagonal composition, and the leading line composition.
[0076] In the embodiments of the present application, the composition information of the background image can be recognized, and a recommendation window matching the composition information is displayed on the screen. The recommendation window is used to indicate the recommended photography area of the subject in the entire screen. Exemplarily, the recommended photography area may include an ideal photography area and an optimal photography area.
[0077] The recommendation method of the embodiments of the present application analyzes the composition information of the background image and provides a recommendation window matching the composition information to intuitively indicate the recommended photography area of the subject in the captured screen, making the composition process more intuitive and convenient. Even users without photography experience can easily capture high-quality images with the help of this function, greatly enhancing the user's shooting experience. At the same time, this method has wide applicability. It can not only meet the needs of professional photographers for efficient composition but also help ordinary users get started quickly, reducing the technical threshold of photography, reducing the time and difficulty of manual adjustment by users, and effectively improving the overall quality and beauty of the captured images.
[0078] The embodiments of the present application provide another recommendation method. Figure 2 It is a schematic flowchart of the second recommendation method provided by the embodiments of the present application.
[0079] It should be noted that this recommendation method can be executed alone, or it can be executed in combination with any one of the embodiments in the present application or possible implementation manners in the embodiments, or it can also be executed in combination with any one of the technical solutions in the related art. The embodiments of the present application do not limit this.
[0080] As Figure 2 shown, this recommendation method may include the following steps S201 to S203:
[0081] Step S201: Respond to the shooting operation and obtain the captured screen; wherein, the screen includes a background image.
[0082] It should be noted that the explanation of step S201 can refer to the relevant description in any one of the embodiments of the present application and will not be elaborated here.
[0083] Step S202: Determine a recommended shooting point that matches the composition information from the picture according to the composition information of the background image.
[0084] Among them, the composition information is used to indicate the composition method of the background image. The composition methods include symmetric composition (centered composition) and asymmetric composition. The asymmetric composition includes, but is not limited to: the rule of thirds, the tic-tac-toe grid composition, the diagonal composition, and the leading line composition.
[0085] Among them, the recommended shooting point is used to indicate the recommended photography position of the shooting subject in the picture. Exemplarily, the recommended photography position may include the best shooting position (or the best photography position, the ideal photography position). Taking the shooting subject as a person as an example, the recommended shooting point may also be referred to as the recommended standing position, the best standing position, or the ideal standing position.
[0086] In the embodiment of the present application, the composition information of the background image can be recognized, and according to this composition information, a recommended shooting point that matches this composition information can be determined from the taken picture.
[0087] In any embodiment of the present application, when the composition information indicates that the composition method of the background image is symmetric composition, a recommended shooting point that matches this symmetric composition can be determined from the taken picture based on the symmetric composition strategy.
[0088] As an example, a recommended shooting point that matches the symmetric composition can be determined according to the center point of the picture. For example, the center point of the picture can be used as the recommended shooting point that matches the symmetric composition.
[0089] It can be understood that the symmetric composition is a very stable and attractive composition method. Using the center point of the picture as the recommended shooting point can place the shooting subject at the center of the picture, which can not only highlight the shooting subject, reduce unnecessary interference elements, make the viewer's attention more concentrated on the shooting subject, but also strengthen this sense of balance and stability (that is, enhance visual balance), making the entire picture look more harmonious and improving the aesthetic effect.
[0090] In any embodiment of the present application, when the composition information indicates that the composition method of the background image is asymmetric composition, a recommended shooting point that matches this asymmetric composition can be determined from the taken picture based on the asymmetric composition strategy.
[0091] In summary, it is possible to calculate the recommended shooting point targeted based on the composition information of the background image, improving the rationality and reliability of the calculation result.
[0092] Step S203: Display a recommended window in the picture according to the recommended shooting point; the recommended window is used to indicate the recommended photography area of the shooting subject in the picture.
[0093] In an embodiment of the present application, a recommendation window can be displayed in the picture according to the recommended shooting point. Exemplarily, the recommended shooting point can be used as the center point of the recommendation window, which is denoted as the window center in the present application.
[0094] As an example, the recommended shooting point can be used as the window center of the recommendation window, and the size of the recommendation window can be determined according to the set ratio and the size of the picture. Thus, the recommendation window can be displayed in the picture according to the window center and size of the recommendation window.
[0095] Among them, the set ratio is a preset ratio, and its value is, for example, 0.01. Exemplarily, the set ratio can be a ratio actively set by the user based on personalized needs, or it can also be a default ratio built into the electronic device (such as the factory preset value or the intelligent recommendation value). The embodiments of the present application do not limit this.
[0096] Exemplarily, mark the width in the size of the picture as w, the height as h, the set ratio as r, and the position of the recommended shooting point in the picture as (x*, y*). The position of the recommendation window can be: (x* + / - [0, r*w], y* + / - [0, r*h]).
[0097] Among them, the above position can be the coordinate position in the image coordinate system or the pixel coordinate system. The embodiments of the present application do not limit this.
[0098] In summary, by combining the actual position of the recommended shooting point and the size of the picture to determine the position of the recommendation window, the recommendation window not only provides a center point but also gives a specific area range, enabling the user to more accurately place the shooting subject at the ideal photography position, thereby improving the accuracy of composition. For example, when the shooting subject is not within the recommendation window, the user can quickly adjust the shooting angle or the actual position of the shooting subject according to the boundary of the recommendation window to ensure that the finally captured picture meets the expected composition requirements.
[0099] The recommendation method of the embodiments of the present application can significantly reduce the time and difficulty of manual adjustment by analyzing the composition information of the background image and providing a recommended shooting point (such as the best shooting point) that matches the composition information. At the same time, it can effectively improve the overall quality and beauty of the captured picture. Displaying the recommendation window according to the recommended shooting point intuitively indicates the recommended photography area of the shooting subject in the picture, making the composition process more intuitive and convenient. Even users without photography experience can easily capture high-quality pictures with the help of this function, greatly enhancing the user's shooting experience. At the same time, this method has wide applicability, not only meeting the needs of professional photographers for efficient composition but also helping ordinary users get started quickly and lowering the technical threshold of photography.
[0100] Another recommendation method is provided in an embodiment of the present application. Figure 3 It is a schematic flowchart of the third recommendation method provided in an embodiment of the present application.
[0101] It should be noted that this recommendation method can be executed alone, or it can be executed in combination with any one of the embodiments in the present application or possible implementation manners in the embodiments, or it can also be executed in combination with any one of the technical solutions in the related art. The embodiments of the present application do not limit this.
[0102] As Figure 3 shown, this recommendation method may include the following steps S301 to S307:
[0103] Step S301, in response to a shooting operation, obtain the captured picture; wherein, the picture includes a background image.
[0104] It should be noted that for the explanation of step S301, reference can be made to the relevant descriptions in any embodiment of the present application, and details are not described herein again.
[0105] Step S302, according to the composition information of the background image, determine whether the background image is a symmetric composition. If so, execute step S303; if not, execute steps S304 to S306.
[0106] It should be noted that the explanation of the composition information in the foregoing embodiments also applies to this embodiment, and details are not described herein again.
[0107] It should also be noted that step S303 and steps S304 to S306 are two parallel implementation manners and can be selected for execution.
[0108] Step S303, according to the center point of the picture, determine a recommended shooting point that matches the symmetric composition.
[0109] Among them, the recommended shooting point is used to indicate the recommended photography position (the best photography position or the ideal photography position) of the shooting subject in the picture. Taking the shooting subject as a person as an example, the recommended shooting point can also be called the recommended standing position, the best standing position, or the ideal standing position.
[0110] In an embodiment of the present application, when the composition information indicates that the composition method of the background image is a symmetric composition, a recommended shooting point that matches the symmetric composition can be determined according to the center point of the picture. Exemplarily, the center point of the picture can be used as the recommended shooting point.
[0111] Step S304, detect a target vertical line and a significant target area from the background image; wherein, the significant degree of the picture content in the significant target area is higher than that of the picture content in other areas.
[0112] Among them, the target vertical line includes the most prominent vertical line in the background image, that is, the target vertical line can be the vertical line with the highest importance level in the background image.
[0113] Among them, the saliency region includes the most prominent target region in the background image, that is, the saliency level of the content in the saliency region is higher than that of the content in other regions of the background image. Among them, other regions refer to the remaining regions of the background image except the saliency region.
[0114] In the embodiment of the present application, when the composition information indicates that the composition method of the background image is an asymmetric composition, the target vertical line can be detected from the background image. Exemplarily, methods such as edge detection algorithms, Hough Transform, and Line Segment Detector (abbreviated as LSD) can be used to detect the target vertical line from the background image.
[0115] In the embodiment of the present application, when the composition information indicates that the composition method of the background image is an asymmetric composition, the saliency region can also be detected from the background image. Exemplarily, the saliency region can be detected from the background image based on an attention detection mechanism.
[0116] Step S305, determine a preselected shooting point from multiple visual interest points according to the first distance between the multiple visual interest points in the picture and the target vertical line, and the second distance between the multiple visual interest points and the saliency region.
[0117] Among them, Visual Interest Points, also known as visual foci or visual attention points, refer to the positions in the picture that most attract the audience's attention. Visual interest points can guide the audience's line of sight and make it focus on the key visual elements in the picture.
[0118] Exemplarily, the visual interest points can include multiple visual interest points that match the asymmetric composition strategy associated with the shooting subject. Among them, the asymmetric composition strategy includes but is not limited to: the rule of thirds composition strategy, the tic-tac-toe composition strategy, etc.
[0119] Among them, when the shooting subject is different, the asymmetric composition strategy can be the same or different, and the present application does not limit this. Taking the shooting subject as a person as an example, the asymmetric composition strategy can include the rule of thirds composition strategy, and the visual interest points include the four intersection points (golden ratio positions) of the rule of thirds composition method, that is, the rule of thirds composition method divides the picture into three equal parts by two horizontal and vertical lines, forming nine regions, and the four lines intersect to generate four visual interest points.
[0120] Thus, the position in the picture that attracts the most attention can be used as the visual interest point, which can quickly attract the audience's attention, focus on the core visual elements, and avoid information overload.
[0121] In the embodiment of the present application, based on the distance calculation algorithm, the distances between multiple visual interest points in the picture and the target vertical line can be calculated respectively. In the present application, it is denoted as the first distance, and the distances between multiple visual interest points and the center point of the significant target area can be calculated respectively. In the present application, it is denoted as the second distance. Then, according to the first distance and the second distance, a preselected shooting point can be determined from multiple visual interest points.
[0122] Exemplarily, the second distance between the preselected shooting point and the significant target area is relatively small, and the first distance between the preselected shooting point and the target vertical line is relatively large.
[0123] Step S306, determine a recommended shooting point that matches the asymmetric composition from the picture according to the preselected shooting point.
[0124] Among them, the recommended shooting point is used to indicate the recommended photography position of the shooting subject in the picture.
[0125] In the embodiment of the present application, a recommended shooting point that matches the asymmetric composition can be determined from the picture according to the preselected shooting point.
[0126] As an example, the recommended shooting point can be directly determined according to the preselected shooting point. Exemplarily, the preselected shooting point can be used as the recommended shooting point.
[0127] As another example, the recommended shooting point can be indirectly determined according to the preselected shooting point. Exemplarily, according to the preselected shooting point, the neighborhood of the preselected shooting point can be determined from the picture, and a recommended shooting point that matches the asymmetric composition can be randomly selected from this neighborhood.
[0128] It should be noted that the human eye visual system has a natural tolerance threshold for the perception of object size, angular offset, and light and shadow changes (for example, fluctuations of horizontal viewing angle ±15° and light and shadow intensity ±20% can be imperceptibly accepted). The tiny displacement points within the neighborhood of the preselected shooting point can generate pictures with similar vision but stronger tension. Based on this characteristic, randomly selecting a recommended shooting point from the neighborhood of the preselected shooting point has at least the following advantages: dynamic environment adaptive enhancement, using the redundancy of the neighborhood to quickly respond to sudden changes in light (such as cloud movement and cloud occlusion resulting in a sudden drop in light intensity), dynamic offset of the shooting subject (such as random movement of people), or physical occlusion (such as crowd interference and sudden increase in crowd density), significantly reducing the reshoot rate; creative uniqueness, by introducing controllable randomness around the preselected shooting point, unexpected compositions or hidden composition opportunities can be captured (such as a picture within a picture formed by foreground reflection and contour halos caused by side backlighting), enhancing the artistic expressiveness of the captured picture.
[0129] Step S307, displaying a recommendation window in the picture according to the recommended shooting point; wherein the recommendation window is used to indicate the recommended shooting area of the shooting subject in the picture.
[0130] It should be noted that the explanation of step S307 can be found in the relevant description in any embodiment of the present application and will not be repeated here.
[0131] The recommended method of the embodiment of the present application, for background images with asymmetrical composition, extracts target vertical lines (as structured visual guide axes, such as inclined building outlines, extension lines of dynamic human limbs) and salient target areas (as content focus anchors, such as faces and high-contrast markers), and determines pre-selected shooting points based on the geometric correlation between visual interest points and the extracted elements (i.e., the alignment of the first distance-constrained interest points with the target vertical lines, and the focusing degree of the second distance-constrained interest points with the salient target areas). This can achieve automation of visual balance (while retaining the conflicting tension of the asymmetrical composition, reducing the audience's perception of imbalance through geometric constraints) and precise control of attention guidance, thereby improving the efficiency of guiding the audience's attention.
[0132] The present application embodiment provides another recommended method. Figure 4 A flowchart of the fourth recommended method provided in the embodiment of the present application.
[0133] It should be noted that the recommended method can be executed alone, or it can be executed in combination with any embodiment of the present application or a possible implementation method in the embodiment, or it can be executed in combination with any technical solution in the relevant technology, and the embodiments of the present application are not limited to this.
[0134] like Figure 4 As shown, the recommendation method may include the following steps S401 to S407:
[0135] Step S401, in response to a shooting operation, obtaining a shot picture; wherein the picture includes a background image.
[0136] It should be noted that the explanation of step S401 can be found in the relevant description in any embodiment of the present application and will not be repeated here.
[0137] Step S402 : in response to the composition information indicating that the background image has an asymmetric composition, detecting a target vertical line from the background image.
[0138] The target vertical line includes the most important vertical line in the background image, that is, the target vertical line may be the most important vertical line in the background image.
[0139] In the embodiments of the present application, when the composition information indicates that the composition method of the background image is an asymmetric composition, the target vertical line can be detected from the background image. Exemplarily, methods such as edge detection algorithms, Hough Transform, and Line Segment Detector (abbreviated as LSD) can be used to detect the target vertical line from the background image.
[0140] In any one of the embodiments of the present application, the target vertical line can be detected by the following steps A to C:
[0141] Step A: Extract at least one candidate vertical line from the background image.
[0142] Exemplarily, methods such as edge detection algorithms, Hough Transform, and Line Segment Detector (abbreviated as LSD) can be used to extract all vertical lines from the background image as candidate vertical lines.
[0143] Step B: Determine the importance of each candidate vertical line in the background image according to the shooting scene to which the background image belongs and / or the attribute information of each candidate vertical line.
[0144] Among them, the shooting scene includes but is not limited to: building scenes, landscape scenes, etc.
[0145] Among them, the attribute information includes but is not limited to: length, position, contrast, clarity, etc.
[0146] Exemplarily, first, the importance of each attribute for the shooting scene can be determined according to the shooting scene to which the background image belongs. Then, according to each attribute and the corresponding importance, the significance score of each candidate vertical line can be calculated. For example, for any candidate vertical line, different weights can be assigned according to the importance of different attributes, and according to the weights of different attributes, different attributes of the candidate vertical line can be weighted and scored to obtain the significance score of the candidate vertical line. Finally, according to the significance score of each candidate vertical line, the importance of the candidate vertical line in the background image can be determined.
[0147] Among them, the importance is positively correlated with the significance score, that is, the higher the significance score, the higher the importance.
[0148] For example, in a building scene, a long vertical line located in the center of the picture may have a higher importance, while in landscape photography, a clear and high-contrast vertical line has a higher importance.
[0149] Step C: Determine the target vertical line from each candidate vertical line based on the importance of each candidate vertical line.
[0150] Exemplarily, the candidate vertical line with the highest importance level can be used as the target vertical line.
[0151] In summary, it can not only effectively identify the key vertical lines in the background image, but also ensure that the selected vertical lines best meet the composition requirements and aesthetic standards in a specific shooting scenario, improving the user's shooting experience.
[0152] Step S403: Detect the salient target area from the background image.
[0153] Among them, the salient target area (saliency) includes the most salient target area in the background image, that is, the saliency level of the picture content in the salient target area is higher than that of the picture content in other areas. Among them, other areas refer to the remaining areas in the background image except the salient target area.
[0154] In the embodiment of the present application, when the composition information indicates that the composition method of the background image is an asymmetric composition, the salient target area can also be detected from the background image. Exemplarily, the salient target area can be detected from the background image based on an attention detection mechanism.
[0155] In any embodiment of the present application, the salient target area (saliency) can be detected by the following steps D to F:
[0156] Step D: Based on the attention mechanism, extract features from the background image to obtain multi-scale features, and fuse the multi-scale features to obtain a fused feature map.
[0157] Among them, the multi-scale features include but are not limited to: low-level features (underlying visual features) and high-level features (high-level semantic features).
[0158] Exemplarily, first, the background image can be processed to extract low-level features (such as color, brightness contrast, edge information, etc.) and high-level features (semantic features extracted by deep learning technology). During this process, the attention mechanism is used to dynamically adjust the importance of different features to strengthen the representation of the salient target area. Then, methods such as weighted fusion or non-linear transformation can be used to fuse the low-level features and high-level features to generate a fused feature map.
[0159] Step E: Generate a saliency map according to the fused feature map; among them, the value of the pixel point in the saliency map is used to indicate the probability that the corresponding pixel point in the background image belongs to the salient target area.
[0160] Exemplarily, first, an attention mechanism (such as a channel attention mechanism, a spatial attention mechanism, or a self-attention mechanism) can be used to further enhance the fused feature map to obtain an enhanced feature map, so as to highlight the relevant information of the significant target area; then, the enhanced feature map can be mapped to the spatial dimension of the saliency map (usually the size of the input background image) to obtain a mapped feature map. For example, a convolutional layer and an upsampling operation can be used to adjust the enhanced feature map to the resolution of the background image to obtain the mapped feature map; finally, an activation function (such as the Sigmoid function) can be applied to the mapped feature map to compress the value of each pixel point into the interval [0, 1], indicating the probability that the pixel point belongs to the significant target area.
[0161] Step F: Determine the significant target area from the background image according to the saliency map.
[0162] In summary, the method for detecting the significant target area based on the attention detection mechanism combines low-level features and high-level semantic information, and can effectively and accurately identify the significant target area in the background image. By introducing mechanisms such as self-attention, channel attention, and spatial attention, the detection performance can be improved, and thus the accuracy and reliability of the detection results can be enhanced.
[0163] Step S404: Determine at least one candidate shooting point from multiple visual interest points in the picture according to the first distance between the multiple visual interest points in the picture and the target vertical line.
[0164] It should be noted that the explanation of the visual interest points in the foregoing embodiments also applies to this embodiment and will not be elaborated herein.
[0165] In the embodiments of the present application, based on the distance calculation algorithm, the distances between multiple visual interest points in the picture and the target vertical line can be calculated respectively. In the present application, it is denoted as the first distance, and at least one candidate shooting point is determined from the multiple visual interest points according to the first distances of the multiple visual interest points.
[0166] In any one of the embodiments of the present application, at least one visual interest point with the largest first distance can be used as the candidate shooting point, that is, the visual interest point farthest from the target vertical line is used as the candidate shooting point. Taking the four intersection points (golden ratio positions) of the three-point composition method as an example of the visual interest points, the number of visual interest points farthest from the target vertical line is 2 and they are located on the same vertical line.
[0167] Step S405: Determine the preselected shooting point from each candidate shooting point according to the second distance between each candidate shooting point and the significant target area.
[0168] In an embodiment of the present application, based on a distance calculation algorithm, the distances between each candidate shooting point and the center point of the target salient region can be calculated respectively. In the present application, it is denoted as the second distance, and the preselected shooting point can be determined from each candidate shooting point according to the second distance of each candidate shooting point.
[0169] In any embodiment of the present application, the candidate shooting point with the smallest second distance can be used as the preselected shooting point, that is, the candidate shooting point closest to the salient target region is used as the preselected shooting point.
[0170] Step S406: Determine a recommended shooting point that matches the asymmetric composition from the picture according to the preselected shooting point.
[0171] Among them, the recommended shooting point is used to indicate the recommended photography position of the shooting subject in the picture.
[0172] Step S407: Display a recommended window in the picture according to the recommended shooting point; among them, the recommended window is used to indicate the recommended photography area of the shooting subject in the picture.
[0173] It should be noted that the explanations of steps S406 to S407 can refer to the relevant descriptions in any embodiment of the present application and will not be elaborated here.
[0174] For the recommendation method of the embodiment of the present application, first, the candidate shooting point with the largest first distance is preferentially selected from multiple visual interest points, that is, the position farthest from the target vertical line is selected to utilize the "reverse stretching" effect of this point on the target vertical line to strengthen the conflict tension of the asymmetric composition. Then, among the candidate shooting points with the maximized conflict tension, the preselected shooting point with the smallest second distance is further selected, that is, the point closest to the salient target region is selected to achieve the dynamic balance in the tension release of the picture through the spatial gravitational game between the "conflict anchor point" (target vertical line) and the "focus anchor point" (salient target region).
[0175] In any embodiment of the present application, taking the shooting subject as a person as an example, based on the attention detection mechanism and classic composition theory, better person standing positions can be recommended to the user. The implementation principle is as Figure 5 shown, and mainly includes the following steps:
[0176] Step S51: Determine whether the background image in the picture is a symmetric composition. If so, execute step S52; if not, execute step S53.
[0177] Step S52: If the background image is a symmetric composition, recommend a symmetric composition, output the center point of the person (denoted as the recommended shooting point in the present application, such as the center point of the picture), and output the recommended window.
[0178] Step S53, if the background image is asymmetrical, detect the vertical lines in the background image, select the main vertical lines (referred to as target vertical lines in this application), calculate the saliency of the salient target area of the background image, and confirm the center point coordinates of the saliency.
[0179] Step S54, calculating the distances between the four intersection points (also called visual focus points) of the rule of thirds and the target vertical line, and selecting the intersection point with the farthest distance as a candidate shooting point.
[0180] Step S55, calculating the distance between each candidate shooting point and the center point of the saliency, and selecting the candidate shooting point with the shortest distance as the pre-selected shooting point.
[0181] Step S56, randomly select a person center point (i.e., a recommended shooting point) in the neighborhood of the pre-selected shooting point, and output a recommended window, wherein the coordinate position of the marked person center point (i.e., the recommended shooting point) is (x*, y*), and the coordinate position of the recommended window is (x*+ / -[0, r*w], y*+ / -[0, r*h]). Where r is a set ratio, and the value is, for example, 0.01.
[0182] In summary, the solution provided in this application has at least the following advantages: based on the attention detection mechanism and the classic composition strategy, it can simply and efficiently handle the problem of recommending portrait positions, and can meet most shooting scenes of daily, figure and sports photography.
[0183] In order to implement the above embodiment, the embodiment of the present application also proposes a recommendation device.
[0184] Figure 6 A schematic diagram of the structure of a recommended device provided in an embodiment of the present application.
[0185] like Figure 6 As shown, the recommendation device 600 may include: an acquisition module 610 and a display module 620 .
[0186] The acquisition module 610 is used to acquire the captured image in response to the capture operation; wherein the image includes a background image;
[0187] The display module 620 is used to display a recommendation window in the picture according to the composition information of the background image; wherein the recommendation window is used to indicate the recommended photography area of the subject in the picture.
[0188] Furthermore, in an implementation of the embodiment of the present application, the recommendation window includes recommended shooting points that match the composition information; wherein the recommended shooting points are used to indicate the recommended photography positions of the shooting subjects in the picture.
[0189] In an implementation manner of the embodiment of the present application, the recommended shooting point is determined by the following modules:
[0190] The first determination module is configured to, in response to the composition information indicating that the background image is a symmetric composition, determine a recommended shooting point that matches the symmetric composition according to the center point of the picture.
[0191] In an implementation manner of the embodiment of the present application, the recommended shooting point is determined by the following modules:
[0192] The detection module is configured to, in response to the composition information indicating that the background image is an asymmetric composition, detect a target vertical line and a significant target area from the background image; wherein, the significance degree of the picture content in the significant target area is higher than that of the picture content in other areas;
[0193] The second determination module is configured to determine a preselected shooting point from multiple visual interest points according to a first distance between the multiple visual interest points and the target vertical line, and a second distance between the multiple visual interest points and the significant target area;
[0194] The third determination module is configured to determine a recommended shooting point that matches the asymmetric composition from the picture according to the preselected shooting point.
[0195] In an implementation manner of the embodiment of the present application, the second determination module is configured to: determine at least one candidate shooting point from the multiple visual interest points according to the first distance between the multiple visual interest points and the target vertical line; and determine a preselected shooting point from the candidate shooting points according to the second distance between each candidate shooting point and the significant target area.
[0196] In an implementation manner of the embodiment of the present application, the second determination module is configured to: use at least one visual interest point with the largest first distance as the candidate shooting point; and use the candidate shooting point with the smallest second distance as the preselected shooting point.
[0197] In an implementation manner of the embodiment of the present application, the third determination module is configured to: determine a neighborhood of the preselected shooting point from the picture according to the preselected shooting point; and randomly select a recommended shooting point that matches the asymmetric composition from the neighborhood.
[0198] In an implementation manner of the embodiment of the present application, the detection module is configured to: extract at least one candidate vertical line from the background image; determine the importance degree of each candidate vertical line in the background image according to the shooting scene to which the background image belongs and / or the attribute information of each candidate vertical line; and determine the target vertical line from the candidate vertical lines based on the importance degree of each candidate vertical line.
[0199] In an implementation manner of the embodiment of the present application, the detection module is configured to: based on the attention mechanism, extract features from the background image to obtain multi-scale features, and fuse the multi-scale features to obtain a fused feature map; generate a saliency map according to the fused feature map; wherein the value of the pixel point in the saliency map is used to indicate the probability that the corresponding pixel point in the background image belongs to the salient target area; determine the salient target area from the background image according to the saliency map.
[0200] In an implementation manner of the embodiment of the present application, the second determination module is further configured to: based on the asymmetric composition strategy associated with the shooting subject, determine multiple visual interest points that match the asymmetric composition strategy from the picture.
[0201] In an implementation manner of the embodiment of the present application, the display module 620 is configured to: use the recommended shooting point as the window center of the recommended window; determine the size of the recommended window according to the set ratio and the size of the picture; display the recommended window in the picture according to the window center and size of the recommended window.
[0202] It should be noted that the foregoing explanation of the embodiment of the recommendation method is also applicable to the recommendation device of this embodiment, and will not be elaborated here.
[0203] In the recommendation device of the embodiment of the present application, by analyzing the composition information of the background image and providing a recommended window that matches the composition information, the recommended photography area of the shooting subject in the captured picture is intuitively indicated, making the composition process more intuitive and convenient. Even users without photography experience can easily capture high-quality pictures with the help of this function, greatly enhancing the user's shooting experience. At the same time, this method has wide applicability, which can not only meet the needs of professional photographers for efficient composition, but also help ordinary users get started quickly, reduce the technical threshold of photography, reduce the time and difficulty of manual adjustment by users, and effectively improve the overall quality and beauty of the captured pictures.
[0204] To implement the above embodiments, the present application also proposes an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the recommendation method described in any of the foregoing embodiments is implemented.
[0205] Figure 7 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. For example, the electronic device 700 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0206] Refer to Figure 7, the electronic device 700 may include one or more of the following components: a processing component 702, a memory 704, a power component 706, a multimedia component 708, an audio component 710, an input / output (I / O) interface 712, a sensor component 714, and a communication component 716.
[0207] The processing component 702 generally controls the overall operation of the electronic device 700, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the above methods. In addition, the processing component 702 may include one or more modules to facilitate the interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate the interaction between the multimedia component 708 and the processing component 702.
[0208] The memory 704 is configured to store various types of data to support the operation of the electronic device 700. Examples of such data include instructions for any application or method operating on the electronic device 700, contact data, phone book data, messages, pictures, videos, etc. The memory 704 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disc.
[0209] The power component 706 provides power to various components of the electronic device 700. The power component 706 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the electronic device 700.
[0210] The multimedia component 708 includes a screen that provides an output interface between the electronic device 700 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also detect the duration and pressure associated with the touch or swipe operations. In some embodiments, the multimedia component 708 includes a front camera and / or a rear camera. When the electronic device 700 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zoom capabilities.
[0211] The audio component 710 is configured to output and / or input audio signals. For example, the audio component 710 includes a microphone (MIC) that is configured to receive external audio signals when the electronic device 700 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 704 or transmitted via the communication component 716. In some embodiments, the audio component 710 further includes a speaker for outputting audio signals.
[0212] The I / O interface 712 provides an interface between the processing component 702 and a peripheral interface module, and the peripheral interface module can be a keyboard, a click wheel, buttons, etc. These buttons can include but are not limited to: a home button, a volume button, a power button, and a lock button.
[0213] The sensor assembly 714 includes one or more sensors for providing an assessment of the status of various aspects of the electronic device 700. For example, the sensor assembly 714 can detect the on / off state of the electronic device 700, the relative positioning of components, such as the display and keypad of the electronic device 700. The sensor assembly 714 can also detect a change in the position of the electronic device 700 or a component of the electronic device 700, the presence or absence of user contact with the electronic device 700, the orientation or acceleration / deceleration of the electronic device 700, and a change in the temperature of the electronic device 700. The sensor assembly 714 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 can also include a light sensor, such as a Complementary Metal-Oxide-Semiconductor (CMOS) or Charge-Coupled Device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 can also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0214] The communication component 716 is configured to facilitate communication between the electronic device 700 and other devices in a wired or wireless manner. The electronic device 700 can access a wireless network based on communication standards, such as WiFi, 4G, or 5G, or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 further includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra-Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0215] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components, and is used to execute the above method.
[0216] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is further provided, such as a memory 704 including instructions. The above instructions can be executed by a processor 720 of the electronic device 700 to complete the above method. For example, the non-transitory computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.
[0217] To implement the above embodiments, the present application further proposes a chip. The chip includes an interface circuit and a processing circuit that are coupled to each other. The interface circuit is used to input or output signals, and the processing circuit is configured to execute the recommendation method provided in any of the foregoing embodiments.
[0218] Figure 8 It is a schematic structural diagram of another chip proposed in the embodiments of the present application. Reference may be made to Figure 8 the schematic structural diagram of the chip 800 shown, but not limited thereto.
[0219] The chip 800 includes a processing circuit 801, and the processing circuit 801 is configured to execute any of the above recommendation methods.
[0220] In some embodiments, the chip 800 further includes one or more interface circuits 802. Optionally, the interface circuit 802 is connected to the memory 803. The interface circuit 802 can be used to receive signals from the memory 803 or other devices, and the interface circuit 802 can be used to send signals to the memory 803 or other devices. For example, the interface circuit 802 can read the instructions stored in the memory 803 and send the instructions to the processing circuit 801.
[0221] In some embodiments, the interface circuit 802 performs at least one of the communication steps such as sending and / or receiving in the above method, and the processing circuit 801 performs other steps.
[0222] In some embodiments, terms such as interface circuit, interface, transceiver pin, transceiver, etc. may be used interchangeably.
[0223] In some embodiments, the chip 800 further includes one or more memories 803 for storing instructions. Optionally, all or part of the memories 803 may be outside the chip 800.
[0224] To implement the above embodiments, the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the recommended method described in any of the foregoing method embodiments is implemented.
[0225] To implement the above embodiments, the present application also provides a computer program product, on which a computer program is stored. When the computer program is executed by a processor, the recommended method described in any of the foregoing method embodiments is implemented.
[0226] In the description of this specification, the descriptions with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms are not necessarily directed to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, without conflict, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples.
[0227] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present application, "a plurality" means at least two, such as two, three, etc., unless otherwise specifically and clearly defined.
[0228] Any process or method description represented in a flowchart or otherwise described herein can be understood to represent a module, segment, or portion of code including one or more executable instructions for implementing a customized logic function or process, and the scope of the preferred embodiments of the present application includes additional implementations, where the functions may be executed in a substantially simultaneous manner or in the reverse order according to the functions involved, rather than in the order shown or discussed, which should be understood by those skilled in the art to which the embodiments of the present application pertain.
[0229] The logic and / or steps represented in a flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing a logical function, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or in connection with these instruction execution systems, apparatuses, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium include the following: an electrical connection portion having one or more wirings (electronic device), a portable computer diskette (magnetic device), a random access memory (Random Access Memory, abbreviated as RAM), a read-only memory (Read-Only Memory, abbreviated as ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (Compact Disc Read-Only Memory, abbreviated as CDROM). Additionally, the computer-readable medium can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpretation, or other appropriate processing as necessary, and then stored in a computer memory.
[0230] It should be understood that each part of the present application can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one of the following techniques well known in the art or a combination thereof can be used: discrete logic circuits with logic gate circuits for implementing logical functions on data signals, application specific integrated circuits with appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0231] Those of ordinary skill in the art can understand that all or part of the steps carried by the method of the above embodiments can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiments.
[0232] In addition, in each embodiment of the present application, each functional unit can be integrated into a processing module, or each unit can exist physically alone, or two or more units can be integrated into one module. The above integrated module can be implemented in the form of hardware or in the form of a software functional module. When the above integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0233] The above-mentioned storage medium can be a read-only memory, a magnetic disk, an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present application. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present application.
Claims
1. A recommendation method, characterized in that, Including: In response to a shooting operation, obtain the captured picture; wherein, the picture includes a background image; According to the composition information of the background image, display a recommendation window in the picture; wherein, the recommendation window is used to indicate the recommended shooting area of the shooting subject in the picture.
2. The method according to claim 1, characterized in that, The recommendation window includes recommended shooting points matching the composition information; Wherein, the recommended shooting points are used to indicate the recommended shooting positions of the shooting subject in the picture.
3. The method according to claim 2, characterized in that, The recommended shooting points are determined by the following steps: In response to the composition information indicating that the background image is a symmetric composition, determine the recommended shooting points matching the symmetric composition according to the center point of the picture.
4. The method according to claim 2, wherein The recommended shooting points are determined by the following steps: In response to the composition information indicating that the background image is an asymmetric composition, detect a target vertical line and a significant target area from the background image; wherein, the significant degree of the picture content in the significant target area is higher than that of the picture content in other areas. According to the first distance between multiple visual interest points in the picture and the target vertical line, and the second distance between the multiple visual interest points and the significant target area, determine preselected shooting points from the multiple visual interest points. According to the preselected shooting points, determine the recommended shooting points matching the asymmetric composition from the picture.
5. The method according to claim 4, characterized in that, The step of determining preselected shooting points from the multiple visual interest points according to the first distance between the multiple visual interest points in the picture and the target vertical line, and the second distance between the multiple visual interest points and the significant target area includes: Determine at least one candidate shooting point from the multiple visual interest points according to the first distance between the multiple visual interest points and the target vertical line; Determine the preselected shooting point from each candidate shooting point according to the second distance between each candidate shooting point and the significant target area.
6. The method according to claim 5, wherein The step of determining at least one candidate shooting point from the multiple visual interest points according to the first distance between the multiple visual interest points in the picture and the target vertical line includes: Take at least one visual interest point with the largest first distance as the candidate shooting point; The step of determining the preselected shooting point from each candidate shooting point according to the second distance between each candidate shooting point and the significant target area includes: Take the candidate shooting point with the smallest second distance as the preselected shooting point.
7. The method according to claim 4, characterized in that, The step of determining the recommended shooting points matching the asymmetric composition from the picture according to the preselected shooting points includes: According to the preselected shooting points, determine the neighborhood of the preselected shooting points from the picture; Randomly select the recommended shooting points matching the asymmetric composition from the neighborhood.
8. The method according to claim 4, characterized in that, Detecting a target vertical line from the background image includes: Extract at least one candidate vertical line from the background image; According to the shooting scene to which the background image belongs and / or the attribute information of each candidate vertical line, determine the importance degree of each candidate vertical line in the background image; Determine the target vertical line from each of the candidate vertical lines based on the importance level of each candidate vertical line.
9. The method according to claim 4, characterized in that, Detect a salient target region from the background image, including: Extract features from the background image to obtain multi-scale features, and fuse the multi-scale features to obtain a fused feature map; Generate a saliency map according to the fused feature map; wherein the value of a pixel point in the saliency map is used to indicate the probability that the corresponding pixel point in the background image belongs to the salient target region; Determine the salient target region from the background image according to the saliency map.
10. The method according to any one of claims 4-9, characterized in that, The multiple visual interest points are determined by the following steps: Based on an asymmetric composition strategy associated with the photographed subject, determine multiple visual interest points in the picture that match the asymmetric composition strategy.
11. The method according to any one of claims 2-9, characterized in that, Display a recommended window in the picture, including: Use the recommended shooting point as the window center of the recommended window; Determine the size of the recommended window according to a set ratio and the size of the picture; Display the recommended window in the picture according to the window center and size of the recommended window.
12. A recommendation device, characterized in that, including: An acquisition module for acquiring a photographed picture in response to a shooting operation; wherein the picture includes a background image; A display module for displaying a recommended window in the picture according to the composition information of the background image; wherein the recommended window is used to indicate the recommended photography area of the photographed subject in the picture.
13. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the steps of the method according to any one of claims 1 to 11 are implemented.
14. A non-transitory computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the program instructions are executed by the processor, the steps of the method according to any one of claims 1 to 11 are implemented.
15. A chip, characterized in that, The chip includes an interface circuit and a processing circuit that are coupled to each other. The interface circuit is used to input or output signals, and the processing circuit is used to implement the method according to any one of claims 1 to 11.
16. A computer program product, characterized in that, It includes a computer program. When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 11 are implemented.
Citation Information
Patent Citations
Image processing method and electronic equipment
CN111432122A
Composition recommendation method, terminal and storage medium
CN114266843A
Photographing control method and device of mobile phone and computer readable storage medium
CN116600190A
Image shooting method and electronic equipment
CN119893269A
Device and method for recommending background image based on icon alignment information
KR101485497B1