Periodic two-dimensional interpolation method and device, storage medium and electronic equipment
By using a periodic two-dimensional interpolation method, the periodicity of the basic frame and normalized mapping are utilized to solve the problem that existing technologies cannot perform interpolation calculations for interpolation points outside the sampling area. This achieves high-precision interpolation near the boundary and improves the reliability of the interpolation results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-24
- Publication Date
- 2026-03-24
AI Technical Summary
Existing interpolation methods are mostly limited to the sampling area and cannot perform interpolation calculations for interpolation points located outside the sampling area, resulting in insufficient interpolation accuracy near the boundary and affecting the reliability of the overall interpolation results.
A periodic two-dimensional interpolation method is provided. By obtaining the two-dimensional pixel matrix of the basic frame, the normalized coordinates of the interpolation point are determined, and the interpolation coefficients are calculated using a coefficient cache array and a prediction strategy to realize the interpolation calculation of the interpolation point outside the sampling area.
It significantly improves interpolation accuracy and reconstruction fidelity near boundaries and across frames, reduces boundary artifacts and systematic biases, and enhances the reliability of interpolation results.
Smart Images

Figure CN121010496B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of photolithography technology, specifically to a periodic two-dimensional interpolation method, apparatus, storage medium, and electronic device. Background Technology
[0002] Photolithography typically involves both optical and chemical processes. The optical process involves light illuminating a mask, causing diffraction, which is then collected by a projection lens and forms an image on the photoresist surface. The chemical process involves the image projected onto the photoresist triggering a photochemical reaction, followed by baking and development to ultimately transfer the pattern. Computational lithography uses computer simulation to simultaneously model these processes, allowing for the evaluation and optimization of process windows and improved resolution. It is a crucial technique for modern photolithography process development and layout verification.
[0003] In computational lithography, continuous light intensity fields are discretely sampled. However, in many cases, image values need to be obtained at locations other than the sampling points, which relies on interpolation methods. Existing interpolation methods include nearest neighbor interpolation, linear interpolation, and higher-order bicubic interpolation and spline interpolation. Higher-order methods can utilize the rate of change of neighboring pixels to obtain smoother and more accurate results, and are therefore widely used in optical simulation and process analysis.
[0004] However, existing interpolation methods are mostly limited to the sampling area and cannot perform interpolation calculations for interpolation points located outside the sampling area. Summary of the Invention
[0005] This application provides a periodic two-dimensional interpolation method, apparatus, storage medium, and electronic device that can perform interpolation calculations on interpolation points located outside the sampling area.
[0006] In a first aspect, embodiments of this application provide a periodic two-dimensional interpolation method, including:
[0007] Obtain a two-dimensional pixel matrix of a basic frame, wherein the basic frame is periodic in at least one direction;
[0008] Determine the normalized coordinates of the point to be interpolated relative to the base frame;
[0009] Determine the pixel index corresponding to the target pixel unit where the normalized coordinates are located, and determine whether there is an interpolation coefficient corresponding to the target pixel unit in the coefficient cache array based on the pixel index;
[0010] When there is no interpolation coefficient corresponding to the target pixel unit in the coefficient cache array, the interpolation coefficient corresponding to the target pixel unit is calculated according to the prediction strategy;
[0011] The interpolation of the point to be interpolated is calculated based on the interpolation coefficients.
[0012] In the periodic two-dimensional interpolation method provided in this application embodiment, determining the normalized coordinates of the point to be interpolated relative to the basic frame includes:
[0013] Obtain the global coordinates of the point to be interpolated;
[0014] The global coordinates are normalized and mapped according to the periodicity of the basic frame to obtain normalized coordinates.
[0015] In the periodic two-dimensional interpolation method provided in this application embodiment, the step of normalizing the global coordinates according to the periodicity of the basic frame to obtain normalized coordinates includes:
[0016] The horizontal and vertical coordinates of the global coordinates are normalized according to the width and height of the basic frame, respectively, to obtain normalized coordinates.
[0017] In the periodic two-dimensional interpolation method provided in this application embodiment, the step of calculating the interpolation coefficients corresponding to the target pixel unit according to the prediction strategy includes:
[0018] Construct the left basis transformation matrix, the right basis transformation matrix, and the central value matrix;
[0019] The interpolation coefficients corresponding to the target pixel unit are calculated based on the left basis transformation matrix, the right basis transformation matrix, and the center value matrix.
[0020] In the periodic two-dimensional interpolation method provided in this application embodiment, constructing the center value matrix includes:
[0021] Generate the initial center value matrix;
[0022] Obtain the light intensity value of each intersection point around the point to be interpolated;
[0023] Calculate the derivative of each intersection point based on the light intensity value;
[0024] Each derivative is placed into the initial center value matrix at a predetermined position to generate the center value matrix.
[0025] In the periodic two-dimensional interpolation method provided in this application embodiment, the step of calculating the interpolation of the point to be interpolated based on the interpolation coefficients includes:
[0026] Obtain the relative offset of the normalized coordinates with respect to the target pixel unit;
[0027] The interpolation of the point to be interpolated is calculated based on the relative offset and the interpolation coefficient.
[0028] In the periodic two-dimensional interpolation method provided in this application embodiment, the left basis transformation matrix, the right basis transformation matrix, and the center value matrix are all 4×4 matrices.
[0029] Secondly, embodiments of this application provide a periodic two-dimensional interpolation apparatus, comprising:
[0030] A matrix acquisition unit is used to acquire a two-dimensional pixel matrix of a basic frame, wherein the basic frame is periodic in at least one direction;
[0031] A coordinate determination unit is used to determine the normalized coordinates of the point to be interpolated relative to the basic frame;
[0032] An index determination unit is used to determine the pixel index corresponding to the target pixel unit where the normalized coordinates are located, and to determine whether there are interpolation coefficients corresponding to the target pixel unit in the coefficient cache array based on the pixel index.
[0033] A coefficient calculation unit is used to calculate the interpolation coefficient corresponding to the target pixel unit according to the prediction strategy when there is no interpolation coefficient corresponding to the target pixel unit in the coefficient cache array.
[0034] An interpolation calculation unit is used to calculate the interpolation of the point to be interpolated based on the interpolation coefficients.
[0035] Thirdly, this application provides a storage medium storing a plurality of instructions adapted for loading by a processor to execute the periodic two-dimensional interpolation method described in any of the preceding claims.
[0036] Fourthly, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the periodic two-dimensional interpolation method described in any of the preceding claims.
[0037] In summary, the periodic two-dimensional interpolation method provided in this application includes obtaining a two-dimensional pixel matrix of a base frame, wherein the base frame is periodic in at least one direction; determining the normalized coordinates of the point to be interpolated relative to the base frame; determining the pixel index corresponding to the target pixel unit where the normalized coordinates are located, and determining whether there is an interpolation coefficient corresponding to the target pixel unit in the coefficient cache array based on the pixel index; when there is no interpolation coefficient corresponding to the target pixel unit in the coefficient cache array, calculating the interpolation coefficient corresponding to the target pixel unit according to a prediction strategy; and calculating the interpolation of the point to be interpolated based on the interpolation coefficient. This application embodiment can perform interpolation calculations on interpolation points located outside the sampling region. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 This is a schematic diagram illustrating an application scenario of the periodic two-dimensional interpolation method provided in the embodiments of this application.
[0040] Figure 2 This is a flowchart illustrating the periodic two-dimensional interpolation method provided in the embodiments of this application.
[0041] Figure 3 This is a schematic diagram of the relative offset of the interpolation point in the pixel unit provided in the embodiments of this application.
[0042] Figure 4 This is a schematic diagram of the structure of the periodic two-dimensional interpolation device provided in the embodiments of this application.
[0043] Figure 5 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0044] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0045] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, components, features, and elements with the same names in different embodiments of this application may have the same meaning or different meanings, the specific meaning of which must be determined by its interpretation in that specific embodiment or further in conjunction with the context of that specific embodiment.
[0046] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0047] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.
[0048] In the description of this application, it should be noted that the terms "upper," "lower," "left," "right," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application. In addition, terms such as "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0049] In computational lithography, continuous light intensity fields are discretely sampled. However, in many cases, image values need to be obtained at locations other than the sampling points, which relies on interpolation methods. Existing interpolation methods include nearest neighbor interpolation, linear interpolation, and higher-order bicubic interpolation and spline interpolation. Higher-order methods can utilize the rate of change of neighboring pixels to obtain smoother and more accurate results, and are therefore widely used in optical simulation and process analysis.
[0050] However, existing interpolation methods are mostly limited to the sampling region and cannot perform interpolation calculations for interpolation points located outside the sampling region. Furthermore, common two-dimensional interpolation methods in existing technologies often employ simple extrapolation, mirroring, or zero-filling when dealing with boundary regions. These methods are often based on approximate assumptions or human guesswork, making it difficult to reflect the true optical intensity distribution outside the boundary. This results in insufficient interpolation accuracy near the boundary, thus affecting the reliability of the overall interpolation results.
[0051] Based on this, embodiments of this application provide a periodic two-dimensional interpolation method, apparatus, storage medium, and electronic device. Specifically, the periodic two-dimensional interpolation apparatus can be integrated into an electronic device, which can be a server or a terminal, etc. The terminal can include mobile phones, wearable smart devices, tablet computers, laptops, and personal computers (PCs), etc. The server can be a single server or a server cluster composed of multiple servers, and can be a physical server or a virtual server.
[0052] For example, such as Figure 1As shown, the electronic device can acquire a two-dimensional pixel matrix of a basic frame, which is periodic in at least one direction; determine the normalized coordinates of the point to be interpolated relative to the basic frame; determine the pixel index corresponding to the target pixel unit where the normalized coordinates are located, and determine whether there is an interpolation coefficient corresponding to the target pixel unit in the coefficient cache array based on the pixel index; when there is no interpolation coefficient corresponding to the target pixel unit in the coefficient cache array, calculate the interpolation coefficient corresponding to the target pixel unit according to the prediction strategy; and calculate the interpolation of the point to be interpolated based on the interpolation coefficient.
[0053] The technical solutions shown in this application will be described in detail below through specific embodiments. It should be noted that the order of description of the following embodiments is not intended to limit the priority of the embodiments.
[0054] Please see Figure 2 , Figure 2 This is a schematic flowchart of the periodic two-dimensional interpolation method provided in an embodiment of this application. The specific flow of the periodic two-dimensional interpolation method can be as follows:
[0055] 101. Obtain the two-dimensional pixel matrix of the basic frame, which is periodic in at least one direction.
[0056] In practical implementation, the size and shape of the basic frame need to be clearly defined, which is usually determined by the parameters of the lithography machine and the design of the photomask. The basic frame refers to the smallest region (frame area) in the layout that has periodic repeating characteristics. Within this basic frame, the pixel units are arranged in a matrix. The basic frame has N pixel units arranged horizontally and M pixel units arranged vertically, forming an N x M matrix. This basic frame is the sampling area.
[0057] To facilitate interpolation calculations, the base frame can be represented by a two-dimensional pixel matrix, where each element of the two-dimensional pixel matrix corresponds to the value of a pixel unit within the base frame, such as a grayscale value, light intensity value, or electric field intensity value. Therefore, the two-dimensional pixel value matrix is the data representation of the base frame and is used as input to the interpolation algorithm. In this application, each element of the two-dimensional pixel matrix corresponds to the light intensity value of a pixel unit within the base frame.
[0058] Therefore, the light intensity value of each pixel unit within the basic frame needs to be calculated before a two-dimensional pixel matrix can be formed. In some embodiments, the light intensity value of each pixel unit within the basic frame can be calculated using optical intensity simulation formulas. For example, physical simulation methods, such as finite element analysis (FEA) or finite difference time domain (FDTD) methods, can be used to simulate the propagation and interaction of light in the mask and imaging system based on the shape of the mask, in order to calculate the light intensity value of each pixel unit within the basic frame, thereby forming a two-dimensional pixel value matrix.
[0059] 102. Determine the normalized coordinates of the point to be interpolated relative to the base frame.
[0060] In this embodiment, in order to ensure that any interpolation point can be mapped to the basic frame, normalization mapping is performed on the global coordinates (X,Y) of each interpolation point.
[0061] In some embodiments, normalization mapping refers to periodically mapping the global coordinates of the point to be interpolated according to the width W and height H of the basic frame, based on the periodicity of the basic frame, to obtain normalized coordinates (x, y). That is, step 102 can be to obtain the global coordinates of the point to be interpolated; and to normalize the global coordinates according to the periodicity of the basic frame to obtain normalized coordinates.
[0062] The step "normalize the global coordinates according to the periodicity of the basic frame to obtain normalized coordinates" can be achieved by normalizing the horizontal and vertical coordinates of the global coordinates according to the width and height of the basic frame, respectively, to obtain normalized coordinates.
[0063] The normalization transformation can be described as follows: .
[0064] Through the above normalization transformation, any point to be interpolated on the layout, whether it is located within the basic frame or outside the sampling area, can be mapped to the range [0, W) × [0, H) of the basic frame, so that interpolation calculation can be performed using the two-dimensional pixel value matrix of the basic frame and its corresponding interpolation coefficients.
[0065] Preferably, even if the interpolation point itself falls within the base frame, normalization mapping is still performed to ensure the consistency and adaptability of the algorithm flow and avoid positioning errors caused by negative coordinates or multi-period offsets. It is understood that even if normalization mapping is performed, the coordinates of the interpolation point located within the base frame will not change, but normalization mapping can ensure the consistency of the algorithm flow and avoid special cases caused by cross-period or negative coordinates when processing global coordinates. Furthermore, when the interpolation points are regularly distributed, the normalization operation can be optimized, for example, by using incremental calculation to update the normalized coordinates of adjacent points to reduce computational overhead.
[0066] 103. Determine the pixel index corresponding to the target pixel unit where the normalized coordinates are located, and determine whether there are interpolation coefficients corresponding to the target pixel unit in the coefficient cache array based on the pixel index.
[0067] In this embodiment, to avoid recalculating the interpolation coefficients for the same pixel unit, a coefficient cache array can be pre-constructed. This coefficient cache array is used to store the interpolation coefficients corresponding to each pixel unit within the basic frame, forming a one-to-one storage relationship.
[0068] Specifically, if the width of the base frame is W and the height is H, then the coefficient buffer array can be set as a one-dimensional array of length W×H, or equivalently as a two-dimensional array of length H×W. For any pixel unit with row index j and column index i, its storage location in the coefficient buffer array can be determined by the following formula: .
[0069] Each element of the coefficient cache array is a cache entry, which includes at least a valid flag indicating whether the interpolation coefficient has been calculated and stored at that location, and the interpolation coefficient itself.
[0070] In this embodiment, after normalizing the representation of the point to be interpolated, the normalized coordinates (x, y) of the point within the base frame can be obtained. Based on the normalized coordinates, the target pixel unit to which the point to be interpolated belongs can be determined, that is, the row index j and column index i of the pixel unit containing the normalized coordinates can be identified. For example, the top-left corner coordinates of the pixel of the target pixel unit, i.e., the pixel index (i, j), can be obtained by rounding the normalized coordinates.
[0071] After determining the pixel index (i,j), the array index corresponding to the pixel unit can be calculated. Then, the array index is used to search the coefficient cache array to determine whether an interpolation coefficient corresponding to the target pixel unit already exists.
[0072] It is understandable that if there is already an interpolation coefficient at this position and it is marked as valid, then the interpolation coefficient can be used directly for interpolation calculation. If the position is empty or marked as invalid, then coefficient calculation is triggered to obtain a new interpolation coefficient, and the new interpolation coefficient is written to the corresponding position in the coefficient cache array, while the flag position is marked as valid.
[0073] By employing this coefficient cache array, the embodiments of this application can ensure that the interpolation coefficients for each pixel unit only need to be calculated once, and all subsequent interpolation points located within that pixel unit can directly reuse the interpolation coefficients, thereby significantly reducing redundant calculations and improving the overall interpolation calculation efficiency.
[0074] 104. When there is no interpolation coefficient corresponding to the target pixel unit in the coefficient cache array, calculate the interpolation coefficient corresponding to the target pixel unit according to the prediction strategy.
[0075] Specifically, when the corresponding interpolation coefficient exists in the coefficient cache array, the interpolation coefficient can be directly called for interpolation calculation, thus avoiding repeated calculation; when the corresponding interpolation coefficient does not exist in the coefficient cache array, coefficient calculation is triggered.
[0076] Specifically, the coefficient calculation process can involve constructing a left basis transformation matrix, a right basis transformation matrix, and a center value matrix; and calculating the interpolation coefficients corresponding to the target pixel unit based on the left basis transformation matrix (Left matrix), the right basis transformation matrix (Right matrix), and the center value matrix (F matrix).
[0077] In this embodiment, the left basis transformation matrix, the right basis transformation matrix, and the central value matrix are all 4×4 matrices. The left basis transformation matrix and the right basis transformation matrix are known and are used as fixed matrices in the coefficient calculation.
[0078] Specifically, Left = Right = .
[0079] The specific process of constructing the center value matrix can be as follows: generating an initial center value matrix; obtaining the light intensity value of each intersection point around the point to be interpolated; calculating the derivative of each intersection point based on the light intensity value; and placing each derivative into the initial center value matrix at a predetermined position to generate the center value matrix.
[0080] Specifically, the interpolation coefficients of the target pixel unit can be obtained by multiplying the left basis transformation matrix, the right basis transformation matrix, and the center value matrix.
[0081] 105. Calculate the interpolation of the points to be interpolated based on the interpolation coefficients.
[0082] In some embodiments, the relative offset of the normalized coordinates with respect to the target pixel unit can be obtained; based on the relative offset and the interpolation coefficient, the interpolation of the point to be interpolated is calculated.
[0083] like Figure 3 As shown, the relative offsets of the interpolation point to its pixel unit are dx and dy, respectively, i.e., dx = x - i and dy = y - j. When the size of each pixel unit is assumed to be 1, the value of dx is in the range of 0 <= dx < 1, and the value of dy is in the range of 0 <= dy < 1.
[0084] After obtaining the relative offset of the normalized coordinates with respect to the target pixel unit, the interpolation value of the point to be interpolated can be calculated based on the relative offset and the interpolation coefficients. Specifically, the calculation process of the interpolation value P(x,y) of the point to be interpolated can be as follows:
[0085] P(x,y) = ×m_coeffients[index]× .
[0086] Where m_coeffients[index] are the interpolation coefficients of the target pixel unit.
[0087] In summary, the periodic two-dimensional interpolation method provided in this application includes obtaining a two-dimensional pixel matrix of a base frame, wherein the base frame is periodic in at least one direction; determining the normalized coordinates of the point to be interpolated relative to the base frame; determining the pixel index corresponding to the target pixel unit where the normalized coordinates are located, and determining whether there is an interpolation coefficient corresponding to the target pixel unit in the coefficient cache array based on the pixel index; when there is no interpolation coefficient corresponding to the target pixel unit in the coefficient cache array, calculating the interpolation coefficient corresponding to the target pixel unit according to the prediction strategy; and calculating the interpolation of the point to be interpolated based on the interpolation coefficient. This application embodiment can perform interpolation calculations on interpolation points located outside the sampling area. By utilizing the periodicity characteristics of the base frame and employing normalized mapping at the boundaries, this application embodiment effectively avoids boundary errors caused by traditional extrapolation, mirroring, or zero-padding. For light intensity distributions with repetitive patterns, the normalized mapping provides a consistent result with the real-world version. Figure 1 Consistent boundary reference values can maintain the consistency and smoothness of interpolation at the boundaries, thereby significantly improving the interpolation accuracy and reconstruction fidelity near the boundaries and across frames, reducing boundary artifacts and systematic biases, and improving the reliability of interpolation results.
[0088] To facilitate better implementation of the periodic two-dimensional interpolation method provided in the embodiments of this application, the embodiments of this application also provide a periodic two-dimensional interpolation apparatus. The meanings of the terms used are the same as in the aforementioned periodic two-dimensional interpolation method, and specific implementation details can be found in the descriptions within the method embodiments.
[0089] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of a periodic two-dimensional interpolation device provided in an embodiment of this application. The periodic two-dimensional interpolation device may include a matrix acquisition unit 201, a coordinate determination unit 202, an index determination unit 203, a coefficient calculation unit 204, and an interpolation calculation unit 205.
[0090] The matrix acquisition unit 201 is used to acquire a two-dimensional pixel matrix of a basic frame, wherein the basic frame is periodic in at least one direction.
[0091] The coordinate determination unit 202 is used to determine the normalized coordinates of the point to be interpolated relative to the base frame;
[0092] The index determination unit 203 is used to determine the pixel index corresponding to the target pixel unit where the normalized coordinates are located, and to determine whether there are interpolation coefficients corresponding to the target pixel unit in the coefficient cache array based on the pixel index.
[0093] The coefficient calculation unit 204 is used to calculate the interpolation coefficient corresponding to the target pixel unit according to the prediction strategy when there is no interpolation coefficient corresponding to the target pixel unit in the coefficient cache array.
[0094] The interpolation calculation unit 205 is used to calculate the interpolation of the point to be interpolated based on the interpolation coefficients.
[0095] For specific implementation methods of each of the above units, please refer to the embodiments of the periodic two-dimensional interpolation method described above, which will not be repeated here.
[0096] In summary, the periodic two-dimensional interpolation apparatus provided in this application embodiment can acquire the two-dimensional pixel matrix of a basic frame through the matrix acquisition unit 201, wherein the basic frame is periodic in at least one direction; the coordinate determination unit 202 determines the normalized coordinates of the point to be interpolated relative to the basic frame; the index determination unit 203 determines the pixel index corresponding to the target pixel unit where the normalized coordinates are located, and determines whether there is an interpolation coefficient corresponding to the target pixel unit in the coefficient cache array based on the pixel index; when there is no interpolation coefficient corresponding to the target pixel unit in the coefficient cache array, the coefficient calculation unit 204 calculates the interpolation coefficient corresponding to the target pixel unit according to the prediction strategy; and the interpolation calculation unit 205 calculates the interpolation of the point to be interpolated based on the interpolation coefficient. This application embodiment can perform interpolation calculations on interpolation points located outside the sampling area.
[0097] This application also provides an electronic device that may integrate the periodic two-dimensional interpolation device of this application, such as... Figure 5 As shown, it illustrates a structural schematic diagram of the electronic device involved in the embodiments of this application, specifically:
[0098] The electronic device may include components such as a processor 301 with one or more processing cores and a memory 302 with one or more computer-readable storage media. Those skilled in the art will understand that... Figure 5 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0099] The processor 301 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs stored in the memory 302 and / or this application, and by calling data stored in the memory 302, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. Optionally, the processor 301 may include one or more processing cores; preferably, the processor 301 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operation of the storage medium, user interface, and application programs, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 301.
[0100] The memory 302 can be used to store software programs and this application. The processor 301 executes various functional applications and data processing by running the software programs and this application stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area. The program storage area may store applications required for operating the storage medium and at least one function; the data storage area may store data created based on the use of the electronic device. In addition, the memory 302 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 volatile solid-state storage device. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.
[0101] Although not shown, the electronic device may also include a display unit, an input unit, and a power supply, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 301 in the electronic device loads the executable files corresponding to the processes of one or more application programs into the memory 302 according to the following instructions, and the processor 301 runs the application programs stored in the memory 302 to realize various functions, as follows:
[0102] Obtain the two-dimensional pixel matrix of the basic frame, which is periodic in at least one direction;
[0103] Determine the normalized coordinates of the point to be interpolated relative to the base frame;
[0104] Determine the pixel index corresponding to the target pixel unit where the normalized coordinates are located, and determine whether there is an interpolation coefficient corresponding to the target pixel unit in the coefficient cache array based on the pixel index;
[0105] When there is no interpolation coefficient corresponding to the target pixel unit in the coefficient cache array, the interpolation coefficient corresponding to the target pixel unit is calculated according to the prediction strategy;
[0106] The interpolation of the points to be interpolated is calculated based on the interpolation coefficients.
[0107] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0108] Therefore, embodiments of this application provide a storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the methods provided in embodiments of this application. For example, the instructions can execute the following steps:
[0109] Obtain the two-dimensional pixel matrix of the basic frame, which is periodic in at least one direction;
[0110] Determine the normalized coordinates of the point to be interpolated relative to the base frame;
[0111] Determine the pixel index corresponding to the target pixel unit where the normalized coordinates are located, and determine whether there is an interpolation coefficient corresponding to the target pixel unit in the coefficient cache array based on the pixel index;
[0112] When there is no interpolation coefficient corresponding to the target pixel unit in the coefficient cache array, the interpolation coefficient corresponding to the target pixel unit is calculated according to the prediction strategy;
[0113] The interpolation of the points to be interpolated is calculated based on the interpolation coefficients.
[0114] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0115] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0116] Since the instructions stored in the storage medium can execute the steps of any method provided in the embodiments of this application, the beneficial effects that any method provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0117] The periodic two-dimensional interpolation method, apparatus, storage medium, and electronic device provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A periodic two-dimensional interpolation method, characterized in that, include: Obtain a two-dimensional pixel matrix of a basic frame, wherein the basic frame is periodic in at least one direction, and the basic frame is the smallest region in the layout with periodic repeating features. Obtain the global coordinates (X, Y) of the point to be interpolated; Based on the width W, height H of the basic frame, and the global coordinates (X, Y), according to the formula... Normalized coordinates (x, y) within the range of the basic frame are calculated so that interpolation points outside the range of the basic frame can be interpolated based on the two-dimensional pixel matrix of the basic frame. This is the floor function; Determine the pixel index corresponding to the target pixel unit where the normalized coordinates are located, and determine whether there is an interpolation coefficient corresponding to the target pixel unit in the coefficient cache array based on the pixel index; When there is no interpolation coefficient corresponding to the target pixel unit in the coefficient cache array, the interpolation coefficient corresponding to the target pixel unit is calculated according to the prediction strategy; The interpolation of the point to be interpolated is calculated based on the interpolation coefficients.
2. The periodic two-dimensional interpolation method as described in claim 1, characterized in that, The step of calculating the interpolation coefficients corresponding to the target pixel unit according to the prediction strategy includes: Construct the left basis transformation matrix, the right basis transformation matrix, and the central value matrix; The interpolation coefficients corresponding to the target pixel unit are calculated based on the left basis transformation matrix, the right basis transformation matrix, and the center value matrix.
3. The periodic two-dimensional interpolation method as described in claim 2, characterized in that, Constructing the central value matrix includes: Generate the initial center value matrix; Obtain the light intensity value of each intersection point around the point to be interpolated; Calculate the derivative of each intersection point based on the light intensity value; Each derivative is placed into the initial center value matrix at a predetermined position to generate the center value matrix.
4. The periodic two-dimensional interpolation method as described in claim 1, characterized in that, The step of calculating the interpolation of the point to be interpolated based on the interpolation coefficients includes: Obtain the relative offset of the normalized coordinates with respect to the target pixel unit; The interpolation of the point to be interpolated is calculated based on the relative offset and the interpolation coefficient.
5. The periodic two-dimensional interpolation method as described in claim 2, characterized in that, The left basis transformation matrix, the right basis transformation matrix, and the central value matrix are all 4×4 matrices.
6. A periodic two-dimensional interpolation device, characterized in that, include: A matrix acquisition unit is used to acquire a two-dimensional pixel matrix of a basic frame, wherein the basic frame is periodic in at least one direction, and the basic frame is the smallest region in the layout with periodic repeating features. A coordinate determination unit is used to obtain the global coordinates (X, Y) of the point to be interpolated; based on the width W, height H of the basic frame and the global coordinates (X, Y), it calculates the coordinates according to the formula... Normalized coordinates (x, y) within the range of the basic frame are calculated so that interpolation points outside the range of the basic frame can be interpolated based on the two-dimensional pixel matrix of the basic frame. This is the floor function; An index determination unit is used to determine the pixel index corresponding to the target pixel unit where the normalized coordinates are located, and to determine whether there are interpolation coefficients corresponding to the target pixel unit in the coefficient cache array based on the pixel index. A coefficient calculation unit is used to calculate the interpolation coefficient corresponding to the target pixel unit according to the prediction strategy when there is no interpolation coefficient corresponding to the target pixel unit in the coefficient cache array. An interpolation calculation unit is used to calculate the interpolation of the point to be interpolated based on the interpolation coefficients.
7. A storage medium, characterized in that, The storage medium stores a plurality of instructions, which are adapted for loading by a processor to execute the periodic two-dimensional interpolation method according to any one of claims 1-5.
8. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the periodic two-dimensional interpolation method as described in any one of claims 1-5.
Citation Information
Patent Citations
Image processing device and pixel interpolation method
CN103430526A
Image processing method and device, hardware accelerator, chip and equipment
CN115601231A
Two-dimensional interpolation calculation method, system and terminal
CN119379535A