Detection and up-sampling method and device for diagonal features of single image
By modeling the local features of the original pixels in the source image in the southeast and northeast directions, filtering the diagonal region, and generating parameterized replacements, the problems of image quality degradation and poor local detail feature magnification in the existing technology are solved, and efficient image upsampling effect is achieved.
Patent Information
- Application Number
- CN202510877629.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-10-31
AI Technical Summary
When existing image super-resolution algorithms are implemented in fixed-function circuits, the image quality degrades or becomes distorted, and the amplification effect on local detail features is poor, failing to achieve high definition and color reproduction.
Local features of the original pixels in the source image are modeled in the southeast and northeast directions. Regions that can be classified as diagonal states are selected and parameterized reliable replacements are generated. The upsampled target image is generated in one calculation, and parameterized representation is used to avoid iterative calculation.
It achieves high-definition and color-fidelity image upsampling that is fully embedded in the hardware, improving image clarity and detail fidelity.
Smart Images

Figure CN120876211A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of real-time three-dimensional image processing technology, and in particular to a method and apparatus for detecting and upsampling diagonal features of a single image. Background Technology
[0002] Image super-resolution algorithms are image processing techniques that improve image resolution without sacrificing image quality, resulting in clearer and more stunning content presentation.
[0003] In the field of real-time 3D image processing, these algorithms improve application performance by reducing the number of pixels that must be processed per frame during rendering, while avoiding the disadvantages of increasing the processing time per pixel. These algorithms can be implemented in software; for example, by executing one or more post-processing shader instructions on a graphics processing unit (GPU); or by using hardware acceleration to implement the algorithm partially or entirely in fixed-function circuitry; or by employing machine learning methods and architectures with inherently programmable elements.
[0004] Existing image super-resolution algorithms are often unsuitable for implementation entirely within fixed-function circuits, consuming significant hardware and software resources and proving impractical in real-world production. Conversely, algorithms that can be fully implemented in fixed circuits often exhibit poor image processing performance; that is, increasing the resolution of the source image often results in image quality degradation or distortion. Furthermore, they fail to address specific local details in the source image that can be categorized as special cases, leading to poor resolution enhancement in those areas. The loss of numerous detailed features in the source image results in discrepancies between the enhanced and original images, failing to achieve the required high definition and color fidelity, and failing to present a more realistic and detailed image due to the loss of too many details.
[0005] Therefore, overcoming the shortcomings of the existing technology is an urgent problem to be solved in this technical field. Summary of the Invention
[0006] The technical problem to be solved by the present invention is to provide a method and apparatus for detecting and upsampling diagonal features of a single image. The purpose is to model the local features of the original pixels in the source image in the southeast and northeast directions, filter out the regions that can be classified as diagonal states, and generate a parameterized reliable replacement of the upsampled target image, thereby solving the problem that the existing technology has poor magnification effect for local detail features.
[0007] The present invention adopts the following technical solution: In a first aspect, the present invention provides a method for detecting and upsampling diagonal features of a single image, comprising: Based on the coverage value of the edges involved in the image patch in the source image, the image patch is detected to determine the original pixels located on the diagonal; The original pixels are modeled in the southeast and northeast directions to determine the magnification factor in at least one dimension; The original pixels are magnified according to the magnification factor to obtain multiple target pixels; the multiple target pixels are combined to generate a target image.
[0008] Furthermore, the step of modeling the original pixels in the southeast and northeast directions to determine the magnification factor in at least one dimension includes: The color value of the magnified pixel corresponding to the original pixel is determined based on the color values of the neighboring pixels in the southeast and northeast directions of the original pixel. Based on the color value of the magnified pixel, determine the parameterized overlay representation corresponding to the original pixel; The amplification factor is obtained based on the parameterized coverage representation.
[0009] Further, determining the color value of the magnified pixel corresponding to the original pixel based on the color values of its neighboring pixels in the southeast and northeast directions includes: In the northeast direction, when the color value of the original pixel is closer to the color value of its northeast neighboring pixel, the color value of the northeast neighboring pixel is used as the color value of the magnified pixel; when the color value of the original pixel is closer to the color value of its southwest neighboring pixel, the color value of the southwest neighboring pixel is used as the color value of the magnified pixel. In the southeast direction, when the color value of the original pixel is closer to the color value of its southeast neighboring pixels, the color value of the southeast neighboring pixels is used as the color value of the magnified pixel; when the color value of the original pixel is closer to the color value of its northwest neighboring pixels, the color value of the northwest neighboring pixels is used as the color value of the magnified pixel.
[0010] Furthermore, in the northeast direction, the color value of the magnified pixel is represented by the northeast center vector; The expression for the northeast intermediate vector is: ; Where i represents the horizontal pixel coordinate, and j represents the vertical pixel coordinate. This is the first amplified vector from the northeast. for The corresponding first northeast tolerance, This is the second amplified vector from the northeast. for The corresponding second northeast tolerance, It is a vertical negative coupling vector. It is a horizontal negative coupling vector. It is the vertical negative error coupling vector. This is the vertical positive error coupling vector. The horizontal positive error coupling vector, It is a horizontal positive coupling vector. It is a vertical positive coupling vector. The horizontal negative error coupling vector, The northeast positive coupling vector, The northeast negative coupling vector. The southeast positive coupling vector, The southeast negative coupling vector, This is the northeast positive error coupling vector. This is the negative error coupling vector in the northeast.
[0011] Furthermore, the parameterized coverage representation includes a southeast coverage representation and a northeast coverage representation; The process of obtaining the amplification factor based on the parameterized overlay representation includes: The southeast amplified gradient parameters are determined based on the southeast coverage representation; the northeast amplified gradient parameters are determined based on the northeast coverage representation; the expression for the northeast amplified gradient parameters is: ;in, This indicates coverage of the Northeast. The initial southeast tilt gradient parameter is obtained based on the difference between the k-fold southeast coverage representation and the southeast amplified gradient parameter; the initial northeast tilt gradient parameter is obtained based on the difference between the k-fold northeast coverage representation and the northeast amplified gradient parameter; when the first southeast amplified vector is greater than or equal to a preset invalid value, the negative of the initial southeast tilt gradient parameter is used as the target southeast tilt gradient parameter; when the first southeast amplified vector is less than a preset invalid value, the initial southeast tilt gradient parameter is used as the target southeast tilt gradient parameter; when the first northeast amplified vector is greater than or equal to a preset invalid value, the negative of the initial northeast tilt gradient parameter is used as the target northeast tilt gradient parameter; when the first northeast amplified vector is less than a preset invalid value, the initial northeast tilt gradient parameter is used as the target northeast tilt gradient parameter. Based on whether the first amplified northeast vector is less than a preset invalid value, linear interpolation is selectively performed on the southeast positive coupling vector and the southeast negative coupling vector based on the northeast coverage representation to obtain the southeast edge vector; based on whether the first amplified southeast vector is less than a preset invalid value, linear interpolation is selectively performed on the northeast positive coupling vector and the northeast negative coupling vector based on the southeast coverage representation to obtain the northeast edge vector. The product of the northeast amplified gradient parameter and the northeast edge vector is used as the first amplified intermediate value; the product of the southeast amplified gradient parameter and the southeast edge vector is used as the second amplified intermediate value; the product of the target northeast tilt gradient parameter and the northeast edge vector is used as the third amplified intermediate value; the product of the target southeast tilt gradient parameter and the southeast edge vector is used as the fourth amplified intermediate value; the sum of the first amplified intermediate value and the second amplified intermediate value is used as the diagonal horizontal parameter; the difference between the first amplified intermediate value and the second amplified intermediate value is used as the diagonal vertical parameter; the sum of the third amplified intermediate value and the fourth amplified intermediate value is used as the diagonal tilt parameter; the diagonal vertical parameter, the diagonal horizontal parameter, and the diagonal tilt parameter are used as amplification coefficients in their respective dimensions.
[0012] Further, the step of detecting the image patch based on the coverage value of the edge involved in the image patch in the source image and determining the original pixels located on the diagonal includes: Each edge in the image block is compared, and based on the first amplified southeast vector, the first southeast tolerance, the second amplified southeast vector, and the second southeast tolerance, the absolute value of the difference in the southeast edge coverage of adjacent pixel pairs and the southeast tolerance corresponding to the image block are determined; based on the first amplified northeast vector, the first northeast tolerance, the second amplified northeast vector, and the second northeast tolerance, the absolute value of the difference in the northeast edge coverage of adjacent pixel pairs and the northeast tolerance corresponding to the image block are determined; it is then determined whether each absolute value within the image block does not exceed the corresponding tolerance. Determine the edge coverage values of adjacent pixel pairs in the southeast direction and adjacent pixel pairs in the northeast direction within the image block respectively; determine whether all edge coverage values exceed the error threshold in the corresponding direction; In the southeast and northeast directions, for the original pixel located at the center of the diagonal corresponding to the image block, it is determined whether the symbol information of the original pixel at the center is the same as that of the neighboring pixels; wherein, the color value of the magnified pixel corresponding to the original pixel at the center is determined by the color value of the neighboring pixels; When the absolute values do not exceed the corresponding tolerance, all edge coverage values exceed the error threshold in the corresponding direction, and the symbol information is the same, the original pixel is located on the diagonal.
[0013] Further, determining whether the symbol information of the original pixel located at the center of the diagonal corresponding to the image patch is the same as that of its neighboring pixels, respectively, in the southeast and northeast directions, includes: The expression for determining whether the symbol information in the southeast direction is the same is: ; The expression for determining whether the symbol information in the corresponding northeast direction is the same is: ; When the corresponding symbol information is the same in both the southeast and northeast directions, the original pixel at the center has the same symbol information as its neighboring pixels. The corresponding judgment expression is: .
[0014] Furthermore, the parameterized coverage representation includes a southeast coverage representation and a northeast coverage representation; The step of determining the parameterized overlay representation corresponding to the original pixel based on the color value of the magnified pixel includes: Determine whether the color value of the magnified pixel exceeds the northeast error threshold; if it exceeds the northeast error threshold, then determine the projection of the original pixel along the axis defined by the northeast neighboring pixels as the northeast coverage representation of the original pixel; if it does not exceed the northeast error threshold, then the northeast coverage representation is a preset invalid value. Determine whether the color value of the magnified pixel exceeds the southeast error threshold; if it exceeds the southeast error threshold, then determine the projection of the original pixel along the axis defined by the southeast neighboring pixels as the southeast coverage representation corresponding to the original pixel; if it does not exceed the southeast error threshold, then the southeast coverage representation is a preset invalid value. The expression for the southeast coverage is: .
[0015] Secondly, the present invention also provides a device for detecting and upsampling diagonal features of a single image, used to implement the method for detecting and upsampling diagonal features of a single image as described in the first aspect, wherein the device for detecting and upsampling diagonal features of a single image comprises: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor for performing the method for detecting and upsampling diagonal features of a single image as described in the first aspect.
[0016] Thirdly, the present invention also provides a non-volatile computer storage medium storing computer-executable instructions that are executed by one or more processors to perform the method for detecting and upsampling diagonal features of a single image as described in the first aspect.
[0017] Fourthly, a chip is provided, comprising: a processor and an interface for calling and running a computer program stored in a memory, performing a method for detecting and upsampling diagonal features of a single image as described in the first aspect.
[0018] Fifthly, a computer program product containing instructions is provided, which, when executed on a computer or processor, causes the computer or processor to perform a method for detecting and upsampling diagonal features of a single image as described in the first to fourth aspects and any one thereof.
[0019] In a sixth aspect, a system for detecting and upsampling diagonal features of a single image is provided, comprising a device for detecting and upsampling diagonal features of a single image as described in the second aspect, and using the method for detecting and upsampling diagonal features of a single image as described in the first aspect to complete the interaction of the device for detecting and upsampling diagonal features of a single image as described in the second aspect.
[0020] Unlike existing technologies, the present invention has at least the following beneficial effects: This invention models the local features of the original pixels in the source image in the southeast and northeast directions, and filters out regions that can be classified as being located on the diagonal. Based on parametric modeling, the amplification coefficient of the local features in the upsampled target image is obtained, and an upsampled image with a good approximation effect can be generated through a single calculation. In particular, since this invention only uses parametric representation to determine the pixel boundary of the color value referenced for upsampling the original pixels, it is entirely based on mathematical calculations that do not involve iteration, so it can all be solidified in hardware, making it highly practical and able to achieve high clarity and color reproduction. Attached Figure Description
[0021] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments of the present invention will be briefly described below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0022] Figure 1 This is a flowchart illustrating a method for detecting and upsampling diagonal features in a single image, provided in an embodiment of the present invention. Figure 2 This is a specific example of a source image provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of obtaining a target pixel by magnifying an original pixel according to an embodiment of the present invention; Figure 4 This is a specific example of an original pixel located on the diagonal provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of a baseline vector provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of a coupling vector provided in an embodiment of the present invention; Figure 7 This is a flowchart illustrating step 10 provided in an embodiment of the present invention; Figure 8 This is a flowchart illustrating step 20 provided in an embodiment of the present invention; Figure 9 This is a flowchart illustrating step 201 provided in an embodiment of the present invention; Figure 10 This is a schematic diagram of a southeast intermediate vector provided in an embodiment of the present invention; Figure 11 This is a schematic diagram of a northeast intermediate vector provided in an embodiment of the present invention; Figure 12 This is a flowchart illustrating step 202 provided in an embodiment of the present invention; Figure 13 This is a schematic diagram of a target image using a universal filter response provided in an embodiment of the present invention; Figure 14 This is a schematic diagram of a target image using two filter responses provided in an embodiment of the present invention; Figure 15 This is a schematic diagram of a target image using three filter responses provided in an embodiment of the present invention; Figure 16 This is a schematic diagram of the architecture of a device for detecting and upsampling diagonal features of a single image, provided in an embodiment of the present invention. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0024] In the description of this invention, the terms "inner", "outer", "longitudinal", "lateral", "upper", "lower", "top", "bottom", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and do not require that this invention must be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting this invention.
[0025] In this invention, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.
[0026] In this invention, unless otherwise explicitly specified and limited, the term "connection" should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral part; it can be a direct connection or an indirect connection through an intermediate medium. Furthermore, the term "coupled" can refer to an electrical connection method for achieving signal transmission.
[0027] Furthermore, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0028] The source image contains a large number of original pixels arranged diagonally within image patches. Ignoring these special cases and processing them uniformly often results in poor resolution improvement. To address this issue, such as... Figure 1 As shown, Embodiment 1 of the present invention provides a method for detecting and upsampling diagonal features of a single image, including: Step 10: Detect the image block based on the coverage value of the edge involved in the image block in the source image, and determine the original pixels located on the diagonal.
[0029] The concept of custom objects in the embodiments of the present invention will be explained below: The source image refers to the image that needs to be enlarged, and the original pixels refer to the pixels that make up the source image; a specific example of a source image is... Figure 2 As shown, Figure 2 Each square in the diagram represents an original pixel. In this embodiment of the invention, the source image is magnified by a scaling factor of 2 to obtain a target image magnified by a factor of 2. The target image is composed of all the target pixels obtained after magnification.
[0030] In this embodiment of the invention, 4×4 original pixels in the source image are processed each time. Hereinafter, the 4×4 original pixels processed each time are referred to as an image patch. A possible specific implementation of an image patch is as follows: Figure 2 As shown in the gray area; in an optional embodiment, a 4×4 sliding window can be used to process the source image; multiple image blocks can be processed in parallel to improve efficiency.
[0031] like Figure 3 The image on the left is a specific example of an input image patch, such as... Figure 3 The image on the right shows the corresponding target pixels after the original 2×2 pixels in the middle of the image block are magnified by 2 times. Specifically, the original pixel marked "p11" is magnified into target pixels "p00", "p01", "p10", and "p11", and these four target pixels form the corresponding local region image; the original pixel marked "p12" is magnified into target pixels "p02", "p03", "p12", and "p13", and these four target pixels form the corresponding local region image; the original pixel marked "p21" is magnified into target pixels "p20", "p21", "p30", and "p31", and these four target pixels form the corresponding local region image; the original pixel marked "p22" is magnified into target pixels "p22", "p23", "p32", and "p33", and these four target pixels form the corresponding local region image; all the local region images obtained after magnifying the source image constitute the final target image.
[0032] It is worth noting that in this embodiment of the invention, each filter used to process the source image is based on a 3×3 filter kernel. This design aims to limit computational complexity and memory requirements. On the other hand, feature classification, i.e., the process of selecting and controlling filters, is inherently non-local and presents the same memory challenges as the filters themselves. This embodiment of the invention reduces the complexity of feature classification by describing it as a function of the parameters of neighboring pixels generated by a single filter kernel. The coupling of these parameters effectively expands the support for filters and also makes them suitable for parallel implementation. Thus, the number of output filtered results scales with the number of original pixels included in the feature classification operation. This is the simplest alignment method, where feature classification computation and results should be generalizable to all included neighboring pixels. That is, original pixels in the source image can be batch-processed in parallel, and the output target pixels can be generated in consecutive blocks, where the effective footprint of each corresponding input block is the union of the 3×3 filter kernels of its individual pixels. Furthermore, the block-based approach also allows limiting the increased memory requirements by restricting the input block size to 2×2 original pixels (considering that each original pixel corresponds to a 4×4 footprint on the aligned 3×3 filter kernel). Unlike designing the filtering kernel itself, finding a compromise is sufficient, or at least possible, where only a single adjacent set of horizontal or vertical (or diagonal) parameters is needed to generate sufficient classification results. It should be noted that for regular convolutional kernels, a block-based approach is also a natural choice, as blocks will correspond to some local bandwidth reduction buffers, which cannot further simplify the computation unless some explicit separation is made to the filtering kernel.
[0033] This invention is based on a local feature classification heuristic algorithm, comprehensively utilizing multiple filter responses to achieve a scaling factor of 2 for local features in the source image. To achieve high-fidelity detail, this invention abstracts the positional relationships between original pixels in the source image into two planes and a single straight edge between them; thus, it can selectively perform default upsampling on the planes (i.e., smooth regions), and achieve precise local scaling for the local features of the single straight edge and its surrounding area. The single-image diagonal feature point detection and upsampling method of this invention primarily targets the special case of two straight edges located on the diagonal (including only the front and back edges of the diagonal), providing an image super-resolution algorithm for processing this type of local detail. Specifically, it provides a diagonal intersection filter, specifically designed for processing aligned 2×2 image blocks in the source pixels; that is, the diagonal intersection filter is used to process two perpendicularly intersecting boundaries. Figure 4 The image shows a typical example located on a diagonal: four adjacent regions divided by two diagonals intersecting at right angles, such as... Figure 4As shown in the figure. The diagonal intersection filter of this invention is an intersection filter used to process two diagonal boundaries that intersect at right angles in a source image; as shown in the figure. Figure 4 As shown, there are two intersecting diagonal boundaries in the 4×4 pixel region of the source image. Therefore, a diagonal intersection filter is used to process the two boundaries in the 4×4 pixel region of the source image. For the diagonal intersection filter, the conditions of the two intersecting boundaries on the original pixel must be met simultaneously; otherwise, it cannot be processed as an intersecting boundary.
[0034] For the original pixel corresponding to a single straight edge between two planes, some simple parameters are used to represent the boundaries in the source image. Based on the boundary division, the pixel (i.e., color value) at the corresponding position in the expanded target image is determined. By ensuring that these parameters are approximate values that are valid in most cases, the computational complexity is reduced. The expression obtained from the parameters is used to determine how to perform upsampling.
[0035] Diagonal intersection filters produce better quality results near the diagonal intersection edges, but perform worse elsewhere. Therefore, minimizing the possibility of false positives is crucial. A false positive refers to a pixel that should have been classified as being amplified using a filter designed for other special cases or a general filter, but is incorrectly classified as being amplified using the diagonal intersection filter; a false negative is the opposite. According to the detection method of this invention, ideally, too many false negatives should not be generated. The corresponding classification criteria will be described in detail below.
[0036] Step 20: Model the original pixels in the southeast and northeast directions to determine the magnification factor in at least one dimension.
[0037] This invention obtains a reliable substitution of the feature decomposition of the target image based on the Haar wavelet transform method, and the amplification factor is used to characterize this reliable substitution. Since the image processing scheme of this invention is based on the assumption that the relationship between the original pixels can be modeled as two planes and a single straight edge between them, the processing of details where the corresponding diagonals intersect can be achieved using diagonal intersection filters on four planes divided by two vertical boundaries.
[0038] The relevant definitions and processes are explained below: It is a vector representing pixels, where i represents the horizontal pixel coordinate value and j represents the vertical pixel coordinate value; where the physical width of the image is w, the physical height is h, the pixel width is W, the pixel height is H, and the color value of each original pixel is the uniform average value over a rectangle centered on that original pixel, the physical width of which is... Physical height is It should be noted that although this may not produce optimal results from the perspective of sampling theory, this embodiment of the invention uses this method to define pixels in order to provide a universal solution for real-time 3D image processing.
[0039] Based on the above definitions, with an amplification factor of 2, this embodiment of the invention obtains a sufficiently good approximation of the target image based on Haar wavelet transform. Since the transformation matrix of the Haar wavelet transform is a sparse matrix, the computational cost is relatively small, making it very suitable for fast computation in real-time 3D image processing scenarios. This embodiment of the invention approximates the input signal (i.e., the source image) step by step, gradually decomposing the source image into sub-signals of different frequencies (i.e., local region images composed of target pixels). Specifically, for the input source image, it is split into 4 regional images, each sub-signal consisting of a continuous segment of the input signal, and these sub-signals constitute different frequency components of the input signal. An image with the same pixel width of 2W and pixel height of 2H can be obtained from the source image. It is converted from the source image. The image is divided into four quarters (four magnified regions), as shown in the following expression: ; More Haar coefficients can be obtained by determining the complementary set of Haar coefficients: ; in, , and For Haar coefficients, the complementary set of Haar coefficients refers to all other coefficients in the Haar wavelet transform besides the directly given Haar coefficients.
[0040] Based on the above expression, it is possible to base it on the source image. Reconstructed magnified image The details are as follows: ; ; ; ; The main function of this invention is to estimate the source image. All target pixels after magnification Or, to put it another way, to find a credible alternative, denoted as The Haar coefficients in the target image are denoted as... , and Calculate according to the following expression: ; Among them, such as Figure 3 As shown, , corresponding to a single original pixel m is the x-coordinate offset of the four magnified pixels in a 2×2 pixel matrix, and n is the y-coordinate offset of the four magnified pixels in a 2×2 pixel matrix. This represents a diagonal intersection filter; , and These are the characteristic decomposition coefficients; This is the magnification factor.
[0041] Step 30: Magnify the original pixel according to the magnification factor to obtain multiple target pixels; combine the multiple target pixels to generate a target image.
[0042] The reliable substitution based on the amplification factor As the target image The resulting four target pixels are as follows: ; ; ; ; By combining the images from the four regions above, we obtain the magnified target image. .
[0043] This invention models the local features of the original pixels in the source image in the southeast and northeast directions, and filters out regions that can be classified as being located on the diagonal. Based on parametric modeling, the amplification coefficient of the local features in the upsampled target image is obtained, and an upsampled image with a good approximation effect can be generated through a single calculation. In particular, since this invention only uses parametric representation to determine the pixel boundary of the color value referenced for upsampling the original pixels, it is entirely based on mathematical calculations that do not involve iteration, so it can all be solidified in hardware, making it highly practical and able to achieve high clarity and color reproduction.
[0044] Before providing a detailed description of the detection and upsampling methods in the embodiments of the present invention, the relevant definitions in the embodiments of the present invention will be explained first.
[0045] This invention defines a set of baseline vectors, as follows: ; ; For example, such as Figure 5 As shown, in , and In the schematic diagram, All represent the dark gray pixels in the middle; in In the schematic diagram, This represents the light purple pixel on the right. Indicates the dark purple pixel on the left; in In the schematic diagram, This indicates the light purple pixels at the top. Indicates the dark purple pixel below; in In the schematic diagram, This represents the light blue pixel in the upper right corner. This represents the dark purple pixel in the lower right corner. This represents the light blue pixel in the lower left corner. This represents the dark purple pixel in the upper left corner.
[0046] The diagonal intersection filter determines the relevant coverage value corresponding to the original pixel by relying on a set of common coupling vectors. The following is an explanation of the custom coupling vectors: Based on the original pixels in the source image, calculate a set of positive / negative coupling vectors; such as Figure 6 As shown, this invention represents the corresponding positive / negative coupling vectors on a set of 3×3 filter kernels, wherein the relative position directions (east, south, west, and north) of the original pixels are determined according to... Figure 6 The direction of the top-left coordinate axis is defined; the expressions for the positive / negative coupling vectors are as follows: .
[0047] The diagonal intersection filter also relies on an error threshold to meet certain classification criteria. The specific formula for the error threshold depends on how the source image was generated. A specific example of an error threshold based on sRGB (standard Red Green Blue) encoding is as follows: ; Where C is the error constant, and N is the precision of each color channel. It is a nonlinear transfer function. It is the color value of the red channel corresponding to each pixel. It is the color value of the green channel corresponding to each pixel. C is the color value of the blue channel corresponding to each pixel; in optional embodiments, C can be 1 / 4, 1 / 2, or 1; when based on the sRGB encoded source image, N is 8. It is approximately equal to 2.4.
[0048] Below is a set of definitions for the error coupling vector for each original pixel: ; It should be noted that, for a given original pixel, each negative coupling vector corresponds to the positive coupling vector of its neighboring pixels (i.e., adjacent original pixels), and vice versa; the error coupling vector is similar. Therefore, for specific implementations that use shared memory to process multiple original pixels in parallel, it is necessary to compute many asymptotic and arbitrary derivations of half of the vectors.
[0049] The diagonal intersection filter is also characterized by defining corresponding error tolerances for both the horizontal and vertical baseline vectors, as follows: ;in, To provide an error tolerance for the horizontal baseline vector, This is the error tolerance for the vertical baseline vector.
[0050] To detect the location of original pixels in the source image and selectively process original pixels located on the diagonal using a diagonal intersection filter, this embodiment of the invention provides three tests: uniformity test, invalidity check, and sign consistency test. The comprehensive classification result obtained from these tests is used to activate the diagonal intersection filter at the granularity of aligned 2×2 image blocks in the source image, thereby using the diagonal intersection filter to complete the response to the corresponding original pixels. Specifically, as... Figure 7 As shown, step 10 includes: Step 101: Compare each edge in the image block, and based on the first amplified southeast vector, the first southeast tolerance, the second amplified southeast vector, and the second southeast tolerance, determine the absolute value of the difference in the southeast edge coverage of adjacent pixel pairs, and the southeast tolerance corresponding to the image block; based on the first amplified northeast vector, the first northeast tolerance, the second amplified northeast vector, and the second northeast tolerance, determine the absolute value of the difference in the northeast edge coverage of adjacent pixel pairs, and the northeast tolerance corresponding to the image block; determine whether each absolute value in the image block does not exceed the corresponding tolerance.
[0051] in, This represents the first amplified vector in the southeast direction. This represents the second southeast vector after magnification. This represents the first amplified vector from the northeast direction. This represents the second amplified vector from the northeast.
[0052] When performing uniformity testing on image patches in the source image, due to the geometric characteristics of the diagonal, there is often no complete neighborhood set in the diagonal direction, so only one comparison can be performed for each edge direction.
[0053] The original pixel and its neighboring pixels in the southeast direction are identified as adjacent pixel pairs. The absolute value of the difference in the coverage range of the southeast edge of the adjacent pixel pair is taken as the coverage value difference of the edge corresponding to the original pixel and the neighboring pixel in the southeast direction in the southeast direction. The original pixel and its neighboring pixels in the northeast direction are identified as adjacent pixel pairs. The absolute value of the difference in the coverage range of the northeast edge of the adjacent pixel pair is taken as the coverage value difference of the edge corresponding to the original pixel and the neighboring pixel in the northeast direction in the northeast direction.
[0054] The difference in coverage value between adjacent pixel pairs in the northeast direction (the corresponding coverage value is rescaled according to the segmentation elimination method) is as follows: ; This allows us to determine the corresponding Northeast tolerance. Among them, the northeast tolerance is the first-order error range in the northeast direction.
[0055] Similarly, the difference in southeast edge coverage values for adjacent pixel pairs in the southeast direction (the corresponding coverage values are rescaled according to the segmentation elimination method) is as follows: ; Southeast tolerance .
[0056] If, in an aligned 2×2 image patch, the absolute values of the differences in the coverage areas of the southeast edges of (single) adjacent pixel pairs and the absolute values of the differences in the coverage areas of the northeast edges of adjacent pixel pairs do not exceed their respective first-order error ranges, then the image patch passes the uniformity test. The expression for this judgment is: .
[0057] It should be noted that without the northeast and southeast tolerances, very few image patches can pass the uniformity test; and in a space with uniform pixel error, the expression for the error boundary may be simplified, but this is not the case for images encoded with sRGB.
[0058] Step 102: Determine the edge coverage values of adjacent pixel pairs in the southeast direction and adjacent pixel pairs in the northeast direction within the image block respectively; determine whether all edge coverage values exceed the error threshold in the corresponding direction.
[0059] Since each edge is compared only once, to avoid numerous false positives, it's crucial to ensure that these classification results don't easily pass due to the presence of null vectors. Therefore, all edge coverage values must exceed their corresponding error thresholds; specifically, the edge coverage values of adjacent pixel pairs in the northeast direction must exceed the northeast error threshold, and the edge coverage values of adjacent pixel pairs in the southeast direction must exceed the southeast error threshold. For this, the image patch passes the invalidity check. The expression for this check is as follows: Among them, the southeast error threshold Northeast Error Threshold .
[0060] Step 103: In the southeast and northeast directions, for the original pixel located at the center of the diagonal corresponding to the image block, determine whether the symbol information of the original pixel at the center is the same as that of the neighboring pixels; wherein, the color value of the magnified pixel corresponding to the original pixel at the center is determined by the color value of the neighboring pixels.
[0061] Another simple classification test to be performed is to check whether the sign information of the coverage between each center pixel position and its selected displacement neighbor pixels (i.e. which side the edge is closest to) is consistent.
[0062] Specifically, the expression for determining whether the symbol information in the southeast direction is the same is: ; The expression for determining whether the symbol information in the corresponding northeast direction is the same is: ; When the corresponding symbol information is the same in both the southeast and northeast directions, the original pixel at the center has the same symbol information as its neighboring pixels. Therefore, the image block passes the symbol consistency test. The corresponding expression for this judgment is: .
[0063] Step 104: When the absolute values do not exceed the corresponding tolerance, all edge coverage values exceed the error threshold in the corresponding direction, and the symbol information is the same, the original pixel is located on the diagonal.
[0064] When the uniformity test, invalidity test, and sign consistency test all pass, the original pixels are classified as special cases located on the diagonal, and the diagonal intersection filter response is used to achieve the best upsampling effect; for the original pixels Classification results The expression is as follows: .
[0065] The following explains the special processing scheme of the diagonal intersection filter for the original pixels. For example... Figure 8 As shown, step 20 includes: Step 201: Determine the color value of the magnified pixel corresponding to the original pixel based on the color values of the neighboring pixels in the southeast and northeast directions of the original pixel.
[0066] The key difference between original pixels located diagonally and other special cases based on two axis-aligned intersection boundaries (e.g., axis-aligned intersection) is that the calculation of the overlay value automatically deviates from the pixel center. To determine the corresponding parameterized overlay representation and prevent image quality degradation, it is necessary to select neighboring pixels based on displacement as a reference for the upsampled color value. Because in the diagonal state, if there is no difference between the original pixel and its neighboring pixels, it is inconvenient to borrow surface probes from neighboring pixels in the original 2×2 pixels along the diagonal direction for selection (for original pixels in an axis-aligned intersection state, this can be done). To avoid the difference between the original pixel and its neighboring pixels being 0 in the diagonal direction, we can select adjacent pixels in the 2×2 pixels that are offset diagonally from the original pixel to calculate the pixel color difference and overlay value, i.e., the pixel... and pixels Offset between, or pixels and pixels Offset between.
[0067] It should be noted that when using the diagonal intersection filter of this embodiment of the invention, the calculation of the coverage value will unconditionally deviate from the pixel center.
[0068] Step 202: Determine the parameterized overlay representation corresponding to the original pixel based on the color value of the magnified pixel.
[0069] In the process of determining the parameterized overlay representation in this embodiment of the invention, the importance of the estimated value of the parameterized overlay representation is first evaluated based on the error threshold in the corresponding direction: if the color difference exceeds the given error threshold, the corresponding parameterized overlay representation is given based on the corresponding projection; otherwise, it is forced to zero.
[0070] Step 203: Obtain the amplification factor based on the parameterized overlay representation.
[0071] After the diagonal intersecting filter responds, it ultimately outputs a series of amplification coefficients.
[0072] Specifically, such as Figure 9 As shown, step 201 includes: Step 2011: In the northeast direction, when the color value of the original pixel is closer to the color value of the northeast neighboring pixel of the original pixel, the color value of the northeast neighboring pixel is used as the color value of the magnified pixel; when the color value of the original pixel is closer to the color value of the southwest neighboring pixel of the original pixel, the color value of the southwest neighboring pixel is used as the color value of the magnified pixel.
[0073] like Figure 10 As shown, to simplify subsequent expressions, this embodiment of the invention defines an intermediate parameter vector, namely the Northeast intermediate vector. In the northeast direction, the color value of the magnified pixel is represented by the northeast center vector; The expression for the northeast intermediate vector is: ; Where i represents the horizontal pixel coordinate, and j represents the vertical pixel coordinate. This is the first amplified vector from the northeast. for The corresponding first northeast tolerance, This is the second amplified vector from the northeast. for The corresponding second northeast tolerance, It is a vertical negative coupling vector. It is a horizontal negative coupling vector. It is the vertical negative error coupling vector. This is the vertical positive error coupling vector. The horizontal positive error coupling vector, It is a horizontal positive coupling vector. It is a vertical positive coupling vector. The horizontal negative error coupling vector, The northeast positive coupling vector, The northeast negative coupling vector. The southeast positive coupling vector, The southeast negative coupling vector, The northeast positive error coupling vector, This represents the negative error coupling vector to the northeast. It should be noted that in all embodiments of this invention, z represents the southeast direction and w represents the northeast direction.
[0074] Step 2012: In the southeast direction, when the color value of the original pixel is closer to the color value of the southeast neighboring pixel of the original pixel, the color value of the southeast neighboring pixel is used as the color value of the magnified pixel; when the color value of the original pixel is closer to the color value of the northwest neighboring pixel of the original pixel, the color value of the northwest neighboring pixel is used as the color value of the magnified pixel.
[0075] like Figure 11 As shown, similarly, this embodiment of the invention also defines another intermediate parameter vector, namely the southeast intermediate vector. Its expression is: .
[0076] To determine the parameterized cover representation in the southeast and northeast directions, such as Figure 12 As shown, the parameterized coverage representation includes a southeast coverage representation and a northeast coverage representation; step 202 includes: Step 2021: Determine whether the color value of the magnified pixel exceeds the northeast error threshold; if it exceeds the northeast error threshold, then determine the projection of the original pixel along the axis defined by the northeast neighboring pixels as the northeast coverage representation corresponding to the original pixel; if it does not exceed the northeast error threshold, then the northeast coverage representation is a preset invalid value.
[0077] The default invalid value is 0. The expression for the above judgment implemented within the diagonal intersection filter can be: .
[0078] Step 2022: Determine whether the color value of the magnified pixel exceeds the southeast error threshold; if it exceeds the southeast error threshold, then determine the projection of the original pixel along the axis defined by the southeast neighboring pixels as the southeast coverage representation corresponding to the original pixel; if it does not exceed the southeast error threshold, then the southeast coverage representation is a preset invalid value.
[0079] The expression for the above judgment implemented within the diagonal intersection filter can be: .
[0080] To determine the corresponding magnification factor, step 203 includes: Step 2031: Determine the southeast amplified gradient parameter based on the southeast coverage representation; determine the northeast amplified gradient parameter based on the northeast coverage representation; the expression for the northeast amplified gradient parameter is: ;in, This indicates coverage of the Northeast.
[0081] The southeast amplification gradient parameters are determined in the same way, and their expression is as follows: .
[0082] Step 2032: Based on the difference between the k-fold southeast coverage representation and the southeast amplified gradient parameter, obtain the initial southeast tilt gradient parameter; based on the difference between the k-fold northeast coverage representation and the northeast amplified gradient parameter, obtain the initial northeast tilt gradient parameter; when the first amplified southeast vector is greater than or equal to a preset invalid value, use the negative of the initial southeast tilt gradient parameter as the target southeast tilt gradient parameter; when the first amplified southeast vector is less than a preset invalid value, use the initial southeast tilt gradient parameter as the target southeast tilt gradient parameter; when the first amplified northeast vector is greater than or equal to a preset invalid value, use the negative of the initial northeast tilt gradient parameter as the target northeast tilt gradient parameter; when the first amplified northeast vector is less than a preset invalid value, use the initial northeast tilt gradient parameter as the target northeast tilt gradient parameter.
[0083] The expression for the initial southeast slope gradient parameters is: ; The expression for the initial northeast slope gradient parameters is: ; The expression for the target's southeast slope gradient parameter is: ; The expression for the target's northeast slope gradient parameter is: .
[0084] Step 2033: Based on whether the first amplified northeast vector is less than a preset invalid value, selectively perform linear interpolation on the southeast positive coupling vector and the southeast negative coupling vector based on the northeast coverage representation to obtain the southeast edge vector; based on whether the first amplified southeast vector is less than a preset invalid value, selectively perform linear interpolation on the northeast positive coupling vector and the northeast negative coupling vector based on the southeast coverage representation to obtain the northeast edge vector.
[0085] Southeast edge vector From the relative reference vector and Utilizing the coverage area of the northeastern edge, and in accordance with The relevant symbol information is used to perform linear interpolation between them, thereby approximating the central mean. The specific expression is as follows: ; Similarly, the expression for the northeast edge vector is: .
[0086] It should be noted that, in the embodiments of the present invention and These are different concepts. Intermediate parameters defined in displacement selection It is an intermediate variable that simplifies the derivation of the diagonal intersection filter, by and Derive the coverage parameters And the magnification factor " " "and" When, in the formula That is the final diagonal boundary vector, based on the intermediate variables. The different values are determined by the coverage parameters. Reference vector and expression.
[0087] Step 2034: The product of the northeast amplified gradient parameter and the northeast edge vector is used as the first amplified intermediate value; the product of the southeast amplified gradient parameter and the southeast edge vector is used as the second amplified intermediate value; the product of the target northeast tilt gradient parameter and the northeast edge vector is used as the third amplified intermediate value; the product of the target southeast tilt gradient parameter and the southeast edge vector is used as the fourth amplified intermediate value; the sum of the first amplified intermediate value and the second amplified intermediate value is used as the diagonal horizontal parameter; the difference between the first amplified intermediate value and the second amplified intermediate value is used as the diagonal vertical parameter; the sum of the third amplified intermediate value and the fourth amplified intermediate value is used as the diagonal tilt parameter; the diagonal vertical parameter, the diagonal horizontal parameter, and the diagonal tilt parameter are used as amplification coefficients in their respective dimensions.
[0088] The expression for the magnification factor is as follows: ; ; .
[0089] Based on the assumption of a single straight edge between the two planes, when using an alternative filter for processing, the resulting upsampled image is as follows: Figure 13 As shown; to further enhance the quality of the upsampled image, additional filters are used to process discontinuous pixels that do not conform to the assumption of a single straight edge between the two planes. The specific processing areas are shown in the figure. Figure 14 The image features within the middle circle are shown; as follows: Figure 15 As shown, the corresponding pixels within the circle visually exhibit a diagonal intersection feature, which is used in... Figure 13 and Figure 14 Under the above three filter pairs, and by combining the responses of the diagonal intersecting filter pairs in the embodiments of the present invention, the following is obtained: Figure 15 The targeted processing results shown are in Figure 15 The black and white intersecting area within the middle circle is filtered using a diagonal intersection filter. Figure 15 The black and white intersection boundary in the middle is compared to Figure 14 The corresponding position is clearer, with fewer gray error pixels.
[0090] It should be noted that the detection and upsampling of diagonal features of a single image in this invention are not limited to use in single image super-resolution algorithms. The relevant technical features can be transferred to video super-resolution algorithms, etc. Those skilled in the art can implement this invention by referring to the embodiments of this invention without creative effort.
[0091] like Figure 16 The diagram shown is a schematic representation of the architecture of a single-image diagonal feature detection and upsampling device according to an embodiment of the present invention. This single-image diagonal feature detection and upsampling device includes one or more processors 21 and a memory 22. Figure 16 Take a processor 21 as an example.
[0092] Processor 21 and memory 22 can be connected via a bus or other means. Figure 16 Taking the example of a connection between China and Israel via a bus.
[0093] The memory 22, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs and non-volatile computer-executable programs, such as the method for detecting and upsampling diagonal features of a single image in this embodiment. The processor 21 executes the method for detecting and upsampling diagonal features of a single image by running the non-volatile software program and instructions stored in the memory 22.
[0094] Memory 22 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 22 may optionally include memory remotely located relative to processor 21, which can be connected to processor 21 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0095] The program instructions / modules are stored in the memory 22. When executed by one or more processors 21, they perform the single-image diagonal feature detection and upsampling method described in the above embodiments, for example, executing the method described above. Figure 1 , Figures 7 to 9 and Figure 12 The steps shown.
[0096] This invention also provides a non-volatile computer storage medium storing computer-executable instructions that are executed by one or more processors, for example... Figure 16One of the processors 21 can enable the above-described one or more processors to execute the single-image diagonal feature detection and upsampling method in the specific embodiments of the present invention, for example, to execute the above-described... Figure 1 , Figures 7-9 and Figure 12 The steps shown can also be implemented. Figure 16 The various modules and units described above; or the method for detecting and upsampling diagonal features of a single image as described in the specific embodiments of the present invention, for example, executing the method described above. Figure 1 , Figures 7 to 9 and Figure 12 The steps shown can also be implemented. Figure 16 The aforementioned modules and units.
[0097] It is worth noting that the information interaction and execution process between the modules and units in the above-mentioned device and system are based on the same concept as the processing method embodiment of the present invention. For details, please refer to the description in the method embodiment of the present invention, and will not be repeated here.
[0098] Those skilled in the art will understand that all or part of the steps in the various methods of the embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc.
[0099] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for detecting and upsampling diagonal features of a single image, characterized in that, include: Based on the coverage value of the edges involved in the image patch in the source image, the image patch is detected to determine the original pixels located on the diagonal; The original pixels are modeled in the southeast and northeast directions to determine the magnification factor in at least one dimension; The original pixel is magnified according to the magnification factor to obtain multiple target pixels; The multiple target pixels are combined to generate a target image.
2. The method for detecting and upsampling diagonal features of a single image according to claim 1, characterized in that, The step of modeling the original pixels in the southeast and northeast directions and determining the magnification factor in at least one dimension includes: The color value of the magnified pixel corresponding to the original pixel is determined based on the color values of the neighboring pixels in the southeast and northeast directions of the original pixel. Based on the color value of the magnified pixel, determine the parameterized overlay representation corresponding to the original pixel; The amplification factor is obtained based on the parameterized coverage representation.
3. The method for detecting and upsampling diagonal features of a single image according to claim 2, characterized in that, The step of determining the color value of the magnified pixel corresponding to the original pixel based on the color values of the neighboring pixels in the southeast and northeast directions of the original pixel includes: In the northeast direction, when the color value of the original pixel is closer to the color value of its northeast neighboring pixel, the color value of the northeast neighboring pixel is used as the color value of the magnified pixel; when the color value of the original pixel is closer to the color value of its southwest neighboring pixel, the color value of the southwest neighboring pixel is used as the color value of the magnified pixel. In the southeast direction, when the color value of the original pixel is closer to the color value of its southeast neighboring pixels, the color value of the southeast neighboring pixels is used as the color value of the magnified pixel; when the color value of the original pixel is closer to the color value of its northwest neighboring pixels, the color value of the northwest neighboring pixels is used as the color value of the magnified pixel.
4. The method for detecting and upsampling diagonal features of a single image according to claim 3, characterized in that, In the northeast direction, the color value of the magnified pixel is represented by the northeast center vector; The expression for the northeast intermediate vector is: ; Where i represents the horizontal pixel coordinate, and j represents the vertical pixel coordinate. This is the first amplified vector from the northeast. for The corresponding first northeast tolerance, This is the second amplified vector from the northeast. for The corresponding second northeast tolerance, It is a vertical negative coupling vector. It is a horizontal negative coupling vector. It is the vertical negative error coupling vector. This is the vertical positive error coupling vector. The horizontal positive error coupling vector, It is a horizontal positive coupling vector. It is a vertical positive coupling vector. The horizontal negative error coupling vector, The northeast positive coupling vector, The northeast negative coupling vector. The southeast positive coupling vector, The southeast negative coupling vector, This is the northeast positive error coupling vector. This is the negative error coupling vector in the northeast.
5. The method for detecting and upsampling diagonal features of a single image according to claim 4, characterized in that, The parameterized coverage representation includes southeast coverage representation and northeast coverage representation; The process of obtaining the amplification factor based on the parameterized overlay representation includes: The southeast amplified gradient parameters are determined based on the southeast coverage representation; the northeast amplified gradient parameters are determined based on the northeast coverage representation; the expression for the northeast amplified gradient parameters is: ;in, This indicates coverage of the Northeast. The initial southeast tilt gradient parameter is obtained based on the difference between the k-fold southeast coverage representation and the southeast amplified gradient parameter; the initial northeast tilt gradient parameter is obtained based on the difference between the k-fold northeast coverage representation and the northeast amplified gradient parameter; when the first southeast amplified vector is greater than or equal to a preset invalid value, the negative of the initial southeast tilt gradient parameter is used as the target southeast tilt gradient parameter; when the first southeast amplified vector is less than a preset invalid value, the initial southeast tilt gradient parameter is used as the target southeast tilt gradient parameter; when the first northeast amplified vector is greater than or equal to a preset invalid value, the negative of the initial northeast tilt gradient parameter is used as the target northeast tilt gradient parameter; when the first northeast amplified vector is less than a preset invalid value, the initial northeast tilt gradient parameter is used as the target northeast tilt gradient parameter. Based on whether the first amplified northeast vector is less than a preset invalid value, linear interpolation is selectively performed on the southeast positive coupling vector and the southeast negative coupling vector based on the northeast coverage representation to obtain the southeast edge vector; based on whether the first amplified southeast vector is less than a preset invalid value, linear interpolation is selectively performed on the northeast positive coupling vector and the northeast negative coupling vector based on the southeast coverage representation to obtain the northeast edge vector. The product of the northeast amplified gradient parameter and the northeast edge vector is used as the first amplified intermediate value; the product of the southeast amplified gradient parameter and the southeast edge vector is used as the second amplified intermediate value; the product of the target northeast tilt gradient parameter and the northeast edge vector is used as the third amplified intermediate value; the product of the target southeast tilt gradient parameter and the southeast edge vector is used as the fourth amplified intermediate value; the sum of the first amplified intermediate value and the second amplified intermediate value is used as the diagonal horizontal parameter; the difference between the first amplified intermediate value and the second amplified intermediate value is used as the diagonal vertical parameter; the sum of the third amplified intermediate value and the fourth amplified intermediate value is used as the diagonal tilt parameter; the diagonal vertical parameter, the diagonal horizontal parameter, and the diagonal tilt parameter are used as amplification coefficients in their respective dimensions.
6. The method for detecting and upsampling diagonal features of a single image according to claim 4, characterized in that, The step of detecting the image patch based on the coverage value of the edges involved in the image patch in the source image and determining the original pixels located on the diagonal includes: Each edge in the image block is compared, and based on the first amplified southeast vector, the first southeast tolerance, the second amplified southeast vector, and the second southeast tolerance, the absolute value of the difference in the southeast edge coverage of adjacent pixel pairs and the southeast tolerance corresponding to the image block are determined; based on the first amplified northeast vector, the first northeast tolerance, the second amplified northeast vector, and the second northeast tolerance, the absolute value of the difference in the northeast edge coverage of adjacent pixel pairs and the northeast tolerance corresponding to the image block are determined; it is then determined whether each absolute value within the image block does not exceed the corresponding tolerance. Determine the edge coverage values of adjacent pixel pairs in the southeast direction and adjacent pixel pairs in the northeast direction within the image block respectively; determine whether all edge coverage values exceed the error threshold in the corresponding direction; In the southeast and northeast directions, for the original pixel located at the center of the diagonal corresponding to the image block, it is determined whether the symbol information of the original pixel at the center is the same as that of the neighboring pixels; wherein, the color value of the magnified pixel corresponding to the original pixel at the center is determined by the color value of the neighboring pixels; When the absolute values do not exceed the corresponding tolerance, all edge coverage values exceed the error threshold in the corresponding direction, and the symbol information is the same, the original pixel is located on the diagonal.
7. The method for detecting and upsampling diagonal features of a single image according to claim 6, characterized in that, The step of determining whether the symbol information of the original pixel located at the center of the diagonal corresponding to the image patch is the same as that of its neighboring pixels, respectively in the southeast and northeast directions, includes: The expression for determining whether the symbol information in the southeast direction is the same is: ; The expression for determining whether the symbol information in the corresponding northeast direction is the same is: ; When the corresponding symbol information is the same in both the southeast and northeast directions, the original pixel at the center has the same symbol information as its neighboring pixels. The corresponding judgment expression is: 。 8. The method for detecting and upsampling diagonal features of a single image according to claim 2, characterized in that, The parameterized coverage representation includes southeast coverage representation and northeast coverage representation; The step of determining the parameterized overlay representation corresponding to the original pixel based on the color value of the magnified pixel includes: Determine whether the color value of the magnified pixel exceeds the northeast error threshold; if it exceeds the northeast error threshold, then determine the projection of the original pixel along the axis defined by the northeast neighboring pixels as the northeast coverage representation of the original pixel; if it does not exceed the northeast error threshold, then the northeast coverage representation is a preset invalid value. Determine whether the color value of the magnified pixel exceeds the southeast error threshold; if it exceeds the southeast error threshold, then determine the projection of the original pixel along the axis defined by the southeast neighboring pixels as the southeast coverage representation corresponding to the original pixel; if it does not exceed the southeast error threshold, then the southeast coverage representation is a preset invalid value.
9. A device for detecting and upsampling diagonal features of a single image, characterized in that, The single-image diagonal feature detection and upsampling device includes at least one processor and a memory, which are connected via a data bus. The memory stores instructions that can be executed by the at least one processor. After being executed by the processor, the instructions are used to implement the single-image diagonal feature detection and upsampling method according to any one of claims 1 to 8.
10. A non-volatile computer storage medium, characterized in that, The computer storage medium stores computer-executable instructions, which are executed by one or more processors to perform the method for detecting and upsampling diagonal features of a single image as described in any one of claims 1 to 8.