Image processing method, device and equipment and readable storage medium

By responding to zoom operations in the camera, determining the zoom scene type and setting the basic zoom curve, the problem of unsmooth zoom in traditional cameras is solved, and the smooth zoom effect in different scenes is achieved, improving the user experience.

CN119865699APending Publication Date: 2025-04-22GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510125201.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-26
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

Traditional cameras are prone to unsmooth zooming effects during zooming, and cannot achieve good zooming effects in all scenes.

Method used

By acquiring the current zoom magnification and the target zoom magnification in response to the zoom operation, determining the zoom scene type corresponding to the zoom operation, and determining the basic zoom curve from the current zoom magnification to the target zoom magnification according to the zoom scene type and shooting mode, and performing image data processing to achieve smooth zoom.

Benefits of technology

It realizes adapting different zoom needs in different scenarios, ensuring smoothness of the zoom process, and improving the user's zoom experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119865699A_ABST
    Figure CN119865699A_ABST
Patent Text Reader

Abstract

The invention relates to an image processing method, device and equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: in response to zooming operation, obtaining a current zooming magnification and a target zooming magnification; according to the current zoom ratio and the target zoom ratio, determining a zoom scene type corresponding to the zoom operation; according to the zoom scene type and the shooting mode, determining a basic zoom curve corresponding to the target zoom ratio from the current zoom ratio; and processing the output image data according to the transition zoom ratio corresponding to the basic zoom curve to obtain target image data. By adopting the method, zooming requirements of different scenes can be met, and smooth zooming of different scenes is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] As electronic devices become increasingly intelligent, the shooting function is becoming more and more popular. Many electronic devices are equipped with multiple cameras. Different cameras generally correspond to different focal lengths. Each focal length corresponds to a different focal length range, and the corresponding image presented has a different focus. Therefore, when using electronic devices to take pictures, zoom can be achieved by switching the camera.

[0003] In traditional technology, during the camera switching process, zooming is often achieved by setting a unified zoom method. However, the unified zoom method cannot achieve a good zoom effect in all scenes, and the zoom may not be smooth in some scenes. Summary of the invention

[0004] Based on this, it is necessary to provide an image processing method, device, electronic device, computer-readable storage medium and computer program product that can adapt to the requirements of different zoom scenes in response to the above technical problems.

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

[0006] In response to a zoom operation, obtaining a current zoom ratio and a target zoom ratio;

[0007] Determining a zoom scene type corresponding to the zoom operation according to the current zoom magnification and the target zoom magnification;

[0008] Determining a basic zoom curve corresponding to the current zoom ratio to the target zoom ratio according to the zoom scene type and the shooting mode;

[0009] The output image data is processed according to the transition zoom ratio corresponding to the basic zoom curve to obtain target image data.

[0010] In a second aspect, the present application further provides an image processing device, comprising:

[0011] A zoom ratio acquisition module, used for acquiring a current zoom ratio and a target zoom ratio in response to a zoom operation;

[0012] A zoom scene determination module, used to determine a zoom scene type corresponding to the zoom operation according to the current zoom magnification and the target zoom magnification;

[0013] A zoom curve determination module, used to determine a basic zoom curve corresponding to the current zoom ratio to the target zoom ratio according to the zoom scene type and the shooting mode;

[0014] The image data processing module is used to process the output image data according to the transition zoom ratio corresponding to the basic zoom curve to obtain target image data.

[0015] In a third aspect, the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the image processing method provided in the first aspect when executing the computer program.

[0016] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the image processing method provided in the first aspect are implemented.

[0017] In a fifth aspect, the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the image processing method provided in the first aspect.

[0018] The above-mentioned image processing method, device, electronic device, computer-readable storage medium and computer program product obtain the current zoom ratio and the target zoom ratio in response to the zoom operation, and determine the zoom scene type corresponding to the zoom operation according to the current zoom ratio and the target zoom ratio, determine the basic zoom curve corresponding to the current zoom ratio to the target zoom ratio according to the zoom scene type and the shooting mode, process the output image data according to the transition zoom ratio corresponding to the basic zoom curve to obtain the target image data, and can determine the matching basic zoom curve according to the zoom scene type and the shooting mode for zoom processing. When the scene changes, the corresponding basic zoom curve will also change, so that the zoom mode can better match the actual scene and can adapt to the different zoom requirements of different scenes. Smooth zooming can be achieved in the entire shooting process, that is, smooth switching of the field of view angle is achieved, thereby improving the user's zoom experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 is a schematic flow chart of an image processing method in one embodiment;

[0021] Figure 2 is a schematic diagram of a basic zoom curve in one embodiment;

[0022] Figure 3 is a schematic diagram of a basic zoom curve in another embodiment;

[0023] Figure 4 is a schematic diagram of a target zoom curve in one embodiment;

[0024] Figure 5 is a schematic diagram of a basic zoom curve corresponding to a video mode in an embodiment;

[0025] Figure 6 is a schematic flow chart of an image processing method in another embodiment;

[0026] Figure 7 is a structural block diagram of an image processing device in one embodiment;

[0027] Figure 8 FIG. 4 is a diagram showing the internal structure of an electronic device in one embodiment. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with 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.

[0029] Related electronic devices may be equipped with 3-5 different types of lenses. For example, the camera operation page of a multi-camera mobile phone will display focal length options of 0.6x, 1x, 2x, or 5x, 10x. The smaller the number, the wider the corresponding viewing angle and the farther the subject is, which roughly corresponds to the focal lengths of ultra-wide-angle UW (Ultra Wide), wide-angle W (Wide) and telephoto T (Telephoto) lenses.

[0030] Normally, the main camera of most mobile phones is a wide-angle lens with a focal length of about 28 mm. Because this focal length is close to the field of view seen by the human eye, the main camera is the most frequently used camera. The operation page of the mobile phone camera will display the value of 1x, such as Figure 1 As shown, 1x is the focal length corresponding to the main camera, and the image quality is relatively clear, which is suitable for shooting portraits, architecture, scenery and documentaries, etc.

[0031] Ultra-wide-angle lenses can provide a wider viewing angle than wide-angle lenses, that is, they can capture a wider picture than wide-angle lenses, allowing more landscape elements to be captured, making them suitable for shooting scenery, architecture, etc. The images captured can have an impactful sense of picture. Ultra-wide-angle lenses have the characteristics of lens distortion, and objects at the edge of the captured image are elongated and magnified. This distortion can be fully utilized to shoot from above, creating a visual impact of "near objects are larger and far objects are smaller". When shooting buildings, the characteristics of lens distortion can be used to make the buildings more magnificent.

[0032] A telephoto lens with a focal length of 1x or more is usually called a telephoto lens. The larger the number in front of the x, the narrower the shooting range, but the farther you can shoot, and the clearer the distant objects you shoot. When shooting farther objects or zooming in on objects in the picture, the image quality will not drop like with digital zoom. A telephoto lens can "pull in" the distance between the background and the foreground, thus creating a sense of compression in the spatial distance, making the overall picture more substantial. A telephoto lens has little distortion and a weak perspective effect, and can shorten the distance between the foreground and the background, enhance the relationship between the foreground and the background, and create unique visual effects. This feature can be used to use straight-extending scenery such as roads and railings as guide lines to draw the audience's attention back to the subject in the depth of the picture.

