Picture resolution configuration method, electronic equipment and storage medium

By storing the corresponding relationship between shooting parameters and picture resolution in the running memory of the camera application, the problem of complex resolution configuration process and large time overhead in the prior art is solved, and more efficient resolution configuration is achieved and user experience is improved.

CN120075601APending Publication Date: 2025-05-30HUAWEI TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202311641422.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-30
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

When configuring resolution for camera applications, existing electronic devices need to obtain and configure across processes, which is expensive and complicated, which affects the user experience.

Method used

By storing a configuration file in the running memory of the camera application, the configuration file records the correspondence between multiple shooting parameters and picture resolution, and the electronic device acquires and uses the configuration file while the camera application is running to simplify the resolution configuration process.

Benefits of technology

It simplifies the process of obtaining and configuring and updating image resolutions for camera applications, improves resolution configuration efficiency, reduces user waiting time, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120075601A_ABST
    Figure CN120075601A_ABST
Patent Text Reader

Abstract

The invention provides a picture resolution configuration method, electronic equipment and a storage medium. When the electronic equipment runs a camera application, a first configuration file is stored in a running memory of the camera application, and the first configuration file records a corresponding relation between a plurality of different shooting parameters and picture resolutions; the electronic device receives and responds to a first operation of a user for the camera application, and obtains a first shooting parameter; the electronic equipment obtains a first configuration file from a running memory of the camera application; the electronic equipment obtains a first picture resolution from the first configuration file based on the first shooting parameter; the electronic device collects a first image with a first image resolution through a camera application; the electronic device displays a first image within a camera application. The process of configuring the resolution for the camera application by the electronic equipment is simplified, and the resolution configuration efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of terminals, and particularly to a method for configuring picture resolution, an electronic device, and a storage medium. Background Art

[0002] With the development of technology, the shooting effect of electronic devices (such as digital cameras, or mobile phones, tablet computers, etc. with cameras) is getting better and better, and using electronic devices to take pictures has become a common choice for people.

[0003] When a user uses an electronic device to take pictures, in order to improve the shooting clarity of the pictures, the user can adjust the camera resolution so that the camera can take pictures of high-definition quality. However, currently, for an electronic device to configure the resolution for a camera application, it is necessary to obtain and configure the resolution across processes from the bottom layer, resulting in a large time overhead. How to simplify the process of configuring the resolution for the camera application on the electronic device and save time remains to be further studied. Summary of the Invention

[0004] This application provides a method for configuring picture resolution, an electronic device, and a storage medium, which simplifies the process of configuring the resolution for the camera application on the electronic device and improves the resolution configuration efficiency.

[0005] In a first aspect, this application provides a method for configuring picture resolution. The method includes: when the electronic device runs a camera application, storing a first configuration file in the running memory of the camera application, where the first configuration file records the corresponding relationships between multiple different shooting parameters and picture resolutions; the electronic device receives and responds to a first operation of the user on the camera application to obtain a first shooting parameter; the electronic device obtains the first configuration file from the running memory of the camera application; the electronic device obtains a first picture resolution from the first configuration file based on the first shooting parameter; the electronic device acquires a first image at the first picture resolution through the camera application; the electronic device displays the first image within the camera application.

[0006] Optionally, the electronic device can display the first image in the preview window of the camera application.

[0007] In some embodiments, after the camera application is closed, the first configuration file stored in the running memory of the camera application will be cleared. When the camera application runs again, the camera application loads the first configuration file into the running memory of the camera application again.

[0008] Through this method, the electronic device 100 can store the resolution information supported by the camera application in the first configuration file. After the camera application runs, the electronic device 100 stores the first configuration file in the running memory of the camera application. When the camera application needs to reconfigure the picture resolution, the camera application only needs to obtain the updated picture resolution from the first configuration file, which simplifies the process of the camera application obtaining the updated picture resolution and also speeds up the speed of the camera application obtaining the updated picture resolution.

[0009] Combined with the first aspect, in a possible implementation manner, after the electronic device runs the camera application and before storing the first configuration file in the running memory of the camera application, the method further includes: the electronic device obtains the first configuration file from the file system of the camera application.

[0010] The first configuration file is stored in the file system of the camera application. When the camera application runs, the camera application can obtain the first configuration file from the file system of the camera application and store it in the running memory of the camera application.

[0011] Combined with the first aspect, in a possible implementation manner, the first shooting parameter includes the shooting parameter of the camera application in the preview state corresponding to the first shooting mode. After the electronic device obtains the first configuration file, the method further includes: the electronic device obtains a second shooting parameter, where the second shooting parameter includes the shooting parameter of the camera application in the shooting state corresponding to the first shooting mode; the electronic device obtains the first configuration file from the running memory of the camera application; the electronic device obtains a second picture resolution from the first configuration file based on the second shooting parameter.

[0012] In other possible implementation manners, the camera application may also not obtain the second picture resolution first and then obtain the second picture resolution after detecting the user's operation on the shutter button. The present application does not limit this.

[0013] In this way, the camera application can obtain the second picture resolution in advance before detecting the user's operation on the shutter button, so as to speed up the camera application's response to the user's operation on the shutter button and improve the user experience.

[0014] Combined with the first aspect, in a possible implementation manner, the method further includes: the electronic device receives a second operation of the user on the shutter button in the camera application; in response to the second operation, the electronic device captures a second image or a second video at the second picture resolution; the electronic device saves the second image or the second video.

[0015] In this way, the camera application can obtain the second picture resolution in advance before detecting the user's operation on the shutter key. When the camera application detects the user's operation on the shutter key, it captures the second image or the second video at the second picture resolution obtained in advance, so as to speed up the response of the camera application to the user's operation on the shutter key and improve the user experience.

[0016] Combined with the first aspect, in a possible implementation manner, the second picture resolution is greater than the first picture resolution.

[0017] Generally speaking, users have low requirements for the clarity of preview images. The camera application can capture preview images at a relatively low picture resolution, which can save the power consumption of the electronic device and will not exceed the screen resolution of the electronic device.

[0018] Combined with the first aspect, in a possible implementation manner, the first operation includes any one or more of the following: changing the shooting mode of the camera application, changing the display state of the electronic device, changing the camera type, and changing the picture ratio.

[0019] Combined with the first aspect, in a possible implementation manner, before the electronic device receives and responds to the user's first operation on the camera application, the method further includes: the electronic device obtains the first configuration file from the running memory of the camera application; the electronic device obtains the third shooting parameter and obtains the third picture resolution from the first configuration file based on the third shooting parameter; the electronic device captures the third image at the third picture resolution through the camera application; the electronic device displays the third image in the camera application.

[0020] In a possible implementation manner, the third shooting parameter includes the shooting parameter of the camera application in the preview state corresponding to the default shooting mode; the method further includes: the electronic device obtains the fourth shooting parameter, where the fourth shooting parameter includes the shooting parameter of the camera application in the shooting state corresponding to the default shooting mode; the electronic device obtains the first configuration file from the running memory of the camera application; the electronic device obtains the fourth picture resolution from the first configuration file based on the fourth shooting parameter.

[0021] In some embodiments, the third picture resolution may be referred to as the initial preview resolution, and the fourth picture resolution may be referred to as the initial shooting resolution.

[0022] In this way, when the camera application is first started, before the user changes the shooting parameters, the camera application can obtain the initial preview resolution and the initial shooting resolution, and capture preview images at the initial preview resolution.

[0023] Optionally, the camera application can also only obtain the initial preview resolution without obtaining the initial shooting resolution. When detecting the user's operation on the shutter key, the camera application obtains the initial shooting resolution again.

[0024] Optionally, after obtaining the first configuration file, the camera application may also obtain the initial shooting resolution from the first configuration file based on the initial shooting parameters.

[0025] Combined with the first aspect, in a possible implementation, the electronic device periodically / irregularly obtains a second configuration file from the server, and the second configuration file is partially or completely different from the first configuration file.

[0026] In this way, the first configuration file of the camera application stored on the electronic device can be updated periodically / irregularly.

[0027] In some embodiments, the content of the configuration file is related to the device model. The content of the configuration files corresponding to different device models may be different. In other embodiments, the content of the configuration files corresponding to different device models may also be the same, and the present application does not limit this.

[0028] Combined with the first aspect, in a possible implementation, the shooting parameters include any one or more of the following: shooting state, shooting mode, device display screen state, camera type, and picture ratio.

[0029] In a second aspect, the present application provides an electronic device, which includes a camera, a memory, and a processor; wherein, the camera, the memory, and the processor are coupled, and the memory is used to store a computer program. When the processor executes and calls the computer program, the electronic device executes a picture resolution configuration method provided in any possible implementation of the first aspect.

[0030] In a third aspect, the present application provides a computer-readable storage medium, including instructions. When the instructions run on the electronic device, the electronic device executes a picture resolution configuration method provided in any possible implementation of the first aspect.

[0031] In a fourth aspect, the present application provides a computer program product containing instructions. When the above computer program product runs on the electronic device, the electronic device executes a picture resolution configuration method provided in any possible implementation of the first aspect above.

[0032] In a fifth aspect, the present application provides a chip system, which includes one or more processors. The processors are used to call computer instructions to make the electronic device execute a picture resolution configuration method provided in any possible implementation of the first aspect above.

[0033] For the description of the beneficial effects of the second aspect to the fifth aspect, reference may be made to the description of the beneficial effects in the first aspect, and the present application will not repeat them here. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figures 1A - 1D Schematic diagrams showing various shooting ratios;

[0035] Figures 2A - 2C 、 Figures 3A - 3C Schematic diagram showing the display form of a folding screen;

[0036] Figures 3D - 3F Schematic diagram showing the display form of an up-and-down folding screen;

[0037] Figure 4 Schematic diagram showing the display form of an extended screen;

[0038] Figure 5 Schematic diagram showing an electronic device 100 configuring the picture resolution for a camera application;

[0039] Figure 6 Schematic diagram showing the structure of the electronic device 100;

[0040] Figure 7 It is the software structure block diagram of the electronic device 100 according to the embodiment of the present invention;

[0041] Figures 8A - 8B Schematic diagram showing the electronic device 100 turning on the camera application;

[0042] Figure 9 Schematic diagram showing the method flow of the electronic device 100 configuring the picture resolution for the camera application after the camera application is turned on;

[0043] Figures 10 - 13 Schematic diagrams showing several picture resolution configuration files;

[0044] Figure 14 Schematic diagram showing the method flow of an electronic device 100 provided by the present application for updating the picture resolution of the camera application based on user operations;

[0045] Figure 15 Schematic diagram showing the method flow of a picture resolution configuration method provided by the present application. Detailed implementation manners

[0046] Next, the technical solutions in the embodiments of the present application will be clearly and elaborately described with reference to the accompanying drawings. Among them, in the description of the embodiments of the present application, unless otherwise specified, " / " means "or". For example, A / B may mean A or B; "and / or" in the text is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B may mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality" means two or more than two.

[0047] Hereinafter, the terms "first" and "second" are only used for descriptive purposes and should not be construed as implying or suggesting relative importance or implicitly indicating the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present application, unless otherwise specified, the meaning of "a plurality" is two or more.

[0048] The term "user interface (UI)" in the following embodiments of the present application is a media interface for interaction and information exchange between an application or an operating system and a user, and it realizes the conversion between the internal form of information and the form acceptable to the user. The common manifestation form of the user interface is the graphic user interface (GUI), which refers to the user interface related to computer operations displayed in a graphic manner. It can be visible interface elements such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, Widgets, etc. displayed on the display screen of the wearable device.

[0049] First, the technical terms involved in the present application are explained.

[0050] 1. Picture ratio and picture resolution.

[0051] The picture resolution can be obtained from the number of pixels in the horizontal direction and the number of pixels in the vertical direction of the picture. For example, a picture of 1920x1080 can be composed of 1920 pixels in the horizontal direction and 1080 pixels in the vertical direction.

[0052] The picture ratio can be obtained from the ratio of the number of pixels in the vertical direction and the number of pixels in the horizontal direction of the picture. For example, the picture ratio of a 1920x1080 picture can be 16:9.

[0053] One picture ratio can correspond to one or more different picture resolutions, and one picture resolution only corresponds to one picture ratio.

[0054] The camera application can support multiple picture ratios. For example, multiple picture ratios can include but are not limited to: 1:1, 4:3, 16:9, and full screen, etc. Among them, the picture ratio in full screen can be 21:9, and the picture ratios in full screen of different types of electronic devices can be different. The present application takes the picture ratio in full screen can be 21:9 as an example for illustration.

[0055] Among them, under the picture ratio of 1:1, it can correspond to one or more different picture resolutions, such as 1080×1080, 960×960, etc.

[0056] Under the 4:3 picture ratio, one or more different picture resolutions can be corresponding, such as 1440x1920, 1200×1600, 960×1280, 480×640, etc.

[0057] Under the 16:9 picture ratio, one or more different picture resolutions can be corresponding, such as 1080×1920, 900×1600, 720×1280, 540×960, and 360×640.

[0058] Under the full-screen picture ratio, one or more different picture resolutions can be corresponding, such as 823×1920, 463×1080, 412×960, etc.

[0059] Figures 1A - 1D A schematic diagram showing multiple shooting ratios is shown.

[0060] Among them, Figure 1A It shows that in the camera mode, the user selects a 4:3 picture ratio to take a picture. As Figure 1A shown, the length of the viewfinder is b and the width is a, b:a = 4:3. Among them, the width of the display screen of the electronic device can be a.

[0061] Among them, Figure 1B It shows that in the camera mode, the user selects a 1:1 picture ratio to take a picture. As Figure 1B shown, the length of the viewfinder is c and the width is a, c:a = select 1:1.

[0062] Among them, Figure 1C It shows that in the camera mode, the user selects a 16:9 picture ratio to take a picture. As Figure 1C shown, the length of the viewfinder is d and the width is a, d:a = 16:9.

[0063] Among them, Figure 1D It shows that in the camera mode, the user selects a full-screen picture ratio to take a picture. As Figure 1D shown, the length of the viewfinder is e and the width is a, e:a = 21:9. Among them, the length of the display screen of the electronic device can be e.

[0064] 2. Shooting mode

[0065] The shooting mode can include a camera mode and a video recording mode.

[0066] The camera mode can include but is not limited to any one or more of the following: normal camera mode, portrait camera mode, high-definition camera mode, night scene camera mode, panoramic camera mode, etc.

[0067] Optionally, when the camera application is first launched, the default shooting mode of the camera application is the normal camera mode.

[0068] Optionally, the same shooting mode can be divided into different shooting states. For example, the normal shooting mode can be divided into a preview state and a non-preview state. The portrait shooting mode can also be divided into a preview state and a non-preview state. The high-definition shooting mode can also be divided into a preview state and a non-preview state. The night scene shooting mode can also be divided into a preview state and a non-preview state. The panoramic shooting mode can also be divided into a preview state and a non-preview state. Optionally, some shooting modes may not distinguish between the non-preview state and the preview state, and the present application does not limit this.

[0069] The video recording mode can include, but is not limited to, any one or more of the following: normal video recording mode, delayed video recording mode, slow motion video recording mode, etc.

[0070] Optionally, the same video recording mode can be divided into different shooting states. For example, the normal video recording mode can be divided into a preview state and a non-preview state. The delayed video recording mode can also be divided into a preview state and a non-preview state. The slow motion video recording mode can also be divided into a preview state and a non-preview state. Optionally, the video recording mode may not distinguish between the non-preview state and the preview state, and the present application does not limit this.

[0071] Different shooting modes can correspond to one picture ratio or multiple picture ratios. When a certain shooting mode supports multiple picture ratios, the user can choose to switch between different picture ratios.

