Image display method, electronic equipment and computer readable storage medium

By mapping the zoom magnification to a unified reference coordinate system, the problem of picture jump during camera switching is solved, and the smooth transition of the picture and the improvement of user experience is achieved.

CN120282016AActive Publication Date: 2025-07-08HONOR DEVICE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202311870246.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-29
Publication Date
2025-07-08
Estimated Expiration
2043-12-29

Smart Images

  • Figure CN120282016A_ABST
    Figure CN120282016A_ABST
Patent Text Reader

Abstract

The invention discloses an image display method, an electronic device and a computer readable storage medium, relates to the technical field of terminals, avoids the phenomenon that a presented picture jumps visually due to the fact that FOV sent and displayed near a camera switching point is inconsistent, and ensures user experience. The scheme can be applied to the electronic equipment comprising a plurality of cameras, and the plurality of cameras can comprise a first camera. The specific scheme can be as follows: receiving a selection operation of a user on a first magnification; and in response to the selection operation, displaying a first preview image collected by the first camera at a second magnification, the second magnification and the first magnification satisfying a mapping relationship, and the mapping relationship being used for indicating a relationship of mapping different magnifications from the coordinate system of the first camera to the reference coordinate system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of terminals, and in particular, to an image display method, an electronic device, and a computer-readable storage medium. Background Art

[0002] In order to pursue better shooting effects, it has been a booming trend to install multiple cameras on electronic devices. By installing multiple cameras on the electronic device, such as a main camera, a wide-angle camera, and a telephoto camera, etc., more shooting methods are provided, so as to present different pictures for users to select and use.

[0003] Currently, users can adjust the field of view collected by the camera according to actual needs. The electronic device can switch the corresponding camera according to the zoom ratio to work and obtain the picture required by the user. However, since the field of view collected by different cameras is not the same, that is, there are differences in the field of view (Field of View, FOV) of different cameras, so in the case of switching cameras, due to the inconsistent FOV, the presented picture often jumps visually. Summary of the Invention

[0004] Based on this, the present application provides an image display method, an electronic device, and a computer-readable storage medium, which avoid the phenomenon that the presented picture jumps visually due to inconsistent FOV sent and displayed near the camera switching point, and ensure the user experience.

[0005] To achieve the above object, the embodiments of the present application adopt the following technical solutions:

[0006] In a first aspect, the present application provides an image display method, which is applied to an electronic device including multiple cameras, and the multiple cameras include a first camera. In this method, the electronic device receives a selection operation of the user for a first magnification, and in response to the selection operation, based on the relationship between different magnifications mapped from the coordinate system of the first camera to the reference coordinate system, a first preview image collected by the first camera at a second magnification can be displayed.

[0007] By adopting this technical solution, the zoom ratio is mapped from the coordinate system of the first camera to a unified reference coordinate system to obtain the mapped magnification after mapping, and then the corresponding preview image is obtained and displayed according to the mapped magnification. It avoids the phenomenon that the presented picture jumps visually due to inconsistent FOV sent and displayed near the switching point, ensures the smooth transition of the picture before and after the camera switch, and ensures the user experience.

[0008] In an implementable manner of the first aspect, the mapping relationship can be determined by the mapping switching magnification. Specifically: The switching magnification of the first camera can be mapped to the reference coordinate system to obtain the mapping switching magnification. Then, the mapping relationship is determined based on the mapping switching magnification and the switching magnification of the second camera.

[0009] In the above method, the reference coordinate system can be a unified coordinate system. For example, the above multiple cameras may further include a second camera, and the reference coordinate system can be the coordinate system of the second camera. The first camera can be a wide-angle camera and / or a telephoto camera, and the second camera can be the main camera. Taking the first camera as a wide-angle camera as an example, by mapping different magnifications from the coordinate system of the wide-angle camera to the coordinate system of the main camera, a smooth transition of the image presented to the user before and after switching the camera from the wide-angle camera to the main camera is ensured. In addition, setting the main camera as the second camera conforms to the processing method in actual use and ensures the user's usage habits. Obtaining the mapping relationship based on the mapping switching magnification and the switching magnification of the first camera has less computational complexity and good real-time performance.

[0010] In an implementable manner of the first aspect, the mapping switching magnification can be determined through the following process: First, the mapping ratio can be determined based on the first FOV and the second FOV; then, based on the mapping ratio and the switching magnification of the second camera, the mapping switching magnification is determined. Here, the first FOV is the FOV corresponding to the switching magnification of the first camera, the second FOV is the FOV corresponding to the switching magnification of the second camera; the mapping ratio is used to indicate the proportional relationship between the first FOV and the second FOV in the coordinate system of the second camera.

[0011] In the above method, the mapping ratio can be represented by the ratio of the imaging width under the first FOV to the imaging width under the second FOV. There is a relationship between the FOV of the camera and the imaging width of the camera under this FOV and the focal length of the camera. Based on the above relationship, the final mapping switching magnification can be determined based on the second FOV, the first FOV, and the switching magnification of the second camera. The determination process is convenient and has good real-time performance.

[0012] In an implementable manner of the first aspect, when the electronic device displays the first preview image collected by the first camera at the second magnification, specifically: First, determine the FOV corresponding to the second magnification, and then, based on the FOV corresponding to the second magnification, crop the image collected by the first camera to obtain the cropped first preview image, and display the first preview image to the user.

[0013] In the above method, the FOV for display determined based on the second magnification avoids the phenomenon of visual jump in the presented image caused by inconsistent FOVs for display near the switching point.

[0014] In a second aspect, the present application provides an image display method applied to an electronic device including a plurality of cameras, where the plurality of cameras include a first camera and a second camera. In this method, the electronic device receives a user's selection operation for a first magnification, and in response to this operation, displays a first preview image obtained by cropping the image collected by the first camera based on a target FOV.

[0015] As an example, after receiving the user's selection operation for the first magnification, the electronic device can determine the target FOV according to the first magnification and the mapping relationship, so that the image collected by the first camera can be cropped according to the target FOV to obtain the first preview image, and the first preview image is sent for display. This mapping relationship can unify the FOVs of the first camera and the second camera at the switching point.

[0016] Adopting this technical solution, when the user inputs the first magnification, the target FOV can be determined based on the first magnification and the mapping relationship that can unify the FOVs of the first camera and the second camera near the switching point, and the original image is cropped based on the target FOV, and then the first preview image is obtained and sent for display. Thus, it avoids the problem of the jump of the preview screen caused by the inconsistent FOVs sent for display near the switching point, ensures the smooth transition of the display screen during the camera switching process, and improves the user experience.

[0017] In an implementable manner of the second aspect, the mapping relationship can be determined based on the switching magnification of the first camera, the first FOV, the switching magnification of the second camera, and the second FOV.

[0018] Exemplarily, based on the switching magnification of the first camera, the first FOV, the switching magnification of the second camera, and the second FOV, a fitting function can be used for curve fitting to obtain the above mapping relationship.

[0019] That is to say, curve fitting is performed through the switching magnifications of different cameras and the original FOVs corresponding to the switching magnifications to obtain a smooth curve, that is, the mapping relationship. In this process of curve fitting, the above-mentioned switching magnifications of different cameras and the corresponding original FOVs are known parameters of the cameras and can be directly obtained without spending additional work to collect data information, reducing the processing cost.

[0020] In a third aspect, the present application provides an image display device, and this device has the function of implementing the behaviors of the electronic device in the methods described in the first aspect and the second aspect above. The function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions, for example, a receiving unit or module, a control unit or module, and a display unit or module.

[0021] Fourthly, an electronic device is provided, which includes a memory, a plurality of cameras, and one or more processors; the memory, the cameras are coupled to the processor;

[0022] Wherein, the memory is used to store computer program code, and the computer program code includes computer instructions; when the computer instructions are executed by the processor, the electronic device is enabled to execute the image display method as described in the first aspect, the second aspect and any implementation manner thereof above.

[0023] Fifthly, a computer-readable storage medium is provided, and the computer-readable storage medium includes a computer program. When the computer program runs on an electronic device, the electronic device can execute the image display method as described in the first aspect, the second aspect and any implementation manner thereof.

