Photographing method, electronic device, and readable storage medium

By determining the focal length and lens initialization status in electronic devices and updating the zoom control using a resolution mapping table, the issue of inconsistent interface prompts and actual resolution during focal length switching was resolved, thus improving the user experience.

CN116419067BActive Publication Date: 2025-11-18HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111650060.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-30
Publication Date
2025-11-18
Estimated Expiration
2041-12-30

AI Technical Summary

Technical Problem

When switching from JPG mode to JPG-L mode in professional mode, the resolution information displayed on the interface is inconsistent with the actual resolution of the captured image, resulting in a degraded user experience.

Method used

By receiving user input from electronic devices, the initialization status of the focal length lens is determined, ensuring that the zoom control display matches the actual resolution. A resolution mapping table is used to quickly look up the lens type and focal length, and the zoom control is updated to match the correct focal length and resolution, ensuring consistency between the interface display and image resolution during focal length switching.

Benefits of technology

Maintaining consistency between the displayed prompts and image resolution during focus switching improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116419067B_ABST
    Figure CN116419067B_ABST
Patent Text Reader

Abstract

The application provides a shooting method, an electronic device and a computer readable storage medium, and belongs to the technical field of electronic devices. The method comprises the following steps: when receiving a quick switching operation of a user for a resolution inconsistent scene, the electronic device displays the resolution that can be obtained on a display screen, updates a zoom control according to the resolution, and acquires an image by using a lens corresponding to the resolution. Therefore, when the user performs the quick switching operation for the resolution inconsistent scene, the prompt information displayed on the interface can be ensured, the magnification of the zoom bar and the resolution of the output image are consistent, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of electronics, and in particular to a photographing method, an electronic device and a readable storage medium. BACKGROUND

[0002] With the continuous development of terminal products, terminal users have higher requirements for the software and hardware of terminal products. Especially, there is a harsh demand and experience for the camera of the terminal product to have high-definition photographing capability.

[0003] At present, many terminal products are no longer limited to only having a main camera lens (for example, a focal length of 50mm), but more and more terminal products can have two or more lenses with different focal lengths. For example, a terminal product can have a main camera lens and a long-focus lens (a focal length greater than 50mm) or a wide-angle lens (a focal length less than 50mm), or it can have all three lenses. Moreover, these lenses can have at least two resolutions in professional mode, such as JPG (default resolution) and JPG-L (ultra-high-definition resolution) modes. At present, when switching from JPG to JPG-L mode in professional mode, the interface will prompt the high-definition resolution in JPG mode, for example, resolution 1. However, the actual resolution of the photographed picture can be resolution 2. Therefore, the inconsistency between the resolution 2 of the image and the high-definition resolution 1 prompted by the interface seen by the user greatly reduces the user experience. SUMMARY

[0004] Therefore, the present application provides a photographing method and an electronic device and a computer readable storage medium to solve the problem that the resolution information prompted by the interface is inconsistent with the resolution of the actual photographed picture when switching from JPG to JPG-L mode in professional mode.

[0005] Some embodiments of the present application provide a photographing method. The following aspects of the present application are introduced from multiple aspects, and the embodiments and advantages of the following aspects can be mutually referenced.

[0006] In a first aspect, the present application provides a photographing method applied to an electronic device, the electronic device comprising at least a first focal length lens and a second focal length lens, the method comprising: the electronic device receiving a first operation of entering a first photographing mode; in response to the first operation, the electronic device displaying a first photographing interface, the first photographing interface comprising a zoom control and a first photographing picture obtained by using the first focal length lens; in the first photographing mode, the electronic device receiving a zoom operation of adjusting the zoom control from a first focal length to a second focal length; in response to the zoom operation, the electronic device initializing the second focal length lens to complete switching from the first focal length lens to the second focal length lens; before the second focal length lens completes the initialization, the electronic device receiving a second operation of entering a second photographing mode; in response to the second operation, the electronic device updating the zoom control to the first focal length and continuing to use the first focal length lens for photographing.

[0007] According to the method of the present application, when a user performs a fast switching operation on a resolution inconsistent scene, the resolution that can be obtained is displayed on the display screen, the zoom control is updated according to the resolution, and an image is obtained using a lens corresponding to the resolution. Thus, when the user performs the fast switching operation on the resolution inconsistent scene, the prompt information displayed on the interface, the magnification of the zoom bar and the resolution of the output image are consistent, and the user experience is improved.

[0008] In a possible implementation of the first aspect, the first focal length lens and the second focal length lens correspond to a first resolution and a second resolution respectively in the second photographing mode, the first resolution being different from the second resolution,

[0009] In response to the second operation, the electronic device further comprises: the electronic device displaying a second photographing interface, the second photographing interface comprising prompt information of the first resolution. The first resolution corresponds to the first focal length on the zoom control, so that the zoom control and the first resolution in the prompt information displayed are consistent.

[0010] In a possible implementation of the first aspect, in response to the second operation, the electronic device further comprises: the electronic device judging whether the initialization of the second focal length lens is completed, wherein the initialization of the second focal length lens being completed means that, from the electronic device performing the zoom operation to the second resolution corresponding to the second focal length lens being input to a preset position; and the electronic device updating the zoom control to the first focal length and continuing to use the first focal length lens for photographing comprises: if the initialization of the second focal length lens is not completed, the electronic device updates the zoom control to the first focal length and continues to use the first focal length lens for photographing.

[0011] The preset position can be a process space of the camera application, and is used to store data associated with the camera. For example, the data includes resolution corresponding to the lens, lens type, focal length, and the like. The camera application can obtain the associated data from the preset position, and adjust the zoom control. When the preset position has a second resolution corresponding to a second focal length lens, it indicates that the initialization of the second focal length lens is completed. When the preset position does not have a second resolution corresponding to a second lens, it indicates that the initialization of the second focal length lens is not completed.

[0012] In a possible implementation of the first aspect, the updating, by the electronic device, of the zoom control to the first focal length includes: obtaining, by the electronic device, the first resolution from the preset position, determining the first focal length, and updating the zoom control to the first focal length. The first resolution is ensured to correspond to the focal length on the zoom control.

[0013] In a possible implementation of the first aspect, the obtaining, by the electronic device, of the first resolution from the preset position and the determining, by the electronic device, of the first focal length include: obtaining, by the electronic device, the first resolution from the preset position, and determining, by the electronic device, the first focal length corresponding to the first resolution according to a resolution mapping table. The resolution mapping table at least includes lens types corresponding to focal lengths, and resolutions corresponding to each type of lens. The resolution mapping table facilitates quick searching of lens types corresponding to resolutions and focal lengths.

[0014] In a possible implementation of the first aspect, the obtaining, by the electronic device, of the first resolution from the preset position and the determining, by the electronic device, of the first focal length corresponding to the first resolution according to a resolution mapping table include: comparing, by the electronic device, the first resolution with resolutions in the resolution mapping table; and when the electronic device determines that there is a resolution in the resolution mapping table that matches the first resolution, obtaining, by the electronic device, the first focal length corresponding to the first resolution.

[0015] In a possible implementation of the first aspect, when the electronic device determines that there is no resolution in the resolution mapping table that matches the first resolution, the method further includes: reinitializing, by the electronic device, the resolution mapping table until there is a resolution in the resolution mapping table that matches the first resolution. The resolution mapping table is ensured to be valid.

[0016] In a possible implementation of the first aspect, the resolution mapping table is obtained by initializing all lens data when the resolution mapping table is used for the first time by the electronic device. Thus, the resolution mapping table is obtained when needed, and space is avoided from being occupied when not needed.

[0017] In a possible implementation of the first aspect, the obtaining, by the electronic device, of the first resolution from the preset position includes: obtaining, by the electronic device, prompt information containing the first resolution from the preset position; and parsing, by the electronic device, the prompt information, and obtaining the first resolution from the parsed prompt information.

[0018] In a possible implementation of the first aspect, the electronic device parses the prompt information, and obtains the first resolution from the parsed prompt information, including: the electronic device parses the prompt information through the information parser, and obtains the first resolution from the parsed prompt information.

[0019] In a possible implementation of the first aspect, the electronic device obtains the first resolution from the preset position, determines the first focal length, and updates the zoom control to the first focal length, including: the electronic device sends the first resolution to the zoom logic processing module through the information parser; the electronic device determines the first focal length corresponding to the first resolution according to the resolution mapping table through the zoom logic processing module.

[0020] In a possible implementation of the first aspect, in response to the second operation, the electronic device updates the zoom control to the first focal length, and continues to use the first focal length lens for shooting, including: the electronic device receives the shooting operation, and the electronic device calls the first focal length lens for shooting to obtain an image / video corresponding to the first focal length of the zoom control.