[0072] Exemplarily, in the normal shooting mode, the user can choose a picture ratio of 1:1, or can also choose a picture ratio of 4:3.

[0073] 3. Forms of the electronic device display screen

[0074] In the present application, the form of the electronic device display screen can include: a straight display screen, a folding screen, and an expandable screen. Among them, the folding screen can be further divided into an inward folding screen, an outward folding screen, an up-and-down folding screen, etc. In some embodiments, the folding screen can also be a double-fold screen, etc.

[0075] The display area of the straight display screen is fixed and unchanged. Figures 1A - 1D The device form shown in is a straight phone.

[0076] In some embodiments, the straight display screen can also be referred to as an upright display screen. As Figures 1A - 1D shown, the shape of the straight display screen is fixed, non-retractable, and non-foldable.

[0077] Figures 2A - 2C 、 Figures 3A - 3C shows a schematic diagram of the display form of the folding screen.

[0078] The foldable screen can be further divided into an inward-foldable screen and an outward-foldable screen. The display forms of the inward-foldable screen and the outward-foldable screen can be divided into a folded state and an unfolded state. Among them, the folded states of the inward-foldable screen and the outward-foldable screen can be divided into an intermediate folding state and a fully folded state.

[0079] Among them, Figures 2A - 2C shows a schematic diagram of the display form of the inward-foldable screen.

[0080] Figure 2A shows a schematic diagram of the display form of the inward-foldable screen when it is in the unfolded state.

[0081] Figure 2A In (a) of [reference], it exemplarily shows a front view of the inward-foldable screen when it is in the unfolded state. Among them, when the inward-foldable screen is in the unfolded state, the displayable screen of the foldable screen includes screen A, screen B, and screen C. Screen A and screen B can be a complete display screen or two independent display screens. Among them, in the fully folded state, the display areas where screen A and screen B are located can also be referred to as the large screen, and the display areas where screen A and screen B are located can also be referred to as the inner screen. Exemplarily, when the inward-foldable screen is in the unfolded state, the included angle α between screen A and screen B is greater than angle one and less than or equal to 180 degrees. Exemplarily, the value of angle one can be between 170 degrees and 180 degrees. For example, when the inward-foldable screen is in the unfolded and folded state, the included angle α between screen A and screen B can be 180 degrees.

[0082] Figure 2A In (b) of [reference], it exemplarily shows a rear view of the inward-foldable screen when it is in the unfolded and folded state. When the inward-foldable screen is in the unfolded state, the display screen of the foldable screen further includes screen C. Among them, screen C is a display screen completely independent of screen A and screen B.

[0083] Figures 2B - 2C shows a schematic diagram of the display form of the inward-foldable screen when it is in the folded state.

[0084] Among them, Figure 2B The folded state of the foldable screen shown can also be referred to as the intermediate folding state.

[0085] The inward-foldable screen can be bent in the direction where screen A and screen B face each other to form a folded form with a certain included angle. When the inward-foldable screen is in the intermediate folding state, the displayable screen of the foldable screen includes screen A, screen B, and screen C. Among them, in the intermediate folding state, the display areas where screen A and screen B are located can also be referred to as the large screen, and the display areas where screen A and screen B are located can also be referred to as the inner screen. The included angle α between screen A and screen B is greater than or equal to angle two and less than angle one. For example, the value of angle two can be between 10 degrees and 170 degrees. For example, when the inward-foldable screen is in the intermediate folding state, the included angle α between screen A and screen B can be 120 degrees.

[0086] Among them, Figure 2CThe folded state of the foldable screen shown can also be referred to as the fully folded state.

[0087] The inward foldable screen can continue to bend in the direction where screen A and screen B face each other until the inward foldable screen is in the fully folded state.

[0088] As Figure 2C shown, when the inward foldable screen is in the fully folded state, the displayable screen of the inward foldable screen only includes screen C. Among them, in the fully folded state, the display area where screen C is located can also be referred to as the small screen, and the display area where screen C is located can also be referred to as the outer screen. Screen A and screen B are hidden and not visible. Among them, in the intermediate folded state, the display areas where screen A and screen B are located can also be referred to as the large screen, and the display areas where screen A and screen B are located can also be referred to as the inner screen. The included angle α between screen A and screen B is greater than or equal to 0 degrees and less than angle two. For example, when the inward foldable screen is in the fully folded state, the included angle α between screen A and screen B can be 0 degrees.

[0089] Figures 3A - 3C Shows a schematic diagram of the display form of the outward foldable screen.

[0090] Figure 3A Shows a schematic diagram of the display form of the outward foldable screen when it is in the unfolded state.

[0091] Figure 3A In (a), an exemplary front view of the outward foldable screen when it is in the unfolded state is shown. Among them, when the outward foldable screen is in the unfolded state, the displayable screen of the foldable screen includes screen A and screen B. Screen A and screen B can be a complete display screen or two independent display screens. Exemplarily, when the inward foldable screen is in the unfolded state, the included angle α between screen A and screen B is greater than angle three and less than or equal to 180 degrees. Exemplarily, the value of angle three can be between 170 degrees and 180 degrees. Exemplarily, if the value of angle three is 180 degrees, when the outward foldable screen is in the unfolded state, the included angle α between screen A and screen B can be 180 degrees.

[0092] Figure 3A In (b), an exemplary back view of the outward foldable screen when it is in the unfolded state is shown. When the outward foldable screen is in the unfolded state, compared with when the inward foldable screen is in the unfolded state, the display screen of the outward foldable screen does not include screen C.

[0093] Figures 3B - 3C Shows a schematic diagram of the display form of the outward foldable screen when it is in the folded state.

[0094] Among them, Figure 3B The folded state of the foldable screen shown can also be referred to as the intermediate folded state.

[0095] The outer folding screen can be folded in the direction opposite to the A screen and the B screen to form a folded state with a certain included angle. That is, the folding directions of the outer folding screen and the inner folding screen are opposite. When the outer folding screen is in the intermediate state, the displayable screens of the folding screen include the A screen and the B screen, and the included angle α between the A screen and the B screen is greater than or equal to angle four and less than or equal to angle three. Exemplarily, the value of angle four can be between 10 degrees and 170 degrees. For example, when the outer folding screen is in the intermediate folding state, the included angle α between the A screen and the B screen can be 120 degrees.

[0096] Among them, Figure 3C The folding state of the folding screen shown can also be referred to as the fully folded state.

[0097] Such as Figure 3C As shown, when the outer folding screen is in the folded state, the displayable screen of the folding screen can be the B screen (or the displayable screen can also be the A screen). Exemplarily, when the inner folding screen is in the fully folded state, the A screen is in the off state (or the B screen is in the off state), and the included angle α between the A screen and the B screen is greater than or equal to 0 degrees and less than angle four. Exemplarily, the value of angle four can be between 0 degrees and 10 degrees. Exemplarily, when the outer folding screen is in the fully folded state, the included angle α between the A screen and the B screen can be 0 degrees.

[0098] Figures 3D - 3F Shows a schematic diagram of the display form of the up-and-down folding screen.

[0099] Figure 3D Shows a schematic diagram of the display form when the up-and-down folding screen is in the unfolded state. Among them, when the up-and-down folding screen is in the unfolded state, the displayable screens of the folding screen include the A screen and the B screen. The A screen and the B screen can be a complete display screen or two independent display screens. Exemplarily, when the inner folding screen is in the unfolded state, the included angle α between the A screen and the B screen is greater than angle three and less than or equal to 180 degrees. Exemplarily, the value of angle three can be between 170 degrees and 180 degrees. Exemplarily, if the value of angle three is 180 degrees, when the outer folding screen is in the unfolded state, the included angle α between the A screen and the B screen can be 180 degrees.

[0100] Figures 3E - 3F Shows a schematic diagram of the display form when the up-and-down folding screen is in the folded state.

[0101] Among them, Figure 3E The folding state of the up-and-down folding screen shown can also be referred to as the intermediate folding state.

[0102] The up-and-down folding screen can be bent in the direction where screen A and screen B face each other to form a folding state with a certain included angle. When the up-and-down folding screen is in the intermediate state, the displayable screens of the up-and-down folding screen include screen A and screen B, and the included angle α between screen A and screen B is greater than or equal to angle four and less than or equal to angle three. Exemplarily, the value of angle four can be between 10 degrees and 170 degrees. For example, when the up-and-down folding screen is in the intermediate folding state, the included angle α between screen A and screen B can be 120 degrees.

[0103] Among them, Figure 3F The folding state of the up-and-down folding screen shown can also be referred to as the fully folded state.

[0104] Such as Figure 3F As shown, the up-and-down folding screen can continue to be bent outward in the direction where screen A and screen B face each other. When the outer folding screen is in the folded state, screens A and B of the up-and-down folding screen are hidden and invisible. Exemplarily, when the up-and-down folding screen is in the fully folded state, both screen A and screen B are in the off-screen state, and the included angle α between screen A and screen B is greater than or equal to 0 degrees and less than angle four. Exemplarily, the value of angle four can be between 0 degrees and 10 degrees. Exemplarily, when the up-and-down folding screen is in the fully folded state, the included angle α between screen A and screen B can be 0 degrees.

[0105] Exemplarily, in some embodiments, the up-and-down folding screen may further include screen C. Screen C is located on the back of screen A or screen B. When the up-and-down folding screen is in the unfolded state, screen C is in the off-screen state. When the up-and-down folding screen is in the folded state, screen C is in the on-screen state.

[0106] Figure 4 Shows a schematic diagram of the display form of the extended screen.

[0107] In some cases, the extended screen can also be called a scroll screen. The scroll screen of the electronic device can be pulled out or retracted in a direction perpendicular to the scroll, changing the screen length of the scroll screen in the direction perpendicular to the scroll.

[0108] The form of the scroll screen can be divided into an unfolded state, a semi-unfolded state, and a fully unfolded state. Among them, Figure 4 (a) in shows a schematic diagram of the unfolded state of the scroll screen. When the scroll screen is in the unfolded state, a part of the screen of the scroll screen is hidden inside the body of the electronic device, and the electronic device can display the interface of the application on the other unfolded part of the screen. At this time, the screen length is length one. The part of the screen of the scroll screen hidden inside the body can extend in a specified direction (for example, the arrow direction shown in the figure). When the screen of the scroll screen is not fully unfolded, the scroll screen is in the semi-unfolded state, as shown in Figure 4As shown in (b) thereof. When the scroll screen is in the semi-expanded state, the part of the screen hidden inside the body of the scroll screen decreases, and the part of the screen exposed on the surface of the body increases until the entire scroll screen is exposed on the surface of the body. When the entire scroll screen is exposed on the surface of the body, the scroll screen is in the fully-expanded state, as Figure 4 shown in (c) thereof. At this time, the length of the screen is the second length. Among them, the second length is greater than the first length. It can be understood that when the length of the screen is greater than the first length and less than the second length, the scroll screen is in the semi-expanded state.

[0109] It should be noted that in the embodiment of the present application, the scroll screen can expand the screen in the first direction perpendicular to the scroll, from the unexpanded state, through the semi-expanded state, to the fully-expanded state. Similarly, the scroll screen can also retract the screen in the second direction perpendicular to the scroll, from the fully-expanded state, through the semi-expanded state, to the unexpanded state. Among them, the first direction and the second direction are opposite.

[0110] Optionally, it is not limited to pulling out the scroll screen of the electronic device horizontally to the right perpendicular to the scroll. In some embodiments, the scroll screen of the electronic device can also be pulled out horizontally to the left perpendicular to the scroll.

[0111] Optionally, in some embodiments, the scroll of the electronic device can also be in the horizontal direction, and the electronic device can also pull out the scroll screen upward or downward perpendicular to the scroll. The embodiment of the present application does not limit this.

[0112] Based on the above introduction, the display screen of the electronic device can include: a straight display screen, a folding screen, and an extended screen. Among them, the display area sizes of the display screens of different forms of electronic devices are different, and the picture ratios supported by the camera application may be the same or different.

[0113] For example, when the display screen of the electronic device is a straight display screen, the straight display screen only includes one display state. Therefore, for the straight display screen, the picture ratios supported by the camera application can be determined. For example, it can include various picture ratios such as 1:1, 4:3, and 16:9.

[0114] For another example, when the display screen of the electronic device is a folding screen, when the folding screen is in Figure 2C or Figure 3C the folding state shown, the picture ratios supported by the camera application can include various picture ratios such as 1:1, 4:3, and 16:9. When the folding screen is in Figure 2A or Figure 3A the unfolded state shown, the display area of the display screen of the electronic device becomes larger, and the picture ratios supported by the camera application can include various picture ratios such as 1:1 and 8:7.

[0115] For another example, when the display screen of the electronic device is an extended screen, when the extended screen is in Figure 4When in the folded state as shown in (a), the picture ratios supported by the camera application may include multiple picture ratios such as 1:1, 4:3, and 16:9. When the extended screen is in Figure 4 the unfolded state as shown in (c), the display area of the display screen of the electronic device becomes larger, and the picture ratios supported by the camera application may include multiple picture ratios such as 1:1 and 8:7.

[0116] Figure 5 FIG. shows a schematic diagram of an electronic device 100 configuring a picture resolution for a camera application.

[0117] S5001. In response to a user operation to start the camera application, the camera application sends a picture resolution configuration request to the HAL layer.

[0118] Exemplarily, the user operation to start the camera application may be a user operation on the camera application icon on the desktop, such as a click operation.

[0119] In response to a user operation to start the camera application, the camera application sends a picture resolution configuration request to the HAL layer. This request is used to obtain a list of picture resolutions supported by the camera application.

[0120] S5002. In response to the picture resolution configuration request, the HAL layer obtains a list of picture resolutions supported by the camera application.

[0121] In response to the picture resolution configuration request, the HAL layer may obtain a list of picture resolutions supported by the camera application.

[0122] Table 1

[0123]

[0124]

[0125] Table 1 exemplarily shows the list of picture resolutions supported by the camera application obtained by the HAL layer. As shown in Table 1, in the case of a picture ratio of 1:1, the picture resolutions may include 1080×1080 and 960×960. In the case of a picture ratio of 4:9, the picture resolutions may include 1440x1920, 1200×1600, 960×1280, and 480×640. In the case of a picture ratio of 16:9, the picture resolutions may include 1080×1920, 900×1600, 720×1280, 540×960, and 360×640. In the case of a picture ratio of 21:9, the picture resolutions may include 823×1920, 463×1080, and 412×960.

[0126] After obtaining the list of image resolutions supported by the camera application, the HAL layer then sends the list of image resolutions supported by the camera application to the camera application.

[0127] S5003. The HAL layer sends the list of image resolutions to the camera application.

[0128] The shooting parameters may include but are not limited to information such as the icon ratio. Exemplarily, the picture ratio may be 4:3.

[0129] S5004. The camera application filters out an image resolution from the list of image resolutions based on the shooting parameters.

[0130] The camera application can obtain the image resolution that matches the picture 4:3 from the obtained list of image resolutions. Exemplarily, the camera application generally uses the first-matched image resolution as the image resolution configured for the camera application and does not traverse other image resolutions. For example, if the camera application first matches the image resolution of 1440x1920 based on the picture ratio of 4:3, the camera application can determine that 1440x1920 is the finally selected image resolution.

[0131] S5005. The camera application sends the matched image resolution to the HAL layer.

[0132] S5006. The HAL layer sends the image resolution to the camera module driver so that the camera module can capture images according to this image resolution.