[0024] Sixthly, a computer program product containing instructions is provided. When it runs on an electronic device, the electronic device can execute the image display method as described in the first aspect and any implementation manner thereof above.

[0025] Seventhly, an embodiment of the present application provides a chip system, and the chip system includes a processor. The processor is used to call a computer program in a memory to execute the image display method as described in the first aspect, the second aspect and any implementation manner thereof.

[0026] It can be understood that for the beneficial effects that can be achieved by the device described in the third aspect, the electronic device described in the fourth aspect, the computer-readable storage medium described in the fifth aspect, the computer program product described in the sixth aspect, and the chip system described in the seventh aspect, reference can be made to the beneficial effects in the first aspect, the second aspect and any possible implementation manner thereof, which will not be elaborated here. Description of the Drawings

[0027] Figure 1 A schematic diagram of an image display method provided for the related art;

[0028] Figure 2 A schematic diagram of the FOV jump during the camera switching process provided for the related art;

[0029] Figure 3 A schematic diagram of the structure of a terminal device provided for an embodiment of the present application;

[0030] Figure 4 A schematic flow chart of an image display method provided for an embodiment of the present application Figure 1 ;

[0031] Figure 5 A schematic diagram of a method for determining a mapping relationship provided for an embodiment of the present application;

[0032] Figure 6 This application embodiment provides a schematic diagram of an image mapping relationship Figure 1 ;

[0033] Figure 7 This application embodiment provides a schematic diagram of an image display method process Figure 2 ;

[0034] Figure 8 This application embodiment provides a schematic diagram of an image mapping relationship Figure 2 ;

[0035] Figure 9 This application embodiment provides another schematic diagram of an image display method process Figure 1 ;

[0036] Figure 10 This application embodiment provides a schematic diagram of image size alignment;

[0037] Figure 11 This application embodiment provides a schematic diagram of an image display method Figure 1 ;

[0038] Figure 12 This application embodiment provides another schematic diagram of an image display method process Figure 2 ;

[0039] Figure 13 This application embodiment provides a schematic diagram of an image display method Figure 2 ;

[0040] Figure 14 This application embodiment provides a schematic diagram of the structure of a chip system. Detailed implementation manners

[0041] In the description of this application, unless otherwise specified, "and / or" in this application is merely a relationship describing associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. Among them, A and B may be singular or plural.

[0042] In the description of this application, unless otherwise specified, "a plurality of" means two or more than two. "At least one (item)" or its similar expression refers to any combination of these items, including any combination of single item (item) or plural items (items). For example, at least one (item) of a, b, or c may represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, and c may be single or multiple.

[0043] For the convenience of clearly describing the technical solutions of the embodiments of the present application, in the embodiments of the present application, terms such as "first" and "second" are used to distinguish identical or similar items with basically the same functions and roles. Those skilled in the art can understand that terms such as "first" and "second" do not limit the quantity and execution order, and terms such as "first" and "second" do not necessarily limit being different.

[0044] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary" or "for example" is intended to present relevant concepts in a specific manner for easy understanding.

[0045] First, some terms in the embodiments of the present application are explained to facilitate the understanding of those skilled in the art.

[0046] 1. Refractive power: Refractive power is the degree of deviation of the light path from a straight line when light enters from one substance into another. The stronger the refractive power, the greater the degree of deviation of the light path, that is, the greater the bending angle of the light after passing through a convex lens.

[0047] 2. Focal length: The size of the focal length marks the size of the refractive power. The shorter the focal length, the greater the refractive power. The focal length of the optical lens included in the camera determines the size of the image generated by the object to be photographed by the optical lens on the imaging plane. Assuming that the same object is photographed at the same distance, then the longer the focal length of the optical lens, the greater the magnification of the image generated by the object to be photographed on the imaging plane, such as the photosensitive element.

[0048] 3. Original field of view (FOV): It can also be called FOV, which is used to indicate the maximum angular range that the camera can photograph, or the maximum field of view range that can be photographed. Generally speaking, the angle formed by the limit of the range that the camera can see is called the original FOV. When the object to be photographed is within the original FOV of the camera, the object to be photographed will be captured by the camera. When the object to be photographed is not within the original FOV of the camera, the object to be photographed will not be captured by the camera. The original FOVs of different types of cameras are not the same. For example, the original FOV of a wide-angle camera is generally 118°, the original FOV of a short-focus camera is generally 84°, and the original FOV of a long-focus camera is generally 26.8°. The original FOVs of the same type of cameras produced by different manufacturers may also be different. For example, the original FOV of the wide-angle camera produced by manufacturer 1 is 118°, and the original FOV of the wide-angle camera produced by manufacturer 2 is 115°.

[0049] 4. Zoom ratio, also known as magnification ratio, Zoom magnification, zoom ratio, magnification ratio, etc., is a parameter in the optical lens included in a camera. It refers to the ratio of the imaging size of an object on the imaging plane, such as an image sensor, through a lens to the actual size of the object. By adjusting the zoom ratio of the optical lens, images with different field of view ranges can be displayed. Among them, the zoom ratio is related to the field of view range of the image to be presented. For the sake of simplicity of description, in this application, the field of view range of the image to be presented is referred to as the sending display FOV (or, the real-time sending display FOV). For example, the zoom ratio is inversely proportional to the sending display FOV. Since the original FOVs of different cameras are different, that is, the maximum field of view ranges that can be captured are different, when the original FOV of the camera cannot meet the requirements of the sending display FOV, the electronic device can switch the camera for shooting so as to obtain an image that meets the requirements of the sending display FOV and present it to the user.

[0050] 5. Switch ratio (switch magnification), which is used to indicate the default magnification of different cameras. The switch ratios of different types of cameras are different. For example, the switch ratio of a wide-angle camera is 0.5X. The switch ratio of a short-focus camera is 1X. The switch ratio of a telephoto camera is 2.5X. The switch ratio of a camera corresponds to the original FOV of the camera. For example, the switch ratio of a wide-angle camera is 0.5X, which corresponds to the original FOV of 118° of the wide-angle camera. The switch ratios of the same type of cameras produced by different manufacturers may also be different. It should be noted that the above switch ratio is only an exemplary command for the default magnification of the camera, and the naming of the default magnification of the camera in the embodiments of this application is not limited to this.

[0051] Next, the technical solutions in the embodiments of this application will be described with reference to the accompanying drawings in the embodiments of this application.

[0052] With the evolution of services on electronic devices, it has become a development trend to install multiple cameras on electronic devices. For example, dual-camera electronic devices, triple-camera electronic devices, etc. Among them, taking an electronic device including three cameras as an example, the three cameras of the electronic device can include a short-focus camera (or called the main camera), a wide-angle camera, and a telephoto camera. By switching between multiple cameras on the electronic device, images with different field of view ranges are presented for the user to select. Among them, the user can operate on the corresponding control on the preview interface of the electronic device, such as the control for adjusting the zoom ratio, so as to achieve the purpose of presenting images corresponding to different field of view ranges for the user. It can be understood that since the original FOVs of different cameras are different, that is, the maximum field of view ranges that can be captured are different, and the larger the zoom ratio, the smaller the sending display FOV. Therefore, the electronic device can select a suitable camera for shooting according to the zoom ratio.

[0053] Exemplarily, as Figure 1 shown, a mobile phone is used as an example of an electronic device for demonstration. When a user wants to use the camera to take a photo or record a video, the user can open the camera application on the mobile phone. For example, the user can perform a click operation on the icon of the camera application on the main screen of the electronic device. In response, the mobile phone can turn on the camera of the mobile phone and display a preview interface 11 as shown in Figure 1 (a) of Figure 1 . The preview interface 11 includes a preview image of the current scene. In addition, the preview interface 11 also includes a control for adjusting the zoom ratio, such as the control 12 shown in Figure 1 (a) of Figure 1 . By operating the control 12, the user can adjust the zoom ratio. The mobile phone determines the transmitted FOV according to the zoom ratio, and thus displays images of different visual field ranges of the current scene. It can be understood that when the transmitted FOV is different, the preview images presented in the preview interface are different, specifically reflected in the different imaging sizes of the objects to be photographed in the current scene. The larger the zoom ratio, the larger the imaging size of the object to be photographed. As shown in

