Picture composition method, electronic equipment, chip system, storage medium and product

By displaying the first mark and the second mark in the camera application and automatically zooming in when the marks overlap, the problem of unreasonable composition of the photographed subject in the prior art is solved, and a high-quality aesthetic composition effect is achieved.

CN120676250APending Publication Date: 2025-09-19HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510223045.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-26
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

When existing camera applications assist users in composing pictures, there is still the problem of unreasonable composition of the subject, which affects the quality of the pictures.

Method used

A composition method is provided, which helps a user quickly compose a picture by displaying a first marker and a second marker in a preview window of an electronic device. When the first marker moves to the position of the second marker, the image automatically zooms to different zoom factors, assisting the user in achieving aesthetic composition.

Benefits of technology

By assisting users to make reasonable composition, the quality of photos is improved and it is ensured that the captured images conform to the principles of aesthetic composition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120676250A_ABST
    Figure CN120676250A_ABST
Patent Text Reader

Abstract

The invention provides a composition method, electronic equipment, a chip system, a storage medium and a product, and relates to the technical field of terminals. The method comprises the steps that the electronic equipment is deployed with an AI composition function, when the electronic equipment displays a preview image, if the AI composition function is opened, the electronic equipment can recognize the preview image so as to display a preview center and a recommendation point in an interface, the recommendation point is used for representing a relatively good composition position when a shooting main body in the previewed image is shot; when the recommendation point is located at the preview center, the zoom multiple of the camera is changed to reduce or magnify the image for previewing by using the appropriate zoom multiple, so that the previewed image conforms to the aesthetic composition, and at the moment, if the shooting operation of the user is detected, a photo can be generated based on the composition, so that the shot picture conforms to the aesthetic composition, and the user experience is improved. And a high-quality image is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a composition method, electronic device, chip system, storage medium and product. Background Art

[0002] With the development of terminal technology, electronic devices can include camera applications to meet users' needs for taking photos. As users' requirements for photo quality increase, electronic devices can assist users in making reasonable compositions to take high-quality photos.

[0003] Currently, camera apps offer shooting assistance features such as grid lines, levels, and zoom to help users compose high-quality images. For example, grid lines can divide the image captured by an electronic device into a 3x3 grid, helping users compose based on the "rule of thirds" principle in photography. Levels provide real-time feedback on the horizontality of the image captured by the electronic device, helping users determine the horizontal line and prevent tilt when composing. Zoom can change the focal length of the camera in an electronic device to zoom in or out on the subject, adjusting the shooting angle and composition.

[0004] However, although shooting assistance functions such as grid lines, spirit levels and zoom can help users compose pictures to a certain extent, there will still be problems with unreasonable composition of the subject, affecting the quality of the photos. Summary of the Invention

[0005] The present application provides a composition method, electronic device, chip system, storage medium and product, which are applied to the field of terminal technology, and are helpful in assisting users in composing pictures, making the composition of the photographed subject relatively reasonable and improving the quality of the pictures.

[0006] In a first aspect, the present application provides a composition method, which can be applied to an electronic device with a camera. The method may include: displaying a first interface, the first interface including a preview window, a photo control, a first mark, and a second mark, the preview window being used to display a first image captured by the camera at a first zoom factor, the first mark being used to mark the center of the preview window, and the second mark being used to mark the composition position when photographing the subject in the first image; when the first mark moves to the position of the second mark, both the first mark and the second mark disappear, and a second image captured by the camera at a second zoom factor is displayed in the preview window, the second zoom factor being different from the first zoom factor; and obtaining a third image in response to a triggering operation on the photo control.

[0007] The method provided in the present application displays a first mark and a second mark to help users quickly compose pictures. When the first mark moves to the position of the second mark, the zoom factor is changed from the first to the second, which helps to make the captured picture conform to the aesthetic composition.

[0008] In one possible implementation, displaying the second image captured by the camera at a second zoom factor in a preview window includes: first displaying the fourth image captured by the camera at a first zoom factor in the preview window, wherein the first interface also includes a first area, and the first area is used to display the size of the second image; after the fourth image is displayed for a first time period, the second image is displayed again in the preview window.

[0009] In this way, before displaying the second image, the fourth image and the first area are displayed to prompt the user that the second image is about to be displayed, which is beneficial to provide a buffer for the user and improve the user experience.

[0010] In a possible implementation, when the fourth image is displayed in the preview window, the first interface further includes first prompt information, and the first prompt information is used to prompt the user to wait for the intelligent composition.

[0011] In this way, displaying the first prompt information is helpful in preventing the user from moving the electronic device and reducing the probability of AI composition failure.

[0012] In a possible implementation, displaying the first interface includes: displaying the first interface in response to an operation for turning on the composition function. In this way, the composition function can be turned on or off according to user needs, which is more flexible.

[0013] In one possible implementation, when the first marker moves to the position of the second marker, the method further includes: applying a first motion effect to the first marker, and after a second time period of displaying the first motion effect, the first marker, the second marker, and the first motion effect disappear.

[0014] In this way, applying the first motion effect to the first marker helps to prompt the user that the first marker has moved to the position of the second marker.

[0015] In one possible implementation, when the first image is displayed in the preview window, the method further includes: applying a second animation to the second marker; when the first marker moves to the position of the second marker, the second animation continues to be displayed on the second marker; and after a second period of time during which the second animation is displayed, the first marker, the second marker, and the second animation disappear. This helps to highlight the second marker.

[0016] In one possible implementation, when the first image is displayed in the preview window, the first interface further includes a second prompt message, which is used to prompt the user to move the first marker to the position of the second marker to perform intelligent composition. In this way, the second prompt message prompts the user to move the first marker to the second marker, assisting the user in performing AI composition.

[0017] In one possible implementation, the second zoom factor is related to the scene of the first image, where the first image is a landscape, a person, an animal, a sunset, an architecture, or a food scene. Thus, different scenes are composed using corresponding zoom factors, which helps to highlight the subject and optimize the composition.

[0018] In a possible implementation, the electronic device includes a first correspondence between a shooting scene and a zoom factor, and the second zoom factor is determined based on the first correspondence and the shooting scene of the first image.

[0019] In this way, the electronic device can determine the second zoom factor through the first corresponding relationship and the shooting scene of the first image, which is simple to implement, conducive to quickly obtaining the second zoom factor and reducing the AI ​​composition delay.

[0020] In one possible implementation, the position of the second marker is determined based on the following method: determining the shooting scene and subject of the first image based on features of the first image, and obtaining multiple composition strategies related to the shooting scene of the first image, where the features of the first image include one or more of the edges, shapes, colors, or textures of each subject in the first image; determining a target composition strategy from the multiple composition strategies based on one or more of the position of the subject in the first image, the relationship between the subject and other subjects in the first image, or the visual balance of each subject in the first image; and determining the position of the second marker based on the target composition strategy. This facilitates accurate determination of the position of the second marker.

[0021] In a possible implementation, the electronic device includes a second correspondence between shooting scenes and composition strategies, and the plurality of composition strategies are determined based on the second correspondence and the shooting scene of the first image.

[0022] In this way, the electronic device can determine multiple composition strategies through the second corresponding relationship and the shooting scene of the first image, which is simple to implement, is conducive to quickly obtaining multiple composition strategies, and reduces the delay in displaying the second mark.

[0023] In a second aspect, the present application provides a patterning device, which may be an electronic device or a chip or chip system within an electronic device. The patterning device may include a display module and a processing module. When the patterning device is an electronic device, the processing module may be a processing unit. The processing unit is configured to execute the steps of the processing module so that the electronic device implements a patterning method described in the first aspect or any possible implementation of the first aspect. When the patterning device is an electronic device, the processing module may be a processor. The patterning device may also include a storage unit, which may be a memory. The storage unit is configured to store instructions, and the processing module executes the instructions stored in the storage unit so that the electronic device implements a patterning method described in the first aspect or any possible implementation of the first aspect. When the patterning device is a chip or chip system within an electronic device, the processing module may be a processor. The processing module executes the instructions stored in the storage unit so that the electronic device implements a patterning method described in the first aspect or any possible implementation of the first aspect. The storage unit may be a storage unit within the chip (eg, a register, a cache, etc.), or a storage unit within the electronic device that is located outside the chip (eg, a read-only memory, a random access memory, etc.).

[0024] Exemplarily, a display module is used to display a first interface, the first interface including a preview window, a photo control, a first mark, and a second mark, the preview window is used to display a first image captured by the camera at a first zoom factor, the first mark is used to mark the center of the preview window, and the second mark is used to mark the composition position when shooting the subject in the first image; when the first mark moves to the position of the second mark, both the first mark and the second mark disappear, and the second image captured by the camera at a second zoom factor is displayed in the preview window, and the second zoom factor is different from the first zoom factor; the processing module is used to obtain a third image in response to a triggering operation on the photo control.