[0133] After determining the image resolution, the camera application then sends the matched image resolution to the HAL layer. The HAL layer then sends this image resolution to the camera module driver so that the camera module driver can control the camera module to capture images according to this image resolution.

[0134] In some embodiments, when the user changes the shooting parameters of the camera application, for example, when switching the picture ratio from 4:3 to 16:9, the camera application needs to Figure 5 re-obtain the list of image resolutions uploaded by the HAL layer and re-match to obtain the image resolution again in the manner shown.

[0135] From Figure 5As can be seen from the embodiments, the camera application determines the picture resolution depending on the list of picture resolutions supported by the camera application reported by the HAL layer. The interaction between the camera application and the HAL layer requires cross-process communication, resulting in a relatively long time for the camera application to obtain the picture resolution, and the camera application cannot obtain the picture resolution in a timely manner. From the perspective of the interface display, for example, after the electronic device 100 activates the camera application based on a user operation, the camera application needs to wait for a period of time before it can display the camera preview screen. Another example is that after the electronic device 100 changes the shooting parameters of the camera application based on a user operation, the camera application also needs to wait for a period of time before it can display the preview screen based on the updated shooting parameters, which results in a poor user experience.

[0136] Based on the above analysis, the present application provides a method for configuring picture resolution, an electronic device, and a storage medium. The method may include the following steps:

[0137] Step 1: The electronic device 100 receives a user operation to activate the camera application. In response to the user operation, the electronic device 100 obtains a first configuration file and stores the first configuration file in the running memory of the camera application, where the first configuration file records the corresponding relationships between multiple picture resolutions supported by the camera application and shooting parameters.

[0138] Among them, in the first configuration file, the shooting parameters and picture resolutions may be stored in the form of key-value. Among them, the key may refer to the shooting parameters of the camera application, and the value may refer to the picture resolution of the camera application.

[0139] Among them, the shooting parameters may include but are not limited to any one or several of the following: shooting state, shooting mode, device display screen state, camera, picture ratio, etc.

[0140] For the introduction of the first configuration file, reference may be made to Figures 10 - 13 the description of the embodiments, which will not be elaborated herein.

[0141] Optionally, before the camera application is started and running, the first configuration file may be stored in the disk. For example, the first configuration file may be stored in the file system corresponding to the camera application in the disk.

[0142] Optionally, the first configuration file may be related to the device model. The content of the first configuration file stored in different device models may be different. In other embodiments, the content of the first configuration file stored in different device models may also be the same, and the present application does not make any limitations in this regard.

[0143] Step 2: The electronic device 100 obtains the initial shooting parameters, and based on the initial shooting parameters, matches and obtains the initial resolution from the first configuration file. The camera application acquires and displays images at the initial resolution.

[0144] In other embodiments, the electronic device 100 may change the shooting parameters based on user operations. The camera application may obtain the updated shooting parameters and match the updated resolution from the first configuration file based on the updated shooting parameters. The electronic device 100 may collect and display images based on the updated resolution.

[0145] By this method, the electronic device 100 may store the resolution information supported by the camera application in the first configuration file. After the camera application runs, the electronic device 100 stores the first configuration file in the running memory of the camera application. When the camera application needs to reconfigure the picture resolution, the camera application only needs to obtain the updated picture resolution from the first configuration file, which simplifies the process of the camera application obtaining the updated picture resolution and also speeds up the speed of the camera application obtaining the updated picture resolution.

[0146] The following introduces the hardware structure of an electronic device 100 provided in the embodiments of the present application.

[0147] Figure 6 The structural schematic diagram of the electronic device 100 is shown.

[0148] The following takes the electronic device 100 as an example to specifically illustrate the embodiments. It should be understood that Figure 6 The shown electronic device 100 is only an example, and the electronic device 100 may have more or fewer components than Figure 6 those shown, may combine two or more components, or may have different component configurations. Figure 6 The various components shown may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and / or application specific integrated circuits.

[0149] The electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0150] It can be understood that the structure schematically shown in the embodiments of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0151] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modulation and demodulation processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0152] Among them, the controller may be the nerve center and command center of the electronic device 100. The controller may generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching instructions and executing instructions.

[0153] A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can hold the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can directly call it from the said memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0154] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0155] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 can be coupled to the touch sensor 180K through the I2C interface, enabling the processor 110 to communicate with the touch sensor 180K through the I2C bus interface to implement the touch function of the electronic device 100.

[0156] The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple groups of I2S buses. The processor 110 can be coupled to the audio module 170 through the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the I2S interface to implement the function of answering a phone call through a Bluetooth headset.

[0157] The PCM interface can also be used for audio communication to sample, quantize, and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled through the PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface to implement the function of answering calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0158] The UART interface is a general-purpose serial data bus for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.

[0159] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate through the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device 100.

[0160] The GPIO interface can be configured through software. The GPIO interface can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0161] The USB interface 130 is an interface that complies with the USB standard specification and can specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used for data transmission between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as AR devices, etc.

[0162] It can be understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are only illustrative descriptions and do not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners in the above embodiments, or a combination of multiple interface connection manners.

[0163] The charging management module 140 is configured to receive a charging input from a charger. Herein, the charger may be a wireless charger or a wired charger. In some embodiments of wired charging, the charging management module 140 may receive the charging input from the wired charger through the USB interface 130. In some embodiments of wireless charging, the charging management module 140 may receive the wireless charging input through the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 may also supply power to the electronic device through the power management module 141.

[0164] The power management module 141 is configured to connect to the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives the inputs from the battery 142 and / or the charging management module 140 and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, the wireless communication module 160, etc. The power management module 141 may also be used to monitor parameters such as the battery capacity, the number of battery charge cycles, and the battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may also be disposed in the same device.

[0165] The wireless communication function of the electronic device 100 may be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, and the baseband processor, etc.

[0166] The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas may also be multiplexed to improve the utilization rate of the antennas. For example, the antenna 1 may be multiplexed as the diversity antenna of the wireless local area network. In some other embodiments, the antenna may be used in combination with a tuning switch.

[0167] The mobile communication module 150 may provide solutions for wireless communications such as 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 may receive electromagnetic waves through the antenna 1, filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modulation and demodulation processor and convert it into electromagnetic waves through the antenna 1 for radiation. In some embodiments, at least some functional modules of the mobile communication module 150 may be provided in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be provided in the same device.

[0168] The modulation and demodulation processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Subsequently, the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, receiver 170B, etc.), or displays an image or video through the display screen 194. In some embodiments, the modulation and demodulation processor may be an independent device. In other embodiments, the modulation and demodulation processor may be independent of the processor 110 and provided in the same device as the mobile communication module 150 or other functional modules.

[0169] The wireless communication module 160 may provide solutions for wireless communications applied to the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite systems (GNSSs), frequency modulation (FM), near field communication (NFC), infrared (IR), and so on. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 may also receive signals to be sent from the processor 110, perform frequency modulation and amplification on them, and convert them into electromagnetic waves through the antenna 2 for radiation.

[0170] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with a network and other devices through wireless communication technologies. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS), and / or satellite based augmentation systems (SBAS).

[0171] Electronic device 100 implements a display function through a GPU, display screen 194, and an application processor, etc. The GPU is a microprocessor for image processing, and is connected to display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.

[0172] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can adopt a liquid crystal display (LCD). The display screen panel can also adopt an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniLED, a microLED, a micro-OLED, a quantum dot light-emitting diode (QLED), etc. to manufacture. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.

[0173] The electronic device 100 can implement the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor, etc.

[0174] The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and the light passes through the lens and is transmitted to the camera photosensitive element. The optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also optimize the noise and brightness of the image through algorithms. The ISP can also optimize parameters such as the exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.

[0175] The camera 193 is used to capture static images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in standard RGB, YUV, etc. formats. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0176] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.

[0177] The video codec is used to compress or decompress digital videos. The electronic device 100 can support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as: Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0178] The NPU is a neural-network (NN) computing processor. By learning from the structure of biological neural networks, such as learning from the transmission pattern between human brain neurons, it can quickly process the input information and can also continuously self-learn. Through the NPU, applications such as intelligent cognition of the electronic device 100 can be realized, such as: image recognition, face recognition, speech recognition, text understanding, etc.

[0179] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to achieve the data storage function. For example, files such as music and videos are saved in the external memory card.

[0180] The internal memory 121 can be used to store computer-executable program code, and the executable program code includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. Among them, the program storage area can store the operating system, application programs required for at least one function (such as the sound playback function, the image playback function, etc.). The data storage area can store the data created during the use of the electronic device 100 (such as audio data, phone book, etc.). In addition, the internal memory 121 can include high-speed random access memory, and can also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0181] The electronic device 100 can implement audio functions through the audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and the application processor, etc. For example, music playback, recording, etc.

[0182] The audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 can be disposed in the processor 110, or some functional modules of the audio module 170 can be disposed in the processor 110.

[0183] The speaker 170A, also known as the "loudspeaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or hands-free calls through the speaker 170A.

[0184] The receiver 170B, also known as the "earpiece", is used to convert an audio electrical signal into a sound signal. When the electronic device 100 answers a call or a voice message, the voice can be listened to by bringing the receiver 170B close to the human ear.

[0185] The microphone 170C, also known as the "microphone" or "transmitter", is used to convert a sound signal into an electrical signal. When making a call or sending a voice message, the user can speak by bringing the mouth close to the microphone 170C to input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In some other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also implement a noise reduction function. In some other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to implement functions such as collecting sound signals, noise reduction, identifying the sound source, and implementing a directional recording function.

[0186] The headphone jack 170D is used to connect a wired headphone. The headphone jack 170D can be a USB interface 130, or a 3.5 mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0187] The pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor may include at least two parallel plates having conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 can also calculate the position of the touch based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, the instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.

[0188] The gyroscope sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., the x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. Exemplarily, when the shutter is pressed, the gyroscope sensor 180B detects the angle of jitter of the electronic device 100, calculates the distance that the lens module needs to compensate based on the angle, and enables the lens to offset the jitter of the electronic device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenarios.

[0189] The barometric pressure sensor 180C is used to measure the barometric pressure. In some embodiments, the electronic device 100 calculates the altitude based on the barometric pressure value measured by the barometric pressure sensor 180C to assist in positioning and navigation.

[0190] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Furthermore, according to the detected opening and closing state of the leather case or the opening and closing state of the flip, features such as automatic flip unlocking are set.

[0191] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.

[0192] A distance sensor 180F is used to measure distance. The electronic device 100 can measure distance through infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure distance to achieve fast focusing.

[0193] The proximity light sensor 180G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The light-emitting diode may be an infrared light-emitting diode. The electronic device 100 emits infrared light outward through the light-emitting diode. The electronic device 100 uses the photodiode to detect the infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear for a call, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used for automatic unlocking and locking of the holster mode and pocket mode.

[0194] An ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the sensed ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in the pocket to prevent accidental touch.

[0195] A fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint answering calls, etc.

[0196] A temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of the processor near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 caused by low temperature. In other embodiments, when the temperature is lower than yet another threshold, the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.

[0197] The touch sensor 180K, also known as the "touch panel". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also known as the "touch control screen". The touch sensor 180K is used to detect touch operations acting thereon or nearby. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In some other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, at a different position from that of the display screen 194.

[0198] The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire vibration signals of the vibrating bone mass of the human vocal part. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure pulsation signals. In some embodiments, the bone conduction sensor 180M can also be disposed in the earphone to form a bone conduction earphone. The audio module 170 can analyze the voice signal based on the vibration signals of the vibrating bone mass of the vocal part acquired by the bone conduction sensor 180M to implement the voice function. The application processor can analyze the heart rate information based on the blood pressure pulsation signals acquired by the bone conduction sensor 180M to implement the heart rate detection function.

[0199] The button 190 includes a power-on button, a volume button, etc. The button 190 can be a mechanical button or a touch button. The electronic device 100 can receive button inputs and generate key signal inputs related to the user settings and function control of the electronic device 100.

[0200] The motor 191 can generate vibration prompts. The motor 191 can be used for incoming call vibration prompts and can also be used for touch vibration feedback. For example, touch operations on different applications (such as taking pictures, audio playing, etc.) can correspond to different vibration feedback effects. For touch operations on different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects. Different application scenarios (such as time reminder, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0201] The indicator 192 can be an indicator light, which can be used to indicate the charging state, power change, and can also be used to indicate messages, missed calls, notifications, etc.

[0202] The SIM card interface 195 is used to connect the SIM card.

[0203] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In the embodiments of the present invention, taking the Android system with a layered architecture as an example, the software structure of the electronic device 100 will be exemplarily described.

[0204] Figure 7 It is a software structure block diagram of the electronic device 100 in the embodiments of the present invention.

[0205] The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, from top to bottom, they are the application layer, the hardware abstraction layer HAL, the driver layer, and the hardware layer.

[0206] The application layer may include a series of application packages.

[0207] Such as Figure 7 shown, the application package may include a camera application, and the camera application includes a running memory. After the camera application runs, the electronic device 100 can allocate a running memory for the camera application. After the camera application is closed, the running memory of the camera application is also cleared.

[0208] In some embodiments, after the camera application runs, the running memory of the camera application can be used to store the first configuration file. After the camera application is closed, the first configuration file stored in the running memory of the camera application will also be cleared.

[0209] In some embodiments, an application framework layer may also be included between the application layer and the HAL layer. The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions. Exemplarily, the application framework layer may include a window manager, a content provider, a view system, a telephone manager, a resource manager, a notification manager, etc. The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc. The content provider is used to store and obtain data, and make this data accessible to applications. The data may include videos, images, audio, dialed and answered calls, browsing history and bookmarks, phone books, etc. The view system includes visible controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a short message notification icon may include a view for displaying text and a view for displaying pictures. The telephone manager is used to provide the communication function of the electronic device 100. For example, the management of call states (including connection, disconnection, etc.). The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, and so on. The notification manager enables applications to display notification information in the status bar, can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or a scroll bar text, such as a notification of a background-running application, and can also be a notification that appears on the screen in the form of a dialog window. For example, prompt text information in the status bar, emit a prompt sound, the electronic device vibrates, the indicator light flashes, etc.

[0210] In some embodiments, between the application framework layer and the HAL layer, there may also be a system runtime library layer. The system runtime library layer may include multiple functional modules. For example: Surface Manager, Media Libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc. The Surface Manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications. The Media Libraries support the playback and recording of various common audio and video formats, as well as static image files, etc. The Media Libraries can support multiple audio and video coding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc. The 2D graphics engine is the drawing engine for 2D drawing.

[0211] The Hardware Abstraction HAL layer is an interface layer located between the application framework layer and the kernel layer, providing a virtual hardware platform for the operating system.

[0212] The Hardware Abstraction HAL layer can be used to receive the configuration file acquisition request sent by the camera application and send the configuration file acquisition request to the disk driver, so that the disk driver can control the disk to obtain the first configuration file and send the first configuration file to the camera application through the HAL layer. The camera application stores the first configuration file in the running memory of the camera application. The camera application can determine the initial preview resolution and the initial shooting resolution from the first configuration file based on the initial shooting parameters and send them to the camera driver through the HAL layer, so that the camera driver can control the camera module to collect preview images at the initial preview resolution and collect images or videos at the initial shooting resolution when detecting the user's operation on the shutter.

[0213] The driver layer is the layer between hardware and software. The driver layer includes drivers for various hardware. The driver layer may include a camera driver, a disk driver, etc. Among them, the camera driver is used to drive the image sensors of one or more cameras in the camera module (such as image sensor 1, image sensor 2, etc.) to collect images and drive the image signal processor to preprocess the images. The disk driver is used to drive the disk to obtain the first configuration file and the initial preview resolution and the initial shooting resolution.

