Image processing method and device, electronic equipment, storage medium and program product

By determining the current sensor, transition sensor and target sensor during the zooming process, and aligning and cropping of image data, the ghosting problem when the zoom ratio changes is solved, and the smoothness and stability of the zoom are achieved.

CN120282027APending Publication Date: 2025-07-08GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510449471.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

In traditional technology, when the zoom magnification changes significantly, the alignment and fusion processing of image data leads to ghosting, resulting in poor zoom smoothness.

Method used

By determining the current sensor, transition sensor and target sensor, and multiple transition zoom magnifications, image data alignment and cropping for each transition zoom magnification, gradually transitioning the zoom magnification to match the field of view angle, avoiding mutations in the field of view angle and mutations in the subject's position.

Benefits of technology

提高了变焦的平滑性,避免了视场角突变导致的画面跳变,确保拍摄对象位置的稳定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120282027A_ABST
    Figure CN120282027A_ABST
Patent Text Reader

Abstract

The invention relates to an image processing method and device, electronic equipment, a storage medium and a program product. The method comprises the steps of determining a current sensor, a transition sensor, a target sensor and a plurality of transition zoom magnifications based on an initial zoom magnification and a target zoom magnification in response to a zoom operation; aiming at each transition zoom ratio, determining image data to be aligned from the first image data corresponding to the current sensor and the second image data corresponding to the transition sensor based on the size relationship between the transition zoom ratio and the switching zoom ratio of the transition sensor; aligning the to-be-aligned image data to third image data corresponding to the target sensor to obtain aligned image data; cutting the aligned image data based on the transition zoom ratio to obtain cut image data corresponding to the transition zoom ratio; and determining target image data based on the cut image data. By adopting the method, the zooming smoothness can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technologies, and in particular, to an image processing method, apparatus, electronic device, storage medium, and program product. Background Art

[0002] With the development of image processing technologies, an electronic device can perform alignment and fusion processing on image data collected by multiple cameras through an image fusion technology to obtain image data for preview or storage by the electronic device.

[0003] In the traditional technology, when the zoom ratio changes significantly, even if the image data collected by the current camera and the image data collected by the target camera are aligned and fused, the obtained image data will have "ghosting", resulting in poor smoothness of zooming. Summary of the Invention

[0004] Embodiments of the present application provide an image processing method, apparatus, electronic device, and computer-readable storage medium, which can improve the smoothness of zooming.

[0005] In a first aspect, the present application provides an image processing method, including:

[0006] In response to a zoom operation, based on a starting zoom ratio and a target zoom ratio, determining a current sensor, a transition sensor, and a target sensor, as well as a plurality of transition zoom ratios;

[0007] For each transition zoom ratio, based on the magnitude relationship between the transition zoom ratio and the switching zoom ratio of the transition sensor, determining image data to be aligned from the first image data corresponding to the current sensor and the second image data corresponding to the transition sensor;

[0008] Aligning the image data to be aligned with third image data corresponding to the target sensor to obtain aligned image data;

[0009] Cropping the aligned image data based on the transition zoom ratio to obtain cropped image data corresponding to the transition zoom ratio;

[0010] Based on the cropped image data, determining target image data.

[0011] In a second aspect, the present application further provides an image processing apparatus, including:

[0012] A response module, configured to, in response to a zoom operation, based on a starting zoom ratio and a target zoom ratio, determine a current sensor, a transition sensor, and a target sensor, as well as a plurality of transition zoom ratios;

[0013] A selection module, configured to determine, for each transition zoom magnification, the image data to be aligned from the first image data corresponding to the current sensor and the second image data corresponding to the transition sensor based on the magnitude relationship between the transition zoom magnification and the switching zoom magnification of the transition sensor;

[0014] An alignment module, configured to align the image data to be aligned with the third image data corresponding to the target sensor to obtain aligned image data;

[0015] A cropping module, configured to crop the aligned image data based on the transition zoom magnification to obtain cropped image data corresponding to the transition zoom magnification;

[0016] A processing module, configured to determine target image data based on the cropped image data.

[0017] In a third aspect, the present application further provides an electronic device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the steps of the method according to any one of the first aspect are implemented.

[0018] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method according to any one of the first aspect are implemented.

[0019] In a fifth aspect, the present application further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of the first aspect are implemented.

[0020] The above image processing method, apparatus, electronic device, storage medium, and program product, in response to a zoom operation, determine a current sensor, a transition sensor, and a target sensor, as well as a plurality of transition zoom ratios based on a starting zoom ratio and a target zoom ratio; for each transition zoom ratio, determine image data to be aligned from the first image data corresponding to the current sensor and the second image data corresponding to the transition sensor based on the magnitude relationship between the transition zoom ratio and the switching zoom ratio of the transition sensor; align the image data to be aligned with the third image data corresponding to the target sensor to obtain aligned image data; crop the aligned image data based on the transition zoom ratio to obtain cropped image data corresponding to the transition zoom ratio; and determine target image data based on the cropped image data. By determining the image data to be aligned from the first image data corresponding to the current sensor and the second image data corresponding to the transition sensor based on the magnitude relationship between the transition zoom ratio and the switching zoom ratio of the transition sensor, and aligning each piece of image data to be aligned with the third image data collected by the target sensor, that is, as the transition zoom ratio changes, the offset between the aligned image data and the third image data gradually decreases. Crop the aligned image data based on the transition zoom ratio so that the field of view angle of the cropped image data matches the transition zoom ratio, and determine the target image data based on the cropped image data. That is, as the transition zoom ratio changes, a gradual transition of the zoom ratio is achieved, avoiding sudden jumps in the screen caused by sudden changes in the field of view angle, and the offset between the target image data and the third image data gradually decreases, avoiding sudden changes in the position of the photographed object in the screen and improving the smoothness of zooming. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments of the present application or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.

[0022] Figure 1 It is a flowchart of an image processing method in an embodiment;

[0023] Figure 2A It is a schematic diagram of a camera of an electronic device in an embodiment;

[0024] Figure 2B It is a schematic diagram of a camera of an electronic device in an embodiment;

[0025] Figure 3 It is a schematic diagram of the position of a camera of an electronic device in an embodiment;

[0026] Figure 4 Schematic diagram of the determination process of target image data in an embodiment;

