One-dimensional interpolation method, bilinear interpolation method and bicubic interpolation method for resolution scaling
By simplifying the resolution scaling method of lookup tables and interpolation modes, the problems of large computing overhead and high power consumption in the prior art are solved, efficient resolution scaling is achieved, and the computing and storage requirements in the chip are reduced.
Patent Information
- Application Number
- CN202510355812.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2025-07-08
AI Technical Summary
The existing resolution scaling method has large calculation overhead, high power consumption, and complex display effects in the display driver chip, resulting in an increase in the chip burden.
The resolution scaling method of concise lookup table and interpolation mode is adopted, including one-dimensional interpolation, bilinear interpolation and bicubital interpolation, and the calculation bit width is reduced and the lookup table storage is reduced through nonlinear domains.
It effectively reduces the computing overhead and power consumption in the chip, saves storage space and costs, and maintains the display effect of the original method.
Smart Images

Figure CN120281866A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of display technologies, and particularly to the field of scaling algorithms. Background Art
[0002] For consumer electronics, including the display screens of televisions, projectors, tablets, computers, laptops, and mobile phones, the resolution is getting higher and higher. Even the resolution of in-vehicle displays is becoming increasingly high-definition. Since the resolutions of various display screens are different, it is often necessary to adapt to the appropriate resolution when docking with the front-end software and hardware AP. In certain specific usage scenarios, it is necessary to perform scaling processing on the display image resolution. For example, when the input data resolution is different from the display resolution, or when some algorithm processing requires interpolation processing on the input image data, the scaling process can be placed on the AP side or implemented within the display driver chip (DDIC, Display Driver IC). Currently, some general DDICs contain the function of resolution scaling.
[0003] The existing scaling methods have the following disadvantages:
[0004] 1. The De-γ processing requires an increase in bit width to maintain accuracy, increasing the bit width overhead of subsequent interpolation operations.
[0005] 2. The De-γ + interpolation + Add-γ process is relatively complex and has a large computational overhead.
[0006] 3. The entire process is long and complex, and both power consumption and area are burdens on the display driver chip.
[0007] In view of this, this application is proposed. Summary of the Invention
[0008] The present invention provides a one-dimensional interpolation method, a bilinear interpolation method, and a bicubic interpolation method for resolution scaling. By obtaining the luminance value of the pixel to be interpolated through a lookup table and an interpolation mode in the non-linear domain, the bit width of the calculation and the stored content of the lookup table are effectively reduced, thereby saving power consumption, area, and cost, while approaching the display effect of the original method.
[0009] On the one hand, this embodiment provides a one-dimensional interpolation method for resolution scaling, including the following steps:
[0010] Step 1: Calculate the offset p according to the position information of the pixel to be interpolated and the first adjacent pixel and the second adjacent pixel;
[0011] Step 2: Obtain an index from the index set according to the offset, and obtain the corresponding lookup table from the lookup table set according to the index;
[0012] Step 3: Obtain the brightness value of the pixel to be interpolated from the look-up table obtained in Step 2 according to the brightness values of adjacent pixels.
[0013] Further, the offset p in Step 1 is calculated by formula (1):
[0014]
[0015] where D1 is the distance between the pixel to be interpolated and the first adjacent pixel, D0 is the distance between the first adjacent pixel and the second adjacent pixel, and D0 > D1.
[0016] Further, the establishment of the look-up table set in Step 2 includes the following steps:
[0017] Step a1: Establish an index set: p i = {(1 / M), (2 / M), ……, 1 / 2}, where M is an integer ≥ 8 and i is an integer ≥ 1;
[0018] Step b1: Construct a look-up table set: For the p i value, establish a bilinear interpolation look-up table with index p i according to formula (2):
[0019]
[0020] where G0 and G1 are the gray-scale input values of two known points on both sides of the pixel to be interpolated, and G0 and G1 traverse from 0 to 256; the γ power operation represents the conversion from the non-linear domain to the linear domain; the γ square root operation represents the conversion from the linear domain to the non-linear domain; G is the brightness value of the pixel to be interpolated.
[0021] Further, the steps of obtaining the index from the index set according to the offset and obtaining the corresponding look-up table from the look-up table set in Step 2 include the following steps:
[0022] aa. If p = 0, then the brightness value G of the pixel point to be interpolated is equal to the brightness value G0 of the first adjacent pixel;
[0023] bb. If p < 1 / 2, calculate the difference set with |p i - p|, and select the corresponding look-up table with the p i corresponding to the minimum value in the difference set as the index;
[0024] cc. If p > 1 / 2, then calculate the difference set with |p i - (1 - p)|, and select the corresponding look-up table with the p i corresponding to the minimum value in the difference set as the index, and exchange G0 and G1 before looking up the table;
[0025] dd. If p = 1, the brightness value G of the pixel point to be interpolated is equal to the brightness value G1 of the second adjacent pixel.
[0026] Further, the establishment of the lookup table set in step 2 includes the following steps:
[0027] Step a. Establish an index set: Establish an index set p i = {0, 1 / 2, 1}, where i = 1, 2 or 3;
[0028] Step b. Construct a lookup table set:
[0029] Establish a first lookup table according to formula (3):
[0030]
[0031] Establish a second lookup table according to formula (4):
[0032]
[0033] Establish a third lookup table according to formula (5):
[0034]
[0035] Among them, G0, G1, G2, G3 are the gray-scale input values of three known points adjacent to the point to be interpolated, and G0, G1, G2, G3 traverse from 0 to 256; the γ power operation represents the conversion from the non-linear domain to the linear domain; the γ square root operation represents the conversion from the linear domain to the non-linear domain; w i is the one-dimensional cubic interpolation filter coefficient.
[0036] Further, the steps of obtaining an index from the index set according to the offset and obtaining the corresponding lookup table from the lookup table set in step 2 include the following steps:
[0037] aa. If 0 < p < 1 / 2, select the first lookup table as the lookup table;
[0038] bb. If 1 / 2 < p < 1, select the second lookup table as the lookup table;
[0039] cc. If p = 1 / 2, select the third lookup table as the lookup table;
[0040] dd. If p = 0, the brightness value G of the pixel point to be interpolated is equal to the brightness value G0 of the first adjacent pixel;
[0041] ee. If p = 0, the brightness value G of the pixel point to be interpolated is equal to the brightness value G1 of the second adjacent pixel.
[0042] On the other hand, the present application also provides a bilinear interpolation method for resolution scaling, including the following steps:
[0043] Step 1: Calculate the position information of the pixel to be interpolated and four adjacent pixels according to the scaling ratio;
[0044] Step 2: Calculate the first row offset p r1 and the second row offset p r2 and the column offset p c ;
[0045] Step 3: Use the abscissa information in the position information and perform two row interpolations using the above one-dimensional interpolation method to obtain the one-dimensional interpolation outputs G row0 and G row1 of the two rows above and below the pixel to be interpolated;
[0046] Step 4: Based on G row0 and G row1 , use the ordinate information in the position information and perform one column interpolation using the above one-dimensional interpolation method to obtain the output value Gout of the pixel to be interpolated.
[0047] On the other hand, the present application also provides a bicubic interpolation method for resolution scaling, including the following steps:
[0048] Step 1: Calculate the position information of the pixel to be interpolated and 8 adjacent pixels according to the scaling ratio;
[0049] Step 2: Calculate the row offsets p r0 , p r1 , p r2 , p r3 of the pixel to be interpolated and the adjacent pixels and the column offset p c ;
[0050] Step 3: Use the abscissa information in the position information and perform four row interpolations using the above one-dimensional interpolation method to obtain the one-dimensional interpolation outputs G row0 , G row1 , G row2 , G row3 of the two rows above and below the pixel to be interpolated;
[0051] Step 4: Based on G row0 , G row1 , G row2 , G row3 , use the ordinate information in the position information and perform one column interpolation using the above one-dimensional interpolation method to obtain the brightness output value Gout of the pixel to be interpolated.
[0052] Compared with the prior art, the present invention has the following beneficial effects:
[0053] 1) For the interpolation or similar multiplication and addition linear operations within the chip, by using a concise look-up table and interpolation mode, the cumbersome linearization and non-linearization calculations can be replaced, effectively reducing the bit width of the calculations and the stored content of the look-up table, thereby saving power consumption, area, and cost, while approaching the display effect of the original method.
[0054] 2) In this application, adding a one-dimensional look-up table can achieve a scaling function similar to the bicubic interpolation effect.
[0055] 3) For the multiplication and addition operations of common image filtering (convolution operations), the method of the present invention can also be used to construct a look-up table for fast and simplified calculations. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0057] Figure 1 It is a schematic diagram of the scaling algorithm in the prior art;
[0058] Figure 2 It is a schematic diagram of the simplified calculation method for resolution scaling in this application;
[0059] Figure 3 It is a three-dimensional diagram of the 257*257 look-up table under various offset amounts in Embodiment 5;
[0060] Figure 4 It is a schematic diagram of scaling;
[0061] Figure 5 It is a schematic diagram of the calculation of the offset amount p;
[0062] Figure 6 It is a waveform schematic diagram of the basis function of the one-dimensional cubic interpolation filter. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0063] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0064] In the traditional display field, for zoom interpolation operations or similar filtering operations, linearization processing must be performed first, followed by interpolation, and then non-linear processing to obtain the grayscale data that can be displayed. Usually, for 8-bit R, G, B grayscale inputs, they need to be processed into 14-bit (γ2.2-like calculation for BT-709) linear domain luminance data. If strict γ = 2.2 processing is required, an output of more than 18 - 20 bits is needed to ensure accuracy. Although this approach can accurately guarantee the quality of the display output, the calculations within the DDIC require extremely high costs.
[0065] As Figure 1 shown, for linearization processing such as De-γ operation and the corresponding non-linearization processing Add-γ operation, a lookup table and interpolation hybrid operation are usually used. To ensure accuracy, the lookup table is at least a one-dimensional lookup table with a length of 65 to 129.
[0066] This embodiment provides an algorithm circuit that directly uses lookup and interpolation and is suitable for implementation within a chip to meet the requirements of zooming or similar multiply-add calculations. As Figure 2 shown, this embodiment simplifies the existing zoom algorithm. The simplified zoom algorithm includes two steps: lookup table and interpolation.
[0067] Now, the simplified algorithm of this application will be elaborated in detail.
[0068] Whether it is bilinear interpolation or bicubic interpolation, in principle, it can be separated into two interpolations in the row direction and the column direction. Therefore, bilinear and bicubic interpolations become two one-dimensional linear interpolations and cubic interpolations in the row and column directions. Among them, bilinear interpolation only requires calculating two row interpolations and one column interpolation; while bicubic interpolation requires calculating four row interpolations and one column interpolation.
[0069] Embodiment 1
[0070] Step 1: Calculate the offset p according to the position information of the pixel to be interpolated and the first adjacent pixel and the second adjacent pixel;
[0071] Step 2: Obtain the index from the index set according to the offset, and obtain the corresponding lookup table from the lookup table set according to the index;
[0072] Step 3: Obtain the luminance value of the pixel to be interpolated from the lookup table obtained in Step 4 according to the luminance values of the adjacent pixels.
[0073] Preferably, as Figure 5 shown, G K and G L are respectively two adjacent points of the pixel G J , and D0 is G K and G LThe distance between, D1 is G K , G J The distance between, the calculation formula for the offset p is:
[0074] p = D1 / D0 (1)
[0075] Preferably, p is less than 1;
[0076] Preferably, p is less than 1 / 2;
[0077] The establishment of the lookup table set in step 2 includes the following steps:
[0078] Step a1, establish an index set: p i = {(1 / M), (2 / M), ……, 1 / 2}, where M is an integer ≥ 8, and i is an integer ≥ 1;
[0079] Step b1, construct a lookup table set: For the p i value, establish a bilinear interpolation lookup table with the index p according to formula (2): i
[0080]
[0081] Among them, G0 and G1 are the gray-scale input values of two known points on both sides of the pixel to be interpolated, and G0 and G1 traverse from 0 to 256; the γ power operation represents the conversion from the non-linear domain to the linear domain; the γ square root operation represents the conversion from the linear domain to the non-linear domain; G is the brightness value of the pixel to be interpolated;
[0082] Preferably, in step 2, obtaining an index from the index set according to the offset, and obtaining the corresponding lookup table from the lookup table set includes the following steps:
[0083] aa. If p = 0, then the brightness value G of the pixel to be interpolated is equal to the brightness value G0 of the first adjacent pixel;
[0084] bb. If p < 1 / 2, calculate the difference set with |p i - p|, and use the p corresponding to the minimum value in the difference set i as the index to select the corresponding lookup table;
[0085] cc. If p > 1 / 2, then calculate the difference set with |p i - (1 - p)|, and use the p corresponding to the minimum value in the difference set i as the index to select the corresponding lookup table, and exchange G0 and G1 before looking up the table;
[0086] dd. If p = 1, then the brightness value G of the pixel to be interpolated is equal to the brightness value G1 of the second adjacent pixel.
[0087] The one-dimensional interpolation of this embodiment will be illustrated by way of example as follows:
[0088] First, calculate the two-dimensional lookup table for 8-bit input. Quantize the offset of the pixel to be interpolated to 3 bits (8 parts) or 4 bits (16 parts). According to the following formula, calculate the 8-bit output corresponding to the 8-bit gray-scale input of the original pixels on both sides of the two pixels to be interpolated for each quantized offset:
[0089]
[0090] L = (1 - p)L0 + pL1
[0091]
[0092] Among them, G0 and G1 are the gray-scale input values of the two known points on both sides of the point to be interpolated. L0 and L1 are the luminance values in the linear domain after γ correction of G0 and G1. Of course, this operation can also use other standard calculation methods such as BT-709. p is the offset value corresponding to the pixel to be interpolated. For example, in the row or column direction, if the positions of G0 and G1 are denoted as 0 and 1, then the position of the pixel to be interpolated is p, where 0 ≤ p < 1. Quantize p to several values of (0, 1 / 8, 2 / 8, 3 / 8, 4 / 8, 5 / 8, 6 / 8, 7 / 8). In this way, by letting G0 and G1 traverse 0 - 256, eight 257x257 lookup tables are obtained.
[0093] Obviously, when p = 0, G = G0, that is, the first table is not needed. Therefore, the lookup table set index set can be simplified to (1 / 8, 2 / 8, 3 / 8, 4 / 8, 5 / 8, 6 / 8, 7 / 8). Moreover, in the simplified lookup table set, Table 1 and Table 7, Table 2 and Table 6, Table 3 and Table 5 are symmetric, and only G0 and G1 need to be exchanged. Therefore, the lookup table set can be further simplified, and finally four lookup tables are obtained, that is, only four tables with indexes (1 / 8, 2 / 8, 3 / 8, 4 / 8) need to be stored. The required storage capacity is 257 * 257 * 4 = 264 kByte.
[0094] It should be noted that in this embodiment, taking the quantization of p to the accuracy of 1 / 8 as an example, actually, the quantization accuracy of p can be set according to requirements. For example, if p is quantized to the accuracy of 1 / 16, then eight lookup tables are required.
[0095] Preferably, the integral point calculation results of G0, G1 = (0, 32, 64, 96, 128, 160, 192, 224, 256) are used as the look-up table to reduce the storage of the look-up table. When G0, G1 are other values, the interpolation method can be used to calculate the results. In this way, the total storage is 9 * 9 * 4 = 324 Byte. Similarly, it can be deduced that using the look-up tables of 17 * 17 grid points and 33 * 33 grid points will be more accurate.
[0096] Preferably, if p = 0, G = G0
[0097] If p < 5 / 8, then select the corresponding look-up table. (1 / 8 corresponds to look-up table 1).
[0098] If p > 4 / 8, then select the look-up table corresponding to 1 - p and swap G0, G1.
[0099] If p = 1, then G = G1.
[0100] Interpolation operation (taking the 9 * 9 look-up table as an example), if the input G0, G1 are not integral points, then find the four look-up table grid points around the point (G0, G1) on the look-up table surface, and use triangular interpolation or bilinear interpolation to directly calculate the result G corresponding to (G0, G1).
[0101] So far, through the look-up table and interpolation, the result of one-dimensional linear interpolation is directly obtained.
[0102] Embodiment 2
[0103] The difference between this embodiment and Embodiment 1 lies in the different look-up table sets, that is, the establishment steps are different.
[0104] The establishment of the look-up table set in step 2 includes the following steps:
[0105] Step a, establish an index set: establish an index set p i = {0, 1 / 2, 1}, where i = 1, 2 or 3;
[0106] Step b, construct a look-up table set:
[0107] Establish the first look-up table according to formula (3):
[0108]
[0109] Establish the second look-up table according to formula (4):
[0110]
[0111] Establish the third look-up table according to formula (5):
[0112]
[0113] Among them, G0, G1, G2, and G3 are the grayscale input values of three known points adjacent to the point to be interpolated, and G0, G1, G2, and G3 range from 0 to 256; the γ power operation represents the conversion from the non-linear domain to the linear domain; the γ square root operation represents the conversion from the linear domain to the non-linear domain; w i is the coefficient of the one-dimensional cubic interpolation filter.
[0114] Preferably, obtaining the index from the index set according to the offset in step 2 and obtaining the corresponding lookup table from the lookup table set according to the index include the following steps:
[0115] aa. If 0 < p < 1 / 2, select the first lookup table as the lookup table;
[0116] bb. If 1 / 2 < p < 1, select the second lookup table as the lookup table;
[0117] cc. If p = 1 / 2, select the third lookup table as the lookup table;
[0118] dd. If p = 0, the brightness value G of the pixel to be interpolated is equal to the brightness value G0 of the first adjacent pixel;
[0119] ee. If p = 0, the brightness value G of the pixel to be interpolated is equal to the brightness value G1 of the second adjacent pixel.
[0120] Embodiment III
[0121] Bilinear interpolation includes the following steps:
[0122] Step 1: Calculate the position information of the pixel to be interpolated and four adjacent pixels according to the scaling ratio;
[0123] Step 2: Calculate the first row offset p r1 , the second row offset p r2 and the column offset p c ;
[0124] Step 3: Using the abscissa information in the position information, perform two row interpolations using the one-dimensional interpolation method of Embodiment I to obtain the one-dimensional interpolation outputs G row0 and G row1 ;
[0125] Step 4: Based on G row0 and G row1 , using the ordinate information in the position information, perform one column interpolation using the one-dimensional interpolation method of Embodiment I to obtain the output value Gout of the pixel to be interpolated.
[0126] The bilinear interpolation calculation method of this embodiment is elaborated in detail as follows:
[0127] Example 4
[0128] The double trilinear interpolation includes the following steps:
[0129] Step 1: Calculate the position information of the pixel to be interpolated and 8 adjacent pixels according to the scaling ratio;
[0130] Step 2: Calculate the row offset p r0 、p r1 、p r2 、p r3 and the column offset p c ;
[0131] Step 3: Use the abscissa information in the position information and adopt the one-dimensional interpolation method of Example 2 to perform four times of row interpolation to obtain the one-dimensional interpolation outputs G row0 、G row1 、G row2 、G row3 ;
[0132] Step 4: Based on G row0 、G row1 、G row2 、G row3 , use the ordinate information in the position information and adopt the one-dimensional interpolation method of Example 2 to perform one time of column interpolation to obtain the brightness output value Gout of the pixel to be interpolated.
[0133] Preferably, w0, w1, w2, w3 are calculated from the one-dimensional cubic interpolation filter basis function w(x);
[0134] Generally, the construction function of the one-dimensional cubic interpolation filter basis function in this embodiment adopts an existing basis function, and its construction function is shown in the following formula, and its waveform is as Figure 6 shown:
[0135]
[0136] Among them, x is the abscissa, x = p, a = -0.5.
[0137] Example 5
[0138] The compensation example of a certain screen in this embodiment is as follows:
[0139] First, use a display driver chip integrating the simplified calculation method of this embodiment.
[0140] Secondly, calculate the corresponding look-up table according to the requirements and store it in the chip (in Flash, loaded into the memory when the chip is powered on). Figure 3shows the three-dimensional diagram of the 257*257 lookup table at each offset. If a 9*9 lookup table is used, the bilinear interpolation lookup table set is shown in Table 1:
[0141] Table 1 Bilinear Interpolation Lookup Table Set
[0142]
[0143]
[0144]
[0145] When the chip is running, according to the scaling ratio, calculate the position of each pixel to be interpolated and convert it into the adjacent point offset p. Quantize the offset and obtain the corresponding bilinear interpolation lookup table according to the index set p i as Figure 4 shown Figure 4 is a dot matrix with a reduction ratio of 4:3, where green is the original pixel and red is the pixel to be interpolated. Among them, point G out is the pixel to be interpolated, and its row and column offsets are both 1 / 3. Therefore, quantize to the position of 3 / 8 and select the lookup table with p = 3 / 8.
[0146] Find the grid points through the lookup table and interpolate to obtain the one-dimensional interpolation output of the two rows above and below the pixel to be interpolated. (If it is bicubic interpolation, calculate the four rows before and after).
[0147] First, through point G 00 ,G 10 look up the table and interpolate to calculate G row0 , and then calculate G row1 similarly.
[0148] According to the results of the previous step G row0 and G row1 , find the grid points through the lookup table and interpolate to obtain the interpolation output G out in the column direction of the pixel to be interpolated, which is the brightness value of the current pixel to be interpolated.
[0149] Assume that the values of the four original pixels are: G 00 = 150, G 10 = 201, G 01 = 36, and G 11 = 49.
[0150] Through calculation, it is obtained that:
[0151] Calculation row 0 Lattice point 0 Lattice point 1 Displacement Lattice point look-up table Lattice point look-up table One-dimensional linear interpolation One-dimensional linear interpolation Two-dimensional linear interpolation 150 128 160 22 148 165 160.375 176 164.7695 201 192 224 9 166 181 Output Grow0 165
[0152] Calculation row 1 Lattice point 0 Lattice point 1 Displacement Lattice point look-up table Lattice point look-up table One-dimensional linear interpolation One-dimensional linear interpolation Two-dimensional linear interpolation 36 32 64 4 26 40 28.625 42 35.73047 49 32 64 17 47 56 Output Grow1 36
[0153] Calculation column Lattice point 0 Lattice point 1 Displacement Lattice point look-up table Lattice point look-up table One-dimensional linear interpolation One-dimensional linear interpolation Two-dimensional linear interpolation 165 160 192 5 109 115 112.75 118.5938 113.4805 36 32 64 4 133 138 Output Gout 113
[0154] Final output G out = 113.
[0155] It should be noted that the simplified calculation method provided in this embodiment is not only applicable to the resolution scaling simplified calculation method in the display driver chip, but can also be used in image filtering processing.
[0156] In this embodiment, through interpolation or similar multiplication and addition linear operations within the chip, using a simple look-up table and interpolation mode, it is possible to replace the cumbersome linearization and non-linearization calculations, effectively reducing the bit width of the calculation and the content stored in the look-up table. Thereby saving power consumption, area and cost, while approaching the display effect of the original method.
[0157] The "equal" or "same" or "equal to" disclosed in the present invention must consider the engineering parameter distribution, and the error distribution is within ±30%; the definition of two line segments or two straight lines being "parallel" is that the included angle between the two line segments or two straight lines is less than or equal to 45 degrees; the definition of two line segments or two straight lines being "perpendicular" is that the included angle between the two line segments or two straight lines is within the range of [60, 120] degrees; the definition of the offset "phase shift" also needs to consider the engineering parameter distribution, and the error distribution of the phase shift degree is within ±30%. In addition, in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.
[0158] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0159] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A one-dimensional interpolation method for resolution scaling, characterized in that, Including the following steps: Step 1: Calculate the offset p according to the position information of the pixel to be interpolated and the first and second adjacent pixels; Step 2: Obtain an index from the index set according to the offset, and obtain the corresponding look-up table from the look-up table set according to the index; Step 3: Obtain the brightness value of the pixel to be interpolated from the look-up table obtained in Step 2 according to the brightness values of the adjacent pixels.
2. The one-dimensional interpolation method according to claim 1, characterized in that In Step 1, the offset p is calculated by formula (1): p = D1 / D0 (1) where D1 is the distance between the pixel to be interpolated and the first adjacent pixel, D0 is the distance between the first adjacent pixel and the second adjacent pixel, and D0 > D1.
3. The one-dimensional interpolation method according to claim 2, characterized in that The establishment of the look-up table set in Step 2 includes the following steps: Step a1, establish an index set: p i = {(1 / M), (2 / M), ……, 1 / 2}, where M is an integer ≥ 8 and i is an integer ≥ 1; Step b1, constructing a set of lookup tables: For the p i value, establish a bilinear interpolation lookup table with the index p according to formula (2): i where G0 and G1 are the gray-scale input values of two known points on both sides of the pixel to be interpolated, and G0 and G1 traverse from 0 to 256; the γ power operation represents the conversion from the non-linear domain to the linear domain; the γ square root operation represents the conversion from the linear domain to the non-linear domain; G is the brightness value of the pixel to be interpolated.
4. The one-dimensional interpolation method according to claim 3, characterized in that In Step 2, obtaining an index from the index set according to the offset and obtaining the corresponding look-up table from the look-up table set according to the index includes the following steps: aa. If p = 0, the brightness value G of the pixel point to be interpolated is equal to the brightness value G0 of the first adjacent pixel; bb. If p < 1 / 2, calculate the difference set with |p i - p|, and select the corresponding lookup table with the p corresponding to the minimum value in the difference set as the index; i cc. If p > 1 / 2, calculate the difference set with |p i -(1 - p)|, and use the p corresponding to the minimum value in the difference set i as the index to select the corresponding lookup table, and perform table lookup after swapping G0 and G1; dd. If p = 1, the brightness value G of the pixel point to be interpolated is equal to the brightness value G1 of the second adjacent pixel.
5. The one-dimensional interpolation method according to claim 2, characterized in that The establishment of the look-up table set in Step 2 includes the following steps: Step a, establishing an index set: Establish an index set p i = {0, 1 / 2, 1}, where i = 1, 2, or 3; Step b: Construct the look-up table set: Establish the first look-up table according to formula (3): Establish the second look-up table according to formula (4): Establish the third look-up table according to formula (5): Among them, G0, G1, G2, G3 are the grayscale input values of three known points adjacent to the points to be interpolated, and G0, G1, G2, G3 traverse from 0 to 256; the γ power operation represents the conversion from the non-linear domain to the linear domain; the γ square root operation represents the conversion from the linear domain to the non-linear domain; w i is the one-dimensional cubic interpolation filter coefficient.
6. The one-dimensional interpolation method according to claim 5, characterized in that In Step 2, obtaining an index from the index set according to the offset and obtaining the corresponding look-up table from the look-up table set according to the index includes the following steps: aa. If 0 < p < 1 / 2, select the first look-up table as the look-up table; bb. If 1 / 2 < p < 1, select the second look-up table as the look-up table; cc. If p = 1 / 2, select the third look-up table as the look-up table; dd. If p = 0, the brightness value G of the pixel point to be interpolated is equal to the brightness value G0 of the first adjacent pixel; ee. If p = 0, the brightness value G of the pixel point to be interpolated is equal to the brightness value G1 of the second adjacent pixel.
7. A bilinear interpolation method for resolution scaling, characterized in that, Including the following steps: Step 1: Calculate the position information of the pixel to be interpolated and four adjacent pixels according to the scaling ratio; Step 2: Calculate the first row offset p according to the position information r1 , the second row offset p r2 and the column offset p c ; Step 3: Using the abscissa information in the position information, perform two - row interpolations by using the one - dimensional interpolation method described in claim 4 to obtain the one - dimensional interpolation outputs G of the two rows above and below the pixel to be interpolated row0 and G row1 ; Step 4. Based on G row0 and G row1 , using the vertical coordinate information in the position information, perform one - dimensional column - row interpolation using the one - dimensional interpolation method described in claim 4 to obtain the output value Gout of the pixel to be interpolated.
8. A bicubic interpolation method for resolution scaling, characterized in that, Including the following steps: Step 1: Calculate the position information of the pixel to be interpolated and 8 adjacent pixels according to the scaling ratio; Step 2: Calculate the row offset p r0 , p r1 , p r2 , p r3 and the column offset p c ; Step 3: Using the abscissa information in the position information, perform four times of row interpolation by using the one-dimensional interpolation method described in Claim 6 to obtain one-dimensional interpolation outputs G row0 , G row1 , G row2 , G row3 ; Step 4. Based on G row0 、G row1 、G row2 、G row3 , using the ordinate information in the position information, perform a one-dimensional column interpolation by using the one-dimensional interpolation method described in Claim 6 to obtain the brightness output value Gout of the pixel to be interpolated.