[0214] The hardware layer may include a camera module, a disk, and so on. The camera module may include image sensors of one or more cameras (e.g., Image Sensor 1, Image Sensor 2, etc.). Optionally, the camera module may further include a time of flight (TOF) sensor, a multispectral sensor, etc. The disk may include a file system for the camera application, and a first configuration file is stored in the file system of the camera application.

[0215] Next, in combination with the interactions between the above-mentioned layers, it is described how the electronic device 100 configures the picture resolution for the camera application.

[0216] First, it is introduced how to configure the initial preview resolution and the initial shooting resolution for the camera application when the camera application is first started.

[0217] 1. The camera application obtains a first configuration file acquisition request and sends the first configuration file acquisition request to the HAL layer.

[0218] In some embodiments, the camera application may also send the first configuration file acquisition request to the HAL layer through the application architecture layer and the system runtime library layer.

[0219] 2. The HAL layer sends the first configuration file acquisition request to the disk driver.

[0220] 3. The disk driver sends the first configuration file acquisition request to the disk.

[0221] After receiving the first configuration file acquisition request sent by the camera application, the HAL layer then sends the first configuration file acquisition request to the disk driver, and the disk driver then sends the first configuration file acquisition request to the disk. In response to receiving the first configuration file acquisition request sent by the disk driver, the disk can obtain the first configuration file from the file system of the camera application.

[0222] 4. The disk sends the first configuration file to the disk driver.

[0223] 5. The disk driver sends the first configuration file to the HAL layer.

[0224] 6. The HAL layer sends the first configuration file to the camera application.

[0225] After the disk obtains the first configuration file, the disk can send the first configuration file to the disk driver. The disk driver then sends the first configuration file to the HAL layer. The HAL layer then sends the first configuration file to the camera application.

[0226] 7. The camera application saves the first configuration file in the running memory.

[0227] After the camera application receives the first configuration file sent by the HAL layer, the camera application can store the first configuration file in the running memory of the camera application.

[0228] 8. The camera application obtains the initial preview resolution and the initial shooting resolution from the first configuration file based on the initial shooting parameters.

[0229] Among them, the initial shooting parameters are obtained when the camera application is first started. Exemplarily, the user operation to start the camera application can be Figure 8A the input operation acting on the camera application icon shown, such as a click. In response to the input operation acting on the camera application icon, the camera application can obtain the initial shooting parameters and the initial shooting resolution.

[0230] 9. The camera application sends the initial preview resolution to the HAL layer.

[0231] 10. The HAL layer sends the initial preview resolution to the camera driver.

[0232] 11. The camera driver sends the initial preview resolution to the camera module.

[0233] After the camera application obtains the initial shooting parameters and the initial shooting resolution, the camera application can send the initial preview resolution to the HAL layer, and the HAL layer then sends the initial preview resolution to the camera driver, and the camera driver sends the initial preview resolution to the camera module.

[0234] After the camera module receives the initial preview resolution, the camera module can collect images based on the initial preview resolution. And display the images collected by the camera module at the initial preview resolution in the preview window of the camera application.

[0235] In some embodiments, the camera application can receive a user operation on the shutter button to save a picture or a video. In response to the user operation on the shutter button, the camera application can send the previously obtained initial shooting resolution to the HAL layer, and the HAL layer then sends the initial shooting resolution to the camera driver, and the camera driver sends the initial shooting resolution to the camera module. After the camera module receives the initial shooting resolution, the camera module can collect an image or a video based on the initial shooting resolution. And save the image or video collected by the camera module at the initial shooting resolution in the gallery.

[0236] In some embodiments, the camera application can receive a user to change the shooting parameters of the camera application. In response to obtaining updated shooting parameters, the camera application needs to obtain updated preview resolution and updated shooting resolution.

[0237] Next, it is introduced how to configure the updated preview resolution and the updated shooting resolution for the camera application when the user changes the shooting parameters of the camera application.

[0238] 12. The camera application receives the first operation of the user to change the shooting parameters and obtains the updated shooting parameters.

[0239] 13. The camera application obtains the first configuration file from the running memory of the camera application.

[0240] 14. The camera application obtains the updated preview resolution and the updated shooting resolution from the running memory based on the updated shooting parameters.

[0241] In response to obtaining the updated shooting parameters, the camera application can obtain the first configuration file from the running memory of the camera application. Since the camera application has already been running, the first configuration file is stored in the running memory of the camera application, and there is no need to obtain the first configuration file from the file system of the camera application. The camera application can directly obtain the first configuration file from the running memory of the camera application, which can save the time for the camera application to obtain the first configuration file.

[0242] After obtaining the updated shooting parameters, the camera application can determine the updated preview resolution and the updated shooting resolution from the first configuration file based on the updated shooting parameters.

[0243] 15. The camera application sends the updated preview resolution to the HAL layer.

[0244] 16. The HAL layer sends the updated preview resolution to the camera driver.

[0245] 17. The camera driver sends the updated preview resolution to the camera module.

[0246] After the camera application determines the updated preview resolution, the camera application can send the updated preview resolution to the HAL layer, the HAL layer then sends the updated preview resolution to the camera driver, and the camera driver sends the updated preview resolution to the camera module.

[0247] After receiving the updated preview resolution, the camera module can collect images based on the updated preview resolution. And display the images collected by the camera module at the updated preview resolution in the preview window of the camera application.

[0248] In some embodiments, the electronic device can receive the user operation on the shutter key to save pictures or videos. In response to the user operation on the shutter key, the camera application can send the previously obtained updated shooting resolution to the HAL layer, the HAL layer then sends the updated shooting resolution to the camera driver, and the camera driver sends the updated shooting resolution to the camera module.

[0249] After the camera module receives an updated shooting resolution, the camera module can collect images or videos based on the updated shooting resolution, and save the images or videos collected by the camera module at the updated shooting resolution in the gallery. In this way, the response of the camera application to the user's shooting action can be accelerated.

[0250] First, a resolution configuration scenario provided by the present application will be introduced.

[0251] 1. Start the camera application, and the electronic device 100 configures the picture resolution for the camera application based on the initial shooting parameters.

[0252] In some embodiments, after the electronic device 100 starts the camera application based on the user operation, the camera application defaults to the photo-taking mode.

[0253] Figures 8A - 8B A schematic diagram of the electronic device 100 turning on the camera application is shown.

[0254] As Figure 8A shown, the electronic device 100 may display a desktop, and a page with application icons is displayed in the desktop. This page includes multiple application icons (for example, settings application icon, app market application icon, gallery application icon, browser application icon, etc.). A page indicator is also displayed below the multiple application icons to indicate the positional relationship between the currently displayed page and other pages. A tray area is displayed below the page indicator. Among them, the tray area includes multiple tray icons, such as a camera application icon, a contacts application icon, a phone application icon, and a messages application icon. The tray area remains displayed during page switching. In some embodiments, the above page may also include multiple application icons and a page indicator. The page indicator may not be part of the page and exists separately. The above tray icons are also optional, and the embodiments of the present application do not limit this.

[0255] The electronic device 100 can receive an input (such as a click) from the user on the camera application icon. In response to this input operation, the electronic device 100 can display as Figure 8B shown in the user interface. Figure 8B This is a user interface for the shooting and display services provided by the electronic device 100 according to an embodiment of the present application, and can also be called a preview interface.

[0256] As Figure 8B shown, the preview interface may include a mode bar 501, shooting controls 502, a preview window 503, a review control 504, a quick function area 505, and a focal length adjustment option 506.

[0257] The mode bar 501 may include multiple shooting mode options, such as "slow motion", "time-lapse photography", "portrait", "photo", "video recording", "night scene", "panorama", and so on. Different shooting modes can provide users with shooting services with different effects. Users can select any shooting mode from multiple shooting modes according to different needs for shooting. For example, "photo" can be the default shooting mode for taking photos. "Video recording" is used to record videos. The "night scene" mode is suitable for shooting scenes with low light, such as at night. The "portrait" mode is suitable for shooting scenes where the main subject is a person. The electronic device 100 can also provide more shooting modes, such as "large aperture", "movie", "professional", etc., which will not be listed one by one here.

[0258] The electronic device 100 can detect a user operation on the shooting mode option in the mode bar 501 and change the currently used shooting mode according to the above user operation. The above user operation is, for example, a left swipe / right swipe operation. For example, when it is detected that the mode bar 501 is dragged and swiped to the left (left swipe operation) and the floating icon stops at the "portrait" option, the electronic device 100 can switch to the "portrait" mode. By default, the electronic device 100 first uses the "photo" mode.

[0259] The shooting control 502 is used to trigger taking a photo. The electronic device 100 can detect whether there is a user operation on the shooting control 502, such as a click operation. After detecting a user operation on the shooting control 502, the electronic device 100 can generate a photo-taking instruction. The electronic device 100 can obtain the image reported by the camera at the corresponding timestamp according to the photo-taking instruction and then save it as a photo.

[0260] The preview window 503 can be used to display the image reported by the camera in real time. In different shooting modes, the electronic device 100 can process the image reported by the camera to improve the display effect of the image. For example, in the "portrait" mode, the electronic device 100 can blur the background in the image reported by the camera to highlight the portrait. Here, the preview window 503 can display the image processed by the image processing algorithm corresponding to different shooting modes in real time, so that users can perceive the shooting effects corresponding to different shooting modes in real time.

[0261] The review control 504 can be used to browse the thumbnails of the photos / videos that have been taken. After detecting a user operation on the review control 504, the electronic device 100 can also display the best photo corresponding to the thumbnail.

[0262] The quick function area 505 may include controls 505A for the main character video recording mode, AI scene recognition control 505B, flash control 505C, color mode control 505D, settings control 505E, etc. The control 505A for the main character video recording mode can be used to trigger the electronic device 100 to identify the main character among multiple people in the preview screen when it is turned on. The AI scene recognition control 505B can be used to trigger the electronic device 100 to identify the shooting scene in the preview screen. Currently, the AI scene recognition control 505B is in the off state. The flash control 505C can be used to trigger the electronic device 100 to turn on or off the flash. The color mode control 505D can be used to trigger the electronic device 100 to process the image captured by the camera using a color filter. The settings control 505E can be used to set the shooting parameters of the electronic device 100 (such as image size, image storage format, etc.), etc.

[0263] Multiple zoom ratio options are shown in the focal length adjustment option 506. For example, 0.5x zoom ratio option, 1x zoom ratio option, 2.5x zoom ratio option, 10x zoom ratio option, etc. The current zoom ratio is 1x. The image frame captured by the electronic device 100 at a zoom ratio of 1x is displayed in the preview window 503.

[0264] Exemplarily, Figure 8B The shown picture resolution is 4:3.

[0265] In some implementations, after the electronic device 100 responds to the user's input for the camera application icon, before the preview interface shown in the electronic device 100 is displayed, the electronic device 100 can obtain the preview resolution in the preview mode. Figure 8B The image displayed in the preview window 503 is the image captured by the electronic device 100 at the preview resolution. Figure 8B

[0266] In some embodiments, after the electronic device 100 responds to the user's input for the camera application icon, the electronic device 100 can obtain the shooting parameters and obtain the shooting resolution in the normal shooting mode based on the shooting parameters. In this way, when a user operation on the shooting control 502 is detected, the electronic device 100 can capture the image frame based on the pre-obtained shooting resolution to accelerate the response of the electronic device 100 to the user's shooting action.

[0267] Optionally, the preview resolution is lower than the shooting resolution. In this way, the electronic device 100 can capture the preview image at a lower resolution to reduce the power consumption of the electronic device 100.

[0268] Optionally, the preview resolution can also be the same as the shooting resolution, and the present application does not make a limitation on this.

[0269] In some embodiments, after the electronic device 100 detects a user operation (such as a click) on the shooting control 502, in response to the user operation, the electronic device 100 may collect an image at a pre-configured shooting resolution and save the image in the photo gallery.

[0270] Figure 9 The figure shows a schematic flowchart of a method for configuring a picture resolution for a camera application after the camera application of the electronic device 100 is launched.

[0271] The implementation of this method can be based on the interaction and cooperation between the application layer (such as the camera application), the hardware abstraction layer (HAL), the driver layer, and the hardware layer within the electronic device. Among them, the application layer mainly involves the camera application. The driver layer mainly involves the camera driver and the disk driver. The hardware layer mainly involves the camera module and the disk, etc.

[0272] S901. The camera application receives a user operation to launch the camera application.

[0273] Exemplarily, the user operation to launch the camera application can be Figure 8A the input acting on the camera application icon as shown, such as a click.

[0274] S902. In response to the user operation to launch the camera application, the camera application sends a first configuration file acquisition request to the HAL layer.

[0275] S903. The HAL layer sends the first configuration file acquisition request to the disk driver.

[0276] S904. The disk driver sends the first configuration file acquisition request to the disk.

[0277] In response to the user operation to launch the camera application, the electronic device 100 can obtain the first configuration file acquisition request.

[0278] In response to obtaining the first configuration file acquisition request, the camera application can send the first configuration file acquisition request to the HAL layer, and then the HAL layer sends the first configuration file acquisition request to the disk driver, and the disk driver then sends the first configuration file acquisition request to the disk.

[0279] S905. The disk obtains the first configuration file based on the first configuration file acquisition request.

[0280] In response to receiving the first configuration file sent by the disk driver, the disk can obtain the first configuration file from the file system of the camera application.

[0281] S906. The disk sends the first configuration file to the disk driver.

[0282] S907. The disk drive sends the first configuration file to the HAL layer.

[0283] S908. The HAL layer sends the first configuration file to the camera application.

[0284] After the disk obtains the first configuration file, the disk can send the first configuration file to the disk drive, and the disk drive then sends the first configuration file to the HAL layer, and the HAL layer then sends the first configuration file to the camera application.

[0285] Next, the composition form of the first configuration file is introduced.

[0286] The first configuration file records the corresponding relationships between multiple different shooting parameters and picture resolutions.

[0287] In some embodiments, the file format of the first configuration file can be the JSON file format. In the first configuration file, the shooting parameters and picture resolutions can be stored in the key-value form. Among them, the key can refer to the shooting parameters of the camera application, and the value can refer to the picture resolution of the camera application.

[0288] The shooting parameters can include but are not limited to any one or more of the following: shooting state, shooting mode, device display screen state, camera type, picture ratio, etc.

[0289] Among them, the shooting state can include but is not limited to the preview state and the non-preview state. Among them, the preview state can refer to the state of the camera application before the electronic device 100 receives the user's click on the shooting control 502, that is, before the electronic device 100 takes a picture or takes a video, or the preview state can also refer to the state of the camera application after the electronic device 100 receives the user's click on the shooting control 502 and the electronic device 100 obtains a picture or a video. The non-preview state is the state opposite to the preview state, and the non-preview state can refer to the state of the camera application when the electronic device 100 receives the user's click on the shooting control 502, that is, when the electronic device 100 starts to take a picture or starts to take a video.

[0290] The shooting mode is the shooting mode that the camera application can provide, and the shooting mode can include the photo-taking mode and the video-recording mode.

[0291] The photo-taking mode can include but is not limited to any one or more of the following: ordinary photo-taking mode, portrait photo-taking mode, high-definition photo-taking mode, night scene photo-taking mode, panoramic photo-taking mode, etc.

[0292] Optionally, when the camera application is first launched, the default shooting mode of the camera application is the ordinary photo-taking mode, as Figure 8B the shown shooting mode is the ordinary photo-taking mode.