[0021] In a possible implementation of the first aspect, the zoom control is provided with magnifications corresponding to the first focal length lens and the second focal length lens, and the zoom operation is to adjust the pointer on the zoom control from the magnification corresponding to the first focal length lens to the magnification corresponding to the second focal length lens.

[0022] In a possible implementation of the first aspect, when the electronic device confirms that the initialization of the second focal length lens is completed, the method further includes: the electronic device obtains the second resolution from the preset position, so that the second shooting interface includes prompt information of the second resolution, and uses the second focal length lens for shooting.

[0023] In a possible implementation of the first aspect, the first shooting mode is a professional mode, and the second shooting mode is an ultra-clear shooting mode.

[0024] In a possible implementation of the first aspect, the first focal length lens is a main camera lens with a standard focal length, and the second focal length lens is a long focal length lens with a focal length greater than the standard focal length or a wide-angle lens with a focal length less than the standard focal length.

[0025] In a possible implementation of the first aspect, the first resolution is 50MP or 64MP, and the second resolution is 50MP or 64MP.

[0026] In a second aspect, the present application provides an electronic device, which comprises at least a first focal length lens, a second focal length lens, a processor and a display. The processor is configured to receive a first operation for entering a first shooting mode, and in response to the first operation, cause the display to display a first shooting interface. The first shooting interface comprises a zoom control and a first shooting picture obtained by using the first focal length lens. In the first shooting mode, the processor is configured to receive a zoom operation for adjusting the zoom control from a first focal length to a second focal length, and in response to the zoom operation, initialize the second focal length lens to complete switching from the first focal length lens to the second focal length lens. Before the second focal length lens completes the initialization, the processor receives a second operation for entering a second shooting mode, and in response to the second operation, the processor is configured to update the zoom control to the first focal length and continue shooting by using the first focal length lens.

[0027] According to the electronic device provided in the embodiments of the present application, when a user performs a fast switching operation for a resolution inconsistent scene, the resolution that can be obtained is displayed on the display, the zoom control is updated according to the resolution, and an image is obtained by using a lens corresponding to the resolution. Therefore, when the user performs the fast switching operation for the resolution inconsistent scene, the prompt information displayed on the interface can be ensured, the magnification of the zoom bar and the resolution of the output image are consistent, and the user experience is improved.

[0028] In a possible implementation of the second aspect, the first focal length lens and the second focal length lens correspond to a first resolution and a second resolution respectively in the second shooting mode, and the first resolution is different from the second resolution.

[0029] The processor is further configured to, in response to the second operation, cause the display to display a second shooting interface, and the second shooting interface comprises prompt information of the first resolution. The first resolution corresponds to the first focal length on the zoom control, so that the zoom control is consistent with the first resolution in the prompt information displayed.

[0030] In a possible implementation of the second aspect, the processor is configured to, in response to the second operation, determine whether the initialization of the second focal length lens is completed. The initialization of the second focal length lens is completed when the second resolution corresponding to the second focal length lens is input to a preset position from the time when the processor performs the zoom operation. The processor updates the zoom control to the first focal length and continues shooting by using the first focal length lens, which includes: if the initialization of the second focal length lens is not completed, the processor updates the zoom control to the first focal length and continues shooting by using the first focal length lens.

[0031] In a possible implementation of the second aspect, the processor is configured to obtain the first resolution from the preset position, determine the first focal length, and update the zoom control to the first focal length. The first resolution and the focal length on the zoom control are ensured to correspond to each other.

[0032] In a possible implementation of the second aspect, the processor is configured to obtain the first resolution from a preset location, and determine the first focal length corresponding to the first resolution according to a resolution mapping table, the resolution mapping table including at least a lens type corresponding to the focal length, and a resolution corresponding to each type of lens. The resolution mapping table facilitates quick lookup of the lens type corresponding to the resolution and the focal length.

[0033] In a possible implementation of the second aspect, the processor is configured to compare the first resolution with resolutions in the resolution mapping table, and obtain the first focal length corresponding to the first resolution when the processor determines that there is a resolution in the resolution mapping table that matches the first resolution.

[0034] In a possible implementation of the second aspect, when the processor determines that there is no resolution in the resolution mapping table that matches the first resolution, the electronic device is further configured to re-initialize the resolution mapping table until there is a resolution in the resolution mapping table that matches the first resolution. This process can ensure that the resolution mapping table is valid.

[0035] In a possible implementation of the second aspect, the resolution mapping table is obtained by initializing all lens data when the resolution mapping table is used for the first time by the processor. Thus, the resolution mapping table is obtained when needed, and space is avoided when not needed.

[0036] In a possible implementation of the second aspect, the processor is configured to obtain prompt information containing the first resolution from a preset location, and parse the prompt information and obtain the first resolution from the parsed prompt information.

[0037] In a possible implementation of the second aspect, the processor is configured to obtain prompt information containing the first resolution from a preset location by using an information parser, the information parser parses the prompt information and obtains the first resolution from the parsed prompt information.

[0038] In a possible implementation of the second aspect, the processor is configured to send the first resolution to a zoom logic processing module by using the information parser, and determine the first focal length corresponding to the first resolution according to the resolution mapping table by using the zoom logic processing module.

[0039] In a possible implementation of the second aspect, the processor receives a shooting operation, and is configured to call the first focal length lens to shoot to obtain an image / video corresponding to the first focal length of the zoom control.

[0040] In a possible implementation of the second aspect, the zoom control is provided with magnifications corresponding to the first focal length lens and the second focal length lens, and the zoom operation is to adjust a pointer on the zoom control from the magnification corresponding to the first focal length lens to the magnification corresponding to the second focal length lens.

[0041] In a possible implementation of the second aspect, when the processor confirms that the initialization of the second focal length lens is completed, the method further includes: obtaining, by the processor, the second resolution from a preset position, displaying, on the second shooting interface, prompt information about the second resolution, and performing shooting by using the second focal length lens.

[0042] In a possible implementation of the second aspect, the first shooting mode is a professional mode, and the second shooting mode is an ultra-clear shooting mode.

[0043] In a possible implementation of the second aspect, the first focal length lens is a main camera lens with a standard focal length, and the second focal length lens is a telephoto lens with a focal length greater than the standard focal length or a wide-angle lens with a focal length less than the standard focal length.

[0044] In a possible implementation of the second aspect, the first resolution is 50 MP or 64 MP, and the second resolution is 50 MP or 64 MP.

[0045] In a third aspect, the present application provides a computer readable storage medium, which stores a computer program. When the computer program runs on an electronic device, the electronic device executes the method in the first aspect.

[0046] In a fourth aspect, the present application discloses a computer program product containing instructions, which, when running on a computer, causes the computer to execute the method in the first aspect. BRIEF DESCRIPTION OF DRAWINGS

[0047] Figure 1 A scene diagram of a user using a mobile phone to shoot an image according to an embodiment of the present application;

[0048] Figure 2 An interface operation diagram of switching a shooting mode of a mobile phone in a professional mode according to an embodiment of the present application;

[0049] Figure 3 A diagram of switching a shooting mode of a mobile phone according to an embodiment of the present application; Figure 2 An interface diagram of obtaining a resolution of an image after operation according to an embodiment of the present application;

[0050] Figure 4 A module diagram of data flow in a mobile phone when shooting an image according to an embodiment of the present application;

[0051] Figure 5 A structural diagram of an electronic device according to an embodiment of the present application;

[0052] Figure 6 Flow chart of a photographing method according to an embodiment of the present application;

[0053] Figure 7 Interface operation schematic diagram according to an embodiment of the present application;

[0054] Figure 8 Operation interface schematic diagram of a mobile phone photographing image according to an embodiment of the present application;

[0055] Figure 9 Mobile phone internal data flow module schematic diagram according to an embodiment of the present application;

[0056] Figure 10 Structure diagram of an out-of-picture lens and a super-clear resolution mapping table according to an embodiment of the present application;

[0057] Figure 11 Schematic diagram of a photographing device structure according to an embodiment of the present application;

[0058] Figure 12 Block diagram of a system-on-a-chip according to some embodiments of the present application. DETAILED DESCRIPTION

[0059] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application.

[0060] In order to facilitate the understanding of the technical solutions of the present application, the names appearing in the present application will be explained first.

[0061] JPG mode refers to a photographing mode in which a default resolution corresponding to a currently selected lens is selected when a professional mode in a camera application is opened. For example, the resolution of 3072*4096 pixels can be used for preview or photographing in the JPG mode, and the photographing or preview resolution in the JPG mode is lower than that in the JPG-L mode.