[0054] (b) of

[0055] , the user performs a sliding operation at the control 12 (adjusting the zoom ratio from 1X to 1.5X). In response, the mobile phone can obtain the image corresponding to the transmitted FOV according to the adjusted zoom ratio, that is, 1.5X, and display it. Among them, the displayed interface can be the preview interface 13 shown in Figure 2 (b) of (b). Since the zoom ratios input by the user are different, the transmitted FOVs obtained by the electronic device are different. And the original FOVs corresponding to different cameras are also different. For example, the original FOV of the wide-angle camera is 118°, that is, the wide-angle camera can take pictures of scenes within a maximum visual field range of 118°. The original FOV of the main camera is 84°, that is, the main camera can take pictures of scenes within a maximum visual field range of 84°. Therefore, when the original FOV of a camera cannot meet the transmitted FOV determined according to the zoom ratio input by the user, that is, the camera cannot meet the visual field range that the user wants to collect, the mobile phone will switch the camera for shooting to meet the shooting needs of the user. Among them, after switching the camera, the transmitted FOV is equal to the original FOV of the switched camera. However, before and after switching the camera (i.e., near the switching point), due to the inconsistency of the transmitted FOV near the switching point, the presented images will visually jump. For example, in combination withAs shown, when the switching point is 1X, the electronic device will switch the wide-angle camera to the main camera. At this time, the displayed FOV may jump from 90° to 84° of the main camera. In this way, there will be a position deviation of the photographed object in the image presented to the user. For example, before switching the camera, the photographed object in the displayed image is at the center point of the image, while after the camera is switched, the photographed object in the displayed image may not be at the center point of the image, that is, there is a position deviation, which will give the user a feeling of picture jitter and affect the visual experience.

[0056] In order to avoid the phenomenon that the presented picture jumps visually due to the inconsistent displayed FOV near the switching point. In the related art, after receiving the zoom ratio input by the user, the corresponding zoom ratio can be calculated based on the affine transformation relationship and depth data between different cameras, and then the image captured by the camera can be cropped according to the displayed FOV corresponding to the calculated zoom ratio, and the cropped image is displayed. However, the above-mentioned related art has at least two deficiencies: on the one hand, because the collected depth data is inaccurate, the calculated zoom ratio is inaccurate, resulting in the inaccurate displayed FOV used for image cropping, so there will still be a phenomenon that the presented picture jumps visually. On the other hand, the calculation process of determining the zoom ratio using depth data is relatively difficult and the real-time performance is poor.

[0057] To solve the above problems, the embodiment of the present application provides an image display method. By mapping the zoom ratio from the first camera coordinate system to a unified reference coordinate system, the mapped zoom ratio is obtained. Then, the corresponding displayed FOV is determined according to the mapped zoom ratio, and then cropping and display are performed. This avoids the phenomenon that the presented picture jumps visually due to the inconsistent displayed FOV near the switching point, and ensures the user experience. And it is no longer necessary to rely on depth data to calculate the zoom ratio, and the real-time performance is better.

[0058] Exemplarily, the image display method provided in the embodiment of the present application can be applied to an electronic device. The electronic device can be a device including multiple cameras such as a mobile phone, a tablet computer, a smart watch, a desktop type, a laptop type, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) / virtual reality (VR) device, etc. The embodiment of the present application does not impose special restrictions on the specific form of the electronic device.

[0059] Exemplarily, the mobile phone 300 is taken as an example of the above-mentioned electronic device. Figure 3 It shows a schematic structural diagram of the mobile phone 300. As Figure 3 shown, the mobile phone 300 may include a processor 310, an external memory interface 320, an internal memory 321, a charging management module 330, a power management module 340, a battery 341, an antenna 1, an antenna 2, a mobile communication module 350, a wireless communication module 360, an audio module 370, a sensor module 380, a key 390, a motor 391, an indicator 392, a camera 393, a display screen 394, and a subscriber identification module (SIM) card interface 395, etc.

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

[0061] The processor 310 may include one or more processing units. For example, the processor 310 may 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 may be independent devices or integrated in one or more processors.

[0062] The controller may generate operation control signals according to the instruction operation code and the timing signal to complete the control of fetching instructions and executing instructions.

[0063] A memory can also be provided in the processor 310 for storing instructions and data. In some embodiments, the memory in the processor 310 is a cache memory. This memory can hold the instructions or data that the processor 310 has just used or recycled. If the processor 310 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses and reduces the waiting time of the processor 310, thus improving the efficiency of the system. In the embodiments of the present application, the processor 310 can be used to, when the mobile phone 300 receives a user's selection operation for the zoom ratio 1, obtain the corresponding zoom ratio 2 based on the mapping relationship, so that the camera captures an image based on the zoom ratio 2, ensuring that the FOV is aligned when different cameras are switched, thereby avoiding the phenomenon of visual jump in the presented picture.

[0064] In some embodiments, the processor 310 may include one or more interfaces. The interfaces may include a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0065] The USB interface 311 is an interface that conforms to the USB standard specification. Specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 311 can be used to connect a charger to charge the mobile phone 300, and can also be used for data transmission between the mobile phone 300 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. This interface can also be used to connect other electronic devices, such as AR devices, etc.

[0066] The charging management module 330 is used to receive charging input from a charger. The charger can be a wireless charger or a wired charger. In some embodiments of wired charging, the charging management module 330 can receive the charging input from a wired charger through the USB interface 311. In some embodiments of wireless charging, the charging management module 330 can receive the wireless charging input through the wireless charging coil of the mobile phone 300. While charging the battery 341, the charging management module 330 can also supply power to the mobile phone 300 through the power management module 340. The power management module 340 is used to connect the battery 341, the charging management module 330, and the processor 310. The power management module 340 receives the input from the battery 341 and / or the charging management module 330 and supplies power to the processor 310, the internal memory 321, the display screen 394, the wireless communication module 360, etc. The power management module 340 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 340 can also be disposed in the processor 310. In some other embodiments, the power management module 340 and the charging management module 330 can also be disposed in the same device.

[0067] The wireless communication function of the mobile phone 300 can be implemented through Antenna 1, Antenna 2, the mobile communication module 350, the wireless communication module 360, the modulation and demodulation processor, and the baseband processor, etc.

[0068] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the mobile phone 300 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: Antenna 1 can be multiplexed as the diversity antenna of the wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0069] The mobile communication module 350 can provide solutions for wireless communications such as 2G / 3G / 4G / 5G applied to the mobile phone 300. The mobile communication module 350 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 350 can receive electromagnetic waves by the antenna 1, and perform filtering, amplification and other processing on the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The wireless communication module 360 can provide solutions for wireless communications such as wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc. applied to the mobile phone 300.

[0070] In some embodiments, the antenna 1 of the mobile phone 300 is coupled to the mobile communication module 350, and the antenna 2 is coupled to the wireless communication module 360, so that the mobile phone 300 can communicate with the network and other devices through wireless communication technologies.

[0071] The mobile phone 300 can implement the shooting function through the ISP, camera 393, video codec, GPU, display screen 394, and application processor, etc.

[0072] The GPU is a microprocessor for image processing, connected to the display screen 394 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 310 may include one or more GPUs, which execute program instructions to generate or change display information.

[0073] The display screen 394 is used to display images, videos, etc. The display screen 394 includes a display panel. For example, the display screen 394 may be a touch screen. In some embodiments of the present application, after the user opens the camera application, the display screen 394 can be used to display the preview interface of the FOV corresponding to different magnifications in the coordinate system of the second camera. The user can perform a selection operation on the first magnification on the preview interface.

[0074] The camera 393 is used to capture static images or videos. An object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in standard formats such as RGB and YUV. In some embodiments, the mobile phone may include N cameras 393, where N is a positive integer greater than 1. In some embodiments of the present application, these N cameras 393 may include a first camera and a second camera. After the mobile phone receives the operation of the user to open the camera application, the mobile phone can control the camera 393 to turn on. After the camera 393 is turned on, the camera 393 can be used to collect a preview image and present it to the user through the display screen 394. When the currently collected preview image is captured by the first camera, if the user's selection operation for zoom ratio 1 is received, then in response, the first camera can collect a preview image based on the zoom ratio 2 corresponding to the zoom ratio 1 and present it to the user through the display screen 394.