[0293] Optionally, the same shooting mode can be divided into different shooting states. For example, the normal shooting mode can be divided into a preview state and a non-preview state. The portrait shooting mode can also be divided into a preview state and a non-preview state. The high-definition shooting mode can also be divided into a preview state and a non-preview state. The night scene shooting mode can also be divided into a preview state and a non-preview state. The panoramic shooting mode can also be divided into a preview state and a non-preview state. Optionally, some shooting modes may not distinguish between the non-preview state and the preview state, and the present application does not limit this.

[0294] The video recording mode can include, but is not limited to, any one or more of the following: normal video recording mode, delayed video recording mode, slow motion video recording mode, etc.

[0295] Optionally, the same video recording mode can be divided into different shooting states. For example, the normal video recording mode can be divided into a preview state and a non-preview state. The delayed video recording mode can also be divided into a preview state and a non-preview state. The slow motion video recording mode can also be divided into a preview state and a non-preview state. Optionally, the video recording mode may not distinguish between the non-preview state and the preview state, and the present application does not limit this.

[0296] The device display screen state can be for a foldable screen or an expandable screen, and the device display screen state can include a folded state or an unfolded state. In some embodiments, if the display screen of the electronic device 100 is a straight display screen, the shooting parameters may not include the device display screen state either.

[0297] The camera type can include a front camera and a rear camera. The front camera or the rear camera can also include one or more cameras. For example, the rear camera can include three cameras, such as a main camera, a wide-angle camera, and a telephoto camera, etc. The front camera can include one main camera. In other embodiments, the front camera can also include multiple cameras. For example, the front camera can also include a wide-angle camera, etc., and the present application does not limit this.

[0298] In some embodiments, the camera application can determine the camera type based on the current zoom ratio from multiple rear cameras or from multiple front cameras.

[0299] Exemplarily, when the rear camera includes a main camera, a wide-angle camera, and a telephoto camera, the three rear cameras support different zoom ratios. For example, the zoom ratio supported by the main camera is between Ax and Bx, the zoom ratio supported by the telephoto camera is greater than Bx, and the zoom ratio supported by the wide-angle camera is less than Ax. Bx is greater than Ax. It is possible to determine which camera the current camera application is using based on the current zoom ratio of the camera application.

[0300] Exemplarily, A can be 1 and B can be 5. The zoom ratio supported by the main camera is between 1x and 5x, the zoom ratio supported by the telephoto camera is greater than 5x, and the zoom ratio supported by the wide-angle camera is less than 1x. When the currently selected zoom ratio of the camera application is 1x, it can be determined that the main camera is used by the camera application. When the currently selected zoom ratio of the camera application is 10x, it can be determined that the telephoto camera is used by the camera application.

[0301] Not limited to determining the camera type based on the zoom ratio, the camera application can also determine the camera type based on other information, which is not limited in this application.

[0302] The picture ratio can be associated with the shooting mode, and different shooting modes can support different picture ratios. For example, the normal photo shooting mode can provide picture ratios of 1:1, 4:3, 16:9, etc. The normal video recording mode can only provide a picture ratio of 16:9. The picture ratios supported by different shooting modes can be related to the device manufacturer and are preset before the device leaves the factory. This application only exemplifies this application with the above values.

[0303] In some embodiments, the shooting parameters can also include other information, which is not limited in this application either.

[0304] To facilitate understanding of the composition structure of the configuration file, this application takes the normal photo shooting mode and the normal video recording mode as examples to illustrate the composition structure of the configuration file.

[0305] Among them, Figure 10 shows a schematic diagram of the configuration file corresponding to the normal photo shooting mode.

[0306] As Figure 10 shown, the normal photo shooting mode can be divided into two major branches, namely the preview state and the non-preview state.

[0307] Optionally, the picture resolution in the preview mode and the non-preview mode of the normal photo shooting mode can be different.

[0308] Exemplarily, when the camera application is in the normal photo shooting mode, before starting to take pictures, the normal photo shooting mode is in the preview state, and the camera application can obtain the preview resolution in the preview state. Figure 8B The image displayed in the preview window 503 in [reference] is the image acquired by the electronic device 100 at the preview resolution. After starting to take pictures, the electronic device 100 can obtain the shooting resolution in the non-preview mode.

[0309] In some embodiments, the preview resolution in the preview state may be smaller than the shooting resolution in the non-preview mode. The electronic device 100 may acquire an image and display a preview image at a lower resolution to save the power consumption of the electronic device 100.

[0310] As Figure 10 shown, the normal shooting mode may be divided into two major branches: the preview state and the non-preview state. When the camera application is in the preview state or the non-preview state, the picture resolution may be determined based on the device display screen state, the camera type, and the currently selected picture ratio.

[0311] It should be noted that when the display screen of the electronic device 100 is a straight screen, rather than a folding screen or an extended screen, Figure 10 the configuration file corresponding to the normal shooting mode shown may not be divided into the unfolded state and the folded state.

[0312] In some embodiments, when the camera application is in the normal shooting mode and the non-preview state, the electronic device 100 may determine the preview resolution based on the device display screen state, the camera type, and the picture ratio.

[0313] Exemplarily, after the electronic device 100 responds to the user's input for the camera application icon and before the electronic device 100 receives the user operation for the shooting control 502, the camera application is in the normal shooting mode and the non-preview state. The electronic device 100 may obtain the current shooting parameters.

[0314] Exemplarily, when the shooting parameters include the normal shooting mode, the non-preview state, the folded state, the rear main camera, and the picture ratio is 1:1, the electronic device 100 may determine that the picture resolution is 1920x1920.

[0315] Exemplarily, when the shooting parameters include the normal shooting mode, the non-preview state, the folded state, the rear main camera, and the picture ratio is 4:3, the electronic device 100 may determine that the picture resolution is 1440x1920.

[0316] Exemplarily, when the shooting parameters include the normal shooting mode, the non-preview state, the folded state, the rear main camera, and the picture ratio is 16:9, the electronic device 100 may determine that the picture resolution is 1080×1920.

[0317] Exemplarily, when the shooting parameters include the normal shooting mode, the non-preview state, the folded state, the rear telephoto camera, and the picture ratio is 1:1, the electronic device 100 may determine that the picture resolution is 1660×1660.

[0318] Exemplarily, when the shooting parameters include the normal shooting mode, non-preview state, folded state, a rear telephoto camera, and the picture ratio is 4:3, the electronic device 100 can determine that the picture resolution is 1200×1600.

[0319] Exemplarily, when the shooting parameters include the normal shooting mode, non-preview state, folded state, a rear telephoto camera, and the picture ratio is 16:9, the electronic device 100 can determine that the picture resolution is 900×1600.

[0320] Exemplarily, when the shooting parameters include the normal shooting mode, non-preview state, folded state, a rear wide-angle camera, and the picture ratio is 1:1, the electronic device 100 can determine that the picture resolution is 1200×1200.

[0321] Exemplarily, when the shooting parameters include the normal shooting mode, non-preview state, folded state, a rear wide-angle camera, and the picture ratio is 4:3, the electronic device 100 can determine that the picture resolution is 960×1280.

[0322] Exemplarily, when the shooting parameters include the normal shooting mode, non-preview state, folded state, a rear wide-angle camera, and the picture ratio is 16:9, the electronic device 100 can determine that the picture resolution is 720×1280.

[0323] Exemplarily, when the shooting parameters include the normal shooting mode, non-preview state, folded state, a front camera, and the picture ratio is 1:1, the electronic device 100 can determine that the picture resolution is 1280×1280.

[0324] Exemplarily, when the shooting parameters include the normal shooting mode, non-preview state, folded state, a front camera, and the picture ratio is 4:3, the electronic device 100 can determine that the picture resolution is 960×1280.

[0325] Exemplarily, when the shooting parameters include the normal shooting mode, non-preview state, folded state, a front camera, and the picture ratio is 16:9, the electronic device 100 can determine that the picture resolution is 900:1600.

[0326] Exemplarily, when the shooting parameters include the normal shooting mode, non-preview state, unfolded state, a rear main camera, and the picture ratio is 1:1, the electronic device 100 can determine that the picture resolution is 1920x1920.

[0327] Exemplarily, when the shooting parameters include the normal shooting mode, non-preview state, unfolded state, rear main camera, and the picture ratio is 8:7, the electronic device 100 can determine that the picture resolution is 1920x1680.

[0328] Exemplarily, when the shooting parameters include the normal shooting mode, non-preview state, unfolded state, rear telephoto camera, and the picture ratio is 1:1, the electronic device 100 can determine that the picture resolution is 1660×1660.

[0329] Exemplarily, when the shooting parameters include the normal shooting mode, non-preview state, unfolded state, rear telephoto camera, and the picture ratio is 8:7, the electronic device 100 can determine that the picture resolution is 1660×1453.

[0330] Exemplarily, when the shooting parameters include the normal shooting mode, non-preview state, unfolded state, rear wide-angle camera, and the picture ratio is 1:1, the electronic device 100 can determine that the picture resolution is 1200×1200.

[0331] Exemplarily, when the shooting parameters include the normal shooting mode, non-preview state, unfolded state, rear wide-angle camera, and the picture ratio is 8:7, the electronic device 100 can determine that the picture resolution is 1920x1050.

[0332] Exemplarily, when the shooting parameters include the normal shooting mode, non-preview state, unfolded state, front camera, and the picture ratio is 1:1, the electronic device 100 can determine that the picture resolution is 1280×1280.

[0333] Exemplarily, when the shooting parameters include the normal shooting mode, non-preview state, unfolded state, front camera, and the picture ratio is 8:7, the electronic device 100 can determine that the picture resolution is 1920x1120.

[0334] In other embodiments, when the camera application is in the normal shooting mode and in the preview state, the electronic device 100 can also determine the shooting resolution based on the device display screen state, camera type, and picture ratio.

[0335] Exemplarily, after the electronic device 100 responds to the user's input for the camera application icon and before the electronic device 100 receives the user operation for the shooting control 502, the camera application is in the normal shooting mode and in the preview state. The electronic device 100 can obtain the current shooting parameters.

[0336] Exemplarily, when the shooting parameters include the normal shooting mode, preview state, folded state, rear main camera, and the picture ratio is 1:1, the electronic device 100 can determine that the picture resolution is 1280x1280.

[0337] Exemplarily, when the shooting parameters include the normal shooting mode, preview state, folded state, rear main camera, and the picture ratio is 4:3, the electronic device 100 can determine that the picture resolution is 960x1280.

[0338] Exemplarily, when the shooting parameters include the normal shooting mode, preview state, folded state, rear main camera, and the picture ratio is 16:9, the electronic device 100 can determine that the picture resolution is 720×1280.

[0339] Exemplarily, when the shooting parameters include the normal shooting mode, preview state, folded state, rear telephoto camera, and the picture ratio is 1:1, the electronic device 100 can determine that the picture resolution is 1107×1107.

[0340] Exemplarily, when the shooting parameters include the normal shooting mode, preview state, folded state, rear telephoto camera, and the picture ratio is 4:3, the electronic device 100 can determine that the picture resolution is 800×1067.

[0341] Exemplarily, when the shooting parameters include the normal shooting mode, preview state, folded state, rear telephoto camera, and the picture ratio is 16:9, the electronic device 100 can determine that the picture resolution is 600×1067.

[0342] Exemplarily, when the shooting parameters include the normal shooting mode, preview state, folded state, rear wide-angle camera, and the picture ratio is 1:1, the electronic device 100 can determine that the picture resolution is 800×800.

[0343] Exemplarily, when the shooting parameters include the normal shooting mode, preview state, folded state, rear wide-angle camera, and the picture ratio is 4:3, the electronic device 100 can determine that the picture resolution is 640×853.

[0344] Exemplarily, when the shooting parameters include the normal shooting mode, preview state, folded state, rear wide-angle camera, and the picture ratio is 16:9, the electronic device 100 can determine that the picture resolution is 480×853.

[0345] Exemplarily, when the shooting parameters include the normal shooting mode, preview state, folded state, front camera, and the picture ratio is 1:1, the electronic device 100 can determine that the picture resolution is 853×853.

[0346] Exemplarily, when the shooting parameters include the normal shooting mode, preview state, folded state, front camera, and the picture ratio is 4:3, the electronic device 100 can determine that the picture resolution is 640×853.

[0347] Exemplarily, when the shooting parameters include the normal shooting mode, preview state, folded state, front camera, and the picture ratio is 16:9, the electronic device 100 can determine that the picture resolution is 600x1067.

[0348] Exemplarily, when the shooting parameters include the normal shooting mode, preview state, unfolded state, rear main camera, and the picture ratio is 1:1, the electronic device 100 can determine that the picture resolution is 1280x1280.

[0349] Exemplarily, when the shooting parameters include the normal shooting mode, preview state, unfolded state, rear main camera, and the picture ratio is 8:7, the electronic device 100 can determine that the picture resolution is 1280x1120.

[0350] Exemplarily, when the shooting parameters include the normal shooting mode, preview state, unfolded state, rear telephoto camera, and the picture ratio is 1:1, the electronic device 100 can determine that the picture resolution is 1107×1107.

[0351] Exemplarily, when the shooting parameters include the normal shooting mode, preview state, unfolded state, rear telephoto camera, and the picture ratio is 8:7, the electronic device 100 can determine that the picture resolution is 1107×969.

[0352] Exemplarily, when the shooting parameters include the normal shooting mode, preview state, unfolded state, rear wide-angle camera, and the picture ratio is 1:1, the electronic device 100 can determine that the picture resolution is 800×800.

[0353] Exemplarily, when the shooting parameters include the normal shooting mode, preview state, unfolded state, rear wide-angle camera, and the picture ratio is 8:7, the electronic device 100 can determine that the picture resolution is 1280x700.

[0354] Exemplarily, when the shooting parameters include the normal shooting mode, preview state, unfolded state, front camera, and the picture ratio is 1:1, the electronic device 100 can determine that the picture resolution is 853×853.

[0355] Exemplarily, when the shooting parameters include the normal photo-taking mode, preview state, unfolded state, front camera, and the picture ratio is 8:7, the electronic device 100 can determine that the picture resolution is 1280x747.

[0356] It should be noted that Figure 10 The picture resolution shown is only used to explain this application and can also be other values. This application does not limit this.

[0357] In some embodiments, the configuration files corresponding to other photo-taking modes may be the same as the configuration file corresponding to the normal photo-taking mode. In this case, only the configuration file corresponding to the normal photo-taking mode needs to be retained in the first configuration file, and other photo-taking modes and the normal photo-taking mode can share the configuration file corresponding to the normal photo-taking mode.

[0358] Exemplarily, other photo-taking modes can be the portrait photo-taking mode. As Figure 11 shown, the root nodes are the portrait photo-taking mode and the normal photo-taking mode, and the portrait photo-taking mode and the normal photo-taking mode can share a configuration file. In this way, the data volume of the first configuration file can be reduced.

[0359] Regarding Figure 11 the introduction of the configuration file shown, reference can be made to Figure 10 the introduction in the embodiments. This application will not elaborate here.

[0360] Among them, Figure 12 a schematic diagram of the configuration file corresponding to the normal video recording mode is shown.

[0361] Optionally, in the video recording mode, the requirement for picture clarity is relatively high, and the video recording mode can only support the rear main camera for video recording. In other embodiments, the video recording mode can also support other cameras, such as wide-angle cameras and telephoto cameras, etc. This application does not limit this either.

[0362] As Figure 12 shown, the normal video recording mode can be divided into two major branches, namely the preview state and the non-preview state.

[0363] Optionally, the picture resolution of the normal video recording mode in the preview mode and the non-preview mode can be different.

