Image scaling method and device

By grouping adjacent pixels of interpolated pixels and performing virtual interpolation processing, the quadratic linear interpolation algorithm is used to solve the complex calculation problem of the traditional quadratic cubic interpolation algorithm and improve the image scaling efficiency and processing speed.

CN114331832BActive Publication Date: 2024-09-06GLENFLY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111425284.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-26
Publication Date
2024-09-06
Estimated Expiration
2041-11-26

AI Technical Summary

Technical Problem

The traditional quadratic cubic interpolation algorithm requires a large amount of calculations during the image enlargement process and is difficult to implement in hardware, resulting in low image enlargement efficiency.

Method used

By grouping adjacent pixels of the interpolated pixels, the virtual interpolated pixels are determined, and their pixel sampling values ​​in the source image are calculated according to the preset quadratic linear interpolation algorithm to generate theoretical pixel values ​​for image scaling processing and reduce sampling calculations. quantity.

Benefits of technology

The processing efficiency of image scaling is improved and the computational complexity is reduced while maintaining the image scaling effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114331832B
    Figure CN114331832B
Patent Text Reader

Abstract

The present application relates to an image scaling method and device thereof. The method comprises: for at least one interpolation pixel in a source image, at least two adjacent pixels of the interpolation pixel are grouped to obtain adjacent pixel sets; there is no intersection between each group of adjacent pixel sets; based on the positional relationship between the interpolation pixel and the area formed by each group of adjacent pixel sets, virtual interpolation pixels for the interpolation pixel are determined in the area formed by each group of adjacent pixel sets; the pixel sampling values ​​corresponding to each virtual interpolation pixel in the source image are calculated according to a preset quadratic linear interpolation algorithm; based on the pixel sampling values ​​corresponding to each virtual interpolation pixel, a theoretical pixel value corresponding to the interpolation pixel is generated; the theoretical pixel value is used to perform image scaling processing on the source image. The use of this method can improve the processing efficiency of image scaling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image scaling method and a device thereof. Background Art

[0002] Image magnification is one of the most important technologies in digital image processing, and commonly used magnification methods include the quadratic cubic interpolation algorithm. However, although the quadratic cubic interpolation algorithm in traditional technology can better preserve the high-frequency information of the image, the amount of calculation and the difficulty of hardware implementation are very large, making the image magnification efficiency not high. Summary of the invention

[0003] Based on this, it is necessary to provide an image scaling method and device thereof that can improve image scaling efficiency in response to the above technical problems.

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

[0005] For at least one interpolation pixel in the source image, at least two adjacent pixels of the interpolation pixel are grouped to obtain adjacent pixel sets; there is no intersection between the adjacent pixel sets of each group;

[0006] Based on the positional relationship between the interpolation pixel and the area formed by each group of the adjacent pixel sets, determining a virtual interpolation pixel for the interpolation pixel in the area formed by each group of the adjacent pixel sets;

[0007] Calculating the pixel sampling value corresponding to each virtual interpolation pixel in the source image according to a preset quadratic linear interpolation algorithm;

[0008] Based on the pixel sampling value corresponding to each of the virtual interpolation pixels, a theoretical pixel value corresponding to the interpolation pixel is generated; the theoretical pixel value is used to perform image scaling processing on the source image.

[0009] In one embodiment, the determining of virtual interpolation pixels for the interpolation pixels in the regions formed by the respective groups of adjacent pixel sets based on the positional relationship between the interpolation pixels and the regions formed by the respective groups of adjacent pixel sets includes:

[0010] Obtaining a decimal part of the pixel coordinates of the interpolated pixel; the decimal part is used to represent the positional relationship between the interpolated pixel and the area formed by each group of adjacent pixel sets;

[0011] According to the decimal part, weights of adjacent pixels in each group of adjacent pixel sets in at least two directions are calculated according to a preset quadratic cubic interpolation algorithm;

[0012] According to weights of neighboring pixels in the neighboring pixel set in at least two directions, a virtual interpolation pixel for the interpolation pixel is determined in an area formed by the neighboring pixel set.

[0013] In one embodiment, the determining of virtual interpolation pixels for the interpolation pixels in the regions formed by the respective groups of adjacent pixel sets based on the positional relationship between the interpolation pixels and the regions formed by the respective groups of adjacent pixel sets includes:

[0014] Obtaining a decimal part of the pixel coordinates of the interpolated pixel; the decimal part is used to represent the positional relationship between the interpolated pixel and the area formed by each group of adjacent pixel sets;

[0015] In a pre-established first query table, a virtual interpolation pixel corresponding to the coordinate composed of the decimal part is queried as a virtual interpolation pixel of the interpolation pixel; wherein the first query table records a first mapping relationship between different preset coordinates and different virtual interpolation pixels.

[0016] In one embodiment, the first lookup table is a first texture image, the first texture image is an image generated by fitting the first mapping relationship, and the virtual interpolation pixel corresponding to the coordinate composed of the decimal part is queried in the pre-established first lookup table as the virtual interpolation pixel of the interpolation pixel, including:

[0017] Using the coordinates composed of the decimal part, perform quadratic linear interpolation on the first texture image to obtain a first interpolation result corresponding to the coordinates composed of the decimal part;

[0018] The first interpolation result corresponding to the coordinate composed of the decimal part is used as a virtual interpolation pixel of the interpolation pixel.

[0019] In one embodiment, the generating the theoretical pixel value corresponding to the interpolation pixel based on the pixel sampling value corresponding to each virtual interpolation pixel includes:

[0020] Based on the positional relationship between the interpolated pixel and the area formed by each group of the adjacent pixel sets, obtaining the grouping weight corresponding to each group of the adjacent pixel sets;

[0021] According to the grouping weights corresponding to the adjacent pixel sets of each group, the pixel sampling values ​​corresponding to the virtual interpolation pixels are weightedly summed to obtain the theoretical pixel value corresponding to the interpolation pixel.

[0022] In one embodiment, the obtaining the grouping weight corresponding to each group of the adjacent pixel sets based on the positional relationship between the interpolated pixel and the area formed by each group of the adjacent pixel sets includes:

[0023] Obtaining a decimal part of the pixel coordinates of the interpolated pixel; the decimal part is used to represent the positional relationship between the interpolated pixel and the area formed by each group of adjacent pixel sets;

[0024] According to the decimal part, weights of adjacent pixels in each group of adjacent pixel sets in at least two directions are calculated according to a preset quadratic cubic interpolation algorithm;

[0025] The grouping weight corresponding to each group of the adjacent pixel sets is determined according to the weights of the adjacent pixels in at least two directions in each group of the adjacent pixel sets.

[0026] In one embodiment, the obtaining the grouping weight corresponding to each group of the adjacent pixel sets based on the positional relationship between the interpolated pixel and the area formed by each group of the adjacent pixel sets includes:

[0027] Obtaining a decimal part of the pixel coordinates of the interpolated pixel; the decimal part is used to represent the positional relationship between the interpolated pixel and the area formed by each group of adjacent pixel sets;

[0028] In a pre-established second query table, the grouping weights corresponding to the coordinates consisting of the decimal part are queried to obtain the grouping weights corresponding to each group of adjacent pixel sets; wherein the second query table records a second mapping relationship between different preset coordinates and different grouping weights.

[0029] In one embodiment, the second lookup table is a second texture image, the second texture image is an image generated by fitting the second mapping relationship, and the grouping weights corresponding to the coordinates composed of the decimal part are queried in the pre-established second lookup table to obtain the grouping weights corresponding to each group of the adjacent pixel sets, including:

[0030] Using the coordinates composed of the decimal part, perform quadratic linear interpolation on the second texture image to obtain a second interpolation result corresponding to the coordinates composed of the decimal part;

[0031] The second interpolation result corresponding to the coordinates composed of the decimal part is used to determine the grouping weight corresponding to each group of the adjacent pixel sets.

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

[0033] A grouping module, for grouping at least two adjacent pixels of at least one interpolation pixel in a source image to obtain adjacent pixel sets; there is no intersection between the adjacent pixel sets of each group;

[0034] a determination module, configured to determine, based on a positional relationship between the interpolation pixel and an area formed by each group of the adjacent pixel sets, a virtual interpolation pixel for the interpolation pixel in an area formed by each group of the adjacent pixel sets;

[0035] A sampling module, used to calculate the pixel sampling value corresponding to each virtual interpolation pixel in the source image according to a preset quadratic linear interpolation algorithm;

[0036] A generation module is used to determine a theoretical pixel value corresponding to the interpolation pixel based on the pixel sampling value corresponding to each virtual interpolation pixel; the theoretical pixel value is used to perform image scaling processing on the source image.

[0037] The above-mentioned image scaling method and device, for at least one interpolation pixel in the source image, obtains a set of adjacent pixels by grouping at least two adjacent pixels of the interpolation pixel; there is no intersection between the sets of adjacent pixels; based on the positional relationship between the interpolation pixel and the area formed by the sets of adjacent pixels, respectively, in the area formed by the sets of adjacent pixels, determine the virtual interpolation pixel for the interpolation pixel; according to the preset quadratic linear interpolation algorithm, respectively calculate the pixel sampling value corresponding to each virtual interpolation pixel in the source image; based on the pixel sampling value corresponding to each virtual interpolation pixel, generate the theoretical pixel value corresponding to the interpolation pixel; the theoretical pixel value is used to perform image scaling processing on the source image. In this way, by using the quadratic linear interpolation of the virtual interpolation pixel of the interpolation pixel to equivalently replace the original need to perform quadratic cubic interpolation on all adjacent pixels, it is achieved that the image scaling effect is not affected while the sampling calculation amount is greatly reduced, thereby improving the processing efficiency of image scaling. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 is a schematic flow chart of an image scaling method in an embodiment;

[0039] Figure 2 A schematic diagram of dividing adjacent pixels in one embodiment;

[0040] Figure 3 is an interpolation flow chart of an image scaling method in one embodiment;

[0041] Figure 4 is a schematic flow chart of an image scaling method in another embodiment;

[0042] Figure 5a A flowchart of a pre-calculation step in one embodiment;

[0043] Figure 5b is a flowchart of an interpolation step in one embodiment;

[0044] Figure 6 is a flow chart of another image scaling method in another embodiment;

[0045] Figure 7a This is a diagram showing the effect of image magnification using a quadratic cubic interpolation algorithm in one embodiment;

[0046] Figure 7b An image magnification effect diagram of an image zooming method in an embodiment;

[0047] Figure 7c An image magnification effect diagram of another image zooming method in an embodiment;

[0048] Figure 7d It is an image magnification effect diagram of an image zooming method in another embodiment;

[0049] Figure 7e is an image magnification effect diagram of another image zooming method in another embodiment;

[0050] Figure 8 FIG. 4 is a structural block diagram of an image scaling device in an embodiment. DETAILED DESCRIPTION

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

[0052] In one embodiment, Figure 1 As shown, a flow chart of an image scaling method is provided, and the method is described by taking the application of the method to an image scaling device as an example, and the method includes the following steps:

[0053] Step S110 , for at least one interpolation pixel in the source image, group at least two adjacent pixels of the interpolation pixel to obtain adjacent pixel sets; there is no intersection between the adjacent pixel sets.

[0054] The source image may refer to an image that needs to be scaled.

[0055] The interpolation pixel may refer to a pixel that needs to be interpolated.

[0056] When performing image scaling, the pixel P in the target image is usually mapped back to the virtual pixel P' in the source image, and the color value of the P' pixel is used to represent (or calculate) the value of the P pixel. Since the coordinates of P' are generally not integers and there is no actual pixel corresponding to it, a method is needed to calculate the value of the P' pixel through the value of the real pixel at the integer position. This process is called interpolation. In practical applications, the virtual pixel P' can be named the interpolation pixel.

[0057] The adjacent pixels may be real pixels adjacent to the interpolated pixel in the source image. For example, if the coordinates of the interpolated pixel are known to be (1.5, 1.5), the coordinates of the adjacent pixels of the interpolated pixel may be (1, 1), (2, 1), (1, 2), (2, 2), etc.

[0058] The adjacent pixel set may be a set consisting of a plurality of adjacent pixels.

[0059] For the convenience of understanding by those skilled in the art, see Figure 2 , Figure 2 A schematic diagram of dividing adjacent pixels is shown as an example. For at least one interpolation pixel P' in the source image, the image scaling device can determine at least 16 adjacent pixels p00-p33 of the interpolation pixel P'. Then, the image scaling device can group the above 16 adjacent pixels p00-p33 to obtain multiple groups of adjacent pixel sets. There is no intersection between the groups of adjacent pixel sets. In practical applications, the image scaling device can divide the above 16 adjacent pixels p00-p33 into four groups A0-A3.

[0060] Among them, the adjacent pixel set A0 includes adjacent pixels p00, adjacent pixels p01, adjacent pixels p10 and adjacent pixels p11; the adjacent pixel set A1 includes adjacent pixels p02, adjacent pixels p03, adjacent pixels p12 and adjacent pixels p13; the adjacent pixel set A2 includes adjacent pixels p20, adjacent pixels p21, adjacent pixels p30 and adjacent pixels p31; the adjacent pixel set A3 includes adjacent pixels p22, adjacent pixels p23, adjacent pixels p32 and adjacent pixels p33.

[0061] Step S120 : determining virtual interpolation pixels for the interpolation pixels in the regions formed by the respective groups of adjacent pixel sets based on the positional relationship between the interpolation pixels and the regions formed by the respective groups of adjacent pixel sets.

[0062] In a specific implementation, after the image scaling device determines each group of adjacent pixel sets, the image scaling device can determine the virtual interpolation pixel for the interpolation pixel P' in the area formed by each group of adjacent pixel sets based on the positional relationship between the interpolation pixel P' and the area A0-A3 formed by each group of adjacent pixel sets. Figure 2 , Figure 2 The virtual interpolation pixel pa of the interpolation pixel P′ in the A0 area is exemplarily shown.

[0063] Step S130 , calculating the pixel sampling value corresponding to each virtual interpolation pixel in the source image according to a preset quadratic linear interpolation algorithm.

[0064] In a specific implementation, the image scaling device can calculate the pixel sampling value corresponding to each virtual interpolation pixel in the source image according to a preset quadratic linear interpolation algorithm.

[0065] In practical applications, the image scaling device has built-in (hardware) support for quadratic linear interpolation in the texture function using OpenGL (Open Graphics Library). It only needs to provide the floating-point coordinates of the virtual interpolation pixel pa point, and the texture function can sample the four points adjacent to the virtual interpolation pixel pa point and use the quadratic linear interpolation algorithm to calculate the pixel sampling value corresponding to each virtual interpolation pixel in the source image.

[0066] Step S140, generating theoretical pixel values ​​corresponding to the interpolation pixels based on the pixel sampling values ​​corresponding to the virtual interpolation pixels; the theoretical pixel values ​​are used to perform image scaling processing on the source image.

[0067] In a specific implementation, after calculating the pixel sampling value corresponding to each virtual interpolation pixel in the source image, the image scaling device can generate a theoretical pixel value corresponding to the interpolation pixel based on the pixel sampling value corresponding to each virtual interpolation pixel; the theoretical pixel value is used to perform image scaling processing on the source image.

[0068] Specifically, the image scaling device can obtain the group weight corresponding to each virtual interpolation pixel, and perform weighted summation on the pixel sampling values ​​corresponding to each virtual interpolation pixel based on the group weight to obtain the theoretical pixel value corresponding to the interpolation pixel. In this way, the image scaling device can perform image magnification processing on the source image based on the theoretical pixel value corresponding to each interpolation pixel.

[0069] In the above-mentioned image scaling method, for at least one interpolation pixel in the source image, at least two adjacent pixels of the interpolation pixel are grouped to obtain an adjacent pixel set; there is no intersection between the adjacent pixel sets; based on the positional relationship between the interpolation pixel and the area formed by the adjacent pixel sets, the virtual interpolation pixel for the interpolation pixel is determined in the area formed by the adjacent pixel sets; the pixel sampling value corresponding to each virtual interpolation pixel in the source image is calculated according to the preset quadratic linear interpolation algorithm; based on the pixel sampling value corresponding to each virtual interpolation pixel, the theoretical pixel value corresponding to the interpolation pixel is generated; the theoretical pixel value is used to perform image scaling processing on the source image. In this way, by using the quadratic linear interpolation of the virtual interpolation pixel of the interpolation pixel to replace the original need to perform quadratic cubic interpolation on all adjacent pixels, it is achieved that the image scaling effect is not affected while the sampling calculation amount is greatly reduced, thereby improving the processing efficiency of image scaling.

[0070] In another embodiment, based on the positional relationship between the interpolated pixel and the area formed by each group of adjacent pixel sets, a virtual interpolated pixel for the interpolated pixel is determined in the area formed by each group of adjacent pixel sets, including: obtaining a decimal part of the pixel coordinates of the interpolated pixel; calculating the weights of adjacent pixels in each group of adjacent pixel sets in at least two directions according to a preset quadratic cubic interpolation algorithm based on the decimal part; and determining the virtual interpolated pixel for the interpolated pixel in the area formed by the adjacent pixel sets based on the weights of adjacent pixels in at least two directions in the adjacent pixel sets.

[0071] The decimal part is used to represent the positional relationship between the interpolated pixel and the area formed by each group of adjacent pixel sets.

[0072] In a specific implementation, the image scaling device can obtain the decimal part of the pixel coordinates of the interpolated pixel in the process of determining the virtual interpolated pixel for the interpolated pixel in the area formed by each group of adjacent pixel sets based on the positional relationship between the interpolated pixel and the area formed by each group of adjacent pixel sets. Then, the image scaling device calculates the weights of the adjacent pixels in each group of adjacent pixel sets in at least two directions according to the preset quadratic cubic interpolation algorithm based on the decimal part. Finally, the image scaling device can determine the virtual interpolated pixel for the interpolated pixel in the area formed by the adjacent pixel sets according to the weights of the adjacent pixels in the adjacent pixel sets in at least two directions.

[0073] Specifically, the image scaling device may use a quadratic cubic interpolation algorithm convolution kernel to calculate the weights wx0-wx3 in the x direction and the weights wy0-wy3 in the y direction of 16 neighboring pixels (p00-p33) of the interpolation pixel P'(x,y).

[0074] The above weights can be expressed as:

[0075]

[0076] Among them, fx is the fractional part of x, fy is the fractional part of y, and kernel is the quadratic cubic interpolation convolution kernel function.

[0077] Then, the image scaling device can obtain the coordinate points of each virtual interpolation pixel based on the weights wx0-wx3 of the 16 neighboring pixels (p00-p33) in the x direction and the weights wy0-wy3 in the y direction, thereby determining the virtual interpolation pixel for the interpolation pixel.

[0078] The virtual interpolated pixel can be expressed as:

[0079]

[0080]

[0081]

[0082]

[0083] Among them, pa n .ox is the horizontal coordinate of the nth virtual interpolation pixel; pa n .oy is the ordinate of the nth virtual interpolated pixel.

[0084] The technical solution of this embodiment obtains the decimal part of the pixel coordinates of the interpolated pixel, and calculates the weights of the adjacent pixels in each group of adjacent pixel sets in at least two directions according to the preset quadratic interpolation algorithm based on the decimal part; then determines the virtual interpolation pixel for the interpolated pixel in the area formed by the adjacent pixel set based on the weights of the adjacent pixels in the adjacent pixel set in at least two directions, so that the virtual interpolation pixel for the interpolated pixel can be accurately determined, and quadratic linear interpolation sampling is performed on the virtual interpolation pixel in the subsequent process to replace the quadratic cubic interpolation sampling of all adjacent pixels that was originally required, which greatly reduces the amount of sampling calculation without affecting the scaling effect of the image, thereby improving the image processing efficiency.

[0085] In another embodiment, based on the pixel sampling values ​​corresponding to each virtual interpolation pixel, a theoretical pixel value corresponding to the interpolation pixel is generated, including: based on the positional relationship between the interpolation pixel and the area formed by each group of adjacent pixel sets, obtaining the grouping weights corresponding to each group of adjacent pixel sets; according to the grouping weights corresponding to each group of adjacent pixel sets, weighted summing up the pixel sampling values ​​corresponding to each virtual interpolation pixel is performed to obtain the theoretical pixel value corresponding to the interpolation pixel.

[0086] In a specific implementation, when the image scaling device generates a theoretical pixel value corresponding to the interpolated pixel based on the pixel sampling value corresponding to each virtual interpolated pixel, the image scaling device can obtain the grouping weight corresponding to each group of adjacent pixel sets based on the positional relationship between the interpolated pixel and the area formed by each group of adjacent pixel sets; finally, the image scaling device performs weighted summation on the pixel sampling value corresponding to each virtual interpolated pixel according to the grouping weight corresponding to each group of adjacent pixel sets to obtain the theoretical pixel value corresponding to the interpolated pixel.

[0087] Specifically, the image scaling device may use the virtual interpolation point pa n Perform secondary linear sampling, and multiply the sampling result by the grouping weight wa n , calculate the cumulative sum, and get the theoretical pixel value of the interpolated pixel P'.

[0088] Among them, the theoretical pixel value of the interpolated pixel P' can be expressed as

[0089]

[0090] Among them, wa n Indicates the group weight corresponding to the nth virtual interpolation pixel, pa n Represents the nth virtual interpolated pixel.

[0091] The technical solution of this embodiment obtains the grouping weights corresponding to each group of adjacent pixel sets based on the positional relationship between the interpolated pixels and the areas formed by each group of adjacent pixel sets; performs weighted summation on the pixel sampling values ​​corresponding to each virtual interpolated pixel according to the grouping weights corresponding to each group of adjacent pixel sets to obtain the theoretical pixel value corresponding to the interpolated pixel, which greatly reduces the amount of sampling calculations without affecting the image scaling effect, thereby improving the image processing efficiency.

[0092] In another embodiment, based on the positional relationship between the interpolated pixel and the area formed by each group of adjacent pixel sets, the grouping weights corresponding to each group of adjacent pixel sets are obtained, including: obtaining the decimal part of the pixel coordinates of the interpolated pixel; calculating the weights of adjacent pixels in each group of adjacent pixel sets in at least two directions according to a preset quadratic cubic interpolation algorithm based on the decimal part; and determining the grouping weights corresponding to each group of adjacent pixel sets based on the weights of adjacent pixels in each group of adjacent pixel sets in at least two directions.

[0093] In a specific implementation, in the process of obtaining the grouping weights corresponding to each group of adjacent pixel sets based on the positional relationship between the interpolated pixel and the area formed by each group of adjacent pixel sets, the image scaling device can obtain the decimal part of the pixel coordinates of the interpolated pixel; then, the image scaling device calculates the weights of the adjacent pixels in each group of adjacent pixel sets in at least two directions according to the preset quadratic cubic interpolation algorithm based on the decimal part. Finally, the image scaling device determines the grouping weights corresponding to each group of adjacent pixel sets based on the weights of the adjacent pixels in each group of adjacent pixel sets in at least two directions.

[0094] Specifically, the image scaling apparatus may determine the grouping weights corresponding to each group of adjacent pixel sets based on the weights wx0-wx3 of the 16 adjacent pixels (p00-p33) in the x direction and the weights wy0-wy3 in the y direction.

[0095] The grouping weight can be expressed as:

[0096]

[0097] In order to facilitate the understanding of those skilled in the art, Figure 3 An interpolation flow chart of an image scaling method is provided; see Figure 3 , the interpolation process includes at least the following steps:

[0098] In step S310, the image scaling apparatus may use a quadratic cubic interpolation algorithm convolution kernel to calculate the weights wx0-wx3 in the x direction and the weights wy0-wy3 in the y direction of 16 neighboring pixels (p00-p33) of the interpolation pixel P'(x,y).

[0099] In step S320, the image scaling device can group the above 16 adjacent pixels p00-p33 to obtain multiple groups of adjacent pixel sets. Based on the weights wx0-wx3 of the 16 adjacent pixels (p00-p33) in the x direction and the weights wy0-wy3 in the y direction, the coordinate points of each virtual interpolation pixel are obtained. Based on the weights wx0-wx3 of the 16 adjacent pixels (p00-p33) in the x direction and the weights wy0-wy3 in the y direction, the grouping weights corresponding to each group of adjacent pixel sets are determined.

[0100] In step S330, the image scaling device may use the virtual interpolation pixel pa n Perform secondary linear sampling, and multiply the sampling result by the grouping weight wa n , calculate the cumulative sum, and get the theoretical pixel value of the interpolated pixel P'.

[0101] The technical solution of this embodiment is to obtain the decimal part of the pixel coordinates of the interpolated pixel; and calculate the weights of the adjacent pixels in each group of adjacent pixel sets in at least two directions according to the decimal part and a preset quadratic cubic interpolation algorithm; and determine the grouping weights corresponding to each group of adjacent pixel sets according to the weights of the adjacent pixels in each group of adjacent pixel sets in at least two directions, so as to facilitate the subsequent weighted summation of the pixel sampling values ​​corresponding to each virtual interpolated pixel, so as to obtain the theoretical pixel value corresponding to the interpolated pixel.

[0102] In another embodiment, Figure 4 As shown, an image scaling method is provided, which is described by taking the method applied to an image scaling device as an example, and includes the following steps:

[0103] Step S410: for at least one interpolation pixel in the source image, group at least two adjacent pixels of the interpolation pixel to obtain adjacent pixel sets; there is no intersection between the adjacent pixel sets of each group.

[0104] Step S420, obtaining the decimal part of the pixel coordinates of the interpolated pixel; the decimal part is used to represent the positional relationship between the interpolated pixel and the area formed by each group of adjacent pixel sets.

[0105] Step S430 , calculating the weights of adjacent pixels in each group of adjacent pixel sets in at least two directions according to the decimal part and a preset quadratic interpolation algorithm.

[0106] Step S440 : determining virtual interpolation pixels for the interpolation pixels in the area formed by the adjacent pixel sets according to the weights of the adjacent pixels in at least two directions in each group of the adjacent pixel sets.

[0107] Step S450: determining the grouping weight corresponding to each group of the adjacent pixel sets according to the weights of the adjacent pixels in each group of the adjacent pixel sets in at least two directions.

[0108] Step S460: Calculate the pixel sampling value corresponding to each virtual interpolation pixel in the source image according to a preset quadratic linear interpolation algorithm.

[0109] Step S470, performing weighted summation on the pixel sampling values ​​corresponding to each of the virtual interpolation pixels according to the grouping weights corresponding to each group of the adjacent pixel sets, to obtain a theoretical pixel value corresponding to the interpolation pixel; the theoretical pixel value is used to perform image scaling processing on the source image.

[0110] In another embodiment, based on the positional relationship between the interpolation pixel and the area formed by each group of adjacent pixel sets, the virtual interpolation pixel for the interpolation pixel is determined in the area formed by each group of adjacent pixel sets, including: obtaining the decimal part of the pixel coordinates of the interpolation pixel; the decimal part is used to characterize the positional relationship between the interpolation pixel and the area formed by each group of adjacent pixel sets; in a pre-established first query table, the virtual interpolation pixel corresponding to the coordinate composed of the decimal part is searched out as the virtual interpolation pixel of the interpolation pixel; wherein the first query table records the first mapping relationship between different preset coordinates and different virtual interpolation pixels. The first query table is a first texture image, and the first texture image is an image generated by fitting the first mapping relationship. In the pre-established first query table, the virtual interpolation pixel corresponding to the coordinate composed of the decimal part is searched out as the virtual interpolation pixel of the interpolation pixel, including: using the coordinate composed of the decimal part to perform quadratic linear interpolation on the first texture image to obtain a first interpolation result corresponding to the coordinate composed of the decimal part; and using the first interpolation result corresponding to the coordinate composed of the decimal part as the virtual interpolation pixel of the interpolation pixel.

[0111] Based on the positional relationship between the interpolated pixel and the area formed by each group of adjacent pixel sets, the grouping weight corresponding to each group of adjacent pixel sets is obtained, including: obtaining the decimal part of the pixel coordinates of the interpolated pixel; in a pre-established second query table, the grouping weight corresponding to the coordinates composed of the decimal part is searched out, and the grouping weight corresponding to each group of adjacent pixel sets is obtained; wherein the second query table records the second mapping relationship between different preset coordinates and different grouping weights. The second query table is a second texture image, and the second texture image is an image generated by fitting the second mapping relationship. In the pre-established second query table, the grouping weight corresponding to the coordinates composed of the decimal part is searched out, and the grouping weight corresponding to each group of adjacent pixel sets is obtained, including: using the coordinates composed of the decimal part, performing quadratic linear interpolation on the second texture image, and obtaining the second interpolation result corresponding to the coordinates composed of the decimal part; using the second interpolation result corresponding to the coordinates composed of the decimal part to determine the grouping weight corresponding to each group of adjacent pixel sets.

[0112] Since the calculation process of using the convolution kernel of the quadratic cubic interpolation algorithm to calculate the weights wx0-wx3 in the x direction and the weights wy0-wy3 in the y direction of the 16 neighboring pixels (p00-p33) of the interpolation pixel P'(x,y) is relatively complicated, real-time calculation in the Shader program will affect the interpolation efficiency. In practical applications, the image scaling device can perform pre-calculation and interpolation, determine the mapping relationship between each different position relationship and different virtual interpolation pixels and different grouping weights, and record the query table. In practical applications, the query table includes a first query table that records the mapping relationship between coordinates composed of different decimal parts and different virtual interpolation pixels, and also includes a second query table that records the mapping relationship between coordinates composed of different decimal parts and different grouping weights.

[0113] Specifically, it includes at least two steps: pre-calculation and interpolation:

[0114] In order to facilitate the understanding of those skilled in the art, Figure 5a A flowchart of the steps of a pre-calculation step is provided as an example. Figure 5a , the pre-calculation steps include:

[0115] In step S502: check whether the first texture image offset_tex and the second texture image weight_tex exist. If they exist, execute step S504; if they do not exist, execute step S506.

[0116] In step S504: read the first texture image offset_tex and the second texture image weight_tex in the file.

[0117] In step S506: all possible values ​​of the fractional part fx, fy (fx∈[0,1), fy∈[0,1)) of the coordinate of the interpolation point P'(x, y) can be quantized with a step length of 1 / N to obtain N x N discrete coordinate points, namely sampling points.

[0118] Use the quadratic cubic convolution kernel to calculate the x-direction weight wx and y-direction weight wy of each point

[0119] In step S508: the quadratic cubic interpolation algorithm convolution kernel is used to calculate the weight wx in the x direction and the weight wy in the y direction of each point of the interpolation point P'(x, y).

[0120] In step S510: the 16 neighboring pixels (p00-p33) of the interpolation point are given weights wx0-wx3 in the x direction and weights wy0-wy3 in the y direction;

[0121] In step S512: two N x N pixel RGBA format second texture images weight_tex and first texture images offset_tex are generated.

[0122] In step S514: the coordinates of the virtual interpolation points and the sampling points are written into the first texture image offset_tex in correspondence, and the coordinates of the grouping weights and the sampling points are written into the second texture image weight_tex in correspondence.

[0123] That is, write one data per channel for RGBA:

[0124]

[0125] In step S516: the first texture image offset_tex and the second texture image weight_tex into which the data is written are saved as files.

[0126] In order to facilitate the understanding of those skilled in the art, Figure 5b A flowchart of an interpolation step is provided as an example. Figure 5b , the interpolation steps include:

[0127] In step S518: the first texture image offset_tex and the second texture image weight_tex obtained in the pre-calculation step are passed into the Shader program (a graphics rendering program);

[0128] In step S520: the decimal part (fx, fy) of the coordinates of the interpolation point P'(x, y) is used to perform quadratic linear interpolation on weight_tex and offset_tex to obtain group weights wa0-wa3 and virtual interpolation pixels pa0-pa3:

[0129] [wa0,wa1,wa2,wa3]=bilinear(weight_tex,(fx,fy)).rgba

[0130] [pa0.ox,pa1.ox,pa0.oy,pa2.oy]=bilinear(offset_tex,(fx,fy)).rgba

[0131] In step S522: based on the weights wx0-wx3 of the 16 neighboring pixels (p00-p33) in the x direction and the weights wy0-wy3 in the y direction, the coordinate points of each interpolation pixel are obtained for each virtual interpolation pixel.

[0132] By performing texture sampling on the weight_tex and offset_tex images, the parameters are directly obtained, avoiding the real-time calculation of parameters in the Shader program, reducing the GPU calculation burden and speeding up the process.

[0133] The pre-calculated texture images weight_tex and offset_tex can be saved as image files and directly loaded when used, thus omitting the repeated pre-calculation process.

[0134] Since quadratic linear texture sampling has an interpolation function, extremely low resolution weight_tex and offset_tex such as N=8 or N=16 can obtain sufficient sampling accuracy, which makes the texture image generated by this method sample very quickly and occupy less space.

[0135] The above-mentioned image scaling method is adopted to make up for the deficiency that the 3D API does not have a quadratic image scaling function, and a highly efficient quadratic scaling algorithm is implemented, which takes into account both the quality and speed of image scaling.

[0136] In another embodiment, Figure 6 As shown, Figure 6 Another image scaling method is provided by way of example, and is described by taking the method applied to an image scaling device as an example, and includes the following steps:

[0137] Step S610: for at least one interpolation pixel in the source image, group at least two adjacent pixels of the interpolation pixel to obtain adjacent pixel sets; there is no intersection between the adjacent pixel sets of each group.

[0138] Step S620, obtaining the decimal part of the pixel coordinates of the interpolated pixel; the decimal part is used to represent the positional relationship between the interpolated pixel and the area formed by each group of adjacent pixel sets.

[0139] Step S630, in a pre-established first query table, query the virtual interpolation pixel corresponding to the coordinate composed of the decimal part as the virtual interpolation pixel of the interpolation pixel; wherein the first query table records the mapping relationship between the coordinates composed of different decimal parts and the different virtual interpolation pixels.

[0140] Step S640, in a pre-established second query table, query the grouping weights corresponding to the coordinates composed of the decimal part, and obtain the grouping weights corresponding to each group of adjacent pixel sets; wherein the second query table records the mapping relationship between the coordinates composed of different decimal parts and the different grouping weights.

[0141] Step S650: Calculate the pixel sampling value corresponding to each virtual interpolation pixel in the source image according to a preset quadratic linear interpolation algorithm.

[0142] Step S660, performing weighted summation on the pixel sampling values ​​corresponding to each of the virtual interpolation pixels according to the grouping weights corresponding to each group of the adjacent pixel sets, to obtain a theoretical pixel value corresponding to the interpolation pixel; the theoretical pixel value is used to perform image scaling processing on the source image.

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

[0144] To facilitate understanding by those skilled in the art, a source image with a resolution of 20x20 may be enlarged to an enlarged image with a resolution of 600x600; Figure 7a Provides an image magnification effect diagram (partial capture) using a quadratic cubic interpolation algorithm; Figure 7b Provides an image magnification effect diagram (partial capture) of an image scaling method when the resolution coefficient N of the texture image is 32; Figure 7c The image zoom effect diagram (partial capture) obtained by using the above image zoom method when the resolution coefficient N of the texture image is 16 is provided; Figure 7d The image zoom effect diagram (partial capture) obtained by using the above image zoom method when the resolution coefficient N of the texture image is 8 is provided; Figure 7e The image magnification effect diagram (partial capture) obtained by using the above image scaling method when the resolution coefficient N of the texture image is 4 is provided. It can be seen that when the resolution coefficient N of the texture image is 32 or 16, there is no obvious difference between the image after magnification and the image obtained by magnification using the quadratic cubic interpolation algorithm in the traditional technology; when the resolution coefficient N of the texture image is 8, the image quality has a visible decrease, but it is still acceptable; when the resolution coefficient N of the texture image is 4, the image quality decreases significantly.

[0145] In practical applications, the PSNR peak signal-to-noise ratio can be used for comparison Figure 7a Respectively Figure 7b , Figure 7c , Figure 7d , Figure 7e The similarity between them, PSNR peak signal-to-noise ratio can be expressed as:

[0146]

[0147] Among them, MAX f It is the maximum value of the pixel color value. For an 8-bit image, its value is 255. The MSE mean square error can be defined as:

[0148]

[0149] Figure 7a Respectively Figure 7b , Figure 7c , Figure 7d , Figure 7e The similarity between them can be seen in Table 1;

[0150] Table 1

[0151]

[0152] In practical applications, the 360-degree vehicle-mounted panoramic image stitching application test shows that compared with the quadratic cubic interpolation algorithm, the method proposed in the present disclosure can significantly improve the interpolation speed. See Table 2 for the interpolation speed.

[0153] Table 2

[0154]

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

[0156] In one embodiment, Figure 8 As shown, an image scaling device is provided, comprising:

[0157] The grouping module 810 is used to group at least two adjacent pixels of at least one interpolation pixel in the source image to obtain adjacent pixel sets; there is no intersection between the adjacent pixel sets of each group;

[0158] A determination module 820, configured to determine, based on a positional relationship between the interpolation pixel and an area formed by each group of the adjacent pixel sets, a virtual interpolation pixel for the interpolation pixel in an area formed by each group of the adjacent pixel sets;

[0159] The sampling module 830 is used to calculate the pixel sampling value corresponding to each virtual interpolation pixel in the source image according to a preset quadratic linear interpolation algorithm;

[0160] The generating module 840 is used to determine the theoretical pixel value corresponding to the interpolation pixel based on the pixel sampling value corresponding to each of the virtual interpolation pixels; the theoretical pixel value is used to perform image scaling processing on the source image.

[0161] In one embodiment, the determination module 820 is specifically used to obtain the decimal part of the pixel coordinates of the interpolated pixel; the decimal part is used to characterize the positional relationship between the interpolated pixel and the area formed by each group of the adjacent pixel sets; based on the decimal part, the weights of adjacent pixels in each group of the adjacent pixel sets in at least two directions are calculated according to a preset quadratic cubic interpolation algorithm; based on the weights of adjacent pixels in the adjacent pixel sets in at least two directions, a virtual interpolation pixel for the interpolated pixel is determined in the area formed by the adjacent pixel sets.

[0162] In one embodiment, the determination module 820 is specifically used to obtain the decimal part of the pixel coordinates of the interpolated pixel; the decimal part is used to characterize the positional relationship between the interpolated pixel and the area formed by each group of adjacent pixel sets; in a pre-established first query table, a virtual interpolation pixel corresponding to the coordinate composed of the decimal part is queried as the virtual interpolation pixel of the interpolated pixel; wherein the first query table records a first mapping relationship between different preset coordinates and different virtual interpolation pixels.

[0163] In one embodiment, the first query table is a first texture image, and the first texture image is an image generated by fitting the first mapping relationship. The determination module 820 is specifically used to use the coordinates composed of the decimal part to perform quadratic linear interpolation on the first texture image to obtain a first interpolation result corresponding to the coordinates composed of the decimal part; and use the first interpolation result corresponding to the coordinates composed of the decimal part as a virtual interpolation pixel of the interpolation pixel.

[0164] In one embodiment, the generation module 840 is specifically used to obtain the grouping weights corresponding to each group of adjacent pixel sets based on the positional relationship between the interpolation pixel and the area formed by each group of adjacent pixel sets; and perform weighted summation on the pixel sampling values ​​corresponding to each virtual interpolation pixel according to the grouping weights corresponding to each group of adjacent pixel sets to obtain the theoretical pixel value corresponding to the interpolation pixel.

[0165] In one embodiment, the generation module 840 is specifically used to obtain the decimal part of the pixel coordinates of the interpolated pixel; the decimal part is used to characterize the positional relationship between the interpolated pixel and the area formed by each group of the adjacent pixel sets; based on the decimal part, the weights of adjacent pixels in each group of the adjacent pixel sets in at least two directions are calculated according to a preset quadratic cubic interpolation algorithm; based on the weights of adjacent pixels in each group of the adjacent pixel sets in at least two directions, the grouping weights corresponding to each group of the adjacent pixel sets are determined.

[0166] In one embodiment, the generation module 840 is specifically used to obtain the decimal part of the pixel coordinates of the interpolated pixel; the decimal part is used to characterize the positional relationship between the interpolated pixel and the area formed by each group of the adjacent pixel sets; in a pre-established second query table, the grouping weights corresponding to the coordinates composed of the decimal part are queried to obtain the grouping weights corresponding to each group of the adjacent pixel sets; wherein the second query table records a second mapping relationship between different preset coordinates and different grouping weights.

[0167] In one embodiment, the second lookup table is a second texture image, and the second texture image is an image generated by fitting the second mapping relationship. The generation module 840 is specifically used to use the coordinates composed of the decimal part to perform quadratic linear interpolation on the second texture image to obtain a second interpolation result corresponding to the coordinates composed of the decimal part; and use the second interpolation result corresponding to the coordinates composed of the decimal part to determine the grouping weights corresponding to each group of the adjacent pixel sets.

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

[0169] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

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

Claims

1. An image scaling method, characterized in that: The method comprises: For at least one interpolation pixel in the source image, at least two adjacent pixels of the interpolation pixel are grouped to obtain adjacent pixel sets; there is no intersection between the adjacent pixel sets of each group; Based on the positional relationship between the interpolation pixel and the area formed by each group of the adjacent pixel sets, determining a virtual interpolation pixel for the interpolation pixel in the area formed by each group of the adjacent pixel sets; Calculating the pixel sampling value corresponding to each virtual interpolation pixel in the source image according to a preset quadratic linear interpolation algorithm; Based on the pixel sampling value corresponding to each of the virtual interpolation pixels, a theoretical pixel value corresponding to the interpolation pixel is generated; the theoretical pixel value is used to perform image scaling processing on the source image.

2. The method according to claim 1, characterized in that The determining, based on the positional relationship between the interpolation pixel and the area formed by each group of the adjacent pixel sets, a virtual interpolation pixel for the interpolation pixel in the area formed by each group of the adjacent pixel sets, comprises: Obtaining a decimal part of the pixel coordinates of the interpolated pixel; the decimal part is used to represent the positional relationship between the interpolated pixel and the area formed by each group of adjacent pixel sets; According to the decimal part, weights of adjacent pixels in each group of adjacent pixel sets in at least two directions are calculated according to a preset quadratic cubic interpolation algorithm; According to weights of neighboring pixels in the neighboring pixel set in at least two directions, a virtual interpolation pixel for the interpolation pixel is determined in an area formed by the neighboring pixel set.

3. The method according to claim 1, characterized in that The determining, based on the positional relationship between the interpolation pixel and the area formed by each group of the adjacent pixel sets, a virtual interpolation pixel for the interpolation pixel in the area formed by each group of the adjacent pixel sets, comprises: Obtaining a decimal part of the pixel coordinates of the interpolated pixel; the decimal part is used to represent the positional relationship between the interpolated pixel and the area formed by each group of adjacent pixel sets; In a pre-established first query table, a virtual interpolation pixel corresponding to the coordinate composed of the decimal part is queried as a virtual interpolation pixel of the interpolation pixel; wherein the first query table records a first mapping relationship between different preset coordinates and different virtual interpolation pixels.

4. The method according to claim 3, characterized in that The first lookup table is a first texture image, the first texture image is an image generated by fitting the first mapping relationship, and the virtual interpolation pixel corresponding to the coordinate composed of the decimal part is queried in the pre-established first lookup table as the virtual interpolation pixel of the interpolation pixel, including: Using the coordinates composed of the decimal part, perform quadratic linear interpolation on the first texture image to obtain a first interpolation result corresponding to the coordinates composed of the decimal part; The first interpolation result corresponding to the coordinate composed of the decimal part is used as a virtual interpolation pixel of the interpolation pixel.

5. The method according to claim 1, characterized in that The generating a theoretical pixel value corresponding to the interpolation pixel based on the pixel sampling value corresponding to each virtual interpolation pixel comprises: Based on the positional relationship between the interpolated pixel and the area formed by each group of the adjacent pixel sets, obtaining the grouping weight corresponding to each group of the adjacent pixel sets; According to the grouping weights corresponding to the adjacent pixel sets of each group, the pixel sampling values ​​corresponding to the virtual interpolation pixels are weightedly summed to obtain the theoretical pixel value corresponding to the interpolation pixel.

6. The method according to claim 5, characterized in that The obtaining, based on the positional relationship between the interpolated pixel and the region formed by each group of the adjacent pixel sets, the grouping weight corresponding to each group of the adjacent pixel sets comprises: Obtaining a decimal part of the pixel coordinates of the interpolated pixel; the decimal part is used to represent the positional relationship between the interpolated pixel and the area formed by each group of adjacent pixel sets; According to the decimal part, weights of adjacent pixels in each group of adjacent pixel sets in at least two directions are calculated according to a preset quadratic cubic interpolation algorithm; The grouping weight corresponding to each group of the adjacent pixel sets is determined according to the weights of the adjacent pixels in at least two directions in each group of the adjacent pixel sets.

7. The method according to claim 5, characterized in that The obtaining, based on the positional relationship between the interpolated pixel and the region formed by each group of the adjacent pixel sets, the grouping weight corresponding to each group of the adjacent pixel sets comprises: Obtaining a decimal part of the pixel coordinates of the interpolated pixel; the decimal part is used to represent the positional relationship between the interpolated pixel and the area formed by each group of adjacent pixel sets; In a pre-established second query table, the grouping weights corresponding to the coordinates consisting of the decimal part are queried to obtain the grouping weights corresponding to each group of adjacent pixel sets; wherein the second query table records a second mapping relationship between different preset coordinates and different grouping weights.

8. The method according to claim 7, characterized in that The second lookup table is a second texture image, and the second texture image is an image generated by fitting the second mapping relationship. The grouping weights corresponding to the coordinates composed of the decimal part are queried in the pre-established second lookup table to obtain the grouping weights corresponding to each group of the adjacent pixel sets, including: Using the coordinates composed of the decimal part, perform quadratic linear interpolation on the second texture image to obtain a second interpolation result corresponding to the coordinates composed of the decimal part; The second interpolation result corresponding to the coordinates composed of the decimal part is used to determine the grouping weight corresponding to each group of the adjacent pixel sets.

9. An image scaling device, characterized in that: The device comprises: A grouping module, for grouping at least two adjacent pixels of at least one interpolation pixel in a source image to obtain adjacent pixel sets; there is no intersection between the adjacent pixel sets of each group; a determination module, configured to determine, based on a positional relationship between the interpolation pixel and an area formed by each group of the adjacent pixel sets, a virtual interpolation pixel for the interpolation pixel in an area formed by each group of the adjacent pixel sets; A sampling module, used to calculate the pixel sampling value corresponding to each virtual interpolation pixel in the source image according to a preset quadratic linear interpolation algorithm; A generation module is used to determine a theoretical pixel value corresponding to the interpolation pixel based on the pixel sampling value corresponding to each virtual interpolation pixel; the theoretical pixel value is used to perform image scaling processing on the source image.

10. The device according to claim 9, characterized in that The determination module is specifically used to obtain the decimal part of the pixel coordinates of the interpolation pixel; the decimal part is used to characterize the positional relationship between the interpolation pixel and the area formed by each group of the adjacent pixel sets; based on the decimal part, the weights of the adjacent pixels in each group of the adjacent pixel sets in at least two directions are calculated according to a preset quadratic cubic interpolation algorithm; based on the weights of the adjacent pixels in the adjacent pixel sets in at least two directions, a virtual interpolation pixel for the interpolation pixel is determined in the area formed by the adjacent pixel sets.

11. The device according to claim 9, characterized in that The determination module is specifically used to obtain the decimal part of the pixel coordinates of the interpolation pixel; the decimal part is used to characterize the positional relationship between the interpolation pixel and the area formed by each group of the adjacent pixel sets; in a pre-established first query table, a virtual interpolation pixel corresponding to the coordinate composed of the decimal part is queried as a virtual interpolation pixel of the interpolation pixel; wherein the first query table records a first mapping relationship between different preset coordinates and different virtual interpolation pixels.

12. The device according to claim 11, characterized in that The first query table is a first texture image, and the first texture image is an image generated by fitting the first mapping relationship. The determination module is specifically used to use the coordinates composed of the decimal part to perform quadratic linear interpolation on the first texture image to obtain a first interpolation result corresponding to the coordinates composed of the decimal part; and use the first interpolation result corresponding to the coordinates composed of the decimal part as a virtual interpolation pixel of the interpolation pixel.

13. The device according to claim 9, characterized in that The generation module is specifically used to obtain the grouping weight corresponding to each group of adjacent pixel sets based on the positional relationship between the interpolation pixel and the area formed by each group of adjacent pixel sets; according to the grouping weight corresponding to each group of adjacent pixel sets, weighted summation is performed on the pixel sampling values ​​corresponding to each virtual interpolation pixel to obtain the theoretical pixel value corresponding to the interpolation pixel.

14. The device according to claim 13, characterized in that The generation module is specifically used to obtain the decimal part of the pixel coordinates of the interpolated pixel; the decimal part is used to characterize the positional relationship between the interpolated pixel and the area formed by each group of the adjacent pixel sets; based on the decimal part, the weights of the adjacent pixels in each group of the adjacent pixel sets in at least two directions are calculated according to a preset quadratic cubic interpolation algorithm; based on the weights of the adjacent pixels in each group of the adjacent pixel sets in at least two directions, the grouping weights corresponding to each group of the adjacent pixel sets are determined.

15. The device according to claim 13, characterized in that The generating module is specifically used to obtain the decimal part of the pixel coordinates of the interpolated pixel; the decimal part is used to represent the positional relationship between the interpolated pixel and the area formed by each group of adjacent pixel sets; In a pre-established second query table, the grouping weights corresponding to the coordinates consisting of the decimal part are queried to obtain the grouping weights corresponding to each group of adjacent pixel sets; wherein the second query table records a second mapping relationship between different preset coordinates and different grouping weights.

16. The device according to claim 15, characterized in that The second query table is a second texture image, and the second texture image is an image generated by fitting the second mapping relationship. The generation module is specifically used to use the coordinates composed of the decimal part to perform quadratic linear interpolation on the second texture image to obtain a second interpolation result corresponding to the coordinates composed of the decimal part; and use the second interpolation result corresponding to the coordinates composed of the decimal part to determine the grouping weights corresponding to each group of adjacent pixel sets.