[0062] JPG-L mode refers to a mode in which the resolution of a photographed image is higher than that in the JPG mode, and is referred to as super-clear resolution. For example, the resolution is 50MP (such as 8192*6144 pixels), or the resolution is 64MP (such as 9216*6912 pixels).

[0063] Reference Figure 1 , Figure 1 An exemplary scene diagram in which a user uses a mobile phone to take a photograph according to an embodiment of the present application is shown. The scene diagram includes a mobile phone 10 having a photographing function and a user 20. The user 20 uses the mobile phone 10 to photograph a scene in front of the user. The mobile phone has a main camera lens, a long-focus lens, and a wide-angle lens.

[0064] In the professional mode, further divided into JPG mode and JPG-L mode. In the following examples, with the main camera lens in the JPG-L mode corresponding to the ultra-clear resolution of 50MP, long focal length and wide-angle lens in the JPG-L mode corresponding to the ultra-clear resolution of 64MP as an example to illustrate.

[0065] As Figure 1 The phone can enter the professional mode of the camera APP in response to the user's operation. At this time, the phone can display the phone interface 11 of the professional mode in JPG mode by default. The user can switch between the three lenses (i.e. the main camera lens, the long focal length lens and the wide-angle lens) through the zoom control 11b on the phone interface 11, such as the zoom bar. For example, different magnifications are provided on the zoom control, such as magnifications below 1X corresponding to the wide-angle lens, 1X-3.5X (not including 3.5X) corresponding to the main camera lens, and 3.5X or more corresponding to the long focal length lens. The user can determine the image to be photographed by adjusting the magnification on the zoom bar. In some embodiments, other magnifications corresponding to lenses of different focal lengths can also be used, which is not limited here.

[0066] When the user opens the professional mode of the camera application, the user can switch between the JPG mode and the JPG-L mode in the professional mode by adjusting the magnification on the zoom control 11b. As Figure 1 As shown, when the user switches from the JPG mode to the JPG-L mode, the phone 10 responds to the user's switching operation and prompts the ultra-clear resolution corresponding to the currently used lens in the JPG-L mode in the information prompt box 11a of the interface 11, such as 50MP. The user can know through the information prompt box 11a that the ultra-clear resolution corresponding to the current shooting mode is 50MP. Therefore, the user can obtain the ideal image by adjusting the magnification on the zoom control and / or switching the shooting mode as needed.

[0067] It should be noted that the magnifications of 0.5X, 1X, 3.5X, etc. are examples, and other magnification values can be used according to different phone models. In the following examples, the zoom bar on the shooting interface of the phone has three magnifications of 0.5X, 1.0X and 3.5X, and the magnification of 0.5X corresponds to the wide-angle lens, the magnification of 1.0X corresponds to the main camera lens, and the magnification of 3.5X corresponds to the long focal length lens.

[0068] The technical problems of the embodiments of the present application are described in combination with the scenarios described in Figure 1

[0069] Reference is made to Figure 2 , Figure 2 The schematic diagram of the phone switching the shooting mode in the professional mode is shown. As Figure 2 ​As shown in (a) of FIG. 21, interface 21 is an interface diagram of the mobile phone entering the professional mode after opening the camera APP. Interface 21 is provided with an information prompt box 21a and a zoom bar 21b.

[0070] Generally, when entering the professional mode, the information prompt box 21a will briefly prompt the default JPG mode. For example, after entering the professional mode or switching the lens, an information prompt box will pop up and display the prompt information of "default JPG start" for 1 second, indicating that the current mode is the default normal resolution shooting mode.

[0071] The zoom bar 21b is provided with 0.5X, 1.0X and 3.5X magnifications. When the user switches the main camera lens (corresponding to 1.0X magnification) to the telephoto lens (corresponding to 3.5X magnification) through the zoom bar 21b, the interface 22 shown in (b) of FIG. 22 is entered, and the magnification on the zoom bar is from 1.0X to 3.5X. If the user wants to switch to the JPG-L mode, i.e., switch to the super clear resolution shooting mode, the user can click the JPG function key on the interface 22, and the mobile phone will enter the interface for switching the mode, such as the interface 23 shown in (c) of FIG. 23. Figure 2 Figure 2 The interface 23 includes the JPG mode and the JPG-L mode, and the user can further select the shooting mode by clicking the JPG and JPG-L function keys. When the user clicks the JPG-L mode, the interface 23 switches to the interface 24 as shown in (d) of FIG. 24. The information prompt box 21a will pop up again on the interface 24, and the super clear resolution "50MP JPG start" is displayed in the information prompt box. The zoom bar corresponds to 3.5X magnification, indicating that the switched lens is the telephoto lens. However, the super clear resolution corresponding to the telephoto lens should be 64MP. Figure 2 That is to say, although the user sees that the zoom bar is switched to 3.5X (corresponding to the telephoto lens), the main camera lens in the mobile phone has not been switched to the telephoto lens due to the rapid clicking of the JPG-L by the user, so that the mobile phone is actually still using the main camera lens for shooting. Therefore, the prompt is still the 50MP corresponding to the main camera lens. At this time, the mobile phone still displays the 50MP corresponding to the main camera lens in the prompt box 21a, and the resolution of the image actually obtained by the mobile phone is also 50MP.

[0072] In some embodiments, the JPG mode and the JPG-L mode can be directly set on the shooting interface of the professional mode, i.e., without the operation of (b) of FIG. 21, which is not limited here.

[0073] Figure 2 As shown in (a) of FIG. 25,

[0074] As shown in (a) of FIG. 25, Figure 3 Figure 3 shows the interface diagram of the resolution of the image obtained after the operation of Figure 2 in combination with (b) of FIG. 25.​​​Figure 2 As shown, after the user clicks the capture button on interface 24 to acquire an image, they can view the image resolution. Figure 3 As shown in interface 25, the resolution information bar 25a displays 64MP, or "9216×6912" pixels. This means the actual image resolution of 64MP is inconsistent with the 50MP indicated in the information prompt box 21a, thus reducing the user's shooting experience.

[0075] The technical problems mentioned above will be analyzed in the context of the mobile phone's software structure.

[0076] A mobile phone can employ a layered architecture, dividing its software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, the hardware abstraction layer, and the kernel layer. In other embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

[0077] refer to Figure 4 , Figure 4 This diagram illustrates the data flow of each module in the mobile phone when capturing an existing image. Figure 4 As shown, the software architecture of a mobile phone includes an application layer, an application framework layer, and a hardware abstraction layer. The specific implementation processes of the kernel layer (not shown) and the application framework layer can be found in existing technologies and are not described in detail here.

[0078] like Figure 4 As shown, the phone's application layer includes a camera app and a gallery app. Users can access the shooting interface through the camera app and perform logical operations during the shooting process through various modules within the camera app. Images are accessed from the gallery through the gallery app.

[0079] The hardware abstraction layer is an interface layer located between the operating system kernel and the hardware circuitry. It is used to abstract the hardware and provide a virtual hardware platform for the operating system.

[0080] like Figure 4 As shown in the embodiments of this application, the hardware abstraction layer may include virtual hardware such as a capability manager, a preview callback, and a shooting callback.

[0081] The Capability Manager user reports hardware information from electronic devices up the hierarchy to the application layer. For example, it reports the resolution (including ultra-high definition resolution) of the telephoto lens, main camera lens, and wide-angle lens of the electronic device to the application layer.

[0082] The preview callback is used to update the lens sensor type information used in the current mode to the application in real time, and to pass the information to the kernel layer driver to drive the corresponding lens.

[0083] The shooting callback is used to call the corresponding thumbnail of the picture shot by the lens to the camera application, and output the real picture from the database to the camera application.

[0084] The hardware layer includes long-focus lens, wide-angle lens, main camera lens, and database (such as memory card) as a hardware structure.

[0085] In combination Figure 2 , step 1, corresponding to (a) in Figure 2 , when the user opens the camera application, the user clicks the professional mode, and the phone enters the professional shooting mode. The interface of the phone can be interface 21 as shown in (a) in Figure 2 . The control flow of each module in the phone corresponding to this operation step is: the hardware abstraction layer of the phone first reports the information of different lenses (sensors) to the camera application through the capability manager (capability reporting channel), wherein the information of the lenses (sensors) includes the types of the long-focus lens, the main camera lens, and the wide-angle lens, such as types 01, 02, and 03, and the super-clear resolution corresponding to each lens. In this application, the phone described in Figure 1 scene is taken as an example, that is, the super-clear resolution of the main camera lens is 50MP, and the super-clear resolution of the long-focus lens and the wide-angle lens is 64MP. The data flow is that after entering the professional shooting mode, the corresponding lens (such as the main camera) in the hardware layer reports the collected image data to the hardware abstraction layer, which is displayed by the camera application in the application program layer one layer after another, so that the user can see the shot image.