[0075] The external memory interface 320 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 300.

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

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

[0078] The sensor module 380 may include a pressure sensor 380A, a fingerprint sensor 380B, a temperature sensor 380C, a touch sensor 380D, etc.

[0079] The keys 390 include a power-on key, a volume key, etc. The keys 390 can be mechanical keys or touch keys. The mobile phone 300 can receive key inputs and generate key signal inputs related to the user settings and function controls of the mobile phone 300.

[0080] The motor 391 can generate a vibration prompt. The motor 391 can be used for incoming call vibration prompts and can also be used for touch vibration feedback. The indicator 392 can be an indicator light and can be used to indicate the charging state, the change in battery level, and can also be used to indicate messages, missed calls, notifications, etc. The SIM card interface 395 is used to connect the SIM card. The SIM card can be inserted into or removed from the SIM card interface 395 to achieve contact and separation from the mobile phone 300.

[0081] Since the adjustment of the zoom ratio may cause the camera to switch, in order to avoid the phenomenon of screen jumping during camera switching, in some embodiments, after receiving the user's operation of adjusting the zoom ratio, the electronic device can determine the mapped ratio corresponding to the adjusted zoom ratio through the mapped ratio mechanism, and thus crop the image captured by the camera based on the display FOV corresponding to the mapped ratio to obtain a preview image and display it. In other embodiments, after receiving the user's operation of adjusting the zoom ratio, the electronic device can determine the display FOV corresponding to the adjusted zoom ratio through the mapped ratio mechanism, and thus crop the image captured by the camera based on the corresponding display FOV to obtain a preview image and display it. This ratio mapping mechanism can unify the display FOVs of different cameras near the switching point to avoid the phenomenon of screen jumping near the switching point. The following combines Figure 4 the embodiments shown and Figure 7 the embodiments shown to introduce the above two solutions in detail.

[0082] As Figure 4 shown, Figure 4 FIG. shows a schematic flowchart of an image display method provided by an embodiment of the present application Figure 1 , and the method may include: S401 - S403.

[0083] S401. Display the preview image captured by the first camera.

[0084] S402. Receive the operation of the user to adjust the zoom ratio 1 to the zoom ratio 2.

[0085] Multiple cameras are installed on the electronic device for the user to use. For example, the electronic device includes a main camera, a wide-angle camera, and a telephoto camera. The first camera can be a wide-angle camera or a telephoto camera.

[0086] Among them, the electronic device can allow the user to mobilize the camera through applications such as the camera application to perform shooting in the current scene. Exemplarily, taking the mobilization of the camera through the camera application for shooting as an example. The electronic device receives the operation of the user to open the camera application. In response, the electronic device can turn on the camera and display a preview interface, which includes the preview image captured by the camera. For example, taking the currently turned-on camera of the electronic device as the first camera, such as a wide-angle camera, as an example, when the wide-angle camera is turned on, the preview interface can include the preview image captured by the wide-angle camera.

[0087] Generally, after the camera is turned on, the delivered FOV is defaulted to the original FOV of the camera, that is, the zoom ratio is the switching ratio corresponding to the original FOV. For example, taking the switching ratio of the wide-angle camera as 0.5X and the original FOV as 118° as an example, after the wide-angle camera is turned on, it can shoot the visual field range corresponding to the original FOV to obtain an image, such as called the original image. Then, the electronic device can obtain the preview image based on the delivered FOV, which is also 118° at this time, and display it through the display screen. Since the delivered FOV is the same as the original FOV at this time, it can be considered that the electronic device directly displays the original image as the preview image.

[0088] The preview interface can also include a control for adjusting the zoom ratio for the user to adjust the visual field range of the picture to be presented. For example, the user can perform an adjustment operation on the zoom ratio according to the shooting needs. For example, if the user adjusts the zoom ratio from zoom ratio 1 (such as 0.5X) to zoom ratio 2 (such as 0.8X), then the electronic device can receive the adjustment operation of the zoom ratio by the user.

[0089] Among them, the above zoom ratio 2 can be the first ratio in the embodiments of the present application. The operation in S402 can be the selection operation in the embodiments of the present application.

[0090] S403. In response to the operation in S402, display the preview image captured by the first camera at the mapping ratio, and the mapping ratio and the zoom ratio 2 satisfy a mapping relationship, which is used to indicate the relationship between different ratios mapped from the coordinate system of the first camera to the reference coordinate system.

[0091] Among them, the second camera may be the main camera described above. The mapping magnification may be the second magnification in the embodiments of the present application, and the preview image in S403 is the first preview image in the embodiments of the present application.

[0092] Exemplarily, after the electronic device receives the operation of the user adjusting the zoom magnification 1 to the zoom magnification 2, in response to this operation, the electronic device may display the preview image captured by the first camera at the mapping magnification obtained through the mapping magnification mechanism. The mapping magnification (or referred to as the Map zoom magnification) is determined based on the above zoom magnification 2.

[0093] In some examples, in combination with the example in S402, continue to take the first camera as a wide-angle camera, the zoom magnification 1 as 0.5X, and the zoom magnification 2 as 0.8X as an example. After the electronic device receives the operation of the user adjusting the zoom magnification from 0.5X to 0.8X, in response, the electronic device may determine the mapping magnification corresponding to 0.8X through the mapping magnification mechanism. For example, the electronic device may obtain the mapping magnification corresponding to 0.8X based on the pre-acquired mapping relationship. For example, the determined mapping magnification is 0.72X. Then, the electronic device may display the preview image captured by the wide-angle camera at the mapping magnification of 0.72X. That is, the electronic device may obtain the image of the field of view range corresponding to 0.72X, that is, obtain the preview image and display it. For example, the electronic device may determine the corresponding display FOV based on the mapping magnification, and thus crop the original image captured by the wide-angle camera based on the display FOV to obtain the preview image and display it.

[0094] As described in the foregoing embodiments, the jump of the preview screen when switching cameras is caused by the inconsistency of the display FOV near the switching point. The inconsistency of the display FOV near the switching point is due to different cameras having different original FOVs, that is, the corresponding relationships between the display FOVs of different cameras and the zoom magnification are different. The corresponding relationships between the display FOVs of different cameras and the zoom magnification can be considered as different coordinate systems of different cameras. In this embodiment, through the above mapping magnification mechanism, the zoom magnifications under different cameras can be mapped to a unified coordinate system, such as being uniformly mapped to the reference coordinate system, so as to achieve the purpose of making the corresponding relationships between the display FOVs of different cameras and the zoom magnification roughly unified. In the embodiments of the present application, the mapping relationship from the coordinate system of the first camera to the reference coordinate system for different magnifications may be determined in advance. And the pre-determined mapping relationship is configured in the electronic device. In this way, it can be ensured that the display FOV near the switching point does not jump, and thus the preview screen does not jump.

[0095] Among them, the reference coordinate system can be the coordinate system of any one of the multiple cameras included in the electronic device. For example, it can be the coordinate system of the wide-angle camera, the coordinate system of the telephoto camera, or the coordinate system of the main camera. The reference coordinate system can also be a coordinate system different from the coordinate systems of the multiple cameras included in the electronic device, and no specific limitation is made here.

[0096] Continuing below with the first camera being the wide-angle camera, and taking the reference coordinate system as the coordinate system of the second camera, where the second camera is the main camera as an example, the above mapping magnification mechanism, that is, the determination process of the mapping relationship, will be described.

[0097] First, map the switching magnification of the wide-angle camera to the coordinate system of the main camera to obtain the mapped switching magnification (Map switch magnification).

[0098] Among them, the mapping ratio can be determined first. This mapping ratio is used to indicate the proportional relationship between the first FOV and the second FOV in the coordinate system of the second camera. Among them, the first FOV is the FOV corresponding to the switching magnification of the first camera, that is, the original FOV of the first camera. The second FOV is the FOV corresponding to the switching magnification of the second camera, that is, the original FOV of the second camera.

[0099] Exemplarily, combined with Figure 5 , the mapping ratio can be determined by the imaging width under the first FOV and the imaging width under the second FOV. For example, it can be determined according to Figure 5 C1 and C2 shown.

[0100] For example,

[0101] Generally, the original FOV of a camera is related to the imaging width of the camera under this original FOV and the focal length of this camera. For example, imaging width / focal length = tan(original FOV).

[0102] In this way, the relationship between the original FOV of the first camera (i.e., the first FOV) and the imaging width of this camera under this original FOV and the focal length f uw of this first camera is: (Second FOV).

[0103] The relationship between the original FOV of the second camera (i.e., the second FOV) and the imaging width of this camera under this original FOV and the focal length f w of this second camera is: (First FOV)

[0104] Then, the magnification corresponding to the first camera can be mapped from the coordinate system of this camera to the coordinate system of the second camera by replacing the focal length of the first camera in the above relationship with the focal length of the camera to which it needs to be mapped, that is, the focal length of the second camera.

[0105] Among them, the relationship after replacement is: (First FOV).

[0106] Based on the above:

[0107] That is, the mapping ratio can be determined by the following formula (1):

[0108]

[0109] Among them, α1 is the first FOV, and α2 is the second FOV. Continuing with the above example, taking the first camera as the wide-angle camera and the second camera as the main camera as an example, α1 is 118°, and α2 is 84°, so as to determine the mapping ratio = 5.5.

[0110] Then, the mapping switching magnification can be determined according to the determined mapping ratio and the switching magnification of the main camera.

[0111] For example, the mapping switching magnification can be determined by the following formula (2):

[0112]

[0113] That is, Map switch magnification = 5.5 * the switching magnification of the main camera. Among them, when the switching magnification of the main camera is 1X, according to the above formula, it can be determined that Map switch magnification = 5.5 * 1 = 5.5.

[0114] After that, based on the determined mapping switching magnification and the switching magnification of the wide-angle camera, the above mapping relationship can be determined.

[0115] Exemplarily, the above mapping relationship can be represented by the following formula (3):

[0116] Map zoom = F * zoom Formula (3)

[0117] Among them, F is related to the mapping switching magnification and the switching magnification of the wide-angle camera, Map zoom is the mapping magnification, and zoom is the zoom magnification currently selected by the user. For example, if the user adjusts the zoom magnification from zoom magnification 1 to zoom magnification 2, then zoom here is zoom magnification 2. In an example, taking zoom magnification 2 as 0.8X, inputting 0.8X into the above formula (3), the corresponding mapping magnification can be obtained, such as the mapping magnification is 0.72X.

[0118] After determining the mapping relationship in the above - mentioned manner, it can be ensured that during the process of camera switching, the transmitted FOV near the switching point is consistent, so that the picture presented to the user is a smoothly changing picture. That is, the change in the transmitted FOV caused by adjusting the zoom ratio is continuous, as Figure 6 shown, thus ensuring that the transmitted FOVs near the switching point are aligned.

[0119] After obtaining the mapping magnification, the electronic device can display the first camera, such as the preview image captured by the wide - angle camera at this mapping magnification (such as 0.72X). That is, the electronic device can obtain the image within the field of view corresponding to 0.72X, that is, obtain the preview image and display it.

[0120] Among them, the electronic device can first determine the FOV corresponding to this mapping magnification according to the mapping magnification. The FOV corresponding to the mapping magnification is the transmitted FOV at this time.

[0121] According to the principle of determining the mapping switching magnification, it can be known that:

[0122] Mapping magnification = mapping ratio * switching magnification of the second camera. And the mapping ratio = tan θ / tanα2, where X is the FOV corresponding to the mapping magnification, and α2 is the original FOV of the second camera.

[0123] Then, the mapping magnification = (tanX / tanα2) * switching magnification of the second camera, then,

[0124] X = arctan[(mapping magnification / switching magnification of the second camera) * tanα2] Formula (4).

[0125] Continuing with the above example, taking the switching magnification of the second camera as 1X and α2 as 84° as an example, then according to the above - mentioned formula (4), X can be obtained as 110°. That is, when the zoom ratio input by the user is 0.8X, the actual transmitted FOV after internal processing of the electronic device is 110°. Similarly, if the zoom ratio input by the user is 0.95X, the actual transmitted FOV after internal processing of the electronic device is 86°. It can be understood that the transmitted FOV near the 1X switching point approaches the transmitted FOV after switching the camera (main camera), such as 84°.

[0126] After determining the FOV corresponding to the mapping magnification, that is, after determining the transmitted FOV at this time, the electronic device can crop the image captured by the first camera based on this transmitted FOV. Exemplarily, the electronic device can crop the image captured by the first camera under the original FOV (such as called the original image) based on this transmitted FOV. After that, the cropped image, that is, the preview image, can be displayed to the user.

[0127] It should be noted that the mapping relationship obtained in the above embodiments can be understood as the mapping relationship corresponding to the first camera, which is used to implement the mapping of the zoom ratio during the shooting process using the first camera. For example, if the first camera is a wide-angle camera, the mapping relationship corresponding to the wide-angle camera can be obtained to implement the mapping of the zoom ratio during the shooting process using the wide-angle camera. It can be understood that if the first camera includes multiple cameras, the mapping relationship corresponding to each of these multiple cameras can be obtained separately to implement the mapping of the zoom ratio when shooting using the corresponding camera. For example, if the first camera includes a wide-angle camera and a telephoto camera, the mapping relationship corresponding to the wide-angle camera can be obtained. In this way, if an operation for adjusting the zoom ratio is received during the shooting process using the wide-angle camera, the zoom ratio mapping can be implemented based on this mapping relationship. The mapping relationship corresponding to the telephoto camera can also be obtained. In this way, if an operation for adjusting the zoom ratio is received during the shooting process using the telephoto camera, the zoom ratio mapping can be implemented based on this mapping relationship.

[0128] In addition, the above embodiments are described by taking the coordinate system of the second camera as the reference coordinate system as an example. Then, in the case of currently shooting using the second camera, if an operation for adjusting the zoom ratio is received by the user, there is no need to perform the zoom ratio mapping according to the above process, but directly crop and display the collected image according to the transmitted display FOV corresponding to the adjusted zoom ratio. In other embodiments, if the reference coordinate system is different from the coordinate systems of the first camera and the second camera in the above embodiments, then, in addition to determining the mapping relationship corresponding to the second camera to implement the mapping of the zoom ratio when shooting using the second camera, it is also necessary to determine the mapping relationship corresponding to the first camera to implement the mapping of the zoom ratio when shooting using the first camera. The specific process of determining the mapping relationship and implementing the zoom ratio mapping can refer to the description of the above embodiments and will not be elaborated in detail here.

[0129] With this technical solution, by mapping the zoom ratio from the first camera coordinate system to a unified reference coordinate system, the mapped zoom ratio is obtained. Then, the corresponding transmitted display FOV is determined according to the mapped zoom ratio, and further cropping and display are performed. This avoids the phenomenon that the presented picture jumps visually due to inconsistent transmitted display FOVs near the switching point, ensuring the user experience. And it is no longer necessary to rely on depth data to calculate the zoom ratio, and the real-time performance is better.

[0130] As Figure 7 shown, Figure 7 Figure Figure 2 shows a schematic flowchart of an image display method provided by an embodiment of the present application. The method may include: S701 - S703.

[0131] S701. Display the preview image captured by the first camera.

[0132] S702. Receive the operation of the user to adjust the zoom ratio 1 to the zoom ratio 2.

[0133] Among them, the specific descriptions of S701 - S702 can refer to the specific descriptions of the corresponding contents in S401 - S402 in the above - mentioned embodiments, and will not be elaborated here in detail.

[0134] S703. In response to the operation in S702, display the preview image captured by the first camera; the preview image is obtained by cropping the image captured by the first camera based on the target FOV; the target FOV and the zoom ratio 2 satisfy a mapping relationship, and the mapping relationship is used to unify the FOVs of the first camera and the second camera near the switching point.

[0135] Among them, the preview image in S703 is the first preview image in the embodiments of the present application.

[0136] Exemplarily, after the electronic device receives the operation of the user to adjust the zoom ratio 1 to the zoom ratio 2, in response to this operation, it can determine the target FOV as the FOV for display based on the zoom ratio 2 and the mapping relationship, and obtain and display the preview image based on the target FOV. For example, the electronic device can crop the image captured by the first camera under the original FOV (such as called the original image) based on the target FOV to obtain and display the preview image.