[0025] In one possible implementation, the display module is also used to: first display the fourth image captured by the camera through the first zoom factor in the preview window, wherein the first interface also includes a first area, and the first area is used to display the size of the second image; after the first time period of the fourth image is displayed, the second image is displayed in the preview window.

[0026] In a possible implementation, when the fourth image is displayed in the preview window, the first interface further includes first prompt information, and the first prompt information is used to prompt the user to wait for the intelligent composition.

[0027] In a possible implementation, the display module is further configured to: display the first interface in response to an operation for opening the composition function.

[0028] In one possible implementation, the processing module is further used to: when the first marker moves to the position of the second marker, the processing module is also used to: apply the first animation effect to the first marker, and after a second time period of displaying the first animation effect, the first marker, the second marker and the first animation effect disappear.

[0029] In one possible implementation, when the first image is displayed in the preview window, the processing module is further used to: apply a second animation effect to the second mark, and when the first mark moves to the position of the second mark, the second animation effect is still displayed on the second mark, and after a second time period of displaying the second animation effect, the first mark, the second mark and the second animation effect disappear.

[0030] In a possible implementation, when the first image is displayed in the preview window, the first interface further includes second prompt information, and the second prompt information is used to prompt to perform intelligent composition when the first mark is moved to the position of the second mark.

[0031] In a possible implementation, the second zoom factor is related to a shooting scene of the first image, where the shooting scene of the first image is a landscape, a person, an animal, a sunset, a building, or a food scene.

[0032] In a possible implementation, the electronic device includes a first correspondence between a shooting scene and a zoom factor, and the second zoom factor is determined based on the first correspondence and the shooting scene of the first image.

[0033] In one possible implementation, the position of the second marker is determined based on the following method: based on the characteristics of the first image, determining the shooting scene and the shooting subject of the first image, and obtaining multiple composition strategies related to the shooting scene of the first image, wherein the characteristics of the first image include one or more of the edges, shapes, colors or textures of each subject in the first image; determining a target composition strategy from multiple composition strategies based on one or more of the position of the shooting subject in the first image, the relationship between the shooting subject and other subjects obtained in the first image except the shooting subject, or the visual balance of each subject in the first image; and determining the position of the second marker based on the target composition strategy.

[0034] In a possible implementation, the electronic device includes a second correspondence between shooting scenes and composition strategies, and the plurality of composition strategies are determined based on the second correspondence and the shooting scene of the first image.

[0035] In a third aspect, the present application provides an electronic device comprising one or more processors and a memory; the memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code comprising computer instructions, and the one or more processors calling the computer instructions to enable the electronic device to execute the method described in the first aspect or any possible implementation of the first aspect.

[0036] In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program or instructions. When the computer program or instructions are run on an electronic device, the electronic device executes the method described in the first aspect or any possible implementation of the first aspect.

[0037] In a fifth aspect, the present application provides a computer program product, which includes computer program code. When the computer program code runs on an electronic device, the electronic device executes the method described in the first aspect or any possible implementation of the first aspect.

[0038] In the sixth aspect, the present application provides a chip or chip system, which is applied to an electronic device, and the chip or chip system includes at least one or more processors, and the one or more processors are used to call computer instructions to execute the method described in the first aspect or any possible implementation of the first aspect.

[0039] In one possible implementation, the chip or chip system described above in this application further includes at least one memory, in which instructions are stored. The memory may be a storage unit within the chip, such as a register, a cache, etc., or a storage unit of the chip (e.g., a read-only memory, a random access memory, etc.).

[0040] It should be understood that the second to sixth aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 and Figure 2 This is a schematic diagram of the interface for entering the AI ​​composition function provided in an embodiment of the present application;

[0042] Figures 3 to 6 This is a schematic diagram of an interface for implementing the AI ​​composition function provided in an embodiment of the present application;

[0043] Figure 7 and Figure 8 is a schematic flow chart of the patterning method provided in an embodiment of the present application;

[0044] Figure 9 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0045] Figure 10 This is a schematic diagram of the software and hardware architecture of an electronic device provided in an embodiment of the present application;

[0046] Figure 11 This is a schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.

[0048] To facilitate understanding of the embodiments of the present application, the following description is first given:

[0049] In the embodiments of this application, terms such as "first" and "second" are used to distinguish between identical or similar items with substantially the same function or effect. For example, the first image and the second image are used solely to distinguish between the different images and do not define their order. Those skilled in the art will understand that terms such as "first" and "second" do not define the quantity or order of execution, and that terms such as "first" and "second" do not necessarily define differences.

[0050] It should be noted that in the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0051] In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, a--c, bc, or abc, where a, b, c can be single or multiple.

[0052] With the development of terminal technology, electronic devices can include camera applications to meet users' needs for taking photos. As users' requirements for photo quality increase, electronic devices can assist users in making reasonable compositions to take high-quality photos.

[0053] Currently, camera apps offer shooting assistance features such as grid lines, levels, and zoom to help users compose shots for high-quality images. For example, grid lines can divide the image captured by an electronic device into a 3x3 grid, helping users compose based on the "rule of thirds" principle in photography. Levels provide real-time feedback on the horizontality of the image captured by the electronic device, helping users determine the horizontal line and prevent tilt when composing. Zoom can change the focal length of the camera in an electronic device to zoom in or out on the subject, adjusting the shooting angle and composition.

[0054] However, although shooting assistance functions such as grid lines, spirit levels and zoom can help users compose pictures to a certain extent, there will still be problems with unreasonable composition of the subject, affecting the quality of the photos.

[0055] For example, while grid lines can help users compose images based on the "rule of thirds" principle in photography, users unfamiliar with the principle rely solely on their own experience to determine the subject's position within the grid, resulting in a low probability of capturing high-quality images. A spirit level can help users determine the horizon, but it cannot recommend the subject's position, leading to poor subject composition and poor photo quality. While zoom can reduce or enlarge the subject, adjusting the viewing angle and composition, it requires users to manually adjust the zoom button and determine the appropriate focal length, resulting in a low probability of capturing high-quality images.

[0056] In addition, in some other scenarios, electronic devices can help users compose pictures through preset shooting templates or filters. However, this method is only applicable to scenes similar to the shooting templates and has a narrow scope of application.

[0057] In view of this, embodiments of the present application provide a composition method, electronic device, chip system, storage medium, and product. The electronic device can recommend an appropriate composition position for the user in real time based on the image captured by the camera. When the user moves the center of the image to the appropriate composition position, the electronic device can automatically zoom. This helps to ensure that the captured image conforms to the aesthetic composition and obtains high-quality images. In addition, it is not limited to shooting scenarios and has a wider range of applications.

[0058] The embodiments of the present application may be applicable to electronic devices. The electronic devices of the embodiments of the present application may include handheld devices including cameras and vehicle-mounted devices including cameras. For example, some electronic devices include: mobile phones, tablet computers, PDAs, laptop computers, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with cameras, computing devices or other processing devices including cameras, vehicle-mounted devices, and wearable devices. The embodiments of the present application are not limited to these.

[0059] The electronic devices in the embodiments of the present application may also be referred to as: terminal equipment, user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent or user device, etc.

[0060] The electronic device provided in the embodiment of the present application may include an artificial intelligence (AI) composition function. When the AI ​​composition function is turned on, the electronic device may execute the method provided in the embodiment of the present application.

[0061] In order to better understand the embodiments of the present application, the shooting scenarios provided by the embodiments of the present application are specifically introduced below in conjunction with a set of user interface schematic diagrams.

[0062] It is understood that the terms "interface" and "user interface" in the specification, claims, and drawings of this application refer to the media interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The commonly used form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operations displayed in a graphical manner. It can be an interface element such as an icon, window, or control displayed on the display screen of an electronic device, where a control can include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets.

[0063] 1. Turn on and off the AI ​​composition function ( Figure 1 and Figure 2 )

[0064] In response to the electronic device opening the camera application, the electronic device may display Figure 1 The interface shown. Figure 1 The interface shown may be the default camera mode shooting interface of the camera application, on which the user can display a preview image and complete the photo shooting. The operation of opening the camera application may be a touch operation, a click operation, a voice control operation, or a gesture operation, etc., which is not limited in the embodiments of the present application.

[0065] like Figure 1 As shown, the electronic device displays the camera application's default shooting mode shooting interface. The shooting interface may display a settings bar 110, a preview window 120, a focus control 130, a menu bar 140, an album shortcut control 150, a shutter control 160, a camera flip control 170, and a fold control 180. Each component is described below.

