A method, system, storage medium, and apparatus for image scaling optimization

By combining image grayscale processing and interpolation algorithms with weighted coefficient optimization for image scaling, the noise problem during image scaling is solved, and high-quality image output is achieved.

CN116091306BActive Publication Date: 2026-11-24SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310275530.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-17
Publication Date
2026-11-24
Estimated Expiration
2043-03-17

AI Technical Summary

Technical Problem

Existing image scaling methods introduce high-frequency noise at different resolutions, resulting in loss of image details and affecting visual experience.

Method used

The input image is converted to grayscale, an evaluation factor is calculated, and the image is scaled using nearest neighbor interpolation and bilinear interpolation algorithms. The average quality factor is calculated by combining specific weighting coefficients, and optimized pixels are selected to form a combined image until a set threshold is reached.

Benefits of technology

It effectively removes abnormal noise during image scaling, preserves image details, improves visual display effects, and outputs high-quality images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116091306B_ABST
    Figure CN116091306B_ABST
Patent Text Reader

Abstract

This invention provides a method, system, storage medium, and device for image scaling optimization. The method includes: converting an input image to grayscale and calculating its evaluation factor; scaling the input image using nearest neighbor interpolation and bilinear interpolation to obtain a first image and a second image; calculating the corresponding evaluation factor for the first image and the second image respectively; calculating the average quality factor of each pixel in the first image and the second image according to the value of the evaluation factor and a specific weight coefficient; selecting pixels with larger average quality factors in the first image and the second image to form a combined image and calculating its evaluation factor; and comparing the evaluation factors of the input image and the combined image. If the average difference is greater than a set threshold, the combined image is determined not to have reached the expected optimization level. The weight coefficients are adjusted, and the average quality factor is calculated again to obtain a new combined image until the average difference between the combined image and the input image reaches the set threshold.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of imaging technology, and more specifically to a method, system, storage medium, and device for image scaling optimization. Background Technology

[0002] With the development of multimedia technology, various algorithms have emerged for image processing and optimization. Among these, the Baseboard Management Controller (BMC) chip in a server needs to connect to the server's VGA interface to capture real-time image data. For outputs at different resolutions, the BMC chip needs to scale the image to the client's screen to support its display. However, during image capture and output, the scaling of the output image using algorithms often introduces image display noise, resulting in poor visual presentation and negatively impacting the user experience.

[0003] Existing image and video scaling methods generally include linear interpolation and nearest-neighbor interpolation. After scaling, filtering is typically performed to remove noise from the image. Low-pass filters are often used after scaling to remove noise and optimize the image.

[0004] Existing technologies, when scaling images, will produce certain high-frequency noise at different resolutions. The traditional method is to use a low-pass filter to remove the high-frequency noise. However, the filter will also cause some high-frequency information in the image to be lost, resulting in the loss of some details after the image is scaled, which will affect the human visual perception to some extent.

[0005] Therefore, to address this problem, a better image scaling optimization mode needs to be proposed to optimize and adjust the scaled image for images with different frequency distributions, solve the problem of abnormal image noise that occurs during the scaling process, and output a higher quality image. Summary of the Invention

[0006] In view of this, the purpose of this invention is to propose an improved method, system, storage medium and device for image scaling optimization, so as to optimize and adjust the scaled image for images with different frequency distributions, solve the problem of abnormal image noise that occurs during the scaling process, and output a higher quality image.

[0007] To achieve the above objectives, in one respect, the present invention provides a method for image scaling optimization, wherein the method includes:

[0008] The input image is converted to grayscale and its evaluation factor is calculated.

[0009] The input image is scaled using the nearest neighbor interpolation algorithm to obtain a first image, and the input image is scaled using the bilinear interpolation algorithm to obtain a second image;

[0010] Calculate the corresponding evaluation factors for the first image and the second image respectively;

[0011] The average quality factor of each pixel in the first image and the second image is calculated according to the value of the evaluation factor and a specific weighting coefficient.

[0012] Pixels with higher average quality factors in the first and second images are selected and combined to form a combined image, and the evaluation factor of this combined image is calculated; and

[0013] The evaluation factors of the input image and the combined image are compared. If the average difference is greater than a set threshold, the combined image is determined not to have reached the expected optimization level. The weight coefficients are adjusted and the average quality factor is calculated to obtain a new combined image until the average difference between the combined image and the input image reaches the set threshold.