[0086] Step 2, corresponding to (b) in Figure 2 , when the user slides the zoom bar in the JPG mode of the professional mode, as shown in (b) in Figure 2 , from 1X magnification to 3.5X magnification, that is, switching the main camera lens to the long-focus lens. As shown in Figure 4 , at this time, the hardware abstraction layer can update the sensor type information (long-focus lens) used in the current JPG mode in real time through the preview function in the preview callback, and report the updated sensor type to the camera application. The camera application updates the type corresponding to the long-focus lens to process space 2, and the zoom logic processing module inputs the resolution corresponding to the long-focus lens to process space 1.

[0087] Step 3, corresponding to Figure 2C) and (D). When detecting that the user switches from the JPG mode to the JPG-L mode, the prompt logic processing module reads the super-clear resolution corresponding to the telephoto lens from the process space 1, and sends the read super-clear resolution corresponding to the telephoto lens to the prompt display layer, and displays the super-clear resolution on the interface to prompt the user.

[0088] Step 4, corresponding to Figure 3 After detecting that the user clicks to take a picture, the hardware abstraction layer is triggered to obtain the image (real picture) and the thumbnail corresponding to the image. The camera application is transmitted to the thumbnail icon by the shooting callback of the hardware abstraction layer, and the thumbnail icon is acquired by the thumbnail logic processing module of the camera application and input to the thumbnail display layer. The thumbnail display layer displays the thumbnail icon in the interface. The image (real picture) is input into the database through the shooting callback. The user can view the resolution corresponding to the image by clicking the thumbnail icon in the camera application or calling the image in the database from the gallery application. As shown in Figure 3 , the user clicks the view details and other functions of the image, and the image resolution and other information are displayed on the interface. When the above steps 1-4 are executed, the resolution in the prompt information and the resolution of the actual image are consistent.

[0089] However, when the telephoto lens initialization in step 2 is not completed (that is, the hardware abstraction layer has not reported the information of the telephoto lens to the camera application), the user performs step 3 to switch the JPG to the JPG-L mode. At this time, the prompt logic processing module performs the operation of switching the JPG to the JPG-L to obtain the resolution for display. Since the super-clear resolution of the main camera lens (50MP) is still stored in the process space 1 at this time, the super-clear resolution of the telephoto lens after switching in step 2 is not obtained, and therefore the prompt logic processing module sends the super-clear resolution of the main camera lens (50MP) to the prompt display layer for display. In step 4, after the user takes a picture, since the hardware abstraction layer has performed step 2, the super-clear resolution (64MP) of the picture obtained by the telephoto lens is used, and the corresponding zoom bar is also the 3.5X magnification corresponding to the telephoto lens. Therefore, the resolution 50MP of the prompt information seen by the user and the magnification corresponding to the zoom bar are inconsistent with the resolution on the image, which reduces the user experience.

[0090] To solve the above technical problems, the embodiment of the present application provides a shooting method.

[0091] The shooting method of the embodiment of the present application is described below with reference to the accompanying drawings.

[0092] Combined with Figure 1 and Figure 2When the user switches the main camera lens (corresponding to 1.0X magnification) to the long-focus lens (corresponding to 3.5X magnification) through the zoom control, the phone performs the corresponding switching operation. For example, first, the phone can confirm whether the user has switched the JPG mode to the JPG-L mode. If yes, the phone confirms whether the initialization of the current long-focus lens is completed (i.e., whether the super-definition resolution corresponding to the long-focus lens has been delivered to the preset position of the camera application, for example, a process space of the camera application) in response to the operation of switching the JPG mode to the JPG-L mode.

[0093] If the initialization is not completed (i.e., there is no super-definition resolution corresponding to the long-focus lens in the preset position), at this time, the phone obtains the super-definition resolution corresponding to the main camera lens, for example, 50MP, from the preset position, and displays 50MP on the display screen. At the same time, the phone can change 3.5X magnification (corresponding to the long-focus lens) on the zoom bar to 1X magnification (corresponding to the main camera lens).

[0094] In the above process, when the phone receives the operation of switching the JPG mode to the JPG-L mode, the phone will immediately perform the operation, and will no longer perform the operation of switching the main camera lens to the long-focus lens. Therefore, the phone still uses the main camera lens. Alternatively, if the phone has already switched the main camera lens to the long-focus lens, the phone needs to switch the long-focus lens to the main camera lens according to the updated magnification on the zoom bar. Thus, when the user clicks the shooting function key, the phone will continue to use the original main camera lens to shoot to obtain an image with the same resolution as the super-definition resolution of 50MP prompted on the display screen. In this way, after the user switches the magnification on the zoom bar, the JPG mode is quickly switched to the JPG-L mode again, and even if the updated lens is not initialized at this time, the phone can achieve consistency among the prompt information, the magnification on the zoom bar, and the resolution of the output image, thereby improving the user experience.

[0095] It should be noted that in the above embodiments, the phone is taken as an example with three lenses with different focal lengths. In some embodiments, only two lenses with different focal lengths or more lenses with different focal lengths can be used, and when the inconsistency occurs, the technical solutions of the present application can be used.

[0096] In addition, the above embodiments are described by switching the main camera lens to the long-focus lens. In other embodiments of the present application, the long-focus lens can also be switched to the main camera lens, or the main camera lens can be switched to the wide-angle lens, or the wide-angle lens can be switched to the main camera lens. In some embodiments, the super-definition resolution can also be other resolutions, and is not limited to 50MP or 64MP. The switching between the JPG mode and the JPG-L mode is not limited, and in some embodiments, other modes such as the RAW mode can also be switched. This is not a limitation on the present application.

[0097] Taking switching from JPG mode to RAW mode as an example, the resolution corresponding to each lens in RAW mode is different, for example, the resolution corresponding to the telephoto lens is 64MP, and the resolution corresponding to the main camera lens is 50MP. In the professional mode, after the user switches from the telephoto lens (3.5X) to the main camera lens (1X), the main camera lens initialization is not completed, and the user quickly switches from JPG mode to RAW mode. At this time, the mobile phone can only obtain the type of the telephoto lens from the preset position, obtain the 64MP corresponding to the telephoto lens according to the type of the telephoto lens, and display 64MP on the display screen. At the same time, the magnification on the zoom bar is updated according to the magnification corresponding to the type of the telephoto lens, that is, 1X is updated to 3.5X. At the same time, the mobile phone will continue to use the telephoto lens corresponding to 3.5X. When the user takes a picture, the telephoto lens is used to take a picture to obtain an image with a resolution of 64MP.

[0098] In the above embodiment, the mobile phone is taken as an electronic device for description. In some embodiments of the present application, the electronic device can also be a tablet computer, a notebook computer, an ultra-mobile personal computer, a personal digital assistant (PDA), or a wearable electronic device such as a watch, a bracelet, etc., which has the above-mentioned lenses, resolutions, etc.

[0099] The photographing method of the embodiments of the present application will be described below in combination with the specific structure of the electronic device.

[0100] Reference Figure 5 , Figure 5 The structure schematic diagram of the electronic device of the embodiments of the present application is shown, and the electronic device 100 can include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) joint 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 loudspeaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0101] Among them, the sensor module 180 can include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

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

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

[0104] The processor 110 can generate operation control signals according to instruction opcodes and timing signals, and complete the control of fetching instructions and executing instructions.

[0105] The memory in the processor 110 can also be provided for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can save instructions or data that the processor 110 has just used or repeatedly uses. If the processor 110 needs to use the instructions or data again, it can be directly called from the memory. Avoiding repeated access, reducing the waiting time of the processor 110, thus improving the efficiency of the system.

[0106] In an embodiment of the present application, the processor 110 can enter the professional mode in the camera application according to the operation of the user, and in the professional mode, the processor 110 can enter the JPG-L mode according to the switching operation of the user for JPG and JPG-L, and obtain the lens type currently used in the JPG-L mode, so as to obtain the super-resolution displayed on the display screen by the user, for example, 50MP, 64MP, etc.

[0107] In some embodiments, after the processor 110 receives the lens switching operation and then receives the switching operation of JPG and JPG-L, the processor 110 first confirms whether the initialization of the lens to be updated is completed, if not, the processor 110 obtains the super-resolution corresponding to the lens before updating in the JPG-L mode and sends it to the display screen, so that the display screen displays the super-resolution of the lens before updating. And the processor 110 obtains the corresponding lens according to the super-resolution displayed on the display screen, and updates the magnification on the zoom bar. At the same time, the lens before updating is still used for shooting. Thus, the prompt information is realized, the resolution corresponding to the position of the magnification on the zoom bar is consistent with the resolution of the out-of-picture image, and the user experience is improved.

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