[0066] 1) The setting bar 110 may include a plurality of shooting controls for adjusting the camera parameters or changing the shooting mode to change the image captured by the camera. Figure 1 In the interface shown, the setting bar 110 includes a flash 111 , an AI composition control 112 , a dynamic photo control 113 , and an XMAGE style control 114 .

[0067] Among them, the flash 111 can be used to turn the flash on or off, thereby changing the brightness of the image captured by the camera. The AI ​​composition control 112 can be used to turn the AI ​​composition function on and off. After the AI ​​composition function is turned on, the electronic device can provide a composition reference for the user's needs based on the image captured by the camera. The dynamic photo control 113 can be used to turn on or off the function of taking dynamic photos. If the function of taking dynamic photos is turned on, the electronic device can record short movements and sounds while taking static photos to generate dynamic photos. The XMAGE style control 114 can turn XMAGE style photography on or off. If XMAGE style photography is turned on, the electronic device can obtain preset style parameters and process the image captured by the camera according to the preset style parameters to obtain an image that meets the XMAGE style.

[0068] The setting bar 110 can also be used to provide more controls for adjusting camera parameters or changing shooting methods, such as filters, beauty controls, etc., to provide users with richer shooting services.

[0069] 2) The preview window 120 is used to display the image captured by the camera based on the viewing range. The preview window 120 can also be called a preview area, which is not limited in this embodiment of the present application. In this embodiment of the present application, the image displayed in the preview window 110 is called a preview image. Figure 1 As shown, the preview image may include a person 121 and a table 122 .

[0070] 3) The focus control 130 can set the focus of the camera to adjust the camera's field of view. When the camera's field of view changes, the image displayed in the preview window 120 will change accordingly. Figure 1 As shown, the focal length control 130 may include wide-angle focal length, 1x focal length, 2x focal length, 4x focal length, and 10x focal length, so as to allow the user to select different focal lengths. Among them, the wide-angle focal length can be represented by w, the 1x focal length can be represented by 1x, the 2x focal length can be represented by 2x, the 4x focal length can be represented by 4x, and the 10x focal length can be represented by 10x. Figure 1 In the interface shown, the focal length of the camera is set to 1x, and the image displayed in the preview window 120 is an image obtained based on the viewing range of 1 times the focal length of the camera.

[0071] 4) The menu bar 140 may include multiple shooting mode options. Figure 1As shown, menu bar 140 may include: Night Mode option, Flash Mode option, Portrait Mode option, Photo Mode option, Video Mode option, Professional Mode option, and more mode options. Night Mode can be used to take photos in low-light scenes, such as taking photos at night. Flash Mode can be used in scenes that require quick capture, such as capturing fast-moving objects or sudden events. Portrait Mode can be used to take close-up photos of people. Photo Mode can be used to take photos in daylight scenes. Video Mode can be used to record videos.

[0072] It should be noted that the camera application can also include more shooting mode options, and other shooting mode options may not be displayed due to limited interface area.

[0073] 5) The photo album quick control 130 can be used to open the photo album application. After the user triggers the electronic device to open the photo album application through the photo album quick control 130, the user can view the captured images and videos. In addition, the photo album quick control 130 can also display thumbnails of the captured images or videos.

[0074] 6) The shutter control 160 can be used to receive a user's shooting operation to trigger the electronic device to take a photo, or in other words, to trigger the electronic device to capture an image. The shutter control 160 can also be called a photo control or a shooting control, which is not limited in this embodiment of the application.

[0075] 7) The camera flip control 170 can be used to switch the viewfinder camera in use. The camera flip control 170 can also be called a conversion control, which is not limited in the embodiments of the present application. If the camera currently being used to capture images is the front camera, after detecting a user operation acting on the camera flip control 170, the electronic device can enable the rear camera to capture images in response to the above operation. Conversely, if the camera currently being used to capture images is the rear camera, after detecting a user operation acting on the camera flip control 170, the electronic device can enable the front camera to capture images in response to the above operation.

[0076] 8) The folding control 180 can be used to display or hide other controls. The folding control 180 can include a displayed state and a hidden state. When the folding control is in the hidden state and the user triggers the folding control 180, the electronic device can display the hidden controls, allowing the user to access more functions or settings, and switch to the displayed state to subsequently hide these controls. When the folding control is in the displayed state and the user triggers the folding control 180, the electronic device can hide these controls to maintain a simple and neat interface, and switch to the hidden state to subsequently display these controls.

[0077] like Figure 1As shown, the folding control 180 is in a hidden state and other controls are hidden. When the user triggers the folding control 180, the electronic device can display Figure 2 The interface shown. Figure 2 In the interface shown, the hidden controls are displayed and the folding control 180 is switched to the display state. Figure 2 As shown, the hidden controls may include setting controls 210, Xiaoyi visual controls 220, AI composition controls 230, XMAGE style 240, and flash 250. Figure 2 As can be seen, the hidden controls can include more, and other controls are not displayed due to limited interface area.

[0078] The setting control 210 can be used to access and adjust various configuration options of the camera application. Users can use this control to enter the setting menu and customize the functions and performance of the camera, including parameters such as resolution, storage location, shutter sound, etc., to optimize the shooting experience. The Xiaoyi vision control 220 can be used to turn the Xiaoyi vision function on or off. If the Xiaoyi vision function is turned on, the electronic device can recognize the image captured by the camera to help users translate or search for images. The functions of the AI ​​composition control 230, XMAGE style 240, and flash 250 are as above and will not be repeated here.

[0079] From the above Figure 1 and Figure 2 As can be seen from the interface shown, the embodiment of the present application provides multiple ways to turn on or off the AI ​​composition function.

[0080] In one possible implementation, in response to the electronic device opening the camera application, the electronic device may display Figure 1 The interface shown. Figure 1 The interface shown includes an AI composition control 112. In response to the user triggering the operation of the AI ​​composition control 112, the electronic device turns on the AI ​​composition function. This method of turning on the AI ​​composition function is simple to operate.

[0081] In another possible implementation, in response to the electronic device opening the camera application, the electronic device may display Figure 1 The interface shown. Figure 1 The interface shown includes a folding control 180, and the folding control 180 is in a hidden state. When the user triggers the folding control 180, the electronic device can display Figure 2 The interface shown. Figure 2 In the interface shown, hidden controls are displayed. The hidden controls include an AI composition control 230. In response to the user triggering the operation of the AI ​​composition control 230, the electronic device turns on the AI ​​composition function.

[0082] This way of opening the AI ​​composition function provides users with multiple ways to open it and is more flexible.

[0083] When the AI ​​composition function is turned on, triggering the AI ​​composition control 112 or the AI ​​composition control 230 can turn off the AI ​​composition function. For specific operations, please refer to the above description and will not be repeated here.

[0084] 2. Realize AI composition ( Figures 3 to 6 )

[0085] Electronic device display Figure 1 or Figure 2 When the interface shown in the figure is displayed, in response to the user turning on the AI ​​composition function, Figure 3 The interface shown. Figure 3 The interface shown includes a mark 310 , a mark 320 and a prompt message 330 .

[0086] Among them, the mark 310 is used to mark the center of the preview window 120, or the center of the preview screen, or the center of the screen, which is not limited in this embodiment of the present application. Figure 3 In the interface shown, the mark 310 is a circular mark, but the embodiment of the present application is not limited thereto. In other examples, the mark 320 can also be a circular mark, an elliptical mark, a triangular mark, a square mark, or a mark formed by a combination of lines and graphics, etc., and the embodiment of the present application is not limited thereto.

[0087] Mark 320 is used to mark the subject, that is, person 320, and mark the composition position when shooting the subject, or in other words, mark 320 is a recommended camera position, or in other words, mark 320 is a recommended point for shooting. This embodiment of the application does not limit this. Figure 3 In the illustrated interface, mark 320 is a circular mark and includes a curve 321. Curve 321 divides the circular mark into two parts. In other examples, mark 320 may also be an elliptical mark, a ring mark, a circular mark without curve 321, or a mark formed by a combination of lines and graphics, etc., and this embodiment of the present application does not limit this.

[0088] Optionally, the curve 321 divides the circular mark into two parts, and the colors of the two parts can be different, for example, one part is blue and the other part is red, or one part is white and the other part is black, which is not limited in this embodiment of the present application.

[0089] Optionally, the mark 320 may be provided with a motion or animation effect to increase its visual appeal. For example, the motion effect may be a sequential change of colors, or a ring may appear and disappear on the outer ring of the mark 320.