[0014] In some embodiments of the image scaling optimization method according to the present invention, the evaluation factors include mean, standard deviation, and average gradient.

[0015] The formula for calculating the mean is as follows:

[0016]

[0017] The formula for calculating the standard deviation is:

[0018]

[0019] The formula for calculating the average gradient is:

[0020]

[0021] The image being evaluated is F, and its size is MN.

[0022] In some embodiments of the image scaling optimization method according to the present invention, the formula for calculating the average quality factor is:

[0023] K=-m×G×abs(P(j,k)-P(j-1,k-1))+n×S×sqrt(abs(P(j,k)-Avg)))+o×Avg×P(j,k)

[0024] Where m, n, and o are the specific weighting coefficients, G is the average gradient, S is the standard deviation, Avg is the mean, (j, k) are the pixel coordinates corresponding to the grayscale image, abs is the absolute value and sqrt is the square root.

[0025] In some embodiments of the image scaling optimization method according to the present invention, the adjustment of the weighting coefficients is automatically configured according to predetermined rules or manually configured via an external control bus.

[0026] In another aspect, the present invention provides a system for optimizing image scaling, comprising:

[0027] The first evaluation module is used to perform grayscale processing on the input image and calculate the evaluation factor of the input image;

[0028] A scaling processing module is used to scale the input image using a nearest neighbor interpolation algorithm to obtain a first image and to scale the input image using a bilinear interpolation algorithm to obtain a second image.

[0029] The second evaluation module is used to calculate the corresponding evaluation factors for the first image and the second image respectively.

[0030] An average quality factor calculation module is used to calculate the average quality factor of each pixel in the first image and the second image according to the value of the evaluation factor and a specific weighting coefficient.

[0031] A combination module is used to select pixels with larger average quality factors from the first image and the second image, combine them into a combined image, and calculate the evaluation factor of the combined image; and

[0032] The comparison module is used to compare the evaluation factors of the input image and the combined image. If the average difference is greater than a set threshold, it is determined that the combined image has not reached the expected optimization level. The weight coefficient is adjusted and the average quality factor is calculated to obtain a new combined image until the average difference between the combined image and the input image reaches the set threshold.

[0033] In some embodiments of the image scaling optimization system according to the present invention, the evaluation factors include mean, standard deviation, and average gradient.

[0034] The formula for calculating the mean is as follows:

[0035]

[0036] The formula for calculating the standard deviation is:

[0037]

[0038] The formula for calculating the average gradient is:

[0039]

[0040] The image being evaluated is F, and its size is MN.

[0041] In some embodiments of the image scaling optimization system according to the present invention, the average quality factor is calculated using the following formula:

[0042] K=-m×G×abs(P(j,k)-P(j-1,k-1))+n×S×sqrt(abs(P(j,k)-Avg)))+o×Avg×P(j,k)

[0043] Where m, n, and o are the specific weighting coefficients, G is the average gradient, S is the standard deviation, Avg is the mean, (j, k) are the pixel coordinates corresponding to the grayscale image, abs is the absolute value and sqrt is the square root.

[0044] In some embodiments of the image scaling optimization system according to the present invention, the weighting coefficients are characterized in that the adjustment is automatically configured according to predetermined rules or manually configured via an external control bus.

[0045] In another aspect, the present invention provides a computer-readable storage medium storing computer program instructions that, when executed, implement any of the above-described image scaling optimization methods according to the present invention.

[0046] In another aspect, the present invention provides a computer device including a memory and a processor, the memory storing a computer program which, when executed by the processor, performs any of the above-described image scaling optimization methods according to the present invention.

[0047] The present invention has at least the following beneficial technical effects: The present invention proposes a method for adaptive optimization and denoising for different image scaling. For images with different frequency distributions, the scaled images are optimized and adjusted to solve the problem of abnormal image noise that occurs during the scaling process and the problem that traditional filters may cause detail distortion in the image. The output is a higher quality image, which can improve the quality of image scaling in BMC chips, bring better visual display effects, and improve product quality. Attached Figure Description

[0048] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained based on these drawings without creative effort.

[0049] In the diagram:

[0050] Figure 1 A schematic block diagram illustrating an embodiment of the image scaling optimization method according to the present invention is shown;