[0109] The MIPI interface can be used to connect the processor 110 and the display screen 194, the camera 193 and other peripheral devices. The MIPI interface includes the camera serial interface (CSI), the display screen serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate through the CSI interface, after the processor confirms that the user switches the lens, the camera to be updated by the user is determined, and the camera is called, realizing the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface, realizing the display function of the electronic device 100. In some embodiments, the display recording information can be realized, for example, the recording information such as the recording time and / or the device name being recorded, etc.

[0110] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a limitation on the structure of the electronic device 100. In some other embodiments of the present application, the electronic device 100 can also use different interface connection modes or a combination of multiple interface connection modes in the above embodiments.

[0111] The wireless communication function of the electronic device 100 can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, the baseband processor, and the like.

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

[0113] The display screen 194 is used for displaying images, videos, and the like. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light emitting diode (QLED), and the like. In some embodiments, the electronic device 100 can include one or N display screens 194, and N is a positive integer greater than 1.

[0114] In some embodiments, the display screen 194 can display a shooting interface of a camera application, such as a shooting interface of a professional mode, a shooting interface corresponding to a JPG mode, a shooting interface corresponding to a JPG-L mode, and the like. In some embodiments, when the user switches from the shooting interface corresponding to the JPG mode to the shooting interface corresponding to the JPG-L mode, the display screen 194 can first display prompt information that the current used lens corresponds to an ultra-clear resolution. In addition, the zoom bar can be displayed in the above shooting interface, and the user can switch the lens by sliding the zoom bar on the display screen 194 and changing the magnification on the zoom bar.

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

[0116] The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and conversion into a visible image. The ISP can also optimize the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature, and other parameters of the shooting scene. In some embodiments, the ISP can be arranged in the camera 193.

[0117] The camera 193 is used to capture a still image or a video. An object generates an optical image through a lens and projects it onto a photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electric signal, and then transmits the electric signal to the ISP for conversion 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.

[0118] In some embodiments, the electronic device 100 can include one or N cameras 193, where N is a positive integer greater than 1. For example, two cameras or three cameras or four cameras can be provided.

[0119] In an embodiment of the present application, three cameras with different focal lengths can be provided, each having a different focal length, for example, a long-focus lens, a wide-angle lens, and a main camera lens, and these lenses can capture pictures of different resolution sizes in different modes.

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

[0121] The internal memory 121 can be used to store computer executable program codes including instructions. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, a shooting function, etc.), and the like. The data storage area can store relevant data information of the lenses possessed by the electronic device 100, such as a plurality of lenses and a high-definition resolution mapping table corresponding to each lens, and the like. In addition, the internal memory 121 can include a high-speed random access memory, and can also include a non-volatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like. The processor 110 executes various function applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121 and / or the instructions stored in the memory disposed in the processor.

[0122] The electronic device 100 can realize an audio function through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. For example, recording, etc.

[0123] The pressure sensor 180A is used to sense a pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194. In some embodiments, when a user clicks and presses a shooting function key on the display screen 194, the shooting function can be realized.

[0124] The touch sensor 180K is also referred to as a "touch device". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also referred to as a "touch screen". The touch sensor 180K is used to detect a touch operation acting on or near the touch sensor 180K. The touch sensor can transmit the detected touch operation to the application processor to determine the touch event type. The visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, which is different from the position where the display screen 194 is located.

[0125] In some embodiments, a user performs a sliding operation on the display screen 194, such as sliding a zoom bar, and the touch sensor 180 detects the touch operation and transmits the touch operation to the application processor. The application processor determines the change of the magnification on the zoom bar, and the processor 110 performs a switching operation of the lens.

[0126] The shooting method of the embodiments of the present application will be described in detail below in combination with specific drawings.

[0127] In the following examples, the method is applied to a mobile phone (electronic device) having functions as shown in Figure 1 , and can have a hardware structure and a software structure as shown in Figure 5 and Figure 4 .

[0128] Referring to Figure 6 , Figure 6 , a flowchart of a photographing method according to an embodiment of the present application is shown. The method is applied to the mobile phone described above in Figure 5 and Figure 4 . The following description is made with the mobile phone as the execution subject. As shown in Figure 6 , the flowchart includes S710-S790.

[0129] S710, a click operation (as a first operation) of a user for a professional mode in a camera application is received.

[0130] The professional mode mentioned in the present application refers to a specific photographing mode, in which the user can select a photographing mode of different resolution according to his / her own needs, for example, if the primary lens is currently used, in the professional mode, if the JPG mode is selected for photographing, a high-definition resolution image matching the primary lens can be obtained, which is usually below 50MP. If the JPG-L mode is selected for photographing, a super-definition resolution image matching the primary lens can be obtained, for example, the resolution can be 50MP. In addition, in some embodiments, a RAW photographing mode can also be provided to obtain a RAW format image file.

[0131] S720, in response to the click operation, a photographing interface in the professional mode is displayed on the display screen.

[0132] In the embodiment of the present application, the photographing interface can include a zoom control for switching the lens, and can also include a function key for the user to switch the photographing mode. For example, JPG function keys and JPG-L function keys can be included, and the user can switch the photographing mode by clicking these function keys. The photographing interface can refer to the interface 21 of (a) in Figure 2 .

[0133] In S730, an operation for lens switching is received. For example, the user slides the pointer position of the zoom bar from 1.0X to 3.5X, and the mobile phone judges that the user wants to switch the currently used primary lens to the telephoto lens according to the user's operation. The corresponding user operation of this step can refer to (a) shown in Figure 2 , the user slides the zoom bar from 1X to 3.5X, and obtains the interface 22 as shown in Figure 2 (b).

[0134] At S740, the phone judges whether there is a resolution change switching operation in response to the lens switching operation.

[0135] For example, switching from JPG mode (first out-picture mode) to JPG-L mode (second out-picture mode), or the user clicks other modes, resulting in the use of different resolutions before and after switching the lens. Among them, the operation of switching from JPG mode to JPG-L mode can refer to the operation shown in (c) of Figure 2 The user selects and clicks "JPG-L" in interface 23.

[0136] When the phone determines that there is no resolution inconsistency switching operation, it executes S770 to display a prompt message on the interface indicating the resolution of the main camera lens in the current default mode.

[0137] When the phone determines that there is a resolution inconsistency switching operation, the phone executes S750.

[0138] At S750, in response to the resolution inconsistency switching operation, the phone judges whether the initialization of the telephoto lens is complete.

[0139] In the embodiments of the present application, the completion of the initialization of the telephoto lens means that the phone starts to execute from receiving the user's operation instruction of switching from the main camera lens to the telephoto lens, and then transmits through the internal software layer of the phone to the hardware layer to switch the main camera lens to the telephoto lens, and finally uploads the type data of the telephoto lens to the preset position in the camera application, which is the complete initialization process of the telephoto lens. In the present application, the type data corresponding to the telephoto lens before being transmitted to the designated position in the camera application is considered as not completing the initialization of the telephoto lens.

[0140] If it is complete, the phone executes S780 to display a prompt message on the interface indicating the high-definition resolution of the switched telephoto lens. The specific implementation of this step can refer to the process described above Figure 4 , which will not be described in detail here.

[0141] If it is not complete, the phone executes S760.

[0142] At S760, the resolution corresponding to the main camera lens in JPG-L mode (e.g. 50MP) is obtained and displayed on the interface of the phone. At the same time, the phone updates the magnification on the zoom bar on the interface according to the main camera lens corresponding to 50MP displayed on the interface, i.e. adjusts from 1.0X magnification to 3.5X magnification to 1.0X (the magnification corresponding to the main camera lens) in S730.

[0143] In combination with step S760, refer to Figure 7 ,Figure 7 A schematic diagram of the interface operation is shown. For example... Figure 7 In interface 810 shown in (a), the zoom level on the zoom bar 811 is moved to 3.5X, corresponding to... Figure 2 (c) In this context, when the user clicks "JPG-L" on interface 810, the phone responds to the click operation and executes S750, resulting in the following: Figure 7 Interface 820 is shown in (b) of the diagram. The information prompt box 821 in interface 820 displays "50MP JPG enabled," and the zoom level on the zoom bar 811 has returned from 3.5X in interface 810 to 1X. The resolution seen by the user in the prompt message matches the corresponding zoom level on the zoom bar. Below... Figure 10 The implementation process will be described in detail in the illustrated embodiment. When the user... Figure 7 On the interface shown in 820, after clicking to take a picture, the phone executes S790.