[0364] Exemplarily, when the camera application is in the normal video recording mode, before starting video recording, the normal video recording mode is in the preview state, and the camera application can obtain the preview resolution in the preview state. After starting video recording, the electronic device 100 can obtain the shooting resolution in the non-preview mode.

[0365] In some embodiments, the preview resolution in the preview state may be less than the shooting resolution in the non-preview mode. The electronic device 100 may capture an image and display a preview image at a lower resolution to save the power consumption of the electronic device 100.

[0366] As Figure 12 shown, the normal video recording mode can be divided into two major branches: the preview state and the non-preview state. When the camera application is in the preview state or the non-preview state, the picture resolution can be determined based on the device display screen state, the camera type, and the currently selected picture ratio.

[0367] It should be noted that when the display screen of the electronic device 100 is a straight screen, rather than a foldable screen or an expandable screen, Figure 11 the configuration file corresponding to the normal video recording mode shown may not be divided into the unfolded state and the folded state.

[0368] In some embodiments, when the camera application is in the normal video recording mode and in the non-preview state, the electronic device 100 may determine the preview resolution based on the device display screen state, the camera type, and the picture ratio.

[0369] Exemplarily, after the electronic device 100 responds to a click operation by the user on the "Video Recording" option in the mode bar 501, the camera application is in the normal video recording mode and in the non-preview state. The electronic device 100 may obtain the current shooting parameters.

[0370] Exemplarily, when the shooting parameters include the normal video recording mode, the non-preview state, the folded state, the rear main camera, and the picture ratio is 16:9, the electronic device 100 may determine that the picture resolution is 1215x2160.

[0371] Exemplarily, when the shooting parameters include the normal video recording mode, the non-preview state, the folded state, the rear main camera, and the picture ratio is 21:9, the electronic device 100 may determine that the picture resolution is 857x2000.

[0372] Exemplarily, when the shooting parameters include the normal video recording mode, the non-preview state, the folded state, the front camera, and the picture ratio is 16:9, the electronic device 100 may determine that the picture resolution is 1114x1980.

[0373] Exemplarily, when the shooting parameters include the normal video recording mode, the non-preview state, the folded state, the front camera, and the picture ratio is 21:9, the electronic device 100 may determine that the picture resolution is 771x1800.

[0374] Exemplarily, when the shooting parameters include the normal video recording mode, non-preview state, unfolded state, rear main camera, and the picture ratio is 8:7, the electronic device 100 can determine that the picture resolution is 1662x1900.

[0375] Exemplarily, when the shooting parameters include the normal video recording mode, non-preview state, unfolded state, front camera, and the picture ratio is 8:7, the electronic device 100 can determine that the picture resolution is 1488x1700.

[0376] Exemplarily, when the shooting parameters include the normal video recording mode, preview state, folded state, rear main camera, and the picture ratio is 16:9, the electronic device 100 can determine that the picture resolution is 810x1440.

[0377] Exemplarily, when the shooting parameters include the normal video recording mode, preview state, folded state, rear main camera, and the picture ratio is 21:9, the electronic device 100 can determine that the picture resolution is 571x1333.

[0378] Exemplarily, when the shooting parameters include the normal video recording mode, preview state, folded state, front camera, and the picture ratio is 16:9, the electronic device 100 can determine that the picture resolution is 743x1320.

[0379] Exemplarily, when the shooting parameters include the normal video recording mode, preview state, folded state, front camera, and the picture ratio is 21:9, the electronic device 100 can determine that the picture resolution is 514x1200.

[0380] Exemplarily, when the shooting parameters include the normal video recording mode, preview state, unfolded state, rear main camera, and the picture ratio is 8:7, the electronic device 100 can determine that the picture resolution is 1108x1267.

[0381] Exemplarily, when the shooting parameters include the normal video recording mode, preview state, unfolded state, front camera, and the picture ratio is 8:7, the electronic device 100 can determine that the picture resolution is 992x1133.

[0382] In some embodiments, the configuration files corresponding to other video recording modes may be the same as the configuration file corresponding to the normal video recording mode. Then, only the configuration file corresponding to the normal video recording mode needs to be retained in the first configuration file, and other video recording modes and the normal video recording mode can share the configuration file corresponding to the normal video recording mode.

[0383] Exemplarily, other video recording modes can be the delayed video recording mode, such as Figure 13As shown, the root nodes are the delayed video recording mode and the normal video recording mode, and the delayed video recording mode and the normal video recording mode can share a configuration file. In this way, the data volume of the first configuration file can be reduced.

[0384] For Figure 13 the introduction of the configuration file shown, reference can be made to Figure 12 the introduction in the embodiments, and details are not described herein again in this application.

[0385] This application illustrates the composition structure of the configuration file by taking the normal photo-taking mode and the normal video recording mode as examples. The composition structure of the configuration file for other shooting modes may be similar to that of the configuration file for the normal photo-taking mode or the normal video recording mode, and details are not described herein again in this application.

[0386] Optionally, the configuration files corresponding to multiple shooting modes may be a complete file. For example, the configuration files for the normal photo-taking mode and the normal video recording mode may be stored in one file, and the configuration file corresponding to each shooting mode may also be in a separate file. For example, the configuration files for the normal photo-taking mode and the normal video recording mode may be stored in two different files respectively.

[0387] Optionally, Figures 10 - 13 the composition structure of the configuration file is also only used to explain this application and will not constitute a limitation.

[0388] S909. The camera application stores the first configuration file in the running memory of the camera application.

[0389] After the camera application receives the first configuration file sent by the HAL layer, the camera application may store the first configuration file in the running memory of the camera application.

[0390] Optionally, after the electronic device 100 closes the process of the camera application, the electronic device 100 clears the first configuration file stored in the running memory of the camera application. After the camera application is restarted, the electronic device 100 loads the first configuration file into the running memory of the camera application again.

[0391] In some embodiments, when the user operation to start the camera application is to switch the camera application running in the background to the foreground, and the first configuration file has been stored in the running memory of the camera application, the camera application may directly obtain the first configuration file from the running memory of the camera application.

[0392] S910. The camera application obtains the initial preview resolution and the initial shooting resolution from the first configuration file based on the initial shooting parameters.

[0393] The shooting parameters may include, but are not limited to, any one or more of the following: shooting state, shooting mode, device display screen state, camera type, picture ratio, etc.

[0394] Exemplarily, if the user operation to open the camera application is the first user operation to open the camera application, after the electronic device 100 enters the camera application, the camera application may default to the normal shooting mode, and the electronic device 100 may display Figure 8B the user interface shown. The electronic device 100 may obtain the initial shooting parameters corresponding to the normal shooting mode.

[0395] Exemplarily, the initial shooting parameters may include, but are not limited to: normal shooting mode, preview state, folded state, rear main camera, and a picture ratio of 4:3.

[0396] Among them, the shooting state in the initial shooting parameters for obtaining the initial preview resolution may be the preview state. The shooting state in the initial shooting parameters for obtaining the shooting preview resolution may be a non-preview state.

[0397] Regarding how the electronic device 100 obtains the picture resolution based on the shooting parameters, reference may be made to the description in the following Figure 10 embodiment. This application will not elaborate here.

[0398] Among them, the first configuration file includes the picture resolutions corresponding to multiple different shooting parameters. The first configuration file may be preset in the file system of the camera application. For example, the first configuration file may be preset in the file system of the camera application before the electronic device 100 leaves the factory, or the first configuration file in the file system of the camera application may also be obtained and updated by the electronic device 100 from the server periodically / irregularly.

[0399] In some embodiments, it is also possible not to confirm the initial shooting resolution first. After the camera application receives the user input operation on the shutter button, the initial shooting resolution is then confirmed. This application does not make a limitation on this.

[0400] Optionally, the preview resolution is lower than the shooting resolution. In this way, the electronic device 100 can collect preview images at a lower resolution to reduce the power consumption of the electronic device 100.

[0401] Optionally, the preview resolution may also be the same as the shooting resolution. This application does not make a limitation on this.

[0402] In this way, the camera application determines the initial shooting resolution in advance. When detecting the user operation on the shooting control 502, the electronic device 100 can collect images based on the initial shooting resolution obtained in advance to accelerate the response of the electronic device 100 to the user's shooting action.

[0403] S911. The camera application sends the initial preview resolution to the HAL layer.

[0404] S912. The HAL layer sends the initial preview resolution to the camera driver.

[0405] S913. The camera driver sends the initial preview resolution to the camera module.

[0406] S914. The camera module captures an image at the initial preview resolution.

[0407] After the camera application receives the initial preview resolution, the initial shooting resolution, and the first configuration file sent by the HAL layer, the camera application can send the initial preview resolution to the HAL layer, and then the HAL layer sends the initial preview resolution to the camera driver, and the camera driver sends the initial preview resolution to the camera module.

[0408] After the camera module receives the initial preview resolution, the camera module can capture an image based on the initial preview resolution. And display the image captured by the camera module at the initial preview resolution in the preview window of the camera application.

[0409] S915. The camera application receives a user operation on the shutter key.

[0410] S916. The camera application sends the initial shooting resolution to the HAL layer.

[0411] S917. The HAL layer sends the initial shooting resolution to the camera driver.

[0412] S918. The camera driver sends the shooting preview resolution to the camera module.

[0413] S919. The camera module captures an image or video at the initial shooting resolution and saves the image or video.

[0414] In some embodiments, the electronic device 100 can receive a user operation on the shutter key and save a picture or video.

[0415] Exemplarily, the user operation on the shutter key can be an input operation on Figure 8B the shooting control 502 in, such as a click.

[0416] In response to the user operation on the shutter key, the camera application can send the previously obtained initial shooting resolution to the HAL layer, and then the HAL layer sends the initial shooting resolution to the camera driver, and the camera driver sends the initial shooting resolution to the camera module.

[0417] After the camera module receives the initial shooting resolution, the camera module can collect images or videos based on the initial shooting resolution. And save the images or videos collected by the camera module at the initial shooting resolution in the photo gallery.

[0418] In some embodiments, S914 - S918 may not be executed, and this application does not limit this.

[0419] Second, the electronic device 100 changes the shooting parameters of the camera application based on a user operation, and the electronic device 100 needs to obtain an updated preview resolution.

[0420] In some embodiments, the electronic device 100 can change the shooting parameters of the camera application. After the electronic device 100 changes the shooting parameters of the camera application, the electronic device 100 needs to obtain an updated preview resolution.

[0421] Optionally, the updated preview resolution and the initial preview resolution can be the same or different.

[0422] As can be seen from the above description, the shooting parameters can include but are not limited to any one or more of the following: shooting state, shooting mode, device display screen state, camera type, picture ratio, etc. The user can change the shooting mode or change the device display screen state or change the camera type or change the picture ratio to obtain updated shooting parameters, so that the electronic device 100 can obtain an updated preview resolution based on the updated shooting parameters.

[0423] Next, several implementation methods for changing the shooting parameters of the camera application are introduced.

[0424] Method 1: Change the shooting mode to change the shooting parameters of the camera application.

[0425] When the electronic device 100 changes the shooting mode based on a user operation, the electronic device 100 can change the shooting parameters of the camera application.

[0426] For example, the user operation can switch the normal photo - taking mode to the normal video - recording mode. In response to the camera application switching to the normal video - recording mode, the electronic device 100 can obtain the shooting parameters of the normal video - recording mode.

[0427] The shooting parameters of the normal video - recording mode can be different from or the same as those of the normal photo - taking mode.

[0428] After obtaining the shooting parameters of the normal video - recording mode, the electronic device 100 can obtain the updated preview resolution from the configuration file corresponding to the normal video - recording mode based on the shooting parameters of the normal video - recording mode, and this updated preview resolution can be the preview resolution corresponding to the normal video - recording mode.

[0429] Exemplarily, the shooting parameters of the normal video recording mode include but are not limited to: normal video recording mode, preview state, folded state, rear main camera, and a picture ratio of 16:9. And based on these shooting parameters, the updated preview resolution corresponding to the normal video recording mode is obtained from the first configuration file. Exemplarily, the updated preview resolution may be 810x1440. Regarding how the electronic device 100 obtains the updated preview resolution based on the shooting parameters, reference can be made to Figure 10 the description in the embodiments.

[0430] After obtaining the updated preview resolution, the electronic device 100 can collect images based on the updated preview resolution and display a preview image frame.

[0431] In some embodiments, the electronic device 100 also needs to obtain the updated shooting resolution corresponding to the normal video recording mode. In this way, when a user operation on the shooting control 502 is detected, the electronic device 100 can collect image frames based on the previously obtained updated shooting resolution corresponding to the normal video recording mode, so as to accelerate the response of the electronic device 100 to the user's shooting action.

[0432] Exemplarily, the electronic device 100 can obtain the shooting parameters for obtaining the updated shooting resolution. The shooting parameters include but are not limited to: normal video recording mode, non-preview state, folded state, rear main camera, and a picture ratio of 16:9. And based on these shooting parameters, the shooting resolution corresponding to the normal video recording mode is obtained from the first configuration file. Exemplarily, the updated preview resolution may be 1215x2160. Regarding how the electronic device 100 obtains the shooting resolution based on the shooting parameters, reference can be made to Figure 10 the description in the embodiments.

[0433] Optionally, the updated preview resolution is lower than the updated shooting resolution. In this way, the electronic device 100 can collect preview images at a lower resolution to reduce the power consumption of the electronic device 100.

[0434] Optionally, the updated preview resolution can also be the same as the updated shooting resolution, and the present application does not make any limitation on this.

[0435] In other embodiments, the electronic device 100 can also determine the updated shooting resolution corresponding to the normal video recording mode after detecting a user operation on the shooting control 502, and the present application does not make any limitation on this.

[0436] In some embodiments, after the electronic device 100 detects a user operation (such as a click) on the shooting control 502, in response to the user operation, the electronic device 100 can record a video at an updated shooting resolution corresponding to the pre-configured normal video recording mode and save the captured video file in the gallery. This can accelerate the response of the electronic device 100 to the user's shooting action. After the electronic device 100 receives the user operation on the shooting control 502 again, the camera application stops recording, and the electronic device 100 continues to collect and display preview image frames at the updated preview resolution corresponding to the normal video recording mode.

[0437] Method 2: Without changing the shooting mode, change the shooting parameters of the camera application.

[0438] In some embodiments, without changing the shooting mode of the electronic device 100, the shooting parameters of the camera application can also be changed.

[0439] Exemplarily, in the same shooting mode, the electronic device 100 can change the state of the electronic device display screen and / or change the camera type and / or change the picture ratio, etc. based on the user operation, so as to change the shooting parameters of the camera application to obtain an updated preview resolution.

[0440] This application takes changing other shooting parameters corresponding to the normal shooting mode without changing the normal shooting mode as an example for illustration.

[0441] Without changing the normal shooting mode, changing other shooting parameters corresponding to the normal shooting mode can include but are not limited to the following methods.

[0442] Method 1: Change the state of the electronic device display screen to obtain an updated preview resolution.

[0443] When the display screen of the electronic device is a foldable screen or an expandable screen, the user can change the state of the electronic device display screen. For example, switch the electronic device display screen from the folded state to the unfolded state, or switch the electronic device display screen from the unfolded state to the folded state.

[0444] Exemplarily, in the normal shooting mode, the electronic device 100 can switch the state of the electronic device display screen from the folded state to the unfolded state based on the user operation.

[0445] In response to the state of the electronic device display screen being switched from the folded state to the unfolded state, the electronic device 100 can obtain updated shooting parameters for the normal shooting mode.

[0446] The updated shooting parameters of the normal shooting mode can be different from or the same as the shooting parameters of the normal shooting mode.