[0090] The prompt information 330 is used to prompt the user to move the center of the picture to the recommended camera position or recommended point, or in other words, to move the mark 320 to the position of the mark 330. Figure 3 In the interface shown, prompt 330 is used to prompt "Recommended shooting point found, move the center of the picture to the recommended point, and AI composition will be performed for you." This prompt 330 can be used to guide user operations to facilitate AI composition.

[0091] It is understandable that the recommended shooting point and the recommended point in the prompt information 330 are used to indicate the position of the mark 320 , and the center of the picture is used to indicate the position of the mark 310 . Figure 3 In the interface shown, the text in the prompt information 330 is just a specific example and is not limited to this embodiment of the present application.

[0092] Optionally, prompt message 330 can appear a limited number of times when the AI ​​composition function is enabled. For example, after appearing three times, prompt message 330 will no longer appear. In this way, prompt message 330 appears to guide the user through the operation. After a certain number of appearances, the electronic device determines that the user already knows how to operate and no further guidance is needed, and prompt message 330 may not be displayed, which helps reduce the power consumption of the electronic device.

[0093] When the center point of marker 320 coincides with the center point of marker 310, it indicates that marker 320 has moved to the position of marker 330. The electronic device can apply an animation to marker 310 to display Figure 4 The interface shown in the figure is as follows. Figure 4 As shown, the center point of the mark 320 coincides with the center point of the mark 310 , and the mark 310 is added with an animation, which can be implemented in many ways.

[0094] In one example, when the center points of the marker 320 and the marker 310 do not coincide, the marker 310 is a circular marker with no color. When the center points of the marker 320 and the marker 310 coincide, the marker 310 is a circular marker with a color added that appears and disappears.

[0095] In another example, when the center points of mark 320 and mark 310 do not coincide with each other, mark 310 is a circular mark without color, and mark 320 includes two colors. When the center points of mark 320 and mark 310 coincide with each other, mark 310 is a circular mark with the same color as mark 320 added, which appears and disappears.

[0096] The animation on the mark 310 can be displayed for a fixed time, which can be preset, for example, 3 seconds. The embodiment of the present application does not limit the display time of the animation. When the display time is reached, the electronic device displays Figure 5 The interface shown. Figure 5In the interface shown, markers 310 and 320, along with the animation, disappear, leaving area 510 and prompt 520. Area 510 is the size of the image obtained after changing the camera's focal length. Prompt 520 reminds the user to hold the camera steady, indicating that AI composition is in progress.

[0097] The area 510 may include multiple dotted lines to achieve a visually striking effect. Figure 5 In the interface shown, it is used to prompt "AI Master composition is in progress, please hold the camera steady and wait for a while". This is conducive to keeping the captured image unchanged, so that the electronic device can process the captured image to obtain the image that the user wants to use AI composition.

[0098] It should be noted that in Figure 5 In the interface shown, the text in the prompt information 520 is just a specific example and is not limited to this embodiment of the present application.

[0099] Optionally, prompt message 520 may appear a limited number of times when the AI ​​framing function is enabled. For example, after appearing three times, prompt message 520 will no longer appear. Thus, when prompt message 520 appears, it prompts the user to hold the camera steady. After a certain number of appearances, the electronic device determines that the user has learned to hold the camera steady when area 520 appears and that further prompting is unnecessary. Prompt message 520 may be omitted, thereby reducing power consumption of the electronic device.

[0100] Optionally, the electronic device displays Figure 5 When using the interface shown, the image displayed in the preview window 120 can be focused based on the position of the subject in the image, so as to make the subject clearer.

[0101] Electronic device display Figure 5 When the interface is shown, you can use the timer to set the time. When the preset time is reached, you can change the focal length of the camera to capture the image and display the Figure 6 In the interface shown, the image displayed in the preview window 120 in the interface is an image obtained based on the framing range of 2 times the focal length of the camera, and the image is an image after AI composition.

[0102] From the above Figures 3 to 6 As can be seen, when the AI ​​framing function is turned on, the electronic device can obtain the image in preview window 120 based on the camera's framing range of 1x the focal length, and generate markers 310, 320, and prompt information based on the image in preview window 120. When the centers of markers 310 and 320 coincide, the user is prompted to hold the camera steady. After a period of time, the image based on the camera's framing range of 2x the focal length is displayed in preview window 120.

[0103] In this way, based on the image captured by the camera, a suitable composition position is recommended to the user, and the camera can automatically zoom and use the appropriate focal length to capture the image. Taking pictures in this case is conducive to making the captured picture conform to the aesthetic composition and obtaining high-quality images.

[0104] above Figures 3 to 6 In the illustrated scenario, when the AI ​​framing function is enabled, the image displayed in preview window 120 can identify the subject, so the above process is executed. If the image displayed in preview window 120 cannot identify the subject when the AI ​​framing function is enabled, the electronic device may display marker 310 but not marker 320 and the prompt message. Once the subject is identified and the recommended point is calculated, marker 320 and the prompt message may be displayed at the corresponding location.

[0105] Combined with the above Figures 1 to 6 The interface display involved in the embodiment of this application is introduced below. Figure 7 The composition method provided in the embodiments of the present application is introduced.

[0106] For example, Figure 7 FIG1 shows a schematic flow chart of a patterning method provided in an embodiment of the present application. Figure 7 As shown, the method may include the following steps:

[0107] In response to a user turning on the AI ​​composition function, the electronic device may acquire an image 1 in a preview window in real time and perform feature extraction on each subject in the image 1 to determine the shooting scene and the subject. The subjects in the image may also be referred to as elements, which is not limited in this embodiment of the present application.

[0108] The electronic device may include an image recognition algorithm for feature extraction. In response to a user turning on the AI ​​composition function, the electronic device may acquire image 1 in the preview window in real time and input image 1 in the preview window into the image recognition algorithm to perform feature extraction on each subject in image 1. For example, the image recognition algorithm may extract one or more features such as the edge, shape, color, or texture of each subject in image 1. For example, if image 1 includes a person, the image recognition algorithm may extract features such as the person's facial contour and body posture. If image 1 includes a landscape, the image recognition algorithm may extract features such as the edge and texture of landmark objects such as mountains, rivers, and buildings.

[0109] The embodiments of the present application can extract one or more features from the edge, shape, color or texture of each subject in the image. This multi-dimensional feature extraction method is different from the traditional single or simple combination feature extraction method. It can perform comprehensive and detailed feature analysis on each subject in the image. At the same time, the complex analysis model constructed based on these features can deeply explore the intrinsic connection between image elements, and can provide a richer and more accurate data basis for the subsequent determination of shooting scenes, shooting subjects and shooting points.

[0110] Electronic devices may also include deep learning algorithms for scene recognition. The electronic device can input features extracted by the image recognition algorithm into the deep learning algorithm to facilitate scene recognition. For example, based on the extracted features, the deep learning algorithm can determine whether the scene is a person, landscape, animal, sunset, food, or architecture.

[0111] The electronic device may determine the photographing subject based on the photographing scene and / or the extracted features.

[0112] For example, the electronic device may determine the subject of the photograph based on the extracted color features or visual feature information. For example, a subject with a unique or distinct color may be the subject of the photograph. For example, a red flower in a green meadow may be the subject of the photograph due to its unique color.

[0113] For example, the electronic device can determine the subject based on the extracted shape features or shape information. For example, a regular, complete, or uniquely shaped object can be the subject. For example, in a landscape photo, a uniquely shaped mountain can be the subject. Or, in a city street scene, a car with an unusual shape can be the subject.

[0114] For example, the electronic device can determine the subject based on the extracted texture features or texture information. For example, a portion with clear, rich texture or that contrasts with the surrounding environment can be the subject. For example, a starfish on the beach, with its unique texture contrasting with the flat sand, can be the subject.

[0115] For example, the electronic device may determine the subject of the photograph based on the photographing scene. For example, in a human scene, the human may be the subject of the photograph. In a building scene, the building may be the subject of the photograph. In an animal scene, the animal may be the subject of the photograph.

[0116] Image 1 can be the above Figure 1 and Figure 2 In the image displayed in the preview window 120 in the interface shown, the electronic device can recognize that the shooting scene is a human scene based on image 1, and can determine the person 121 as the shooting subject.

[0117] It should be noted that the person 310 may be determined as the shooting subject due to other reasons, for example, the person 121 is complete and the table 121 is incomplete, and this embodiment of the present application does not limit this.

[0118] S702: The electronic device determines a composition strategy corresponding to the current shooting scene based on a preset correspondence between shooting scenes and composition strategies.

[0119] The composition strategy may also be referred to as a composition technique or a shooting technique, which is not limited in the embodiments of the present application.

[0120] The corresponding relationship between the shooting scene and the composition strategy can be a one-to-many or one-to-one relationship, which is not limited in the embodiments of the present application. For example, in a character scene, the composition strategy may include one or more of a central composition, a nine-square composition, a diagonal composition, a triangle composition, a blank composition, a guide line composition or a local composition, that is, the character scene may correspond to one or more of a central composition, a nine-square composition, a diagonal composition, a triangle composition, a blank composition, a guide line composition or a local composition, so as to find an angle that can show the best state of the character's facial expression and body movement. In a landscape scene, the composition strategy may include one or more of a nine-square composition, a symmetrical composition, a curved composition, a blank composition, a foreground composition or a composition from different perspectives (e.g., overhead shooting, overhead shooting), that is, the landscape scene may correspond to one or more of a nine-square composition, a symmetrical composition, a curved composition, a blank composition, a foreground composition or a composition from different perspectives, so as to make the captured scenery have visual impact. In food scenes, composition strategies can include one or more of central composition, eccentric composition, diagonal composition, line of thirds composition, triangular composition, or foreground composition. In animal scenes, composition strategies can include one or more of panoramic and close-up composition, composition from different perspectives (e.g., overhead and downward shots), rule of thirds composition, symmetrical composition, diagonal composition, or well-shaped composition. That is, animal scenes correspond to one or more of the following composition strategies: panoramic and close-up composition, composition from different perspectives, rule of thirds composition, symmetrical composition, diagonal composition, or well-shaped composition.

[0121] If the correspondence between the shooting scene and the composition strategy is a one-to-one relationship, the electronic device can directly determine the composition strategy corresponding to the current shooting scene based on the preset correspondence between the shooting scene and the composition strategy. If the correspondence between the shooting scene and the composition strategy is a one-to-many relationship, the electronic device can obtain multiple composition strategies corresponding to the current shooting scene based on the correspondence between the shooting scene and the composition strategy, and can determine the composition strategy corresponding to the current shooting scene from the multiple composition strategies based on one or more of the position of the shooting subject in the image, the relationship between the shooting subject and other subjects in the image other than the shooting subject, or the visual balance of each subject in the first image.

[0122] Exemplarily, the correspondence between the shooting scene and the composition strategy is a one-to-many relationship, and the current shooting scene is a person scene. The electronic device can obtain multiple composition strategies corresponding to the current shooting scene based on the correspondence between the shooting scene and the composition strategy, and can determine the composition strategy corresponding to the current shooting scene from the multiple composition strategies based on the facial orientation, body posture and layout of the surrounding environment of the person.

[0123] The embodiments of this application utilize complex mathematical models and intelligent algorithms to determine the final composition strategy for each scene, taking into account one or more of the following: the subject's position in the image, the subject's relationship to other subjects in the image, or the visual balance of the subjects in the first image. This algorithm utilizes differentiated processing logic for different scene types and a multi-factor fusion calculation method, resulting in unique technical advantages.

[0124] S703. The electronic device may determine the position of Mark 2 based on the composition strategy corresponding to the current shooting scene, and display Mark 1, Mark 2, and prompt information, wherein Mark 1 is used to indicate the center of the preview window, and Mark 2 is used to mark the composition position when shooting the subject.

[0125] Mark 1 can refer to the above Figure 3 Marker 310 in the interface shown. The position of Marker 1 can be preset or calculated based on the length and width of the image displayed in the preview window, which is not limited in this embodiment of the present application.

[0126] Mark 2 can refer to the above Figure 3 The mark 320 in the interface shown. The prompt information can refer to the above Figure 3 Prompt information 330 in the interface shown.

[0127] Optionally, the electronic device may also add functionalities to the mark 1 and / or the mark 2 .

[0128] S704: The electronic device may also determine the focal length (or zoom factor) corresponding to the current shooting scene based on a preset correspondence between the shooting scene and the focal length.

[0129] The correspondence between the preset shooting scenes and the focal lengths can be a one-to-one correspondence. For example, the focal length corresponding to a human scene is 2x, the focal length corresponding to a landscape scene is 3.5x, and the focal length corresponding to an animal scene is 4x.

[0130] The correspondence between preset shooting scenes and focal lengths is obtained through a large number of experiments and data analysis. At the corresponding focal length, the subject can be effectively highlighted while maintaining the overall beauty and information content of the picture.

[0131] For example, when photographing people, the 2x focal length can clearly show facial details while blurring the background to make the subject stand out more clearly. When photographing landscapes, it can bring key distant objects closer, highlighting the visual focus of the image and creating a more layered effect.

[0132] S705 : When the center points of Mark 1 and Mark 2 coincide with each other, the electronic device may obtain Image 2 in the preview window, and focus on the subject in Image 2 to obtain Image 3 .

[0133] When the center points of markers 1 and 2 coincide, the image 2 captured by the camera of the electronic device may be different from image 1. The electronic device may focus on the subject in image 2 to obtain image 3, which has a higher definition than image 2. For example, image 2 may refer to the above Figure 4 The image displayed in the preview window 120 in the interface shown in FIG. Image 3 can refer to the above Figure 5 The image displayed in the preview window 120 in the interface shown.

[0134] Focusing a subject by an electronic device can include various possible implementations. For example, the electronic device can use phase focus or contrast focus to quickly and accurately focus on the subject, ensuring that the subject appears sharp and clear in the image.

[0135] Optionally, during the focusing process, the electronic device can monitor the motion state of the subject in real time. If the subject moves, the electronic device will automatically adjust the focus position to always keep the subject clear and prepare for subsequent shooting.

[0136] S706: The electronic device may also set the focal length of the camera to the focal length corresponding to the current shooting scene, and display the image captured by the camera after the focal length is changed.

[0137] Furthermore, during the zoom process, the electronic device can also optimize the image captured by the camera in real time, dynamically adjusting image parameters such as color, contrast, and sharpness to ensure that image quality is not affected, maintaining clarity and detail, and helping to avoid image quality degradation caused by zooming. During the zoom process, the electronic device can also focus the image captured by the camera to keep the subject clear and prepare for subsequent shooting.

[0138] In this way, the electronic device can identify the shooting scene and the subject based on the image in the preview window, and can identify the recommended shooting point for the subject, that is, the position of mark 2, so as to guide the user to make a reasonable composition. It can also set a suitable focal length when the center of the picture coincides with the recommended shooting point, which is more reasonable and helps assist users in composing, making the composition of the subject relatively reasonable and improving the quality of the photo.

[0139] Based on the above Figures 1 to 7 The method shown in the embodiment of the present application has the following advantages:

[0140] 1. Improve shooting quality and efficiency

[0141] 1) Precise Composition Guidance: Utilizing a unique shooting point recognition algorithm, the system accurately recommends photo-worthy locations based on different shooting scenarios and image characteristics. This eliminates the need for users to rely on subjective guesswork or limited photographic knowledge to compose their images, significantly improving the accuracy and professionalism of their compositions. For example, when photographing landscapes, the algorithm can identify the most visually striking elements in the image, such as the outline of a mountain or the winding curve of a river, and recommend the optimal shooting point, helping users easily capture artistic landscape photos.

[0142] 2) Auto-zoom to Highlight the Subject: When the user focuses on a recommended shooting point, the camera automatically zooms in. This optimized focal length effectively highlights the subject and blurs the background, creating a professional-looking shot. For example, when photographing people, auto-zoom clearly captures facial details while blurring out background clutter, making the subject stand out more and significantly improving the visual quality of the photo. Furthermore, the entire zoom process is automated, requiring no manual operation from the user, significantly saving time and improving efficiency, allowing users to quickly capture the perfect moment.

[0143] 3) Fast Focus and Image Optimization: High-precision autofocus ensures the subject's clarity within the frame. Combined with an image optimization algorithm during zooming, this ensures optimal color, contrast, and sharpness at all focal lengths. Whether capturing moving subjects or static scenes, the camera delivers clear, detailed, and colorful high-quality photos, meeting the user's high expectations for photography quality.

[0144] 2. Improve user experience

[0145] 1) Lowering the barrier to entry for photography: For photography beginners or ordinary users without professional photography knowledge, the composition assistance and auto-zoom features provided by the embodiments of this application enable them to easily take high-quality photos. Users do not need to spend a lot of time learning complex photography composition techniques and focal length selection methods. They can simply shoot according to the recommended shooting points on the camera interface to achieve satisfactory shooting results. This greatly lowers the barrier to entry for mobile phone photography and allows more people to enjoy the fun of photography.

[0146] 2) Enhanced Operational Convenience: Personalized shooting point identification and real-time, accurate zoom prompts and feedback mechanisms allow users to clearly understand the camera's operating status and shooting guidance during the shooting process. The simple and intuitive interactive design reduces the user's operation steps and cognitive burden, making the shooting process smoother and more convenient. For example, users can quickly adjust the lens position by seeing the recommended shooting point identification at a glance. At the same time, zoom prompts provide real-time information on the zoom effect, enhancing the user's sense of control over the shooting process.

