[go: up one dir, main page]

CN120075601A - Picture resolution configuration method, electronic equipment and storage medium - Google Patents

Picture resolution configuration method, electronic equipment and storage medium Download PDF

Info

Publication number
CN120075601A
CN120075601A CN202311641422.2A CN202311641422A CN120075601A CN 120075601 A CN120075601 A CN 120075601A CN 202311641422 A CN202311641422 A CN 202311641422A CN 120075601 A CN120075601 A CN 120075601A
Authority
CN
China
Prior art keywords
electronic device
resolution
camera application
camera
shooting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311641422.2A
Other languages
Chinese (zh)
Inventor
张亚运
欧阳金伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202311641422.2A priority Critical patent/CN120075601A/en
Priority to PCT/CN2024/135397 priority patent/WO2025113590A1/en
Publication of CN120075601A publication Critical patent/CN120075601A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • H04N23/632Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/57Mechanical or electrical details of cameras or camera modules specially adapted for being embedded in other devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/667Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Studio Devices (AREA)

Abstract

本申请提供了一种图片分辨率配置方法、电子设备及存储介质。当电子设备运行相机应用时,将第一配置文件存储在相机应用的运行内存内,第一配置文件中记录有多个不同的拍摄参数与图片分辨率的对应关系;电子设备接收并响应用户针对相机应用的第一操作,获取第一拍摄参数;电子设备从相机应用的运行内存中获取第一配置文件;电子设备基于第一拍摄参数从第一配置文件中获取第一图片分辨率;电子设备通过相机应用以第一图片分辨率采集第一图像;电子设备在相机应用内显示第一图像。简化了电子设备为相机应用配置分辨率的流程,提升了分辨率配置效率。

The present application provides a method for configuring image resolution, an electronic device, and a storage medium. When an electronic device runs a camera application, a first configuration file is stored in the running memory of the camera application, and the first configuration file records the correspondence between multiple different shooting parameters and image resolutions; the electronic device receives and responds to a first operation of the user on the camera application, and obtains 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 image resolution from the first configuration file based on the first shooting parameter; the electronic device captures a first image at the first image resolution through the camera application; and the electronic device displays the first image in the camera application. The process of configuring resolution for the camera application by the electronic device is simplified, and the efficiency of resolution configuration is improved.

Description