[0027] Figure 5 Schematic diagram of the backward shift of the reference optical variable point in an embodiment;

[0028] Figure 6 Schematic diagram of the equivalent position of the camera in an embodiment;

[0029] Figure 7 Schematic diagram of the process of an image processing method in an embodiment;

[0030] Figure 8 Block diagram of the structure of an image processing apparatus in an embodiment;

[0031] Figure 9 Internal structure diagram of an electronic device in an embodiment. Detailed implementation manners

[0032] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0033] In some exemplary embodiments, as Figure 1 shown, an image processing method is provided. Taking the application of this method to an electronic device as an example for illustration, the electronic device can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, smart cars, etc., and the portable wearable devices can be smart watches and smart bracelets, etc. It can be understood that this method can also be applied to a system including an electronic device and a server and implemented through the interaction between the electronic device and the server. In this embodiment, the method includes the following steps 102 to 110. Among them:

[0034] Step 102, in response to a zoom operation, determine a current sensor, a transition sensor, a target sensor, and a plurality of transition zoom ratios based on a starting zoom ratio and a target zoom ratio.

[0035] Among them, the zoom operation refers to the operation of adjusting the zoom ratio, and the zoom operation can be one of slide cutting or point cutting, etc. The zoom ratio refers to the ratio of the magnification or reduction of the camera's viewing angle. The starting zoom ratio refers to the zoom ratio of the electronic device at the moment when the target zoom ratio is obtained. The target zoom ratio refers to the zoom ratio that the electronic device needs to reach in response to the zoom operation. The sensor refers to the image sensor in the electronic device. There are multiple image sensors in the electronic device, including but not limited to an ultra-wide-angle (Ultra Wide Angle, abbreviated as Ultra Wide or UW) sensor, a wide-angle (Wide Angle, abbreviated as Wide or W) sensor, a telephoto (Telephoto, abbreviated as Tele or T) sensor, and an ultra-telephoto (Ultra Telephoto, abbreviated as UT) sensor, etc. For example, the schematic diagram of the camera of the electronic device is as Figure 2A and 2B shown. The electronic device includes 4 cameras, and the arrangement of the 4 cameras can be the two arrangements shown in Figure 2A and 2B shown. The 4 cameras are UW camera, W camera, Tele camera, and UT camera respectively. Then, the electronic device includes 4 image sensors, namely UW sensor, W sensor, Tele sensor, and UT sensor respectively.

[0036] The current sensor refers to the image sensor that is turned on at the starting zoom ratio. The transition sensor refers to the image sensor that is turned on between the starting zoom ratio and the target zoom ratio. It can be understood that in a large-span zoom scenario, in order to achieve a smooth visual transition of the image, the image sensor in the intermediate zoom segment between the starting zoom ratio and the target zoom ratio that is temporarily enabled. The target sensor refers to the image sensor that is turned on when the target zoom ratio is reached. The transition zoom ratio refers to the intermediate zoom ratio during the zoom process. It can be understood that it is the intermediate zoom ratio between switching from the starting zoom ratio to the target zoom ratio.

[0037] Exemplarily, in the image shooting mode or the video recording mode, the electronic device, in response to the zoom operation, obtains the target zoom ratio, the current zoom ratio at this time, and the current sensor that is currently turned on; based on the current zoom ratio and the target zoom ratio, determines the transition sensor and the target sensor; turns on the transition sensor and the target sensor; obtains the target zoom curve, and based on the current zoom ratio, the target zoom ratio, and the target zoom curve, determines multiple transition zoom ratios between the current zoom ratio and the target zoom ratio. The target zoom curve refers to the curve used to determine the transition zoom ratio.

[0038] In some exemplary embodiments, determining a transition zoom ratio and a target zoom ratio based on a current zoom ratio and the target zoom ratio includes: determining a first zoom ratio interval in which the current zoom ratio is located; determining a second zoom ratio interval in which the target zoom ratio is located; determining a target sensor corresponding to the second zoom ratio interval; and determining a transition sensor based on the first zoom ratio interval and the second zoom ratio interval. Here, the first zoom ratio interval refers to the sensor zoom ratio interval in which the current zoom ratio is located. The second zoom ratio interval refers to the sensor zoom ratio interval in which the target zoom ratio is located. The sensor zoom ratio interval refers to the zoom ratio interval corresponding to an image sensor. For example, the sensor zoom ratio interval of an ultra-wide-angle sensor is [0.6X, 1X), the sensor zoom ratio interval of a wide-angle sensor is [1X, 3X), the sensor zoom ratio interval of a telephoto sensor is [3X, 6X), and the sensor zoom ratio interval of an ultra-telephoto sensor is [6X, 10X).

[0039] In some exemplary embodiments, determining a transition sensor based on the first zoom ratio interval and the second zoom ratio interval includes: when there is at least one sensor zoom ratio interval between the first zoom ratio interval and the second zoom ratio interval, and when an image sensor corresponding to one of the sensor zoom ratio intervals is a fallback switch sensor, determining the fallback switch sensor as the transition sensor. Here, the fallback switch sensor refers to an image sensor for a Fallback scenario. Fallback is a mechanism for switching lenses according to the shooting scene distance and the shooting environment brightness. The fallback switch sensor can be a pre-configured image sensor for the Fallback scenario. For example, the fallback switch sensor is a wide-angle image sensor, or the fallback switch sensor is a telephoto image sensor.

[0040] In some exemplary embodiments, the electronic device includes at least three cameras, each camera corresponding to a sensor. The minimum straight-line distance between the cameras is greater than a distance threshold. In response to a zoom operation, the electronic device obtains the current zoom ratio, the target zoom ratio, and the current sensor corresponding to the current zoom ratio; determines the sensors to be turned on based on the current zoom ratio and the target zoom ratio; when the sensors to be turned on include a transition sensor and a target sensor, determines the distance between the electronic device and the object to be photographed; when the distance is less than a distance threshold, it is determined as a close-range large-span zoom scenario; after determining as a close-range large-span zoom scenario, turns on the transition sensor and the target sensor, and determines a plurality of transition zoom ratios based on the starting zoom ratio and the target zoom ratio. The distance threshold refers to the threshold used for comparison with the minimum straight-line distance. If the minimum straight-line distance between the cameras is greater than the distance threshold, it means that the cameras of the electronic device are far apart. In a close-range large-span zoom scenario, the distance between the object to be photographed and the cameras is small. Since the cameras are far apart, the field-of-view ranges of the image data collected by the sensors of different cameras vary greatly, and the image data collected by multiple sensors cannot be completely aligned during the zoom process, resulting in abnormal jumps in the field-of-view angle during the zoom process. The arrangement of the cameras in the electronic device can be set according to actual needs and is not limited here. For example, the schematic diagram of the positions of the cameras of the electronic device is as Figure 3 shown, such as Figure 3 shown, the electronic device includes three cameras, and the arrangement of the three cameras in the electronic device can be vertically arranged, horizontally arranged, obliquely coaxial arranged, and arranged in an arbitrary triangle.

[0041] In some exemplary embodiments, the electronic device includes at least three cameras, each camera corresponding to a sensor. The minimum straight-line distance between the cameras is greater than a distance threshold. In response to a zoom operation, the electronic device obtains the current zoom ratio, the target zoom ratio, and the current sensor corresponding to the current zoom ratio; determines the sensors to be turned on based on the current zoom ratio and the target zoom ratio; when the sensors to be turned on include a transition sensor and a target sensor, it is determined as a close-range large-span zoom scenario; after determining as a close-range large-span zoom scenario, turns on the transition sensor and the target sensor, and determines a plurality of transition zoom ratios based on the starting zoom ratio and the target zoom ratio. That is, by determining that the sensors to be turned on include a transition sensor and a target sensor, and the distance between the electronic device and the object to be photographed is small, and the span between the current zoom ratio and the target zoom ratio is large, it is determined as a close-range large-span zoom scenario.

[0042] Step 104: For each transitional zoom ratio, based on the magnitude relationship between the transitional zoom ratio and the switching zoom ratio of the transitional sensor, determine the image data to be aligned from the first image data corresponding to the current sensor and the second image data corresponding to the transitional sensor.

[0043] Among them, the switching zoom ratio refers to the zoom ratio when switching from the current sensor to the transitional sensor. The switching zoom ratio can be equal to the optical zoom point of the transitional sensor, or can be greater than or less than the optical zoom point of the transitional sensor. The first image data refers to the cropped image data corresponding to the current sensor at the historical zoom ratio, and this cropped image data is the image data obtained by performing alignment processing and cropping processing on the image data collected by the current sensor at the historical zoom ratio. The historical zoom ratio is the previous adjacent transitional zoom ratio of the transitional zoom ratio. The second image data is the cropped image data corresponding to the transitional sensor at the historical zoom ratio, and this cropped image data is the image data obtained by performing alignment processing and cropping processing on the image data collected by the transitional sensor at the historical zoom ratio. The image data to be aligned refers to the image data that needs to be aligned, and the image data to be aligned can be the first image data and the second image data, or can also be the second image data.

[0044] Exemplarily, for each transitional zoom ratio, the electronic device compares the transitional zoom ratio with the switching zoom ratio of the transitional sensor to obtain a comparison result, and based on the comparison result, determines the image data to be aligned from the first image data corresponding to the current sensor and the second image data corresponding to the transitional sensor. The comparison result refers to the result obtained by comparing the transitional zoom ratio with the switching zoom ratio of the transitional sensor, and the comparison result can be at least one of greater than, equal to, less than, etc.

[0045] Step 106: Align the image data to be aligned with the third image data corresponding to the target sensor to obtain aligned image data.

[0046] Among them, the third image data refers to the image data collected by the target sensor at the transitional zoom ratio. The aligned image data refers to the image data obtained by aligning the image data to be aligned with the third image data collected by the target sensor. The aligned image data can be the aligned image data corresponding to the current sensor and the aligned image data corresponding to the transitional sensor, or can also be the aligned image data corresponding to the transitional sensor.

[0047] Exemplarily, in the case of the transitional zoom ratio, the electronic device obtains the third image data through the target sensor, and aligns the image data to be aligned with the third image data to obtain aligned image data.

[0048] Step 108: Crop the aligned image data based on the transitional zoom ratio to obtain the cropped image data corresponding to the transitional zoom ratio.

[0049] Here, cropping refers to the process of shrinking the image data to a specific area or view. It can be understood that by adjusting the visible range of the image data, the image data is made to match the field of view of the transitional zoom ratio. Cropped image data refers to the image data obtained by cropping the aligned image data. The cropped image data can be the cropped image data corresponding to the current sensor and the cropped image data corresponding to the transitional sensor. The aligned image data can also be the cropped image data corresponding to the transitional sensor.

[0050] Exemplarily, the electronic device crops the aligned image data according to the transitional zoom ratio to obtain the cropped image data corresponding to the transitional zoom ratio.

[0051] Step 110: Determine the target image data based on the cropped image data.

[0052] Exemplarily, the electronic device determines the target image data according to the magnitude relationship between the transitional zoom ratio and the switching zoom ratio of the transitional sensor and the cropped image data.

[0053] In the above image processing method, the image data to be aligned is determined from the first image data corresponding to the current sensor and the second image data corresponding to the transitional sensor according to the magnitude relationship between the transitional zoom ratio and the switching zoom ratio of the transitional sensor. Each time the image data to be aligned is aligned with the third image data collected by the target sensor. That is, as the transitional zoom ratio changes, the offset between the aligned image data and the third image data gradually decreases. The aligned image data is cropped based on the transitional zoom ratio so that the field of view angle of the cropped image data matches the transitional zoom ratio. The target image data is determined based on the cropped image data. That is, as the transitional zoom ratio changes, a gradual transition of the zoom ratio is achieved, avoiding the sudden jump of the picture caused by the sudden change of the field of view angle, and the offset between the target image data and the third image data gradually decreases, avoiding the sudden change of the position of the shooting object in the picture and improving the smoothness of zooming.

[0054] In some exemplary embodiments, determining the image data to be aligned from the first image data corresponding to the current sensor and the second image data corresponding to the transitional sensor according to the magnitude relationship between the transitional zoom ratio and the switching zoom ratio of the transitional sensor includes:

[0055] When the transition zoom ratio is less than the switching zoom ratio, the first image data and the second image data are determined as the image data to be aligned; the first image data is the cropped image data of the current sensor corresponding to the historical zoom ratio, and the historical zoom ratio is the previous adjacent transition zoom ratio of the transition zoom ratio; the second image data is the cropped image data of the transition sensor corresponding to the historical zoom ratio.

[0056] Wherein, the historical zoom ratio refers to the previous adjacent transition zoom ratio of the current transition zoom ratio.

[0057] Exemplarily, when the transition zoom ratio is less than the switching zoom ratio, the electronic device acquires the cropped image data of the current sensor corresponding to the historical zoom ratio, determines the cropped image data of the current sensor corresponding to the historical zoom ratio as the first image data, and acquires the cropped image data of the transition sensor corresponding to the historical zoom ratio, determines the cropped image data of the transition sensor corresponding to the historical zoom ratio as the second image data, and determines the first image data and the second image data as the image data to be aligned.

[0058] In this embodiment, the transition zoom ratio being less than the switching zoom ratio indicates that it is necessary to use the image data corresponding to the current sensor to determine the target image data, and the cropped image data of the current sensor corresponding to the historical zoom ratio is used as the image data to be aligned. That is, on the basis of the previous alignment and cropping, the first image data is aligned with the third image data again to gradually reduce the offset between the first image data and the third image data. It can be understood that as the transition zoom ratio changes, the offset between the first image data and the third image data gradually decreases, providing accurate basic data for determining the target image data when the transition zoom ratio is less than the switching zoom ratio. Moreover, when the transition zoom ratio is less than the switching zoom ratio, the cropped image data of the transition sensor corresponding to the historical zoom ratio is used as the image data to be aligned. On the basis of the previous alignment and cropping, the second image data is aligned with the third image data again. As the transition zoom ratio changes, the offset between the second image data and the third image data gradually decreases, laying a foundation for determining the target image data when the subsequent transition zoom ratio is equal to or greater than the switching zoom ratio. That is, by aligning the first image data and the second image data with the third image data, the influence caused by the large straight-line distance between the cameras is compensated.

[0059] In some exemplary embodiments, determining the target image data based on the cropped image data includes:

[0060] When the transition zoom ratio is less than the switching zoom ratio, the cropped image data of the current sensor corresponding to the transition zoom ratio is determined as the target image data.

[0061] Exemplarily, when the transition zoom ratio is less than the switching zoom ratio, the electronic device determines the cropped image data corresponding to the current sensor at the transition zoom ratio as the target image data.

[0062] In this embodiment, the transition zoom ratio being less than the switching zoom ratio indicates that the current transition zoom ratio is quite different from the target zoom ratio, and the offset between the cropped image data corresponding to the current sensor at the transition zoom ratio and the third image data is still large. If the cropped image data corresponding to the current sensor at the transition zoom ratio and the third image data are fused, the resulting image data will have phenomena such as ghosting. Directly determining the cropped image data corresponding to the sensor at the transition zoom ratio as the target image data improves the clarity of the target image data.

[0063] In some exemplary embodiments, determining the image data to be aligned from the first image data corresponding to the current sensor and the second image data corresponding to the transition sensor based on the magnitude relationship between the transition zoom ratio and the switching zoom ratio of the transition sensor includes:

[0064] When the transition zoom ratio is equal to or greater than the switching zoom ratio, the second image data is determined as the image data to be aligned; the second image data is the cropped image data corresponding to the transition sensor at the historical zoom ratio, and the historical zoom ratio is the previous adjacent transition zoom ratio of the transition zoom ratio.

[0065] Exemplarily, when the transition zoom ratio is equal to or greater than the switching zoom ratio, the electronic device acquires the cropped image data corresponding to the transition sensor at the historical zoom ratio, determines the cropped image data corresponding to the transition sensor at the historical zoom ratio as the second image data, and determines the second image data as the image data to be aligned.

[0066] In this embodiment, the transition zoom ratio being equal to or greater than the switching zoom ratio indicates that the transition has been made from the current sensor to the transition sensor, and subsequently, the image data corresponding to the current sensor will not be needed to determine the target image data. At this time, only the cropped image data corresponding to the transition sensor at the historical zoom ratio needs to be determined as the image data to be aligned, that is, on the basis of multiple alignments and croppings, the second image data is aligned with the third image data again to gradually reduce the offset between the second image data and the third image data, providing accurate basic data for subsequent determination of the target image data.

[0067] In some exemplary embodiments, determining the target image data based on the cropped image data includes:

[0068] When the transition zoom ratio is equal to or greater than the switching zoom ratio, the transition sensor fuses the cropped image data corresponding to the transition zoom ratio and the third image data to obtain the target image data.

[0069] Among them, fusion refers to the process of synthesizing two frames of image data or multiple frames of image data into one frame of image data. It can be understood as the process of combining, weighting, or integrating the pixel information at the same position in two frames of image data according to a certain algorithm or weight to generate one frame of image data with higher quality or better visual effects.

[0070] Exemplarily, when the transition zoom ratio is equal to or greater than the switching zoom ratio, the electronic device fuses the cropped image data corresponding to the transition zoom ratio of the transition sensor and the third image data to obtain the target image data.

[0071] In some exemplary embodiments, the schematic diagram of the determination process of the target image data is as Figure 4 shown, including: when the transition zoom ratio is equal to or greater than the switching zoom ratio, aligning the cropped image data corresponding to the historical zoom ratio of the transition sensor with the third image data collected by the target sensor to obtain the aligned image data corresponding to the transition zoom ratio of the transition sensor; cropping the aligned image data based on the transition zoom ratio to obtain the cropped image data corresponding to the transition zoom ratio of the transition sensor; determining the target fusion strategy; based on the target fusion strategy, performing image fusion on the cropped image data corresponding to the transition zoom ratio and the third image data to obtain the target image data. The target fusion strategy refers to the method for fusing the cropped image data corresponding to the transition zoom ratio and the third image data.

[0072] In some exemplary embodiments, when the transition zoom ratio is equal to the switching zoom ratio, the current sensor is turned off. That is, when the transition zoom ratio is equal to or greater than the switching zoom ratio, it is not necessary to use the first image data corresponding to the current sensor to determine the target image data. When the transition zoom ratio is equal to the switching zoom ratio, the current sensor is turned off to reduce the power consumption of the electronic device.

[0073] In this embodiment, the transition zoom ratio being equal to or greater than the switching zoom ratio indicates that the current transition zoom ratio is relatively close to the target zoom ratio. The image data corresponding to the transition sensor has been aligned and cropped multiple times, and the offset between the cropped image data corresponding to the transition zoom ratio of the transition sensor and the third image data is small. Fusing the cropped image data corresponding to the transition zoom ratio of the transition sensor and the third image data to obtain the target image data improves the clarity of the target image data.

[0074] In some exemplary embodiments, obtaining the switching zoom ratio corresponding to the transition sensor includes:

[0075] Obtaining the reference optical zoom point corresponding to the transition sensor and the change amplitude value of the optoelectronic point corresponding to the current sensor; determining the switching zoom ratio corresponding to the transition sensor based on the magnitude relationship between the starting zoom ratio and the target zoom ratio, as well as the reference optical zoom point and the change amplitude value of the optical zoom point.

[0076] Wherein, the reference optical zoom point refers to the optical zoom point of the transition sensor. The change amplitude value of the optical zoom point refers to the adjustment amplitude value for the reference optical zoom point, and the change amplitude value of the optical zoom point corresponds to the current sensor, that is, the change amplitude values of the optical zoom points corresponding to different current sensors are different.

[0077] Exemplarily, before step 104, the electronic device obtains the reference optical zoom point corresponding to the transition sensor and the change amplitude value of the optoelectronic point corresponding to the current sensor, compares the starting zoom ratio and the target zoom ratio, obtains the magnitude relationship between the starting zoom ratio and the target zoom ratio, and determines the switching zoom ratio corresponding to the transition sensor based on the magnitude relationship between the starting zoom ratio and the target zoom ratio, the reference optical zoom point, and the change amplitude value of the optical zoom point.

[0078] In this embodiment, the electronic device determines the switching zoom ratio corresponding to the transition sensor through the magnitude relationship between the starting zoom ratio and the target zoom ratio, the reference optical zoom point, and the change amplitude value of the optical zoom point, providing accurate basic data for subsequent determination of the magnitude relationship between the transition zoom ratio and the switching zoom ratio.

[0079] In some exemplary embodiments, determining the switching zoom ratio corresponding to the transition sensor based on the magnitude relationship between the starting zoom ratio and the target zoom ratio, as well as the reference optical zoom point and the change amplitude value of the optical zoom point, includes:

[0080] In the case where the starting zoom ratio is less than the target zoom ratio, adding the change amplitude value of the optical zoom point to the reference optical zoom point to obtain the switching zoom ratio corresponding to the transition sensor.

[0081] Exemplarily, in the case where the starting zoom ratio is less than the target zoom ratio, the electronic device adds the change amplitude value of the optical zoom point to the reference optical zoom point to obtain the switching zoom ratio corresponding to the transition sensor.

[0082] For example, the schematic diagram of the backward movement of the reference optical zoom point is as Figure 5 shown. The reference optical zoom point of the transition sensor is 3X. If the change amplitude value of the optical zoom point is 1.5X, the switching zoom ratio corresponding to the transition sensor is 4.5X; if the change amplitude value of the optical zoom point is 2.5X, the switching zoom ratio corresponding to the transition sensor is 5.5X. The schematic diagram of the equivalent position of the camera is as Figure 6As shown, the sensor of camera 1 is the current sensor, the sensor of camera 2 is the target sensor, and the sensor of camera 3 is the transition sensor. The reference optical variable point of the transition sensor is 3X. When the transition sensor uses 4.5X as the switching zoom ratio, the equivalent straight-line distance between camera 1 and camera 2 is equal to the straight-line distance between equivalent camera 11 and camera 2, and the equivalent straight-line distance between camera 3 and camera 2 is equal to the straight-line distance between equivalent camera 31 and camera 2. That is, when the optical variable point of the transition sensor becomes larger, it is equivalent to shortening the straight-line distance between camera 1 and camera 2, and the straight-line distance between camera 3 and camera 2. When the transition sensor uses 5.5X as the switching zoom ratio, the equivalent straight-line distance between camera 1 and camera 2 is equal to the straight-line distance between equivalent camera 12 and camera 2, and the equivalent straight-line distance between camera 3 and camera 2 is equal to the straight-line distance between equivalent camera 32 and camera 2. That is, within a reasonable range, the larger the optical variable point of the transition sensor, the smaller the equivalent straight-line distance between camera 1 and camera 2, and the smaller the equivalent straight-line distance between camera 3 and camera 2. However, if the switching zoom ratio of the transition sensor becomes too large and the number of cropping times of the first image data and the second image data is too many, it will cause the clarity of the first image data and the second image data to decrease. Therefore, the switching zoom ratio of the transition sensor cannot be set too large.

[0083] In this embodiment, when the starting zoom ratio is less than the target zoom ratio, the sum of the reference optical variable point and the optical variable point change amplitude value is determined as the switching zoom ratio corresponding to the transition sensor. It can be understood that the zoom ratio interval between the starting zoom ratio and the switching zoom ratio is increased, and the number of transition zoom ratios before the current sensor switches to the transition sensor is increased. As a result, the number of times the first image data and the second image data are aligned with the third image data is increased, so that the offset between the first image data and the third image data becomes smaller and smaller, and the offset between the second image data and the third image data becomes smaller and smaller. That is, by moving the optical variable point of the transition sensor backward, more first image data and second image data can be ensured to be aligned with the third image data, and the difference in the field of view angles of the image data corresponding to different sensors caused by the large straight-line distance between the cameras can be reduced.

[0084] In some exemplary embodiments, based on the magnitude relationship between the starting zoom ratio and the target zoom ratio, as well as the reference optical variable point and the optical variable point change amplitude value, determining the switching zoom ratio corresponding to the transition sensor includes:

[0085] When the starting zoom ratio is greater than the target zoom ratio, subtract the optical variable point change amplitude value from the reference optical variable point to obtain the switching zoom ratio corresponding to the transition sensor.

[0086] Exemplarily, when the starting zoom ratio is greater than the target zoom ratio, the electronic device subtracts the optical zoom point change amplitude value from the reference optical zoom point to obtain the switching zoom ratio corresponding to the transition sensor.

[0087] In this embodiment, when the starting zoom ratio is greater than the target zoom ratio, the difference between the reference optical zoom point and the optical zoom point change amplitude value is determined as the switching zoom ratio corresponding to the transition sensor. It can be understood that the zoom ratio interval between the starting zoom ratio and the switching zoom ratio is increased, and the number of transition zoom ratios before the current sensor is switched to the transition sensor is increased, thereby increasing the number of times the first image data and the second image data are aligned with the third image data, so that the offset between the first image data and the third image data becomes smaller and smaller, and the offset between the second image data and the third image data becomes smaller and smaller.

[0088] In some exemplary embodiments, after determining the current sensor, the transition sensor, and the target sensor based on the starting zoom ratio and the target zoom ratio, it further includes:

[0089] When the target sensor is not turned on, obtain the first image data corresponding to the current sensor; based on the transition zoom ratio, crop the first image data corresponding to the current sensor to obtain the target image data.

[0090] Exemplarily, when the transition sensor is turned on and the target sensor is not turned on, the electronic device obtains the first image data corresponding to the current sensor and crops the first image data corresponding to the current sensor based on the transition zoom ratio to obtain the target image data.

[0091] In some exemplary embodiments, when the transition sensor and the target sensor are not turned on, the electronic device obtains the first image data corresponding to the current sensor and crops the first image data corresponding to the current sensor based on the transition zoom ratio to obtain the target image data.

[0092] In this embodiment, after determining the current sensor, the transition sensor, and the target sensor, the current sensor is already turned on, and it takes time to turn on the transition sensor and the target sensor. When the target sensor is not turned on and the transition sensor is already turned on, if the first image data corresponding to the current sensor is aligned with the second image data corresponding to the transition sensor, it may cause an abnormal offset of the field of view angle, resulting in a jump in the picture. Therefore, when the target sensor is not turned on, the cropped first image data is directly used as the target image data, thereby avoiding picture jumps and improving the smoothness of zooming.

[0093] In some exemplary embodiments, the above image processing method further includes:

[0094] Obtain a reference zoom curve; adjust the reference zoom curve based on the starting zoom ratio, the switching zoom ratio, and the target zoom ratio to obtain a target zoom curve; the number of transitional zoom ratios between the starting zoom ratio and the switching zoom ratio determined based on the target zoom curve is greater than the number of transitional zoom ratios between the starting zoom ratio and the switching zoom ratio determined based on the reference zoom curve.

[0095] Among them, the reference zoom curve refers to the zoom curve before adjustment, and the reference zoom curve can be a pre-set zoom curve. The target zoom curve refers to the zoom curve after adjustment, and the target zoom curve is used to determine the transitional zoom ratios between the starting zoom ratio and the target zoom ratio.

[0096] Exemplarily, the electronic device obtains a reference zoom curve, adjusts the arc of the curve segment between the starting zoom ratio and the switching zoom ratio in the reference zoom curve to be smaller, and adjusts the arc of the curve segment between the switching zoom ratio and the target zoom ratio in the reference zoom curve to be larger, to obtain a target zoom curve.

[0097] In this embodiment, by adjusting the reference zoom curve to a target zoom curve, the number of transitional zoom ratios between the starting zoom ratio and the switching zoom ratio determined based on the target zoom curve is greater than the number of transitional zoom ratios between the starting zoom ratio and the switching zoom ratio determined based on the reference zoom curve, that is, the number of transitional frames between the starting zoom ratio and the switching zoom ratio is increased, thereby avoiding the picture jump caused by the sudden change of the field of view angle.

[0098] In some exemplary embodiments, the electronic device includes at least three cameras, each camera corresponds to a sensor, the minimum straight-line distance between the cameras is greater than a distance threshold, and the schematic flow diagram of the image processing method is as Figure 7 shown, including:

[0099] Step 702: Set the shooting application in the electronic device to the image shooting mode or the video recording mode;

[0100] Step 704: During image shooting or video recording, the shooting application responds to the zoom operation to obtain the starting zoom ratio and the target zoom ratio;

[0101] Step 706: The shooting application sends the starting zoom ratio and the target zoom ratio to the electronic device;

[0102] Step 708: The electronic device obtains the current zoom ratio, the target zoom ratio, and the current sensor corresponding to the current zoom ratio, determines the sensor to be activated based on the current zoom ratio and the target zoom ratio, and obtains the target zoom curve. Based on the current zoom ratio, the target zoom ratio, and the target zoom curve, it determines a plurality of transitional zoom ratios between the current zoom ratio and the target zoom ratio. When the sensor to be activated only includes the target sensor, it is determined as a non-close-range large-span zoom scenario. In the non-close-range large-span zoom scenario, step 714 is executed, that is, single-channel alignment is performed. The image data collected by the current sensor is aligned with the image data collected by the target sensor to obtain aligned image data. The aligned image data is cropped based on the transitional zoom ratio to obtain cropped image data. The cropped image data is fused with the target image data to obtain the target image data. The above process is repeated until the target sensor is switched to complete the zoom. When the sensor to be activated includes a transitional sensor and a target sensor, it is determined as a close-range large-span zoom scenario;

[0103] Step 710: In the close-range large-span zoom scenario, the electronic device obtains the reference optical zoom point corresponding to the transitional sensor and the optical point change amplitude value corresponding to the current sensor, and compares the starting zoom ratio and the target zoom ratio. When the starting zoom ratio is less than the target zoom ratio, the reference optical zoom point is added with the optical point change amplitude value to obtain the switching zoom ratio corresponding to the transitional sensor. When the starting zoom ratio is greater than the target zoom ratio, the reference optical zoom point is subtracted by the optical point change amplitude value to obtain the switching zoom ratio corresponding to the transitional sensor;

[0104] Step 712: When the transitional zoom ratio is less than the switching zoom ratio, the electronic device performs dual-channel alignment, that is, obtains the cropped image data corresponding to the current sensor at the historical zoom ratio, and determines the cropped image data corresponding to the current sensor at the historical zoom ratio and the cropped image data corresponding to the transitional sensor at the historical zoom ratio as the image data to be aligned. The third image data is obtained through the target sensor. The cropped image data corresponding to the current sensor at the historical zoom ratio is aligned with the third image data to obtain the cropped image data corresponding to the current sensor at the transitional zoom ratio. The cropped image data corresponding to the transitional sensor at the historical zoom ratio is aligned with the third image data to obtain the cropped image data corresponding to the transitional sensor at the transitional zoom ratio. The electronic device determines the cropped image data corresponding to the current sensor at the transitional zoom ratio as the target image data;