[0051] Figure 2 This is a flowchart illustrating the image scaling optimization method 100 according to the present invention;

[0052] Figure 3 A schematic diagram illustrating an application example of the image scaling optimization method according to the present invention is shown;

[0053] Figure 4 A diagram illustrating the distribution of the difference between K1 and K2 values ​​(K1-K2) of all pixels in a first and second image in an application example of the image scaling optimization method according to the present invention is shown.

[0054] Figure 5 A schematic diagram illustrating another application example of the image scaling optimization method according to the present invention is shown;

[0055] Figure 6 A schematic block diagram of one embodiment of an image scaling optimization system according to the present invention is shown;

[0056] Figure 7 A schematic diagram illustrating an embodiment of a computer-readable storage medium for implementing an image scaling optimization method according to the present invention is shown;

[0057] Figure 8 A schematic diagram of the hardware structure of an embodiment of a computer device for implementing an image scaling optimization method according to the present invention is shown. Detailed Implementation

[0058] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to specific examples and the accompanying drawings.

[0059] It should be noted that all uses of "first" and "second" in the embodiments of the present invention are for the purpose of distinguishing two different entities or different parameters with the same name. Therefore, "first" and "second" are merely for convenience of expression and should not be construed as limiting the embodiments of the present invention. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, such as other steps or units inherent in a process, method, system, product, or device that includes a series of steps or units.

[0060] In this invention, a first aspect provides a method 10 for image scaling optimization. Figure 1 A schematic block diagram illustrating an embodiment of the image scaling optimization method according to the present invention is shown. Figure 1 In the illustrated embodiment, the method includes:

[0061] Step S11: Convert the input image to grayscale and calculate the evaluation factor of the input image;

[0062] Step S12: Scale the input image using the nearest neighbor interpolation algorithm to obtain the first image, and then scale the input image using the bilinear interpolation algorithm to obtain the second image;

[0063] Step S13: Calculate the corresponding evaluation factors for the first image and the second image respectively;

[0064] Step S14: Calculate the average quality factor of each pixel in the first and second images according to the evaluation factor values ​​and specific weighting coefficients;

[0065] Step S15: Select the pixels with larger average quality factors in the first image and the second image, combine them into a combined image, and calculate the evaluation factor of the combined image.

[0066] Step S16: Compare the evaluation factors of the input image and the combined image. If the average difference is greater than the set threshold, it is determined that the third image has not reached the expected optimization level. Adjust the weight coefficient and continue to calculate the average quality factor to obtain a new combined image until the average difference between the combined image and the input image reaches the set threshold.

[0067] In some embodiments of the image scaling optimization method 100 according to the present invention, the evaluation factors include the mean, standard deviation, and average gradient.

[0068] The formula for calculating the mean is:

[0069]

[0070] The formula for calculating the standard deviation is:

[0071]

[0072] The formula for calculating the average gradient is:

[0073]

[0074] The image being evaluated is F, and its size is MN.

[0075] In the above embodiments, the following three evaluation methods were selected to process the optimized images:

[0076] (1) Mean: The mean refers to the average value of the image pixels. It reflects the average brightness of the image. The higher the average brightness, the better the image quality.

[0077] (2) Standard deviation: The standard deviation refers to the degree of dispersion of the gray values ​​of an image pixels relative to the mean. The larger the standard deviation, the more dispersed the gray levels in the image, and the better the image quality.

[0078] (3) Average gradient: The average gradient can reflect the detail contrast and texture transformation in the image, and it reflects the clarity of the image to a certain extent.

[0079] In some embodiments of the image scaling optimization method 100 according to the present invention, the formula for calculating the average quality factor is:

[0080] K=-m×G×abs(P(j,k)-P(j-1,k-1))+n×S×sqrt(abs(P(j,k)-Avg)))+o×Avg×P(j,k)

[0081] Where m, n, and o are specific weight coefficients, G is the average gradient, S is the standard deviation, Avg is the mean, (j, k) is the pixel coordinates corresponding to the grayscale image, abs is the absolute value and sqrt is the square root.

[0082] According to the image scaling optimization method 100 of the present invention, the adjustment of the weight coefficients is automatically configured according to a predetermined rule or manually configured through an external control bus.