Picture resolution configuration method, electronic equipment and storage medium
Technical Field
The present application relates to the field of terminal technologies, and in particular, to a method for configuring resolution of a picture, an electronic device, and a storage medium.
Background
With the development of technology, electronic devices (e.g., digital cameras, or mobile phones with cameras, tablet computers, etc.) have been increasingly used for shooting, and the use of electronic devices has become a popular choice.
When a user uses the electronic equipment to shoot, in order to improve the shooting definition of the picture, the user can adjust the resolution of the camera, so that the camera shoots the picture with high-definition quality. However, at present, the electronic device configures the resolution for the camera application, the resolution needs to be acquired and configured from the bottom layer in a cross-process manner, and the time cost is high. How to simplify the process of configuring resolution for camera applications and save time for electronic devices is yet to be further investigated.
Disclosure of Invention
The application provides a picture resolution configuration method, electronic equipment and a storage medium, which simplify the process of configuring resolution for camera application by the electronic equipment and improve the resolution configuration efficiency.
In a first aspect, the application provides a picture resolution configuration method, which comprises the steps of storing a first configuration file in an operation memory of a camera application when the camera application is operated by electronic equipment, recording corresponding relations between a plurality of different shooting parameters and picture resolutions in the first configuration file, receiving and responding to first operation of a user on the camera application by the electronic equipment, acquiring the first configuration file from the operation memory of the camera application by the electronic equipment, acquiring first picture resolution from the first configuration file by the electronic equipment based on the first shooting parameters, acquiring a first image by the electronic equipment through the camera application at the first picture resolution, and displaying the first image in the camera application by the electronic equipment.
Alternatively, the electronic device may display the first image within a preview window of the camera application.
In some embodiments, after the camera application is turned off, the first configuration file stored in the running memory of the camera application is purged. When the camera application is run again, the camera application loads the first configuration file into a running memory of the camera application.
By this method, the electronic device 100 may store resolution information supported by the camera application in the first profile. After the camera application is running, the electronic device 100 stores the first configuration file in a running memory of the camera application. When the camera application needs to reconfigure the picture resolution, the camera application only needs to acquire the updated picture resolution from the first configuration file, so that the process of acquiring the updated picture resolution by the camera application is simplified, and the speed of acquiring the updated picture resolution by the camera application is also increased.
With reference to the first aspect, in a possible implementation manner, after the electronic device runs the camera application, before storing the first configuration file in the running memory of the camera application, the method further includes the electronic device obtaining the first configuration file from a file system of the camera application.
The first configuration file is stored within a file system of the camera application. When the camera application is running, the camera application may obtain the first configuration file from the file system of the camera application and store the first configuration file in the running memory of the camera application.
With reference to the first aspect, in a possible implementation manner, the first shooting parameters include shooting parameters of the camera application in a preview state corresponding to the first shooting mode, after the electronic device acquires the first configuration file, the method further includes the steps that the electronic device acquires second shooting parameters, the second shooting parameters include shooting parameters of the camera application in the shooting state corresponding to the first shooting mode, the electronic device acquires the first configuration file from a running memory of the camera application, and the electronic device acquires the second picture resolution from the first configuration file based on the second shooting parameters.
In other possible implementations, the camera application may not acquire the second picture resolution first, and acquire the second picture resolution after detecting the operation of the shutter key by the user, which is not limited in this aspect of the application.
In this way, the camera application can acquire the second picture resolution in advance before detecting the operation of the user on the shutter key, so as to accelerate the camera application to respond to the operation of the user on the shutter key, thereby improving the user experience.
With reference to the first aspect, in a possible implementation manner, the method further includes the steps of receiving, by the electronic device, a second operation of a shutter key in the camera application by a user, responding to the second operation, acquiring a second image or a second video with a second picture resolution by the electronic device, and storing the second image or the second video by the electronic device.
In this way, the camera application can acquire the second picture resolution in advance before detecting the operation of the shutter key by the user. When the camera application detects the operation of the user on the shutter key, acquiring a second image or a second video with the second picture resolution acquired in advance, so as to accelerate the response of the camera application to the operation of the user on the shutter key, and improve the user experience.
With reference to the first aspect, in one possible implementation manner, the second picture resolution is greater than the first picture resolution.
In general, the user has no high demands on the sharpness of the preview image. The camera application can acquire the preview image with lower picture resolution, and can save power consumption of the electronic device. Nor does it exceed the screen resolution of the electronic device.
With reference to the first aspect, in one possible implementation manner, the first operation includes any one or more of changing a shooting mode of a camera application, changing a display screen state of an electronic device, changing a camera type, and changing a picture scale.
With reference to the first aspect, in one possible implementation manner, before the electronic device receives and responds to the first operation of the user on the camera application, the method further includes the steps that the electronic device obtains a first configuration file from a running memory of the camera application, obtains third shooting parameters, obtains third picture resolution from the first configuration file based on the third shooting parameters, obtains a third image through the camera application at the third picture resolution, and displays the third image in the camera application.
In one possible implementation manner, the third shooting parameters comprise shooting parameters of the camera application in a preview state corresponding to a default shooting mode, the method further comprises the steps that the electronic device obtains fourth shooting parameters, the fourth shooting parameters comprise shooting parameters of the camera application in a shooting state corresponding to the default shooting mode, the electronic device obtains a first configuration file from an operation memory of the camera application, and the electronic device obtains fourth picture resolution from the first configuration file based on the fourth shooting parameters.
In some embodiments, the third picture resolution may be referred to as an initial preview resolution and the fourth picture resolution may be referred to as an initial capture resolution.
Thus, when the camera application is first turned on, the camera application may acquire an initial preview resolution and an initial photographing resolution and acquire a preview image at the initial preview resolution before the user does not change photographing parameters.
Alternatively, the camera application may acquire only the initial preview resolution without acquiring the initial photographing resolution. Upon detecting the user's operation with respect to the shutter key, the camera application reacquires the initial photographing resolution.
Optionally, the camera application may also obtain the initial shooting resolution from the first configuration file based on the initial shooting parameters after obtaining the first configuration file.
With reference to the first aspect, in one possible implementation manner, the electronic device periodically/sporadically obtains a second configuration file from the server, where the second configuration file is partially different or completely different from the first configuration file.
In this way, the first profile of the camera application stored on the electronic device may be updated periodically/sporadically.
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 be the same, which is not limited in the present application.
With reference to the first aspect, in one possible implementation manner, the shooting parameters include any one or more of shooting status, shooting mode, device display screen status, camera type and picture proportion.
In a second aspect, the application provides an electronic device, which comprises a camera, a memory and a processor, wherein the camera, the memory and the processor are coupled, the memory is used for storing a computer program, and when the processor executes a calling computer program, the electronic device executes a picture resolution configuration method provided in any possible implementation manner of the first aspect.
In a third aspect, the present application provides a computer readable storage medium comprising instructions which, when run on an electronic device, cause the electronic device to perform a picture resolution configuration method provided in any one of the possible implementations of the first aspect.
In a fourth aspect, the present application provides a computer program product comprising instructions which, when run on an electronic device, cause the electronic device to perform a picture resolution configuration method as provided in any one of the possible implementations of the first aspect.
In a fifth aspect, the present application provides a chip system, the chip system comprising one or more processors for invoking computer instructions to cause an electronic device to perform a picture resolution configuration method as provided in any one of the possible implementations of the first aspect.
For the description of the advantageous effects of the second aspect to the fifth aspect, reference may be made to the description of the advantageous effects of the first aspect, and the present application will not be repeated here.
Drawings
FIGS. 1A-1D are schematic diagrams showing various photographing scales;
FIGS. 2A-2C and 3A-3C show schematic views of display forms of the folding screen;
3D-3F show schematic views of upper and lower folding screen display modes;
FIG. 4 shows a schematic representation of a display modality of an expansion screen;
FIG. 5 shows a schematic diagram of an electronic device 100 configuring picture resolution for a camera application;
Fig. 6 shows a schematic structural diagram of the electronic device 100;
FIG. 7 is a block diagram of the software architecture of an electronic device 100 according to an embodiment of the invention;
8A-8B illustrate schematic diagrams of the electronic device 100 starting a camera application;
FIG. 9 is a flowchart of a method for configuring a picture resolution for a camera application by the electronic device 100 after the camera application is turned on;
FIGS. 10-13 show schematic diagrams of several picture resolution profiles;
fig. 14 is a flowchart of a method for updating a resolution of a camera application by the electronic device 100 according to the present application;
fig. 15 is a flowchart of a method for configuring resolution of a picture according to the present application.
Detailed Description
The technical solutions of the embodiments of the present application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiment of the present application, unless otherwise indicated, "/" means or, for example, a/B may represent a or B, and "and/or" in the text is merely an association relationship describing an association object, which means that three relationships may exist, for example, a and/or B, and that three cases of a alone, a and B together, and B alone exist, and further, in the description of the embodiment of the present application, "a plurality" means two or more.
The terms "first," "second," and the like, are used below for descriptive purposes only and are not to be construed as implying or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature, and in the description of embodiments of the application, unless otherwise indicated, the meaning of "a plurality" is two or more.
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 program or an operating system and a user, which enables conversion between an internal form of information and a form acceptable to the user. A commonly used presentation form of a user interface is a graphical user interface (graphic user interface, GUI), which refers to a graphically displayed user interface that is related to computer operations. It may be a visual interface element of text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc., displayed in the display of the wearable device.
First, technical terms related to the present application will be explained
1. Picture scale and picture resolution.
The picture resolution can be obtained by the number of pixels of the picture in the lateral direction and the number of pixels in the vertical direction. For example, a 1920x1080 picture may consist of 1920 pixels in the lateral direction and 1080 pixels in the longitudinal direction.
The picture scale may be obtained by a ratio of the number of pixels in the vertical direction and the number of pixels in the horizontal direction of the picture, for example, 1920x1080 of the picture scale may be 16:9.
A picture scale may correspond to one or more different picture resolutions, one picture resolution corresponding to only one picture scale.
The camera application may support a variety of picture scales, which may include, but are not limited to, 1:1, 4:3, 16:9, full screen, and the like. Wherein, the picture proportion under the full screen can be 21:9, and the picture proportion of different types of electronic devices under the full screen can be different. The application is illustrated with the example that the picture ratio under full screen can be 21:9.
Wherein a picture scale of 1:1 may correspond to one or more different picture resolutions, such as 1080 x 1080, 960 x 960, etc.
A 4:3 picture scale may correspond to one or more different picture resolutions, such as 1440x1920, 1200 x 1600, 960 x 1280, 480 x 640, etc.
A picture scale of 16:9 may correspond to one or more different picture resolutions, such as 1080 x 1920, 900 x 1600, 720 x 1280, 540 x 960, and 360 x 640.
One or more different picture resolutions may be corresponding at full screen picture scale, e.g., 823 x 1920, 463 x 1080, 412 x 960, etc.
Fig. 1A to 1D show schematic diagrams of various photographing ratios.
Fig. 1A shows that in the photographing mode, the user selects a 4:3 ratio of pictures for photographing. As shown in fig. 1A, the viewfinder has a length b and a width a, b: a=4:3. The width of the display screen of the electronic device may be a.
Fig. 1B illustrates that in the photographing mode, the user selects a 1:1 picture ratio to photograph. As shown in fig. 1B, the viewfinder has a length c and a width a, c: a=1:1.
Fig. 1C illustrates that in the photographing mode, the user selects a picture ratio of 16:9 for photographing. As shown in fig. 1C, the viewfinder has a length d and a width a, d: a=16:9.
Fig. 1D shows that in the photographing mode, the user selects the full-screen picture scale to photograph. As shown in fig. 1D, the viewfinder has a length e and a width a, e: a=21:9. The display screen of the electronic device may have a length e.
2. Shooting mode
The photographing mode may include a photographing mode and a recording mode.
The photographing mode may include, but is not limited to, any one or more of a normal photographing mode, a portrait photographing mode, a high definition photographing mode, a night view photographing mode, a panorama photographing mode, and the like.
Optionally, when the camera application is started for the first time, the camera application default shooting mode is a normal shooting mode.
Alternatively, the same photographing mode may be divided into different photographing states, for example, a normal photographing mode may be divided into a preview state and a non-preview state. The portrait photographing mode may be also classified into a preview state and a non-preview state. The high definition photographing mode may be also classified into a preview state and a non-preview state. Night scene photographing modes can also be classified into preview states and non-preview states. Panoramic photographing modes can also be classified into preview states and non-preview states. Optionally, some photographing modes may not distinguish between a non-preview state and a preview state, which is not limited by the present application.
The video recording mode may include, but is not limited to, any one or more of a normal video recording mode, a delayed video recording mode, a slow motion video recording mode, and the like.
Alternatively, the same recording mode may be divided into different shooting states, for example, a normal recording mode may be divided into a preview state and a non-preview state. The delayed video recording mode may also be divided into a preview state and a non-preview state. The slow motion video mode may be classified into a preview state and a non-preview state. Alternatively, the recording mode may not distinguish between the non-preview state and the preview state, which is not limited by the present application.
Different shooting modes can correspond to one picture proportion, and can also correspond to multiple picture proportions. When a certain shooting mode supports multiple picture scales, a user can select to switch different picture scales.
For example, in the normal photographing mode, the user may select a 1:1 picture ratio for a 4:3 picture ratio.
3. Form of display screen of electronic equipment
In the application, the forms of the display screen of the electronic equipment can comprise a straight panel display screen, a folding screen and an expansion screen. The folding screen can be divided into an inner folding screen, an outer folding screen, an upper folding screen, a lower folding screen and the like. In some embodiments, the folding screen may also be a double folding screen or the like.
The display area of the straight panel display screen is fixed. The apparatus shown in fig. 1A-1D is in the form of a plate straightener.
In some embodiments, a flat panel display may also be referred to as a stand-up display. As shown in fig. 1A-1D, the shape of the flat panel display is fixed, neither stretchable nor collapsible.
Fig. 2A to 2C and fig. 3A to 3C show schematic views of display forms of the folding screen.
The folding screen can be divided into an inner folding screen and an outer folding screen. The display modes of the inner folding screen and the outer folding screen can be divided into a folded state and an unfolded state. The folded states of the inner folding screen and the outer folding screen can be divided into an intermediate folded state and a full folded state.
Fig. 2A-2C show schematic views of an invaginated screen display.
Fig. 2A shows a schematic view of a display configuration of the inner folding screen in an unfolded state.
Fig. 2A (a) is a front view schematically showing the inner folding screen in an unfolded state. When the inward folding screen is in an unfolding state, the displayable screen of the folding screen comprises an A screen, a B screen and a C screen. The screen A and the screen B can be a complete display screen or two independent display screens. In the fully folded state, the display areas where the a screen and the B screen are located may also be referred to as a large screen, and the display areas where the a screen and the B screen are located may also be referred to as an inner screen. Illustratively, when the inner folding screen is in the unfolded state, the included angle α between the screen a and the screen B is greater than the angle a and less than or equal to 180 degrees, and illustratively, the value of the angle a may be between 170 degrees and 180 degrees. For example, when the inner folding screen is in the unfolded and folded state, the included angle α between the screen a and the screen B may be 180 degrees.
Fig. 2A (b) is a back view schematically showing the inner folding screen in an unfolded and folded state. When the inner folding screen is in an unfolding state, the display screen of the folding screen further comprises a C screen. Wherein, the C screen is a display screen completely independent from the A screen and the B screen.
Fig. 2B-2C are schematic views showing a display form of the inner folding screen in a folded state.
The folded state of the folding screen shown in fig. 2B may also be referred to as an intermediate folded state.
The inner folding screen can be folded towards the direction facing the A screen and the B screen to form a folding shape with a certain included angle. When the inner folding screen is in the middle folding state, the displayable screens of the folding screen comprise an A screen, a B screen and a C screen. In the middle folding state, the display areas where the screen a and the screen B are located may also be referred to as a large screen, and the display areas where the screen a and the screen B are located may also be referred to as an inner screen. The included angle alpha between the screen A and the screen B is larger than or equal to the angle II and smaller than the angle I. For example, the angle two may take a value between 10 degrees and 170 degrees. For example, when the inner folding screen is in the intermediate folding state, the included angle α between the a screen and the B screen may be 120 degrees.
The folded state of the folding screen shown in fig. 2C may also be referred to as a fully folded state.
The inward folding screen can be continuously folded towards the direction facing the A screen and the B screen. Until the inner folding screen is in a completely folded state.
As shown in fig. 2C, when the inner folding screen is in the fully folded state, the displayable screen of the inner folding screen includes only the C screen. In the fully folded state, the display area where the C-screen is located may also be referred to as a small screen, and the display area where the C-screen is located may also be referred to as an outer screen. The a-screen and the B-screen are hidden from view. In the middle folding state, the display areas where the screen a and the screen B are located may also be referred to as a large screen, and the display areas where the screen a and the screen B are located may also be referred to as an inner screen. The included angle alpha between the screen A and the screen B is more than or equal to 0 degree and less than the angle II. For example, the angle α between the a and B panels may be 0 degrees when the inner fold panel is in the fully folded state.
Fig. 3A-3C show a schematic view of an out-turned screen display.
Fig. 3A shows a schematic view of a display configuration of the out-folded screen in an unfolded state.
Fig. 3A (a) is an exemplary front view of the folding-out screen in an unfolded state. When the folding screen is in an unfolding state, the displayable screen of the folding screen comprises an A screen and a B screen. The screen A and the screen B can be a complete display screen or two independent display screens. Illustratively, when the inner folding screen is in the unfolded state, the included angle α between the screen a and the screen B is greater than the angle three and less than or equal to 180 degrees, and illustratively, the value of the angle three can be between 170 degrees and 180 degrees. For example, if the value of the angle three is 180 degrees, the included angle α between the screen a and the screen B may be 180 degrees when the folded-out screen is in the unfolded state.
Fig. 3A (b) is a back view schematically showing the folding-out screen in the unfolded state. When the outer folding screen is in the unfolded state, the display screen of the outer folding screen does not comprise a C screen compared with the display screen of the inner folding screen in the unfolded state.
Fig. 3B-3C are schematic views showing display forms of the outer folding screen in a folded state.
The folded state of the folding screen shown in fig. 3B may also be referred to as an intermediate folded state.
The outer folding screen can be folded towards the opposite direction of the screen A and the screen B to form a folding form with a certain included angle. I.e. the folding direction of the outer and inner folds is opposite. When the outer folding screen is in the intermediate state, the displayable screen of the folding screen comprises an A screen and a B screen, and an included angle alpha between the A screen and the B screen is more than or equal to an angle IV and less than or equal to an angle III. Illustratively, the angle four may have a value between 10 degrees and 170 degrees. For example, the angle α between the a and B panels may be 120 degrees when the outer fold panel is in the intermediate folded state.
The folded state of the folding screen shown in fig. 3C may also be referred to as a fully folded state.
As shown in fig. 3C, when the folding screen is folded, the displayable screen of the folding screen may be a B screen (or the displayable screen may be an a screen). When the inner folding screen is in a fully folded state, the screen A is in a screen-off state (or the screen B is in a screen-off state), an included angle alpha between the screen A and the screen B is greater than or equal to 0 degrees and smaller than an angle IV, and the value of the angle IV can be between 0 degrees and 10 degrees. Illustratively, the included angle α between the A-and B-panels may be 0 degrees when the out-folded panel is in the fully folded state.
Fig. 3D-3F show schematic diagrams of display modes of the upper and lower folding screens.
Fig. 3D shows a schematic view of a display form when folded up and down in an unfolded state. Wherein, when the upper and lower folding screens are in an unfolded state, the displayable screens of the folding screens include an A screen and a B screen. The screen A and the screen B can be a complete display screen or two independent display screens. Illustratively, when the inner folding screen is in the unfolded state, the included angle α between the screen a and the screen B is greater than the angle three and less than or equal to 180 degrees, and illustratively, the value of the angle three can be between 170 degrees and 180 degrees. For example, if the value of the angle three is 180 degrees, the included angle α between the screen a and the screen B may be 180 degrees when the folded-out screen is in the unfolded state.
Fig. 3E to 3F are schematic views showing display forms of the upper and lower folding screens in a folded state.
The folded state of the upper and lower folding screens shown in fig. 3E may also be referred to as an intermediate folded state.
The upper and lower folding screens can be folded towards the direction facing the A screen and the B screen to form a folding form with a certain included angle. When the upper folding screen and the lower folding screen are in an intermediate state, the displayable screen of the upper folding screen and the lower folding screen comprises an A screen and a B screen, and an included angle alpha between the A screen and the B screen is more than or equal to an angle IV and less than or equal to an angle III. Illustratively, the angle four may have a value between 10 degrees and 170 degrees. For example, when the upper and lower folding screens are in the intermediate folding state, the angle α between the a screen and the B screen may be 120 degrees.
The folded state of the upper and lower folding screens shown in fig. 3F may also be referred to as a fully folded state.
As shown in fig. 3F, when the upper and lower folding screens continue to bend the outer folding screen toward the direction in which the a screen and the B screen face each other in the folded state, the a screen and the B screen of the upper and lower folding screens are hidden from view. When the upper folding screen and the lower folding screen are in a fully folded state, the screen A and the screen B are in a screen-off state, an included angle alpha between the screen A and the screen B is larger than or equal to 0 degree and smaller than an angle IV, and the value of the angle IV can be between 0 degree and 10 degrees. Illustratively, the included angle α between the A-and B-panels may be 0 degrees when the upper and lower folding panels are in a fully folded state.
Illustratively, in some embodiments, the upper and lower folding screens may also include a C screen. The C screen is positioned on the back of the A screen or the B screen. When the upper folding screen and the lower folding screen are in an unfolding state, the C screen is in a screen-extinguishing state. When the upper and lower folding screens are in a folded state, the C screen is in a bright screen state.
Fig. 4 shows a schematic view of a display form of the extension screen.
In some, the extension screen may also be referred to as a scroll screen. The scroll screen of the electronic device may be pulled out or rolled back in a direction perpendicular to the scroll, changing the screen length of the scroll screen perpendicular to the scroll direction.
The morphology of the scroll screen can be divided into an undeployed state, a semi-deployed state, and a fully deployed state. Fig. 4 (a) is a schematic diagram of the undeployed state of the scroll screen. When the scroll screen is in an undeployed state, a part of the screen of the scroll screen is hidden in the body of the electronic device, and the electronic device can display an interface of an application on another part of the screen which is unfolded, and the length of the screen is equal to the length one. The portion of the screen hidden within the body of the scroll screen may be extended in a designated direction (e.g., the direction of the arrow shown in the figure). When the screen of the roll screen has not been fully unwound, the roll screen is in a half-unwound state, as shown in (b) of fig. 4. When the scroll screen is in a semi-unfolding state, part of the screen hidden in the body of the scroll screen is reduced, and part of the screen exposed on the surface of the body of the scroll screen is increased until all the scroll screen is exposed on the surface of the body of the scroll screen. When the roll screen is fully exposed on the surface of the body, the roll screen is in a fully extended state, as shown in fig. 4 (c), where the length of the screen is two. Wherein the second length is greater than the first length. It will be appreciated that when the length of the screen is greater than length one and less than length two, the roller screen is in a semi-extended state.
It should be noted that, in the embodiment of the present application, the scroll screen may be extended along the first direction perpendicular to the scroll, from an undeployed state, through a semi-deployed state, to a fully deployed state. Similarly, the spool screen may be retracted in a second direction perpendicular to the spool from a fully extended position, through a semi-extended position, to an undeployed position. Wherein the first direction and the second direction are opposite.
Alternatively, it is not limited to pulling out in the right direction perpendicular to the horizontal of the scroll of the electronic device. In some embodiments, the scroll screen of the electronic device may also be pulled out in a left direction perpendicular to the scroll horizontal.
Alternatively, in some embodiments, the reel of the electronic device may be located in a horizontal direction, and the electronic device may pull the reel screen vertically above or below the reel, which is not limited by the embodiment of the present application.
The electronic device display screen based on the description above may include a bar display screen, a folding screen, and an expansion screen. The display areas of the display screens of the electronic devices in different forms are different in size, and the proportion of pictures supported by the camera application may be the same or different.
For example, when the electronic device display is a flat panel display, the flat panel display includes only one display state, so for the flat panel display, the picture scale supported by the camera application may be determined, and for example, may include multiple picture scales of 1:1, 4:3, and 16:9.
For another example, when the electronic device display screen is a folding screen, the picture scale supported by the camera application may include multiple picture scales of 1:1, 4:3, and 16:9 when the folding screen is in the folded state shown in fig. 2C or fig. 3C. When the folding screen is in the unfolded state shown in fig. 2A or fig. 3A, the display area of the display screen of the electronic device becomes larger, and the picture proportion supported by the camera application may include multiple picture proportions of 1:1, 8:7, and the like.
For another example, when the electronic device display screen is an extension screen, the picture proportions supported by the camera application may include multiple picture proportions of 1:1, 4:3, and 16:9 when the extension screen is in the folded state shown in (a) of fig. 4. When the expansion screen is in the unfolded state shown in (c) in fig. 4, the display area of the display screen of the electronic device becomes larger, and the picture proportion supported by the camera application may include multiple picture proportions of 1:1, 8:7, and the like.
Fig. 5 shows a schematic diagram of an electronic device 100 configuring picture resolution for a camera application.
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.
For example, the user operation to open the camera application may be a user operation, such as a click operation, of a user on a camera application icon on the desktop.
In response to a user operation to open the camera application, the camera application sends a picture resolution configuration request to the HAL layer. The request is for obtaining a list of picture resolutions supported by the camera application.
S5002, responding to the picture resolution configuration request, and acquiring a picture resolution list supported by the camera application by the HAL layer.
In response to the picture resolution configuration request, the HAL layer may obtain a list of picture resolutions supported by the camera application.
TABLE 1
Table 1 exemplarily shows that the HAL layer acquires a list of picture resolutions supported by the camera application. As shown in table 1, in the case where the picture ratio is 1:1, the picture resolution may include 1080×1080, 960×960. In the case of a 4:9 picture scale, the picture resolutions may include 1440x1920, 1200 x 1600, 960 x 1280, and 480 x 640. In the case of a picture scale of 16:9, the picture resolution may include 1080×1920, 900×1600, 720×1280, 540×960, and 360×640. In the case of a picture scale of 21:9, the picture resolution may include 823×1920, 463×1080, 412×960.
After the picture resolution list supported by the camera application is acquired, the HAL layer sends the picture resolution list supported by the camera application to the camera application.
S5003, HAL layer sends the picture resolution list to the camera application.
The shooting parameters may include, but are not limited to, icon scale and the like. The picture scale may be, for example, 4:3.
S5004, the camera application screens out a picture resolution from the picture resolution list based on shooting parameters.
The camera application may obtain a picture resolution matching picture 4:3 from the obtained picture resolution list. For example, the camera application typically configures the camera application with the first-matched picture resolution as the picture resolution for no further picture resolution to traverse. For example, the camera application first matches to the picture resolution of 1440x1920 based on a picture scale of 4:3, the camera application may determine 1440x1920 as the final selected picture resolution.
S5005, the camera application sends the matched picture resolution to the HAL layer.
S5006, the HAL layer sends the picture resolution to a camera module for driving, so that the camera module can collect images according to the picture resolution.
After determining the picture resolution, the camera application then sends the matched picture resolution to the HAL layer. The HAL layer sends the picture resolution to the camera module driver, so that the camera module driver can control the camera module to collect images according to the picture resolution.
In some embodiments, after the user changes the shooting parameters of the camera application, for example, after the picture ratio is switched from 4:3 to 16:9, the camera application needs to re-acquire the picture resolution list uploaded by the HAL layer again in the manner shown in fig. 5 and re-match the picture resolution.
As can be seen from the embodiment of fig. 5, the camera application confirms that the picture resolution depends on the picture resolution list supported by the camera application reported by the HAL layer, and the interaction between the camera application and the HAL layer needs to be cross-processed, so that the time for the camera application to acquire the picture resolution is relatively high, and the camera application cannot acquire the picture resolution in time. From the interface display perspective, for example, after the electronic device 100 opens the camera application based on a user operation, the camera application needs to wait for a period of time before the camera preview screen can be displayed. For another example, after the electronic device 100 changes the shooting parameters of the camera application based on the user operation, the camera application also needs to wait for a period of time to display the preview screen based on the updated shooting parameters, which is not good for the user experience.
Based on the analysis, the application provides a picture resolution configuration method, electronic equipment and a storage medium. The method may comprise the steps of:
In step one, the electronic device 100 receives a user operation of starting a camera application, and in response to the user operation, the electronic device 100 obtains a first configuration file and stores the first configuration file in an operation memory of the camera application, wherein the first configuration file records a corresponding relationship between a plurality of picture resolutions supported by the camera application and shooting parameters.
The first configuration file may store the shooting parameters and the picture resolution in a key-value form. The key may refer to a shooting parameter of the camera application, and the value may refer to a picture resolution of the camera application.
The shooting parameters can include, but are not limited to, any one or more of shooting states, shooting modes, device display screen states, cameras, picture proportions and the like.
For the introduction of the first configuration file, reference may be made to the description of the embodiment of fig. 10 to 13, and the description of the present application is omitted here.
Alternatively, the first configuration file may be stored in the disk before the camera application is not started to run, for example, the first configuration file may be stored in a file system corresponding to the camera application in the disk.
Alternatively, the first profile may be associated with a device model. The content of the first profile stored within different device models may be different. In other embodiments, the content of the first configuration file stored in different device models may be the same, which is not limited by the present application.
Step two, the electronic device 100 obtains initial shooting parameters, obtains initial resolution from the first configuration file based on the initial shooting parameters, and the camera application acquires and displays an image with the initial resolution.
In other embodiments, the electronic device 100 may change the photographing parameters based on the user operation. The camera application may obtain updated capture parameters and match the updated resolution from the first profile based on the updated capture parameters. The electronic device 100 may capture an image and display the image based on the updated resolution.
By this method, the electronic device 100 may store resolution information supported by the camera application in the first profile. After the camera application is running, the electronic device 100 stores the first configuration file in a running memory of the camera application. When the camera application needs to reconfigure the picture resolution, the camera application only needs to acquire the updated picture resolution from the first configuration file, so that the process of acquiring the updated picture resolution by the camera application is simplified, and the speed of acquiring the updated picture resolution by the camera application is also increased.
The following describes a hardware structure of the electronic device 100 provided in the embodiment of the present application.
Fig. 6 shows a schematic structural diagram of the electronic device 100.
The embodiment will be specifically described below taking the electronic device 100 as an example. It should be understood that the electronic device 100 shown in fig. 6 is only one example, and that the electronic device 100 may have more or fewer components than shown in fig. 6, may combine two or more components, or may have a different configuration of components. The various components shown in fig. 6 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.
The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge 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, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It should be understood that the illustrated structure of the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (IMAGE SIGNAL processor, ISP), a controller, a memory, a video codec, a digital signal processor (DIGITAL SIGNAL processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural hub and a command center of the electronic device 100, among others. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
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. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-INTEGRATED CIRCUIT, I2C) interface, an integrated circuit built-in audio (inter-INTEGRATED CIRCUIT SOUND, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The I2C interface is a bi-directional synchronous serial bus comprising a serial data line (SERIAL DATA LINE, SDA) and a serial clock line (serial clock line, SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc., respectively, through different I2C bus interfaces. For example, the processor 110 may couple the touch sensor 180K through an I2C interface, such that the processor 110 communicates with the touch sensor 180K through an I2C bus interface, to implement a touch function of the electronic device 100.
The I2S interface may be used for audio communication. In some embodiments, the processor 110 may contain multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through the I2S interface, to implement a function of answering a call through the bluetooth headset.
PCM interfaces may 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 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface to implement a function of answering a call through the bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 110 with the wireless communication module 160. For example, the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement bluetooth functions. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through a UART interface, to implement a function of playing music through a bluetooth headset.
The MIPI interface may be used to connect the processor 110 to peripheral devices such as a display 194, a camera 193, and the like. The MIPI interfaces include camera serial interfaces (CAMERA SERIAL INTERFACE, CSI), display serial interfaces (DISPLAY SERIAL INTERFACE, DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the photographing functions of electronic device 100. The processor 110 and the display 194 communicate via a DSI interface to implement the display functionality of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, etc.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transfer data between the electronic device 100 and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset. The interface may also be used to connect other electronic devices, such as AR devices, etc.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is only illustrative, and is not meant to limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also employ different interfacing manners in the above embodiments, or a combination of multiple interfacing manners.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB interface 130. In some wireless charging embodiments, the charge management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example, the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional module, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (WIRELESS FIDELITY, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation SATELLITE SYSTEM, GNSS), frequency modulation (frequency modulation, FM), near field communication (NEAR FIELD communication, NFC), infrared (IR), etc., applied to the electronic device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 150 of electronic device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that electronic device 100 may communicate with a network and other devices through wireless communication techniques. The wireless communication techniques can include the Global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (GENERAL PACKET radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation SATELLITE SYSTEM, GLONASS), a beidou satellite navigation system (beidou navigation SATELLITE SYSTEM, BDS), a quasi zenith satellite system (quasi-zenith SATELLITE SYSTEM, QZSS) and/or a satellite based augmentation system (SATELLITE BASED AUGMENTATION SYSTEMS, SBAS).
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 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 that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a Liquid Crystal Display (LCD). The display panel may also be manufactured using organic light-emitting diodes (OLED), active-matrix organic LIGHT EMITTING diode (AMOLED), flexible light-emitting diodes (FLED), miniled, microled, micro-OLED, quantum dot LIGHT EMITTING diodes (QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The electronic device 100 may implement photographing functions through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The ISP is used to process data fed back by the camera 193. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and is converted into an image visible to naked eyes. ISP can also perform algorithm optimization on noise and brightness of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted 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 a standard RGB, YUV, or the like format. In some embodiments, electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record video in a variety of encoding formats, such as moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent recognition of the electronic device 100, for example, image recognition, face recognition, voice recognition, text understanding, etc., can be realized through the NPU.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer executable program code including instructions. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 100 (e.g., audio data, phonebook, etc.), and so on. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or a portion of the functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also referred to as a "horn," is used to convert audio electrical signals into sound signals. The electronic device 100 may listen to music, or to hands-free conversations, through the speaker 170A.
A receiver 170B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When electronic device 100 is answering a telephone call or voice message, voice may be received by placing receiver 170B in close proximity to the human ear.
Microphone 170C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 170C through the mouth, inputting a sound signal to the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, and may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may also be provided with three, four, or more microphones 170C to enable collection of sound signals, noise reduction, identification of sound sources, directional recording functions, etc.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be a USB interface 130 or a 3.5mm open mobile electronic device platform (open mobile terminal platform, OMTP) standard interface, a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A is of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a capacitive pressure sensor comprising at least two parallel plates with conductive material. The capacitance between the electrodes changes when a force is applied to the pressure sensor 180A. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 may also calculate the location of the touch based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations that act on the same touch location, but at different touch operation strengths, may correspond to different operation instructions. For example, when a touch operation with a touch operation intensity smaller than a first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. And executing an instruction for newly creating the short message when the touch operation with the touch operation intensity being greater than or equal to the first pressure threshold acts on the short message application icon.
The gyro sensor 180B may be used to determine a motion gesture of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., x, y, and z axes) may be determined by gyro sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects the shake angle of the electronic device 100, calculates the distance to be compensated by the lens module according to the angle, and makes the lens counteract the shake of the electronic device 100 through the reverse motion, so as to realize anti-shake. The gyro sensor 180B may also be used for navigating, somatosensory game scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude from barometric pressure values measured by barometric pressure sensor 180C, aiding in positioning and navigation.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip cover using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip machine, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the detected opening and closing state of the leather sheath or the opening and closing state of the flip, the characteristics of automatic unlocking of the flip and the like are set.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity may be detected when the electronic device 100 is stationary. The electronic equipment gesture recognition method can also be used for recognizing the gesture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, the electronic device 100 may range using the distance sensor 180F to achieve quick focus.
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 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it may be determined that there is an object in the vicinity of the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there is no object in the vicinity of the electronic device 100. The electronic device 100 can detect that the user holds the electronic device 100 close to the ear by using the proximity light sensor 180G, so as to automatically extinguish the screen for the purpose of saving power. The proximity light sensor 180G may also be used in holster mode, pocket mode to automatically unlock and lock the screen.
The ambient light sensor 180L is used to sense ambient light level. The electronic device 100 may adaptively adjust the brightness of the display 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust white balance when taking a photograph. Ambient light sensor 180L may also cooperate with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent false touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 may utilize the collected fingerprint feature to unlock the fingerprint, access the application lock, photograph the fingerprint, answer the incoming call, etc.
The temperature sensor 180J is for detecting temperature. In some embodiments, the electronic device 100 performs a temperature processing strategy using the temperature detected by the temperature sensor 180J. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, electronic device 100 performs a reduction in the performance of a processor located in the vicinity of temperature sensor 180J in order to reduce power consumption to implement thermal protection. In other embodiments, when the temperature is below another threshold, the electronic device 100 heats the battery 142 to avoid the low temperature causing the electronic device 100 to be abnormally shut down. In other embodiments, when the temperature is below a further threshold, the electronic device 100 performs boosting of the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperatures.
The touch sensor 180K, also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is for detecting a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 at a different location than the display 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, bone conduction sensor 180M may acquire a vibration signal of a human vocal tract vibrating bone pieces. The bone conduction sensor 180M may also contact the pulse of the human body to receive the blood pressure pulsation signal. In some embodiments, bone conduction sensor 180M may also be provided in a headset, in combination with an osteoinductive headset. The audio module 170 may analyze the voice signal based on the vibration signal of the sound portion vibration bone block obtained by the bone conduction sensor 180M, so as to implement a voice function. The application processor may analyze the heart rate information based on the blood pressure beat signal acquired by the bone conduction sensor 180M, so as to implement a heart rate detection function.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The electronic device 100 may receive key inputs, generating key signal inputs related to user settings and function controls of the electronic device 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects by touching different areas of the display screen 194. Different application scenarios (such as time reminding, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc.
The SIM card interface 195 is used to connect a SIM card.
The software system of the electronic device 100 may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. In the embodiment of the invention, taking an Android system with a layered architecture as an example, a software structure of the electronic device 100 is illustrated.
Fig. 7 is a software configuration block diagram of the electronic device 100 according to the embodiment of the present invention.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, from top to bottom, there are an application layer, a hardware abstraction layer HAL, a driver layer, and a hardware layer, respectively.
The application layer may include a series of application packages.
As shown in fig. 7, the application package may include a camera application that includes running memory. After the camera application is running, the electronic device 100 may allocate running memory for the camera application. After the camera application is closed, the running memory of the camera application is then cleared.
In some embodiments, after the camera application is running, the running memory of the camera application may 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 is also cleaned.
In some embodiments, an application framework layer may also be included between the application layer and the HAL layer. The application framework layer provides an application programming interface (application programming interface, API) and programming framework for the application of the application layer. The application framework layer includes a number of predefined functions. By way of example, the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like. The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like. The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc. The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture. The telephony manager is used to provide the communication functions of the electronic device 100. Such as the management of call status (including on, hung-up, etc.). The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like. The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in a status bar, a prompt tone is emitted, the electronic device vibrates, and an indicator light blinks, etc.
In some embodiments, a system runtime layer may also be included between the application framework layer and the HAL layer. The system runtime layer may include a plurality of functional modules. Such as surface manager (surface manager), media library (Media Libraries), three-dimensional graphics processing library (e.g., openGL ES), 2D graphics engine (e.g., SGL), etc. The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications. Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio and video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc. The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like. The 2D graphics engine is a drawing engine for 2D drawing.
The hardware abstraction HAL layer is an interface layer between the application framework layer and the kernel layer, and provides a virtual hardware platform for an operating system.
The hardware abstraction HAL layer can be used for receiving a configuration file acquisition request issued by the camera application and sending the configuration file acquisition request to the disk drive, so that the disk drive can control the disk to acquire a 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 an operation memory of the camera application, the camera application can determine initial preview resolution and initial shooting resolution from the first configuration file based on initial shooting parameters and send the initial preview resolution and the initial shooting resolution to the camera driver through the HAL layer, so that the camera driver can control the camera module to acquire preview images with the initial preview resolution, and when operation of a user on a shutter is monitored, the camera module acquires and images or videos with the initial shooting resolution.
The driver layer is a layer between hardware and software. The driver layer includes drivers for various hardware. The drive layer may include a camera drive, a disk drive, and the like. Wherein the camera drives an image sensor (e.g., image sensor 1, image sensor 2, etc.) for driving one or more cameras in the camera module to capture images and an image signal processor to pre-process the images. The disk drive is used for driving the disk to acquire the first configuration file, the initial preview resolution and the initial shooting resolution.
The hardware layer may include a camera module, a disk, and the like. The camera module may include one or more camera image sensors (e.g., image sensor 1, image sensor 2, etc.) therein. Optionally, a time of flight (TOF) sensor, a multispectral sensor, etc. may be included in the camera module. The disk may include a file system of the camera application having the first configuration file stored therein.
Next, in connection with the interactions between the various layers described above, how the electronic device 100 configures picture resolution for a camera application will be described.
First, it is described how to configure an initial preview resolution and an initial photographing resolution for a camera application when the camera application is first turned on.
1. The camera application obtains a first profile obtaining request and sends the first profile obtaining request to the HAL layer.
In some embodiments, the camera application may also send the first profile acquisition request to the HAL layer through the application architecture layer and the system runtime layer.
2. The HAL layer sends a first profile acquisition request to the disk drive.
3. The disk drive sends a first profile acquisition request to the disk.
After receiving the first configuration file acquisition request sent by the camera application, the HAL layer sends the first configuration file acquisition request to the disk drive, and the disk drive sends the first configuration file acquisition request to the disk. In response to receiving the number of first profile acquisition requests sent by the disk drive, the disk may acquire a first profile from a file system of the camera application.
4. The disk sends the first configuration file to the disk drive.
5. The disk drive sends the first configuration file to the HAL layer.
6. The HAL layer sends the first profile to the camera application.
After the disk acquires the first configuration file, the disk may send the first configuration file to the disk drive. The disk drive then sends the first configuration file to the HAL layer. The HAL layer then sends the first profile to the camera application.
7. The camera application saves the first configuration file in the running memory.
After receiving the first configuration file sent by the HAL layer, the camera application may store the first configuration file in a running memory of the camera application.
8. The camera application obtains an initial preview resolution and an initial shooting resolution from the first configuration file based on the initial shooting parameters.
Wherein the initial photographing parameter is acquired when the camera application is first started, the user operation for starting the camera application may be an input operation, such as a click, for example, as shown in fig. 8A, which acts on the camera application icon. In response to an input operation acting on the camera application icon, the camera application may acquire an initial photographing parameter and an initial photographing resolution.
9. The camera application sends the initial preview resolution to the HAL layer.
10. The HAL layer sends the initial preview resolution to the camera driver.
11. The camera driver sends the initial preview resolution to the camera module.
After the camera application acquires the initial shooting parameters and the initial shooting resolution, the camera application can send the initial preview resolution to the HAL layer, 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.
After receiving the initial preview resolution, the camera module may collect an image based on the initial preview resolution. And displaying the image acquired by the camera module at the initial preview resolution in a preview window of the camera application.
In some embodiments, the camera application may receive a user operation of a shutter key by a user, save a picture or video. In response to a user operation for the shutter key, the camera application may send the initial photographing resolution acquired in advance to the HAL layer, which in turn sends the initial photographing resolution to the camera driver, which sends the initial photographing resolution to the camera module. After receiving the initial shooting resolution, the camera module can acquire images or videos based on the initial shooting resolution. And storing the image or video acquired by the camera module at the initial shooting resolution in a gallery.
In some embodiments, the camera application may receive a user changing a shooting parameter of the camera application. In response to acquiring the updated capture parameters, the camera application needs to acquire an updated preview resolution and an updated capture resolution.
Next, it is described how to configure the camera application with updated preview resolution and updated shooting resolution when the user changes the shooting parameters of the camera application.
12. The camera application receives a first operation of changing shooting parameters by a user, and acquires updated shooting parameters.
13. The camera application obtains a first configuration file from a running memory of the camera application.
14. The camera application obtains updated preview resolution and updated shooting resolution from the running memory based on the updated shooting parameters.
In response to acquiring the updated photographing parameters, the camera application may acquire a first configuration file from a running memory of the camera application. Because the camera application is already running, the running memory of the camera application stores the first configuration file, and the camera application can directly acquire the first configuration file from the running memory of the camera application without acquiring the first configuration file from the file system of the camera application, so that the time for the camera application to acquire the first configuration file can be saved.
After acquiring the updated capture parameters, the camera application may determine an updated preview resolution and an updated capture resolution from the first configuration file based on the updated capture parameters.
15. The camera application sends the updated preview resolution to the HAL layer.
16. The HAL layer sends the updated preview resolution to the camera driver.
17. The camera driver sends the updated preview resolution to the camera module.
After determining the updated preview resolution, the camera application may send the updated preview resolution to the HAL layer, which in turn sends the updated preview resolution to the camera driver, which sends the updated preview resolution to the camera module.
After the camera module receives the updated preview resolution, the camera module can acquire images based on the updated preview resolution. And displaying the camera module in a preview window of the camera application to update the image captured at the preview resolution.
In some embodiments, the electronic device may receive a user operation for a shutter key, save a picture or video. In response to a user operation for the shutter key, the camera application may send the updated photographing resolution acquired in advance to the HAL layer, which in turn sends the updated photographing resolution to the camera driver, which sends the updated photographing resolution to the camera module.
After receiving the updated shooting resolution, the camera module can acquire images or videos based on the updated shooting resolution. And the camera module is used for updating the image or video acquired by the shooting resolution and storing the image or video in a gallery. In this way, the camera application can be accelerated to respond to the shooting action of the user.
First, a resolution configuration scenario provided by the present application will be described.
1. The camera application is started and the electronic device 100 configures a picture resolution for the camera application based on the initial photographing parameters.
In some embodiments, after the electronic device 100 starts the camera application based on user operation, the camera application enters a photographing mode by default.
Fig. 8A-8B show schematic diagrams of the electronic device 100 starting a camera application.
As shown in fig. 8A, the electronic device 100 may display a desktop in which a page with application icons is displayed, the page including a plurality of application icons (e.g., a setup application icon, an application marketplace application icon, a gallery application icon, a browser application icon, etc.). Page indicators are also displayed below the application icons to indicate the positional relationship between the currently displayed page and other pages. A tray area is displayed below the page indicator. The tray area includes a plurality of tray icons, such as a camera application icon, an address book application icon, a phone application icon, and an information application icon. The tray area remains displayed while the page is switched. In some embodiments, the page may also include a plurality of application icons and page indicators, which may not be part of the page, but may exist alone, and the tray icon may also be optional, which is not a limitation of the embodiments of the present application.
The electronic device 100 may receive user input (e.g., a single click) on the camera application icon, and in response to the input operation, the electronic device 100 may display a user interface as shown in fig. 8B. Fig. 8B is a user interface, also referred to as a preview interface, of a photographing and displaying service provided by the electronic device 100 according to an embodiment of the present application.
As shown in fig. 8B, the preview interface may include a mode bar 501, a capture control 502, a preview window 503, a review control 504, a shortcut area 505, and a focus adjustment option 506.
The mode field 501 may include a plurality of shooting mode options, such as "slow motion", "delayed shooting", "portrait", "photograph", "video", "night view", "panoramic", and so on. Different shooting modes can provide shooting services with different effects for users. The user can select any shooting mode of a plurality of shooting modes to shoot according to different requirements. For example, "take a picture" may be a default shooting mode for taking a picture. "video recording" is used to record video. The "night scene" mode is suitable for use in a dark-lit shooting scene, such as at night. The "portrait" mode is suitable for shooting scenes in which the subject is a person. The electronic device 100 may also provide more shooting modes, such as "large aperture", "movie", "professional", etc., which are not illustrated here.
The electronic apparatus 100 may detect a user operation acting on the photographing mode option in the mode field 501 and change the currently used photographing mode according to the user operation. Such as a left/right slide operation. For example, when the drag mode field 5011 is detected to slide to the left (left slide operation) and the buoy is caused to stop at the "portrait" option, the electronic apparatus 100 may switch to the "portrait" mode. By default, the electronic device 100 first uses a "photo" mode.
The photographing control 502 is used to trigger photographing. The electronic device 100 can detect whether there is a user operation, such as a click operation, acting on the capture control 502. Upon detecting a user operation on the photographing control 502, the electronic device 100 may generate a photographing instruction. The electronic device 100 may obtain the image reported by the corresponding timestamp camera according to the photographing instruction, and then store the image as a photograph.
The preview window 503 may 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, so as to improve the display effect of the image. For example, in a "portrait" mode, the electronic device 100 may blur the background in the image reported by the camera to highlight the portrait. Here, the preview window 503 may display the image processed by the image processing algorithm corresponding to the different photographing modes in real time, so that the user may perceive the photographing effects corresponding to the different photographing modes in real time.
Review control 504 may be used to view thumbnail images of the photos/videos that have been taken. Upon detecting a user operation on the review control 504, the electronic device 100 can also display the best photo corresponding to the thumbnail.
Shortcut function area 505 may include a main angle video mode control 505A, AI scene identification control 505B, a flash control 505C, a color mode control 505D, a setup control 505E, and the like. The control 505A of the corner video mode may be used to trigger the electronic device 100 to identify a corner person of a plurality of persons in the preview screen when turned on. The AI-scene recognition control 505B can be used to trigger the electronic device 100 to recognize a shooting scene in a preview screen when turned on, with the current AI-scene recognition control 505B in an off state. Flash control 505C may be used to trigger electronic device 100 to turn a flash on or off. Color mode control 505D may be used to trigger electronic device 100 to process images captured by a camera using color filters. The settings control 505E may be used to set shooting parameters (e.g., image size, storage format of the image, etc.) of the electronic device 100, and so on.
A plurality of zoom magnification options are shown in focus adjustment option 506. Such as a 0.5x zoom magnification option, a 1x zoom magnification option, a 2.5x zoom magnification option, a 10x zoom magnification option, and the like. The current zoom magnification is 1x. Displayed in the preview window 503 is an image frame captured by the electronic device 100 at a zoom magnification of 1×.
The picture resolution shown in fig. 8B is, for example, 4:3.
In some implementations, after electronic device 100 responds to user input for the camera application icon, before electronic device 100 displays the preview interface shown in fig. 8B, electronic device 100 may obtain the preview resolution in the preview mode, the image displayed within preview window 503 in fig. 8B being the image captured by electronic device 100 at the preview resolution.
In some embodiments, after the electronic device 100 responds to the user input for the camera application icon, the electronic device 100 may obtain a photographing parameter and obtain a photographing resolution in the normal photographing mode based on the photographing parameter. In this way, upon detecting a user operation on the photographing control 502, the electronic device 100 may acquire image frames based on photographing resolution acquired in advance to accelerate the photographing action of the electronic device 100 in response to the user.
Optionally, the preview resolution is lower than the capture resolution. In this way, the electronic device 100 may capture the preview image at a lower resolution to reduce power consumption of the electronic device 100.
Alternatively, the preview resolution may be the same as the shooting resolution, which is not limited in the present application.
In some embodiments, upon detecting a user operation (e.g., a click) of the user with respect to the capture control 502, the electronic device 100 may, in response to the user operation, capture an image at a pre-configured capture resolution and save the image in a gallery.
Fig. 9 shows a flowchart of a method for configuring a picture resolution for a camera application by the electronic device 100 after the camera application is turned on.
The method may be implemented based on interaction between an application layer (e.g., camera application) within the electronic device, a hardware abstraction layer (hardware abstract layer, HAL), a driver layer, and a hardware layer, wherein the application layer is primarily related to the camera application. The drive layer is mainly related to camera drive and disk drive. The hardware layer mainly relates to a camera module, a magnetic disk and the like.
S901, the camera application receives a user operation to start the camera application.
For example, the user operation to open the camera application may be an input, such as a click, shown in fig. 8A, acting on the camera application icon.
S902, in response to a user operation of starting the camera application, the camera application sends a first profile acquisition request to the HAL layer.
S903, the HAL layer sends a first configuration file acquisition request to the disk drive.
S904, the disk drive sends a first configuration file acquisition request to the disk.
In response to a user operation to open the camera application, the electronic device 100 may acquire a first profile acquisition request.
In response to acquiring the first profile acquisition request, the camera application may send the first profile acquisition request to the HAL layer, which in turn sends the first profile acquisition request to the disk drive, which in turn sends the first profile acquisition request to the disk.
S905, the disk acquires the first configuration file based on the first configuration file acquisition request.
In response to receiving the first configuration file sent by the disk drive, the disk may obtain the first configuration file from a file system of the camera application.
S906, the disk sends the first configuration file to the disk drive.
S907, the disk drive sends the first configuration file to the HAL layer.
S908, HAL layer sends the first configuration file to the camera application.
After the disk acquires the first configuration file, the disk may send the first configuration file to the disk drive, and the disk drive sends the first configuration file to the HAL layer, which sends the first configuration file to the camera application.
The composition of the first profile is described next.
The first configuration file records the corresponding relation between a plurality of different shooting parameters and picture resolution.
In some embodiments, the file format of the first configuration file may be a JSON file format, and the first configuration file may store the shooting parameters and the picture resolution in a key-value form, where a key may refer to a shooting parameter of a camera application, and a value may refer to a picture resolution of the camera application.
The shooting parameters may include, but are not limited to, any one or more of a shooting status, a shooting mode, a device display status, a camera type, a picture scale, etc.
The shooting status may include, but is not limited to, a preview status and a non-preview status. The preview state may refer to a state of the camera application before the electronic device 100 receives the click of the shooting control 502 by the user, that is, before the electronic device 100 has shot a picture or has not shot a video yet, or may refer to a state of the camera application after the electronic device 100 receives the click of the shooting control 502 by the user and the electronic device 100 acquires the picture or the video. The non-preview state is the state opposite to the preview state, and may refer to a state that the camera applies when the electronic device 100 receives a click of the photographing control 502 from the user, that is, when the electronic device 100 starts photographing a picture or starts photographing a video.
The photographing mode is a photographing mode that can be provided by a camera application, and may include a photographing mode and a recording mode.
The photographing mode may include, but is not limited to, any one or more of a normal photographing mode, a portrait photographing mode, a high definition photographing mode, a night view photographing mode, a panorama photographing mode, and the like.
Alternatively, when the camera application is started for the first time, the camera application default shooting mode is a normal shooting mode, and the shooting mode shown in fig. 8B is the normal shooting mode.
Alternatively, the same photographing mode may be divided into different photographing states, for example, a normal photographing mode may be divided into a preview state and a non-preview state. The portrait photographing mode may be also classified into a preview state and a non-preview state. The high definition photographing mode may be also classified into a preview state and a non-preview state. Night scene photographing modes can also be classified into preview states and non-preview states. Panoramic photographing modes can also be classified into preview states and non-preview states. Optionally, some photographing modes may not distinguish between a non-preview state and a preview state, which is not limited by the present application.
The video recording mode may include, but is not limited to, any one or more of a normal video recording mode, a delayed video recording mode, a slow motion video recording mode, and the like.
Alternatively, the same recording mode may be divided into different shooting states, for example, a normal recording mode may be divided into a preview state and a non-preview state. The delayed video recording mode may also be divided into a preview state and a non-preview state. The slow motion video mode may be classified into a preview state and a non-preview state. Alternatively, the recording mode may not distinguish between the non-preview state and the preview state, which is not limited by the present application.
The device display status may be for a folded screen or an expanded screen, and the device display status may include a folded state or an expanded state. In some embodiments, if the display of the electronic device 100 is a flat panel display, the shooting parameters may not include the device display status.
The camera types may include front cameras and rear cameras. The front camera or the rear camera may also comprise one or more cameras. For example, the rear camera may include three cameras, such as a main camera, a wide angle camera, a tele camera, and the like. The front camera may comprise a main camera. In other embodiments, the front camera may also include multiple cameras, for example, the front camera may also include a wide angle camera, and the application is not limited thereto.
In some embodiments, the camera application may determine the camera type from a plurality of rear cameras or from a plurality of front cameras based on the current zoom magnification.
Illustratively, when the rear-facing camera includes a main camera, a wide-angle camera, and a telephoto camera, the three rear-facing cameras support different zoom resolutions. For example, the zoom magnification supported by the main camera is between Ax and Bx, the zoom magnification supported by the telephoto camera is larger than Bx, and the zoom magnification supported by the wide-angle camera is smaller than Ax. Bx is greater than Ax. Which camera is used by the current camera application may be determined based on the current zoom magnification of the camera application.
Illustratively, A may be 1 and B may be 5. The zoom magnification supported by the main camera is between 1x and 5x, the zoom magnification supported by the long-focus camera is larger than 5x, and the zoom magnification supported by the wide-angle camera is smaller than 1x. When the currently selected zoom magnification of the camera application is 1x, it can be determined that the camera application uses the main camera. When the currently selected zoom magnification of the camera application is 10x, it can be determined that the camera application uses a tele camera.
The camera application can determine the type of the camera based on other information as well as the type of the camera based on the zoom magnification, which is not limited in the application.
The picture scale may be associated with a capture mode, and different capture modes may support different picture scales. For example, the normal photographing mode may provide a picture ratio of 1:1, a picture ratio of 4:3, a picture ratio of 16:9, and the like. The normal video mode may only provide a picture scale of 16:9. The proportion of pictures supported by different shooting modes can be related to equipment manufacturers, and the proportion is preset before the equipment leaves the factory.
In some embodiments, the shooting parameters may also include other information, which is not limited in this regard by the present application.
In order to facilitate understanding of the composition structure of the configuration file, the present application describes the composition structure of the configuration file by taking a normal photographing mode and a normal video recording mode as examples.
Fig. 10 is a schematic diagram of a configuration file corresponding to a normal photographing mode.
As shown in fig. 10, the normal photographing mode may be divided into two branches, a preview state and a non-preview state, respectively.
Alternatively, the resolution of the picture in the preview mode and the non-preview mode may be different in the normal photographing mode.
Illustratively, when the camera application is in the normal photographing mode, the normal photographing mode is in the preview state before the photographing of the picture is started, the camera application may acquire the preview resolution in the preview state, and the image displayed in the preview window 503 in fig. 8B is the image acquired by the electronic device 100 at the preview resolution. After starting taking a picture, the electronic device 100 may acquire a photographing resolution in the non-preview mode.
In some embodiments, the preview resolution in the preview state may be less than the capture resolution in the non-preview mode, and the electronic device 100 may capture and display the preview image at a lower resolution to save power consumption of the electronic device 100.
As shown in fig. 10, the normal photographing mode can be divided into two branches of a preview state and a non-preview state. When the camera is in a preview state or a non-preview state, the resolution of the picture can be determined based on the device display screen state, the camera type and the currently selected picture proportion.
It should be noted that, when the display screen of the electronic device 100 is a straight panel screen, but not a folded screen or an extended screen, the configuration file corresponding to the normal photographing mode shown in fig. 10 may not be divided into an unfolded state and a folded state.
In some embodiments, while the camera application is in the normal photographing 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 scale.
For example, after the electronic device 100 responds to user input for the camera application icon, the camera application is in a normal photographing mode and in a non-preview state before the electronic device 100 receives user operation of the photographing control 502 by the user. The electronic device 100 may obtain current photographing parameters.
For example, in the case where the photographing parameters include a normal photographing mode, a non-preview state, a folded state, and a rear-mounted main camera, and the picture ratio is 1:1, the electronic device 100 may determine that the picture resolution is 1920x1920.
For example, in the case where the photographing parameters include a normal photographing mode, a non-preview state, a folded state, and a rear-mounted main camera, and the picture ratio is 4:3, the electronic device 100 may determine that the picture resolution is 1440x1920.
For example, in the case where the photographing parameters include a normal photographing mode, a non-preview state, a folded state, and a rear-mounted main camera, and the picture ratio is 16:9, the electronic device 100 may determine that the picture resolution is 1080×1920.
For example, in the case where the photographing parameters include a normal photographing mode, a non-preview state, a folded state, and a rear-mounted tele camera, and the picture ratio is 1:1, the electronic device 100 may determine that the picture resolution is 1660×1660.
For example, in the case where the photographing parameters include a normal photographing mode, a non-preview state, a folded state, and a rear-mounted tele camera, and the picture ratio is 4:3, the electronic device 100 may determine that the picture resolution is 1200×1600.
For example, in the case where the photographing parameters include a normal photographing mode, a non-preview state, a folded state, and a rear-mounted tele camera, and the picture ratio is 16:9, the electronic device 100 may determine that the picture resolution is 900×1600.
For example, in the case where the photographing parameters include a normal photographing mode, a non-preview state, a folded state, and a rear-mounted wide-angle camera, and the picture ratio is 1:1, the electronic device 100 may determine that the picture resolution is 1200×1200.
For example, in the case where the photographing parameters include a normal photographing mode, a non-preview state, a folded state, and a rear-mounted wide-angle camera, and the picture ratio is 4:3, the electronic device 100 may determine that the picture resolution is 960×1280.
For example, in the case where the photographing parameters include a normal photographing mode, a non-preview state, a folded state, and a rear-mounted wide-angle camera, and the picture ratio is 16:9, the electronic device 100 may determine that the picture resolution is 720×1280.
For example, in the case where the photographing parameters include a normal photographing mode, a non-preview state, a folded state, and a front camera, and the picture ratio is 1:1, the electronic device 100 may determine that the picture resolution is 1280×1280.
For example, in the case where the photographing parameters include a normal photographing mode, a non-preview state, a folded state, and a front camera, and the picture ratio is 4:3, the electronic device 100 may determine that the picture resolution is 960×1280.
For example, in the case where the shooting parameters include a normal shooting mode, a non-preview state, a folded state, and a front camera, and the picture ratio is 16:9, the electronic device 100 may determine that the picture resolution is 900:1600.
For example, in the case where the photographing parameters include a normal photographing mode, a non-preview state, an extended state, and a rear-mounted main camera, and the picture ratio is 1:1, the electronic device 100 may determine that the picture resolution is 1920x1920.
For example, in the case where the photographing parameters include a normal photographing mode, a non-preview state, an extended state, and a rear-mounted main camera, and the picture ratio is 8:7, the electronic device 100 may determine that the picture resolution is 1920x1680.
For example, in the case where the photographing parameters include a normal photographing mode, a non-preview state, an extended state, and a rear-mounted tele camera, and the picture ratio is 1:1, the electronic device 100 may determine that the picture resolution is 1660×1660.
For example, in the case where the photographing parameters include a normal photographing mode, a non-preview state, an extended state, a rear-mounted tele camera, and a picture ratio of 8:7, the electronic device 100 may determine that the picture resolution is 1660×1453.
For example, in the case where the photographing parameters include a normal photographing mode, a non-preview state, an extended state, and a rear-mounted wide-angle camera, and the picture ratio is 1:1, the electronic device 100 may determine that the picture resolution is 1200×1200.
For example, in the case where the photographing parameters include a normal photographing mode, a non-preview state, an extended state, a rear-mounted wide-angle camera, and a picture ratio of 8:7, the electronic device 100 may determine that the picture resolution is 1920×1050.
For example, in the case where the photographing parameters include a normal photographing mode, a non-preview state, an extended state, and a front camera, and the picture ratio is 1:1, the electronic device 100 may determine that the picture resolution is 1280×1280.
For example, in the case where the shooting parameters include a normal shooting mode, a non-preview state, an expanded state, a front camera, and a picture ratio of 8:7, the electronic device 100 may determine that the picture resolution is 1920×1120.
In other embodiments, the electronic device 100 may also determine the capture resolution based on the device display status, the camera type, and the picture scale while the camera application is in the normal capture mode and in the preview state.
For example, after the electronic device 100 responds to the user input for the camera application icon, the camera application is in the normal photographing mode and in the preview state before the electronic device 100 receives the user operation for the photographing control 502. The electronic device 100 may obtain current photographing parameters.
For example, in the case where the shooting parameters include a normal shooting mode, a preview state, a folded state, and a rear-mounted main camera, and the picture ratio is 1:1, the electronic device 100 may determine that the picture resolution is 1280x1280.
For example, in the case where the shooting parameters include a normal shooting mode, a preview state, a folded state, and a rear-mounted main camera, and the picture ratio is 4:3, the electronic device 100 may determine that the picture resolution is 960x1280.
For example, in the case where the photographing parameters include a normal photographing mode, a preview state, a folded state, and a rear-mounted main camera, and the picture ratio is 16:9, the electronic device 100 may determine that the picture resolution is 720×1280.
For example, in the case where the photographing parameters include a normal photographing mode, a preview state, a folded state, and a rear-mounted tele camera, and the picture ratio is 1:1, the electronic device 100 may determine that the picture resolution is 1107×1107.
For example, in the case where the photographing parameters include a normal photographing mode, a preview state, a folded state, and a rear-mounted tele camera, and the picture ratio is 4:3, the electronic device 100 may determine that the picture resolution is 800×1067.
For example, in the case where the photographing parameters include a normal photographing mode, a preview state, a folded state, and a rear-mounted tele camera, and the picture ratio is 16:9, the electronic device 100 may determine that the picture resolution is 600×1067.
For example, in the case where the photographing parameters include a normal photographing mode, a preview state, a folded state, and a rear-mounted wide-angle camera, and the picture ratio is 1:1, the electronic device 100 may determine that the picture resolution is 800×800.
For example, in the case where the photographing parameters include a normal photographing mode, a preview state, a folded state, a rear-mounted wide-angle camera, and a picture ratio of 4:3, the electronic device 100 may determine that the picture resolution is 640×853.
For example, in the case where the photographing parameters include a normal photographing mode, a preview state, a folded state, a rear-mounted wide-angle camera, and a picture ratio of 16:9, the electronic device 100 may determine that the picture resolution is 480×853.
For example, in the case where the photographing parameters include a normal photographing mode, a preview state, a folded state, a front camera, and a picture ratio of 1:1, the electronic device 100 may determine that the picture resolution is 853×853.
For example, in the case where the photographing parameters include a normal photographing mode, a preview state, a folded state, a front camera, and a picture ratio of 4:3, the electronic device 100 may determine that the picture resolution is 640×853.
For example, in the case where the photographing parameters include a normal photographing mode, a preview state, a folded state, a front camera, and a picture ratio of 16:9, the electronic device 100 may determine that the picture resolution is 600x1067.
For example, in the case where the shooting parameters include a normal shooting mode, a preview state, an expanded state, and a rear-mounted main camera, and the picture ratio is 1:1, the electronic device 100 may determine that the picture resolution is 1280x1280.
For example, in the case where the shooting parameters include a normal shooting mode, a preview state, an expanded state, a rear-mounted main camera, and a picture ratio of 8:7, the electronic device 100 may determine that the picture resolution is 1280x1120.
For example, in the case where the photographing parameters include a normal photographing mode, a preview state, an expanded state, and a rear-mounted tele camera, and the picture ratio is 1:1, the electronic device 100 may determine that the picture resolution is 1107×1107.
For example, in the case where the photographing parameters include a normal photographing mode, a preview state, an expanded state, a rear-mounted tele camera, and a picture ratio of 8:7, the electronic device 100 may determine that the picture resolution is 1107×969.
For example, in the case where the photographing parameters include a normal photographing mode, a preview state, an expanded state, a rear-mounted wide-angle camera, and a picture ratio of 1:1, the electronic device 100 may determine that the picture resolution is 800×800.
For example, in the case where the photographing parameters include a normal photographing mode, a preview state, an expanded state, a rear-mounted wide-angle camera, and a picture ratio of 8:7, the electronic device 100 may determine that the picture resolution is 1280x700.
For example, in the case where the photographing parameters include a normal photographing mode, a preview state, an expanded state, a front camera, and a picture ratio of 1:1, the electronic device 100 may determine that the picture resolution is 853×853.
For example, in the case where the shooting parameters include a normal shooting mode, a preview state, an expanded state, a front camera, and a picture ratio of 8:7, the electronic device 100 may determine that the picture resolution is 1280x747.
The resolution of the picture shown in fig. 10 is only for explaining the present application, and other values are also possible, which is not limited by the present application.
In some embodiments, the configuration files corresponding to other photographing modes may be the same as the configuration files corresponding to the common photographing modes, and only the configuration files corresponding to the common photographing modes may be reserved in the first configuration file, so that the configuration files corresponding to the common photographing modes may be shared by the other photographing modes and the common photographing modes.
For example, the other photographing modes may be a portrait photographing mode, as shown in fig. 11, and the root node is a portrait photographing mode and a normal photographing mode, which may share a configuration file. In this way, the data volume of the first profile can be reduced.
For the description of the configuration file shown in fig. 11, reference may be made to the description in the embodiment of fig. 10, and the description of the present application is omitted here.
Fig. 12 is a schematic diagram of a configuration file corresponding to a normal video recording mode.
Optionally, in the video mode, the requirement of definition of the picture is higher, and the video mode can only support the rear-mounted main camera to record video. In other embodiments, the video mode may also support other cameras, such as a wide-angle camera and a tele camera, which is not limited in this regard.
As shown in fig. 12, the normal video mode can be divided into two branches, i.e., a preview state and a non-preview state.
Alternatively, the picture resolution in the preview mode and the non-preview mode may be different in the normal video mode.
For example, when the camera application is in the normal recording mode, the normal recording mode is in the preview state before starting recording, the camera application may acquire the preview resolution in the preview state, and after starting recording, the electronic device 100 may acquire the photographing resolution in the non-preview mode.
In some embodiments, the preview resolution in the preview state may be less than the capture resolution in the non-preview mode, and the electronic device 100 may capture and display the preview image at a lower resolution to save power consumption of the electronic device 100.
As shown in fig. 12, the normal video recording mode can be divided into two branches, i.e., a preview state and a non-preview state. When the camera is in a preview state or a non-preview state, the resolution of the picture can be determined based on the device display screen state, the camera type and the currently selected picture proportion.
Note that, when the display screen of the electronic device 100 is a bar screen, rather than a folded screen or an extended screen, the configuration file corresponding to the normal video recording mode shown in fig. 11 may not be divided into an unfolded state and a folded state.
In some embodiments, while the camera application is in normal video mode and in a 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 scale.
Illustratively, after the electronic device 100 responds to a user's clicking on the "record" option in the mode field 501, the camera application is in normal record mode and in a non-preview state. The electronic device 100 may obtain current photographing parameters.
For example, in the case where the shooting parameters include a normal video mode, a non-preview state, a folded state, and a rear-mounted main camera, and the picture ratio is 16:9, the electronic device 100 may determine that the picture resolution is 1215x2160.
For example, in the case where the shooting parameters include a normal video mode, a non-preview state, a folded state, and a rear-mounted main camera, and the picture ratio is 21:9, the electronic device 100 may determine that the picture resolution is 857x2000.
For example, in the case where the shooting parameters include a normal video mode, a non-preview state, a folded state, a front camera, and a picture ratio of 16:9, the electronic device 100 may determine that the picture resolution is 1114x1980.
For example, in the case where the shooting parameters include a normal video mode, a non-preview state, a folded state, and a front camera, and the picture ratio is 21:9, the electronic device 100 may determine that the picture resolution is 771x1800.
For example, in the case where the shooting parameters include a normal video mode, a non-preview state, an extended state, and a rear-mounted main camera, and the picture ratio is 8:7, the electronic device 100 may determine that the picture resolution is 1662x1900.
For example, in the case where the shooting parameters include a normal video mode, a non-preview state, an extended state, and a front camera, and the picture ratio is 8:7, the electronic device 100 may determine that the picture resolution is 1488x1700.
For example, in the case where the shooting parameters include a normal video mode, a preview state, a folded state, and a rear-mounted main camera, and the picture ratio is 16:9, the electronic device 100 may determine that the picture resolution is 810x1440.
For example, in the case where the shooting parameters include a normal video mode, a preview state, a folded state, and a rear-mounted main camera, and the picture ratio is 21:9, the electronic device 100 may determine that the picture resolution is 571x1333.
For example, in the case where the shooting parameters include a normal video mode, a preview state, a folded state, a front camera, and a picture ratio of 16:9, the electronic device 100 may determine that the picture resolution is 743x1320.
For example, in the case where the shooting parameters include a normal video mode, a preview state, a folded state, a front camera, and a picture ratio of 21:9, the electronic device 100 may determine that the picture resolution is 514x1200.
For example, in the case where the shooting parameters include a normal video mode, a preview state, an expanded state, a rear-mounted main camera, and a picture ratio of 8:7, the electronic device 100 may determine that the picture resolution is 1108x1267.
For example, in the case where the shooting parameters include a normal video mode, a preview state, an expanded state, a front camera, and a picture ratio of 8:7, the electronic device 100 may determine that the picture resolution is 992x1133.
In some embodiments, the configuration files corresponding to other video modes may be the same as the configuration files corresponding to the normal video modes, and only the configuration files corresponding to the normal video modes may be reserved in the first configuration file, and the configuration files corresponding to the normal video modes may be shared by other video modes and the normal video modes.
For example, the other recording mode may be a delayed recording mode, as shown in fig. 13, the root node is a delayed recording mode and a normal recording mode, and the delayed recording mode and the normal recording mode may share a configuration file. In this way, the data volume of the first profile can be reduced.
For the description of the configuration file shown in fig. 13, reference may be made to the description in the embodiment of fig. 12, and the description of the present application is omitted here.
The application takes the common photographing mode and the common video mode as examples to describe the composition structure of the configuration files, and the composition structure of the configuration files of other photographing modes can be similar to the composition structure of the configuration files of the common photographing mode or the common video mode, and the application is not repeated here.
Alternatively, the configuration files corresponding to the plurality of shooting modes may be a complete file, for example, the configuration file of the normal shooting mode and the configuration file of the normal video mode may be stored in one file, and the configuration file corresponding to each shooting mode may also be a separate file, for example, the configuration file of the normal shooting mode and the configuration file of the normal video mode may be stored in two different files respectively.
Alternatively, the configuration files of fig. 10-13 are also merely used to illustrate the present application, and are not meant to be limiting.
S909, the camera application stores the first configuration file in the running memory of the camera application.
After receiving the first configuration file sent by the HAL layer, the camera application may store the first configuration file in a running memory of the camera application.
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 turned on again, the electronic device 100 loads the first configuration file into the running memory of the camera application again.
In some embodiments, if the user who opens the camera application operates to switch the camera application running in the background to the foreground, the first configuration file is already stored in the running memory of the camera application, and the camera application may directly obtain the first configuration file from the running memory of the camera application.
S910, the camera application acquires the initial preview resolution and the initial shooting resolution from the first configuration file based on the initial shooting parameters.
The shooting parameters may include, but are not limited to, any one or more of a shooting status, a shooting mode, a device display status, a camera type, a picture scale, etc.
For example, if the user operation of opening the camera application is the first user operation of opening the camera application, after the electronic device 100 enters the camera application, the camera application may default to the normal photographing mode, and the electronic device 100 may display the user interface shown in fig. 8B. The electronic device 100 may acquire initial photographing parameters corresponding to the normal photographing mode.
Exemplary initial capture parameters may include, but are not limited to, normal capture mode, preview state, collapsed state, rear-mounted main camera, and 4:3 picture scale.
Wherein, the shooting state in the initial shooting parameters used for acquiring the initial preview resolution may be a preview state. The photographing state in the initial photographing parameters used to acquire the photographing preview resolution may be a non-preview state.
For how the electronic device 100 obtains the picture resolution based on the shooting parameters, reference may be made to the description in the embodiment of fig. 10 below. The present application is not described in detail herein.
The first configuration file comprises a plurality of picture resolutions corresponding to different shooting parameters. The first configuration file may be preset within a file system of the camera application. For example, the first profile may be preset in a file system of the camera application before the electronic device 100 leaves the factory, and the first profile in the file system of the camera application may also be periodically/sporadically acquired and updated from the server by the electronic device 100.
In some embodiments, the initial shooting resolution may not be required to be confirmed first, and the initial shooting resolution may be confirmed after the camera application receives the input operation of the user for the shutter key.
Optionally, the preview resolution is lower than the capture resolution. In this way, the electronic device 100 may capture the preview image at a lower resolution to reduce power consumption of the electronic device 100.
Alternatively, the preview resolution may be the same as the shooting resolution, which is not limited in the present application.
In this way, the camera application determines the initial photographing resolution in advance, and upon detecting a user operation acting on the photographing control 502, the electronic device 100 may acquire an image based on the initial photographing resolution acquired in advance to accelerate the photographing action of the electronic device 100 in response to the user.
S911, the camera application sends the initial preview resolution to the HAL layer.
S912, HAL layer sends the initial preview resolution to the camera driver.
S913, the camera driver sends the initial preview resolution to the camera module.
S914, the camera module collects images with the initial preview resolution.
After receiving 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 a camera driver, and the camera driver sends the initial preview resolution to the camera module.
After receiving the initial preview resolution, the camera module may collect an image based on the initial preview resolution. And displaying the image acquired by the camera module at the initial preview resolution in a preview window of the camera application.
S915, the camera application receives a user operation for the shutter key.
S916, the camera application sends the initial photographing resolution to the HAL layer.
S917, HAL layer sends the initial shooting resolution to the camera driver.
S918, the camera driver sends the shooting preview resolution to the camera module.
S919, the camera module collects an image or video with an initial shooting resolution and stores the image or video.
In some embodiments, the electronic device 100 may receive a user operation for a shutter key, save a picture or video.
For example, the user operation for the shutter key may be an input operation for the photographing control 502 in fig. 8B, such as a click.
In response to a user operation for the shutter key, the camera application may send the initial photographing resolution acquired in advance to the HAL layer, which in turn sends the initial photographing resolution to the camera driver, which sends the initial photographing resolution to the camera module.
After receiving the initial shooting resolution, the camera module can acquire images or videos based on the initial shooting resolution. And storing the image or video acquired by the camera module at the initial shooting resolution in a gallery.
In some embodiments, S914-S918 may not be performed, as the application is not limited in this regard.
2. The electronic device 100 changes the photographing parameters of the camera application based on the user operation, and the electronic device 100 needs to acquire updated preview resolution.
In some embodiments, the electronic device 100 may 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 acquire updated preview resolution.
Alternatively, the updated preview resolution and the initial preview resolution may be the same or different.
As can be seen from the above description, the shooting parameters may include, but are not limited to, any one or more of a shooting status, a shooting mode, a device display status, a camera type, a picture scale, and the like. The user may change the shooting mode or change the device display state or change the camera type or change the picture scale to get updated shooting parameters so that the electronic device 100 may obtain updated preview resolution based on the updated shooting parameters.
Several implementations of changing the shooting parameters of a camera application are described next.
Mode one, changing the shooting mode to change the shooting parameters of the camera application.
In the case where the electronic apparatus 100 changes the photographing mode based on the user operation, the electronic apparatus 100 may change photographing parameters of the camera application.
For example, the user operation may switch the normal photographing mode to the normal recording mode. In response to the camera application switching to the normal recording mode, the electronic device 100 may acquire photographing parameters of the normal recording mode.
The shooting parameters of the normal video mode may be different from or the same as those of the normal shooting mode.
After acquiring the shooting parameters of the normal video mode, the electronic device 100 may acquire an updated preview resolution from the configuration file corresponding to the normal video mode based on the shooting parameters of the normal video mode, where the updated preview resolution may be a preview resolution corresponding to the normal video mode.
Exemplary shooting parameters of the normal video mode include, but are not limited to, normal video mode, preview state, folded state, rear main camera and 16:9 picture scale. And based on the shooting parameters, obtaining an updated preview resolution corresponding to the common video mode from the first configuration file, wherein the updated preview resolution may be 810x1440, for example. For how the electronic device 100 obtains the updated preview resolution based on the photographing parameters, reference may be made to the description in the embodiment of fig. 10.
After acquiring the updated preview resolution, the electronic device 100 may capture an image and display a preview image frame based on the updated preview resolution.
In some embodiments, the electronic device 100 also needs to obtain an updated shooting resolution corresponding to the normal video mode. In this way, when detecting the user operation on the photographing control 502, the electronic device 100 may acquire the image frame based on the updated photographing resolution corresponding to the normal video recording mode acquired in advance, so as to speed up the response of the electronic device 100 to the photographing action of the user.
For example, the electronic device 100 may obtain shooting parameters for obtaining updated shooting resolution, including but not limited to a normal video mode, a non-preview state, a collapsed state, a rear-mounted main camera, and a picture scale of 16:9. And obtains the shooting resolution corresponding to the common video recording mode from the first configuration file based on the shooting parameter, and the updated preview resolution may be 1215x2160, for example. For how the electronic apparatus 100 acquires the photographing resolution based on the photographing parameters, reference may be made to the description in the embodiment of fig. 10.
Optionally, the update preview resolution is lower than the update capture resolution. In this way, the electronic device 100 may capture the preview image at a lower resolution to reduce power consumption of the electronic device 100.
Alternatively, the updated preview resolution may be the same as the updated shooting resolution, which is not limited in the present application.
In other embodiments, the electronic device 100 may also determine the updated shooting resolution corresponding to the normal video recording mode after detecting the user operation acting on the shooting control 502, which is not limited in the present application.
In some embodiments, after detecting a user operation (such as clicking) of the shooting control 502 by the user, the electronic device 100 may respond to the user operation to record a video with an updated shooting resolution corresponding to a normal recording mode configured in advance, and store a video file obtained by shooting in a gallery. The electronic device 100 may be expedited in response to the user's shooting actions. After the electronic device 100 receives the user operation of the user on the shooting control 502 again, the camera application stops recording, and the electronic device 100 continues to collect and display the preview image frames with the updated preview resolution corresponding to the normal recording mode.
And the shooting mode is not changed in the second mode so as to change shooting parameters of camera application.
In some embodiments, the shooting parameters of the camera application may also be changed without the electronic device 100 changing the shooting mode.
For example, in the same shooting mode, the electronic device 100 may change the state of the display screen of the electronic device and/or change the type of camera and/or change the proportion of the picture, etc. based on the user operation, and may change the shooting parameters of the camera application to obtain the updated preview resolution.
The application is described by taking other shooting parameters corresponding to the common shooting mode as an example under the condition of not changing the common shooting mode.
In the case where the normal photographing mode is not changed, changing other photographing parameters corresponding to the normal photographing mode may include, but is not limited to, the following.
Mode 1, changing the state of the display screen of the electronic device to obtain updated preview resolution.
In the case where the electronic device display is a folding screen or an expansion screen, the user may change the state of the electronic device display. For example, switching the electronic device display from a folded state to an unfolded state, or switching the electronic device display from an unfolded state to a folded state.
For example, in the normal photographing mode, the electronic device 100 may switch the electronic device display screen state from the folded state to the unfolded state based on the user operation.
In response to the electronic device display screen state being switched from the folded state to the unfolded state, the electronic device 100 may obtain updated photographing parameters of the normal photographing mode.
The updated photographing parameters of the normal photographing mode may be different from or the same as those of the normal photographing mode.
After acquiring the updated shooting parameters of the normal shooting mode, the electronic device 100 may acquire 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, where the updated preview resolution may be the updated preview resolution corresponding to the normal shooting mode.
Exemplary updated photographing parameters for the normal photographing mode include, but are not limited to, normal photographing mode, preview state, extended state, rear-mounted main camera, and picture scale of 8:7. And based on the shooting parameters, obtaining an updated preview resolution corresponding to the common shooting mode from the first configuration file, wherein the updated preview resolution may be 1280x1120. For how the electronic device 100 obtains the updated preview resolution based on the photographing parameters, reference may be made to the description in the embodiment of fig. 10.
After acquiring the updated preview resolution, the electronic device 100 may capture an image and display a preview image frame based on the updated preview resolution.
In some embodiments, the electronic device 100 also needs to obtain an updated shooting resolution corresponding to the normal shooting mode. In this way, when detecting the user operation on the photographing control 502, the electronic device 100 may acquire an image frame based on the updated photographing resolution corresponding to the normal photographing mode acquired in advance, so as to accelerate the response of the electronic device 100 to the photographing action of the user.
For example, the electronic device 100 may obtain photographing parameters for obtaining updated photographing resolution, including but not limited to a normal photographing mode, a non-preview state, an expanded state, a rear-mounted main camera, and a picture ratio of 8:7. And based on the shooting parameters, obtaining an updated shooting resolution corresponding to the common shooting mode from the first configuration file, wherein the updated preview resolution can be 1920x1680. For how the electronic device 100 acquires updated shooting resolution based on shooting parameters, reference may be made to the description in the embodiment of fig. 10.
Optionally, the update preview resolution is lower than the update capture resolution. In this way, the electronic device 100 may capture the preview image at a lower resolution to reduce power consumption of the electronic device 100.
Alternatively, the updated preview resolution may be the same as the updated shooting resolution, which is not limited in the present application.
In other embodiments, the electronic device 100 may also determine the updated shooting resolution corresponding to the normal shooting mode after detecting the user operation on the shooting control 502, which is not limited in the present application.
In some embodiments, after detecting a user operation (e.g., clicking) of the user on the photographing control 502, the electronic device 100 may respond to the user operation to photograph with an updated photographing resolution corresponding to a common photographing mode configured in advance, and store a picture obtained by photographing in a gallery. The electronic device 100 may be expedited in response to the user's shooting actions. After the picture is acquired, the camera application stops photographing and enters the preview state again, and the electronic device 100 continues to acquire and display the preview image frame with the updated preview resolution corresponding to the normal photographing mode.
Mode 2, changing the camera type to obtain updated preview resolution.
Based on the foregoing description, the electronic device 100 may include a front camera and a rear camera, where the front camera may include one or more cameras and the rear camera may also include one or more cameras. The electronic device 100 may switch different rear cameras based on user operations to change the photographing parameters of the camera application. The electronic device 100 may also switch front and rear cameras based on user operations to change the photographing parameters of the camera application.
And (3) switching from the main camera to the wide-angle camera in the mode A to acquire updated preview resolution.
The rear camera of the electronic device 100 may include one or more cameras, such as a main camera, a wide angle camera, a tele camera, and the like.
The electronic device 100 may switch between a plurality of rear cameras based on user operations, e.g., the electronic device 100 receives a user operation to increase the zoom magnification of the camera application, may switch from the main camera to the wide-angle camera to change the photographing parameters of the camera application, obtain updated photographing parameters, and obtain updated preview resolution based on the updated photographing parameters.
The updated photographing parameters of the normal photographing mode may be different from or the same as those of the normal photographing mode.
After acquiring the updated shooting parameters of the normal shooting mode, the electronic device 100 may acquire 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, where the updated preview resolution may be the updated preview resolution corresponding to the normal shooting mode.
Exemplary updated photographing parameters for the normal photographing mode include, but are not limited to, normal photographing mode, preview state, folded state, rear-mounted wide-angle camera, and 4:3 picture scale. And based on the shooting parameters, acquiring an updated preview resolution corresponding to the common shooting mode from the first configuration file, wherein the updated preview resolution may be 640×853, for example. For how the electronic device 100 obtains the updated preview resolution based on the photographing parameters, reference may be made to the description in the embodiment of fig. 10.
After acquiring the updated preview resolution, the electronic device 100 may capture an image and display a preview image frame based on the updated preview resolution.
In some embodiments, the electronic device 100 also needs to obtain an updated shooting resolution corresponding to the normal shooting mode. In this way, when detecting the user operation on the photographing control 502, the electronic device 100 may acquire an image frame based on the updated photographing resolution corresponding to the normal photographing mode acquired in advance, so as to accelerate the response of the electronic device 100 to the photographing action of the user.
For example, the electronic device 100 may obtain photographing parameters for obtaining updated photographing resolution, including but not limited to a normal photographing mode, a non-preview state, a collapsed state, a rear-view wide-angle camera, and a 4:3 picture scale. And based on the shooting parameters, obtaining an updated shooting resolution corresponding to the common shooting mode from the first configuration file, wherein the updated preview resolution can be 960×1280. For how the electronic device 100 acquires updated shooting resolution based on shooting parameters, reference may be made to the description in the embodiment of fig. 10.
Optionally, the update preview resolution is lower than the update capture resolution. In this way, the electronic device 100 may capture the preview image at a lower resolution to reduce power consumption of the electronic device 100.
Alternatively, the updated preview resolution may be the same as the updated shooting resolution, which is not limited in the present application.
In other embodiments, the electronic device 100 may also determine the updated shooting resolution corresponding to the normal shooting mode after detecting the user operation on the shooting control 502, which is not limited in the present application.
In some embodiments, after detecting a user operation (e.g., clicking) of the user on the photographing control 502, the electronic device 100 may respond to the user operation to photograph with an updated photographing resolution corresponding to a common photographing mode configured in advance, and store a picture obtained by photographing in a gallery. The electronic device 100 may be expedited in response to the user's shooting actions. After the picture is acquired, the camera application stops photographing and enters the preview state again, and the electronic device 100 continues to acquire and display the preview image frame with the updated preview resolution corresponding to the normal photographing mode.
And B, switching from the front camera to the rear camera to acquire updated preview resolution.
In some embodiments, the electronic device 100 may be based on user operations. And switching from the front camera to the rear camera to change shooting parameters of camera application, obtaining updated shooting parameters, and acquiring updated preview resolution based on the updated shooting parameters.
The updated photographing parameters of the normal photographing mode may be different from or the same as those of the normal photographing mode.
After acquiring the updated shooting parameters of the normal shooting mode, the electronic device 100 may acquire 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, where the updated preview resolution may be the updated preview resolution corresponding to the normal shooting mode.
Exemplary updated photographing parameters for the normal photographing mode include, but are not limited to, normal photographing mode, preview state, folded state, front camera, and 4:3 picture scale. And based on the shooting parameters, acquiring an updated preview resolution corresponding to the common shooting mode from the first configuration file, wherein the updated preview resolution may be 640×853, for example. For how the electronic device 100 obtains the updated preview resolution based on the photographing parameters, reference may be made to the description in the embodiment of fig. 10.
After acquiring the updated preview resolution, the electronic device 100 may capture an image and display a preview image frame based on the updated preview resolution.
In some embodiments, the electronic device 100 also needs to obtain an updated shooting resolution corresponding to the normal shooting mode. In this way, when detecting the user operation on the photographing control 502, the electronic device 100 may acquire an image frame based on the updated photographing resolution corresponding to the normal photographing mode acquired in advance, so as to accelerate the response of the electronic device 100 to the photographing action of the user.
For example, the electronic device 100 may obtain photographing parameters for obtaining updated photographing resolution, including but not limited to a normal photographing mode, a non-preview state, a folded state, a front camera, and a 4:3 picture scale. And based on the shooting parameters, obtaining an updated shooting resolution corresponding to the common shooting mode from the first configuration file, wherein the updated preview resolution can be 960×1280. For how the electronic device 100 acquires updated shooting resolution based on shooting parameters, reference may be made to the description in the embodiment of fig. 10.
Optionally, the update preview resolution is lower than the update capture resolution. In this way, the electronic device 100 may capture the preview image at a lower resolution to reduce power consumption of the electronic device 100.
Alternatively, the updated preview resolution may be the same as the updated shooting resolution, which is not limited in the present application.
In other embodiments, the electronic device 100 may also determine the updated shooting resolution corresponding to the normal shooting mode after detecting the user operation on the shooting control 502, which is not limited in the present application.
In some embodiments, after detecting a user operation (e.g., clicking) of the user on the photographing control 502, the electronic device 100 may respond to the user operation to photograph with an updated photographing resolution corresponding to a common photographing mode configured in advance, and store a picture obtained by photographing in a gallery. The electronic device 100 may be expedited in response to the user's shooting actions. After the picture is acquired, the camera application stops photographing and enters the preview state again, and the electronic device 100 continues to acquire and display the preview image frame with the updated preview resolution corresponding to the normal photographing mode.
And 3, changing the picture proportion to obtain the updated preview resolution.
In some embodiments, the electronic device 100 may change the scale of pictures taken or recorded by the camera application based on user operation. For example, in the normal photographing mode, the electronic device 100 may receive a user operation to modify the picture scale of the camera application from 4:3 to 16:9. In response to modifying the picture scale from 4:3 to 16:9 to change the shooting parameters of the camera application, updated shooting parameters are obtained, and an updated preview resolution is obtained based on the updated shooting parameters.
The updated photographing parameters of the normal photographing mode may be different from or the same as those of the normal photographing mode.
After acquiring the updated shooting parameters of the normal shooting mode, the electronic device 100 may acquire 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, where the updated preview resolution may be the updated preview resolution corresponding to the normal shooting mode.
Exemplary updated photographing parameters for the normal photographing mode include, but are not limited to, normal photographing mode, preview status, folded status, rear main camera, and 16:9 picture scale. And based on the shooting parameters, obtaining an updated preview resolution corresponding to the common shooting mode from the first configuration file, wherein the updated preview resolution can be 720×1280. For how the electronic device 100 obtains the updated preview resolution based on the photographing parameters, reference may be made to the description in the embodiment of fig. 10.
After acquiring the updated preview resolution, the electronic device 100 may capture an image and display a preview image frame based on the updated preview resolution.
In some embodiments, the electronic device 100 also needs to obtain an updated shooting resolution corresponding to the normal shooting mode. In this way, when detecting the user operation on the photographing control 502, the electronic device 100 may acquire an image frame based on the updated photographing resolution corresponding to the normal photographing mode acquired in advance, so as to accelerate the response of the electronic device 100 to the photographing action of the user.
For example, the electronic device 100 may obtain photographing parameters for obtaining updated photographing resolution, including but not limited to a normal photographing mode, a non-preview state, a collapsed state, a rear-mounted main camera, and a picture scale of 16:9. And based on the shooting parameters, obtaining an updated shooting resolution corresponding to the common shooting mode from the first configuration file, wherein the updated preview resolution may be 1440x1920 by way of example. For how the electronic device 100 acquires updated shooting resolution based on shooting parameters, reference may be made to the description in the embodiment of fig. 10.
Optionally, the update preview resolution is lower than the update capture resolution. In this way, the electronic device 100 may capture the preview image at a lower resolution to reduce power consumption of the electronic device 100.
Alternatively, the updated preview resolution may be the same as the updated shooting resolution, which is not limited in the present application.
In other embodiments, the electronic device 100 may also determine the updated shooting resolution corresponding to the normal shooting mode after detecting the user operation on the shooting control 502, which is not limited in the present application.
In some embodiments, after detecting a user operation (e.g., clicking) of the user on the photographing control 502, the electronic device 100 may respond to the user operation to photograph with an updated photographing resolution corresponding to a common photographing mode configured in advance, and store a picture obtained by photographing in a gallery. The electronic device 100 may be expedited in response to the user's shooting actions. After the picture is acquired, the camera application stops photographing and enters the preview state again, and the electronic device 100 continues to acquire and display the preview image frame with the updated preview resolution corresponding to the normal photographing mode.
Fig. 14 is a flowchart of a method for updating a picture resolution of a camera application by the electronic device 100 according to the present application.
The method may be implemented based on interaction between an application layer (e.g., camera application) within the electronic device, a hardware abstraction layer (hardware abstract layer, HAL), a driver layer, and a hardware layer, wherein the application layer is primarily related to the camera application. The drive layer is mainly related to camera drive and disk drive. The hardware layer mainly relates to a camera module, a magnetic disk and the like.
S1401, the camera application receives a user operation to change the shooting parameters of the camera application.
S1402, in response to a user operation, the camera application acquires updated shooting parameters.
Based on the description of the embodiment of fig. 9, after the camera application is started based on the user operation, the camera application may enter the normal photographing mode of the camera application by default.
In response to entering the normal photographing mode, the camera application may obtain an initial preview resolution of the normal photographing mode. In some embodiments, the camera application may also obtain an initial capture resolution for the normal capture mode.
In some embodiments, the camera application may receive a user operation to alter the shooting parameters of the camera application. In response to changing the shooting parameters of the camera application, the camera application needs to acquire an updated preview resolution. In some embodiments, the camera application may also obtain updated capture resolution.
The electronic device 100 may alter the shooting parameters of the camera application in the following manner, but is not limited thereto.
Mode one, changing the shooting mode to change the shooting parameters of the camera application.
The shooting mode can comprise any one of a common shooting mode, a portrait shooting mode, a high-definition shooting mode, a night scene shooting mode, a panoramic shooting mode, a common video mode, a delayed video mode, a slow-motion video mode and the like. The electronic device 100 may receive a user operation to switch between any two photographing modes to change photographing parameters of the camera application. For example, the electronic device 100 may receive a user operation to switch between a normal camera mode and a normal video recording mode to change photographing parameters of a camera application.
In a case where the electronic apparatus 100 changes the photographing mode based on the user operation, the electronic apparatus 100 may change photographing parameters of the camera application, and the electronic apparatus 100 may acquire updated photographing parameters. In particular, reference may be made to the description of the first mode, and the present application is not repeated herein.
And the shooting mode is not changed in the second mode so as to change shooting parameters of camera application.
Without changing the shooting mode, the electronic device 100 may change the state of the display screen of the electronic device in the shooting mode and/or change the type of the camera and/or change the proportion of the picture, etc. based on the user operation, so as to change the shooting parameters of the camera application, and obtain updated shooting parameters to obtain updated preview resolution.
In particular, reference may be made to the description of the second mode, and the disclosure is not repeated herein.
S1403, the camera application acquires a first configuration file from a running memory of the camera application.
S1404, the camera application obtains an updated preview resolution and an updated capture resolution from the first profile based on the updated capture parameters.
In response to acquiring the updated photographing parameters, the camera application may acquire a first configuration file from a running memory of the camera application. Because the camera application is already running, the running memory of the camera application stores the first configuration file, and the camera application can directly acquire the first configuration file from the running memory of the camera application without acquiring the first configuration file from the file system of the camera application, so that the time for the camera application to acquire the first configuration file can be saved.
After acquiring the updated capture parameters, the camera application may determine an updated preview resolution from the first configuration file based on the updated capture parameters.
After acquiring the updated preview resolution, the electronic device 100 may capture an image at the updated preview resolution and display the preview image frame.
In some embodiments, the camera application also needs to acquire updated shooting resolution. In this way, upon detecting a user operation on the capture control 502, the electronic device 100 may capture image frames based on updated capture resolution acquired in advance to expedite a camera application's capture action in response to the user.
Optionally, the update preview resolution is lower than the update capture resolution. In this way, the electronic device 100 may capture the preview image at a lower resolution to reduce power consumption of the electronic device 100.
Alternatively, the updated preview resolution may be the same as the updated shooting resolution, which is not limited in the present application.
In other embodiments, the camera application may also determine the updated capture resolution after detecting a user operation on the capture control 502, which is not limited in this regard.
S1405, the camera application sends the updated preview resolution to the HAL layer.
S1406, HAL layer sends updated preview resolution to camera driver.
And S1407, the camera driver sends the updated preview resolution to the camera module.
S1408, the camera module updates the preview resolution to collect the image.
After determining the updated preview resolution, the camera application may send the updated preview resolution to the HAL layer, which in turn sends the updated preview resolution to the camera driver, which sends the updated preview resolution to the camera module.
After the camera module receives the updated preview resolution, the camera module can acquire images based on the updated preview resolution. And displaying the camera module in a preview window of the camera application to update the image captured at the preview resolution.
S1409, the camera application receives a user operation for the shutter key.
S1410, the camera application sends the updated shooting resolution to the HAL layer.
S1411, HAL layer sends updated shooting resolution to camera driver.
And S1412, the camera driver sends the updated shooting resolution to the camera module.
S1413, the camera module collects images or videos with updated shooting resolution and stores the images or videos.
In some embodiments, the electronic device 100 may receive a user operation for a shutter key, save a picture or video.
For example, the user operation for the shutter key may be an input operation for the photographing control 502 in fig. 8B, such as a click.
In response to a user operation for the shutter key, the camera application may send the updated photographing resolution acquired in advance to the HAL layer, which in turn sends the updated photographing resolution to the camera driver, which sends the updated photographing resolution to the camera module.
After receiving the updated shooting resolution, the camera module can acquire images or videos based on the updated shooting resolution. And the camera module is used for updating the image or video acquired by the shooting resolution and storing the image or video in a gallery. In this way, the camera application can be accelerated to respond to the shooting action of the user.
In some embodiments, S1409-S1413 may not be performed, as the application is not limited in this regard.
Fig. 15 is a flowchart of a method for configuring resolution of a picture according to the present application.
S1501, when the electronic device runs the camera application, a first configuration file is stored in an operation memory of the camera application, and a plurality of different corresponding relations between shooting parameters and picture resolution are recorded in the first configuration file.
The first profile may be, for example, the profiles shown in fig. 10-13.
In some embodiments, after the camera application is turned off, the first configuration file stored in the running memory of the camera application is purged. When the camera application is run again, the camera application loads the first configuration file into a running memory of the camera application.
S1502, the electronic device receives and responds to a first operation of a user for camera application, and obtains a first shooting parameter.
S1503, the electronic device acquires a first configuration file from the running memory of the camera application.
S1504, the electronic device acquires a first picture resolution from the first configuration file based on the first shooting parameters.
In some embodiments, the first picture resolution may be referred to as an update preview resolution.
In some embodiments, the first shooting parameter may also be referred to as an updated shooting parameter.
For how the electronic device obtains the first picture resolution from the first configuration file based on the first photographing parameter, reference may be made to the description in the embodiment of fig. 14.
S1505, the electronic device collects the first image with the first picture resolution through the camera application, and the electronic device displays the first image in the camera application.
Alternatively, the electronic device may display the first image within a preview window of the camera application.
By this method, the electronic device 100 may store resolution information supported by the camera application in the first profile. After the camera application is running, the electronic device 100 stores the first configuration file in a running memory of the camera application. When the camera application needs to reconfigure the picture resolution, the camera application only needs to acquire the updated picture resolution from the first configuration file, so that the process of acquiring the updated picture resolution by the camera application is simplified, and the speed of acquiring the updated picture resolution by the camera application is also increased.
In one possible implementation, after the electronic device runs the camera application, the method further includes the electronic device obtaining the first configuration file from within a file system of the camera application before storing the first configuration file within a running memory of the camera application.
The first configuration file is stored within a file system of the camera application. When the camera application is running, the camera application may obtain the first configuration file from the file system of the camera application and store the first configuration file in the running memory of the camera application.
For how the electronic device obtains the first configuration file from within the file system of the camera application, reference may be made to the description in the embodiment of fig. 9.
In one possible implementation manner, the first shooting parameters comprise shooting parameters of the camera application in a preview state corresponding to the first shooting mode, after the electronic device acquires the first configuration file, the method further comprises the steps that the electronic device acquires second shooting parameters, the second shooting parameters comprise shooting parameters of the camera application in the shooting state corresponding to the first shooting mode, the electronic device acquires the first configuration file from a running memory of the camera application, and the electronic device acquires the second picture resolution from the first configuration file based on the second shooting parameters.
In some embodiments, the second picture resolution may be referred to as an updated capture resolution.
In some embodiments, the second shooting parameter may also be referred to as an updated shooting parameter.
In other possible implementations, the camera application may not acquire the second picture resolution first, and acquire the second picture resolution after detecting the operation of the shutter key by the user, which is not limited in this aspect of the application.
In this way, the camera application can acquire the second picture resolution in advance before detecting the operation of the user on the shutter key, so as to accelerate the camera application to respond to the operation of the user on the shutter key, thereby improving the user experience.
In one possible implementation, the method further includes the steps of receiving, by the electronic device, a second operation of a shutter key in the camera application by the user, capturing, by the electronic device, a second image or a second video at a second picture resolution in response to the second operation, and saving, by the electronic device, the second image or the second video.
In this way, the camera application can acquire the second picture resolution in advance before detecting the operation of the shutter key by the user. When the camera application detects the operation of the user on the shutter key, acquiring a second image or a second video with the second picture resolution acquired in advance, so as to accelerate the response of the camera application to the operation of the user on the shutter key, and improve the user experience.
In one possible implementation, the second picture resolution is greater than the first picture resolution.
In general, the user has no high demands on the sharpness of the preview image. The camera application can acquire the preview image with lower picture resolution, and can save power consumption of the electronic device. Nor does it exceed the screen resolution of the electronic device.
In one possible implementation, the first operation includes any one or more of changing a shooting mode of the camera application, changing a display screen state of the electronic device, changing a camera type, changing a picture scale.
In one possible implementation, before the electronic device receives and responds to the first operation of the user on the camera application, the method further comprises the steps that the electronic device obtains a third shooting parameter and obtains a third picture resolution from a file system of the camera application based on the third shooting parameter, the electronic device collects a third image with the third picture resolution through the camera application, and the electronic device displays the third image in the camera application.
In one possible implementation manner, the third shooting parameters comprise shooting parameters of the camera application in a preview state corresponding to a default shooting mode, the method further comprises the steps that the electronic equipment obtains fourth shooting parameters, the fourth shooting parameters comprise shooting parameters of the camera application in a shooting state corresponding to the default shooting mode, and the electronic equipment obtains fourth picture resolution from a file system of the camera application based on the fourth shooting parameters.
In some embodiments, the third picture resolution may be referred to as an initial preview resolution and the fourth picture resolution may be referred to as an initial capture resolution.
In some embodiments, the third photographing parameter and the fourth photographing parameter may also be referred to as initial photographing parameters.
For how the electronic device obtains the third picture resolution and the fourth picture resolution from the first configuration file based on the third photographing parameter and the fourth photographing parameter, reference may be made to the description in the embodiment of fig. 14.
Thus, when the camera application is first turned on, the camera application may acquire an initial preview resolution and an initial photographing resolution and acquire a preview image at the initial preview resolution before the user does not change photographing parameters.
Alternatively, the camera application may acquire only the initial preview resolution without acquiring the initial photographing resolution. Upon detecting the user's operation with respect to the shutter key, the camera application reacquires the initial photographing resolution.
Optionally, the camera application may also obtain the initial shooting resolution from the first configuration file based on the initial shooting parameters after obtaining the first configuration file.
In one possible implementation, the electronic device periodically/sporadically obtains a second profile from the server, the second profile being partially or completely different from the first profile.
In this way, the first profile of the camera application stored on the electronic device may be updated periodically/sporadically.
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 be the same, which is not limited in the present application.
In one possible implementation, the shooting parameters include any one or more of shooting status, shooting mode, device display status, camera type, and picture scale.
The application provides electronic equipment, which comprises a camera, a memory and a processor, wherein the camera, the memory and the processor are coupled, the memory is used for storing a computer program, and when the processor executes a calling computer program, the electronic equipment executes a picture resolution configuration method shown in fig. 15.
The present application provides a computer readable storage medium comprising instructions that, when executed on an electronic device, cause the electronic device to perform a picture resolution configuration method as shown in fig. 15.
The present application provides a computer program product comprising instructions which, when run on an electronic device, cause the electronic device to perform a picture resolution configuration method as shown in fig. 15.
The present application provides a chip system comprising one or more processors for invoking computer instructions to cause an electronic device to perform a picture resolution configuration method as shown in fig. 15.
The above is only a part of examples and embodiments of the present application, and the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are covered in the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.
It will be understood that the various user interfaces described in the embodiments of the present application are merely exemplary interfaces and are not limiting on the inventive arrangements. In other embodiments, the user interface may take different interface layouts, may include more or fewer controls, and may add or subtract other functional options, as long as they are within the scope of the present application based on the same inventive concepts provided by the present application.
It should be noted that, any feature in any embodiment of the present application, or any part of any feature may be combined without contradiction or conflict, and the combined technical solution is also within the scope of the embodiment of the present application.
While the application has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art that the foregoing embodiments may be modified or equivalents may be substituted for some of the features thereof, and that the modifications or substitutions do not depart from the spirit of the embodiments.

Claims (12)

1.一种图片分辨率配置方法,其特征在于,所述方法包括:1. A method for configuring image resolution, characterized in that the method comprises: 当电子设备运行相机应用时,将第一配置文件存储在所述相机应用的运行内存内,所述第一配置文件中记录有多个不同的拍摄参数与图片分辨率的对应关系;When the electronic device runs a camera application, a first configuration file is stored in a running memory of the camera application, wherein the first configuration file records a correspondence between a plurality of different shooting parameters and image resolutions; 所述电子设备接收并响应用户针对相机应用的第一操作,获取第一拍摄参数;The electronic device receives and responds to a first operation of a user on a 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 acquires 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. 2.根据权利要求1所述的方法,在所述电子设备运行相机应用之后,在所述将第一配置文件存储在所述相机应用的运行内存内之前,所述方法还包括:2. The method according to claim 1, after the electronic device runs a camera application and before storing the first configuration file in the running memory of the camera application, the method further comprises: 所述电子设备从所述相机应用的文件系统内获取所述第一配置文件。The electronic device obtains the first configuration file from the file system of the camera application. 3.根据权利要求1或2所述的方法,其特征在于,所述第一拍摄参数包括所述相机应用在第一拍摄模式对应的预览状态下的拍摄参数,在所述电子设备获取第一配置文件之后,所述方法还包括;3. The method according to claim 1 or 2, characterized in that the first shooting parameter comprises a shooting parameter of the camera application in a preview state corresponding to the first shooting mode, and after the electronic device obtains the first configuration file, the method further comprises: 所述电子设备获取第二拍摄参数,所述第二拍摄参数包括所述相机应用在所述第一拍摄模式对应的拍摄状态下的拍摄参数;The electronic device acquires a second shooting parameter, where the second shooting parameter includes a shooting parameter of the camera application in a 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. 4.根据权利要求3所述的方法,其特征在于,所述方法还包括;4. The method according to claim 3, characterized in that the method further comprises: 所述电子设备接收用户针对相机应用中快门键的第二操作;The electronic device receives a second operation of a user on a shutter key in a 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. 5.根据权利要求3或4所述的方法,其特征在于,所述第二图片分辨率大于所述第一图片分辨率。5. The method according to claim 3 or 4, characterized in that the second image resolution is greater than the first image resolution. 6.根据权利要求1-5任一项所述的方法,其特征在于,所述第一操作包括以下任意一项或多项:改变所述相机应用的拍摄模式、改变所述电子设备的显示屏状态、改变摄像头类型、改变图片比例。6. The method according to any one of claims 1-5 is 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, and changing the image ratio. 7.根据权利要求2所述的方法,其特征在于,在所述电子设备接收并响应用户针对相机应用的第一操作之前,所述方法还包括:7. The method according to claim 2, characterized in that before the electronic device receives and responds to the first operation of the user on the camera application, the method further comprises: 所述电子设备从所述相机应用的运行内存中获取所述第一配置文件;The electronic device obtains the first configuration file from the running memory of the camera application; 所述电子设备获取第三拍摄参数,并基于所述第三拍摄参数从所述第一配置文件中获取第三图片分辨率;The electronic device acquires a third shooting parameter, and acquires a third picture resolution from the first configuration file based on the third shooting parameter; 所述电子设备通过所述相机应用以所述第三图片分辨率采集第三图像;The electronic device acquires a third image at the third picture resolution through the camera application; 所述电子设备在所述相机应用内显示所述第三图像。The electronic device displays the third image within the camera application. 8.根据权利要求7所述的方法,其特征在于,所述第三拍摄参数包括所述相机应用在默认拍摄模式对应的预览状态下的拍摄参数;所述方法还包括;8. The method according to claim 7, characterized in that the third shooting parameter comprises a shooting parameter of the camera application in a preview state corresponding to a default shooting mode; the method further comprises: 所述电子设备获取第四拍摄参数,所述第四拍摄参数包括所述相机应用在所述默认拍摄模式对应的拍摄状态下的拍摄参数;The electronic device acquires a fourth shooting parameter, where the fourth shooting parameter includes a shooting parameter of the camera application in a 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.根据权利要求1-8任一项所述的方法,其特征在于,所述电子设备周期性/不定时地从服务器获取第二配置文件,所述第二配置文件与所述第一配置文件部分不同或者完全不同。9. The method according to any one of claims 1 to 8, characterized in that the electronic device periodically/irregularly obtains a second configuration file from the server, and the second configuration file is partially different from or completely different from the first configuration file. 10.根据权利要求1-9任一项所述的方法,其特征在于,拍摄参数包括以下任意一项或多项:拍摄状态、拍摄模式、设备显示屏状态、摄像头类型、图片比例。10. The method according to any one of claims 1-9 is characterized in that the shooting parameters include any one or more of the following: shooting status, shooting mode, device display status, camera type, and image ratio. 11.一种电子设备,其特征在于,所述电子设备包括摄像头、存储器、处理器;其中,所述摄像头、所述存储器和所述处理器耦合,所述存储器用于存储计算机程序,当所述处理器执行调用所述计算机程序,使得所述电子设备执行权利要求1-10中任一项所述的方法。11. An electronic device, characterized in that the electronic device comprises a camera, a memory, and a processor; wherein the camera, the memory, and the processor are coupled, the memory is used to store a computer program, and when the processor executes and calls the computer program, the electronic device executes the method described in any one of claims 1 to 10. 12.一种计算机可读存储介质,包括指令,其特征在于,当所述指令在电子设备上运行,使得所述电子设备执行权利要求1-10中任一项所述的方法。12. A computer-readable storage medium, comprising instructions, wherein when the instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 10.
CN202311641422.2A 2023-11-30 2023-11-30 Picture resolution configuration method, electronic equipment and storage medium Pending CN120075601A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202311641422.2A CN120075601A (en) 2023-11-30 2023-11-30 Picture resolution configuration method, electronic equipment and storage medium
PCT/CN2024/135397 WO2025113590A1 (en) 2023-11-30 2024-11-28 Picture resolution configuration method, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311641422.2A CN120075601A (en) 2023-11-30 2023-11-30 Picture resolution configuration method, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN120075601A true CN120075601A (en) 2025-05-30

Family

ID=95790583

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311641422.2A Pending CN120075601A (en) 2023-11-30 2023-11-30 Picture resolution configuration method, electronic equipment and storage medium

Country Status (2)

Country Link
CN (1) CN120075601A (en)
WO (1) WO2025113590A1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104184895A (en) * 2014-08-22 2014-12-03 Tcl通讯(宁波)有限公司 Photographing module output image resolution control method and mobile terminal
CN111212227A (en) * 2020-01-13 2020-05-29 广州视源电子科技股份有限公司 Configuration method, device, device and storage medium for camera recording resolution

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014007454A (en) * 2012-06-21 2014-01-16 Nikon Corp Image pickup device and image pickup method
CN111213363A (en) * 2017-10-13 2020-05-29 深圳传音通讯有限公司 Terminal photographing control method, mobile terminal and readable storage medium
CN114727004A (en) * 2021-01-05 2022-07-08 北京小米移动软件有限公司 Image acquisition method and device, electronic device, storage medium
CN116074623B (en) * 2022-05-30 2023-11-28 荣耀终端有限公司 Resolution selecting method and device for camera
CN116668866B (en) * 2022-11-21 2024-04-19 荣耀终端有限公司 Image processing method and electronic equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104184895A (en) * 2014-08-22 2014-12-03 Tcl通讯(宁波)有限公司 Photographing module output image resolution control method and mobile terminal
CN111212227A (en) * 2020-01-13 2020-05-29 广州视源电子科技股份有限公司 Configuration method, device, device and storage medium for camera recording resolution

Also Published As

Publication number Publication date
WO2025113590A1 (en) 2025-06-05

Similar Documents

Publication Publication Date Title
US11669242B2 (en) Screenshot method and electronic device
WO2020073959A1 (en) Image capturing method, and electronic device
CN112887583B (en) Shooting method and electronic equipment
WO2022262475A1 (en) Image capture method, graphical user interface, and electronic device
WO2021129198A1 (en) Method for photography in long-focal-length scenario, and terminal
WO2021093793A1 (en) Capturing method and electronic device
CN117014567A (en) A display method and related device for video calls applied to electronic equipment
CN115967851B (en) Fast photographing method, electronic device and computer-readable storage medium
CN114679538A (en) A shooting method and terminal
CN114115770B (en) Display control method and related device
CN117857920B (en) Focusing method and electronic device
WO2024078275A1 (en) Image processing method and apparatus, electronic device and storage medium
WO2023160224A9 (en) Photographing method and related device
CN112532508B (en) Video communication method and video communication device
CN114466101A (en) Display method and electronic equipment
CN117692693B (en) Multi-screen display method, device, program product and storage medium
WO2024088074A1 (en) Method for photographing moon and electronic device
CN118689424A (en) Data sharing method and electronic device
CN120075601A (en) Picture resolution configuration method, electronic equipment and storage medium
CN118552452A (en) Method for removing moire and related device
CN116709018B (en) Zoom bar segmentation method and electronic device
CN118626182B (en) Method for switching applications, and electronic device
CN117729420B (en) Continuous shooting method and electronic equipment
CN120343135A (en) Application management method, electronic device and storage medium
CN120128790A (en) A camera request processing method and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination