A method for image super-resolution
Through the image super-resolution method, low-resolution images are extracted and processed using resolution thresholds and color iteration models, solving the problems of high computational complexity and poor real-time performance in the prior art, and achieving higher quality image reconstruction.
Patent Information
- Application Number
- CN202411896744.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-12-23
AI Technical Summary
The existing image super-resolution method has high computational complexity and poor real-time performance, which limits its practical application scope.
A super-resolution method is proposed. By acquiring the original low-resolution image, determining the resolution threshold, generating a low-resolution data set, and using the color iterative model for iterative learning, obtaining the super-resolution factor, and finally using the super-resolution factor for image processing.
Recovering the pixel conditions of low-resolution image is achieved, color saturation is improved, pixel details are restored, and more accurate image reconstruction is achieved.
Smart Images

Figure CN119359552B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of image processing, and in particular relates to an image super-resolution method. Background Art
[0002] With the rapid development of information technology, electronic images have become an important means for people to transmit information. However, due to the inherent limitations of traditional digital imaging equipment, it is difficult to obtain ideal high-resolution images, so how to obtain higher-quality images has become an increasingly urgent issue. Image super-resolution technology, as an effective image restoration method, has successfully broken through the limitations of the physical imaging environment and can reconstruct high-quality images higher than the physical resolution of the imaging system from one or more low-resolution images at the lowest cost. It is the key to solving the above problems. However, the existing image super-resolution methods have high computational complexity, poor real-time performance, and limited practical application scope. Summary of the invention
[0003] In order to solve the above problems, the present invention proposes an image super-resolution method.
[0004] The technical solution of the present invention is: an image super-resolution method comprises the following steps:
[0005] S1, obtaining the original low-resolution image, determining the resolution threshold, and using the resolution threshold to generate a low-resolution data set;
[0006] S2, using the color iteration model to perform several iterations of learning on the low-resolution data set to obtain a super-resolution factor;
[0007] S3. Use the super-resolution factor to process the original low-resolution image.
[0008] Furthermore, S1 includes the following sub-steps:
[0009] S11, obtaining an original low-resolution image, performing sampling processing on the original low-resolution image, and determining the color value of each pixel;
[0010] S12, using a kernel function to perform feature processing on the color value of each pixel;
[0011] S13, mapping the color value of each pixel after feature processing to a high-dimensional space;
[0012] S14, generating a resolution threshold according to the high-dimensional space and tensor of each pixel;
[0013] S15. Pixels whose color values are less than the resolution threshold are taken as a low-resolution data set.
[0014] The beneficial effect of the above further scheme is: in the present invention, the image tensor is a multidimensional array used to represent image data, and its shape is (height, width, number of channels). The present invention uses the RGB three-color components of the pixel point as the input parameters of the kernel function, performs feature processing on the color value, and uses the color value and transparency after feature processing to form a high-dimensional space for the pixel point. Then, the present invention uses the high-dimensional space and tensor in the form of three-dimensional vectors to generate the resolution threshold of the entire image and extract the low-resolution data set.
[0015] Furthermore, in S12, the expression of the kernel function K is:
[0016] ; Where v represents the first hyperparameter of the Sigmoid kernel, u represents the second hyperparameter of the Sigmoid kernel, tanh(·) represents the activation function, r represents the red component corresponding to the color value of the pixel, g represents the green component corresponding to the color value of the pixel, and b represents the blue component corresponding to the color value of the pixel.
[0017] The beneficial effect of the above further solution is that in the present invention, the Sigmoid kernel includes hyperparameters such as v and c, which need to be adjusted and optimized during the model training process.
[0018] Furthermore, in S13, the expression of the high-dimensional space G of the pixel point is:
[0019] ; In the formula, z represents the color value of the pixel after feature processing, and t represents the transparency of the pixel after feature processing.
[0020] Furthermore, in S14, the calculation formula of the resolution threshold S is:
[0021] Where G j Represents the high-dimensional space of the j-th pixel, Z j represents the tensor of the j-th pixel, ||·||2 represents the F2 norm operation, × represents the outer product operation of the vector, and J represents the number of pixels in the original low-resolution image.
[0022] Furthermore, S2 includes the following sub-steps:
[0023] S21, calculating the standard deviation of the color values of all pixels in the low-resolution data set as the initial value of color iteration;
[0024] S22, constructing a color iteration model, and using the color iteration model to calculate the color balance between the low-resolution data set and the original low-resolution image. If the color balance is greater than or equal to the color iteration initial value, the color iteration initial value is used as a super-resolution factor, otherwise, proceeding to S23;
[0025] S23, randomly selecting color values of half of the pixels from the low-resolution data set and copying them as the latest low-resolution data set, and using the color iteration model to calculate the color balance between the latest low-resolution data set and the original low-resolution image;
[0026] S24, repeat step S23 until the color balance is greater than or equal to the color iteration initial value, and use the color balance at this time as a super-resolution factor.
[0027] The beneficial effect of the above further scheme is that in the present invention, for color images, the pixels of the low-resolution image may have less color information, which is specifically manifested as reduced color saturation of the image and insufficient smoothness of color transition. The present invention determines the super-resolution factor according to the color balance between the low-resolution data set and the original low-resolution image, and when the color balance is less than the color iteration value, expands the elements of the low-resolution data set to increase the range of the set until the color balance is greater than or equal to the color iteration initial value, and determines the super-resolution factor.
[0028] Furthermore, in S22, the expression of the color iteration model D is:
[0029] ; In the formula, Represents the color value of the first pixel in the low-resolution dataset. Represents the color value of the kth pixel in the low-resolution dataset, represents the color value of the Kth pixel in the low-resolution dataset, C1 represents the color value of the first pixel in the original low-resolution image, and C j Represents the color value of the jth pixel in the original low-resolution image, C J represents the color value of the Jth pixel in the original low-resolution image, K represents the number of pixels in the low-resolution dataset, J represents the number of pixels in the original low-resolution image, max(·) represents the maximum value function, and ε represents the learning rate of the color iteration model.
[0030] Furthermore, S3 includes the following sub-steps:
[0031] S31, generating a scaling factor according to the super-resolution factor;
[0032] S32. Based on the scaling factor, the original low-resolution image is processed using a Lanczos interpolation method.
[0033] Furthermore, in S31, the calculation formula of the scaling factor a is:
[0034] ; In the formula, A represents the super-resolution factor, c represents a constant, Indicates rounding up.
[0035] The beneficial effect of the above further scheme is: in the present invention, Lanczos interpolation is a common pixel interpolation algorithm, and the interpolation result is obtained by constructing a Lanczos filter to complete the image super-resolution processing. The scaling factor is a key parameter of Lanczos interpolation and is used to specify the multiple of image magnification. The selection of the scaling factor should be determined according to actual needs. An excessively large scaling factor may lead to a decrease in image quality.
[0036] The beneficial effects of the present invention are as follows: the present invention proposes an image super-resolution method, extracts a resolution threshold for the original low-resolution image, the resolution threshold combines the high-dimensional space and tensor of the pixel points, and takes the pixel points whose color values are less than the resolution threshold as the low-resolution data set; by expanding the capacity of the low-resolution data set, a super-resolution factor representative of the color value is obtained, and a specific scaling factor is generated for the original low-resolution image using the super-resolution factor to complete the image super-resolution processing. The present invention can restore the pixel conditions of the low-resolution image, improve the color saturation, restore the details of the pixel, and achieve more accurate image reconstruction. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 Flowchart of the image super-resolution method. DETAILED DESCRIPTION
[0038] The embodiments of the present invention will be further described below in conjunction with the accompanying drawings.
[0039] like Figure 1 As shown, the present invention provides an image super-resolution method, comprising the following steps:
[0040] S1, obtaining the original low-resolution image, determining the resolution threshold, and using the resolution threshold to generate a low-resolution data set;
[0041] S2, using the color iteration model to perform several iterations of learning on the low-resolution data set to obtain a super-resolution factor;
[0042] S3. Use the super-resolution factor to process the original low-resolution image.
[0043] In this embodiment of the present invention, S1 includes the following sub-steps:
[0044] S11, obtaining an original low-resolution image, performing sampling processing on the original low-resolution image, and determining the color value of each pixel;
[0045] S12, using a kernel function to perform feature processing on the color value of each pixel;
[0046] S13, mapping the color value of each pixel after feature processing to a high-dimensional space;
[0047] S14, generating a resolution threshold according to the high-dimensional space and tensor of each pixel;
[0048] S15. Pixels whose color values are less than the resolution threshold are taken as a low-resolution data set.
[0049] In the present invention, an image tensor is a multidimensional array used to represent image data, and its shape is (height, width, number of channels). The present invention uses the RGB three-color components of the pixel point as the input parameters of the kernel function, performs feature processing on the color value, and uses the color value and transparency after feature processing to form a high-dimensional space for the pixel point. Next, the present invention uses the high-dimensional space and tensor in the form of three-dimensional vectors to generate the resolution threshold of the entire image and extract the low-resolution data set.
[0050] In the embodiment of the present invention, in S12, the expression of the kernel function K is:
[0051] ; Where v represents the first hyperparameter of the Sigmoid kernel, u represents the second hyperparameter of the Sigmoid kernel, tanh(·) represents the activation function, r represents the red component corresponding to the color value of the pixel, g represents the green component corresponding to the color value of the pixel, and b represents the blue component corresponding to the color value of the pixel.
[0052] In the present invention, the Sigmoid kernel includes hyperparameters such as v and c, which need to be adjusted and optimized during the model training process.
[0053] In the embodiment of the present invention, in S13, the expression of the high-dimensional space G of the pixel point is:
[0054] ; In the formula, z represents the color value of the pixel after feature processing, and t represents the transparency of the pixel after feature processing.
[0055] In the embodiment of the present invention, in S14, the calculation formula of the resolution threshold S is:
[0056] Where G j Represents the high-dimensional space of the j-th pixel, Z j represents the tensor of the j-th pixel, ||·||2 represents the F2 norm operation, × represents the outer product operation of the vector, and J represents the number of pixels in the original low-resolution image.
[0057] In this embodiment of the present invention, S2 includes the following sub-steps:
[0058] S21, calculating the standard deviation of the color values of all pixels in the low-resolution data set as the initial value of color iteration;
[0059] S22, constructing a color iteration model, and using the color iteration model to calculate the color balance between the low-resolution data set and the original low-resolution image. If the color balance is greater than or equal to the color iteration initial value, the color iteration initial value is used as a super-resolution factor, otherwise, proceeding to S23;
[0060] S23, randomly selecting color values of half of the pixels from the low-resolution data set and copying them as the latest low-resolution data set, and using the color iteration model to calculate the color balance between the latest low-resolution data set and the original low-resolution image;
[0061] S24, repeat step S23 until the color balance is greater than or equal to the color iteration initial value, and use the color balance at this time as a super-resolution factor.
[0062] In the present invention, for color images, the pixels of low-resolution images may have less color information, which is specifically manifested as reduced color saturation of the image and less smooth color transition. The present invention determines the super-resolution factor based on the color balance between the low-resolution data set and the original low-resolution image, and when the color balance is less than the color iteration value, expands the elements of the low-resolution data set to increase the range of the set until the color balance is greater than or equal to the color iteration initial value, and determines the super-resolution factor.
[0063] In the embodiment of the present invention, in S22, the expression of the color iteration model D is:
[0064] ; In the formula, Represents the color value of the first pixel in the low-resolution dataset. Represents the color value of the kth pixel in the low-resolution dataset, represents the color value of the Kth pixel in the low-resolution dataset, C1 represents the color value of the first pixel in the original low-resolution image, and C j Represents the color value of the jth pixel in the original low-resolution image, C J represents the color value of the Jth pixel in the original low-resolution image, K represents the number of pixels in the low-resolution dataset, J represents the number of pixels in the original low-resolution image, max(·) represents the maximum value function, and ε represents the learning rate of the color iteration model.
[0065] In this embodiment of the present invention, S3 includes the following sub-steps:
[0066] S31, generating a scaling factor according to the super-resolution factor;
[0067] S32. Based on the scaling factor, the original low-resolution image is processed using a Lanczos interpolation method.
[0068] In the embodiment of the present invention, in S31, the calculation formula of the scaling factor a is:
[0069] ; In the formula, A represents the super-resolution factor, c represents a constant, Indicates rounding up.
[0070] In the present invention, Lanczos interpolation is a common pixel interpolation algorithm. By constructing a Lanczos filter, an interpolation result is obtained to complete image super-resolution processing. The scaling factor is a key parameter of Lanczos interpolation and is used to specify the multiple of image magnification. The selection of the scaling factor should be determined according to actual needs. An excessively large scaling factor may lead to a decrease in image quality.
[0071] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.
Claims
1. An image super-resolution method, characterized in that: The following steps are involved: S1, obtaining the original low-resolution image, determining the resolution threshold, and using the resolution threshold to generate a low-resolution data set; S2, using the color iteration model to perform several iterations of learning on the low-resolution data set to obtain a super-resolution factor; S3, using super-resolution factors to process the original low-resolution image; The S2 comprises the following sub-steps: S21, calculating the standard deviation of the color values of all pixels in the low-resolution data set as the initial value of color iteration; S22, constructing a color iteration model, and using the color iteration model to calculate the color balance between the low-resolution data set and the original low-resolution image. If the color balance is greater than or equal to the color iteration initial value, the color iteration initial value is used as a super-resolution factor, otherwise, proceeding to S23; S23, randomly selecting color values of half of the pixels from the low-resolution data set and copying them as the latest low-resolution data set, and using the color iteration model to calculate the color balance between the latest low-resolution data set and the original low-resolution image; S24, repeat step S23 until the color balance is greater than or equal to the color iteration initial value, and use the color balance at this time as a super-resolution factor.
2. The image super-resolution method according to claim 1, characterized in that: The S1 comprises the following sub-steps: S11, obtaining an original low-resolution image, performing sampling processing on the original low-resolution image, and determining the color value of each pixel; S12, using a kernel function to perform feature processing on the color value of each pixel; S13, mapping the color value of each pixel after feature processing to a high-dimensional space; S14, generating a resolution threshold according to the high-dimensional space and tensor of each pixel; S15. Pixels whose color values are less than the resolution threshold are taken as a low-resolution data set.
3. The image super-resolution method according to claim 2, characterized in that: In S12, the expression of the kernel function K is: ; Where v represents the first hyperparameter of the Sigmoid kernel, u represents the second hyperparameter of the Sigmoid kernel, tanh(·) represents the activation function, r represents the red component corresponding to the color value of the pixel, g represents the green component corresponding to the color value of the pixel, and b represents the blue component corresponding to the color value of the pixel.
4. The image super-resolution method according to claim 2, characterized in that: In S13, the expression of the high-dimensional space G of the pixel point is: ; In the formula, z represents the color value of the pixel after feature processing, and t represents the transparency of the pixel after feature processing.
5. The image super-resolution method according to claim 2, characterized in that: In S14, the calculation formula of the resolution threshold S is: Where G j Represents the high-dimensional space of the j-th pixel, Z j represents the tensor of the j-th pixel, ||·||2 represents the F2 norm operation, × represents the outer product operation of the vector, and J represents the number of pixels in the original low-resolution image.
6. The image super-resolution method according to claim 1, characterized in that: In S22, the expression of the color iteration model D is: ; In the formula, Represents the color value of the first pixel in the low-resolution dataset. Represents the color value of the kth pixel in the low-resolution dataset, represents the color value of the Kth pixel in the low-resolution dataset, C1 represents the color value of the first pixel in the original low-resolution image, and C j Represents the color value of the jth pixel in the original low-resolution image, C J represents the color value of the Jth pixel in the original low-resolution image, K represents the number of pixels in the low-resolution dataset, J represents the number of pixels in the original low-resolution image, max(·) represents the maximum value function, and ε represents the learning rate of the color iteration model.
7. The image super-resolution method according to claim 1, characterized in that: The S3 comprises the following sub-steps: S31, generating a scaling factor according to the super-resolution factor; S32. Based on the scaling factor, the original low-resolution image is processed using a Lanczos interpolation method.
8. The image super-resolution method according to claim 7, characterized in that: In S31, the calculation formula of the scaling factor a is: ; In the formula, A represents the super-resolution factor, c represents a constant, Indicates rounding up.
Citation Information
Patent Citations
Residual instance regression super-resolution reconstruction method based on multistage dictionary learning
CN108550111A
Visual color compensation method and device and computer readable storage medium
CN115941912A