[0083] Figure 2 This is a flowchart illustrating the image scaling optimization method 100 according to the present invention. Referring below... Figure 2 The image scaling optimization method 100 according to the present invention has the following processing flow:

[0084] (1) Perform grayscale processing on the input image P0 and calculate the mean Avg0, standard deviation S0 and average gradient G0 of the input image P0;

[0085] (2) The input image P0 is scaled by the nearest neighbor interpolation algorithm and the bilinear interpolation algorithm respectively to obtain the corresponding scaled first image P1 and second image P2;

[0086] (3) Calculate the mean Avg1, standard deviation S1 and average gradient G1 of the first image P1 after scaling by the nearest neighbor interpolation algorithm; calculate the mean Avg2, standard deviation S2 and average gradient G2 of the second image P2 after scaling by the bilinear interpolation algorithm.

[0087] (4) Calculate the average quality factors K1 and K2 of each pixel in the first image P1 and the second image P2 according to the values ​​of mean, standard deviation, and average gradient, using certain weighting coefficients m, n, and o. The calculation rules for average quality factors K1 and K2 are defined as follows:

[0088] K=-m×G×abs(P(j,k)-P(j-1,k-1))+n×S×sqrt(abs(P(j,k)-Avg)))+o×Avg×P(j,k)

[0089] Where j and k are the pixel coordinates corresponding to the grayscale image, abs is the absolute value, and sqrt is the square root.

[0090] (5) Select the pixels with the larger average quality factor K from the first image P1 and the second image P2, and combine them into a new combined image P3. Calculate the mean Avr3, standard deviation S3, and average gradient G3 of the combined image P3;

[0091] (6) Compare the Avr, S, and G of the input image P0 with the combined image P3. If the average difference is greater than the set threshold, it is determined that the image P3 has not reached the optimized level. Adjust the coefficients of m, n, and o and continue to calculate the K value to obtain a new image P3 until the average difference reaches the threshold level.

[0092] Figure 3 A schematic diagram illustrating an application example of the image scaling optimization method according to the present invention is shown below. Referring to... Figure 3 An application example of the image scaling optimization method according to the present invention is described.

[0093] The input image is the original image P0 to be scaled, with a resolution of 316×316. It is then enlarged to 512×512.

[0094] First, perform grayscale and normalization operations on image P0 to calculate the input image P0:

[0095] Avg0 = 0.4833, standard deviation S0 = 0.1998, and average gradient G0 = 0.0394;

[0096] The first image P1 is obtained by calculating the result after bilinear interpolation and amplification:

[0097] Avg1 = 0.4871, standard deviation S1 = 0.1959, and average gradient G1 = 0.0538;

[0098] The second image P2 is obtained by calculating the magnification after nearest neighbor interpolation:

[0099] Avg2 = 0.4873, standard deviation S2 = 0.1859 and mean gradient G2 = 0.0267;

[0100] Let m, n, and o be 0.8, 0.1, and 0.1 respectively. Calculate the average quality factors K1 and K2 values ​​of the grayscale pixels in the first image P1 and the second image P2. The distribution of the difference between K1 and K2 values ​​(K1-K2) for all pixels in the image is shown below. Figure 4 As shown.

[0101] Extract and combine the pixels corresponding to the larger values ​​of K1 and K2 into a new combined image P3, and calculate the evaluation factor of image P3:

[0102] Avg3 = 0.4940, standard deviation S3 = 0.1901, and average gradient G3 = 0.0378;

[0103] The scaling quality standard is met if the mean Avg3 error, standard deviation, and average gradient error of the scaled image are all within a threshold of 0.01.

[0104] Avg_diff=abs(Avg3-Avg0)<0.01

[0105] S_diff = abs(S3-S0) < 0.01

[0106] G_diff = abs(G3 - G0) < 0.01

[0107] If the above rules are met, then the selection of the m, n, and o coefficients is considered reasonable and meets the image quality standard after scaling.

[0108] If the calculated error is not within the set threshold range, the corresponding coefficients that do not meet the threshold standard need to be adjusted, the average quality factor needs to be recalculated, and a new combined image P3 needs to be formed until an image that meets the quality standard is obtained.

[0109] For example, when the calculated G_diff of the combined image P3 is greater than the set threshold of 0.015, i.e. G3-G0>0.01, the average gradient G of the combined image P3 can be reduced by increasing the coefficient m, so that G_diff is less than the set threshold.