[0147] 3) Adaptability to various shooting scenarios: Whether it is for travel, gatherings, daily life recording, or other various shooting scenarios, the technical solutions of the embodiments of the present application can be effective. Whether shooting different types of subjects such as people, scenery, animals, or food, the intelligent shooting point recognition and automatic zoom function can provide users with appropriate shooting assistance, meet the user's shooting needs in various scenarios, and enhance the user's shooting experience.

[0148] 3. Improve product competitiveness

[0149] 1) Meeting market demand: With the continuous development of the smartphone photography market, users are increasingly demanding smarter and more convenient shooting functions. The embodiments of this application address the pain points of users in shooting composition and focal length selection, providing innovative solutions that can meet the needs of the majority of users in the market for improved mobile phone shooting quality and experience.

[0150] 2) Technological differentiation: Compared to existing mobile phone camera shooting assistance technologies, the shooting point recognition algorithm, autofocus and zoom control technology, and user interface design of the embodiments of this application all possess unique innovations and technical advantages. This technological differentiation can help the product stand out from competitors, establish a unique brand image, and increase its market share and user loyalty.

[0151] In order to better understand the embodiments of the present application, the method provided in the embodiments of the present application is introduced below from the perspective of interface display.

[0152] For example, Figure 8 A schematic diagram of a patterning method provided by an embodiment of the present application is shown. The method can be applied to electronic devices. Figure 8 As shown, the method may include the following steps:

[0153] S801. Display a first interface, which includes a preview window, a photo control, a first mark, and a second mark. The preview window is used to display a first image captured by the camera through a first zoom factor. The first mark is used to mark the center of the preview window. The second mark is used to mark the composition position when shooting the subject in the first image.

[0154] The first interface can refer to the above Figure 3 The preview window can refer to the preview window 120, and the photo control can refer to the shutter control 160. The first mark can refer to the mark 310, the second mark can refer to the mark 320, and the first zoom factor can refer to the Figure 3 The zoom shown is 1x, but the embodiments of the present application are not limited to this.

[0155] The first mark is used to mark the center of the preview window, or in other words, the first mark is used to mark the center of the image captured by the camera, or in other words, the first mark is used to mark the center of the first image, which is not limited in this embodiment of the present application. The second mark is used to mark the composition position when shooting the subject in the first image. It can be understood that the position of the mark at the center of the preview window is the optimal composition position for the current scene. The purpose of the first mark and the second mark is to help the user adjust the captured image to a better composition position.

[0156] Optionally, the position of the above-mentioned second mark can be determined based on the following method: the electronic device determines the shooting scene and the shooting subject of the first image based on the characteristics of the first image, and obtains multiple composition strategies related to the shooting scene of the first image, wherein the characteristics of the first image include one or more of the edges, shapes, colors or textures of each subject in the first image; according to one or more of the position of the shooting subject in the first image, the relationship between the shooting subject and other subjects obtained in the first image except the shooting subject, or the visual balance of each subject in the first image, a target composition strategy is determined from multiple composition strategies; based on the target composition strategy, the position of the second mark is determined.

[0157] The electronic device determines the shooting scene and shooting subject of the first image based on the features of the first image. The specific implementation can refer to the above S701. The target composition strategy can refer to the above Figure 7 The composition strategy corresponding to the current shooting scene shown. The second mark can refer to the above Figure 7 Mark 2 in .

[0158] This is helpful to accurately determine the position of the second mark.

[0159] Optionally, the electronic device includes a second correspondence between the shooting scene and the composition strategy, and the plurality of composition strategies are determined based on the second correspondence and the shooting scene of the first image.

[0160] In the second correspondence, the shooting scene and the composition strategy can have a one-to-many relationship. Multiple composition strategies can be determined based on the second correspondence and the shooting scene of the first image. This simplifies implementation, facilitates rapid acquisition of multiple composition strategies, and reduces latency in displaying the second marker.

[0161] The electronic device may obtain the second correspondence between the shooting scene and the composition strategy in a variety of possible implementations.

[0162] In a possible implementation, the electronic device is preset with a second correspondence between the shooting scene and the composition strategy. For example, the second correspondence may be set when the electronic device leaves the factory.

[0163] In this way, when using the second corresponding relationship, the electronic device can directly call it without the need for signaling interaction, which is conducive to reducing signaling overhead.

[0164] In another possible implementation, the electronic device may request the second corresponding relationship from the server, and the server sends the second corresponding relationship to the electronic device.

[0165] In this way, the electronic device does not need to store the second corresponding relationship in advance, and can obtain it from the server when in use, which is conducive to saving storage space.

[0166] The first image is captured by a camera in the electronic device at a first zoom factor. The first zoom factor can be achieved in a variety of ways.

[0167] In a possible implementation, the first zoom factor is a default zoom factor of the electronic device and has not been adjusted by the user.

[0168] For example, in response to the electronic device opening the camera application, the electronic device may display Figure 1 The interface shown. Figure 1 The interface shown may be a shooting interface of the default shooting mode of the camera application, and the zoom ratio is the default zoom of 1. If the user does not adjust the zoom ratio, the first zoom ratio is the default zoom of 1 of the electronic device.

[0169] In another possible implementation, the first zoom factor is confirmed by the electronic device based on a user operation.

[0170] For example, in response to an operation for setting a 2x zoom, the electronic device may determine that the first zoom factor is 2x. The operation for setting a 2x zoom may be performed before or after the AI ​​framing function is turned on, and this embodiment of the present application does not limit this.

[0171] After the electronic device turns on the AI ​​composition function, it can identify the shooting subject in the first image captured by the camera, and the electronic device can display the first interface to assist the user in composing the picture.

[0172] S802: When the first mark moves to the position of the second mark, both the first mark and the second mark disappear, and a second image captured by the camera at a second zoom factor is displayed in the preview window, where the second zoom factor is different from the first zoom factor.

[0173] When the first mark moves to the position of the second mark, it can be understood that the center point of the first mark coincides with the center point of the second mark. At this time, the shooting picture is adjusted to a better composition position, the functions of the first mark and the second mark are completed, and the electronic device can cancel the display of the first mark and the second mark, that is, the first mark and the second mark disappear. The electronic device can also change the first zoom factor to the second zoom factor, so that the composition effect of the shooting picture can be further optimized. Among them, the second zoom factor can be the same as the first zoom factor, can be less than the first zoom factor, and can also be greater than the first zoom factor, and the embodiments of the present application are not limited to this.

[0174] In some examples, the second zoom factor can refer to the above Figure 6 2x zoom in.

[0175] Optionally, the second zoom factor is related to a shooting scene of the first image, wherein the shooting scene of the first image is a landscape, a person, an animal, a sunset, a building, or a food scene.

[0176] The electronic device may identify a shooting scene of the first image, and determine the second zoom magnification based on an association between the second zoom magnification and the shooting scene of the first image.

[0177] In this way, different shooting scenes use their corresponding zoom ratios for composition, which is conducive to highlighting the shooting subject and optimizing the composition effect.

[0178] In some examples, the electronic device may include a first correspondence between a shooting scene and a zoom factor, and the electronic device may determine a second zoom factor based on the first correspondence and the shooting scene of the first image. The first correspondence between the shooting scene and the zoom factor may be expressed in the form of a list, text, or matrix, and the embodiments of this application do not limit the specific form of expression.

[0179] In this way, the electronic device can determine the second zoom factor through the first corresponding relationship and the shooting scene of the first image, which is simple to implement, conducive to quickly obtaining the second zoom factor and reducing the AI ​​composition delay.

[0180] The electronic device may obtain the first correspondence between the shooting scene and the zoom factor in a variety of possible implementations.

[0181] In a possible implementation, the electronic device is preset with a first correspondence between the shooting scene and the zoom factor. For example, the first correspondence may be set when the electronic device leaves the factory.

[0182] In this way, when using the first corresponding relationship, the electronic device can directly call it without the need for signaling interaction, which is conducive to reducing signaling overhead.

[0183] In another possible implementation, the electronic device may request the first corresponding relationship from the server, and the server sends the first corresponding relationship to the electronic device.

[0184] In this way, the electronic device does not need to store the first corresponding relationship in advance, and can obtain it from the server when in use, which is conducive to saving storage space.

[0185] S803: In response to a triggering operation on the photo-taking control, obtain a third image.

[0186] In response to a triggering operation on the photographing control, the electronic device may determine a third image with reference to the second image.