[0447] After obtaining the updated shooting parameters in the normal shooting mode, the electronic device 100 can obtain the updated preview resolution from the configuration file corresponding to the normal shooting mode based on the updated shooting parameters in the normal shooting mode, and the updated preview resolution can be the updated preview resolution corresponding to the normal shooting mode.

[0448] Exemplarily, the updated shooting parameters in the normal shooting mode include but are not limited to: the normal shooting mode, the preview state, the unfolded state, the rear main camera, and an 8:7 picture ratio. And based on the shooting parameters, obtain the updated preview resolution corresponding to the normal shooting mode from the first configuration file. Exemplarily, the updated preview resolution can be 1280x1120. For how the electronic device 100 obtains the updated preview resolution based on the shooting parameters, reference can be made to Figure 10 the description in the embodiments.

[0449] After obtaining the updated preview resolution, the electronic device 100 can collect images based on the updated preview resolution and display the preview image frame.

[0450] In some embodiments, the electronic device 100 also needs to obtain the updated shooting resolution corresponding to the normal shooting mode. In this way, when detecting a user operation on the shooting control 502, the electronic device 100 can collect an image frame based on the previously obtained updated shooting resolution corresponding to the normal shooting mode, so as to accelerate the response of the electronic device 100 to the user's shooting action.

[0451] Exemplarily, the electronic device 100 can obtain the shooting parameters for obtaining the updated shooting resolution, and the shooting parameters include but are not limited to: the normal shooting mode, the non-preview state, the unfolded state, the rear main camera, and an 8:7 picture ratio. And based on the shooting parameters, obtain the updated shooting resolution corresponding to the normal shooting mode from the first configuration file. Exemplarily, the updated preview resolution can be 1920x1680. For how the electronic device 100 obtains the updated shooting resolution based on the shooting parameters, reference can be made to Figure 10 the description in the embodiments.

[0452] Optionally, the updated preview resolution is lower than the updated shooting resolution. In this way, the electronic device 100 can collect preview images at a lower resolution to reduce the power consumption of the electronic device 100.

[0453] Optionally, the updated preview resolution can also be the same as the updated shooting resolution, and the present application does not make any limitation in this regard.

[0454] In other embodiments, the electronic device 100 can also determine the updated shooting resolution corresponding to the normal shooting mode after detecting a user operation on the shooting control 502, and the present application does not make any limitation in this regard.

[0455] In some embodiments, after the electronic device 100 detects a user operation (such as a click) on the shooting control 502, in response to the user operation, the electronic device 100 can take a photo with an updated shooting resolution corresponding to the pre-configured normal shooting mode, and save the taken picture in the photo gallery. This can speed up the response of the electronic device 100 to the user's shooting action. After obtaining the picture, the camera application stops taking pictures and enters the preview state again, and the electronic device 100 continues to collect and display preview image frames with the updated preview resolution corresponding to the normal shooting mode.

[0456] Method 2: Change the camera type to obtain an updated preview resolution.

[0457] Based on the foregoing description, it can be known that the electronic device 100 may include a front camera and a rear camera. The front camera may include one or more cameras, and the rear camera may also include one or more cameras. The electronic device 100 can switch different rear cameras based on user operations to change the shooting parameters of the camera application. The electronic device 100 can also switch between the front and rear cameras based on user operations to change the shooting parameters of the camera application.

[0458] Method A: Switch from the main camera to the wide-angle camera to obtain an updated preview resolution.

[0459] The rear camera of the electronic device 100 may include one or more cameras, such as a main camera, a wide-angle camera, and a telephoto camera, etc.

[0460] The electronic device 100 can switch between multiple rear cameras based on user operations. For example, when the electronic device 100 receives a user operation to increase the zoom ratio of the camera application, it can switch from the main camera to the wide-angle camera to change the shooting parameters of the camera application, obtain updated shooting parameters, and obtain an updated preview resolution based on the updated shooting parameters.

[0461] The updated shooting parameters in the normal shooting mode may be different from or the same as the shooting parameters in the normal shooting mode.

[0462] After obtaining the updated shooting parameters in the normal shooting mode, the electronic device 100 can obtain the updated preview resolution from the configuration file corresponding to the normal shooting mode based on the updated shooting parameters in the normal shooting mode. The updated preview resolution may be the updated preview resolution corresponding to the normal shooting mode.

[0463] Exemplarily, the updated shooting parameters in the normal shooting mode include but are not limited to: normal shooting mode, preview state, folded state, rear wide-angle camera, and 4:3 picture ratio. And based on these shooting parameters, the updated preview resolution corresponding to the normal shooting mode is obtained from the first configuration file. Exemplarily, the updated preview resolution can be 640×853. For how the electronic device 100 obtains the updated preview resolution based on the shooting parameters, reference can be made to Figure 10 the description in the embodiment.

[0464] After obtaining the updated preview resolution, the electronic device 100 can collect images based on the updated preview resolution and display the preview image frame.

[0465] In some embodiments, the electronic device 100 also needs to obtain the updated shooting resolution corresponding to the normal shooting mode. In this way, when a user operation on the shooting control 502 is detected, the electronic device 100 can collect image frames based on the previously obtained updated shooting resolution corresponding to the normal shooting mode, so as to speed up the response of the electronic device 100 to the user's shooting action.

[0466] Exemplarily, the electronic device 100 can obtain the shooting parameters for obtaining the updated shooting resolution. The shooting parameters include but are not limited to: normal shooting mode, non-preview state, folded state, rear wide-angle camera, and 4:3 picture ratio. And based on these shooting parameters, the updated shooting resolution corresponding to the normal shooting mode is obtained from the first configuration file. Exemplarily, the updated preview resolution can be 960×1280. For how the electronic device 100 obtains the updated shooting resolution based on the shooting parameters, reference can be made to Figure 10 the description in the embodiment.

[0467] Optionally, the updated preview resolution is lower than the updated shooting resolution. In this way, the electronic device 100 can collect preview images at a lower resolution to reduce the power consumption of the electronic device 100.

[0468] Optionally, the updated preview resolution can also be the same as the updated shooting resolution, and this application does not make any limitations in this regard.

[0469] In other embodiments, the electronic device 100 can also determine the updated shooting resolution corresponding to the normal shooting mode after detecting a user operation on the shooting control 502, and this application does not make any limitations in this regard.

[0470] In some embodiments, after the electronic device 100 detects a user operation (such as a click) on the shooting control 502, in response to the user operation, the electronic device 100 can take a photo with an updated shooting resolution corresponding to the pre-configured normal shooting mode, and save the captured picture in the photo gallery. This can speed up the response of the electronic device 100 to the user's shooting action. After obtaining the picture, the camera application stops taking pictures and enters the preview state again, and the electronic device 100 continues to collect and display preview image frames with the updated preview resolution corresponding to the normal shooting mode.

[0471] Method B: Switch from the front camera to the rear camera to obtain an updated preview resolution.

[0472] In some embodiments, the electronic device 100 can change the shooting parameters of the camera application based on a user operation, switch from the front camera to the rear camera to obtain updated shooting parameters, and obtain an updated preview resolution based on the updated shooting parameters.

[0473] The updated shooting parameters of the normal shooting mode can be different from or the same as the shooting parameters of the normal shooting mode.

[0474] After obtaining the updated shooting parameters of the normal shooting mode, the electronic device 100 can obtain the updated preview resolution from the configuration file corresponding to the normal shooting mode based on the updated shooting parameters of the normal shooting mode, and the updated preview resolution can be the updated preview resolution corresponding to the normal shooting mode.

[0475] Exemplarily, the updated shooting parameters of the normal shooting mode include but are not limited to: normal shooting mode, preview state, folded state, front camera, and a picture ratio of 4:3. And based on the shooting parameters, obtain the updated preview resolution corresponding to the normal shooting mode from the first configuration file. Exemplarily, the updated preview resolution can be 640×853. For how the electronic device 100 obtains the updated preview resolution based on the shooting parameters, reference can be made to Figure 10 the description in the embodiment.

[0476] After obtaining the updated preview resolution, the electronic device 100 can collect images and display preview image frames based on the updated preview resolution.

[0477] In some embodiments, the electronic device 100 also needs to obtain the updated shooting resolution corresponding to the normal shooting mode. In this way, when a user operation on the shooting control 502 is detected, the electronic device 100 can collect image frames based on the updated shooting resolution corresponding to the normal shooting mode obtained in advance, so as to speed up the response of the electronic device 100 to the user's shooting action.

[0478] Exemplarily, the electronic device 100 can obtain shooting parameters for obtaining an updated shooting resolution. The shooting parameters include but are not limited to: normal shooting mode, non-preview state, folded state, front camera, and a 4:3 picture ratio. And based on the shooting parameters, obtain the updated shooting resolution corresponding to the normal shooting mode from the first configuration file. Exemplarily, the updated preview resolution can be 960×1280. For how the electronic device 100 obtains the updated shooting resolution based on the shooting parameters, reference can be made to Figure 10 the description in the embodiment.

[0479] Optionally, the updated preview resolution is lower than the updated shooting resolution. In this way, the electronic device 100 can collect preview images at a lower resolution to reduce the power consumption of the electronic device 100.

[0480] Optionally, the updated preview resolution can also be the same as the updated shooting resolution, and the present application does not limit this.

[0481] In other embodiments, after the electronic device 100 detects a user operation on the shooting control 502, the electronic device 100 can also determine the updated shooting resolution corresponding to the normal shooting mode, and the present application does not limit this.

[0482] In some embodiments, after the electronic device 100 detects a user operation (such as a click) on the shooting control 502, in response to the user operation, the electronic device 100 can take a picture at the updated shooting resolution corresponding to the pre-configured normal shooting mode and save the taken picture in the gallery. This can speed up the response of the electronic device 100 to the user's shooting action. After obtaining the picture, the camera application stops taking pictures and enters the preview state again, and the electronic device 100 continues to collect and display preview image frames at the updated preview resolution corresponding to the normal shooting mode.

[0483] Method 3: Change the picture ratio to obtain an updated preview resolution.

[0484] In some embodiments, the electronic device 100 can change the picture ratio of the camera application for taking pictures or videos based on a user operation. For example, in the normal shooting mode, the electronic device 100 can receive a user operation to change the picture ratio of the camera application from 4:3 to 16:9. In response to changing the picture ratio from 4:3 to 16:9, the shooting parameters of the camera application are changed to obtain updated shooting parameters, and the updated preview resolution is obtained based on the updated shooting parameters.

[0485] The updated shooting parameters in the normal shooting mode can be different from or the same as the shooting parameters in the normal shooting mode.

[0486] After obtaining the updated shooting parameters in the normal shooting mode, the electronic device 100 can obtain the updated preview resolution from the configuration file corresponding to the normal shooting mode based on the updated shooting parameters in the normal shooting mode, and the updated preview resolution can be the updated preview resolution corresponding to the normal shooting mode.

[0487] Exemplarily, the updated shooting parameters in the normal shooting mode include but are not limited to: the normal shooting mode, the preview state, the folded state, the rear main camera, and the picture ratio of 16:9. And based on the shooting parameters, obtain the updated preview resolution corresponding to the normal shooting mode from the first configuration file. Exemplarily, the updated preview resolution can be 720×1280. For how the electronic device 100 obtains the updated preview resolution based on the shooting parameters, reference can be made to Figure 10 the description in the embodiments.

[0488] After obtaining the updated preview resolution, the electronic device 100 can collect images based on the updated preview resolution and display preview image frames.

[0489] In some embodiments, the electronic device 100 also needs to obtain the updated shooting resolution corresponding to the normal shooting mode. In this way, when detecting a user operation on the shooting control 502, the electronic device 100 can collect image frames based on the updated shooting resolution corresponding to the normal shooting mode obtained in advance, so as to accelerate the response of the electronic device 100 to the user's shooting action.

[0490] Exemplarily, the electronic device 100 can obtain the shooting parameters for obtaining the updated shooting resolution, and the shooting parameters include but are not limited to: the normal shooting mode, the non-preview state, the folded state, the rear main camera, and the picture ratio of 16:9. And based on the shooting parameters, obtain the updated shooting resolution corresponding to the normal shooting mode from the first configuration file. Exemplarily, the updated preview resolution can be 1440x1920. For how the electronic device 100 obtains the updated shooting resolution based on the shooting parameters, reference can be made to Figure 10 the description in the embodiments.

[0491] Optionally, the updated preview resolution is lower than the updated shooting resolution. In this way, the electronic device 100 can collect preview images at a lower resolution to reduce the power consumption of the electronic device 100.

[0492] Optionally, the updated preview resolution can also be the same as the updated shooting resolution, and the present application does not make any limitation in this regard.

[0493] In other embodiments, the electronic device 100 can also determine the updated shooting resolution corresponding to the normal shooting mode after detecting a user operation on the shooting control 502, and the present application does not make any limitation in this regard.

[0494] In some embodiments, after the electronic device 100 detects a user operation (such as a click) on the shooting control 502, in response to the user operation, the electronic device 100 can take a photo with the updated shooting resolution corresponding to the pre-configured normal shooting mode, and save the captured picture in the photo gallery. This can speed up the response of the electronic device 100 to the user's shooting action. After obtaining the picture, the camera application stops taking pictures and enters the preview state again, and the electronic device 100 continues to collect and display the preview image frame with the updated preview resolution corresponding to the normal shooting mode.

[0495] Figure 14 Schematic flow diagram of a method for an electronic device 100 provided by this application to update the picture resolution of a camera application based on user operations.

[0496] The implementation of this method can be based on the interaction and cooperation between the application layer (such as the camera application), the hardware abstraction layer (HAL), the driver layer, and the hardware layer in the electronic device, where the application layer mainly involves the camera application. The driver layer mainly involves the camera driver and the disk driver. The hardware layer mainly involves the camera module and the disk, etc.

[0497] S1401. The camera application receives a user operation to change the shooting parameters of the camera application.

[0498] S1402. In response to the user operation, the camera application obtains the updated shooting parameters.

[0499] Based on Figure 9 the introduction of the embodiment, after the camera application is launched based on the user operation, the camera application can default to the normal shooting mode of the camera application.

[0500] In response to entering the normal shooting mode, the camera application can obtain the initial preview resolution of the normal shooting mode. In some embodiments, the camera application can also obtain the initial shooting resolution of the normal shooting mode.

[0501] In some embodiments, the camera application can receive a user operation to change the shooting parameters of the camera application. In response to changing the shooting parameters of the camera application, the camera application needs to obtain the updated preview resolution. In some embodiments, the camera application can also obtain the updated shooting resolution.

[0502] The electronic device 100 can change the shooting parameters of the camera application in, but not limited to, the following ways.

[0503] Way 1: Change the shooting mode to change the shooting parameters of the camera application.

[0504] The shooting modes may include any of the following: normal photo shooting mode, portrait photo shooting mode, high-definition photo shooting mode, night scene photo shooting mode, panoramic photo shooting mode, normal video recording mode, delayed video recording mode, slow-motion video recording mode, etc. The electronic device 100 may receive a user operation to switch between any two shooting modes to change the shooting parameters of the camera application. For example, the electronic device 100 may receive a user operation to switch between the normal camera mode and the normal video recording mode to change the shooting parameters of the camera application.

[0505] When the electronic device 100 changes the shooting mode based on a user operation, the electronic device 100 may change the shooting parameters of the camera application, and the electronic device 100 may obtain updated shooting parameters. Specifically, reference may be made to the description of Method 1 above, and details are not elaborated herein in this application.

[0506] Method 2: Without changing the shooting mode, change the shooting parameters of the camera application.