[0110] Figure 5A schematic diagram illustrating another application example of the image scaling optimization method according to the present invention is shown.

[0111] As can be seen from the processing of the two images above, the image scaling optimization method in this paper preserves the texture details of the image as much as possible and eliminates some noise introduced by bilinear interpolation. Compared with the filtered image, the image display effect is better.

[0112] According to the image scaling optimization method 100 of the present invention, an adaptive optimization denoising method for different image scaling is used to optimize and adjust the scaled image for images with different frequency distributions, solve the problem of abnormal image noise that occurs during the scaling process, and output a higher quality image.

[0113] In a second aspect, the present invention also provides an image scaling optimization system 20. Figure 6 A schematic block diagram of an embodiment of an image scaling optimization system according to the present invention is shown. Figure 6 As shown, the system includes:

[0114] The first evaluation module 21 is used to perform grayscale processing on the input image and calculate the evaluation factor of the input image;

[0115] The scaling processing module 22 is used to scale the input image using the nearest neighbor interpolation algorithm to obtain a first image and to scale the input image using the bilinear interpolation algorithm to obtain a second image.

[0116] The second evaluation module 23 is used to calculate the corresponding evaluation factors for the first image and the second image respectively.

[0117] The average quality factor calculation module 24 is used to calculate the average quality factor of each pixel in the first image and the second image according to the value of the evaluation factor and a specific weighting coefficient.

[0118] The combination module 25 is used to select pixels with larger average quality factors from the first image and the second image, combine them into a combined image, and calculate the evaluation factor of the combined image; and

[0119] The comparison module 26 is used to compare the evaluation factors of the input image and the combined image. If the average difference is greater than the set threshold, it is determined that the third image has not reached the expected optimization level. The weight coefficient is adjusted and the average quality factor is calculated to obtain a new combined image until the average difference between the combined image and the input image reaches the set threshold.

[0120] The image scaling optimization system 20 described above according to the present invention can be implemented using hardware circuitry, which is relatively fast.

[0121] In some embodiments of the image scaling optimization system 200 according to the present invention, evaluation factors include mean, standard deviation, and average gradient.

[0122] The formula for calculating the mean is:

[0123]

[0124] The formula for calculating the standard deviation is:

[0125]

[0126] The formula for calculating the average gradient is:

[0127]

[0128] The image being evaluated is F, and its size is MN.

[0129] In some embodiments of the image scaling optimization system 200 according to the present invention, the formula for calculating the average quality factor is:

[0130] K=-m×G×abs(P(j,k)-P(j-1,k-1))+n×S×sqrt(abs(P(j,k)-Avg)))+o×Avg×P(j,k)

[0131] Where m, n, and o are specific weight coefficients, G is the average gradient, S is the standard deviation, Avg is the mean, (j, k) is the pixel coordinates corresponding to the grayscale image, abs is the absolute value and sqrt is the square root.

[0132] In some embodiments of the image scaling optimization system 200 according to the present invention, the adjustment of the weighting coefficients is automatically configured according to predetermined rules or manually configured via an external control bus. When the parameters m, n, and o are manually configured in the hardware via an external control bus, developers can obtain images with better scaling effects by manually adjusting them.

[0133] According to the image scaling optimization system 20 of the present invention, after the input image is grayscaled by the first evaluation module 21, the data is input to the scaling processing module 22 for nearest neighbor interpolation and bilinear interpolation. The first evaluation module 21, the second evaluation module 23, and the average quality factor calculation module 24 calculate the values ​​of S, G, Avg, and the average quality factor K, respectively. The combination module 25 selects the pixel values ​​to be used for combining the image. For images that do not meet the output results, the comparison module 26 adjusts the image output through the parameter adjustment unit, and finally outputs a scaled image that meets the requirements.

[0134] The image scaling optimization system 200 according to the present invention can adaptively optimize denoising for different image scaling, optimize and adjust the scaled image for images with different frequency distributions, solve the problem of abnormal image noise that occurs during the scaling process, and output a higher quality image.