[0137] For example, taking the first camera as a wide - angle camera, the zoom ratio 1 as 0.5X, and the zoom ratio 2 as 0.8X as an example. After the electronic device receives the operation of the user to adjust the zoom ratio from 0.5X to 0.8X, as a response, the electronic device can determine the target FOV corresponding to 0.8X based on the mapping relationship. For example, the electronic device can obtain the target FOV corresponding to 0.8X as 110° based on the mapping relationship. Then, the electronic device can crop the image captured by the wide - angle camera under the original FOV (such as 118°) based on 110° to obtain and display the 110° preview image.

[0138] Among them, the mapping relationship is used to unify the FOVs of the first camera and the second camera near the switching point. It can be understood that for the same zoom ratio, the target FOV determined based on the mapping relationship is different from the FOV determined in the related art based on this zoom ratio. For example, the FOV corresponding to 0.95X determined in the related art is 90°, while the FOV corresponding to 0.95X determined in the present application is 86°. Compared with the related art, near the switching point where the first camera and the second camera are switched, the FOV for display can be basically kept consistent.

[0139] In an embodiment of the present application, the above mapping relationship can be determined based on the switching magnification of the first camera, the original FOV corresponding to the switching magnification of the first camera, the switching magnification of the second camera, and the original FOV corresponding to the switching magnification of the second camera. For example, curve fitting can be performed based on the switching magnification of the first camera and the original FOV corresponding to the switching magnification of the first camera, the switching magnification of the second camera, and the original FOV corresponding to the switching magnification of the second camera to obtain a smooth curve, that is, the mapping relationship.

[0140] Among them, curve fitting can refer to selecting an appropriate curve type to fit the observed data. In this embodiment, there are various ways of curve fitting, such as quadratic function, cubic function, B-spline, Bezier curve, etc. The embodiments of the present application do not make specific limitations here.

[0141] The above first camera can be a wide-angle camera or a telephoto camera. The second camera can be the main camera. Then, by performing the above curve fitting process, the transmitted display FOV can be basically kept consistent near the switching point where the first camera and the second camera are switched. The first camera can also include multiple cameras, such as including a wide-angle camera and a telephoto camera. Then, the switching magnification of each camera in these multiple cameras and the original FOV corresponding to the switching magnification are all used for curve fitting. In this way, the transmitted display FOV can be basically kept consistent near the switching point where these multiple cameras and the second camera are switched.

[0142] Combined with Figure 8 As shown, taking the first camera including multiple cameras, such as including a wide-angle camera and a telephoto camera, and the second camera being the main camera as an example, the switching magnification of the wide-angle camera and the corresponding original FOV, such as (0.5X, 118°), the switching magnification of the telephoto camera and the corresponding original FOV, such as (2.5X, 26.8°), are curve-fitted with the switching magnification of the main camera and the corresponding original FOV, (1X, 84°), so as to obtain a curve as shown in Figure 8 As shown, that is, the above mapping relationship is obtained. In this way, during the process of the user adjusting the zoom magnification, the corresponding target FOV can be determined based on this mapping relationship as the transmitted display FOV to realize the display of the preview image.

[0143] Adopting this technical solution, the target FOV corresponding to the zoom magnification is obtained through the mapping magnification mechanism, so that the transmitted display FOV near the switching point where different cameras are switched can be basically kept consistent. It avoids the phenomenon that the presented picture jumps visually due to the inconsistent transmitted display FOV near the switching point, and ensures the user experience. And it is no longer necessary to rely on depth data to calculate the zoom magnification, and the real-time performance is better.

[0144] As can be understood from the above embodiments, after receiving the zoom ratio input by the user, the electronic device can determine the actual displayed FOV, that is, the displayed FOV, according to the input zoom ratio, and then crop the image collected by the camera based on the displayed FOV and display it. However, for an electronic device including multiple cameras, different cameras are set at different positions of the electronic device. That is to say, there is a physical distance between different cameras. In this way, when switching between different cameras, due to the physical distance between different cameras, the position of the object being photographed in the preview image presented to the user before and after switching cameras will change, resulting in parallax for the user and poor user experience.

[0145] In order to ensure that the position of the object being photographed in the preview image presented to the user before and after switching cameras does not jump, in the embodiments of the present application, after receiving the operation of the user to adjust the zoom ratio, the electronic device can determine the corresponding offset at different zoom ratios to adjust the position of the object being photographed in the preview image, so that the position of the object being photographed in the preview image presented to the user before and after switching cameras remains basically the same.

[0146] Among them, the object being photographed that needs to keep the position basically the same can be called the target object in this embodiment. The target object can be any one or more of the objects being photographed included in the current scene. For example, the target object can at least include the object being photographed at the center position of the current scene.

[0147] The following Figure 9 and Figure 12 The embodiments shown are used to illustrate the above process in detail.

[0148] Figure 9 Another schematic flowchart of the image display method provided by the embodiments of the present application Figure 1 The method may include: S901-S902.

[0149] S901. Receive the operation of the user to adjust the zoom ratio 1 to the zoom ratio 2.

[0150] Among them, the zoom ratio 1 can be the first ratio in the embodiments of the present application, and the zoom ratio 2 can be the second ratio in the present application.

[0151] S902. In response to the operation in S901, display the first preview image collected by the first camera; wherein, the first preview image is obtained by cropping the image collected by the first camera at the zoom ratio 2 based on the first offset; the first offset is related to the second offset and the magnification adjustment amount.

[0152] Among them, the second offset is the offset between the target object in the first image and the target object in the second image. The first image is an image collected by the first camera at the first switching magnification, and the second image is an image collected by the second camera at the second switching magnification.

[0153] Exemplarily, after the electronic device receives the operation of the user adjusting the zoom magnification 1 to the zoom magnification 2 and responds to this operation, the electronic device can determine the display FOV corresponding to the zoom magnification 2. The electronic device can also determine the first offset (e.g., referred to as use offset). After that, the electronic device can crop the image (or referred to as the original image) collected by the first camera under the original FOV based on the display FOV and the first offset to obtain the display image, that is, the above-mentioned first preview image.

[0154] For example, taking the first camera as a wide-angle camera as an example. When the zoom magnification 1 is 0.5X and the zoom magnification 2 is 0.6X, after the electronic device receives the operation of the user adjusting the zoom magnification 1 to the zoom magnification 2, it can determine the display FOV corresponding to 0.6X and determine the first offset corresponding to this zoom magnification adjustment. After that, the electronic device can crop the original image collected by the first camera based on the display FOV and the first offset corresponding to this zoom magnification adjustment to obtain the display image and display it. After that, the user adjusts the zoom magnification again, such as adjusting the zoom magnification from 0.6X to 0.8X. Responding to this operation, it can determine the display FOV corresponding to 0.8X and determine the first offset corresponding to the second zoom magnification adjustment, and based on this, obtain the preview image and display it.

[0155] It should be noted that the electronic device can use the method of the above Figure 4 or Figure 7 shown embodiment to determine the display FOV corresponding to the zoom magnification 2. In some other embodiments, the electronic device can also use the method in the related art to determine the display FOV corresponding to the zoom magnification 2, and the embodiments of the present application do not make specific limitations here.

[0156] Among them, the above-mentioned first offset is related to the second offset (total offset) and the magnification adjustment amount. Among them, the second offset refers to the total offset required during the switching of the two cameras.

[0157] Exemplarily, taking two cameras as the first camera and the second camera as an example. The total offset required during the switching process of the first camera and the second camera, that is, the second offset, can be determined based on the offset between the target objects in the first image acquired by the first camera at the first switching magnification and the second image acquired by the second camera at the second switching magnification. For example, if the first camera is a wide-angle camera, the second camera is the main camera, the first switching magnification is 0.5X, and the second switching magnification is 1X, then the total offset, that is, the second offset, can be determined according to the position of the target object in the first image acquired by the wide-angle camera at 0.5X and the position of the target object in the second image acquired by the main camera at 1X.