[0033] Lenses corresponding to different focal lengths have different characteristics. The camera shooting solution is designed with a SAT (SpatialAlignment Transform) solution to achieve real-time lens switching according to user needs in different shooting scenarios. For example, the wide-angle lens used in a certain mobile phone has an equivalent focal length of 27 mm, a resolution of 40 million pixels, and an aperture of 1.6 focal ratio; the equivalent focal length of the ultra-wide-angle lens is 16 mm, a resolution of 20 million pixels, and an aperture of 2.2 focal ratio; the equivalent focal length of the telephoto lens is 125 mm, a resolution of 8 million pixels, and an aperture of 3.4 focal ratio, which can achieve continuous changes in focal lengths from 16 to 27 mm and 27 to 125 mm. It is easy to understand that the change in focal length can be represented by the change in zoom ratio, and the change in zoom ratio can represent the change in field of view.

[0034] In the related art, during the camera switching process, the zoom ratio changes according to a certain ratio step or different stages correspond to different ratio steps, but the implemented zoom process is still not smooth enough.

[0035] In response to the above-mentioned problem of uneven zoom, an embodiment of the present application provides an image processing method, which can adapt to different zoom scene requirements by determining a matching basic zoom curve according to the zoom scene type and shooting mode, and achieve smooth zoom when the scene changes, thereby improving the user experience.

[0036] The image processing method provided in the embodiment of the present application can be applied to electronic devices. Among them, the electronic device can be, but is not limited to, various personal computers, laptops, 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 car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. It should be noted that the electronic device can be a terminal or a server.

[0037] In an exemplary embodiment, Figure 1 As shown, an image processing method is provided, comprising the following steps 102 to 108. Among them:

[0038] Step 102: In response to a zoom operation, obtain a current zoom ratio and a target zoom ratio.

[0039] Among them, the zoom operation refers to the operation of changing the focal length. The zoom operation may refer to an uncertain continuous zoom operation, that is, the user does not have a clear target zoom ratio during the zoom process, and achieves a better preview or recording screen by adjusting the zoom ratio and viewing the result of the zoom screen. The zoom operation may also be a zoom ratio that is slid to a certain target. The zoom operation may be implemented by sliding the zoom control on the camera application interface, which may be a zoom control in the form of a disc, a strip, or other shapes. In some possible implementations, the zoom operation may also be implemented by sliding or rotating a hardware device, such as configuring a rotatable device on an electronic device, and adjusting the zoom ratio by rotating the rotatable device.

[0040] For example, the camera application page of the electronic device can set a zoom control, which can include one or more zoom controls. Different zoom controls correspond to different zoom magnifications. By triggering the zoom control, zooming of the corresponding zoom magnification is achieved. For example, by clicking to trigger the zoom control, the start and stop points of the zoom operation can be determined by clicking the zoom control, with the current zoom magnification as the starting point and the target zoom magnification as the stopping point. Alternatively, when the zoom magnifications corresponding to the zoom controls that can be clicked are limited, the start and stop points of the zoom operation can also be determined by sliding.

[0041] It is easy to understand that the current zoom ratio is usually for the current image frame, that is, the current zoom ratio corresponding to the current image frame is obtained. The current image frame refers to the image frame that needs to be previewed, displayed, photographed, or recorded. Correspondingly, the zoom operation can be a zoom operation in the camera preview scene, photo scene, or recording scene. The current zoom ratio refers to the zoom ratio of the current image frame. The target zoom ratio can be the zoom ratio currently issued by the camera application. The camera application will obtain the zoom ratio obtained by the zoom operation in real time or at a fixed time, and send the obtained zoom ratio as the target zoom ratio to the hardware abstraction layer. The target zoom ratio currently issued by the camera application refers to the target zoom ratio of the user's sliding operation currently obtained by the camera application. Exemplarily, the electronic device can obtain the current zoom ratio of the current image frame and the target zoom ratio currently issued by the camera application in response to the zoom operation generated by the user by sliding the disc or the zoom operation generated by the sliding user by rotating the hardware device or the zoom operation generated by the point-to-point zoom control.

[0042] Step 104: Determine the zoom scene type corresponding to the zoom operation according to the current zoom magnification and the target zoom magnification.

[0043] Among them, the zoom scene type refers to the scene type corresponding to the zoom operation. Zoom scene types include, for example, a zoom in scene (zoom in scene), a zoom out scene (zoom out scene) or a magnification value scene. Among them, the magnification enlargement scene refers to a zoom operation scene from a small zoom ratio to a larger zoom ratio, the magnification reduction scene refers to a zoom operation scene from a large zoom ratio to a smaller zoom ratio, and the magnification value scene includes, for example, a zoom operation scene from 0.6X to 2X, a zoom operation scene from 1X to 3X, or a zoom operation scene from 6X to 0.6X and other specific value scenes. It is easy to understand that the magnification value scene can be a zoom operation scene between any two zoom ratios among all zoom ratios of the electronic device.

[0044] For example, the zoom scene type corresponding to the zoom operation can be determined according to the size relationship between the current zoom ratio and the target zoom ratio. For example, if the current zoom ratio is less than the target zoom ratio, the zoom scene type corresponding to the zoom operation is determined to be a zoom-in scene, and if the current zoom ratio is greater than the target zoom ratio, the zoom scene type corresponding to the zoom operation is determined to be a zoom-out scene. Alternatively, the zoom ratio interval corresponding to the current zoom ratio and the target zoom ratio can be used as the corresponding ratio value scene.

[0045] Step 106: Determine a basic zoom curve corresponding to the current zoom ratio to the target zoom ratio according to the zoom scene type and the shooting mode.

[0046] Among them, the shooting mode refers to the mode in which the electronic device shoots images. The shooting mode may include, for example, a photo mode and a video mode. The photo mode may also be called a camera mode, which refers to a shooting mode that records a static image at a certain moment. The video mode may also be called a recording mode, which refers to a shooting mode that continuously records static images within a certain period of time. Different shooting modes correspond to different basic zoom curves.

[0047] The basic zoom curve may be a preset zoom curve. In general, in addition to the current zoom ratio and the target zoom ratio, the basic zoom curve may also include a plurality of transition zoom ratios. According to the transition zoom ratios corresponding to the basic zoom curve, the current zoom ratio may be sequentially changed to the target zoom ratio, thereby realizing a zoom operation from the current zoom ratio to the target zoom ratio. In order to realize zoom smoothness, the basic zoom curve may be determined according to at least one of zoom duration, smoothness, and alignment. Zoom duration refers to the duration of the zoom operation, and the zoom duration is, for example, the duration corresponding to 10-25 image frames. The smoothness may be characterized by the change amplitude of the zoom curve, following the change trend of "slow in and slow out", that is, the change trend of the beginning curve segment and the end curve segment of the basic zoom curve is relatively gentle. The alignment may be characterized by the number of fused zoom ratios. The more the number of fused zoom ratios, the longer the alignment duration, and the better the corresponding alignment effect. In other words, the basic zoom curve can realize smooth zoom in the corresponding scene. In one example, in photo mode, the basic zoom curve corresponding to the current zoom ratio of 0.6X to the target zoom ratio of 3X is as follows: Figure 2 As shown in the figure, the zoom duration is the duration corresponding to 17 image frames, and the change trend is relatively gentle.

[0048] Exemplarily, the shooting mode can be obtained, and then according to the shooting mode, the current zoom ratio corresponding to the zoom scene type is determined to obtain the basic zoom curve corresponding to the target zoom ratio. For example, for the photo mode and the video mode, the basic zoom curve corresponding to the current zoom ratio to the target zoom ratio corresponding to each zoom scene type in the corresponding shooting mode is determined respectively. It is easy to understand that the transition zoom ratio corresponding to the basic zoom curve is the zoom ratio that is sequentially transformed from the current zoom ratio to the target zoom ratio, and any two transition zoom ratios can be the same or different, and the change step size between the transition zoom ratios can be the same or different.

[0049] Step 108 , processing the output image data according to the transition zoom ratio corresponding to the basic zoom curve to obtain target image data.

[0050] The transition zoom ratio refers to the zoom ratio on the zoom curve, and the transition zoom ratio includes at least the current zoom ratio and the target zoom ratio. Usually, each transition zoom ratio corresponds to one image frame, that is, the interval between two adjacent transition zoom ratios is the duration corresponding to one image frame, so the basic zoom curve includes a number of transition zoom ratios, and the zoom operation is performed through the duration corresponding to the corresponding number of image frames.

[0051] The electronic device usually obtains the initial image data corresponding to the light change point of the camera, and then cuts the initial image data based on the zoom ratio to obtain the image data corresponding to the corresponding zoom ratio and display it. After determining the basic zoom curve, the image data output by the camera can be cut in turn according to the transition zoom ratio corresponding to the basic zoom curve to obtain the target image data corresponding to each transition zoom ratio. It is easy to understand that the number of transition zoom ratios includes a corresponding number of target image data. Exemplarily, for a multi-camera platform, the camera may be the current camera and / or the target camera. For example, the basic zoom curve may include a first curve segment and a second curve segment. The image data output by the current camera can be processed according to the transition zoom ratio corresponding to the first curve segment to obtain the first target image data. After the target camera is started and outputs the data stream, the image data output by the target camera is processed according to the transition zoom ratio corresponding to the second curve segment to obtain the second target image data. The target image data includes the first target image data and the second target image data. The target camera may include one or more, and the target camera can be determined according to the camera switching strategy.

[0052] In the above-mentioned image processing method, by responding to the zoom operation, the current zoom ratio and the target zoom ratio are obtained, and the zoom scene type corresponding to the zoom operation is determined according to the current zoom ratio and the target zoom ratio, and the basic zoom curve corresponding to the current zoom ratio to the target zoom ratio is determined according to the zoom scene type and the shooting mode, and the output image data is processed according to the transition zoom ratio corresponding to the basic zoom curve to obtain the target image data. The matching basic zoom curve can be determined according to the zoom scene type and the shooting mode for zoom processing. When the scene changes, the corresponding basic zoom curve will also change, so that the zoom mode can better match the actual scene and can adapt to the different zoom requirements of different scenes. Smooth zoom can be achieved in the entire shooting process, that is, smooth switching of the field of view angle is achieved, thereby improving the user zoom experience.

[0053] In some embodiments, step 104 of determining the zoom scene type corresponding to the zoom operation according to the current zoom magnification and the target zoom magnification includes:

[0054] Obtain camera configuration information; determine the zoom scene type corresponding to the zoom operation based on the camera configuration information, the current zoom ratio, and the target zoom ratio.

[0055] The camera configuration information refers to the camera information configured by the electronic device, and the camera configuration information includes, for example, the number of cameras, camera specifications, etc. The camera configuration information may be information about the front camera, rear camera, or side camera of the electronic device.

[0056] Exemplarily, the initial zoom scene can be determined according to the current zoom ratio and the target zoom ratio, and then the zoom scene type corresponding to the zoom operation can be determined according to the initial zoom scene and the camera configuration information. For example, the zoom scene type is a zoom in scene of three cameras, which indicates that the initial zoom scene corresponding to the current zoom ratio and the target zoom ratio is a zoom in scene, and the camera configuration information is three cameras, which means that the electronic device is configured with three cameras. Among them, the initial zoom scene may include a zoom in scene or a zoom out scene, for example. It is easy to understand that the corresponding zoom scene types are different for different camera configuration information. For example, if the current zoom ratio is 0.6X and the target zoom ratio is 6X, according to the current zoom ratio and the target zoom ratio, it can be determined that the initial zoom scene is a zoom in scene, then the zoom scene types corresponding to the three-camera and four-camera camera configuration information are also different, and the corresponding basic zoom curves are also different.

[0057] In this embodiment, by determining the zoom scene type corresponding to the zoom operation according to the camera configuration information, the current zoom ratio and the target zoom ratio, the zoom scene type can be determined more finely, so that the basic zoom curve can be determined more accurately, thereby improving the zoom smoothness.

[0058] In some embodiments, the above method further includes: adjusting the basic zoom curve to obtain a target zoom curve;

[0059] Accordingly, step 108 of processing the output image data according to the transition zoom ratio corresponding to the basic zoom curve to obtain the target image data includes:

[0060] The output image data is processed according to the transition zoom ratio corresponding to the target zoom curve to obtain the target image data.

[0061] The target zoom curve is a zoom curve obtained by adjusting the zoom smoothness based on the basic zoom curve, so that the zoom smoothness corresponding to the target zoom curve is better.

[0062] Exemplarily, the magnification value of the transition zoom magnification in the basic zoom curve or the number of transition zoom magnifications may be adjusted, for example, the magnification value of some transition zoom magnifications in the basic zoom curve may be reduced or increased, or the number of transition zoom magnifications may be increased or decreased, to obtain the target zoom curve. The basic zoom curve may be adjusted by comprehensively considering the zoom duration, smoothness, and alignment, etc., to obtain the target zoom curve. That is, when adjusting the smoothness of the basic zoom curve, it is necessary to comprehensively consider the zoom duration and alignment. For example, a longer zoom time can increase the smoothness of the curve, but a too long zoom time will also increase the waiting time for users, resulting in a bad user experience; if the number of transition zoom magnifications of the starting curve segment corresponding to the "ease-in" of the basic zoom curve is too large, although the smoothness of the curve can be increased, the zoom operation will appear to be sluggish at the beginning, which can easily create the illusion of not responding to the zoom in time, and will also cause a bad user experience. Under normal circumstances, the number of transition frames corresponding to the starting curve segment corresponding to the "ease-in" can be 2, 3, 4, 5, 6 or 7, etc., which is set according to the actual situation. Increasing the number of image frames corresponding to the alignment can enhance the alignment effect and improve the clarity of the output image data, but it may increase the zoom time.

[0063] Exemplarily, if the basic zoom curve does not meet the preset smoothness condition, the basic zoom curve is adjusted to obtain the target zoom curve. The process of the image processing method may include: in response to a zoom operation, obtaining the current zoom ratio and the target zoom ratio, determining the zoom scene type corresponding to the zoom operation according to the current zoom ratio and the target zoom ratio, determining the basic zoom curve corresponding to the current zoom ratio to the target zoom ratio according to the zoom scene type and the shooting mode, if the basic zoom curve does not meet the preset smoothness condition, adjusting the basic zoom curve to obtain the target zoom curve, processing the output image data according to the transition zoom ratio corresponding to the target zoom curve to obtain the target image data. Among them, the preset smoothness condition can be set according to actual needs.

[0064] In this embodiment, the target zoom curve is obtained by adjusting the basic zoom curve, and then the output image data is processed according to the transition zoom ratio corresponding to the target zoom curve to obtain the target image data, which can better balance the timeliness of zoom response and the smoothness of zoom, and further improve the user's zoom experience.

[0065] In some embodiments, adjusting the basic zoom curve to obtain the target zoom curve includes:

[0066] If the zoom range from the current zoom ratio to the target zoom ratio is greater than the preset range, the transition zoom ratio corresponding to the basic zoom curve is adjusted from a first number to a second number to obtain a target zoom curve; wherein the first number is smaller than the second number.

[0067] The preset amplitude refers to the zoom amplitude threshold for adjusting the transition zoom amount. The zoom amplitude corresponding to the current zoom ratio to the target zoom ratio can be represented by the ratio between the larger zoom ratio value and the smaller zoom ratio value of the current zoom ratio and the target zoom ratio.

[0068] Exemplarily, if the current zoom ratio is greater than the target zoom ratio, the ratio of the current zoom ratio to the target zoom ratio is used as the zoom amplitude; if the current zoom ratio is less than the target zoom ratio, the ratio of the target zoom ratio to the current zoom ratio is used as the zoom amplitude. Then the zoom amplitude is compared with the preset amplitude. If the zoom amplitude is greater than the preset amplitude, the transition zoom ratio corresponding to the basic zoom curve is increased from the first amount to the second amount. The second amount can be determined according to the zoom amplitude, and there is a positive correlation between the zoom amplitude and the second amount. The larger the zoom amplitude, the larger the value of the corresponding second amount.

[0069] Exemplarily, the transition zoom ratio corresponding to the basic zoom curve includes a fusion zoom ratio, and the fusion zoom ratio refers to the transition zoom ratio corresponding to the fusion image data, and the fusion image data refers to the image data obtained by aligning and fusing the image data respectively acquired by the current camera and the target camera. Among them, when adjusting the number of transition zoom ratios corresponding to the basic zoom curve, the number of fusion zoom ratios can be adjusted, and the number of transition zoom ratios other than the fusion zoom ratio can also be adjusted. It is easy to understand that in the zoom operation process of a multi-camera electronic device, camera switching may be involved, and in the camera switching process, the image data acquired by the cameras before and after the switching will be aligned and fused, and the fusion zoom ratio is often in the middle of the zoom curve.

[0070] In this embodiment, by increasing the transition zoom ratio corresponding to the basic zoom curve from a first number to a second number when the zoom amplitude from the current zoom ratio to the target zoom ratio is greater than a preset amplitude, the number of transition zoom ratios in the basic zoom curve can be increased, the smoothness of the zoom curve can be improved, and the zoom smoothness can be improved.

[0071] In an exemplary embodiment, before adjusting the transition zoom ratio corresponding to the basic zoom curve from a first number to a second number to obtain the target zoom curve, the method includes:

[0072] The second number is determined according to the correspondence between the zoom amplitude and the number of transitional zoom magnifications.

[0073] It is easy to understand that a correspondence between the zoom amplitude and the number of transitional zoom ratios is preset. After determining the zoom amplitude corresponding to the current zoom ratio to the target zoom ratio, the number of transitional zoom ratios corresponding to the zoom amplitude, i.e., the second number, can be determined from the above correspondence. Then, the transitional zoom ratio corresponding to the basic zoom curve is adjusted from the first number to the second number to obtain the target zoom curve.

[0074] Exemplarily, the larger the zoom amplitude is, the more corresponding transition zoom ratios are, that is, the value of the second number is also larger, and there is a positive correlation between the zoom amplitude and the corresponding transition zoom ratio. The corresponding relationship between the zoom amplitude and the number of transition zoom ratios includes, for example: if the zoom amplitude is less than or equal to 2 times, the corresponding number of transition zoom ratios is 15, that is, the second number is 15; if the zoom amplitude is greater than 2 times and less than or equal to 3 times, the corresponding number of transition zoom ratios is 16 or 17, that is, the second number is 16 or 17; if the zoom amplitude is greater than 3 times and less than or equal to 6 times, the corresponding number of transition zoom ratios is 18, that is, the second number is 18, 19 or 20. In one example, if the second number is determined according to the corresponding relationship between the zoom amplitude and the number of transition zoom ratios, if the second number is greater than the first number, the transition zoom ratio corresponding to the basic zoom curve is adjusted from the first number to the second number. For example, if the current zoom ratio is 0.6X and the target zoom ratio is 6X, the number of transition zooms corresponding to the determined basic zoom curve is 15, that is, the first number is 15, and the number of transition zoom ratios determined according to the zoom amplitude is 20, that is, the second number is 20, then the number of transition zoom ratios is adjusted from 15 to 20 to obtain the target zoom curve.

[0075] In this embodiment, by determining the second number according to the correspondence between the zoom amplitude and the number of transitional zoom ratios, the second number can be determined quickly and accurately, thereby improving the efficiency of adjusting the basic zoom curve to the target zoom curve.

[0076] In some embodiments, if the zoom range from the current zoom ratio to the target zoom ratio is greater than a preset range, the transition zoom ratio corresponding to the basic zoom curve is adjusted from a first amount to a second amount to obtain the target zoom curve, including:

[0077] If the zoom amplitude from the current zoom ratio to the target zoom ratio is greater than the preset amplitude, and in the process of switching from the current camera to the target camera, if the first moment of the target camera output data stream is less than the preset time length from the second moment of processing the image data according to the light change point of the target camera in the basic zoom curve, then the fused zoom ratio is adjusted from the third number to the fourth number to obtain the target zoom curve; wherein the third number is less than the fourth number.

[0078] It is easy to understand that in response to the zoom operation, the target camera may not be turned on or output the data stream. Even if the target camera starts to start, it takes a period of time before the target camera outputs the data stream. After the target camera outputs the data stream, it is aligned and fused with the data stream output by the current camera, and the image data output by the current camera is displayed. After the preset switching conditions are met, it is switched to display the image data output by the target camera. Therefore, the time when the target camera outputs the data stream is not fixed, but is related to the start-up time and the start-up speed of the target camera. In the basic zoom curve, after the light change point is determined, the time for processing the image data according to the light change point of the target camera is fixed. For example, in the basic zoom curve, the time corresponding to the output of the 10th frame or the 15th frame of the image frame is set as the time for processing the image data according to the light change point of the target camera. The fusion zoom ratio refers to the transition zoom ratio corresponding to the fusion image data, that is, the fusion image data is processed according to the fusion zoom ratio to obtain the target image data.

[0079] Exemplarily, if the first moment of the target camera output data stream is less than a preset time length from the second moment of processing image data according to the light change point of the target camera in the basic zoom curve, it means that the first moment of the target camera output data stream is closer to the second moment of processing image data according to the light change point of the target camera, which may result in a small number of fused zoom ratios, resulting in poor alignment effect, and causing the image data output by the target camera to be unclear. In this case, the number of fused zoom ratios can be increased, that is, from the third number to the fourth number, to obtain the target zoom curve.

[0080] Exemplarily, in response to a zoom operation, the current zoom ratio and the target zoom ratio are obtained, and the target camera is determined according to the current zoom ratio and the target zoom ratio. For example, the target light change point to be passed can be determined according to the current zoom ratio and the target zoom ratio, and the target camera is determined according to the target light change point to be passed. Among them, the target camera can be a camera corresponding to all target light change points, or a camera corresponding to some target light change points. After determining the target camera, if the target camera is in an off state, the target camera is turned on, and the target camera starts to output a data stream after being turned on for a period of time. The first moment when the target camera outputs the data stream and the second moment when the image data is processed according to the light change point of the target camera in the basic zoom curve are obtained. If the interval between the first moment and the second moment is less than the preset duration, the fused zoom ratio is increased from the third number to the fourth number to obtain the target zoom curve.

[0081] In this embodiment, when the zoom amplitude corresponding to the change from the current zoom ratio to the target zoom ratio is greater than the preset amplitude, and in the process of switching from the current camera to the target camera, if the distance from the first moment of the target camera output data stream to the second moment of processing the image data according to the light change point of the target camera in the basic zoom curve is less than the preset time length, the fused zoom ratio is adjusted from the third number to the fourth number, that is, the number of fused zoom ratios is increased, thereby enhancing the alignment effect and improving the clarity of the image data output by the target camera.

[0082] In some embodiments, the above method further comprises:

[0083] The light changing point corresponding to the target camera is adjusted from the first light changing point zoom ratio to the second light changing point zoom ratio; wherein the second light changing point zoom ratio is greater than the first light changing point zoom ratio.

[0084] The optical change point refers to the zoom ratio at which the camera switches. For example, 0.6X can represent the optical change point of an ultra-wide-angle camera; 1X can represent the optical change point of a wide-angle camera, and a zoom ratio less than 1X will switch to an ultra-wide-angle camera; 3X can represent the optical change point of a telephoto camera, that is, less than 3X will switch to a wide-angle camera; 6X can represent the optical change point of an ultra-telephoto camera, and less than 6X will switch the camera to a telephoto camera, etc. Adjusting the optical change point corresponding to the target camera from the zoom ratio of the first optical change point to the zoom ratio of the second optical change point is equivalent to moving the optical change point corresponding to the target camera backward.

[0085] Exemplarily, if the zoom amplitude corresponding to the current zoom ratio to the target zoom ratio is greater than the preset amplitude, and in the process of switching from the current camera to the target camera, if the first moment of the target camera output data stream is less than the preset time length from the second moment of processing the image data according to the light change point of the target camera in the basic zoom curve, then the light change point corresponding to the target camera can be adjusted from the first light change point zoom ratio to the second light change point zoom ratio.

[0086] In this embodiment, by adjusting the zoom ratio of the light change point corresponding to the target camera from the first light change point to the second light change point zoom ratio when the distance from the first moment when the target camera outputs the data stream to the second moment when the image data is processed according to the light change point of the target camera in the basic zoom curve is less than a preset time length, the number of fused zoom ratios can be increased, the alignment effect can be enhanced, and the clarity of the image data output by the target camera can be improved.

[0087] In some embodiments, the above method further comprises:

[0088] The value of the first fused zoom magnification in the basic zoom curve is adjusted from a first magnification value to a second magnification value to obtain a target zoom curve; wherein the second magnification value is smaller than the first magnification value.

[0089] The first fused zoom ratio refers to the first fused zoom ratio, that is, the transition zoom ratio corresponding to the first frame of fused image data. Usually, the first fused zoom ratio can be the second, third, fourth, fifth or sixth transition zoom ratio in the basic zoom curve, and the position of the first fused zoom ratio in the zoom curve can be set according to the actual application scenario.

[0090] For example, if the number of fused zoom magnifications is small or the value of the first fused zoom magnification is large, the change amplitude corresponding to the starting curve segment of the basic zoom curve is large, and it is easy to have a large jump in the field of view during camera switching. Therefore, the value of the first fused zoom magnification in the basic zoom curve can be reduced, that is, adjusted from the first magnification value to the second magnification value.

[0091] In one example, the current zoom ratio is 0.6X, the target zoom ratio is 6X, and the determined basic zoom curve is as follows: Figure 3 As shown, the first fused zoom ratio corresponds to the fifth transition zoom ratio in the basic zoom curve (see the transition zoom ratio in the dotted box in the figure). The value of the first fused zoom ratio is adjusted from the first ratio value 1.9 to the second ratio value 1, and the change trend of the curve segment before the first fused zoom ratio slows down. It is easy to understand that since the transition zoom ratios in the zoom curve change slowly in sequence, when the value of the first fused zoom ratio changes, for the smoothness of the curve, the values ​​of the remaining transition zoom ratios may also change. In addition, since the value of the first fused zoom ratio becomes smaller, if the number of transition zoom ratios remains unchanged, the degree of change of the curve segment after the first fused zoom ratio will become steeper. The number of fused zoom ratios can be increased, for example 2, to make the zoom curve smoother as a whole, and to provide more time for the target camera to be turned on and outflow. The resulting target zoom curve is shown as follows: Figure 4 shown.

[0092] In this embodiment, by reducing the value of the first fused zoom ratio in the basic zoom curve to obtain a target zoom curve, the curve segment at the beginning of the zoom curve can be made smoother, thereby improving the user's zoom smoothness experience.

[0093] In some embodiments, the transition zoom factors preceding the first blended zoom factor in the target zoom curve include a target number of the same transition zoom factors.

[0094] If the number of transition zoom magnifications before the first fusion zoom magnification in the target zoom curve is a preset number, the target number is less than or equal to the preset number. That is, the preset number of transition zoom magnifications includes the same transition zoom magnifications of the target number. The target number can be set according to the change trend requirement of the curve segment of the beginning part of the target zoom curve. The larger the target number, the smoother the change trend of the corresponding curve segment of the beginning part.

[0095] Exemplarily, the preset number of transition zoom ratios includes 0.6x->0.6x->0.6x->0.8x-1x, that is, the preset number is 5, the target number is 3, and the same transition zoom ratio is 0.6x. It is easy to understand that the same transition zoom ratio may also be 0.8x, that is, the transition zoom ratio before the first fusion zoom ratio in the target zoom curve includes 0.6x->0.8x->0.8x->0.8x-1x, or, the same zoom ratio may also be 1x, that is, the transition zoom ratio before the first fusion zoom ratio in the target zoom curve includes 0.6x->0.8x->1x->1x-1x, and so on. When the preset number is 5, the target number may be 2, 3 or 4.

[0096] In this embodiment, by reducing the value of the first fused zoom ratio in the basic zoom curve, the transition zoom ratio before the first fused zoom ratio will also change accordingly, thereby obtaining a target zoom curve. In the target zoom curve, the transition zoom ratio before the first fused zoom ratio includes a target number of transition zoom ratios of the same value, which can make the curve segment at the beginning of the target zoom curve smoother, thereby achieving smooth zoom while responding to the zoom in a timely manner.

[0097] In some embodiments, adjusting the basic zoom curve to obtain the target zoom curve includes:

[0098] If the object distance is less than the distance threshold, or the startup speed of the target camera is less than the startup speed threshold, or the output data stream speed is less than the output speed threshold, the number of fused zoom ratios in the basic zoom curve is adjusted from the fifth number to the sixth number to obtain the target zoom curve; wherein the fifth number is less than the sixth number.

[0099] Among them, the object distance refers to the distance between the photographed object and the camera, and the distance threshold is the threshold that characterizes whether it is a close-up shot. If the object distance is less than the distance threshold, it indicates a close-up shot. Then the distance between the cameras has a greater impact, and the field of view angle is prone to jitter during the zoom process. The number of fused zoom ratios can be increased by adjusting the number of fused zoom ratios in the basic zoom curve from the fifth number to the sixth number to obtain the target zoom curve, so that there is enough time for the target camera to focus and align, and to respond to the zoom in time while achieving smooth zooming. It is easy to understand that the distance threshold, startup speed threshold or output speed threshold can be set according to the actual application scenario.

[0100] The startup speed threshold is a threshold that characterizes the speed of the camera startup. The output speed threshold is a threshold that characterizes the speed of the camera output data stream. If the startup speed of the target camera is less than the startup speed threshold, it means that the startup speed of the target camera is slow. Alternatively, if the speed of the target camera output data stream is less than the output speed threshold, similar to the camera startup speed, it means that the outflow speed of the target camera is slow. In the case where the startup speed of the target camera is slow or the outflow speed is slow, it may happen that the time when the target camera outputs the data stream is less than the preset time when the light change point of the target camera in the basic zoom curve processes the image data, that is, the target camera may not achieve accurate focus or alignment before switching, resulting in unclear output image data. In this case, the number of fused zoom magnifications in the basic zoom curve can be increased by adjusting the number of fused zoom magnifications in the basic zoom curve from the fifth number to the sixth number to obtain a target zoom curve, so that there is enough time for the target camera to focus and align, and achieve timely response to zoom while performing smooth zoom.

[0101] In some embodiments, the above method further comprises:

[0102] The target light change point corresponding to the target camera is re-determined according to one or more of the camera position information, the camera startup speed, the image clarity or the degree of change of the field of view angle; wherein the target light change point is greater than or equal to the initial light change point of the target camera.

[0103] The camera position information refers to the distribution position information of the camera on the electronic device. The positions of different cameras are different. The camera startup speed refers to the speed at which the camera is turned on. The field of view angle change information refers to the field of view angle change that the user can see, and the field of view angle change information includes, for example, smooth change or non-smooth change.

[0104] Exemplarily, if the camera position information is one of the following: the target camera is far away from the current camera, the camera startup speed is slow, the image clarity is poor, or the field of view angle changes drastically, the target light change point corresponding to the target camera can be re-determined. If the target light change point is greater than the initial light change point of the target camera, the light change point of the target camera is replaced with the target light change point. If the target light change point is equal to the initial light change point, the light change point of the target camera is kept as the initial light change point. Among them, from a single factor point of view, the farther the distance between the target camera and the current camera, especially in close-up shooting scenes, the larger the corresponding target light change point; the slower the camera startup speed, the larger the corresponding target light change point; the worse the image clarity, the larger the corresponding target light change point; the greater the field of view angle change, the larger the target light change point. The larger the target light change point, the greater the absolute value of the difference with the basic light change point.

[0105] Exemplarily, the target light change point corresponding to the target camera can be re-determined based on the camera position information, camera startup speed, image clarity, and the degree of change in the field of view angle. For example, the target light change point corresponding to the target camera can be determined by a function composed of independent variable parameters such as camera position information, camera startup speed, image clarity, and the degree of change in the field of view angle. It should be noted that if the distance between the target light change point and the basic light change point is too large, it is easy to cause the degree of change between the transition zoom ratio to be too large, that is, the image needs to be significantly cropped, which may result in poor image clarity and a negative impact on the alignment effect. Therefore, it is necessary to combine multiple factors to determine the value of the target light change point.

[0106] In this embodiment, by redetermining the target light change point corresponding to the target camera based on one or more of the camera position information, camera startup speed, image clarity or field of view angle change, more fusion zoom ratios can be increased, and sufficient time can be provided for the target camera to focus or align, outputting clearer images. At the same time, the zoom curve will be flatter, and smooth zoom can be achieved.

[0107] In some embodiments, if the shooting mode is a video mode, the change amplitude of the curve segment formed by the transition zoom ratio within a preset range centered at the light change point of the target camera in the basic zoom curve is greater than the preset change amplitude.

[0108] Among them, the transition zoom ratio within the preset range centered on the light change point of the target camera refers to a certain number of transition zoom ratios forward and a certain number of transition zoom ratios backward with the light change point of the target camera as the center, among the transition zoom ratios corresponding to the basic zoom curve, or it can be a first number of transition zoom ratios forward and a second number of transition zoom ratios backward with the light change point of the target camera as the center. The certain number can be 1, 2, or 3, etc., and can be set according to the actual application scenario. The first magnification number and the second magnification number can be different, and the first magnification number or the second magnification number can be, for example, 1, 2, or 3, etc. The preset change amplitude can be set according to actual needs, and the preset change amplitude can also be characterized by the change amplitude of the curve segment at the corresponding position in the basic zoom curve corresponding to the photo mode under the same circumstances.

[0109] In an example, when the shooting mode is video mode, taking the current zoom ratio as 0.6X and the target zoom ratio as 3X, the corresponding basic zoom curve is as follows: Figure 5 As shown, from Figure 5 It can be seen that 3X is the light change point of the telephoto camera, and the curve segment near 3X has a larger change range, which is greater than the preset change range. It should be noted that when the shooting mode is video mode, fusion processing is not required during camera switching, and the camera switches directly when it reaches the light change point. Therefore, in the basic zoom curve, the change range of the curve segment corresponding to the transition zoom ratio near the light change point cannot be too slow, and the problem of field angle jitter caused by camera switching can be covered up by a relatively drastic change in field angle.

[0110] In this embodiment, if the shooting mode is video mode, the change amplitude of the curve segment formed by the transition zoom ratio within a preset range centered on the light change point of the target camera in the basic zoom curve is greater than the preset change amplitude, which can achieve rapid change of the transition zoom ratio near the light change point, thereby avoiding the problem of field of view angle jitter caused by camera switching corresponding to the light change point, and achieving smooth zoom in video mode.

[0111] In some embodiments, in response to a zoom operation, step 102 of obtaining a current zoom factor and a target zoom factor includes:

[0112] In response to the zoom operation, the operation type corresponding to the zoom operation is identified; when the operation type is a point-and-cut operation, the current zoom magnification and the target zoom magnification are acquired.

[0113] The operation type corresponding to the zoom operation is used to characterize the zoom triggering mode. The operation type corresponding to the zoom operation may include a point-cut operation and a slide-cut operation.

[0114] Exemplarily, in response to the zoom operation, the zoom operation event sent by the camera application can be used to identify whether the operation type is a point-to-point operation or a slide-to-point operation. When the operation type is identified as a point-to-point operation, the steps of obtaining the current zoom ratio and the target zoom ratio in the above embodiment are performed.

[0115] In this embodiment, when the operation type corresponding to the zoom operation is identified as a point-to-point operation, the current zoom ratio and the target zoom ratio are obtained, and then the zoom scene type corresponding to the zoom operation is determined according to the current zoom ratio and the target zoom ratio. In the point-to-point operation scenario, a matching basic zoom curve is determined for different zoom scene types and shooting modes to perform zoom processing. The zoom requirements of different scenes can be taken into account, and smooth, flow-field zooming can be achieved in different scenes, thereby enhancing the user's zoom experience.

[0116] In some embodiments, after step 104 of determining the zoom scene type corresponding to the zoom operation according to the current zoom magnification and the target zoom magnification, the method further includes:

[0117] According to the zoom scene type, a candidate zoom curve corresponding to the current zoom ratio to the target zoom ratio is determined; in response to triggering the candidate zoom curve, a specified zoom curve is determined; and the output image data is processed according to the zoom ratio corresponding to the specified zoom curve to obtain the target image data.

[0118] Among them, the candidate zoom curves may include one or more. For example, according to the scene type, the candidate zoom curves with different change trends corresponding to the current zoom ratio to the target zoom ratio can be determined, such as a candidate zoom curve with better smoothness, or a candidate zoom curve with a transition zoom ratio that changes in a proportional manner, or a candidate zoom curve with a transition zoom ratio that changes rapidly and sharply, etc. It can be understood that the candidate zoom curves with different change trends corresponding to the scene type can be pre-set, that is, the correspondence between the scene type and the candidate zoom curves. According to the correspondence between the scene type and the candidate zoom curves, the candidate zoom curve corresponding to the current zoom ratio to the target zoom ratio can be determined.

[0119] Exemplarily, in response to a zoom operation, the electronic device obtains a current zoom ratio and a target zoom ratio, determines a zoom scene type based on the current zoom ratio and the target zoom ratio, determines multiple candidate zoom curves corresponding to the current zoom ratio to the target zoom ratio based on the zoom scene type, and displays the multiple candidate zoom curves; in response to triggering the candidate zoom curves, determines a specified zoom curve, and the electronic device crops the output image data according to the zoom ratio corresponding to the specified zoom curve to obtain target image data.

[0120] In this embodiment, by determining candidate zoom curves corresponding to the current zoom ratio to the target zoom ratio according to the zoom scene type, the user can select a specified zoom curve from the candidate zoom curves, and then the output image data is processed according to the zoom ratio corresponding to the specified zoom curve to obtain the target image data. This enables zooming according to the field of view angle change method selected by the user, improves the zoom freedom, meets the user's multi-style shooting needs, and further improves the user experience.

[0121] In an exemplary embodiment, the flowchart of the image processing method is as follows: Figure 6 As shown, the processing flow is as follows:

[0122] (1) Preview / Record. Open the camera application and enter the shooting mode that supports the SAT function. The shooting mode can be preview mode, recording mode, photo mode, etc.

[0123] (2) Triggering zoom. The electronic device responds to the zoom operation.

[0124] (3) Identify whether the operation type is a point-to-point operation. Identify the operation type corresponding to the zoom operation. You can identify whether it is a point-to-point operation based on the zoom event sent by the camera application.

[0125] (4) If the operation type is a point-to-point operation, determine the configuration information of the rear camera. For example, determine whether the number of cameras is 3 or 4. If 3 cameras are included, the corresponding electronic device belongs to 3-camera, and if 4 cameras are included, the corresponding electronic device belongs to 4-camera. It is easy to understand that the camera configuration information can also be a single camera or dual camera configuration, or a configuration of a larger number of cameras. If a front camera is used, the configuration information of the front camera can also be determined.

[0126] (5) When the operation type is a point-to-point operation, obtain the current zoom ratio and the target zoom ratio corresponding to the zoom operation.

[0127] (6) Determine the zoom scene type. The zoom scene type may be determined based on the configuration information of the rear camera, the current zoom ratio, and the target zoom ratio. For example, the zoom scene type may be a 3-camera zoom in scene, a 3-camera zoom out scene, a 4-camera zoom in scene, or a 4-camera zoom out scene.

[0128] (7) Determine the basic zoom curve. According to the zoom scene type and shooting mode, determine the basic zoom curve corresponding to the current zoom ratio to the target zoom ratio.

[0129] (8) Identify whether the light change point needs to be adjusted. For example, for a 3-camera zoom in scene, when the zoom ratio changes to 3X, the telephoto camera will be switched to by default, that is, 3X is the initial light change point of the telephoto camera. Therefore, in the zoom scenes of 0.6X to 6X and 1X to 6X, the telephoto camera may be switched to the display when the telephoto camera just starts to output the data stream. This may result in insufficient amount of fused image data, resulting in poor alignment effect. At the same time, the AF (AutoFocus) convergence of the telephoto camera has not yet been completed, which may also cause the displayed image to be blurred. Therefore, for a 3-camera zoom in scene in photo mode or video mode, the light change point of the telephoto camera can be adjusted from 3X to 4X, that is, the telephoto camera is switched to the display when the zoom ratio reaches 4X. In this way, there is enough fused image data for alignment, achieving a better alignment effect, enough time for autofocus, and the telephoto camera can be switched after accurate focus is achieved, thereby improving image clarity.

[0130] (9) Identify whether the chirality needs to be adjusted. If the amount of fused image data is too small, the amount of fused image data can be increased, and the amount of fused zoom magnification can be increased accordingly, so that the target camera output data stream has sufficient time. For large-span zoom scenes, the zoom curve can be made smoother by reducing the value of the first fused zoom magnification, so that the zoom operation can be responded to in a timely manner while achieving smooth zoom.

[0131] (10) Delayed response of the field of view angle. When adjusting the chirality, the transition zoom ratio before the first fusion zoom ratio can include the same transition zoom ratio of the target number, so that the FOV changes slowly, presenting the effect of delayed response of the field of view angle, and making the target zoom curve smoother.

[0132] (11) Light change point triggers camera switching. When the zoom ratio corresponding to the current image frame reaches the light change point of the target camera, the target camera is switched to display, that is, the target image data obtained by processing the image data output by the target camera is displayed.

[0133] (12) Zoom is completed and preview / recording is resumed.

[0134] In the above embodiment, by determining the basic zoom curve corresponding to the current zoom ratio and the target zoom ratio according to the shooting mode and the zoom scene type in the point-and-cut operation scenario, different scenes can be zoomed according to different basic zoom curves, so that the user can have a good zoom experience in different scenes; in addition, the basic zoom curve is adjusted according to the actual scene conditions, so that the user's smooth zoom experience can be further improved without affecting the hand tracking performance.

[0135] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0136] Based on the same inventive concept, the embodiment of the present application also provides an image processing device for implementing the above-mentioned image processing method. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above-mentioned method, so the specific limitations in one or more image processing device embodiments provided below can refer to the limitations on the image processing method above, and will not be repeated here.

[0137] In an exemplary embodiment, Figure 7 As shown, an image processing device is provided, including: a zoom ratio acquisition module 702, a zoom scene determination module 704, a zoom curve determination module 706 and an image data processing module 708, wherein:

[0138] A zoom ratio acquisition module 702, for acquiring a current zoom ratio and a target zoom ratio in response to a zoom operation;

[0139] A zoom scene determination module 704, configured to determine a zoom scene type corresponding to the zoom operation according to the current zoom magnification and the target zoom magnification;

[0140] A zoom curve determination module 706 is used to determine a basic zoom curve corresponding to a current zoom ratio to a target zoom ratio according to a zoom scene type and a shooting mode;

[0141] The image data processing module 708 is used to process the output image data according to the transition zoom ratio corresponding to the basic zoom curve to obtain target image data.

[0142] In some embodiments, the zoom scene determination module 704 is further used to obtain camera configuration information; and determine the zoom scene type corresponding to the zoom operation according to the camera configuration information, the current zoom ratio and the target zoom ratio.

[0143] In some embodiments, the above-mentioned apparatus further includes a zoom curve adjustment module, which is used to adjust the basic zoom curve to obtain a target zoom curve;

[0144] The image data processing module 708 is further configured to process the output image data according to the transition zoom ratio corresponding to the target zoom curve to obtain target image data.

[0145] In some embodiments, the zoom curve adjustment module is also used to adjust the transition zoom ratio corresponding to the basic zoom curve from a first number to a second number to obtain a target zoom curve if the zoom amplitude corresponding to the current zoom ratio to the target zoom ratio is greater than a preset amplitude; the first number is less than the second number.

[0146] In some embodiments, the above-mentioned device also includes a zoom ratio quantity determination module, which is used to determine the second quantity according to the correspondence between the zoom amplitude and the quantity of transition zoom ratios before adjusting the transition zoom ratio corresponding to the basic zoom curve from the first quantity to the second quantity to obtain the target zoom curve.

[0147] In some embodiments, the zoom curve adjustment module is also used to adjust the fused zoom ratio from the third number to the fourth number to obtain the target zoom curve if the zoom amplitude corresponding to the current zoom ratio to the target zoom ratio is greater than a preset amplitude, and in the process of switching from the current camera to the target camera, if the first moment of the target camera output data stream is less than the preset time length from the second moment of processing the image data according to the light change point of the target camera in the basic zoom curve; the third number is less than the fourth number.

[0148] In some embodiments, the above-mentioned device also includes a light change point adjustment module, which is used to adjust the light change point corresponding to the target camera from a first light change point zoom ratio to a second light change point zoom ratio; the second light change point zoom ratio is greater than the first light change point zoom ratio.

[0149] In some embodiments, the above-mentioned device also includes a magnification value adjustment module, which is used to adjust the value of the first fused zoom magnification in the basic zoom curve from a first magnification value to a second magnification value to obtain a target zoom curve; the second magnification value is smaller than the first magnification value.

[0150] In some embodiments, the zoom curve adjustment module is also used to adjust the number of fused zoom ratios in the basic zoom curve from a fifth number to a sixth number to obtain a target zoom curve if the object distance is less than a distance threshold, or the startup speed of the target camera is less than a startup speed threshold, or the speed of the output data stream is less than an output speed threshold; the fifth number is less than the sixth number.

[0151] In some embodiments, the above-mentioned device also includes a light change point re-determination module, which is used to re-determine the target light change point corresponding to the target camera based on one or more of camera position information, camera startup speed, image clarity or field of view angle change degree; the target light change point is greater than or equal to the initial light change point of the target camera.

[0152] In some embodiments, the zoom ratio acquisition module 702 is further used to identify the operation type corresponding to the zoom operation in response to the zoom operation; when the operation type is a point-to-point operation, obtain the current zoom ratio and the target zoom ratio.

[0153] In some embodiments, the above-mentioned device also includes a zoom curve selection module, which is used to determine the zoom scene type corresponding to the zoom operation according to the current zoom ratio and the target zoom ratio, and then determine the candidate zoom curve corresponding to the current zoom ratio to the target zoom ratio according to the zoom scene type; determine the specified zoom curve in response to the triggering of the candidate zoom curve; and process the output image data according to the zoom ratio corresponding to the specified zoom curve to obtain the target image data.

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

[0155] In an exemplary embodiment, an electronic device is provided. The electronic device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 8As shown. The electronic device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. 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. 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 to exchange information between the processor and an external device. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and 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, an image processing method is implemented. 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, and the input device of the electronic device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the electronic device casing, or an external keyboard, touchpad or mouse.

[0156] Those skilled in the art will understand that Figure 8 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0157] In an exemplary embodiment, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps of the image processing method in the above embodiment when executing the computer program.

[0158] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the image processing method in the above embodiment are implemented.

[0159] In one embodiment, a computer program product is provided, including a computer program, which implements the steps of the image processing method in the above embodiment when executed by a processor.

[0160] 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 used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0161] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and 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-mentioned methods. Among them, any reference to the 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), magnetic 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. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0162] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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, they should be considered to be within the scope of this application.

[0163] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. An image processing method, characterized in that: The method comprises: In response to a zoom operation, obtaining a current zoom ratio and a target zoom ratio; Determining a zoom scene type corresponding to the zoom operation according to the current zoom magnification and the target zoom magnification; Determining a basic zoom curve corresponding to the current zoom ratio to the target zoom ratio according to the zoom scene type and the shooting mode; The output image data is processed according to the transition zoom ratio corresponding to the basic zoom curve to obtain target image data.

2. The method according to claim 1, characterized in that The determining, according to the current zoom magnification and the target zoom magnification, a zoom scene type corresponding to the zoom operation includes: Get camera configuration information; A zoom scene type corresponding to the zoom operation is determined according to the camera configuration information, the current zoom ratio, and the target zoom ratio.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: Adjusting the basic zoom curve to obtain a target zoom curve; The step of processing the output image data according to the transition zoom ratio corresponding to the basic zoom curve to obtain target image data includes: The output image data is processed according to the transition zoom ratio corresponding to the target zoom curve to obtain target image data.

4. The method according to claim 3, characterized in that: The step of adjusting the basic zoom curve to obtain a target zoom curve includes: If the zoom range from the current zoom ratio to the target zoom ratio is greater than a preset range, the transition zoom ratio corresponding to the basic zoom curve is adjusted from a first number to a second number to obtain the target zoom curve; the first number is smaller than the second number.

5. The method according to claim 4, characterized in that Before adjusting the transition zoom ratio corresponding to the basic zoom curve from a first number to a second number to obtain the target zoom curve, the method includes: The second number is determined according to a correspondence between the zoom amplitude and the number of transitional zoom ratios.

6. The method according to claim 4, characterized in that If the zoom range from the current zoom magnification to the target zoom magnification is greater than a preset range, the transition zoom magnification corresponding to the basic zoom curve is adjusted from a first amount to a second amount to obtain the target zoom curve, including: If the zoom amplitude corresponding to the current zoom ratio to the target zoom ratio is greater than the preset amplitude, and in the process of switching from the current camera to the target camera, if the first moment of the target camera outputting the data stream is less than the preset time length from the second moment of processing the image data according to the light change point of the target camera in the basic zoom curve, the fused zoom ratio is adjusted from the third number to the fourth number to obtain the target zoom curve; the third number is less than the fourth number.

7. The method according to claim 6, characterized in that The method further comprises: The light changing point corresponding to the target camera is adjusted from a first light changing point zoom ratio to a second light changing point zoom ratio; the second light changing point zoom ratio is greater than the first light changing point zoom ratio.

8. The method according to claim 4, characterized in that The method further comprises: The value of the first fused zoom ratio in the basic zoom curve is adjusted from a first ratio value to a second ratio value to obtain a target zoom curve; the second ratio value is smaller than the first ratio value.

9. The method according to claim 8, characterized in that The transition zoom magnifications preceding the first blended zoom magnification in the target zoom curve include a target number of the same transition zoom magnifications.

10. The method according to claim 3, characterized in that The step of adjusting the basic zoom curve to obtain a target zoom curve includes: If the object distance is less than the distance threshold, or the startup speed of the target camera is less than the startup speed threshold, or the output data stream speed is less than the output speed threshold, the number of fused zoom ratios in the basic zoom curve is adjusted from the fifth number to the sixth number to obtain the target zoom curve; the fifth number is less than the sixth number.

11. The method according to claim 1, characterized in that: The method further comprises: Re-determine the target light change point corresponding to the target camera according to one or more of camera position information, camera startup speed, image clarity or field of view angle change degree; the target light change point is greater than or equal to the initial light change point of the target camera.

12. The method according to claim 1, characterized in that If the shooting mode is a video mode, the variation range of the curve segment formed by the transition zoom ratio within a preset range centered at the light change point of the target camera in the basic zoom curve is greater than the preset variation range.

13. The method according to claim 1, characterized in that The step of obtaining the current zoom ratio and the target zoom ratio in response to the zoom operation includes: In response to a zoom operation, identifying an operation type corresponding to the zoom operation; When the operation type is a point-to-point operation, a current zoom factor and a target zoom factor are acquired.

14. The method according to claim 1, characterized in that After determining the zoom scene type corresponding to the zoom operation according to the current zoom magnification and the target zoom magnification, the method further includes: Determining, according to the zoom scene type, a candidate zoom curve corresponding to the current zoom magnification to the target zoom magnification; In response to triggering the candidate zoom curve, determining a designated zoom curve; The output image data is processed according to the zoom ratio corresponding to the specified zoom curve to obtain target image data.

15. An image processing device, characterized in that: The device comprises: A zoom ratio acquisition module, used for acquiring a current zoom ratio and a target zoom ratio in response to a zoom operation; A zoom scene determination module, used to determine a zoom scene type corresponding to the zoom operation according to the current zoom magnification and the target zoom magnification; A zoom curve determination module, used to determine a basic zoom curve corresponding to the current zoom ratio to the target zoom ratio according to the zoom scene type and the shooting mode; The image data processing module is used to process the output image data according to the transition zoom ratio corresponding to the basic zoom curve to obtain target image data.

16. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 14 are implemented.

17. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 14 are implemented.

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