[0135] A third aspect of the present invention also provides a computer-readable storage medium. Figure 7 A schematic diagram of a computer-readable storage medium illustrating an image scaling optimization method according to an embodiment of the present invention is shown. Figure 7 As shown, the computer-readable storage medium 300 stores computer program instructions 310, which can be executed by a processor. When executed, the computer program instructions 310 implement the method of any of the above embodiments.

[0136] It should be understood that, where there is no conflict, all the embodiments, features and advantages described above for the image scaling optimization method according to the present invention are equally applicable to the image scaling optimization system and storage medium according to the present invention.

[0137] A fourth aspect of the present invention also provides a computer device 400, including a memory 420 and a processor 410, wherein the memory stores a computer program, which, when executed by the processor, implements the method of any of the above embodiments.

[0138] like Figure 8 The diagram shown is a hardware structure schematic of an embodiment of a computer device for performing image scaling optimization according to the present invention. Figure 8 Taking the computer device 400 shown as an example, this computer device includes a processor 410 and a memory 420, and may also include an input device 430 and an output device 440. The processor 410, memory 420, input device 430, and output device 440 can be connected via a bus or other means. Figure 8 Taking a bus connection as an example, input device 430 can receive input digital or character information and generate signal inputs related to image scaling optimization. Output device 440 may include display devices such as a display screen.

[0139] Memory 420, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the resource monitoring method in this embodiment. Memory 420 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and application programs required for at least one function; the data storage area may store data created by the use of the resource monitoring method, etc. In addition, memory 420 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 420 may optionally include memory remotely located relative to processor 410, and these remote memories can be connected to the local module via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0140] The processor 410 executes various server functions and data processing by running non-volatile software programs, instructions, and modules stored in the memory 420, thereby implementing the resource monitoring method of the above method embodiment.

[0141] Those skilled in the art will also understand that the various exemplary logic blocks, modules, circuits, and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software, or a combination of both. To clearly illustrate this interchangeability between hardware and software, the functionality of various illustrative components, blocks, modules, circuits, and steps has been generally described. Whether this functionality is implemented as software or as hardware depends on the specific application and the design constraints imposed on the system as a whole. Those skilled in the art can implement the functionality in various ways for each specific application, but such implementation decisions should not be construed as departing from the scope of the embodiments disclosed herein.

[0142] Finally, it should be noted that the computer-readable storage medium (e.g., memory) described herein can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. By way of example, and not limitation, non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which can act as external cache memory. By way of example, and not limitation, RAM can be obtained in various forms, such as synchronous RAM (DRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The storage devices disclosed herein are intended to include, but are not limited to, these and other suitable types of memory.

[0143] The various exemplary logic blocks, modules, and circuits described herein can be implemented or performed using the following components designed to perform the functions herein: general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic, discrete hardware components, or any combination of these components. A general-purpose processor may be a microprocessor, but alternatively, the processor may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors combined with a DSP, and / or any other such configuration.

[0144] The above are exemplary embodiments disclosed in this invention. However, it should be noted that various changes and modifications can be made without departing from the scope of the embodiments of this invention as defined by the claims. The functions, steps, and / or actions of the methods according to the disclosed embodiments described herein do not need to be performed in any particular order. Furthermore, although the elements disclosed in the embodiments of this invention may be described or claimed individually, they may be understood as multiple unless explicitly limited to a singular number.

[0145] It should be understood that, as used herein, the singular form "a" is intended to include the plural form as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" refers to any and all possible combinations of one or more of the associatedly listed items. The embodiment numbers disclosed above are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0146] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the invention (including the claims) is limited to these examples. Within the framework of the invention, technical features of the above embodiments or different embodiments can be combined, and many other variations of different aspects of the invention exist, which are not provided in the details for the sake of brevity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the protection scope of the invention.

Claims

1. A method for optimizing image scaling, characterized in that, This includes a data processing step, which comprises the following steps: The input image is converted to grayscale and an evaluation factor for the input image is calculated. The evaluation factor includes the mean, standard deviation, and average gradient. The input image is scaled using the nearest neighbor interpolation algorithm to obtain a first image, and the input image is scaled using the bilinear interpolation algorithm to obtain a second image; Calculate the corresponding evaluation factors for the first image and the second image respectively; The average quality factor of each pixel in the first image and the second image is calculated according to the value of the evaluation factor and a specific weighting coefficient. For any image in the first image and the second image, the average quality factor is calculated according to the average gradient, standard deviation and mean of the image and the gray value of the corresponding pixel and its neighboring pixels in the image, according to the weighting coefficient. Pixels with higher average quality factors in the first and second images are selected and combined to form a combined image, and the evaluation factor of this combined image is calculated; and The evaluation factors of the input image and the combined image are compared. If the absolute difference between the input image and the combined image in any of the mean, standard deviation and average gradient is greater than the corresponding set threshold, it is determined that the combined image has not reached the expected optimization level. The weight coefficients are adjusted and the average quality factor is calculated to obtain a new combined image until the absolute difference between the combined image and the input image in the mean, standard deviation and average gradient is not greater than the corresponding set threshold. The formula for calculating the average quality factor is as follows: K = - m×G×abs(P(j,k)-P(j-1,k-1)) + n×S×sqrt( abs(P(j,k)-Avg))) + o×Avg×P(j,k); Where m, n, and o are the specific weighting coefficients, G is the average gradient, S is the standard deviation, Avg is the mean, (j, k) are the pixel coordinates corresponding to the grayscale image, abs is the absolute value and sqrt is the square root.

