Lanczos2-based adaptive panoramic picture interpolation method
By adjusting the sampling weight according to the panoramic image information density in the Lanczos2 interpolation method and combining with the high-frequency filter optimization algorithm, the problems of large deviations in interpolation low-latitude information and poor interpolation effect in the prior art are solved, and a better super-segment image effect is achieved.
Patent Information
- Application Number
- CN202311785591.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-22
- Publication Date
- 2025-06-24
AI Technical Summary
The existing Lanczos2 interpolation method is difficult to adapt to weight adjustment when processing complex edge features, resulting in poor interpolation effect, especially lacking targeted improvements in panoramic image processing.
The sampling weight is adjusted based on the different information density of the panoramic picture, and the edge situation is filtered through high-frequency filters, the adaptive Lanczos algorithm is adjusted, the sampling pixel point weight is optimized, and the edge features and smooth content areas are enhanced.
Super-segment images with smoother surfaces and sharper edges are achieved, and panoramic image interpolation effect is improved, and high-latitude pixels are avoided dilution of central pixel information.
Smart Images

Figure CN120198280A_ABST
Abstract
Description
Technical Field:
[0001] The present invention relates to an adaptive panoramic image interpolation method based on Lanczos2 and belongs to the field of real image processing. Background Art:
[0002] Lanczos2 is a high-frequency filter commonly used in image processing for upsampling images. It is named after the Hungarian mathematician Cornelius Lanczos and is a variant of the Lanczos filter. Compared with simple resampling methods such as bilinear or nearest neighbor interpolation, it can better improve the quality of resampled images.
[0003]
[0004] The above formula is the function expression of the Lanczos2 function. Compared with other simple interpolation methods, its weight transition is smoother, and there are negative weights to handle edge features. At the same time, the simple formula enables it to obtain excellent interpolation super-resolution results through faster calculation speed.
[0005] However, its fixed formula is difficult to make adaptive weight adjustments for relatively complex edge feature situations, so it is difficult to achieve better interpolation super-resolution effects. At the same time, it is based on the premise of equal pixel importance and lacks targeted modification for situations such as panoramic images. Summary of the Invention:
[0006] Based on the premise of different information densities of panoramic images, the present invention adjusts the sampling weights according to the pixel information content at different positions, and at the same time screens the edge situations through a high-frequency filter to adjust the adaptive Lanczos algorithm, obtaining a super-resolution image with a smoother surface and sharper edges, while increasing the correctness of panoramic image information in the panoramic preview state. Continuously iterate all pixels to be filled, so as to realize the sampling generation of all pixels, and finally complete the interpolation super-resolution processing of the entire image, thereby aborting the algorithm. The panoramic image interpolation method based on Lanczos2 adopted by the present invention can effectively solve the problems of large deviation of low-dimensional information in ordinary Lanczos2 interpolation and poor interpolation effect of panoramic images.
[0007] The technical solution of the present invention is as follows:
[0008] The panoramic image interpolation method based on Lanczos2 is an improved method on the basis of the image interpolation method based on Lanczos2 and is a method for panoramic image interpolation super-resolution. The implementation steps are as follows:
[0009] (1) Select the filling point P0 in the high-resolution image to be filled, select the surrounding 12 pixel points as sampling points, convert the sampling point coordinates to the coordinate system with the center of the panoramic image as the origin, and then divide the 12 pixels into 4 groups.
[0010] (2) Calculate the edge feature Feature according to the edge feature formula, and determine o according to the derived linear relationship between Feature and the variable o of the Lanczos2 function, so as to determine the Lanczos2 function.
[0011] (3) Take the distance between the 5 pixels in this group and the central pixel as the independent variable, determine the initial weight w0 of the current point in the Lanczos2 function, compare the latitude of the central point and the current pixel, the farther away from the equator line of the whole image, the smaller its influence, and multiply its weight by the influence factor as the corrected weight w j .
[0012] (4) Traverse the framed 12 pixel points respectively, integrate the weights of four parts for each pixel point, and obtain the integrated weight w of the current pixel point c , compare the latitudes of the sampled pixel point and the target pixel point, the closer to the equator line of the whole image, the greater the influence on the target pixel, multiply the integrated weight by the influence factor as the final weight w r .
[0013] (5) Perform bilinear interpolation on the 12 pixel points to obtain the true value of the current target pixel point, and continue to iterate all the pixels to be filled, so as to obtain the interpolated whole image.
[0014] The beneficial effects of the present invention are as follows:
[0015] The key to the adaptive panoramic interpolation method lies in the targeted adjustment of the weight function in the surrounding area of the pixel and the optimization of the panoramic picture. Through the adaptive algorithm based on Lanczos2, the present invention automatically adjusts the weight function according to the image edge feature, thereby optimizing the weight of the sampled pixel point, strengthening the edge feature in a targeted manner, smoothing the content area, and at the same time making a targeted weight adjustment to the panoramic picture, avoiding the dilution effect of high-latitude pixels on the central pixel information. It performs interpolation according to the pixel area feature and the panoramic picture feature in a targeted manner, and has a good improvement in the interpolation effect. Description of the drawings:
[0016] Figure 1 The algorithm flowchart of the panoramic picture interpolation method based on Lanczos2;
[0017] Figure 2 The pixel sampling selection and grouping method of the panoramic picture interpolation method based on Lanczos2;
[0018] Figure 3Lanczos2 function graph of the panoramic image interpolation method based on Lanczos2; Detailed implementation method:
[0019] The present invention will be further described in detail below with reference to the accompanying drawings.
[0020] As Figure 1 is the algorithm flowchart of the panoramic image interpolation method based on Lanczos2. The implementation steps of the adaptive panoramic image interpolation algorithm based on Lanczos2 are as follows:
[0021] (1) Select the filling point P0 in the high-resolution image to be filled, frame 12 surrounding pixels as sampling points, convert the sampling point coordinates to the coordinate system with the center of the whole image as the origin, and divide the 12 pixels into 5 groups in the form of 5 pixels per group.
[0022] (2) Calculate the edge feature Feature according to the edge feature formula, and determine o according to the derived linear relationship between Feature and the variable o of the Lanczos2 function, so as to determine the Lanczos2 function.
[0023] (3) Take the distance between the 5 pixels in this group and the center pixel as the independent variable, determine the initial weight w0 of the current point in the Lanczos2 function, compare the latitude of the center point and the current pixel, the more deviated from the equator line of the whole image, the smaller its influence, and multiply its weight by the influence factor as the corrected weight.
[0024] (4) Traverse the 12 pixel points respectively, integrate four parts of weights for each pixel point to obtain the integrated weight w of the current pixel point c , compare the latitude of the sampled pixel point and the target pixel point, the closer to the equator line of the whole image, the greater the influence on the target pixel, and multiply the integrated weight by the influence factor as the final weight w r .
[0025] (5) Perform bilinear interpolation on the 12 pixel points to obtain the true value of the current target pixel point.
[0026] (6) Continuously iterate all the pixels to be filled to obtain the interpolated whole image.
[0027] 1. The step (1) corresponds to the pixel framing part in the adaptive panoramic image interpolation method based on Lanczos2.
[0028] The pixel framing method is the tic-tac-toe selection method, as shown in the attached Figure 2 display, where the Q point is the target filling pixel point. For the pixel grouping method, it is grouped according to the attached Figure 2 into four groups: red, orange, yellow, and green, with 5 pixel points in each group.
[0029] 2. The part corresponding to the adaptive function calculation part in the adaptive panoramic image interpolation method based on Lanczos2 in step (2).
[0030] In the adaptive function calculation part, it is divided into 2 steps:
[0031] 1) Determine the edge feature of the current pixel point according to the 4 pixels of up, down, left and right. It is necessary to obtain the gray values of the corresponding four sampling point pixels of up, down, left and right, and then determine the edge feature Feature according to the gray change conditions in the vertical and horizontal directions, and map it to the [0, 1] interval. The formula is as follows:
[0032]
[0033]
[0034]
[0035] FX is the gray change situation in the x-axis direction, FY is the gray change situation in the y-axis direction, and Feature represents the edge condition state. The closer it is to 0, the smaller the possibility of being an edge, and the closer it is to 1, the greater the possibility of being an edge.
[0036] 2) After obtaining Feature, according to the approximated Lanczos2 function, the approximated Lanczos2 function can be adaptively adjusted to determine the function parameter o. The formula is as follows:
[0037]
[0038]
[0039] 3. The part corresponding to the weight calculation part in the adaptive panoramic image interpolation method based on Lanczos2 in step (3).
[0040] This part is divided into 2 steps:
[0041] 1) Determine the initial weight according to the Lanczos2 function. The formula is as follows:
[0042]
[0043] L(x) is the adaptive Lanczos2 function, o is the adaptive parameter, and x is the distance between the current sampling pixel and the target pixel.
[0044] 2) Compare the latitude differences of the corresponding center points and correct the corresponding weights. The correction operator is derived according to the generation method of the equidistant cylindrical projection of the sphere. The formula is as follows:
[0045]
[0046] Where W is the width of the whole image, y c is the ordinate of the central pixel, y is the ordinate of the sampled pixel, and w0 is the initial weight.
[0047] 4. The step (4) corresponds to the weight integration part in the adaptive panoramic image interpolation method based on Lanczos2.
[0048] This part is divided into 2 steps:
[0049] 1) Integrate the weights of four groups. Since the coordinates are usually decimals after calculation, the top-left first grid pixel point is selected as the coordinate origin, and the integrated weight w of the current sampled pixel point is calculated through the coordinate deviation c , and the formula is as follows:
[0050] x0 = floor(x c )
[0051] y0 = floor(y c )
[0052] w c = w1*(1 - x0)*(1 - y0) + w2*(x0)*(1 - y0) + w3*(1 - x0)*(y0) + w4*(x0)*(y0)
[0053] Where x0 is the floor of the x-axis coordinate of the target pixel, y0 is the floor of the y-axis coordinate of the target pixel, w1 is the top-left cross group, w2 is the top-right cross group, w3 is the bottom-right cross group, and w4 is the bottom-left cross group.
[0054] 2) Similar to the single-point weight integration part, the weight of each sampled pixel point is corrected using a correction operator according to the latitude difference from the central pixel point, and the formula is as follows:
[0055]
[0056] Where W is the width of the whole image, y c is the ordinate of the target pixel, y is the ordinate of the sampled pixel, and w c is the initial weight.
[0057] 5. The step (5) corresponds to the bilinear interpolation part in the adaptive panoramic image interpolation method based on Lanczos2.
[0058]
[0059] Where P0 is the pixel to be filled, P iFor the 12 sampled pixel points, w ri is the final weight of the corresponding sampled pixel point.
Claims
1. The adaptive panoramic image interpolation method based on Lanczos2 is a method for super-resolution interpolation of panoramic images. The implementation steps of the adaptive panoramic image interpolation algorithm based on Lanczos2 are as follows: (1) Select the filling point P0 in the filled high-resolution image, frame 12 surrounding pixels as sampling points, convert the sampling point coordinates to the coordinate system with the center of the whole image as the origin, and divide the 12 pixels into 5 groups in the form of 5 pixels per group. (2) Calculate the edge feature Feature according to the edge feature formula, and determine o according to the derived linear relationship between Feature and the variable o of the Lanczos2 function, so as to determine the Lanczos2 function. (3) Take the distance from the 5 pixels in this group to the central pixel as the independent variable, determine the initial weight w0 of the current point in the Lanczos2 function, compare the latitude of the central point and the current pixel, the more deviated from the equator line of the whole image, the smaller its influence, and multiply its weight by the influence factor as the corrected weight. (4) Traverse the 12 pixel points respectively, integrate the four parts of weights for each pixel point, and obtain the integrated weight w of the current pixel point c , compare the latitudes of the sampled pixel point and the target pixel point. The closer it is to the equator line of the whole image, the greater the impact on the target pixel. Multiply the integrated weight by the influence factor as the final weight w r . (5) Perform bilinear interpolation on the 12 pixel points to obtain the true value of the current target pixel point. (6) Continuously iterate all the pixels to be filled, so as to obtain the interpolated whole image.
2. The pixel framing part corresponding to the adaptive panoramic image interpolation method based on Lanczos2 in step (1) as claimed in claim 1. The pixel framing method is the tic-tac-toe selection method, and at the same time, the target pixel point is placed at the first intersection point in the upper left corner of the tic-tac-toe. For the pixel grouping method, a cross is drawn with the four pixels in the center of the tic-tac-toe as the center respectively for grouping, with 5 pixel points in each group.
3. The adaptive function calculation part corresponding to the adaptive panoramic image interpolation method based on Lanczos2 in step (2) as claimed in claim 1. In the adaptive function calculation part, it is divided into 2 steps: 1) Determine the edge feature of the current pixel point according to the 4 pixels above, below, left and right, determine the edge feature Feature according to the gray level change conditions in the vertical and horizontal directions, and then map it to the range of [0, 1] through the formula: FX is the gray level change in the x-axis direction, FY is the gray level change in the y-axis direction, and Feature represents the edge condition state. The closer it is to 0, the less likely it is to be an edge, and the closer it is to 1, the more likely it is to be an edge. 2) After obtaining Feature, determine the function parameter o according to the approximated Lanczos2 function, and the formula is as follows:
4. The weight calculation part corresponding to the adaptive panoramic image interpolation method based on Lanczos2 in step (3) as claimed in claim 1. This part is divided into 2 steps: 1) Determine the initial weight according to the Lanczos2 function, and the formula is as follows: L(x) is the adaptive Lanczos2 function, and o is the adaptive parameter. 2) Compare the latitude difference corresponding to the central point and correct the corresponding weight, and the formula is as follows: where W is the width of the whole image, y c is the ordinate of the central pixel, y is the ordinate of the sampled pixel, and w0 is the initial weight.
5. The weight integration part corresponding to the adaptive panoramic image interpolation method based on Lanczos2 in step (4) as claimed in claim 1. This part is divided into 2 steps: 1) Integrate the weights of the four groups and calculate the integrated weight w of the current sampled pixel point according to the deviation of the target pixel point c , and the formula is as follows: x0 = floor(x c ) y0 = floor(y c ) w c = w1 * (1 - x0) * (1 - y0) + w2 * (x0) * (1 - y0) + w3 * (1 - x0) * (y0) + w4 * (x0) * (y0) Where x0 is the floor value of the x-axis coordinate of the target pixel, y0 is the floor value of the y-axis coordinate of the target pixel, w1 is the upper-left cross grouping, w2 is the upper-right cross grouping, w3 is the lower-right cross grouping, and w4 is the lower-left cross grouping. 2) Correct the weight of each sampled pixel point according to the latitude difference from the central pixel point. The formula is as follows: where W is the width of the whole image, y c is the ordinate of the target pixel, y is the ordinate of the sampled pixel, and w c is the initial weight.
6. The bilinear interpolation part corresponding to step (5) in claim 1 in the adaptive panoramic image interpolation method based on Lanczos2 Among them, P0 is the pixel to be filled, P i are 12 sampled pixel points, w ri is the final weight of the corresponding sampled pixel point.