[0507] Without changing the shooting mode, the electronic device 100 may change the state of the electronic device display screen in this shooting mode and / or change the camera type and / or change the picture ratio, etc. based on a user operation to change the shooting parameters of the camera application, obtain updated shooting parameters, and obtain an updated preview resolution.

[0508] Specifically, reference may be made to the description of Method 2 above, and details are not elaborated herein in this application.

[0509] S1403. The camera application obtains a first configuration file from the running memory of the camera application.

[0510] S1404. The camera application obtains an updated preview resolution and an updated shooting resolution from the first configuration file based on the updated shooting parameters.

[0511] In response to obtaining the updated shooting parameters, the camera application may obtain the first configuration file from the running memory of the camera application. Since the camera application has already been run, the first configuration file is stored in the running memory of the camera application, and there is no need to obtain the first configuration file from the file system of the camera application anymore. The camera application can directly obtain the first configuration file from the running memory of the camera application, which can save the time for the camera application to obtain the first configuration file.

[0512] After obtaining the updated shooting parameters, the camera application may determine the updated preview resolution from the first configuration file based on the updated shooting parameters.

[0513] After obtaining the updated preview resolution, the electronic device 100 may collect an image at the updated preview resolution and display a preview image frame.

[0514] In some embodiments, the camera application also needs to obtain an updated shooting resolution. In this way, after detecting a user operation on the shooting control 502, the electronic device 100 can collect image frames based on the previously obtained updated shooting resolution to accelerate the response of the camera application to the user's shooting action.

[0515] Optionally, the updated preview resolution is lower than the updated shooting resolution. In this way, the electronic device 100 can collect preview images at a lower resolution to reduce the power consumption of the electronic device 100.

[0516] Optionally, the updated preview resolution can also be the same as the updated shooting resolution, and the present application does not make any limitation in this regard.

[0517] In other embodiments, the camera application can also determine the updated shooting resolution after detecting a user operation on the shooting control 502, and the present application does not make any limitation in this regard.

[0518] S1405. The camera application sends the updated preview resolution to the HAL layer.

[0519] S1406. The HAL layer sends the updated preview resolution to the camera driver.

[0520] S1407. The camera driver sends the updated preview resolution to the camera module.

[0521] S1408. The camera module collects images at the updated preview resolution.

[0522] After the camera application determines the updated preview resolution, the camera application can send the updated preview resolution to the HAL layer, and the HAL layer then sends the updated preview resolution to the camera driver, and the camera driver sends the updated preview resolution to the camera module.

[0523] After receiving the updated preview resolution, the camera module can collect images based on the updated preview resolution. And the image collected by the camera module at the updated preview resolution is displayed in the preview window of the camera application.

[0524] S1409. The camera application receives a user operation on the shutter key.

[0525] S1410. The camera application sends the updated shooting resolution to the HAL layer.

[0526] S1411. The HAL layer sends the updated shooting resolution to the camera driver.

[0527] S1412. The camera driver sends the updated shooting resolution to the camera module.

[0528] S1413. The camera module captures an image or video at an updated shooting resolution and saves the image or video.

[0529] In some embodiments, the electronic device 100 may receive a user operation on the shutter key and save a picture or video.

[0530] Exemplarily, the user operation on the shutter key may be an input operation on Figure 8B the shooting control 502 as shown in, for example, a click.

[0531] In response to the user operation on the shutter key, the camera application may send the previously obtained updated shooting resolution to the HAL layer, and the HAL layer then sends the updated shooting resolution to the camera driver, and the camera driver sends the updated shooting resolution to the camera module.

[0532] After receiving the updated shooting resolution, the camera module may capture an image or video based on the updated shooting resolution. And save the image or video captured by the camera module at the updated shooting resolution in the gallery. In this way, the response of the camera application to the user's shooting action can be accelerated.

[0533] In some embodiments, S1409 - S1413 may not be executed, and the present application does not limit this.

[0534] Figure 15 It is a schematic flowchart of a method for configuring picture resolution provided by the present application.

[0535] S1501. When the electronic device runs the camera application, store a first configuration file in the running memory of the camera application. The first configuration file records the corresponding relationships between multiple different shooting parameters and picture resolutions.

[0536] Exemplarily, the first configuration file may be Figures 10 - 13 the configuration file as shown.

[0537] In some embodiments, after the camera application is closed, the first configuration file stored in the running memory of the camera application will be cleared. When the camera application runs again, the camera application loads the first configuration file into the running memory of the camera application again.

[0538] S1502. The electronic device receives and responds to a first operation of the user on the camera application, and obtains a first shooting parameter.

[0539] S1503. The electronic device obtains the first configuration file from the running memory of the camera application.

[0540] S1504. The electronic device obtains a first picture resolution from the first configuration file based on the first shooting parameter.

[0541] In some embodiments, the first picture resolution may be referred to as the updated preview resolution.

[0542] In some embodiments, the first shooting parameter may also be referred to as the updated shooting parameter.

[0543] Regarding how the electronic device obtains the first picture resolution from the first configuration file based on the first shooting parameter, reference may be made to Figure 14 the description in the embodiments.

[0544] S1505. The electronic device acquires a first image at the first picture resolution through a camera application; the electronic device displays the first image within the camera application.

[0545] Optionally, the electronic device may display the first image within the preview window of the camera application.

[0546] Through this method, the electronic device 100 can store the resolution information supported by the camera application in the first configuration file. After the camera application runs, the electronic device 100 stores the first configuration file in the running memory of the camera application. When the camera application needs to reconfigure the picture resolution, the camera application only needs to obtain the updated picture resolution from the first configuration file, simplifying the process for the camera application to obtain the updated picture resolution and also accelerating the speed at which the camera application obtains the updated picture resolution.

[0547] In a possible implementation manner, after the electronic device runs the camera application and before storing the first configuration file in the running memory of the camera application, the method further includes: the electronic device obtains the first configuration file from the file system of the camera application.

[0548] The first configuration file is stored in the file system of the camera application. When the camera application runs, the camera application can obtain the first configuration file from the file system of the camera application and store it in the running memory of the camera application.

[0549] Regarding how the electronic device obtains the first configuration file from the file system of the camera application, reference may be made to Figure 9 the description in the embodiments.

[0550] In a possible implementation manner, the first shooting parameter includes the shooting parameters of the camera application in the preview state corresponding to the first shooting mode. After the electronic device obtains the first configuration file, the method further includes: the electronic device obtains a second shooting parameter, where the second shooting parameter includes the shooting parameters of the camera application in the shooting state corresponding to the first shooting mode; the electronic device obtains the first configuration file from the running memory of the camera application; the electronic device obtains a second picture resolution from the first configuration file based on the second shooting parameter.

[0551] In some embodiments, the second picture resolution may be referred to as the updated shooting resolution.

[0552] In some embodiments, the second shooting parameter may also be referred to as the updated shooting parameter.

[0553] In other possible implementations, the camera application may not obtain the second picture resolution first, but obtain the second picture resolution after detecting the user's operation on the shutter key. This application does not make any limitations in this regard.

[0554] In this way, the camera application can obtain the second picture resolution in advance before detecting the user's operation on the shutter key, so as to speed up the camera application's response to the user's operation on the shutter key and improve the user experience.

[0555] In a possible implementation, the method further includes: the electronic device receives a second operation of the user on the shutter key in the camera application; in response to the second operation, the electronic device captures a second image or a second video at the second picture resolution; the electronic device saves the second image or the second video.

[0556] In this way, the camera application can obtain the second picture resolution in advance before detecting the user's operation on the shutter key. When the camera application detects the user's operation on the shutter key, it captures a second image or a second video at the pre-obtained second picture resolution, so as to speed up the camera application's response to the user's operation on the shutter key and improve the user experience.

[0557] In a possible implementation, the second picture resolution is greater than the first picture resolution.

[0558] Generally speaking, users do not have high requirements for the clarity of the preview image. The camera application can capture the preview image at a relatively low picture resolution, which can save the power consumption of the electronic device and will not exceed the screen resolution of the electronic device.

[0559] In a possible implementation, the first operation includes any one or more of the following: changing the shooting mode of the camera application, changing the display state of the electronic device, changing the type of camera, and changing the picture ratio.

[0560] In a possible implementation, before the electronic device receives and responds to the first operation of the user on the camera application, the method further includes: the electronic device obtains a third shooting parameter, and obtains a third picture resolution from the file system of the camera application based on the third shooting parameter; the electronic device captures a third image at the third picture resolution through the camera application; the electronic device displays the third image in the camera application.

[0561] In a possible implementation, the third shooting parameter includes the shooting parameters of the camera application in the preview state corresponding to the default shooting mode; the method further includes: the electronic device obtains a fourth shooting parameter, where the fourth shooting parameter includes the shooting parameters of the camera application in the shooting state corresponding to the default shooting mode; the electronic device obtains a fourth picture resolution from the file system of the camera application based on the fourth shooting parameter.

[0562] In some embodiments, the third picture resolution may be referred to as the initial preview resolution, and the fourth picture resolution may be referred to as the initial shooting resolution.

[0563] In some embodiments, the third shooting parameter and the fourth shooting parameter may also be referred to as the initial shooting parameters.

[0564] For how the electronic device obtains the third picture resolution and the fourth picture resolution from the first configuration file based on the third shooting parameter and the fourth shooting parameter, reference may be made to the description in the Figure 14 embodiment.

[0565] In this way, when the camera application is first launched and before the user changes the shooting parameters, the camera application can obtain the initial preview resolution and the initial shooting resolution, and collect a preview image at the initial preview resolution.

[0566] Optionally, the camera application may also only obtain the initial preview resolution without obtaining the initial shooting resolution. When detecting an operation by the user on the shutter key, the camera application then obtains the initial shooting resolution.

[0567] Optionally, the camera application may also, after obtaining the first configuration file, obtain the initial shooting resolution from the first configuration file based on the initial shooting parameter.

[0568] In a possible implementation, the electronic device periodically / irregularly obtains a second configuration file from the server, and the second configuration file is partially or completely different from the first configuration file.

[0569] In this way, the first configuration file of the camera application stored on the electronic device can be updated periodically / irregularly.

[0570] In some embodiments, the content of the configuration file is related to the device model. The content of the configuration files corresponding to different device models may be different. In other embodiments, the content of the configuration files corresponding to different device models may also be the same, and the present application does not make any limitation thereto.

[0571] In a possible implementation, the shooting parameter includes any one or more of the following: shooting state, shooting mode, device display screen state, camera type, picture ratio.

[0572] This application provides an electronic device, which includes a camera, a memory, and a processor; wherein, the camera, the memory, and the processor are coupled, and the memory is used to store a computer program. When the processor executes and calls the computer program, the electronic device is caused to execute Figure 15 a picture resolution configuration method as shown.

[0573] This application provides a computer-readable storage medium, including instructions. When the instructions run on an electronic device, the electronic device is caused to execute Figure 15 a picture resolution configuration method as shown.

[0574] This application provides a computer program product containing instructions. When the above computer program product runs on an electronic device, the electronic device is caused to execute Figure 15 a picture resolution configuration method as shown.

[0575] This application provides a chip system, which includes one or more processors. The processor is used to call computer instructions to cause the electronic device to execute Figure 15 a picture resolution configuration method as shown.

[0576] The above are only some embodiments and implementation manners of this application. The protection scope of this application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by this application, and all should be covered within the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

[0577] It can be understood that each user interface described in the embodiments of this application is only an example interface and does not limit the solution of this application. In other embodiments, the user interface can adopt different interface layouts, can include more or fewer controls, and can add or reduce other function options. As long as it is based on the same inventive concept provided by this application, it is within the protection scope of this application.

[0578] It should be noted that without contradiction or conflict, any feature in any embodiment of this application, or any part of any feature, can be combined, and the combined technical solution is also within the scope of the embodiments of this application.

[0579] As described above, the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit them; although this application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A method for configuring picture resolution, characterized in that, the method includes: When the electronic device runs the camera application, store the first configuration file in the running memory of the camera application, and the corresponding relationship between multiple different shooting parameters and picture resolution is recorded in the first configuration file; The electronic device receives and responds to the first operation of the user for the camera application, and obtains the first shooting parameter; The electronic device obtains the first configuration file from the running memory of the camera application; The electronic device obtains the first picture resolution from the first configuration file based on the first shooting parameter; The electronic device captures the first image at the first picture resolution through the camera application; The electronic device displays the first image in the camera application.

2. According to the method described in claim 1, after the electronic device runs the camera application and before storing the first configuration file in the running memory of the camera application, the method further includes: The electronic device obtains the first configuration file from the file system of the camera application.

3. According to the method described in claim 1 or 2, characterized in that, The first shooting parameter includes the shooting parameter in the preview state corresponding to the first shooting mode of the camera application. After the electronic device obtains the first configuration file, the method further includes; The electronic device obtains the second shooting parameter, and the second shooting parameter includes the shooting parameter in the shooting state corresponding to the first shooting mode of the camera application; The electronic device obtains the first configuration file from the running memory of the camera application; The electronic device obtains the second picture resolution from the first configuration file based on the second shooting parameter.

4. According to the method described in claim 3, characterized in that, the method further includes; The electronic device receives the second operation of the user for the shutter button in the camera application; In response to the second operation, the electronic device captures the second image or the second video at the second picture resolution; The electronic device saves the second image or the second video.

5. According to the method described in claim 3 or 4, characterized in that, The second picture resolution is greater than the first picture resolution.

6. According to the method described in any one of claims 1-5, characterized in that, The first operation includes any one or more of the following: changing the shooting mode of the camera application, changing the display screen state of the electronic device, changing the camera type, changing the picture ratio.

7. According to the method described in claim 2, characterized in that, Before the electronic device receives and responds to the first operation of the user for the camera application, the method further includes: The electronic device obtains the first configuration file from the running memory of the camera application; The electronic device obtains the third shooting parameter and obtains the third picture resolution from the first configuration file based on the third shooting parameter; The electronic device captures the third image at the third picture resolution through the camera application; The electronic device displays the third image in the camera application.

8. The method according to claim 7, wherein, the third shooting parameter includes the shooting parameter of the camera application in the preview state corresponding to the default shooting mode; the method further includes; the electronic device obtains a fourth shooting parameter, and the fourth shooting parameter includes the shooting parameter of the camera application in the shooting state corresponding to the default shooting mode; the electronic device obtains the first configuration file from the running memory of the camera application; the electronic device obtains a fourth picture resolution from the first configuration file based on the fourth shooting parameter.

9. The method according to any one of claims 1-8, wherein, the electronic device periodically / irregularly obtains a second configuration file from the server, and the second configuration file is partially or completely different from the first configuration file.

10. The method according to any one of claims 1-9, wherein, the shooting parameter includes any one or more of the following: shooting state, shooting mode, device display screen state, camera type, picture ratio.

11. An electronic device, wherein, the electronic device includes a camera, a memory, and a processor; wherein, the camera, the memory, and the processor are coupled, and the memory is used to store a computer program. When the processor executes and calls the computer program, the electronic device executes the method according to any one of claims 1-10.

12. A computer-readable storage medium, including instructions, wherein, when the instructions run on the electronic device, the electronic device executes the method according to any one of claims 1-10.

Citation Information

Patent Citations

  • Program starting method, device and equipment

    CN103309740A

  • Photographing module output image resolution control method and mobile terminal

    CN104184895A

  • Starting method and device for applications in Android system

    CN108762833A

  • Camera video resolution configuration method and device, equipment and storage medium

    CN111212227A

  • Camera system, control method thereof, and electronic device

    CN116782025A