[0144] In the embodiments of this application, when the mobile phone receives an operation to switch from JPG mode to JPG-L mode, it will execute the operation immediately and will not execute the operation to switch the main camera lens to the telephoto lens. Therefore, the mobile phone still uses the main camera lens. Alternatively, if the mobile phone has already switched the main camera lens to the telephoto lens, but has not uploaded the corresponding type data of the telephoto lens to the designated location on the mobile phone, and the user performs a switching operation for a resolution inconsistency scenario, then after the mobile phone updates the zoom bar, it is still necessary to switch the telephoto lens back to the main camera lens according to the updated magnification on the zoom bar.

[0145] In the S790, the phone responds to the photo-taking command, continues to use the main camera to take a picture, and acquires the image.

[0146] The image resolution is the same as the main camera's 50MP resolution in JPG-L mode. This is consistent with the resolution displayed in the information prompt box 821 in interface 820, visually achieving consistency between the ultra-high-definition resolution displayed on the interface, the magnification corresponding to the zoom bar, and the image resolution.

[0147] refer to Figure 8 , Figure 8 This diagram illustrates the user interface for capturing images with a mobile phone. This diagram corresponds to the S790, as shown below. Figure 8 As shown in (a), the phone points its lens at the scene being photographed and uses the main camera to frame the shot, such as the bird scene shown in interface 910. The zoom bar on interface 910 corresponds to a 1X magnification. When the user takes a picture, clicking the shooting function key 912 causes the phone's processor to access the main camera to obtain the image and store it in the memory. The phone then generates a corresponding thumbnail from the image and displays it in the thumbnail display box 921, as shown in the image. Figure 8As shown in (b) above. When the user clicks the thumbnail display box 921, the phone opens the gallery and displays the corresponding image on the screen. Figure 8 As shown in (c) in the diagram. The interface 930 displays the real image 931. The user can obtain the resolution prompt box 932 by using the view information button to view the real image, which displays the resolution as "8192×6144" pixels, or 50MP. This resolution is consistent with the 50MP in the information prompt box.

[0148] The technical solution of this application will be described in detail below, taking into account the user's operation of taking pictures and the internal working process of the mobile phone for each operation.

[0149] refer to Figure 9 , Figure 9 An exemplary diagram of the internal data flow module of a mobile phone according to an embodiment of this application is shown. Figure 9 The software structure includes an application layer, an application framework layer, and a hardware abstraction layer. The functions and roles of the kernel layer (not shown) and the application framework layer are as described in the above embodiments. Figure 4 The above has been explained, so it will not be described in detail here.

[0150] The application layer includes the camera app and the gallery app. The hardware abstraction layer may include a capability manager, a preview callback, and a shooting callback; for details, please refer to [link / reference needed]. Figure 4 The description of the hardware abstraction layer is shown.

[0151] The hardware layer, as a hardware structure, can include a telephoto lens, a wide-angle lens, a main camera lens, and a database (memory).

[0152] Combination Figure 2 (a)-(c) in the middle Figure 7 and Figure 8 Interface operation Figure 6 The flowchart shown, and Figure 9 The module diagram shown is described below.

[0153] After the user taps the camera app, the phone opens the camera app, and the user selects professional mode. At this point, the capability manager in the hardware abstraction layer, through the capability reporting channel, inputs the types and corresponding resolutions (including ultra-high definition resolution) of the telephoto lens, wide-angle lens, and main camera lens from the hardware layer into the kernel layer (not shown), hardware driver layer, and framework layer, until it reaches the camera app in the application layer. The camera app inputs the resolution into process space 1. The prompting logic processing module in the camera app obtains the type of the current default lens and, according to the record table, obtains the resolution of the default lens in default mode. Then, the prompting logic processing module can input the obtained resolution into the prompting display layer, which displays the resolution on the screen, such as...Figure 2 The mobile phone interface 21 shown in (a) is shown in the figure. The interface 21 can display a prompt message "Start with Default JPG", and can also have a zoom bar 21b, as well as a JPG function key in professional mode.

[0154] like Figure 2 As shown in (a), when the user's command to switch the main camera lens (corresponding to 1.0X magnification) to the telephoto lens (corresponding to 3.5X magnification) via zoom bar 21b is detected, the user quickly performs the following... Figure 2 Operations (b) and (c) switch the JPG mode to JPG-L mode. At this point, due to the fast user operation, the hardware abstraction layer's preview callback has not yet sent the type of telephoto lens to be used in the current mode to the camera application's process space 2 (initialization incomplete). That is, the process space does not contain the type corresponding to the telephoto lens, such as 01. When the prompt logic processing module executes the switch from JPG mode to JPG-L mode, it can obtain the ultra-high resolution (50MP) of the original main camera lens in JPG-L mode and send the 50MP resolution data to the prompt display layer. The prompt display layer then displays the 50MP ultra-high resolution on the interface. Figure 7 The message displayed on the information prompt box 821 on the interface 820 shown is "50MP".

[0155] Next, the zoom logic processing module can obtain the 50MP target ultra-high-definition resolution prompted by the current interface from the prompt logic processing module, and compare the 50MP resolution with... Figure 10 The output lens and the ultra-high definition resolution mapping (resolution mapping table) are compared to determine that 50MP corresponds to lens type 02. The zoom logic processing module then determines that type 02 corresponds to a magnification of 1X. Furthermore, the zoom logic processing module can adjust the zoom bar from 3.5X to 1X and display this on the screen through the zoom display layer, ultimately obtaining the image as shown below. Figure 8 Interface 820 is shown in (b) above. In interface 820, the 50MP in the information prompt box 821 is consistent with the information on the zoom bar 822. This process corresponds to S760. At the same time, the zoom logic processing module sends the instruction of the main camera lens corresponding to the magnification on the zoom bar to the kernel layer. When the user clicks the shooting function key, the kernel layer calls the main camera lens and obtains an image in JPG-L mode through the main camera lens. This image can correspond to... Figure 10 The image resolution shown in (c) is 8192×6144 pixels, or 50MP. This achieves a consistent perception between the user and the prompts, zoom bar, and image.

[0156] like Figure 10 As shown, Figure 10The structural diagram of the out-picture lens and the super-clear resolution mapping table is shown. The mapping table can be generated by the corresponding module when the module first needs to use it. As shown in Figure 9 The mapping table can include all lenses corresponding to the mobile phone, and the present application takes three lenses as an example, the type corresponding to the lens, and the super-clear resolution corresponding to each lens. According to the mapping table, the lens or the super-clear resolution can be accurately and quickly located.

[0157] In an embodiment of the present application, when the zoom logic processing module does not find the corresponding target super-clear resolution in the out-picture lens and super-clear resolution mapping table, since in normal circumstances, the mapping table will have the target super-clear resolution, if it is not found, it means that the mapping table has an error when it is initialized, and the zoom logic processing module can notify the corresponding initialization module to re-initialize the mapping table until a normal mapping table is obtained. Therefore, this process not only can obtain an effective mapping table, but also can check whether the mapping table is effective.

[0158] In an embodiment of the present application, as shown in Figure 8 The camera application can also include an information parser. The information parser can obtain the prompt information of the prompt display layer from the prompt logic processing module, and parse the prompt information, for example, obtain the target super-clear resolution (i.e. the resolution displayed by the information prompt box) from the prompt information, for example, 50MP. The information parser can send the obtained target super-clear resolution to the zoom logic processing module, so that the zoom logic processing module obtains 50MP from the information parser.

[0159] The specific implementation process of the information parser for obtaining the target super-clear resolution can include the following steps: Step 1, replace the non-numeric information in the string S with a space to generate S1. Step 2, delete the blank characters at the head and tail of S1 to generate S2. Step 3, replace the continuous multiple blank characters in S2 with one blank character to generate S3. Step 4, extract all integers in S3 as digital information parsing results and return them to the caller.

[0160] In addition, the information parser can compare the obtained target super-clear resolution with the information in the out-picture lens and super-clear resolution mapping table. When the mapping table has the target super-clear resolution, the information parser sends the target super-clear resolution to the zoom logic processing module. When the mapping table does not have the target super-clear resolution (indicating that the mapping table may have an error when it is initialized), the information parser can notify the corresponding program to re-obtain the out-picture lens and super-clear resolution mapping table.

[0161] The process of the user clicking the photograph can refer to Figure 4 and Figure 1The specific process in step 4 is described in detail in the foregoing.