2. The method according to claim 1, characterized in that, The evaluation factors include the mean, standard deviation, and average gradient. The formula for calculating the mean is as follows: ; The formula for calculating the standard deviation is: ; The formula for calculating the average gradient is: , The image being evaluated is F, and its size is MN.

3. The method according to claim 1, characterized in that, The adjustment of the weighting coefficients is automatically configured according to predetermined rules or manually configured via an external control bus.

4. A system for optimizing image scaling, characterized in that, include: The first evaluation module is used to perform grayscale processing on the input image and calculate the evaluation factors of the input image, wherein the evaluation factors include the mean, standard deviation and average gradient. A scaling processing module is used to scale the input image using a nearest neighbor interpolation algorithm to obtain a first image and to scale the input image using a bilinear interpolation algorithm to obtain a second image. The second evaluation module is used to calculate the corresponding evaluation factors for the first image and the second image respectively. An average quality factor calculation module is used to calculate the average quality factor of each pixel in the first image and the second image according to the value of the evaluation factor and a specific weighting coefficient. For any image in the first image and the second image, the average quality factor is calculated according to the average gradient, standard deviation and mean of the image, as well as the gray value of the corresponding pixel and its neighboring pixels in the image, according to the weighting coefficient. A combination module is used to select pixels with larger average quality factors from the first image and the second image, combine them into a combined image, and calculate the evaluation factor of the combined image; and The comparison module is used to compare the evaluation factors of the input image and the combined image. If the absolute difference between the input image and the combined image in any of the mean, standard deviation and average gradient is greater than the corresponding set threshold, it is determined that the combined image has not reached the expected optimization level. The weight coefficient is adjusted and the average quality factor is calculated to obtain a new combined image until the absolute difference between the combined image and the input image in the mean, standard deviation and average gradient is not greater than the corresponding set threshold. The formula for calculating the average quality factor is as follows: K = - m×G×abs(P(j,k)-P(j-1,k-1)) + n×S×sqrt( abs(P(j,k)-Avg))) + o×Avg×P(j,k) Where m, n, and o are the specific weighting coefficients, G is the average gradient, S is the standard deviation, Avg is the mean, (j, k) are the pixel coordinates corresponding to the grayscale image, abs is the absolute value and sqrt is the square root.

5. The system according to claim 4, characterized in that, The evaluation factors include the mean, standard deviation, and average gradient. The formula for calculating the mean is as follows: ; The formula for calculating the standard deviation is: ; The formula for calculating the average gradient is: , The image being evaluated is F, and its size is MN.

6. The system according to claim 4, characterized in that, The adjustment of the weighting coefficients is automatically configured according to predetermined rules or manually configured via an external control bus.

7. A computer-readable storage medium, characterized in that, The system stores computer program instructions that, when executed, implement the image scaling optimization method as described in any one of claims 1-3.

8. A computer device, comprising a memory and a processor, characterized in that, The memory stores a computer program, which, when executed by the processor, performs the image scaling optimization method as described in any one of claims 1-3.

Citation Information

Patent Citations

  • Method and device for objectively evaluating scaled image quality by matching pixel points

    CN102073985A

  • A fusion method and a fusion system of high dynamic range images

    CN109360163A