Image processing method, device, electronic device and computer readable storage medium

Through an image processing method that combines multi-frame fusion, single-frame super-resolution and interpolation processing, it solves the problem of limited zoom multiples supported by traditional zoom methods, and achieves flexible focal length zoom processing and high-quality image output.

CN113570531BActive Publication Date: 2024-09-06GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110851688.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-27
Publication Date
2024-09-06
Estimated Expiration
2041-07-27

AI Technical Summary

Technical Problem

The zoom function of traditional mobile phone cameras supports limited zoom factors and inflexible processing methods, making it difficult to meet the needs of different focal lengths.

Method used

Through the combination of multi-frame fusion method, single-frame super-resolution method and interpolation processing method, the appropriate processing method is selected according to the target zoom magnification to achieve flexible focal length zoom processing.

Benefits of technology

It achieves flexible zoom processing at different focal lengths, reduces image quality loss, and improves image resolution and clarity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113570531B
    Figure CN113570531B
Patent Text Reader

Abstract

The present application relates to an image processing method, comprising: when a target zoom ratio is within a first preset zoom ratio range, zoom processing is performed on each frame of the image to be processed by multi-frame fusion to obtain a first target image of the target zoom ratio; when the target zoom ratio belongs to a second preset zoom ratio, zoom processing is performed on each frame of the image to be processed by multi-frame fusion and single-frame super-resolution to obtain a second target image of the target zoom ratio; the second preset zoom ratio is an integer multiple of the upper limit value of the first preset zoom ratio range; when the target zoom ratio belongs to a third preset zoom ratio, zoom processing is performed on each frame of the image to be processed by multi-frame fusion, single-frame super-resolution and interpolation processing to obtain a third target image of the target zoom ratio; the third preset zoom ratio is between the two second preset zoom ratios. The present method can flexibly realize zoom processing at different zoom ratios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] The zoom function of mobile phone photography generally includes three processing methods: optical zoom, hybrid zoom and digital zoom. Different zoom methods can be selected according to different focal lengths. However, the zoom multiples that can be supported by traditional zoom methods are limited and the processing methods are not flexible. Summary of the invention

[0003] The embodiments of the present application provide an image processing method, device, electronic device, and computer-readable storage medium, which can flexibly implement zoom processing at different focal lengths.

[0004] An image processing method, comprising:

[0005] Acquire a target zoom ratio, and when the target zoom ratio is within a first preset zoom ratio range, perform zoom processing on each frame of the image to be processed by a multi-frame fusion method to obtain a first target image at the target zoom ratio;

[0006] When the target zoom ratio belongs to a second preset zoom ratio, zoom processing is performed on each frame of the image to be processed by the multi-frame fusion method and the single-frame super-resolution method to obtain a second target image at the target zoom ratio; the second preset zoom ratio is an integer multiple of the upper limit value of the first preset zoom ratio range;

[0007] When the target zoom ratio belongs to the third preset zoom ratio, zoom processing is performed on each frame of the image to be processed through the multi-frame fusion method, the single-frame super-resolution method and the interpolation processing method to obtain a third target image at the target zoom ratio; the third preset zoom ratio is between two different second preset zoom ratios.

[0008] An image processing device, comprising:

[0009] A first zoom module, used for acquiring a target zoom ratio, and when the target zoom ratio is within a first preset zoom ratio range, zooming each frame of the image to be processed is performed by a multi-frame fusion method to obtain a first target image at the target zoom ratio;

[0010] A second zoom module is used for performing zoom processing on each frame of the image to be processed by the multi-frame fusion method and the single-frame super-resolution method to obtain a second target image at the target zoom ratio when the target zoom ratio belongs to a second preset zoom ratio; the second preset zoom ratio is an integer multiple of the upper limit value of the first preset zoom ratio range;

[0011] The third zoom module is used to perform zoom processing on each frame of the image to be processed by the multi-frame fusion method, the single-frame super-resolution method and the interpolation processing method when the target zoom ratio belongs to the third preset zoom ratio, so as to obtain a third target image at the target zoom ratio; the third preset zoom ratio is between two different second preset zoom ratios.

[0012] An electronic device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0013] Acquire a target zoom ratio, and when the target zoom ratio is within a first preset zoom ratio range, perform zoom processing on each frame of the image to be processed by a multi-frame fusion method to obtain a first target image at the target zoom ratio;

[0014] When the target zoom ratio belongs to a second preset zoom ratio, zoom processing is performed on each frame of the image to be processed by the multi-frame fusion method and the single-frame super-resolution method to obtain a second target image at the target zoom ratio; the second preset zoom ratio is an integer multiple of the upper limit value of the first preset zoom ratio range;

[0015] When the target zoom ratio belongs to the third preset zoom ratio, zoom processing is performed on each frame of the image to be processed through the multi-frame fusion method, the single-frame super-resolution method and the interpolation processing method to obtain a third target image at the target zoom ratio; the third preset zoom ratio is between two different second preset zoom ratios.

[0016] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:

[0017] Acquire a target zoom ratio, and when the target zoom ratio is within a first preset zoom ratio range, perform zoom processing on each frame of the image to be processed by a multi-frame fusion method to obtain a first target image at the target zoom ratio;

[0018] When the target zoom ratio belongs to a second preset zoom ratio, zoom processing is performed on each frame of the image to be processed by the multi-frame fusion method and the single-frame super-resolution method to obtain a second target image at the target zoom ratio; the second preset zoom ratio is an integer multiple of the upper limit value of the first preset zoom ratio range;

[0019] When the target zoom ratio belongs to the third preset zoom ratio, zoom processing is performed on each frame of the image to be processed through the multi-frame fusion method, the single-frame super-resolution method and the interpolation processing method to obtain a third target image at the target zoom ratio; the third preset zoom ratio is between two different second preset zoom ratios.

[0020] The above-mentioned image processing method, device, electronic device and computer-readable storage medium can quickly generate a first target image at the target zoom ratio by performing zoom processing on each frame of the image to be processed in a multi-frame fusion manner when the target zoom ratio is within the first preset zoom ratio range. When the target zoom ratio belongs to the second preset zoom ratio, zoom processing is performed on each frame of the image to be processed in combination with the multi-frame fusion method and the single-frame super-resolution method, which can increase the details of the image and reduce the loss of image quality, thereby obtaining a second target image at the target zoom ratio, and the second preset zoom ratio is an integer multiple of the upper limit value of the first preset zoom ratio range. When the target zoom ratio belongs to the third preset zoom ratio, each frame of the image to be processed is zoomed through a multi-frame fusion method, a single-frame super-resolution method and an interpolation processing method to obtain a third target image at the target zoom ratio. The third preset zoom ratio is between two different second preset zoom ratios. According to the preset zoom ratio to which the target zoom ratio belongs, it is possible to flexibly select a multi-frame fusion method, a single-frame super-resolution method, an interpolation processing method and a combination thereof to perform zoom processing at different focal lengths, and effectively reduce the loss of image quality at each focal length. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art 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 drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 A diagram showing an application environment of an image processing method in an embodiment;

[0023] Figure 2 is a flowchart of an image processing method in one embodiment;

[0024] Figure 3 A schematic diagram of multi-stage magnification super-resolution with continuously variable zoom ratio in one embodiment;

[0025] Figure 4 A schematic diagram of the structure of an AI super-resolution neural network in one embodiment;

[0026] Figure 5 is a flowchart of steps for obtaining a third target image at a target zoom factor in one embodiment;

[0027] Figure 6 A schematic diagram of generating an image with a zoom factor of 4x in one embodiment;

[0028] Figure 7 is a schematic diagram of bicubic interpolation in one embodiment;

[0029] Figure 8 A schematic diagram of a process of performing zoom processing on each frame of an image to be processed by a multi-frame fusion method in an embodiment;

[0030] Fig. 9 A schematic diagram of a process for determining a homography matrix in one embodiment;

[0031] Fig.10 is a structural block diagram of an image processing device in one embodiment;

[0032] Fig.11 FIG. 4 is a block diagram of the internal structure of an electronic device in one embodiment. DETAILED DESCRIPTION

[0033] 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.

[0034] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first target image may be referred to as a second target image, and similarly, a second target image may be referred to as a first target image. Both the first target image and the second target image are target images, but they are not the same target image.

[0035] Figure 1 FIG. 1 is a schematic diagram of an application environment of an image processing method in an embodiment. Figure 1As shown, the application environment includes an electronic device 110 and a server 120. The electronic device 110 obtains a target zoom ratio and each frame of the image to be processed, and sends the target ratio and each frame of the image to be processed to the server 120. When the target zoom ratio is within a first preset zoom ratio range, the server 120 performs zoom processing on each frame of the image to be processed by a multi-frame fusion method to obtain a first target image at the target zoom ratio. The server 120 returns the first target image to the terminal 110. When the target zoom ratio belongs to a second preset zoom ratio, the server 120 performs zoom processing on each frame of the image to be processed by a multi-frame fusion method and a single-frame super-resolution method to obtain a second target image at the target zoom ratio; the second preset zoom ratio is an integer multiple of the upper limit value of the first preset zoom ratio range. The server 120 returns the second target image to the terminal 110. When the target zoom ratio belongs to the third preset zoom ratio, the server 120 performs zoom processing on each frame of the to-be-processed image by means of a multi-frame fusion method, a single-frame super-resolution method, and an interpolation processing method to obtain a third target image at the target zoom ratio; the third preset zoom ratio is between two different second preset zoom ratios. The server 120 returns the third target image to the terminal 110.

[0036] The terminal 110 communicates with the server 120 via a network. The terminal 110 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices, and the server 120 may be implemented as an independent server or a server cluster consisting of multiple servers.

[0037] Figure 2 FIG. 1 is a flowchart of an image processing method in an embodiment. The image processing method in this embodiment is executed on Figure 1 The electronic device in the example is used for description. Figure 2 As shown, the image processing method includes:

[0038] Step 202, obtaining a target zoom ratio.

[0039] The target zoom ratio refers to the zoom ratio corresponding to the target image to be obtained. The target zoom ratio can be the zoom ratio set by the user before or during shooting with the camera, or it can be the zoom ratio set after the image is acquired, so as to obtain the target image at the target zoom ratio after zooming the image.

[0040] Step 204 , when the target zoom ratio is within a first preset zoom ratio range, zoom processing is performed on each frame of the image to be processed by a multi-frame fusion method to obtain a first target image at the target zoom ratio.

[0041] The image to be processed may be any one of RGB (Red, Green, Blue) images, RAW images, grayscale images, depth images, images corresponding to the Y component in YUV images, etc. RAW images are raw data that the image sensor converts the captured light source signal into a digital signal. The "Y" in the YUV image represents brightness (Luminance or Luma), which is the grayscale value, and "U" and "V" represent chrominance (Chrominance or Chroma), which is used to describe the color and saturation of the image and is used to specify the color of the pixel.

[0042] The first preset zoom ratio range is a preset zoom ratio range, for example, the first preset zoom ratio range is 1x-1.6x, that is, the focal length of the camera is 1x-1.6x. Motion-stacking refers to a processing method of fusing at least two frames of images.

[0043] Specifically, the electronic device may obtain the image to be processed from a local device or other device or network, or the electronic device may obtain the image to be processed by photographing a scene with a camera. The image to be processed may also be a video frame in a video obtained from a local device or other device or network, or a video frame in a video photographed with a camera.

[0044] The electronic device may obtain a target zoom ratio, and compare the target zoom ratio with a first preset zoom ratio range to determine whether the target zoom ratio is within the first preset zoom ratio range. When the target zoom ratio is within the first preset zoom ratio range, zoom processing is performed on each frame of the image to be processed by a multi-frame fusion method to obtain a first target image at the target zoom ratio. Further, the electronic device enlarges each frame of the image to be processed to the target zoom ratio, and fuses each frame of the image enlarged to the target zoom ratio to obtain the first target image.

[0045] Step 206, when the target zoom ratio belongs to the second preset zoom ratio, zoom processing is performed on each frame of the image to be processed through a multi-frame fusion method and a single-frame super-resolution method to obtain a second target image at the target zoom ratio; the second preset zoom ratio is an integer multiple of the upper limit value of the first preset zoom ratio range.

[0046] The second preset zoom ratio is a zoom ratio that is an integer multiple of the upper limit of the first preset zoom ratio range. For example, if the first preset zoom ratio range is 1x-1.6x and the upper limit is 1.6x, the second preset zoom ratio includes but is not limited to 1.6x, 3.2x, 4.8x and 6.4x. The single-frame super-resolution method refers to a processing method for super-resolution reconstruction of a single-frame image.

[0047] The electronic device may obtain a target zoom ratio, and compare the target zoom ratio with a second preset zoom ratio to determine whether the target zoom ratio belongs to the second preset zoom ratio. When the target zoom ratio belongs to the second preset zoom ratio, zoom processing is performed on each frame of the image to be processed by a multi-frame fusion method. Super-resolution reconstruction is performed on the processing result of the multi-frame fusion method by a single-frame super-resolution method to obtain a second target image at the target zoom ratio.

[0048] Step 208, when the target zoom ratio belongs to the third preset zoom ratio, zoom processing is performed on each frame of the image to be processed through a multi-frame fusion method, a single-frame super-resolution method and an interpolation processing method to obtain a third target image at the target zoom ratio; the third preset zoom ratio is between two different second preset zoom ratios.

[0049] Among them, the third preset zoom ratio refers to a zoom ratio between two different second preset zoom ratios. For example, if the two second preset zoom ratios are 1.6x and 3.2x, then each zoom ratio between 1.6x and 3.2x is used as the third preset zoom ratio, such as 1.7x, 1.8x, etc.

[0050] The interpolation processing method refers to performing interpolation processing on a single frame image to obtain an image with higher resolution. For example, the interpolation processing method may be Bicubic (bicubic interpolation), Bilinear (bilinear interpolation) or Lanczos, but is not limited thereto.

[0051] Specifically, the electronic device may obtain a target zoom ratio, and compare the target zoom ratio with a third preset zoom ratio to determine whether the target zoom ratio belongs to the third preset zoom ratio. When the target zoom ratio belongs to the third preset zoom ratio, zoom processing is performed on each frame of the image to be processed by a multi-frame fusion method. Super-resolution reconstruction is performed on the processing result of the multi-frame fusion method by a single-frame super-resolution method to obtain a reconstruction result. Zoom processing is performed on the reconstruction result by an interpolation processing method to obtain a third target image at the target zoom ratio.

[0052] like Figure 3 FIG. 1 is a schematic diagram of multi-segment zoom super-resolution with continuous zoom ratio in one embodiment. Taking zoom 2x-5x as an example, module 1 is used to perform multi-frame fusion zoom processing, select 8-10 frames of images to be processed as input, and physically increase the details of the high-resolution image through sub-pixel interpolation. Module 1 performs zoom processing of focal length 1x-1.6x. The focal length is the zoom ratio.

[0053] Module 2 is used to perform single-frame AI (Artificial Intelligence) super-resolution, and the image at 1.6x output by multi-frame fusion zoom processing is used as the input image of module 2. AI super-resolution ensures that the image quality will not be greatly degraded at different zoom ratios. Module 2 performs zoom processing at focal lengths of integer multiples of 1.6x, such as 1x, 2x, and 3x zoom ratios of 1.6x, that is, zoom ratios of 1.6x / 3.2x / 4.8x.

[0054] Module 3 is used to perform Bicubic interpolation. Bicubic is used to continuously zoom in between the two zoom ratios processed by module 2, taking the zoom ratio of 2x as an example. After multi-frame fusion and single-frame AI super-resolution, the zoom results at 1.6x and 3.2x are obtained. Through the result of Bicubic upsampling 1.6x and the result of Bicubic downsampling 3.2x, the upsampling result and the downsampling result are weightedly fused to obtain the zoom result of 2x.

[0055] In this embodiment, the first preset zoom ratio range, the second preset zoom ratio and the third preset zoom ratio cover all zoom ratios. When the target zoom ratio is within the first preset zoom ratio range, zoom processing is performed on each frame of the image to be processed by a multi-frame fusion method, so that the first target image at the target zoom ratio can be quickly generated. When the target zoom ratio belongs to the second preset zoom ratio, zoom processing is performed on each frame of the image to be processed by combining the multi-frame fusion method and the single-frame super-resolution method, so that the details of the image can be increased and the loss of image quality can be reduced, thereby obtaining the second target image at the target zoom ratio. The second preset zoom ratio is an integer multiple of the upper limit value of the first preset zoom ratio range. When the target zoom ratio belongs to the third preset zoom ratio, each frame of the image to be processed is zoomed through a multi-frame fusion method, a single-frame super-resolution method and an interpolation processing method to obtain a third target image at the target zoom ratio. The third preset zoom ratio is between two different second preset zoom ratios. According to the preset zoom ratio to which the target zoom ratio belongs, it is possible to flexibly select a multi-frame fusion method, a single-frame super-resolution method, an interpolation processing method and a combination thereof to perform zoom processing at different focal lengths, and effectively reduce the loss of image quality at each focal length.

[0056] In one embodiment, when the target zoom ratio belongs to the second preset zoom ratio, zoom processing is performed on each frame of the to-be-processed image by a multi-frame fusion method and a single-frame super-resolution method to obtain a second target image at the target zoom ratio, including:

[0057] When the target zoom ratio belongs to the second preset zoom ratio, a multi-frame fusion method is used to zoom each frame of the image to be processed to obtain a first magnification image; the first magnification image is an image corresponding to the upper limit magnification of the first preset zoom ratio range; the first magnification image is zoomed by a single-frame super-resolution method to obtain a second target image at the target zoom ratio.

[0058] Specifically, the electronic device can obtain a target zoom ratio, compare the target zoom ratio with the second preset zoom ratio to determine whether the target zoom ratio belongs to the second preset zoom ratio, and determine the upper limit ratio in the first preset zoom ratio range if the target zoom ratio belongs to the second preset zoom ratio.

[0059] According to the image sharpness corresponding to each frame of the image to be processed, a reference frame image is determined from each frame of the image to be processed, and the reference frame image is enlarged to the upper limit magnification of the first preset zoom magnification range, and the feature points of the reference frame image at the upper limit magnification and the feature points of each frame of the image to be processed are obtained. According to the feature points of the reference frame image at the upper limit magnification and the feature points of each frame of the image to be processed, the matching point pairs between the reference frame image at the upper limit magnification and each frame of the image to be processed are determined respectively. According to the matching point pairs, the homography matrix between the reference frame image at the upper limit magnification and each frame of the image to be processed is determined respectively. Based on the homography matrix, each frame of the image to be processed is registered, and each registered image at the upper limit magnification is obtained respectively. Each registered image is fused with the reference frame image at the upper limit magnification to obtain a first magnification image at the upper limit magnification.

[0060] The electronic device performs zoom processing on the first magnification image by a single-frame super-resolution method to obtain a second target image at a target zoom magnification. Further, the electronic device can input the first magnification image into an AI super-resolution neural network, and output the second target image at the target zoom magnification through the AI ​​super-resolution neural network.

[0061] In this embodiment, when the target zoom ratio belongs to the second preset zoom ratio, each frame of the image to be processed is first zoomed by a multi-frame fusion method, so that the first magnification image can be quickly obtained. The first magnification image is zoomed by a single-frame super-resolution method, so that when the multi-frame fusion method cannot support the target zoom ratio, the single-frame super-resolution method can be used to perform super-resolution reconstruction on the processing result of the multi-frame fusion method, so as to support more zoom ratios. In addition, the second preset zoom ratio is an integer multiple of the upper limit ratio of the first preset zoom ratio range, which can ensure the continuity of zooming and the maintenance of high-magnification zoom image quality.

[0062] In one embodiment, zoom processing is performed on the first magnification image by a single-frame super-resolution method to obtain a second target image at a target zoom magnification, including:

[0063] The first magnification image is subjected to feature extraction to obtain feature maps of each layer; the feature maps of each layer are enlarged to a target zoom magnification, and the enlarged feature maps of each layer are fused to obtain a second target image at the target zoom magnification.

[0064] Specifically, the electronic device may input the first magnification image into the AI ​​super-resolution neural network, perform feature extraction on the first magnification image through the AI ​​super-resolution neural network, and obtain feature maps of each layer. The feature maps of each layer are enlarged to the target zoom magnification to obtain feature maps of each layer at the target zoom magnification. The feature maps of each layer at the target zoom magnification are fused to obtain a second target image at the target zoom magnification.

[0065] In one embodiment, the AI ​​super-resolution neural network may include a feature extraction layer, a feature conversion layer, an amplification layer, and a fusion layer. The feature extraction layer extracts low-level features of the first magnification image to obtain shallow feature maps of each layer. The feature conversion layer obtains deep feature maps by nonlinearly combining the shallow feature maps of each layer. The amplification layer enlarges each deep feature map to the target size, which is the size at the target zoom ratio, that is, enlarges each deep feature map to the target zoom ratio to obtain each deep feature map at the target zoom ratio. The fusion layer fuses each deep feature map into a super-resolution image and outputs it to obtain a second target image at the target zoom ratio.

[0066] In this embodiment, the features of the first magnification image are extracted to obtain the key features of the first magnification image, the feature maps of each layer are enlarged to the target zoom magnification, and the enlarged feature maps of each layer are fused, so that the key features of different layers can be fused, and the second target image at the target zoom magnification can be reconstructed. In addition, the second target image incorporates more detailed features and has better image quality.

[0067] like Figure 4 , which is a schematic diagram of the structure of an AI super-resolution neural network in one embodiment.

[0068] The entire network structure consists of four parts: Feature extraction layer, Feature conversion layer, amplification layer and fusion layer.

[0069] The feature extraction layer uses a larger receptive field convolution kernel to extract low-level image features, such as gradient, brightness, size relationship, etc., and usually includes two layers, which can be called Feature Extraction Layer A and B. In the feature extraction layer, a relatively large convolution kernel is used, and the depth and size of the output feature map (Feature Map) remain unchanged, and the number of channels increases. In this embodiment, the parameters of the convolution kernel used can refer to Table 1.

[0070] Table 1 Network structure parameters of the Feature extraction layer

[0071]

[0072] The feature transformation layer is the process of obtaining high-level features (such as structure, shape, etc.) by nonlinearly combining low-level features extracted by the extraction layer. It is called the Feature Transform Layer. The more layers there are, the higher the nonlinearity of the feature, the more complex the image structure can be expressed, and the more conducive to the authenticity of image reconstruction. In this part, a convolution with a small convolution kernel is usually selected, with the same depth, size (×1), and number of channels, and repeated M times. Here we select M=16. The parameters of the convolution kernel used in the feature transformation layer can be referred to Table 2.

[0073] Table 2 Feature conversion layer network structure parameters

[0074]

[0075] The enlargement layer in this embodiment is not a convolutional layer, but a Bicubic enlargement, which enlarges the feature image of size c=64, d=8, w, h obtained from the Feature Conversion Layer to the required ratio, such as enlarging to ×2. This layer is called the Upsample Layer. The fusion layer follows it, and its purpose is to fuse the features with a depth of 8 and a number of channels of 64 into an SR (Super Resolution) image output, which is called the Fusion Layer. The parameters of these two layers can be referred to Table 3.

[0076] Table 3 Network structure parameters of the amplification layer and fusion layer

[0077]

[0078] In one embodiment, Figure 5 As shown, when the target zoom ratio belongs to the third preset zoom ratio, zoom processing is performed on each frame of the to-be-processed image by a multi-frame fusion method, a single-frame super-resolution method and an interpolation processing method to obtain a third target image at the target zoom ratio, including:

[0079] Step 502, when the target zoom ratio belongs to the third preset zoom ratio, zoom processing is performed on each frame of the image to be processed by using a multi-frame fusion method to obtain a first magnification image; the first magnification image is an image corresponding to the upper limit magnification of the first preset zoom ratio range.

[0080] Specifically, the electronic device can obtain the target zoom ratio, compare the target zoom ratio with the third preset zoom ratio to determine whether the target zoom ratio belongs to the third preset zoom ratio. If the target zoom ratio belongs to the third preset zoom ratio, determine the upper limit ratio in the first preset zoom ratio range.

[0081] According to the image sharpness corresponding to each frame of the image to be processed, a reference frame image is determined from each frame of the image to be processed, and the reference frame image is enlarged to the upper limit magnification of the first preset zoom magnification range, and the feature points of the reference frame image at the upper limit magnification and the feature points of each frame of the image to be processed are obtained. According to the feature points of the reference frame image at the upper limit magnification and the feature points of each frame of the image to be processed, the matching point pairs between the reference frame image at the upper limit magnification and each frame of the image to be processed are determined respectively. According to the matching point pairs, the homography matrix between the reference frame image at the upper limit magnification and each frame of the image to be processed is determined respectively. Based on the homography matrix, each frame of the image to be processed is registered, and each registered image at the upper limit magnification is obtained respectively. Each registered image is fused with the reference frame image at the upper limit magnification to obtain a first magnification image at the upper limit magnification.

[0082] Step 504, zoom processing is performed on the first magnification image by using a single frame super-resolution method to obtain at least two second magnification images; the at least two second magnification images include images corresponding to two second preset zoom magnifications adjacent to the target zoom magnification.

[0083] Specifically, the electronic device determines at least two second preset zoom magnifications adjacent to the target zoom magnification. For example, the first preset zoom magnification range is 1x-1.6x, and the second preset zoom magnifications are 1.6x, 3.2x, 4.8x, and 6.4x. If the target zoom magnification is 3x, then the two second preset zoom magnifications adjacent to 3x can be determined to be 3.2x and 4.8x, respectively.

[0084] The first magnification image is zoomed by a single frame super-resolution method to obtain a second magnification image at each of at least two second preset zoom magnifications. For example, the first magnification image with a zoom magnification of 1.6x is zoomed by a single frame super-resolution method to obtain a second magnification image with a zoom magnification of 3.2x and a second magnification image with a zoom magnification of 4.8x.

[0085] In one embodiment, the first magnification image is input into the AI ​​super-resolution neural network. The low-level features of the first magnification image are extracted by the AI ​​super-resolution neural network feature extraction layer to obtain shallow feature maps of each layer. The feature conversion layer obtains each deep feature map by nonlinear combination processing of each shallow feature map. The magnification layer magnifies each deep feature map to two second preset zoom magnifications adjacent to the target zoom magnification, and obtains each deep feature map at the two second preset zoom magnifications. The fusion layer fuses each deep feature map at the same second preset zoom magnification into a super-resolution image and outputs it, that is, the second magnification images corresponding to the two second preset zoom magnifications can be obtained respectively.

[0086] Step 506 , interpolation processing is performed on each of the second magnification images respectively, and fusion processing is performed on the images obtained after the interpolation processing to obtain a third target image at the target zoom magnification.

[0087] Specifically, after super-resolution reconstruction is performed by a single-frame super-resolution method, each second-magnification image is obtained. Each second-magnification image is interpolated to obtain each interpolated image at a target zoom magnification, and each interpolated image is fused to obtain a third target image at the target zoom magnification.

[0088] Furthermore, through interpolation processing, the second magnification images whose second preset zoom magnification is greater than the target zoom magnification in each second magnification image can be downsampled to the target zoom magnification to obtain an interpolated image at the target zoom magnification. And through interpolation processing, the second magnification images whose second preset zoom magnification is less than the target zoom magnification can be upsampled to the target zoom magnification to obtain an interpolated image at the target zoom magnification. Then, the interpolated images are fused to obtain a third target image at the target zoom magnification.

[0089] In this embodiment, each frame of the image to be processed is first zoomed by a multi-frame fusion method, so that the first magnification image can be quickly obtained. The first magnification image is zoomed by a single-frame super-resolution method, so that when the multi-frame fusion method cannot support the target zoom magnification, the single-frame super-resolution method can be used to perform super-resolution reconstruction on the processing result of the multi-frame fusion method to obtain each second magnification image at an integer multiple of the upper limit magnification of the first preset zoom magnification range, which can ensure the continuity of the zoom and the maintenance of the high-magnification zoom image quality. By interpolating each second magnification image and fusing the image obtained after the interpolation process, a third target image at the target zoom magnification is obtained, thereby reducing the loss of image quality, so that the resolution of the generated image is better and the image is clearer.

[0090] In one embodiment, interpolation processing is performed on each second magnification image respectively, and the images obtained after the interpolation processing are fused to obtain a third target image at a target zoom ratio, including:

[0091] The second-magnification images are interpolated respectively to obtain interpolated images at a target zoom ratio; weights corresponding to the interpolated images are determined according to the target zoom ratio and the second preset zoom ratios corresponding to the second-magnification images; and based on the weights corresponding to the interpolated images, the interpolated images are fused to obtain a third target image at the target zoom ratio.

[0092] Specifically, a second magnification image whose second preset zoom magnification is greater than the target zoom magnification is determined among the second magnification images, and a downsampling interpolation process is performed on the second magnification image to obtain an interpolated image at the target zoom magnification. A second magnification image whose second preset zoom magnification is less than the target zoom magnification is determined among the second magnification images, and an upsampling interpolation process is performed on the second magnification image to obtain an interpolated image at the target zoom magnification.

[0093] The weight corresponding to each interpolated image is calculated according to the target zoom ratio and the second preset zoom ratio corresponding to each second-magnification image. Further, the first difference between the maximum second preset zoom ratio and the minimum second preset zoom ratio in each second-magnification image is calculated, and the second difference between the second preset zoom ratio and the target zoom ratio corresponding to each second-magnification image is calculated, and the ratio of each second difference to the first difference is used as the weight corresponding to the corresponding interpolated image.

[0094] Based on the weights corresponding to the interpolated images, the interpolated images are fused to obtain a third target image at the target zoom ratio. Further, the weights are multiplied by the pixel values ​​in the corresponding interpolated images, and the pixel values ​​of the matching feature points in the multiplied images are averaged, and the average is used as the pixel value of the corresponding feature point in the third target image. After calculating the pixel value of each feature point in the third target image, the third target image at the target zoom ratio is obtained.

[0095] like Figure 6 As shown, the first preset zoom ratio range is 1x-1.6x, and the second preset zoom ratio is 1.6x, 3.2x, 4.8x and 6.4x. The third preset zoom ratio is each zoom ratio between the two second preset zoom ratios. The target zoom ratio is 4x, which is between the second preset zoom ratio of 3.2x and the second preset zoom ratio of 4.8x, and the target zoom ratio belongs to the third preset zoom ratio. The electronic device can fuse 8-10 frames of images to be processed in a multi-frame fusion mode to obtain the first magnification image at 1.6x.

[0096] The first magnification image at 1.6x is zoomed by single-frame super-resolution to obtain the second magnification image at 3.2x and the second magnification image at 4.8x. The second magnification image at 3.2x is interpolated and enlarged to 4x to obtain the 4x interpolated image A. The second magnification image at 4.8x is interpolated and reduced to 4x to obtain the 4x interpolated image B.

[0097] (4.8-4) / (4.8-3.2) is used as the interpolation weight of the interpolation image A corresponding to the second magnification image of 4.8x. (4-3.2) / (4.8-3.2) is used as the interpolation weight of the interpolation image B corresponding to the second magnification image of 4.8x.

[0098] According to the interpolation image A, the interpolation image B and the corresponding interpolation weights, the interpolation image A and the interpolation image B are fused to obtain the final image, that is, the target image at 4x.

[0099] In this embodiment, each second-magnification image is interpolated to obtain each interpolated image at a target zoom ratio. The weights corresponding to each interpolated image are determined according to the target zoom ratio and the second preset zoom ratios corresponding to each second-magnification image. Based on the weights corresponding to each interpolated image, each interpolated image is fused so that the image can obtain more detailed features. The obtained third target image at the target zoom ratio has higher quality, thereby increasing the image resolution while reducing the loss of image quality.

[0100] In one embodiment, interpolation processing is performed on each second magnification image to obtain each interpolation image at a target zoom magnification, including:

[0101] For each of the second-magnification images, determine each to-be-interpolated point of the second-magnification image at the target zoom magnification; for each to-be-interpolated point, determine the position of each sampling point within a preset range of the to-be-interpolated point, and determine the pixel value corresponding to the to-be-interpolated point at the target zoom magnification according to the position of each sampling point and the corresponding weight, until the pixel value corresponding to each to-be-interpolated point in the second-magnification image is obtained, and then obtain the interpolated image corresponding to the second-magnification image.

[0102] Specifically, for each second magnification image in each second magnification image, according to the second preset zoom magnification and the target zoom magnification corresponding to the second magnification image, each to-be-interpolated point of the second magnification image at the target zoom magnification is determined. For each to-be-interpolated point, the position of each sampling point within the preset range of the to-be-interpolated point in the second magnification image is determined, and the weight corresponding to each sampling point is determined. The sampling point may be a feature point within the preset range, or may be sampled from the feature points within the preset range.

[0103] The closer the distance between the sampling point and the interpolation point, the greater the weight, and the farther the distance, the smaller the weight.

[0104] According to the position of each sampling point and the corresponding weight, the intermediate interpolation point corresponding to each row or the intermediate interpolation point corresponding to each column within the preset range is determined. According to the coordinates of the intermediate interpolation point and the corresponding interpolation weight, the pixel value corresponding to the point to be interpolated at the target zoom magnification is determined. For each point to be interpolated in the second magnification image, the pixel value corresponding to each point to be interpolated at the target zoom magnification can be obtained in the same processing method, thereby obtaining the interpolation image corresponding to the second magnification image. According to the same processing method, the interpolation image corresponding to each second magnification image can be obtained.

[0105] In one embodiment, according to the position of each sampling point and the corresponding weight, the pixel value corresponding to the point to be interpolated at the target zoom ratio is determined, including: according to the position of each sampling point and the corresponding weight, the intermediate interpolation point corresponding to each column in a preset range is determined; for each intermediate interpolation point, the Euclidean distance between the intermediate interpolation point and the point to be interpolated is determined, and the Euclidean distance is used as the interpolation weight corresponding to the intermediate interpolation point; based on each intermediate interpolation point and the corresponding interpolation weight, the pixel value corresponding to the point to be interpolated at the target zoom ratio is determined.

[0106] In this embodiment, for each second-magnification image in each second-magnification image, each to-be-interpolated point of the second-magnification image at the target zoom magnification is determined, and for each to-be-interpolated point, the position of each sampling point within a preset range of the to-be-interpolated point is determined, and according to the position of each sampling point and the corresponding weight, the pixel value corresponding to the to-be-interpolated point at the target zoom magnification can be accurately determined, until the pixel value corresponding to each to-be-interpolated point in the second-magnification image is obtained, and the interpolated image corresponding to the second-magnification image is accurately obtained.

[0107] In one embodiment, according to the position of each sampling point and the corresponding weight, determining the pixel value corresponding to the point to be interpolated at the target zoom factor includes:

[0108] According to the position of each sampling point and the corresponding weight, the intermediate interpolation point corresponding to each row within the preset range is determined; for each intermediate interpolation point, the Euclidean distance between the intermediate interpolation point and the point to be interpolated is determined, and the Euclidean distance is used as the interpolation weight corresponding to the intermediate interpolation point; based on each intermediate interpolation point and the corresponding interpolation weight, the pixel value corresponding to the point to be interpolated at the target zoom ratio is determined.

[0109] Specifically, the electronic device determines the position of the intermediate interpolation point corresponding to each row according to the position of the sampling points of each row in the corresponding second magnification image within the preset range, and the weights corresponding to each sampling point. For each intermediate interpolation point, the Euclidean distance between the intermediate interpolation point and the point to be interpolated is calculated, and the Euclidean distance is used as the interpolation weight corresponding to the intermediate interpolation point. The product of each intermediate interpolation point and the corresponding interpolation weight is calculated, and the sum of each product is calculated, and the sum of each interpolation weight is calculated, and the ratio of the sum of each product to the sum of the interpolation weights is used as the pixel value corresponding to the point to be interpolated at the target zoom magnification.

[0110] like Figure 7 FIG. 1 is a schematic diagram of bicubic interpolation in an embodiment. Bicubic interpolation is an interpolation method that determines the weight of a sampling point to an interpolation point based on the distance between the interpolation point and the sampling point.

[0111] like Figure 7 As shown, the interpolation point is P, and the 16 nearest samples Z around the interpolation point P are selected. 11 ~Z 14 , respectively, first use [Z 11 ,Z 12 ,Z 13 ,Z 14 ] Insert the middle interpolation point R 1 , and similarly interpolate the intermediate interpolation point R 2 , R 3 , R 4 , and then use [R 1 , R 2 , R 3 , R 4 ] interpolates the pixel value of P. As shown in the figure, Z 11 , Z 12 , Z 13 , Z 14 The corresponding weights are -1, 0, 1, and 2. The pixel value of P can also be interpolated by processing the columns first and then the rows. The processing method is similar and will not be repeated here.

[0112] The interpolation process takes the pixel value of point P as an example and uses the following formula to calculate the pixel value of point P.

[0113]

[0114] Among them, d(P,R t ) indicates P to R t , the Euclidean distance of t∈(1,2,3,4), that is, d(P,R t )=x. W(x) represents the interpolation weight calculated according to the Euclidean distance. The calculation of the interpolation weight is shown in the following formula, where a takes the value of -0.5.

[0115]

[0116] Where x is the Euclidean distance between the interpolation point to be interpolated and the intermediate interpolation point, for example, the interpolation point P and the intermediate interpolation point R 1 The Euclidean distance.

[0117] In this embodiment, the intermediate interpolation point corresponding to each row in the preset range is determined according to the position and corresponding weight of each sampling point, and the Euclidean distance between the intermediate interpolation point and the point to be interpolated is determined for each intermediate interpolation point, and the Euclidean distance is used as the interpolation weight corresponding to the intermediate interpolation point. The interpolation weight represents the importance of the intermediate interpolation point, and based on each intermediate interpolation point and the corresponding interpolation weight, the pixel value corresponding to the point to be interpolated at the target zoom magnification can be determined more accurately.

[0118] In one embodiment, when the target zoom ratio is within a first preset zoom ratio range, zoom processing is performed on each frame of the to-be-processed image by a multi-frame fusion method to obtain a first target image at the target zoom ratio, including:

[0119] When the target zoom ratio is within a first preset zoom ratio range, a reference frame image is determined from each frame of the image to be processed according to the image sharpness corresponding to each frame of the image to be processed; the reference frame image is enlarged to the target zoom ratio, and each frame of the image to be processed is registered based on the reference frame image at the target zoom ratio to obtain each registered image; each registered image is fused with the reference frame image at the target zoom ratio to obtain a first target image at the target zoom ratio.

[0120] Among them, image sharpness, also known as clarity, is an indicator that reflects the clarity of the image plane and the sharpness of the image edges.

[0121] Specifically, the electronic device obtains a target zoom ratio, and compares the target zoom ratio with a first preset zoom ratio range. When the target zoom ratio is within the first preset zoom ratio range, the electronic device determines the image sharpness corresponding to each frame of the image to be processed, and determines a reference frame image from each frame of the image to be processed according to the image sharpness.

[0122] In one embodiment, before determining the reference frame image from each frame of the image to be processed according to the image sharpness corresponding to each frame of the image to be processed, the method further includes: determining the local brightness of each frame of the image to be processed, and determining the image sharpness of the image to be processed according to the local brightness. Furthermore, the electronic device may divide the image to be processed into multiple windows, determine the maximum brightness value and the minimum brightness value in each window, and determine the local brightness of the image to be processed based on the maximum brightness value and the minimum brightness value in each window.

[0123] For example, the image sharpness of the image to be processed can be calculated by the following formula:

[0124]

[0125] The entire image is divided into k1*k2 windows, where I max,k,l and I min,k,l They represent the maximum and minimum brightness values ​​in the k*lth window respectively.

[0126] After determining the image sharpness of each frame of the image to be processed, the image to be processed with the largest image sharpness is selected as the reference frame image. The electronic device magnifies the reference frame image to the target zoom factor to obtain the reference frame image at the target zoom factor. For example, a 1.2x reference frame image is magnified to 1.6x to obtain a 1.6x reference frame image.

[0127] For each frame of the image to be processed, the image to be processed is registered based on the reference frame image at the target zoom factor to obtain the registered image corresponding to each frame of the image to be processed. Each registered image is fused with the reference frame image at the target zoom factor to obtain the first target image at the target zoom factor.

[0128] Furthermore, the electronic device determines the feature points that match between each registered image and the reference frame image at the target zoom ratio, calculates the pixel mean of the matched feature points, and uses the pixel mean as the pixel value of the corresponding feature point in the first target image at the target zoom ratio, until the pixel values ​​of each feature point in the first target image at the target zoom ratio are obtained, thereby obtaining the first target image.

[0129] In this embodiment, each frame of the image to be processed is aligned with the reference frame image at the target zoom factor, so that each frame of the image to be processed and the reference frame image at the target zoom factor are in the same image space, to ensure that all parameters other than the resolution of each frame of the image to be processed and the reference frame image at the target zoom factor are consistent, so that after the fusion of the aligned image and the reference frame image, sub-pixel high-resolution information can be obtained, and the generated first target image has clearer image quality.

[0130] In one embodiment, the registration processing of the image to be processed may include the correspondence of image content, alignment of color space, etc. The alignment of image content may be performed by detecting and matching image feature points and calculating homography matrix, or by matching image blocks. In order to solve the problem of brightness and color space mismatch between the image to be processed and the reference frame image at the target zoom factor, some photos of standard color cards may be introduced during the shooting process, and the difference between the image to be processed and the reference frame image at the target zoom factor may be determined by the standard color cards. The alignment model of color space and brightness may be modeled and analyzed, and operations such as histogram matching may be performed to achieve brightness and color space alignment.

[0131] like Figure 8 FIG. 1 is a flow chart of zooming each frame of an image to be processed by a multi-frame fusion method in one embodiment.

[0132] Acquire multiple frames of YUV images, for example, 8-10 frames of images. Determine a reference frame image by estimating the sharpness of each frame of YUV image. The reference frame is enlarged to the target zoom factor, and other frames of YUV image are registered with the enlarged reference frame image to obtain each registered image. Perform multi-frame fusion and average of each registered image and the enlarged reference frame image to obtain a multi-frame fusion result, that is, obtain the first target image at the target zoom factor.

[0133] In one embodiment, registering each frame of the image to be processed based on the reference frame image at the target zoom factor to obtain each registered image includes:

[0134] Acquire feature points of a reference frame image at a target zoom ratio and feature points of each frame of an image to be processed; determine matching point pairs between the reference frame image at the target zoom ratio and each frame of an image to be processed according to the feature points of the reference frame image at the target zoom ratio and the feature points of each frame of an image to be processed; determine homography matrices between the reference frame image at the target zoom ratio and each frame of an image to be processed according to the matching point pairs; perform registration processing on each frame of an image to be processed based on the homography matrix, and obtain registered images of the target zoom ratio.

[0135] The feature point refers to a point where the grayscale value of the image changes dramatically or a point with a large curvature on the edge of the image (i.e., the intersection of two edges). Feature points include, but are not limited to, eyes, nose tips, corners of the mouth, moles, and the center of an object.

[0136] The electronic device detects the grayscale value of each pixel in the reference frame image at the target zoom ratio, and when the difference between the grayscale values ​​of adjacent pixels is greater than a threshold, the area where the adjacent pixels are located can be used as a feature point. The grayscale value of each pixel in each frame of the image to be processed is detected, and when the difference between the grayscale values ​​of adjacent pixels is greater than a threshold, the area where the adjacent pixels are located can be used as a feature point.

[0137] In one embodiment, the electronic device can extract corresponding feature points from each frame of the image to be processed based on the feature points in the reference frame image at the target zoom ratio. In another embodiment, the grayscale value of each pixel in the image to be processed can also be detected. When the difference in the grayscale values ​​of adjacent pixels is greater than a threshold, the area where the adjacent pixels are located can be used as a feature point, and the corresponding feature points can be extracted from the remaining images to be processed and the reference frame image at the target zoom ratio.

[0138] The electronic device forms matching point pairs with feature points extracted from the reference frame image at the target zoom ratio and corresponding feature points of the image to be processed.

[0139] In one embodiment, the reference frame image at the target zoom factor can be divided into multiple regions, for example, a nine-square grid is added to the reference frame image at the target zoom factor to divide it into nine regions, and each point of the nine-square grid is taken as a feature point. The feature points of the image to be processed are determined according to the feature points in the reference frame image at the target zoom factor to form matching point pairs.

[0140] Homography is a concept in projective geometry, also known as projective transformation. It maps points (three-dimensional homogeneous vectors) on a projective plane to another projective plane, and maps straight lines to straight lines, with the property of line preservation. The homography matrix is ​​a mapping between points. The homography matrix can be used to find the exact position of the corresponding point of the image point on another image. The homography matrix can be used to characterize the mapping relationship between the reference frame image and the image to be processed at the target zoom factor.

[0141] The electronic device can calculate a homography matrix between the reference frame image at the target zoom ratio and the image to be processed based on the matching point pairs determined between the reference frame image at the target zoom ratio and the image to be processed. The image to be processed can be mapped to the same image space as the reference frame image at the target zoom ratio through the homography matrix.

[0142] The electronic device will perform registration processing on the image to be processed according to the homography matrix between the reference frame image at the target zoom factor and the image to be processed, thereby obtaining a corresponding registered image. Further, the image to be processed is mapped to the same image space as the reference frame image at the target zoom factor according to the homography matrix, and the offset between the image to be processed and the reference frame image at the target zoom factor is determined according to the matching point pairs. Then, the electronic device moves each feature point in the image to be processed by the offset to obtain a moved image, which is the registered image.

[0143] According to the same processing method, the homography matrix corresponding to each frame of the image to be processed and the reference frame image at the target zoom factor can be calculated, and the corresponding image to be processed is registered according to the homography matrix to obtain the corresponding registered image.

[0144] In this embodiment, the reference frame image is enlarged to the target zoom ratio before image registration, and other frames of to-be-processed images are registered to the enlarged reference frame image, so that each frame of to-be-processed image can provide sub-pixel-level high-resolution information to the reference frame image at the target zoom ratio. The reference frame image at the target zoom ratio and each registered image are fused, so that pixels of the same content in different frames can be fused together, and the target image at the target zoom ratio can be accurately obtained, and ghosting can be avoided, thereby improving the image quality of the target image.

[0145] In one embodiment, the purpose of image registration is to fuse together pixels of the same content in different frames as much as possible during image fusion. Before image registration, the reference frame needs to be interpolated and enlarged to the target size (e.g., 1.6x), and other frame images need to be registered to the enlarged reference frame, so that other frame images can provide sub-pixel high-resolution information to the reference frame image.

[0146] Image registration is performed by using homography matrix estimation based on SIFT (Scale-invariant feature transform) feature point detection to estimate the Kth image Y to be processed. k To the reference frame image Y 0 The homography matrix H k , as shown in the following formula:

[0147]

[0148] Where (x, y) is H k The coordinates of any feature point in the 3x3 matrix are the homography matrix H k , the converted feature point (x, y,) is (x, y) registered to the reference frame image Y 0The coordinates after that, w, =w=1.

[0149] Calculate the homography matrix H k After that, we can use the homography matrix H k Calculate Y k Each feature point relative to Y 0 The offset [MV xk , MV yk ], constituted by Y 0 And H k The offset vector graph of two channels of the same size has the following main processes: Fig. 9 shown.

[0150] The reference frame image Y with size h*w 0 and the image Y to be processed with size h*w k Perform feature point detection respectively to obtain the reference frame image Y 0 Corresponding feature point description and image to be processed Y k Corresponding feature point description. According to the feature point description, the image Y to be processed k The feature points and reference frame image Y 0 Based on the matching point pairs, calculate the image Y to be processed k and the reference frame image Y 0 The homography matrix H k .

[0151] SIFT is the original algorithm for key point detection. Its essence is to find key points (feature points) in different scale spaces, calculate the size, direction, and scale information of the key points, and use this information to form key points to describe the feature points. The key points found by SIFT are very prominent and stable feature points that will not change due to factors such as lighting, affine transformation, and noise. After obtaining the feature points, the gradient histogram of the points around the feature points is used to form the feature vector This feature vector is the description of the current feature point, respectively for Y 0 and Y k Find the feature points of the two pictures and get two sets of feature points and

[0152] The process of feature point matching is to match the two sets of feature points found by Euclidean distance, as shown in the following formula:

[0153]

[0154] Find Y 0 and Y kThe four or more feature point pairs closest to each other in the two images can be used to solve the homography matrix H through DLT (Direct Linear Transformation) k The coefficient of Y k Each point in the 0 The offset [MV x , MV y ]. For example, the Y k The coordinates of the feature points on are (x 1 ,y 1 ), (x 2 ,y 2 ),…(x t ,y t ), the corresponding Y 0 The coordinates of the feature points on are (x 1 ,y 1 、),(x 2 ,y 2 、),…(x t ,y t ,), and apply the homography matrix to the corresponding feature point pairs, we can get the following equation:

[0155] or AH K =0

[0156] Where A is a matrix with twice the number of rows as the number of matching point pairs. The coefficients of the matching point pair equations are stacked into a matrix. The SVD (Singular Value Decomposition) algorithm can be used to find the least squares solution of H, thereby calculating each frame Y k Relative to Y 0 The offset [MV xk , MV yk ].

[0157] In one embodiment, image registration can also use SURF, corner points or other features to detect and describe feature points. It is also possible to solve the optical flow vector of each pixel from each frame of the image to be processed to the reference frame based on the brightness information around each point in the adjacent frames, and then calculate the motion vector of the pixel based on the optical flow vector to perform image registration.

[0158] In one embodiment, an image processing method is provided, comprising:

[0159] The electronic device obtains a target zoom ratio, and when the target zoom ratio is within a first preset zoom ratio range, determines a reference frame image from each frame of the image to be processed according to the image sharpness corresponding to each frame of the image to be processed.

[0160] Next, the electronic device zooms in the reference frame image to a target zoom ratio, and obtains feature points of the reference frame image and feature points of each frame of the image to be processed at the target zoom ratio.

[0161] Next, the electronic device determines matching point pairs between the reference frame image at the target zoom factor and each frame of the image to be processed according to the feature points of the reference frame image at the target zoom factor and the feature points of each frame of the image to be processed.

[0162] Furthermore, the electronic device determines the homography matrix between the reference frame image at the target zoom ratio and each frame of the image to be processed based on the matching point pairs; performs registration processing on each frame of the image to be processed based on the homography matrix to obtain each registered image of the target zoom ratio.

[0163] Furthermore, the electronic device fuses each registered image with a reference frame image at a target zoom factor to obtain a first target image at the target zoom factor.

[0164] Optionally, when the target zoom ratio belongs to the second preset zoom ratio, a multi-frame fusion method is used to perform zoom processing on each frame of the image to be processed to obtain a first magnification image; the second preset zoom ratio is an integer multiple of the upper limit value of the first preset zoom ratio range; the first magnification image is an image corresponding to the upper limit magnification of the first preset zoom ratio range.

[0165] Furthermore, the electronic device extracts features from the first-magnification image to obtain feature maps of each layer; enlarges the feature maps of each layer to a target zoom ratio, and fuses the enlarged feature maps of each layer to obtain a second target image at the target zoom ratio.

[0166] Optionally, when the target zoom ratio belongs to the third preset zoom ratio, a multi-frame fusion method is used to zoom each frame of the image to be processed to obtain a first magnification image; the third preset zoom ratio is between two different second preset zoom ratios; the first magnification image is an image corresponding to the upper limit ratio of the first preset zoom ratio range.

[0167] Next, the electronic device performs zoom processing on the first magnification image by using a single-frame super-resolution method, and obtains two second magnification images corresponding to two second preset zoom magnifications adjacent to the target zoom magnification.

[0168] Furthermore, for each second-magnification image, each to-be-interpolated point of the second-magnification image at the target zoom magnification is determined; for each to-be-interpolated point, the position of each sampling point within a preset range of the to-be-interpolated point is determined, and according to the position of each sampling point and the corresponding weight, the intermediate interpolation point corresponding to each row within the preset range is determined.

[0169] Next, for each intermediate interpolation point, the Euclidean distance between the intermediate interpolation point and the point to be interpolated is determined, and the Euclidean distance is used as the interpolation weight corresponding to the intermediate interpolation point; based on each intermediate interpolation point and the corresponding interpolation weight, the pixel value corresponding to the point to be interpolated at the target zoom ratio is determined, until the pixel value corresponding to each point to be interpolated in the second magnification image is obtained, and then the interpolation image corresponding to the second magnification image is obtained.

[0170] Furthermore, the electronic device determines the weights corresponding to each interpolated image based on the target zoom ratio and the second preset zoom ratios corresponding to each second-magnification image; based on the weights corresponding to each interpolated image, the interpolated images are fused to obtain a third target image at the target zoom ratio.

[0171] In this embodiment, three processing methods at different zoom ratios are provided, and the different zoom ratios include a first preset zoom ratio range, a second preset zoom ratio and a third preset zoom ratio. The second preset zoom ratio is an integer multiple of the upper limit value of the first preset zoom ratio range, and the third preset zoom ratio is between two different second preset zoom ratios, so that the first preset zoom ratio range, the second preset zoom ratio and the third preset zoom ratio can cover all zoom ratios, so that zoom processing can be performed using corresponding methods at each zoom ratio.

[0172] When the target zoom ratio is within the first preset zoom ratio range, each frame of the image to be processed is registered with the reference frame image at the target zoom ratio, so that each frame of the image to be processed and the reference frame image at the target zoom ratio are in the same image space, so as to ensure that all parameters other than the resolution of each frame of the image to be processed and the reference frame image at the target zoom ratio are consistent, so that after the registration image and the reference frame image are fused, sub-pixel high-resolution information can be obtained, thereby improving the image quality of the target image.

[0173] When the target zoom ratio belongs to the second preset zoom ratio, each frame of the image to be processed is first zoomed by a multi-frame fusion method, so that the first magnification image can be quickly obtained. The first magnification image is zoomed by a single-frame super-resolution method, so that when the multi-frame fusion method cannot support the target zoom ratio, the single-frame super-resolution method can be used to perform super-resolution reconstruction on the processing result of the multi-frame fusion method to obtain each second magnification image at an integer multiple of the upper limit magnification of the first preset zoom ratio range, which can ensure the continuity of the zoom and the maintenance of the high-magnification zoom image quality. By interpolating each second magnification image and fusing the image obtained after the interpolation process, a third target image at the target zoom ratio is obtained, thereby generating a higher resolution image and reducing the loss of image quality.

[0174] When the target zoom ratio belongs to the third preset zoom ratio, two second-magnification images are obtained through a multi-frame fusion method and a single-frame super-resolution method, and the two second-magnification images are interpolated to obtain interpolated images at the target zoom ratio. According to the target zoom ratio and the second preset zoom ratios corresponding to the second-magnification images, weights corresponding to the interpolated images are determined. Based on the weights corresponding to the interpolated images, the interpolated images are fused so that the image can obtain more detailed features. The obtained third target image at the target zoom ratio has higher clarity, thereby reducing the loss of image quality.

[0175] This embodiment can flexibly select a multi-frame fusion method, a single-frame super-resolution method, an interpolation processing method and a combination thereof to perform zoom processing at different focal lengths according to the preset zoom ratio to which the target zoom ratio belongs, which can effectively reduce the loss of image quality at each focal length, thereby increasing the image resolution while reducing the loss of image quality.

[0176] It should be understood that although Figure 2-Figure 9 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-Figure 9 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0177] Fig.10 FIG. 1 is a structural block diagram of an image processing device according to an embodiment. Fig.10 As shown, the device comprises:

[0178] The acquisition module 1002 is used to acquire a target zoom ratio.

[0179] The first zoom module 1004 is used to perform zoom processing on each frame of the image to be processed by a multi-frame fusion method when the target zoom ratio is within a first preset zoom ratio range, so as to obtain a first target image under the target zoom ratio.

[0180] The second zoom module 1006 is used to perform zoom processing on each frame of the image to be processed by a multi-frame fusion method and a single-frame super-resolution method when the target zoom ratio belongs to the second preset zoom ratio, so as to obtain a second target image at the target zoom ratio; the second preset zoom ratio is an integer multiple of the upper limit value of the first preset zoom ratio range.

[0181] The third zoom module 1008 is used to perform zoom processing on each frame of the image to be processed by a multi-frame fusion method, a single-frame super-resolution method and an interpolation processing method when the target zoom ratio belongs to the third preset zoom ratio, so as to obtain a third target image under the target zoom ratio; the third preset zoom ratio is between two different second preset zoom ratios.

[0182] In this embodiment, the first preset zoom ratio range, the second preset zoom ratio and the third preset zoom ratio cover all zoom ratios. When the target zoom ratio is within the first preset zoom ratio range, zoom processing is performed on each frame of the image to be processed by a multi-frame fusion method, so that the first target image at the target zoom ratio can be quickly generated. When the target zoom ratio belongs to the second preset zoom ratio, zoom processing is performed on each frame of the image to be processed by combining the multi-frame fusion method and the single-frame super-resolution method, so that the details of the image can be increased and the loss of image quality can be reduced, thereby obtaining the second target image at the target zoom ratio. The second preset zoom ratio is an integer multiple of the upper limit value of the first preset zoom ratio range. When the target zoom ratio belongs to the third preset zoom ratio, each frame of the image to be processed is zoomed through a multi-frame fusion method, a single-frame super-resolution method and an interpolation processing method to obtain a third target image at the target zoom ratio. The third preset zoom ratio is between two different second preset zoom ratios. According to the preset zoom ratio to which the target zoom ratio belongs, the multi-frame fusion method, the single-frame super-resolution method, the interpolation processing method and a combination thereof can be flexibly selected to perform zoom processing at different focal lengths, which can effectively reduce the loss of image quality at each focal length.

[0183] In one embodiment, the second zoom module 1006 is also used to, when the target zoom ratio belongs to the second preset zoom ratio, perform zoom processing on each frame of the image to be processed by a multi-frame fusion method to obtain a first magnification image; the first magnification image is an image corresponding to the upper limit magnification of the first preset zoom ratio range; and the first magnification image is zoomed by a single-frame super-resolution method to obtain a second target image at the target zoom ratio.

[0184] In this embodiment, when the target zoom ratio belongs to the second preset zoom ratio, each frame of the image to be processed is first zoomed by a multi-frame fusion method, so that the first magnification image can be quickly obtained. The first magnification image is zoomed by a single-frame super-resolution method, so that when the multi-frame fusion method cannot support the target zoom ratio, the single-frame super-resolution method can be used to perform super-resolution reconstruction on the processing result of the multi-frame fusion method, so as to support more zoom ratios. In addition, the second preset zoom ratio is an integer multiple of the upper limit ratio of the first preset zoom ratio range, which can ensure the continuity of zooming and the maintenance of high-magnification zoom image quality.

[0185] In one embodiment, the second zoom module 1006 is also used to extract features from the first-magnification image to obtain feature maps of each layer; enlarge the feature maps of each layer to the target zoom ratio, and fuse the enlarged feature maps of each layer to obtain a second target image at the target zoom ratio.

[0186] In this embodiment, the features of the first magnification image are extracted to obtain the key features of the first magnification image, the feature maps of each layer are enlarged to the target zoom magnification, and the enlarged feature maps of each layer are fused, so that the key features of different layers can be fused, and the second target image at the target zoom magnification can be reconstructed. In addition, the second target image incorporates more detailed features and has better image quality.

[0187] In one embodiment, the third zoom module 1008 is also used to, when the target zoom ratio belongs to the third preset zoom ratio, perform zoom processing on each frame of the image to be processed by a multi-frame fusion method to obtain a first magnification image; the first magnification image is an image corresponding to the upper limit magnification of the first preset zoom ratio range; the first magnification image is zoomed by a single-frame super-resolution method to obtain at least two second magnification images; the at least two second magnification images include images corresponding to two second preset zoom ratios adjacent to the target zoom ratio; interpolate each second magnification image, fuse the images obtained after the interpolation processing, and obtain a third target image at the target zoom ratio.

[0188] In this embodiment, each frame of the image to be processed is first zoomed by a multi-frame fusion method, so that the first magnification image can be quickly obtained. The first magnification image is zoomed by a single-frame super-resolution method, so that when the multi-frame fusion method cannot support the target zoom magnification, the single-frame super-resolution method can be used to perform super-resolution reconstruction on the processing result of the multi-frame fusion method to obtain each second magnification image at an integer multiple of the upper limit magnification of the first preset zoom magnification range, which can ensure the continuity of the zoom and the maintenance of the high-magnification zoom image quality. By interpolating each second magnification image and fusing the image obtained after the interpolation process, a third target image at the target zoom magnification is obtained, thereby reducing the loss of image quality, so that the resolution of the generated image is better and the image is clearer.

[0189] In one embodiment, the third zoom module 1008 is further used to perform interpolation processing on each second-magnification image respectively to obtain each interpolated image at a target zoom ratio; determine the weights corresponding to each interpolated image according to the target zoom ratio and the second preset zoom ratios corresponding to each second-magnification image respectively; and fuse each interpolated image based on the weights corresponding to each interpolated image to obtain a third target image at the target zoom ratio.

[0190] In this embodiment, each second-magnification image is interpolated to obtain each interpolated image at a target zoom ratio. The weights corresponding to each interpolated image are determined according to the target zoom ratio and the second preset zoom ratios corresponding to each second-magnification image. Based on the weights corresponding to each interpolated image, each interpolated image is fused so that the image can obtain more detailed features. The obtained third target image at the target zoom ratio has higher quality, thereby increasing the image resolution while reducing the loss of image quality.

[0191] In one embodiment, the third zoom module 1008 is further used to determine, for each second-magnification image in each second-magnification image, each point to be interpolated in the second-magnification image at a target zoom magnification; for each point to be interpolated, determine the position of each sampling point within a preset range of the point to be interpolated, and determine the pixel value corresponding to the point to be interpolated at the target zoom magnification based on the position of each sampling point and the corresponding weight, until the pixel value corresponding to each point to be interpolated in the second-magnification image is obtained, and then obtain the interpolated image corresponding to the second-magnification image.

[0192] In this embodiment, for each second-magnification image in each second-magnification image, each to-be-interpolated point of the second-magnification image at the target zoom magnification is determined, and for each to-be-interpolated point, the position of each sampling point within a preset range of the to-be-interpolated point is determined, and according to the position of each sampling point and the corresponding weight, the pixel value corresponding to the to-be-interpolated point at the target zoom magnification can be accurately determined, until the pixel value corresponding to each to-be-interpolated point in the second-magnification image is obtained, and the interpolated image corresponding to the second-magnification image is accurately obtained.

[0193] In one embodiment, the third zoom module 1008 is further used to determine the intermediate interpolation point corresponding to each row within a preset range according to the position of each sampling point and the corresponding weight; for each intermediate interpolation point, determine the Euclidean distance between the intermediate interpolation point and the point to be interpolated, and use the Euclidean distance as the interpolation weight corresponding to the intermediate interpolation point; based on each intermediate interpolation point and the corresponding interpolation weight, determine the pixel value corresponding to the point to be interpolated at the target zoom ratio.

[0194] In this embodiment, the intermediate interpolation point corresponding to each row in the preset range is determined according to the position and corresponding weight of each sampling point, and the Euclidean distance between the intermediate interpolation point and the point to be interpolated is determined for each intermediate interpolation point, and the Euclidean distance is used as the interpolation weight corresponding to the intermediate interpolation point. The interpolation weight represents the importance of the intermediate interpolation point, and based on each intermediate interpolation point and the corresponding interpolation weight, the pixel value corresponding to the point to be interpolated at the target zoom magnification can be determined more accurately.

[0195] In one embodiment, the first zoom module 1004 is also used to determine a reference frame image from each frame of the image to be processed according to the image sharpness corresponding to each frame of the image to be processed when the target zoom ratio is within a first preset zoom ratio range; enlarge the reference frame image to the target zoom ratio, and perform registration processing on each frame of the image to be processed based on the reference frame image at the target zoom ratio to obtain each registered image; and fuse each registered image with the reference frame image of the target zoom ratio to obtain a first target image at the target zoom ratio.

[0196] In this embodiment, each frame of the image to be processed is aligned with the reference frame image at the target zoom factor, so that each frame of the image to be processed and the reference frame image at the target zoom factor are in the same image space, to ensure that all parameters other than the resolution of each frame of the image to be processed and the reference frame image at the target zoom factor are consistent, so that after the fusion of the aligned image and the reference frame image, sub-pixel high-resolution information can be obtained, and the generated first target image has clearer image quality.

[0197] In one embodiment, the first zoom module 1004 is also used to obtain feature points of the reference frame image at the target zoom ratio and feature points of each frame of the image to be processed; according to the feature points of the reference frame image at the target zoom ratio and the feature points of each frame of the image to be processed, respectively determine the matching point pairs between the reference frame image at the target zoom ratio and each frame of the image to be processed; according to the matching point pairs, determine the homography matrix between the reference frame image at the target zoom ratio and each frame of the image to be processed; based on the homography matrix, perform registration processing on each frame of the image to be processed to obtain each registered image of the target zoom ratio.

[0198] In this embodiment, the reference frame image is enlarged to the target zoom ratio before image registration, and other frames of to-be-processed images are registered to the enlarged reference frame image, so that each frame of to-be-processed image can provide sub-pixel-level high-resolution information to the reference frame image at the target zoom ratio. The reference frame image at the target zoom ratio and each registered image are fused, so that pixels of the same content in different frames can be fused together, and the target image at the target zoom ratio can be accurately obtained, and ghosting can be avoided, thereby improving the image quality of the target image.

[0199] The division of the modules in the above-mentioned image processing device is only for illustration. In other embodiments, the image processing device may be divided into different modules as needed to complete all or part of the functions of the above-mentioned image processing device.

[0200] For the specific definition of the image processing device, please refer to the definition of the image processing method above, which will not be repeated here. Each module in the above image processing device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0201] Fig.11 Schematic diagram of the internal structure of an electronic device in an embodiment. The electronic device can be any terminal device such as a mobile phone, a tablet computer, a laptop computer, a desktop computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a car computer, a wearable device, etc. The electronic device includes a processor and a memory connected via a system bus. Among them, the processor may include one or more processing units. The processor may be a CPU (Central Processing Unit) or a DSP (Digital Signal Processing), etc. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by the processor to implement an image processing method provided in each of the following embodiments. The internal memory provides a cache operating environment for the operating system computer program in the non-volatile storage medium.

[0202] The implementation of each module in the image processing device provided in the embodiment of the present application may be in the form of a computer program. The computer program may be run on a terminal or a server. The program module constituted by the computer program may be stored in a memory of an electronic device. When the computer program is executed by a processor, the steps of the method described in the embodiment of the present application are implemented.

[0203] The embodiment of the present application further provides a computer-readable storage medium, one or more non-volatile computer-readable storage media containing computer-executable instructions, which, when executed by one or more processors, enable the processors to perform the steps of the image processing method.

[0204] The embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the image processing method.

[0205] Any reference to memory, storage, database or other medium used in this application may include non-volatile and / or volatile memory. Non-volatile memory may include ROM (Read-Only Memory), PROM (Programmable Read-only Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-only Memory) or flash memory. Volatile memory may include RAM (Random Access Memory), which is used as an external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as SRAM (Static Random Access Memory), DRAM (Dynamic Random Access Memory), SDRAM (Synchronous Dynamic Random Access Memory), Double Data Rate DDRSDRAM (Double Data Rate Synchronous Dynamic Random Access memory), ESDRAM (Enhanced Synchronous Dynamic Random Access memory), SLDRAM (Sync Link Dynamic Random Access Memory), RDRAM (Rambus Dynamic Random Access Memory), and DRDRAM (Direct Rambus Dynamic Random Access Memory).

[0206] The above-mentioned 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, It is characterized in that include: Acquire a target zoom ratio, and when the target zoom ratio is within a first preset zoom ratio range, perform zoom processing on each frame of the image to be processed by a multi-frame fusion method to obtain a first target image at the target zoom ratio; the multi-frame fusion method is used to fuse at least two frames of the image to be processed; When the target zoom ratio belongs to a second preset zoom ratio, zoom processing is performed on each frame of the image to be processed by the multi-frame fusion method and the single-frame super-resolution method to obtain a second target image at the target zoom ratio; the second preset zoom ratio is an integer multiple of the upper limit value of the first preset zoom ratio range; The single-frame super-resolution method is used to perform super-resolution reconstruction based on a single-frame image to be processed; When the target zoom ratio belongs to the third preset zoom ratio, the multi-frame fusion method is used to perform zoom processing on each frame of the image to be processed to obtain a first magnification image; the first magnification image is an image corresponding to the upper limit magnification of the first preset zoom ratio range; The first magnification image is zoomed by using the single-frame super-resolution method to obtain at least two second magnification images; the at least two second magnification images include images corresponding to two second preset zoom magnifications adjacent to the target zoom magnification; An interpolation processing method is adopted to interpolate each of the second-magnification images respectively, and the images obtained after the interpolation processing are fused to obtain a third target image at the target zoom ratio; the third preset zoom ratio is between two different second preset zoom ratios, and the interpolation processing method is used to increase the resolution of a single frame image.

2. The method according to claim 1, It is characterized in that When the target zoom ratio belongs to the second preset zoom ratio, zoom processing is performed on each frame of the image to be processed by the multi-frame fusion method and the single-frame super-resolution method to obtain a second target image at the target zoom ratio, including: When the target zoom ratio belongs to the second preset zoom ratio, the multi-frame fusion method is used to perform zoom processing on each frame of the image to be processed to obtain a first magnification image; the first magnification image is an image corresponding to the upper limit magnification of the first preset zoom ratio range; The first magnification image is zoomed by a single-frame super-resolution method to obtain a second target image at the target zoom magnification.

3. The method according to claim 2, It is characterized in that The step of performing zoom processing on the first magnification image by a single-frame super-resolution method to obtain a second target image at the target zoom magnification includes: Performing feature extraction on the first magnification image to obtain feature maps of each layer; The feature maps of each layer are enlarged to the target zoom ratio, and the enlarged feature maps of each layer are fused to obtain a second target image at the target zoom ratio.

4. The method according to claim 1, It is characterized in that The interpolation processing is performed on each of the second magnification images respectively, and the images obtained after the interpolation processing are fused to obtain a third target image at the target zoom magnification, including: performing interpolation processing on each of the second magnification images respectively to obtain each interpolation image at the target zoom magnification; Determining weights corresponding to the interpolation images according to the target zoom ratio and second preset zoom ratios corresponding to the second zoom ratio images; Based on the weights respectively corresponding to the interpolation images, the interpolation images are fused to obtain a third target image at the target zoom factor.

5. The method according to claim 4, It is characterized in that The interpolation processing is performed on each of the second magnification images to obtain each interpolation image at the target zoom magnification, including: For each of the second-magnification images, determining each to-be-interpolated point of the second-magnification image at the target zoom magnification; For each point to be interpolated, the positions of each sampling point within a preset range of the point to be interpolated are determined, and according to the positions of each sampling point and the corresponding weights, the pixel value corresponding to the point to be interpolated at the target zoom magnification is determined, until the pixel value corresponding to each point to be interpolated in the second magnification image is obtained, and then the interpolated image corresponding to the second magnification image is obtained.

6. The method according to claim 5, It is characterized in that The step of determining the pixel value corresponding to the point to be interpolated at the target zoom factor according to the position and the corresponding weight of each sampling point includes: Determine the intermediate interpolation point corresponding to each row within the preset range according to the position of each sampling point and the corresponding weight; For each intermediate interpolation point, determine the Euclidean distance between the intermediate interpolation point and the point to be interpolated, and use the Euclidean distance as the interpolation weight corresponding to the intermediate interpolation point; Based on each intermediate interpolation point and the corresponding interpolation weight, a pixel value corresponding to the to-be-interpolated point at the target zoom factor is determined.

7. The method according to claim 1, It is characterized in that When the target zoom ratio is within a first preset zoom ratio range, zoom processing is performed on each frame of the to-be-processed image by a multi-frame fusion method to obtain a first target image at the target zoom ratio, including: When the target zoom ratio is within a first preset zoom ratio range, determining a reference frame image from each frame of the image to be processed according to the image sharpness corresponding to each frame of the image to be processed; Enlarging the reference frame image to the target zoom factor, and performing registration processing on each frame of the image to be processed based on the reference frame image at the target zoom factor to obtain each registered image; Each of the registered images is fused with the reference frame image at the target zoom factor to obtain a first target image at the target zoom factor.

8. The method according to claim 7, It is characterized in that The registering process of each frame of the image to be processed based on the reference frame image at the target zoom factor to obtain each registered image includes: Acquire feature points of the reference frame image and feature points of each frame of the image to be processed at the target zoom factor; According to the feature points of the reference frame image at the target zoom factor and the feature points of the image to be processed in each frame, respectively determining the matching point pairs between the reference frame image at the target zoom factor and the image to be processed in each frame; Determine, according to the matching point pairs, the homography matrices between the reference frame images at the target zoom factor and the images to be processed in each frame; Based on the homography matrix, registration processing is performed on each frame of the image to be processed to obtain each registered image of the target zoom ratio.

9. An image processing device, It is characterized in that include: A first zoom module is used to obtain a target zoom ratio, and when the target zoom ratio is within a first preset zoom ratio range, zoom processing is performed on each frame of the image to be processed by a multi-frame fusion method to obtain a first target image at the target zoom ratio; the multi-frame fusion method is used to fuse at least two frames of the image to be processed; A second zoom module is used for performing zoom processing on each frame of the image to be processed by the multi-frame fusion method and the single-frame super-resolution method when the target zoom ratio belongs to the second preset zoom ratio, so as to obtain a second target image at the target zoom ratio; The second preset zoom ratio is an integer multiple of an upper limit value of the first preset zoom ratio range; The single-frame super-resolution method is used to perform super-resolution reconstruction based on a single-frame image to be processed; a third zoom module, configured to, when the target zoom ratio belongs to a third preset zoom ratio, perform zoom processing on each frame of the image to be processed by adopting the multi-frame fusion method to obtain a first magnification image; the first magnification image is an image corresponding to an upper limit magnification of the first preset zoom ratio range; The first magnification image is zoomed using the single-frame super-resolution method to obtain at least two second magnification images; the at least two second magnification images include images corresponding to two second preset zoom magnifications adjacent to the target zoom magnification; an interpolation processing method is used to interpolate each of the second magnification images, and the images obtained after the interpolation processing are fused to obtain a third target image at the target zoom magnification; the third preset zoom magnification is between two different second preset zoom magnifications, and the interpolation processing method is used to increase the resolution of a single-frame image.

10. An electronic device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the computer program is executed by the processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program stored thereon, It is 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 8 are implemented.

12. A computer program product comprising a computer program, It is 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 8 are implemented.