[0105] Step 714: When the transition zoom ratio is equal to the switching zoom ratio, turn off the current sensor; in the case where the transition zoom ratio is equal to or greater than the switching zoom ratio, the electronic device performs single-channel alignment, that is, determines the cropped image data corresponding to the historical zoom ratio of the transition sensor as the image data to be aligned, and aligns the cropped image data corresponding to the historical zoom ratio of the transition sensor with the third image data to obtain the cropped image data corresponding to the transition zoom ratio of the transition sensor. The electronic device fuses the cropped image data corresponding to the transition zoom ratio of the transition sensor and the third image data to obtain the target image data;

[0106] Step 716: When the transition zoom ratio is equal to the target zoom ratio, turn off the transition sensor to complete the zoom;

[0107] Step 718: Resume normal preview or video recording.

[0108] In the above image processing method, the image data to be aligned is determined from the first image data corresponding to the current sensor and the second image data corresponding to the transition sensor according to the magnitude relationship between the transition zoom ratio and the switching zoom ratio of the transition sensor. Each time the image data to be aligned is aligned with the third image data collected by the target sensor. That is, as the transition zoom ratio changes, the offset between the aligned image data and the third image data gradually decreases. The aligned image data is cropped based on the transition zoom ratio so that the field of view angle of the cropped image data matches the transition zoom ratio. The target image data is determined based on the cropped image data. That is, as the transition zoom ratio changes, a gradual transition of the zoom ratio is achieved, avoiding the picture jump caused by the sudden change of the field of view angle, and the offset between the target image data and the third image data gradually decreases, avoiding the sudden change of the position of the shooting object in the picture and improving the smoothness of the zoom.

[0109] It should be understood that although the steps in the flowcharts involved in the above embodiments are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.

[0110] Based on the same inventive concept, the embodiments of the present application further provide an image processing apparatus for implementing the above-mentioned image processing method. The solution provided by the apparatus for solving the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the image processing apparatus provided below can refer to the limitations on the image processing method in the above text, and will not be elaborated here.

[0111] In some exemplary embodiments, such as Figure 8 shown, an image processing apparatus is provided, including: a response module 802, a selection module 804, an alignment module 806, a cropping module 808, and a processing module 810, where:

[0112] The response module 802 is configured to, in response to a zoom operation, determine a current sensor, a transition sensor, and a target sensor, as well as a plurality of transition zoom ratios, based on a starting zoom ratio and a target zoom ratio;

[0113] The selection module 804 is configured to, for each transition zoom ratio, determine image data to be aligned from the first image data corresponding to the current sensor and the second image data corresponding to the transition sensor based on the magnitude relationship between the transition zoom ratio and the switching zoom ratio of the transition sensor;

[0114] The alignment module 806 is configured to align the image data to be aligned with the third image data corresponding to the target sensor to obtain aligned image data;

[0115] The cropping module 808 is configured to crop the aligned image data based on the transition zoom ratio to obtain cropped image data corresponding to the transition zoom ratio;

[0116] The processing module 810 is configured to determine target image data based on the cropped image data.

[0117] In some exemplary embodiments, the selection module 804 is further configured to: in the case where the transition zoom ratio is less than the switching zoom ratio, determine the first image data and the second image data as the image data to be aligned; the first image data is the cropped image data of the current sensor corresponding to the historical zoom ratio, and the historical zoom ratio is the previous adjacent transition zoom ratio of the transition zoom ratio; the second image data is the cropped image data of the transition sensor corresponding to the historical zoom ratio.

[0118] In some exemplary embodiments, the processing module 810 is further configured to: in the case where the transition zoom ratio is less than the switching zoom ratio, determine the cropped image data of the current sensor corresponding to the transition zoom ratio as the target image data.

[0119] In some exemplary embodiments, the selection module 804 is further configured to: when the transition zoom ratio is equal to or greater than the switching zoom ratio, determine the second image data as the image data to be aligned; the second image data is the cropped image data of the transition sensor corresponding to the historical zoom ratio, and the historical zoom ratio is the previous adjacent transition zoom ratio of the transition zoom ratio.

[0120] In some exemplary embodiments, the processing module 810 is further configured to: when the transition zoom ratio is equal to or greater than the switching zoom ratio, fuse the cropped image data of the transition sensor corresponding to the transition zoom ratio and the third image data to obtain the target image data.

[0121] In some exemplary embodiments, the selection module 804 is further configured to: obtain the reference optical zoom point corresponding to the transition sensor and the change amplitude value of the optoelectronic point corresponding to the current sensor; determine the switching zoom ratio corresponding to the transition sensor based on the magnitude relationship between the starting zoom ratio and the target zoom ratio, and the reference optical zoom point and the change amplitude value of the optoelectronic point.

[0122] In some exemplary embodiments, the selection module 804 is further configured to: when the starting zoom ratio is less than the target zoom ratio, add the change amplitude value of the optoelectronic point to the reference optical zoom point to obtain the switching zoom ratio corresponding to the transition sensor.

[0123] In some exemplary embodiments, the selection module 804 is further configured to: when the starting zoom ratio is greater than the target zoom ratio, subtract the change amplitude value of the optoelectronic point from the reference optical zoom point to obtain the switching zoom ratio corresponding to the transition sensor.

[0124] In some exemplary embodiments, the processing module 810 is further configured to: when the target sensor is not turned on, obtain the first image data corresponding to the current sensor; crop the first image data corresponding to the current sensor based on the transition zoom ratio to obtain the target image data.

[0125] In some exemplary embodiments, the response module 802 is further configured to: obtain the reference zoom curve; adjust the reference zoom curve based on the starting zoom ratio, the switching zoom ratio, and the target zoom ratio to obtain the target zoom curve; the number of transition zoom ratios between the starting zoom ratio and the switching zoom ratio determined based on the target zoom curve is greater than the number of transition zoom ratios between the starting zoom ratio and the switching zoom ratio determined based on the reference zoom curve.