[0158] Among them, the positions of the target object in the first image and the second image can be determined by feature point matching or feature point tracking. The so-called feature point matching can refer to finding matching feature points in two images and calculating the pixel difference to obtain the offset of the same feature point. Then, through feature point matching, the offset of the same target object in the first image and the second image can be obtained, and this offset is the above-mentioned second offset. For example, if the target object corresponds to feature point A in the first image, the pixel of feature point A is (300, 400), and the target object corresponds to feature point B in the second image, and the pixel of feature point B is (600, 800), then by determining the pixel difference between feature point A and feature point B, the above-mentioned second offset can be determined.

[0159] The so-called feature point tracking can refer to finding obvious feature points in the image, tracking the obvious feature points, and calculating the pixel difference of the feature points before and after tracking to obtain the offset of the same feature point. Then, through feature point tracking, the change amount of the position of the same target object in the first image and the second image can be obtained, and this change amount is the above-mentioned second offset. For example, if the target object corresponds to feature point C in the first image and to feature point D in the second image, then by determining the pixel difference between feature point C and feature point D, the above-mentioned second offset can be determined.

[0160] In addition, since the sizes of the images acquired by different cameras are not the same, before determining the second offset, the sizes of the images acquired by different cameras can be unified first. For example, to determine the second offset based on the positions of the target object in the first image and the second image, specifically, it can include: unifying the sizes of the first image and the second image. After that, the second offset can be determined based on the position of the target object in the first image with the unified size and the position of the target object in the second image.

[0161] Exemplarily, taking the first camera as a wide-angle camera and the second camera as the main camera, the transmitted FOV is based on the above Figure 4 or Figure 7The embodiment shown is taken as an example. Figure 10 As shown, the size of the image captured by the wide-angle camera at its switching magnification is 4000*3000, that is, the size of the first image is 4000*3000. Figure 10 As shown in 101 in FIG. 101 , the size of the image captured by the main camera at the switching magnification is 3600*2400, that is, the size of the second image is 3600*2400, as shown in FIG. Figure 10 Then, the sizes of the first image and the second image are unified, for example, the first image is reduced so that the size of the reduced first image is the same as the size of the second image, for example, the reduced first image is called the third image, that is, the size of the third image is 3600*2400, as shown in FIG. Figure 10 After the above-mentioned sizes are scaled to be consistent, the offset between the position of the target object in the second image and the position of the target object in the third image is determined, such as, Figure 10 103 in A and Figure 10 The distance between B in 102 can obtain the above-mentioned second offset.

[0162] It should be noted that the above embodiment is described by reducing the first image to unify the sizes of the first image and the second image. In some other implementations, the sizes of the first image and the second image may be unified by enlarging the second image, which is not specifically limited here.

[0163] In another exemplary embodiment, the first camera is a wide-angle camera, the second camera is a main camera, and the FOV is based on the above Figure 4 or Figure 7 The embodiment shown is determined as an example. Figure 10 As shown, the size of the image captured by the wide-angle camera at its switching magnification is 4000*3000, that is, the size of the first image is 4000*3000. Figure 10 As shown in 101 in FIG. 101 , the size of the image captured by the main camera at the switching magnification is 3600*2400, that is, the size of the second image is 3600*2400, as shown in FIG. Figure 10 Then, the sizes of the first image and the second image are unified. For example, the sizes of the first image and the second image can be scaled to a unified size, such as 300*400, to obtain a corresponding scaled image, such as the third image 1. Figure 10 As shown in 104 and the third image 2, as Figure 10 After the above-mentioned sizes are scaled to be consistent, the offset between the position of the target object in the third image 1 and the position of the target object in the third image 2 can be determined, such as, Figure 10 104 C and Figure 10 The second offset can be obtained by calculating the distance between D in 105.

[0164] In this way, after receiving the operation of the user to adjust the zoom ratio from zoom ratio 1 to zoom ratio 2, the electronic device can determine the first offset corresponding to the current zoom ratio adjustment based on the above-mentioned second offset, zoom ratio 1, and zoom ratio 2. Combining Figure 11 , specifically, first, the proportion of the current adjustment amount from zoom ratio 1 to zoom ratio 2 in the total adjustment amount from the first switching ratio to the second switching ratio can be obtained. Then, the first offset corresponding to the current zoom ratio adjustment can be determined based on this proportion and the third offset.

[0165] Among them, as an example, the proportion of the above-mentioned current adjustment amount in the total adjustment amount can be determined by the following formula (5):

[0166] Ratio rate = (zoom ratio 2 - zoom ratio 1) / (second switching ratio - first switching ratio) Formula (5)

[0167] Among them, Ratio rate is the proportion of the above-mentioned current adjustment amount in the total adjustment amount, the first switching ratio is the switching ratio of the first camera, and the second switching ratio is the switching ratio corresponding to the second camera.

[0168] The first offset corresponding to the current zoom ratio adjustment can be determined by the following formula (6):

[0169] Use offset = offset * Ratio rate Formula (6)

[0170] Among them, Ratio rate is the proportion of the above-mentioned current adjustment amount in the total adjustment amount, Use offset is the first offset corresponding to the current zoom ratio adjustment, and offset is the third offset.

[0171] If the current adjustment of the zoom ratio is the first adjustment of the zoom ratio by the user after the camera is turned on, the third offset can be the above-mentioned second offset. If the current adjustment of the zoom ratio is not the first adjustment, the third offset is the remaining offset (remain offset) in the second offset. Among them, the remaining offset can be obtained by subtracting the cumulative offset from the second offset. The cumulative offset is the cumulative sum of the offset adjustments before the current adjustment of the zoom ratio.

[0172] Exemplarily, in the case where the current adjustment of the zoom ratio is the first adjustment of the zoom ratio by the user, the first offset corresponding to the current zoom ratio adjustment can be determined by the following formula (7):

[0173] Use offset = total offset * Ratio rate, Formula (7)

[0174] For example, taking the first camera as a wide-angle camera with a first switching magnification of 0.5X, the second camera as the main camera with a second switching magnification of 1X. The user adjusts the zoom magnification from zoom magnification 1 to zoom magnification 2, such as from 0.5X to 0.6X. The second offset is 10 cm. According to the above proportion formula (6), Ratio rate = (0.6X - 0.5X) / (1X - 0.5X) = 0.2 can be determined. Then, according to the above formula (7), the first offset corresponding to this zoom magnification adjustment, Use offset = 10 * 0.2 = 2 cm, can be determined.

[0175] Also exemplarily, when this adjustment of the zoom magnification is not the first adjustment, the first offset corresponding to this zoom magnification adjustment can be determined through the following formula (8):

[0176] Use offset = remain offset * Ratio rate, Formula (8)

[0177] Exemplarily, if the user adjusts from zoom magnification 1 to zoom magnification 2, such as from 0.6X to 0.8X. The remaining offset in the second offset is 8 cm. According to the above proportion formula, Ratio rate = (0.8X - 0.6X) / (1X - 0.5X) = 0.4 is determined. Then, according to the above formula for the first offset, Use offset = 8 * 0.4 = 3.2 cm is determined.

[0178] After determining the first offset and the display FOV, the electronic device can crop the image (or called the original image) under the original FOV collected by the first camera based on the display FOV and the first offset to obtain the display image, that is, the above first preview image.

[0179] Adopting this technical solution, after receiving the user's operation of adjusting the zoom magnification, the electronic device can determine the corresponding offsets at different zoom magnifications to adjust the position of the photographed object in the preview image, so that the position of the photographed object in the preview image presented to the user remains basically the same before and after switching the camera. And it no longer relies on stereo correction to adjust the position of the photographed object in the preview image, and the real-time performance is better.

[0180] Figure 12 Another schematic flowchart of an image display method provided by an embodiment of the present application Figure 2 This method may include: S1201 - S1202.

[0181] S1201. Receive the operation of the user to adjust the zoom ratio 1 to the zoom ratio 2.

[0182] S1202. In response to the operation in S1201, display the first preview image captured by the first camera; wherein, the first preview image is obtained by cropping the original image captured by the first camera at the zoom ratio 2 based on the first offset; the first offset and the zoom ratio 2 satisfy a mapping relationship, and the mapping relationship includes the corresponding relationship between different ratios and offsets.