[0162] It should be noted that the present application is described in the main camera lens corresponding to 1X, long focal length corresponding to 3.5X and wide-angle lens corresponding to 0.5X. In some embodiments, each lens can also correspond to other magnification, such as Figure 6 The main camera lens described in the foregoing can correspond to any magnification in the range of 1X-3.5X (not including 3.5X), such as 1.5X, 2X, 2.5X, and the long focal length corresponds to a magnification of 3.5X or more, such as 4X, 5X, 10X, etc. It can also be a zoomless zoom, that is, it can be adjusted arbitrarily within a certain range.

[0163] In addition, in some embodiments, when there are multiple magnifications corresponding to one lens, or in the case of zoomless zoom, the zoom logic processing module adjusts the magnification on the zoom bar according to the target super-clear resolution in the prompt information. The zoom logic processing module can adjust the magnification on the zoom bar to any magnification corresponding to the currently used lens. In addition, the zoom logic processing module can also record the magnification corresponding to the zoom bar before switching, and when the zoom logic processing module determines that the magnification on the current zoom bar needs to be updated, the zoom logic processing module can adjust the magnification updated by the user to the magnification corresponding to the target super-clear resolution before switching.

[0164] For example, switching from the main camera lens to the long focal length lens is described. If the user adjusts from 1X to 3.5X, it indicates that the main camera is switched to the long focal length lens. According to the foregoing Figure 9 and Figure 11 The corresponding process, the zoom logic processing module determines that the target super-clear resolution prompted at present corresponds to the main camera lens, and since the main camera lens corresponds to three magnifications of 1X, 2X and 3X, at this time, the zoom logic processing module can record the 1X magnification before adjustment, and update the zoom bar according to the recorded magnification before adjustment. That is, the user adjusts from 1X to 3.5X, and the zoom logic processing module adjusts to the 1X magnification corresponding to the main camera lens. In some embodiments, the zoom logic processing module can also not record, and can adjust the zoom bar to any magnification corresponding to the main camera lens, for example, can be adjusted to 2X or 3X magnification, so as to realize that the magnification on the zoom bar corresponds to the target super-clear resolution.

[0165] In the foregoing embodiments, the scene of taking a picture is taken as an example for description, and in other embodiments of the present application, it can also be used in various scenes such as preview or video recording, which is not limited in the present application.

[0166] According to the photographing method of the embodiments of the present application, the consistency between the prompt information displayed on the interface and the resolution of the actual image can be ensured, thereby improving the user experience.

[0167] Reference Figure 6-9 As shown in the accompanying drawings, the present application also provides a photographing device, comprising:

[0168] The receiving module 1210 is configured to receive a first operation for entering a first photographing mode;

[0169] The processing module 1220 is configured to respond to the first operation;

[0170] The display module 1230 is configured to display a first photographing interface when the processing module 1220 responds to the first operation, the first photographing interface comprising a zoom control and a first photographing picture obtained by using the first focal length lens for photographing;

[0171] In the first photographing mode, the receiving module 1210 is configured to receive a zoom operation of adjusting the zoom control from the first focal length to a second focal length;

[0172] Before the initialization of the second focal length lens is completed, the receiving module 1210 receives a second operation for entering a second photographing mode;

[0173] The processing module 1220 responds to the second operation and updates the zoom control to the first focal length and continues to use the first focal length lens for photographing.

[0174] In a possible implementation of the second aspect, the first focal length lens and the second focal length lens correspond to a first resolution and a second resolution respectively in the second photographing mode, and the first resolution is different from the second resolution. For example, the first resolution can be 50MP or 64MP, and the second resolution can be 50MP or 64MP. The processing module 1220 is further configured to respond to the second operation and cause the display module 1230 to display a second photographing interface, the second photographing interface comprising prompt information of the first resolution. The first resolution corresponds to the first focal length on the zoom control, so that the zoom control is consistent with the first resolution in the displayed prompt information.

[0175] According to an embodiment of the present application, the processing module 1220 is configured to respond to the second operation and judge whether the initialization of the second focal length lens is completed, wherein the initialization of the second focal length lens is completed means that, from the time when the processing module 1220 performs the zoom operation, to the time when the second resolution corresponding to the second focal length lens is input to a preset position. If the initialization of the second focal length lens is not completed, the processing module 1220 updates the zoom control to the first focal length and continues to use the first focal length lens for photographing.

[0176] According to an embodiment of the present application, the processing module 1220 is configured to acquire the first resolution from the preset location, determine the first focal length, and update the zoom control to the first focal length by the prompting logic processing module 1240. The first resolution and the focal length on the zoom control are ensured to be corresponding.

[0177] According to an embodiment of the present application, the processing module 1220 is configured to acquire the first resolution from the preset location, and determine the first focal length corresponding to the first resolution according to a resolution mapping table. The resolution mapping table at least includes a lens type corresponding to the focal length, and a resolution corresponding to each type of lens. The resolution mapping table facilitates quick searching of the lens type and the focal length corresponding to the resolution.

[0178] According to an embodiment of the present application, the processing module 1220 compares the first resolution with the resolutions in the resolution mapping table. When the processing module 1220 determines that there is a resolution in the resolution mapping table matching the first resolution, the first focal length matching the first resolution is acquired.

[0179] According to an embodiment of the present application, when the processing module 1220 determines that there is no resolution in the resolution mapping table matching the first resolution, the processing module 1220 further includes re-initializing the resolution mapping table until there is a resolution in the resolution mapping table matching the first resolution. This process can ensure that the resolution mapping table is effective.

[0180] According to an embodiment of the present application, the resolution mapping table is obtained by initializing all lens data when the resolution mapping table is used for the first time by the processing module 1220. Thus, the resolution mapping table is obtained when needed, and space is avoided from being occupied when not needed.

[0181] According to an embodiment of the present application, the processing module 1220 acquires the prompt information containing the first resolution from the preset location; and parses the prompt information, and acquires the first resolution from the parsed prompt information.

[0182] According to an embodiment of the present application, the processing module 1220 acquires the prompt information containing the first resolution from the preset location by the information parser 1260; the information parser 1260 parses the prompt information, and acquires the first resolution from the parsed prompt information.

[0183] According to an embodiment of the present application, the information parser 1260 sends the first resolution to the zoom logic processing module 1250; and the zoom logic processing module 1250 determines the first focal length corresponding to the first resolution according to the resolution mapping table.

[0184] According to an embodiment of the present application, the processing module 1220 receives a shooting operation for calling the first focal length lens to shoot to obtain an image / video corresponding to the first focal length of the zoom control.

[0185] According to an embodiment of the present application, the zoom control is provided with magnifications corresponding to the first focal length lens and the second focal length lens, and the zoom operation is to adjust the pointer on the zoom control from the magnification corresponding to the first focal length lens to the magnification corresponding to the second focal length lens.

[0186] According to an embodiment of the present application, when the processing module 1220 confirms that the initialization of the second focal length lens has been completed, the processing module 1220 further includes: obtaining a second resolution from a preset position, so as to include prompt information of the second resolution on the second shooting interface, and shooting using the second focal length lens.

[0187] According to an embodiment of the present application, the first shooting mode is a professional mode, and the second shooting mode is an ultra-clear shooting mode.

[0188] According to an embodiment of the present application, the first focal length lens is a main camera lens with a standard focal length, and the second focal length lens is a telephoto lens with a focal length greater than the standard focal length or a wide-angle lens with a focal length less than the standard focal length.

[0189] The modules and working processes of the device of the embodiments of the present application are described in detail in the above embodiments, and can be referred to the above embodiments Figure 6-9 The shooting method is not repeated here.

[0190] The present application also provides an electronic device, comprising:

[0191] a memory for storing instructions executed by one or more processors of the device, and

[0192] a processor for executing the method explained in combination with Figure 6-9 the above embodiments.

[0193] The present application also provides a computer readable storage medium, which stores a computer program, and the computer program, when executed by a processor, causes the processor to execute the method explained in Figure 6-9 the above embodiments.

[0194] The present application also provides a computer program product containing instructions, which, when executed on an electronic device, causes a processor to execute the method explained in Figure 12 the above embodiments.

[0195] Reference will now be made to Figure 12, a block diagram of a SoC (System on Chip) 1300 is shown in accordance with an embodiment of the present application. In Figure 12 like components have like reference numbers. Additionally, dashed lined boxes are optional features on more advanced SoCs. In Figure 6-9 the SoC 1300 includes an interconnect unit 1350 coupled to an application processor 1310; a system agent unit 1380; a bus controller unit 1390; an integrated memory controller unit 1340; a set or one or more coprocessors 1320 which can include integrated graphics logic, an image processor, an audio processor, and a video processor; a static random access memory (SRAM) unit 1330; a direct memory access (DMA) unit 1360. In one embodiment, coprocessors 1320 include a special-purpose processor, such as for example a network or communication processor, compression engine, GPGPU, a high- throughput MIC processor, embedded processor, etc.