[0187] In one example, the electronic device can take the second image as the center, take several frames of images before and after it, and fuse them with the second image to obtain a third image. In this way, synthesizing multiple frames to obtain the third image is conducive to improving the image clarity and detail.

[0188] In other examples, the electronic device may perform one or more of denoising, color correction, focusing, or sharpening on the second image to obtain a third image, which is beneficial for improving the quality of the third image.

[0189] The method provided in the embodiment of the present application displays a first mark and a second mark to help users quickly compose pictures. When the first mark moves to the position of the second mark, the zoom factor is changed from the first zoom factor to the second zoom factor, which is conducive to making the captured picture conform to the aesthetic composition.

[0190] Optionally, the above S802, displaying the second image captured by the camera at the second zoom magnification in the preview window, includes: first displaying the fourth image captured by the camera at the first zoom magnification in the preview window, wherein the first interface also includes a first area, and the first area is used to display the size of the second image; after the first time period of displaying the fourth image, the second image is displayed again in the preview window.

[0191] The first area can refer to the above Figure 5 The area 510 shown is the size of the first area. The size of the first area is the size of the second image, which can prompt the user that the image after AI composition is the second image.

[0192] If the fourth image is displayed after the first time period, it means that the user continues to maintain a position to shoot, which can be understood as the user wants to shoot this picture, then the image after AI composition, that is, the second image, can be displayed.

[0193] In this way, before displaying the second image, the fourth image and the first area are displayed to prompt the user that the second image is about to be displayed, which is beneficial to provide a buffer for the user and improve the user experience.

[0194] Optionally, when the fourth image is displayed in the preview window, the first interface further includes a first prompt message, which is used to prompt the user to wait for the smart composition. Figure 5 The fourth image is displayed for a period of time. To prevent the user from moving the electronic device, which may cause the AI ​​composition to fail, the electronic device may display the first prompt information.

[0195] In this way, displaying the first prompt information is helpful in preventing the user from moving the electronic device and reducing the probability of AI composition failure.

[0196] Optionally, the displaying of the first interface includes: displaying the first interface in response to an operation for opening a composition function.

[0197] There are two possible implementation methods for the user to open the A organization diagram function. One method is that the electronic device displays the above Figure 1 In response to the operation of triggering the AI ​​composition control 112, the first interface is displayed. Another way is that the electronic device displays the above Figure 2 When the interface shown is displayed, in response to the operation of triggering the AI ​​composition control 230, the first interface is displayed.

[0198] In this way, the composition function can be turned on or off according to user needs, which is more flexible.

[0199] Optionally, when the first marker moves to the position of the second marker, the above method further includes: applying a first motion effect to the first marker, and after a second time period of displaying the first motion effect, the first marker, the second marker and the first motion effect disappear.

[0200] The first animation can refer to the above Figure 4 In this way, applying the first motion effect on the first mark is helpful to prompt the user that the first mark has moved to the position of the second mark.

[0201] Optionally, when the first image is displayed in the preview window, the above method also includes: applying a second animation effect on the second marker, and when the first marker moves to the position of the second marker, the second animation effect is still displayed on the second marker, and after a second time period of displaying the second animation effect, the first marker, the second marker and the second animation effect disappear.

[0202] The second mark is a recommended shooting point, and the second motion effect is displayed on the second mark, which helps to highlight the second mark.

[0203] Optionally, when the first image is displayed in the preview window, the first interface further includes a second prompt message, and the second prompt message is used to prompt the first mark to be moved to the position of the second mark to perform intelligent composition. Figure 3 The prompt information 330 is shown, but the embodiment of the present application is not limited thereto.

[0204] In this way, the second prompt information prompts the user to move the first mark to the second mark, thereby assisting the user in AI composition.

[0205] The method provided in the embodiment of the present application can be executed by an electronic device. To facilitate understanding of the embodiment of the present application, the hardware structure of the electronic device provided in the embodiment of the present application is introduced below.

[0206] Figure 9 FIG. 1 is a schematic diagram showing the hardware structure of an electronic device provided in an embodiment of the present application. Figure 9 As shown, the electronic device may include a processor 910, an external memory interface 920, an internal memory 921, a universal serial bus (USB) interface 930, a charging management module 940, a power management module 941, an antenna 1, an antenna 2, a mobile communication module 950, a wireless communication module 960, an audio module 970, a speaker 970A, a receiver 970B, a microphone 970C, an earphone interface 970D, a sensor module 980, a button 990, an indicator 991, a camera 992, and a display screen 993, etc.

[0207] Optionally, the above-mentioned sensor module 980 may include a pressure sensor 980A, a gyroscope sensor 980B, an air pressure sensor 980C, a magnetic sensor 980D, an acceleration sensor 980E, a distance sensor 980F, a proximity light sensor 980G, a fingerprint sensor 980H, a temperature sensor 980J, a touch sensor 980K, an ambient light sensor 980L, a bone conduction sensor 980M, etc.

[0208] It is understood that the structures illustrated in the embodiments of the present application do not constitute specific limitations on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0209] The camera 992 may include one or more cameras, all of which may be used to capture images. In one example, the camera 992 may include a front camera and a rear camera. Figure 1 In the interface shown, the electronic device can switch from capturing images through the front camera to capturing images through the rear camera in response to the user triggering the camera flip control 170.

[0210] In another example, the camera 992 may include a main camera, a telephoto camera, and an ultra-wide-angle camera. The main camera may capture images in a 1x optical zoom mode. The telephoto camera may capture images in different telephoto modes. For example, the telephoto camera may capture images in a 2x optical zoom mode, or may capture images in a 4x optical zoom mode, or may capture images in a 10x optical zoom mode. The ultra-wide-angle camera may capture images in an ultra-wide-angle shooting mode.

[0211] For example, in the above Figures 1 to 5 In the interface shown, the electronic device captures images through the main camera in 1x optical zoom mode. Figure 6 In the interface shown, the electronic device captures images through a telephoto camera in 2x optical zoom mode.

[0212] The processor 910 can execute the method provided in the embodiment of the present application, obtain the image captured by the camera 992, and can execute the above Figure 7 The method shown displays the corresponding interface through the display screen 993.

[0213] The electronic device provided in the embodiment of the present application can be deployed with a distributed system, such as a Harmony system or an IOS system. The embodiment of the present application takes the electronic device deployed with the Harmony system as an example to exemplify the software architecture of the electronic device.

[0214] For example, Figure 10 A schematic diagram of the software architecture of an electronic device provided in an embodiment of the present application is shown. Figure 10 As shown, the Harmony system has a layered architecture that divides the Harmony system into several layers, each with clear roles and divisions of labor. Layers communicate with each other via software interfaces. In some embodiments, the Harmony system can be divided into four layers: applications, application framework, system infrastructure services, and kernel.

[0215] The application layer may include a camera application and a gallery application. In an embodiment of the present application, the camera application may include AI composition. In order to implement the AI ​​composition function, the application layer is deployed with a function start-stop module, a recommended point display module, and an automatic focus module. The function start-stop module is used to start or stop AI composition. For example, in the above Figure 1 In the interface shown, when the AI ​​composition function is turned off, in response to the user triggering the AI ​​composition control 112, the function start-stop module can start AI composition and instruct the camera service in the application framework layer to perform AI composition. When the AI ​​composition function is turned on, in response to the user triggering the AI ​​composition control 112, the function start-stop module can stop AI composition and instruct the camera service in the application framework layer to stop AI composition.

[0216] The recommended point display module is used to display the recommended point based on the information related to the recommended point. The recommended point can be understood as the above-mentioned mark 2. The automatic focus module is used to zoom according to the zoom factor.

[0217] The application framework layer provides the Harmony system's applications with a user program framework and meta-capability framework in multiple languages, such as Java / C / C++ / JavaScript, as well as a multi-language framework application programming interface (API) for various software and hardware services. The application framework layer includes some pre-defined functions. Figure 9 As shown, the application framework layer can include a camera service. To support AI composition, the camera service can deploy a function control module and a recommended point reporting module. The function control module is used to transmit information that controls the start and stop of AI composition to the system basic service layer. The recommended point reporting module is used to report information related to recommended points to the recommended point display module.

[0218] The system basic service layer is the core capability set of the Harmony system, which supports the Harmony system to provide services to application services through the framework layer in the scenario of multi-device deployment. Figure 9 As shown, this layer may include a camera hardware abstraction layer (HAL). The camera HAL may include a HAL path and an image signal processor (IPS). The HAL path is used to receive messages about starting and stopping the AI ​​composition. If a message about starting the AI ​​composition is received, the image captured by the camera may be transmitted to the IPS. The IPS may perform feature extraction on the image, determine the shooting scene, the shooting subject, the recommended point, and the appropriate focal length, and may transmit the recommended point and the appropriate focal length to the recommended point reporting module in the camera service. The recommended point reporting module may transmit the recommended point to the target point display module, and transmit the appropriate focal length to the automatic focus module.