[0126] Each module in the above image processing device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above modules can be embedded in or independent of a processor in an electronic device in the form of hardware, or stored in a memory in the electronic device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0127] In some exemplary embodiments, an electronic device is provided. The electronic device can be a terminal, and its internal structure diagram can be as Figure 9 shown. The electronic device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the electronic device is used for exchanging information between the processor and external devices. The communication interface of the electronic device is used for communicating with an external terminal in a wired or wireless manner. The wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC), or other technologies. When the computer program is executed by the processor, it implements an image processing method. The display unit of the electronic device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the electronic device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the electronic device, or an external keyboard, touchpad, or mouse, etc.

[0128] Those skilled in the art can understand that Figure 9 the structure shown in

[0129] is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied. A specific electronic device may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.

[0130] In some exemplary embodiments, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the foregoing method embodiments are implemented.

[0131] In some exemplary embodiments, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the foregoing method embodiments are implemented.

[0132] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data that have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.

[0133] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, artificial intelligence (AI) processors, etc., without limitation.

[0134] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in the present application.

[0135] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims

1. An image processing method, characterized in that, The method includes: In response to a zoom operation, based on a starting zoom ratio and a target zoom ratio, determining a current sensor, a transition sensor, and a target sensor, as well as a plurality of transition zoom ratios; For each transition zoom ratio, based on the magnitude relationship between the transition zoom ratio and the switching zoom ratio of the transition sensor, determining image data to be aligned from the first image data corresponding to the current sensor and the second image data corresponding to the transition sensor; Aligning the image data to be aligned with the third image data corresponding to the target sensor to obtain aligned image data; Cropping the aligned image data based on the transition zoom ratio to obtain cropped image data corresponding to the transition zoom ratio; Based on the cropped image data, determining target image data.

2. The method according to claim 1, wherein The determining of the image data to be aligned from the first image data corresponding to the current sensor and the second image data corresponding to the transition sensor based on the magnitude relationship between the transition zoom ratio and the switching zoom ratio of the transition sensor includes: When the transition zoom ratio is less than the switching zoom ratio, determining the first image data and the second image data as the image data to be aligned; the first image data is the cropped image data corresponding to the current sensor at a historical zoom ratio, and the historical zoom ratio is the previous adjacent transition zoom ratio of the transition zoom ratio; the second image data is the cropped image data corresponding to the transition sensor at the historical zoom ratio.

3. The method according to claim 1 or 2, characterized in that The determining of the target image data based on the cropped image data includes: When the transition zoom ratio is less than the switching zoom ratio, determining the cropped image data corresponding to the current sensor at the transition zoom ratio as the target image data.

4. The method according to claim 1, wherein The determining of the image data to be aligned from the first image data corresponding to the current sensor and the second image data corresponding to the transition sensor based on the magnitude relationship between the transition zoom ratio and the switching zoom ratio of the transition sensor includes: When the transition zoom ratio is equal to or greater than the switching zoom ratio, determining the second image data as the image data to be aligned; the second image data is the cropped image data corresponding to the transition sensor at a historical zoom ratio, and the historical zoom ratio is the previous adjacent transition zoom ratio of the transition zoom ratio.

5. The method according to claim 1 or 4, characterized in that The determining of the target image data based on the cropped image data includes: When the transition zoom ratio is equal to or greater than the switching zoom ratio, fusing the cropped image data corresponding to the transition sensor at the transition zoom ratio and the third image data to obtain the target image data.

6. The method according to claim 1, characterized in that, Obtaining the switching zoom ratio corresponding to the transition sensor includes: Obtaining a reference optical zoom point corresponding to the transition sensor and a change amplitude value of the optoelectronic point corresponding to the current sensor; Based on the magnitude relationship between the starting zoom ratio and the target zoom ratio, and the reference optical zoom point and the change amplitude value of the optoelectronic point, determining the switching zoom ratio corresponding to the transition sensor.

7. The method according to claim 6, characterized in that, Determining the switching zoom ratio corresponding to the transition sensor based on the magnitude relationship between the starting zoom ratio and the target zoom ratio, and the reference optical zoom point and the optical zoom point change amplitude value includes: When the starting zoom ratio is less than the target zoom ratio, adding the optical zoom point change amplitude value to the reference optical zoom point to obtain the switching zoom ratio corresponding to the transition sensor.

8. The method according to claim 6, wherein Determining the switching zoom ratio corresponding to the transition sensor based on the magnitude relationship between the starting zoom ratio and the target zoom ratio, and the reference optical zoom point and the optical zoom point change amplitude value includes: When the starting zoom ratio is greater than the target zoom ratio, subtracting the optical zoom point change amplitude value from the reference optical zoom point to obtain the switching zoom ratio corresponding to the transition sensor.

9. The method according to claim 1, characterized in that, After determining the current sensor, the transition sensor, and the target sensor based on the starting zoom ratio and the target zoom ratio, it further includes: When the target sensor is not turned on, obtaining the first image data corresponding to the current sensor; Based on the transition zoom ratio, cropping the first image data corresponding to the current sensor to obtain target image data.

10. The method according to claim 1, characterized in that, The method further includes: Obtaining a reference zoom curve; Adjusting the reference zoom curve based on the starting zoom ratio, the switching zoom ratio, and the target zoom ratio to obtain a target zoom curve; the number of transition zoom ratios between the starting zoom ratio and the switching zoom ratio determined based on the target zoom curve is greater than the number of transition zoom ratios between the starting zoom ratio and the switching zoom ratio determined based on the reference zoom curve.

11. An image processing apparatus, characterized in that, The device includes: A response module, configured to, in response to a zoom operation, determine a current sensor, a transition sensor, and a target sensor, and a plurality of transition zoom ratios based on a starting zoom ratio and a target zoom ratio; A selection module, configured to, for each transition zoom ratio, determine the image data to be aligned from the first image data corresponding to the current sensor and the second image data corresponding to the transition sensor based on the magnitude relationship between the transition zoom ratio and the switching zoom ratio of the transition sensor; An alignment module, configured to align the image data to be aligned with the third image data corresponding to the target sensor to obtain aligned image data; A cropping module, configured to crop the aligned image data based on the transition zoom ratio to obtain cropped image data corresponding to the transition zoom ratio; A processing module, configured to determine target image data based on the cropped image data.

12. An electronic device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 10.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 10.

14. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 10.