[0196] The static random access memory (SRAM) unit 1330 can include one or more computer- readable media for storage of data and / or instructions. The computer-readable storage media can store instructions, specifically, a temporary and permanent copy of the instructions. The instructions can include those that, when executed by at least one of the processors, cause the Soc 1300 to perform the method of photographing according to the above embodiments, specifically, the method explained in the above embodiments ​ will not be repeated here.

[0197] Embodiments of the mechanisms disclosed herein can be implemented in hardware, software, firmware, or a combination of such implementation methodologies. Embodiments of the present application can be implemented as computer programs or program code executing on programmable systems comprising at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.

[0198] Program code can be applied to input instructions to perform the functions described herein and generate output information. The output information can be applied to one or more output devices, in known fashion. For purposes of this application, a processing system includes any system that has a processor, such as for example a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.

[0199] The program code can be implemented in a high level of procedural or object oriented programming language to communicate with a processing system. The program code can also be implemented in assembly or machine language, if desired. In fact, the mechanisms described herein are not limited in scope to any particular programming language. In any case, the language can be a compiled or interpreted language.

[0200] In some cases, the disclosed embodiments can be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments can also be implemented as instructions carried by or stored on a transitory or non-transitory machine-readable (e.g., computer-readable) medium, which can be read and executed by one or more processors. For example, the instructions can be distributed over the network or other computer- readable media. Thus, a machine-readable medium can include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including without limitation floppy disks, optical disks, optical disks, Compact Disc Read Only Memories (CD-ROMs), magnetic cassettes, read-only memories (ROMs), random access memories (RAMs), erasable programmable read-only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), magnetic or optical cards, flash memory, or any other suitable device. Accordingly, a machine-readable medium includes any medium that is capable of storing or transmitting electronic instructions or information in a form readable by a machine (e.g., a computer).

[0201] In the drawings, some of the structural or methodological features can be shown in particular arrangements and / or orders. However, it should be appreciated that such particular arrangements and / or orders can not be required. Instead, those features can be arranged in a different manner and / or order than shown in the figures of the specification in some embodiments. Additionally, inclusion of structural or methodological features in a particular figure is not meant to imply that such features are required in all embodiments, and in some embodiments, these features can not be included or can be combined with other features.

[0202] It should be noted that each unit / module mentioned in each device embodiment of the present application is a logical unit / module, and in physical, one logical unit / module can be a physical unit / module, or a part of a physical unit / module, or be realized in a combination of multiple physical unit / modules, and the physical realization of these logical units / modules is not the most important, and the combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed in the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce the units / modules which are not closely related to solving the technical problems proposed in the present application, which does not mean that the above-mentioned device embodiments do not have other units / modules.

[0203] It should be noted that in the examples and descriptions of the present patent, the relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including one" does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0204] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it should be understood by those skilled in the art that various changes in form and details can be made therein without departing from the spirit and scope of the present application.

Claims

1. A shooting method applied to electronic devices, characterized in that, The electronic device includes at least a first focal length lens and a second focal length lens, and the method includes: The electronic device receives a first operation to enter a first shooting mode, wherein the first shooting mode is a JPG mode; In response to the first operation, the electronic device displays a first shooting interface, which includes zoom controls and a first shooting image captured using the first focal length lens. In the first shooting mode, the electronic device receives a zoom operation that adjusts the zoom control from the first focal length to the second focal length; In response to the zoom operation, the electronic device initializes the second focal length lens to complete the switch from the first focal length lens to the second focal length lens; Before the second focal length lens completes initialization, the electronic device receives a second operation to enter the second shooting mode, which is JPG-L mode; In response to the second operation, the electronic device updates the zoom control to the first focal length and continues to use the first focal length lens for shooting; The electronic device initializes the second focal length lens, including: The electronic device transmits the ultra-high resolution corresponding to the second focal length lens to a preset position in the camera application.

2. The method according to claim 1, characterized in that, In the second shooting mode, the first focal length lens and the second focal length lens correspond to a first resolution and a second resolution, respectively, where the first resolution and the second resolution are different. The electronic device, in response to the second operation, further includes: The electronic device displays a second shooting interface, which includes a prompt message with the first resolution.

3. The method according to claim 1 or 2, characterized in that, The electronic device, in response to the second operation, further includes: The electronic device determines whether the initialization of the second focal length lens is complete. The completion of the initialization of the second focal length lens means from the start of the electronic device performing the zoom operation to the end when the second resolution corresponding to the second focal length lens is input to the preset position. The electronic device updates the zoom control to the first focal length and continues to use the lens with the first focal length for shooting, including: If the initialization of the second focal length lens is not completed, the electronic device updates the zoom control to the first focal length and continues to use the first focal length lens for shooting.

4. The method according to claim 3, characterized in that, The electronic device updates the zoom control to the first focal length, including: The electronic device obtains a first resolution from a preset position, determines the first focal length, and updates the zoom control to the first focal length.

5. The method according to claim 4, characterized in that, The electronic device obtains a first resolution from a preset position and determines the first focal length, including: The electronic device obtains the first resolution from the preset position and determines the first focal length corresponding to the first resolution according to the resolution mapping table. The resolution mapping table includes at least the lens type corresponding to the focal length and the resolution corresponding to each type of lens.

6. The method according to claim 5, characterized in that, The electronic device acquires the first resolution from a preset position and determines the first focal length corresponding to the first resolution according to a resolution mapping table, including: The electronic device compares the first resolution with the resolution in the resolution mapping table; When the electronic device determines that there is a resolution in the resolution mapping table that matches the first resolution, the electronic device obtains a first focal length that matches the first resolution.

7. The method according to claim 5, characterized in that, When the electronic device determines that there is no resolution matching the first resolution in the resolution mapping table, it further includes: The electronic device reinitializes the resolution mapping table until there is a resolution in the resolution mapping table that matches the first resolution.

8. The method according to any one of claims 5-7, characterized in that, The resolution mapping table is obtained by initializing all lens data when the electronic device is used for the first time.

9. The method according to claim 8, characterized in that, The electronic device acquires a first resolution from a preset position, including: The electronic device obtains a prompt message containing the first resolution from the preset location; The electronic device parses the prompt information and obtains the first resolution from the parsed prompt information.

10. The method according to claim 9, characterized in that, The electronic device parses the prompt information and obtains the first resolution from the parsed prompt information, including: The electronic device parses the prompt information using an information parser and obtains the first resolution from the parsed prompt information.

11. The method according to claim 10, characterized in that, The electronic device obtains a first resolution from a preset position, determines the first focal length, and updates the zoom control to the first focal length, including: The electronic device sends the first resolution to the zoom logic processing module via an information parser; The electronic device determines the first focal length corresponding to the first resolution through the zoom logic processing module.

12. The method according to claim 11, characterized in that, In response to the second operation, the electronic device updates the zoom control to the first focal length and continues to use the first focal length lens for shooting, including: The electronic device receives a shooting operation and calls the first focal length lens to take a picture, so as to obtain an image / video corresponding to the first focal length of the zoom control.

13. The method according to claim 12, characterized in that, The zoom control has magnifications corresponding to the first focal length lens and the second focal length lens. The zoom operation is to adjust the pointer on the zoom control from the magnification corresponding to the first focal length lens to the magnification corresponding to the second focal length lens.

14. The method according to claim 3, characterized in that, When the electronic device confirms that the initialization of the second focal length lens has been completed, it further includes: The electronic device acquires a second resolution from a preset position so that the second shooting interface includes a prompt message indicating the second resolution, and takes a picture using the second focal length lens.

15. The method according to claim 14, characterized in that, The first shooting mode is professional mode, and the second shooting mode is ultra-high definition shooting mode.

16. The method according to claim 15, characterized in that, The first focal length lens is a main camera lens with a standard focal length, and the second focal length lens is a telephoto lens with a focal length greater than the standard focal length or a wide-angle lens with a focal length less than the standard focal length.

17. An electronic device, characterized in that, include: monitor; First focal length lens; Second focal length lens; Memory, used to store instructions executed by one or more processors of the device, and A processor for executing the instructions to cause the electronic device to perform the method performed by the electronic device according to any one of claims 1-16.

18. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed on an electronic device, causes the electronic device to perform the method according to any one of claims 1-16.

Citation Information

Patent Citations

  • Multi-lens shooting module, image switching method thereof, and multi-lens shooting system

    CN106470302A

  • Photographing method and device, and equipment

    CN111373727A