[0219] The Harmony system utilizes a multi-kernel design. The kernel layer includes the Linux kernel, the Harmony microkernel, and LiteOS. This design allows devices with varying capabilities to select the appropriate kernel. The kernel layer also includes a kernel abstraction layer (Kernel Abstraction Layer), which provides foundational kernel capabilities for other Harmony layers, such as process management, thread management, memory management, file system management, network management, and peripheral management.

[0220] It should be noted that the module names involved in the embodiments of the present application can be defined as other names as long as the functions of each module can be achieved, and there is no specific restriction on the names of the modules.

[0221] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0222] The composition method of the embodiment of the present application has been described above. The device for performing the above method provided by the embodiment of the present application is described below. Those skilled in the art will understand that the method and device can be combined and referenced with each other, and the relevant device provided by the embodiment of the present application can perform the steps in the above-mentioned list sorting method.

[0223] Figure 11 This is a schematic diagram of the structure of a chip provided in an embodiment of the present application. Figure 11 As shown, the chip 110 includes one or more (including two) processors 1101 , a communication line 1102 , a communication interface 1103 and a memory 1104 .

[0224] In some embodiments, the memory 1104 stores the following elements: executable modules or data structures, or a subset thereof, or an extended set thereof.

[0225] The patterning method described in the above embodiment of the present application can be applied to the processor 1101, or implemented by the processor 1101. The processor 1101 may be an integrated circuit chip with signal processing capabilities. During the implementation process, the various steps of the above patterning method can be completed by the hardware integrated logic circuit in the processor 1101 or the instructions in the form of software. The above-mentioned processor 1101 can be a general-purpose processor (for example, a microprocessor or a conventional processor), a digital signal processor (digital signal processing, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), a field-programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates, transistor logic devices or discrete hardware components. The processor 1101 can implement or execute the methods, steps and logic block diagrams related to each processing disclosed in the embodiment of the present application.

[0226] The steps of the patterning method disclosed in the embodiments of the present application can be directly implemented as a hardware decoding processor, or can be implemented by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the art, such as a random access memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable read only memory (EEPROM). The storage medium is located in the memory 1104, and the processor 1101 reads the information in the memory 1104 and completes the steps of the above method in combination with its hardware.

[0227] The processor 1101 , the memory 1104 , and the communication interface 1103 can communicate with each other via the communication line 1102 .

[0228] In the above embodiment, the instructions stored in the memory for execution by the processor may be implemented in the form of a computer program product, wherein the computer program product may be pre-written in the memory or downloaded and installed in the memory in the form of software.

[0229] The patterning method provided in the embodiments of the present application can be applied to electronic devices. The electronic devices include terminal devices. The specific device form of the terminal device can refer to the above-mentioned related descriptions and will not be repeated here.

[0230] An embodiment of the present application provides a terminal device, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the terminal device to execute the above method.

[0231] The present application provides a chip or chip system. This chip or chip system is applied to an electronic device and includes at least one or more processors configured to invoke computer instructions to execute the technical solutions described in the above embodiments. The implementation principles and technical effects are similar to those of the above-described related embodiments and are not further elaborated here.

[0232] The embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program or instructions. When the computer program or instructions are executed by an electronic device, the above method is implemented. The methods described in the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the functions can be stored as one or more instructions or codes on a computer-readable medium or transmitted on a computer-readable medium. Computer-readable media can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium that can be accessed by a computer.

[0233] In one possible implementation, a computer-readable medium may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage or other magnetic storage devices, or any other medium intended to carry or store the desired program code in the form of instructions or data structures and accessible by a computer. Moreover, any connection is appropriately referred to as a computer-readable medium. For example, if a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technology (such as infrared, radio and microwave) is used to transmit software from a website, server or other remote source, the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology such as infrared, radio and microwave are included in the definition of medium. Disk and optical disc as used herein include optical disc, laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, where disks generally reproduce data magnetically, while optical discs reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0234] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program code runs on an electronic device, the electronic device executes the above method.

[0235] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable device to produce a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0236] The above specific implementation methods further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solutions of the present invention should be included in the scope of protection of the present invention.

Claims

1. A composition method, characterized in that: Applicable to electronic devices with cameras, including: Displaying a first interface, the first interface including a preview window, a photo control, a first mark, and a second mark, the preview window being used to display a first image captured by the camera at a first zoom factor, the first mark being used to mark the center of the preview window, and the second mark being used to mark a composition position when photographing a subject in the first image; When the first marker moves to the position of the second marker, the first marker and the second marker disappear, and a second image captured by the camera at a second zoom factor is displayed in the preview window, where the second zoom factor is different from the first zoom factor; In response to the triggering operation of the photographing control, a third image is obtained.

2. The method according to claim 1, characterized in that The step of displaying the second image captured by the camera at the second zoom factor in the preview window includes: Firstly displaying the fourth image captured by the camera at the first zoom factor in the preview window, wherein the first interface further includes a first area, and the first area is used to display the size of the second image; After the fourth image is displayed for a first period of time, the second image is displayed again in the preview window.

3. The method according to claim 2, characterized in that When the fourth image is displayed in the preview window, the first interface further includes first prompt information, and the first prompt information is used to prompt the user to wait for intelligent composition.

4. The method according to any one of claims 1 to 3, characterized in that The displaying of the first interface includes: In response to an operation for turning on the composition function, the first interface is displayed.

5. The method according to any one of claims 1 to 4, characterized in that When the first mark moves to the position of the second mark, the method further includes: A first motion effect is applied to the first mark, and after a second period of time during which the first motion effect is displayed, the first mark, the second mark, and the first motion effect disappear.

6. The method according to any one of claims 1 to 5, characterized in that When displaying the first image in the preview window, the method further includes: A second motion effect is applied to the second marker, and when the first marker moves to the position of the second marker, the second motion effect is still displayed on the second marker. After a second time period of displaying the second motion effect, the first marker, the second marker, and the second motion effect disappear.

7. The method according to any one of claims 1 to 6, characterized in that When the first image is displayed in the preview window, the first interface further includes second prompt information, and the second prompt information is used to prompt to perform intelligent composition when the first mark is moved to the position of the second mark.

8. The method according to any one of claims 1 to 7, characterized in that The second zoom factor is related to a shooting scene of the first image, where the shooting scene of the first image is a landscape, a person, an animal, a sunset, a building, or a food scene.

9. The method according to claim 8, characterized in that The electronic device includes a first correspondence between a shooting scene and a zoom factor, and the second zoom factor is determined based on the first correspondence and the shooting scene of the first image.

10. The method according to any one of claims 1 to 9, characterized in that The position of the second marker is determined based on the following: Determining a shooting scene and a shooting subject of the first image based on features of the first image, and obtaining a plurality of composition strategies related to the shooting scene of the first image, wherein the features of the first image include one or more of an edge, a shape, a color, or a texture of each subject in the first image; determining a target composition strategy from the plurality of composition strategies based on one or more of a position of the subject in the first image, a relationship between the subject and other subjects in the first image other than the subject, or a visual balance of the subjects in the first image; Based on the target composition strategy, a position of the second mark is determined.

11. The method according to claim 10, characterized in that The electronic device includes a second correspondence relationship between shooting scenes and composition strategies, and the plurality of composition strategies are determined based on the second correspondence relationship and the shooting scene of the first image.

12. An electronic device, characterized in that: The electronic device includes: one or more processors and memory; The memory is coupled to the one or more processors, and is configured to store computer program codes, where the computer program codes include computer instructions. The one or more processors call the computer instructions to enable the electronic device to execute the method according to any one of claims 1 to 11.

13. A chip system, characterized in that: The chip system is applied to an electronic device, and the chip system includes one or more processors, and the one or more processors are used to call computer instructions so that the electronic device executes the method as described in any one of claims 1-11.

14. A computer-readable storage medium, characterized in that The computer-readable storage medium includes computer instructions, and when the computer instructions are executed on an electronic device, the electronic device is caused to perform the method according to any one of claims 1 to 11.

15. A computer program product, characterized in that The computer program product comprises a computer program code, and when the computer program code is run on an electronic device, the electronic device is caused to perform the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Shooting method and equipment

    CN113497890A

  • Composition guidance method and device, electronic equipment and storage medium

    CN114025097A

  • Shooting method and device, electronic equipment and storage medium

    CN117544850A

  • Photographing prompting method and apparatus, and storage medium, and electronic device

    WO2022022259A1

  • Photographing method and apparatus, electronic device, and medium

    WO2024061134A1