[0183] Specific descriptions of S1201 - S402 can refer to the specific descriptions of the corresponding content in S401 - S402 in the above - mentioned embodiments, and will not be elaborated here.

[0184] The implementation process in this embodiment is similar to Figure 9 However, the difference is that the process of determining the first offset in this embodiment is different from that in Figure 9 the embodiment. Specifically, the first offset in this embodiment is determined based on the mapping relationship.

[0185] Among them, the mapping relationship includes the corresponding relationship between different ratios and offsets. The above - mentioned mapping relationship can be determined based on the second switching ratio and the second offset of the second camera. Since the first camera is switched to the second camera, the mapping relationship can be determined based on the second switching ratio and the second offset of the second camera. Taking the first camera as a wide - angle camera and the second camera as a main camera as an example. For example, a curve function is performed on the second switching ratio and the second offset of the main camera to obtain a smooth curve, that is, the mapping relationship.

[0186] Exemplarily, the function curve can be an inverse - proportion function. That is to say, the above - mentioned mapping relationship can be determined by using the inverse - proportion function based on the second switching ratio and the second offset of the second camera. For example, the determined mapping relationship can be as Figure 13 shown.

[0187] It should be noted that the above embodiments are described by taking the first camera as a wide - angle camera as an example. In some other embodiments, when the first camera includes multiple cameras, such as including a wide - angle camera and a telephoto camera, the determination of the mapping relationship can refer to the overview of the corresponding content in S703, and will not be overviewed here.

[0188] Adopting this technical solution, the electronic device can, after receiving the operation of the user to adjust the zoom ratio, determine the corresponding offsets at different zoom ratios to adjust the position of the object to be photographed in the preview image, so that the position of the object to be photographed in the preview image presented to the user remains basically the same before and after switching the camera. In addition, it no longer relies on stereo correction to adjust the position of the object to be photographed in the preview image, and the real - time performance is better.

[0189] In summary, by displaying images in the above manner, it can be ensured that the transmitted FOV near the switching points where different cameras are switched is basically the same, and the positions of the photographed objects in the preview images presented to the user are basically the same. Thus, the user experience can be guaranteed.

[0190] Some other embodiments of the present application provide an electronic device, which may include: the above-mentioned display screen, multiple cameras, a memory, and one or more processors. The display screen, multiple cameras, memory, and processor are coupled. The memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device can execute each function or step performed by the mobile phone in the above method embodiments. The structure of the electronic device can refer to Figure 3 the structure of the mobile phone shown.

[0191] Some embodiments of the present application also provide a chip system, as Figure 14 shown, the chip system 1400 includes at least one processor 1401 and at least one interface circuit 1402. The processor 1401 and the interface circuit 1402 can be interconnected through a line. For example, the interface circuit 1402 can be used to receive signals from other devices (such as the memory of the electronic device). For another example, the interface circuit 1402 can be used to send signals to other devices (such as the processor 1401). Exemplarily, the interface circuit 1402 can read the instructions stored in the memory and send the instructions to the processor 1401. When the instructions are executed by the processor 1401, the electronic device can execute each step in the above embodiments. Of course, the chip system can also include other discrete devices, and the present application embodiments do not make specific limitations on this.

[0192] Some embodiments of the present application also provide a computer storage medium, which includes computer instructions. When the computer instructions run on the above-mentioned electronic device, the electronic device is enabled to execute each function or step performed by the electronic device in the above method embodiments.

[0193] Some embodiments of the present application also provide a computer program product. When the computer program product runs on a computer, the computer is enabled to execute each function or step performed by the electronic device in the above method embodiments.

[0194] Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and conciseness of description, only the above division of each functional module is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0195] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling, direct coupling, or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the devices or units can be in electrical, mechanical, or other forms.

[0196] The units described as separate components may or may not be physically separated. The components displayed as units may be one physical unit or multiple physical units, that is, they can be located in one place, or they can be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0197] In addition, in each embodiment of the present application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0198] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to enable a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods described in each embodiment of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.

[0199] The above content is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any change or replacement within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. An image display method, characterized in that, Applied to an electronic device including multiple cameras, the multiple cameras including a first camera, the method includes: Receiving a user's selection operation for a first magnification; In response to the selection operation, displaying a first preview image captured by the first camera at a second magnification, where the second magnification and the first magnification satisfy a mapping relationship, and the mapping relationship is used to indicate the relationship of different magnifications mapped from the coordinate system of the first camera to a reference coordinate system.

2. The method according to claim 1, wherein The multiple cameras further include a second camera, and the reference coordinate system is the coordinate system of the second camera. The method further includes: Mapping the switching magnification of the first camera to the coordinate system of the second camera to obtain a mapped switching magnification; Based on the mapped switching magnification and the switching magnification of the first camera, determining the mapping relationship.

3. The method according to claim 2, wherein The mapping the switching magnification of the first camera to the coordinate system of the second camera to obtain a mapped switching magnification includes: Determining a mapping ratio based on a first FOV and a second FOV; the first FOV is the FOV corresponding to the switching magnification of the first camera, and the second FOV is the FOV corresponding to the switching magnification of the second camera; the mapping ratio is used to indicate the proportional relationship between the first FOV and the second FOV in the coordinate system of the second camera; Based on the mapping ratio and the switching magnification of the second camera, determining the mapped switching magnification.

4. The method according to any one of claims 1 to 3, characterized in that, The displaying the first preview image captured by the first camera at a second magnification includes: Determining the FOV corresponding to the second magnification; Based on the FOV corresponding to the second magnification, cropping the image captured by the first camera to obtain the first preview image; Displaying the first preview image.

5. The method according to any one of claims 2-4, wherein The second camera is the main camera of the electronic device; The first camera includes a wide-angle camera and / or a telephoto camera of the electronic device.

6. An image display method, characterized in that, Applied to an electronic device including multiple cameras, the multiple cameras including a first camera and a second camera, the method includes: Receiving a user's selection operation for a first magnification; In response to the selection operation, displaying a first preview image captured by the first camera; the first preview image is obtained by cropping the image captured by the first camera based on a target FOV; the target FOV and the first magnification satisfy a mapping relationship, and the mapping relationship is used to unify the FOVs of the first camera and the second camera at the switching point.

7. The method according to claim 6, characterized in that, The method further includes: Based on the switching magnification of the first camera, the first FOV, the switching magnification of the second camera, and the second FOV, determining the mapping relationship; wherein, the first FOV is the FOV corresponding to the switching magnification of the first camera, and the second FOV is the FOV corresponding to the switching magnification of the second camera.

8. The method according to claim 7, wherein The determining the mapping relationship based on the switching magnification of the first camera, the first FOV, the switching magnification of the second camera, and the second FOV includes: Based on the switching magnification and the first FOV of the first camera, and the switching magnification and the second FOV of the second camera, a curve fitting is performed using a fitting function to obtain the mapping relationship.

9. The method according to any one of claims 6 - 8, characterized in that, The displaying of the first preview image captured by the first camera includes: Determining the target FOV corresponding to the first magnification based on the mapping relationship; Cropping the image captured by the first camera based on the target FOV to obtain the first preview image; Displaying the first preview image.

10. The method according to any one of claims 6-9, wherein The second camera is the main camera of the electronic device; The first camera includes the wide-angle camera and / or the telephoto camera of the electronic device.

11. An electronic device, characterized in that, The electronic device includes: a memory, multiple cameras, and one or more processors; the memory, the cameras are coupled to the processor; Wherein, the memory is used to store computer program code, and the computer program code includes computer instructions; when the computer instructions are executed by the processor, the electronic device is caused to execute the method according to any one of claims 1-10.

12. A computer-readable storage medium, characterized in that, Including computer instructions; When the computer instructions run on the electronic device, the electronic device is caused to execute the method according to any one of claims 1-10.

Citation Information

Patent Citations

  • Camera switching method and device, electronic equipment and storage medium

    CN112995511A

  • Zoom control method and device, electronic equipment and computer readable storage medium

    CN113630549A

  • Zoom control method, system, equipment and medium

    CN114285992A

  • Multiplying power switching method and multiplying power switching device

    CN116709016A

  • Photographing method and electronic device

    US20220360715A1