Image processing method, computer device and computer readable storage medium
By employing filters and filter weights of different regions in image processing, the problem that traditional filters cannot adapt to differences in image features is solved, achieving both accuracy and efficiency in generating high-quality images.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BYD CO LTD
- Filing Date
- 2025-09-28
- Publication Date
- 2026-07-14
AI Technical Summary
Traditional Lanczos filters cannot adapt to the feature differences in different regions of an image, resulting in image quality degradation and making it difficult to meet the requirements for high-quality image generation.
Based on the features of the input image, different filters are used to perform super-resolution processing on different types of regions. Dynamic filters are used for edge texture regions, while fixed filters are used for flat regions. The region type is determined by dynamic filtering weights and multi-dimensional features to avoid computational redundancy and resource waste.
It improves the accuracy and efficiency of image processing, avoids image quality degradation, and ensures high-quality image generation.
Smart Images

Figure CN122390964A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to an image processing method, computer device, computer-readable storage medium, and computer program product. Background Technology
[0002] In image super-resolution technology, the Lanczos filter is the mainstream interpolation tool. It upscales low-resolution images through multi-sampling and weighted operations, providing a basic high-definition visual presentation effect for various terminal applications. However, traditional Lanczos filters use fixed parameters to process the entire image uniformly, which cannot adapt to the feature differences in different regions of the image, thus causing image quality degradation and failing to meet the needs of high-quality image generation. Summary of the Invention
[0003] This application provides an image processing method, a computer device, a computer-readable storage medium, and a computer program product.
[0004] This application provides an image processing method, the image processing method comprising: Based on a first feature of a first sampling range of the input image, and assuming the target pixel is located in a first type region, a first super-resolution process is performed on the input image based on a first filter and the brightness value of each pixel in a second sampling range to generate a target image. The first sampling range includes the target pixel and first neighboring pixels associated with the target pixel. The first type region indicates regions in the input image where edge textures exist. The second sampling range includes the target pixel and second neighboring pixels associated with the target pixel, and the number of pixels in the second neighboring pixels is greater than the number of pixels in the first neighboring pixels. If the target pixel is determined to be located in a second type region, the input image is subjected to a second super-resolution process based on a second filter and the brightness value of each pixel within the first sampling range to generate the target image, wherein the second type region is used to indicate a flat region in the input image.
[0005] Thus, based on the first feature of the first sampling range of the input image, and assuming the target pixel is located in a first type region, a first super-resolution process is performed on the input image based on the brightness value of each pixel within a second sampling range, using a first filter, to generate the target image. The first sampling range includes the target pixel and its associated first neighboring pixels. The first type region indicates areas in the input image where edge textures exist. The second sampling range includes the target pixel and its associated second neighboring pixels, where the number of pixels in the second neighboring region is greater than the number of pixels in the first neighboring region. Next, assuming the target pixel is located in a second type region, a second super-resolution process is performed on the input image based on the brightness value of each pixel within the first sampling range, using a second filter, to generate the target image. The second type region indicates flat areas in the input image. By using different filters to process target pixels in different types of regions, the uneven distribution of computational resources caused by applying a uniform processing flow to pixels in any type of region in traditional super-resolution processing can be solved, avoiding unnecessary computational redundancy and resource waste. Furthermore, for target pixels located in the first type of region with edge texture, a larger second sampling range is adopted, and the first filter is used for targeted first super-resolution processing, thereby ensuring that the first filter can adapt to the local features of the target pixel, avoiding the image quality loss that occurs when traditional fixed parameter filters process tilted edges and complex textures, and improving the accuracy of image processing.
[0006] In some implementations, the first feature includes at least one of the following: luminance gradient intensity, gradient direction dispersion, and luminance value variance of the first sampling range.
[0007] Thus, the first feature includes at least one of the following: the brightness gradient intensity, the gradient direction dispersion, and the brightness value variance of the first sampling range. In this way, by using at least one of the following as the first feature, flexible combination and selection of multi-dimensional features can be achieved, ensuring accuracy in determining the type of the region where the target pixel is located.
[0008] In some implementations, the target pixel is determined to be located in the first type region when the brightness gradient intensity is greater than or equal to a preset gradient threshold, or the gradient direction dispersion is greater than or equal to a preset direction dispersion, or the brightness value variance is greater than or equal to a preset brightness value variance; the target pixel is determined to be located in the second type region when the brightness gradient intensity is less than the preset gradient threshold, the gradient direction dispersion is less than the preset direction dispersion, and the brightness value variance is less than the preset brightness value variance.
[0009] Thus, if the brightness gradient intensity is greater than or equal to a preset gradient threshold, or the gradient direction dispersion is greater than or equal to a preset direction dispersion, or the brightness value variance is greater than or equal to a preset brightness value variance, the target pixel is determined to be located in a first-type region. If the brightness gradient intensity is less than a preset gradient threshold, the gradient direction dispersion is less than a preset direction dispersion, and the brightness value variance is less than a preset brightness value variance, the target pixel is determined to be located in a second-type region. By using multiple determination methods to identify the type of region where the target pixel is located, it is possible to effectively avoid missed detections due to insufficient single features, thereby preventing regions requiring detailed preservation from being included in the simplified processing flow due to misjudgment, and providing accurate region segmentation basis for subsequent differentiated super-resolution.
[0010] In some embodiments, the first super-resolution processing includes weighted accumulation processing of the input image based on the dynamic filtering weights of the first filter and the brightness value of each pixel within the second sampling range. The dynamic filtering weights are generated based on a negative lobe intensity parameter and a distance parameter. The negative lobe intensity parameter is generated based on the accumulated gradient intensity, which is calculated based on the brightness value of each pixel within the second sampling range. The distance parameter is generated based on an anisotropic stretching coefficient, a first offset, a second offset, and a truncation parameter. The anisotropic stretching coefficient is generated based on a stretching coefficient and the accumulated gradient intensity, and includes a first preset direction stretching coefficient and a second preset direction stretching coefficient. Both the first offset and the second offset are generated based on the accumulated gradient direction vector and the obtained sampling point coordinate offset information, and the accumulated gradient direction vector is calculated based on the brightness value of each pixel within the second sampling range.
[0011] Thus, the first super-resolution process includes dynamic filtering weights based on a first filter, which perform weighted accumulation processing on the input image according to the brightness value of each pixel within the second sampling range. The dynamic filtering weights are generated based on a negative lobe intensity parameter and a distance parameter; the negative lobe intensity parameter is generated based on the accumulated gradient intensity, which is calculated based on the brightness value of each pixel within the second sampling range; the distance parameter is generated based on anisotropic stretching coefficients, a first offset, a second offset, and a truncation parameter; the anisotropic stretching coefficients are generated based on a stretching coefficient and the accumulated gradient intensity, including a first preset direction stretching coefficient and a second preset direction stretching coefficient; the first offset and the second offset are both generated based on the accumulated gradient direction vector and the obtained sampling point coordinate offset information, with the accumulated gradient direction vector calculated based on the brightness value of each pixel within the second sampling range. In this way, the generation of dynamic filtering weights depends on the brightness value of each pixel within the second sampling range, rather than fixed filtering weights, effectively avoiding blurring and distortion caused by tilted edges and complex textures, making the details of the super-resolution result clearer and more closely resemble the real image structure.
[0012] In some implementations, the first super-resolution processing further includes color cropping and sharpening of the input image after weighted cumulative processing.
[0013] Thus, the first super-resolution process also includes color cropping and sharpening of the input image after weighted accumulation processing. Color cropping suppresses color overflow and distortion in the target pixels, ensuring that the colors of the super-resolution result match the local tones of the original image, thus enhancing visual realism. Furthermore, sharpening specifically enhances the clarity of edge contours and subtle textures.
[0014] In some implementations, the step of generating a target image by performing a first super-resolution process on the input image based on a first filter and the brightness value of each pixel within a second sampling range, when the target pixel is determined to be located in a first type region, includes: If the target pixel is determined to be located in the first type of region, the first super-resolution processing is performed serially based on the first filter and the brightness value of each pixel within the second sampling range to generate the target image; or The second sampling range is divided into multiple sub-regions; If the target pixel is determined to be located in the first type of region, the first super-resolution process is performed in parallel for each sub-region based on the first filter, so as to generate the target image according to the results of multiple parallel first super-resolution processes.
[0015] Thus, when the target pixel is determined to be located in the first type of region, based on the first filter, a first super-resolution process is performed serially according to the brightness value of each pixel within the second sampling range to generate the target image. Alternatively, the second sampling range is divided into multiple sub-regions. And when the target pixel is determined to be located in the first type of region, based on the first filter, a first super-resolution process is performed in parallel for each sub-region to generate the target image based on the results of multiple parallel first super-resolution processes. In this way, by dividing the second sampling range into multiple sub-regions for parallel processing, the originally serial multi-step feature calculation, weight generation, and weighted accumulation operations can be transformed into parallel execution, thereby reducing the number of instruction calls and data interaction overhead.
[0016] In some implementations, the second super-resolution processing includes weighted accumulation processing based on the fixed filter weights of the second filter and the brightness value of each pixel within the first sampling range.
[0017] Thus, the second super-resolution processing includes weighted accumulation processing based on the fixed filter weights of the second filter, according to the brightness value of each pixel within the first sampling range. In this way, the use of fixed filter weights in the second filter eliminates the need for end-to-end computation to generate dynamic filter weights, thereby reducing the overall computational load and processing latency of the algorithm.
[0018] This application also provides an electrical device, which includes a processor and a memory for storing processor-executable instructions, wherein the processor is configured to execute the instructions to implement the method described above.
[0019] This application also provides a computer-readable storage medium storing a computer program that, when executed by one or more processors, implements the method described above.
[0020] This application also provides a computer program product, including a computer program / instructions, which, when executed by a processor, implements the above-described method. Thus, in the electrical device, computer-readable storage medium, and computer program product provided in the embodiments of this application, based on a first feature of a first sampling range of the input image, when it is determined that the target pixel is located in a first type region, a first super-resolution processing is performed on the input image based on a first filter and the brightness value of each pixel in a second sampling range to generate a target image. The first sampling range includes the target pixel and first neighboring pixels associated with the target pixel. The first type region indicates regions in the input image where edge textures exist. The second sampling range includes the target pixel and second neighboring pixels associated with the target pixel, and the number of pixels in the second neighboring region is greater than the number of pixels in the first neighboring region. Next, when it is determined that the target pixel is located in a second type region, a second super-resolution processing is performed on the input image based on a second filter and the brightness value of each pixel in the first sampling range to generate a target image. The second type region indicates flat regions in the input image. In this way, by using different filters to process target pixels in different types of regions, the uneven distribution of computational resources caused by using a uniform processing flow for pixels in any type of region in traditional super-resolution processing can be solved, avoiding unnecessary computational redundancy and resource waste. Furthermore, for target pixels located in the first type of region with edge texture, a larger second sampling range is adopted, and the first filter is used for targeted first super-resolution processing, thereby ensuring that the first filter can adapt to the local features of the target pixel, avoiding the image quality loss that occurs when traditional fixed parameter filters process tilted edges and complex textures, and improving the accuracy of image processing.
[0021] Additional aspects and advantages of embodiments of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of embodiments of this application. Attached Figure Description
[0022] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, wherein: Figure 1 This is one of the schematic flowcharts of image processing methods according to certain embodiments of this application; Figure 2 This is a second schematic flowchart of an image processing method according to certain embodiments of this application; Figure 3 This is a third schematic flowchart of an image processing method according to certain embodiments of this application; Figure 4 This is the fourth schematic flowchart of an image processing method according to certain embodiments of this application. Detailed Implementation
[0023] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the embodiments of this application, and should not be construed as limiting the embodiments of this application.
[0024] In image super-resolution technology, the Lanczos filter is the mainstream interpolation tool. It upscales low-resolution images through multi-sampling and weighted operations, providing a basic high-definition visual presentation effect for various terminal applications such as computer vision, virtual reality, and medical imaging. However, traditional Lanczos filters use fixed parameters to process the entire image uniformly, which cannot adapt to the feature differences in different regions of the image, thus causing a series of image quality degradation problems and making it difficult to meet the needs of high-quality image generation.
[0025] Specifically, traditional Lanczos filters use fixed weight templates and sampling strategies, lacking a mechanism for perceiving local image structures. For mixed images containing both flat regions (such as solid-color backgrounds) and complex textured regions (such as fabric patterns and hair details), they employ the same filtering parameters: in smooth regions, fixed multi-sampling points lead to overcomputation and unnecessary resource consumption; while in textured or edge-dense regions (such as text edges and building outlines), the sampling strategy lacks specificity and fails to fully capture the correlation information of local pixels, ultimately resulting in blurred details and distorted edge contours in the super-resolution results. Furthermore, traditional Lanczos filters ignore gradient direction and intensity changes in pixel neighborhoods, failing to accurately fit structural features such as sloping edges and curved textures. When dealing with fine structures (such as hair strands and fine lines), they struggle to reproduce realistic detail levels, resulting in super-resolution results lacking visual realism. Additionally, the negative lobe characteristics of traditional Lanczos filters cause severe ringing artifacts. While negative lobes are an inherent structure for achieving high-quality interpolation, fixed negative lobe intensities are prone to oscillation interference when processing high-contrast regions. For example, in the light and dark outlines of a building, negative lobes can cause fake pixels with alternating light and dark areas around the edges, disrupting the overall harmony of the image.
[0026] In summary, traditional Lanczos filters cannot adapt to the feature differences in different regions of an image, making it difficult to meet the requirements for high-quality image generation.
[0027] Based on the above issues, please refer to Figure 1 This application provides an image processing method, which includes: 01: Based on the first feature of the first sampling range of the input image, and after determining that the target pixel is located in the first type region, the input image is subjected to first super-resolution processing based on the first filter and the brightness value of each pixel in the second sampling range to generate the target image; 02: When it is determined that the target pixel is located in the second type region, the input image is subjected to second super-resolution processing based on the second filter and the brightness value of each pixel within the first sampling range to generate the target image.
[0028] This application provides an image processing apparatus. The image processing method of this application can be implemented by the image processing apparatus of this application. Specifically, the image processing apparatus includes a data processing module and an optimization module. The data processing module is used to perform a first super-resolution processing on the input image based on a first feature of a first sampling range of the input image, and when it is determined that the target pixel is located in a first type region, based on a first filter and the brightness value of each pixel in a second sampling range, to generate a target image. And when it is determined that the target pixel is located in a second type region, based on a second filter and the brightness value of each pixel in the first sampling range, to perform a second super-resolution processing on the input image, to generate a target image.
[0029] This application also provides a computer device, which includes a memory and a processor. The image processing method of this application can be implemented by the computer device described in this application. Specifically, the memory stores a computer program, and the processor is configured to, based on a first feature of a first sampling range of an input image, and if it is determined that a target pixel is located in a first type region, perform a first super-resolution processing on the input image based on a first filter and the brightness value of each pixel within a second sampling range to generate a target image. And, if it is determined that a target pixel is located in a second type region, perform a second super-resolution processing on the input image based on a second filter and the brightness value of each pixel within the first sampling range to generate a target image.
[0030] Specifically, the input image can be understood as a low-resolution image to be upscaled, which is the original data source for super-resolution processing, including still images and single-frame images of video frames.
[0031] The target pixel can be understood as a single pixel currently undergoing super-resolution calculation. It is the basic unit of super-resolution processing, and its final output value determines the local image quality of the target image.
[0032] The first sampling range can be understood as a small set of pixels used to determine the region type, including the target pixel and its associated first neighboring pixels. It is the smallest image analysis unit in the image processing method provided in this application. The first sampling range can quickly extract the first feature of the region where the target pixel is located to distinguish between a first type of region and a second type of region. In some embodiments, the first neighboring pixels include adjacent pixels located in the four directions (up, down, left, and right) of the target pixel.
[0033] The first feature can be understood as a quantitative indicator that characterizes the image features of the first sampling range, and is the basis for judging the type of the region where the target pixel is located.
[0034] The first type of region can be understood as an area in the input image that has obvious edges, textures, and details, such as text outlines, hair textures, and architectural lines. Target pixels in the first type of region require high super-resolution accuracy and need to be processed meticulously.
[0035] The second sampling range can be understood as an expanded set of pixels used for fine processing of the target pixel in the first type region, including the target pixel and its associated second neighboring pixels. The second sampling range can provide sufficient local feature information to restore the details of the target pixel.
[0036] The first filter can be understood as a dynamically optimized filter that adapts to the first type of region. Its parameters can be dynamically adjusted according to local features, and it has the ability to capture complex texture directions and suppress artifacts.
[0037] The first super-resolution process can be understood as a fine super-resolution process for the first type of region. It requires calculation by combining the brightness information of the second sampling range with the characteristics of the first filter to ensure the clarity of edge texture.
[0038] The target image can be understood as a high-resolution image generated after super-resolution processing. It is a collection of the processing results of all target pixels and must meet both real-time and image quality requirements.
[0039] The second type of region can be understood as an area in the input image with no obvious edge texture and a gradual change in pixel value, such as a solid color background, sky, and walls. The target pixels in the second type of region have lower requirements for super-resolution accuracy and can be processed more simply.
[0040] The second filter can be understood as a simplified fixed filter adapted to the second type of region. The filter weights of the second filter are fixed and do not need to be dynamically adjusted, resulting in high computational efficiency.
[0041] It should be noted that the first filter and the second filter can be different filters, or they can be different configurations of the same base filter. Specifically, the first filter targets edge texture regions (Type 1 regions) and employs a dynamic filter weight design. The second filter targets flat regions (Type 2 regions) and employs a fixed filter weight configuration. The two filters are adapted through parameter matching to meet the super-resolution requirements of different regions.
[0042] The second super-resolution processing can be understood as a fast super-resolution process for the second type of region, which only needs to combine the brightness value of the first sampling range with the fixed weight of the second filter for calculation, so as to reduce redundant calculations.
[0043] Please see Figure 2 , Figure 2 This is a flowchart illustrating the image processing method. First, the input image to be processed is acquired, and each pixel in the image is treated as a "target pixel," with super-resolution calculation performed sequentially.
[0044] Next, the coordinate information of the target pixel is received to locate its position in the input image, thereby determining the "first sampling range" of the current target pixel. For example, the target pixel and its four first neighboring pixels (top, bottom, left, and right) are selected to form a small pixel set, and the first feature of the first sampling range is extracted.
[0045] When the target pixel is determined to be located in the first type region, the "first filter" is invoked to expand the sampling range to a "second sampling range" that includes more second neighboring pixels. Based on the first filter, and combined with the brightness value of each pixel within the second sampling range, a first super-resolution process is performed to accurately restore edge texture details.
[0046] When the target pixel is determined to be located in the second type region, the "second filter" is invoked, directly using the "first sampling range". Based on the second filter, and combined with the brightness values within the first sampling range, a second super-resolution process is performed to quickly output the pixel value.
[0047] Finally, after all target pixels have completed super-resolution processing, the output values of each pixel are integrated to form a complete high-resolution target image.
[0048] In summary, based on the first feature of the first sampling range of the input image, and assuming the target pixel is located in a first type region, a first super-resolution process is performed on the input image based on the brightness value of each pixel within a second sampling range, using a first filter, to generate the target image. The first sampling range includes the target pixel and its associated first neighboring pixels. The first type region indicates areas in the input image with edge textures. The second sampling range includes the target pixel and its associated second neighboring pixels, where the number of pixels in the second neighboring region is greater than the number of pixels in the first neighboring region. Next, assuming the target pixel is located in a second type region, a second super-resolution process is performed on the input image based on the brightness value of each pixel within the first sampling range, using a second filter, to generate the target image. The second type region indicates flat areas in the input image. By using different filters to process target pixels in different types of regions, the uneven distribution of computational resources caused by applying a uniform processing flow to pixels in any type of region in traditional super-resolution processing can be solved, avoiding unnecessary computational redundancy and resource waste. Furthermore, for target pixels located in the first type of region with edge texture, a larger second sampling range is adopted, and the first filter is used for targeted first super-resolution processing, thereby ensuring that the first filter can adapt to the local features of the target pixel, avoiding the image quality loss that occurs when traditional fixed parameter filters process tilted edges and complex textures, and improving the accuracy of image processing.
[0049] Please see Figure 2In some implementations, the first feature includes at least one of the following: the brightness gradient intensity of the first sampling range, the gradient direction dispersion, and the brightness value variance.
[0050] Specifically, the brightness gradient intensity can be understood as an indicator that quantifies the "degree of drastic change in brightness between adjacent pixels" within the first sampling range. In particular, a larger value of the brightness gradient intensity indicates a more significant difference in local brightness (such as at the edge), while a smaller value indicates a more gradual change in brightness (such as in a flat area).
[0051] In some implementations, the formula for calculating the brightness gradient intensity can be: |L(x+1,y)-L(x,y)|+|L(x,y+1)-L(x,y)| (where L is the brightness value of the pixel, generated based on a weighted average of the green channel, which is sensitive to human vision). The total intensity of the local brightness change is obtained by summing the brightness differences in the horizontal and vertical directions. The formula for calculating the brightness value can be: (R+B)×0.5+G, where R, G, and B represent the red, green, and blue channel component values of the pixel, respectively.
[0052] Gradient direction dispersion can be understood as an indicator that quantifies the degree of "gradient direction dispersion" within the first sampling range. Here, gradient direction refers to the dominant direction of brightness change (such as horizontal, vertical, or tilted). High gradient direction dispersion indicates the presence of multi-directional textures locally, while low gradient direction dispersion indicates a single texture direction.
[0053] In some implementations, the gradient direction dispersion can be calculated as follows: first, calculate the gradient direction of each neighboring pixel relative to the target pixel within the first sampling range (e.g., if the horizontal difference is positive, the direction is 0°; if the vertical difference is positive, the direction is 90°); and then quantify the gradient direction dispersion using the "standard deviation of the direction angle".
[0054] Brightness variance can be understood as an index that quantifies the "dispersion of brightness values of all pixels" within the first sampling range. A small brightness variance indicates that the pixel brightness tends to be uniform (such as a solid color background), while a large brightness variance indicates that the brightness distribution is uneven (such as textures with alternating light and dark areas).
[0055] It should be noted that the three features of brightness gradient intensity, gradient direction dispersion and brightness value variance complement each other, focusing on key information such as image brightness variation, texture direction distribution and brightness uniformity, respectively. They can be flexibly selected according to actual application scenarios to optimize the region determination effect.
[0056] Thus, the first feature includes at least one of the following: the brightness gradient intensity, the gradient direction dispersion, and the brightness value variance of the first sampling range. In this way, by using at least one of the following as the first feature, flexible combination and selection of multi-dimensional features can be achieved, ensuring accuracy in determining the type of the region where the target pixel is located.
[0057] In some implementations, the target pixel is determined to be located in a first type region when the brightness gradient intensity is greater than or equal to a preset gradient threshold, or the gradient direction dispersion is greater than or equal to a preset direction dispersion, or the brightness value variance is greater than or equal to a preset brightness value variance; the target pixel is determined to be located in a second type region when the brightness gradient intensity is less than a preset gradient threshold, the gradient direction dispersion is less than a preset direction dispersion, and the brightness value variance is less than a preset brightness value variance.
[0058] Specifically, a brightness gradient intensity greater than or equal to a preset gradient threshold indicates that there is a clear edge in the region where the target pixel is located.
[0059] A gradient direction dispersion greater than or equal to a preset direction dispersion indicates that there is a complex texture in the region where the target pixel is located.
[0060] A brightness value variance greater than or equal to the preset brightness value variance indicates that there is a significant difference in brightness in the area where the target pixel is located.
[0061] When any one of the following conditions is met: the brightness gradient intensity is greater than or equal to the preset gradient threshold, the gradient direction dispersion is greater than or equal to the preset direction dispersion, and the brightness value variance is greater than or equal to the preset brightness value variance, the target pixel can be considered to be located in the first type region.
[0062] When the brightness gradient intensity is less than the preset gradient threshold, the gradient direction dispersion is less than the preset direction dispersion, and the brightness value variance is less than the preset brightness value variance, the target pixel is determined to be located in the second type region.
[0063] Thus, if the brightness gradient intensity is greater than or equal to a preset gradient threshold, or the gradient direction dispersion is greater than or equal to a preset direction dispersion, or the brightness value variance is greater than or equal to a preset brightness value variance, the target pixel is determined to be located in a first-type region. If the brightness gradient intensity is less than a preset gradient threshold, the gradient direction dispersion is less than a preset direction dispersion, and the brightness value variance is less than a preset brightness value variance, the target pixel is determined to be located in a second-type region. By using multiple determination methods to identify the type of region where the target pixel is located, it is possible to effectively avoid missed detections due to insufficient single features, thereby preventing regions requiring detailed preservation from being included in the simplified processing flow due to misjudgment, and providing accurate region segmentation basis for subsequent differentiated super-resolution.
[0064] In some embodiments, the first super-resolution processing includes dynamic filtering weights based on a first filter, performing weighted accumulation processing on the input image according to the brightness value of each pixel within a second sampling range. The dynamic filtering weights are generated based on a negative lobe intensity parameter and a distance parameter; the negative lobe intensity parameter is generated based on the accumulated gradient intensity, which is calculated based on the brightness value of each pixel within the second sampling range; the distance parameter is generated based on an anisotropic stretching coefficient, a first offset, a second offset, and a truncation parameter; the anisotropic stretching coefficient is generated based on a stretching coefficient and the accumulated gradient intensity, and the anisotropic stretching coefficient includes a first preset direction stretching coefficient and a second preset direction stretching coefficient; both the first offset and the second offset are generated based on the accumulated gradient direction vector and the obtained sampling point coordinate offset information, and the accumulated gradient direction vector is calculated based on the brightness value of each pixel within the second sampling range.
[0065] Specifically, the dynamic filtering weights can be understood as weight values that dynamically change with local features (such as gradient strength and texture direction) within the second sampling range. Each sampling point corresponds to a different weight, used to control the contribution of the brightness value at that sampling point to the target pixel. The brightness value can be calculated as follows: Weighted accumulation processing can be understood as multiplying the brightness value of each pixel within the second sampling range by its corresponding dynamic filtering weight, and then summing all the weighted results to finally obtain the super-resolution brightness value of the target pixel.
[0066] The negative lobe intensity parameter can be understood as a parameter that controls the intensity of the "negative lobe region" of the first filter. Here, the negative lobe refers to the oscillating portion outside the central main lobe in the filter kernel function (a mathematical model used to calculate pixel weights). A larger value for the negative lobe intensity parameter results in a stronger negative lobe, which can easily introduce ringing effects. Conversely, a smaller value for the negative lobe intensity parameter results in a weaker negative lobe, which is beneficial for suppressing artifacts.
[0067] The distance parameter can be understood as a parameter that quantizes the distance between the sampling point and the target pixel in the "gradient adaptation coordinate system". It is not a simple spatial distance, but an "effective distance" in the direction of fused texture, which is used to control the range of influence of the sampling point on the target pixel.
[0068] The cumulative gradient intensity can be understood as the weighted sum of the gradient intensities of all pixels within the second sampling range, reflecting the overall strength of the edge or texture of that region. In other words, a larger cumulative gradient intensity value indicates more pronounced regional features, while a smaller cumulative gradient intensity value indicates smoother features.
[0069] Anisotropic stretching coefficients can be understood as parameters used to adjust distance weights in different directions, including a first preset stretching coefficient and a second preset stretching coefficient. The first preset stretching coefficient refers to the weight stretching ratio along the cumulative gradient direction (the dominant texture direction), which enhances detail capture along the texture extension direction. The second preset stretching coefficient refers to the weight stretching ratio perpendicular to the cumulative gradient direction (the texture perpendicular direction), which suppresses blurring in the direction perpendicular to the texture.
[0070] The first offset and the second offset can be understood as component parameters that transform the original coordinates of the sampling point to the "gradient coordinate system". The first offset corresponds to the offset component along the cumulative gradient direction, and the second offset corresponds to the offset component perpendicular to the cumulative gradient direction.
[0071] The truncation parameter can be understood as a critical value that limits the influence range of the sampling points. When the distance parameter exceeds this truncation parameter, the weight of the sampling points is set to 0 to prevent distant noisy pixels from interfering with the calculation of the target pixels.
[0072] The cumulative gradient direction vector can be understood as a weighted composite vector obtained by summing the gradient directions of all pixels within the second sampling range, reflecting the dominant direction of the texture or edge within the region where the target pixel is located. For example, a cumulative gradient direction vector of 0° indicates that the dominant direction of the texture or edge within the region where the target pixel is located is horizontal.
[0073] In some implementations, the calculation process for dynamic filter weights is as follows: First, for the second sampling range of the target pixel, the cumulative gradient intensity of the second sampling range is calculated: First, the brightness gradient intensity of each neighboring pixel relative to the target pixel is calculated (formula: |L_nei-L_tar|, where L_tar is the brightness value of the target pixel and L_nei is the brightness value of the neighboring pixels of the target pixel within the second sampling range). Then, weights are assigned according to the spatial distance between the sampling point and the target pixel (the closer the distance, the higher the weight). Finally, all "brightness gradient intensity × spatial weight" are summed to obtain the cumulative gradient intensity len. The cumulative gradient direction vector of the second sampling range is calculated: First, the gradient direction of each neighboring pixel is calculated (e.g., horizontal gradient Gx=L_right-L_left, vertical gradient Gy=L_down-L_up, direction determined by arctan(Gy / Gx)). Then, all direction vectors are synthesized using the brightness gradient intensity as weights to obtain the cumulative gradient direction vector dir (including the horizontal cumulative gradient direction vector dir.x and the vertical cumulative gradient direction vector dir.y) reflecting the dominant texture direction.
[0074] Next, based on the extracted cumulative gradient intensity *len* and cumulative gradient direction vector *dir*, the negative lobe intensity parameter *lob*, truncation parameter *clp*, first preset direction stretching coefficient *len2.x*, second preset direction stretching coefficient *len2.y*, first offset *vX*, second offset *vY*, and distance parameter *d2* required for weight calculation are generated. The formula for calculating the negative lobe intensity parameter *lob* is: *lob* = 0.5 + ((0.25 - 0.04) - 0.5) × *len*. The formula for calculating the truncation parameter *clp* is: *clp* = 1.0 / *lob*. The calculation process for the first preset direction stretching coefficient *len2.x* and the second preset direction stretching coefficient *len2.y* is as follows: first calculate the stretching coefficient *stretch* (the formula is: ...). Then, the stretching coefficient len2.x in the first preset direction is calculated (the calculation formula is...). ) and the second preset direction tensile coefficient len2.y (calculated by the formula) The calculation process for the first offset vX and the second offset vY can be as follows: First, obtain the original coordinate offsets (offX, offY) of the sampling point relative to the target pixel; then, obtain the first offset vX through coordinate system transformation (the transformation formula is...). ) and the second offset vY (conversion formula is The distance parameter d2 can be calculated as follows: apply anisotropic stretching to the transformed first offset vX and second offset vY, square the result, and then take the minimum value with the cutoff parameter. The formula is as follows: .
[0075] Finally, a polynomial fitting filter kernel function is used to incorporate the negative lobe intensity parameter lob and the distance parameter d2 into the weight calculation to generate dynamic filter weights. The calculation formula is as follows: In this way, the oscillation characteristics (negative lobe intensity) of the weight curve are adjusted by the negative lobe intensity parameter lob, and the influence range of the weight is limited by the distance parameter d2, so as to obtain the dynamic filtering weight of each sampling point.
[0076] After calculating the dynamic filtering weights for each pixel within the second sampling range, the brightness value of each pixel is multiplied by its dynamic filtering weight, and all weighted results are summed to obtain the super-resolution brightness value of the target pixel. This process is then repeated for the remaining pixels of the input image until super-resolution processing of all pixels in the entire input image is complete.
[0077] Thus, the first super-resolution process includes dynamic filtering weights based on a first filter, which perform weighted accumulation processing on the input image according to the brightness value of each pixel within the second sampling range. The dynamic filtering weights are generated based on a negative lobe intensity parameter and a distance parameter; the negative lobe intensity parameter is generated based on the accumulated gradient intensity, which is calculated based on the brightness value of each pixel within the second sampling range; the distance parameter is generated based on anisotropic stretching coefficients, a first offset, a second offset, and a truncation parameter; the anisotropic stretching coefficients are generated based on a stretching coefficient and the accumulated gradient intensity, including a first preset direction stretching coefficient and a second preset direction stretching coefficient; the first offset and the second offset are both generated based on the accumulated gradient direction vector and the obtained sampling point coordinate offset information, with the accumulated gradient direction vector calculated based on the brightness value of each pixel within the second sampling range. In this way, the generation of dynamic filtering weights depends on the brightness value of each pixel within the second sampling range, rather than fixed filtering weights, effectively avoiding blurring and distortion caused by tilted edges and complex textures, making the details of the super-resolution result clearer and more closely resemble the real image structure.
[0078] In some implementations, the first super-resolution processing further includes color cropping and sharpening of the input image after weighted accumulation processing.
[0079] Specifically, although weighted cumulative processing can complete the initial reconstruction of pixel values, it is limited by data fusion characteristics and calculation errors, and is prone to problems that directly affect image quality, such as color overflow, color gamut distortion and edge detail blurring and attenuation. These problems cannot be solved by weight optimization alone.
[0080] Color cropping can be understood as a correction process for overflowing RGB channel values in the input image. By setting a reasonable color threshold range, values that exceed the boundary are truncated or mapped to the effective range to ensure that the colors meet the color gamut requirements of the display device.
[0081] Sharpening can be understood as an enhancement process for insufficient contrast between edges and details in an input image. By calculating the brightness difference between the target pixel and its neighboring pixels, local contrast adjustment is performed on the edge area to make details clearer and more discernible.
[0082] Based on the dynamic filtering weights of the first filter, the RGB color values of all pixels within the second sampling range are weighted and accumulated to obtain the preliminary color value of the target pixel. Subsequently, based on the color distribution within the second sampling range, the input image is subjected to color cropping, and the input image is sharpened based on the brightness difference between the target pixel and its core neighboring pixels.
[0083] Thus, the first super-resolution process also includes color cropping and sharpening of the input image after weighted accumulation processing. Color cropping suppresses color overflow and distortion of target pixels, ensuring that the colors of the super-resolution result match the local tones of the original image, thus enhancing visual realism. Furthermore, sharpening specifically enhances the clarity of edge contours and subtle textures.
[0084] Please see Figure 3 and Figure 4 In some implementations, step 01 (where, if the target pixel is determined to be located in a first type of region, based on a first filter, performing a first super-resolution process on the input image according to the brightness value of each pixel within a second sampling range to generate a target image) includes: 011: Given that the target pixel is located in a first-type region, based on the first filter and according to the brightness value of each pixel within the second sampling range, a first super-resolution process is performed serially to generate the target image; or 012: Divide the second sampling range into multiple sub-regions; 013: When it is determined that the target pixel is located in the first type region, the first super-resolution process is performed in parallel for each sub-region based on the first filter, so as to generate the target image according to the results of multiple parallel first super-resolution processes.
[0085] In some embodiments, the super-resolution processing module is further configured to, upon determining that the target pixel is located in a first type region, perform a first super-resolution process serially based on a first filter and according to the brightness value of each pixel within a second sampling range to generate a target image. Alternatively, the super-resolution processing module is further configured to divide the second sampling range into multiple sub-regions, and, upon determining that the target pixel is located in a first type region, perform a first super-resolution process in parallel for each sub-region based on the first filter, to generate a target image based on the results of multiple parallel first super-resolution processes.
[0086] In some embodiments, the processor is further configured to, upon determining that the target pixel is located in a first type region, perform a first super-resolution process serially based on a first filter and according to the brightness value of each pixel within a second sampling range to generate a target image. Alternatively, the processor is further configured to divide the second sampling range into multiple sub-regions, and, upon determining that the target pixel is located in a first type region, perform a first super-resolution process in parallel for each sub-region based on the first filter to generate a target image based on the results of multiple parallel first super-resolution processes.
[0087] Specifically, the first super-resolution processing in sequence can be understood as processing the pixels in the second sampling range one by one in a preset order (such as from left to right or from top to bottom). The calculation result of the previous pixel is completed before the calculation of the next pixel is started. All steps are executed sequentially.
[0088] A sub-region can be understood as an independent small region formed by splitting the second sampling range according to spatial characteristics or computational logic. Each sub-region has no data overlap, and the computation of each sub-region can be completed independently without relying on the intermediate results of other sub-regions.
[0089] Parallel super-resolution processing can be understood as starting computation simultaneously on multiple sub-regions after partitioning. Utilizing the hardware's multi-threading or vector operation capabilities, gradient analysis and dynamic filtering weight generation for each sub-region are executed synchronously, and the computation of all sub-regions is completed within the same time period.
[0090] When performing the first super-resolution processing on the input image, the execution path is first determined, that is, whether the first super-resolution processing can be performed in parallel. In some implementations, the determination logic may be as follows: when the hardware computing power is lower than a preset threshold, or the application scenario is a low-end mobile device or embedded device, the first super-resolution processing is performed serially; when the hardware computing power is higher than the preset threshold, or the application scenario is a high-end PC or game console, the first super-resolution processing is performed in parallel.
[0091] The serial super-resolution processing flow can be as follows: First, traverse the pixels within the second sampling range (e.g., in the order of "target pixel → upper neighbor → lower neighbor → left neighbor → right neighbor → diagonal neighbor"), calculating the gradient direction and brightness gradient intensity of each pixel. Next, based on the gradient features of individual pixels, generate corresponding dynamic filtering weights serially. Then, multiply the brightness value of the current pixel by the weight and accumulate the results to complete the contribution calculation for a single pixel. After processing all pixels within the second sampling range, perform color cropping and sharpening on the input image sequentially. Finally, output the final super-resolution result for the target pixel, completing the serial processing.
[0092] The parallel processing flow for the first super-resolution step can be as follows (taking the division of the second sampling range into upper and lower sub-regions as an example): Based on the logic of the first filter, calculations are performed simultaneously on the two sub-regions (i.e., parallel calculation of the gradient direction and intensity of the two sub-regions, parallel generation of dynamic filter weights for the two sub-regions, and parallel execution of weighted accumulation of the two sub-regions, storing the results in two independent buffers respectively). Then, the weighted accumulated values from the two buffers are read and summed to obtain the total accumulated value. Next, color cropping and sharpening are performed on the input image sequentially. Finally, the final super-resolution result of the target pixels is output, completing the parallel processing.
[0093] Thus, when the target pixel is determined to be located in the first type of region, based on the first filter, a first super-resolution process is performed serially according to the brightness value of each pixel within the second sampling range to generate the target image. Alternatively, the second sampling range is divided into multiple sub-regions. And when the target pixel is determined to be located in the first type of region, based on the first filter, a first super-resolution process is performed in parallel for each sub-region to generate the target image based on the results of multiple parallel first super-resolution processes. In this way, by dividing the second sampling range into multiple sub-regions for parallel processing, the originally serial multi-step feature calculation, weight generation, and weighted accumulation operations can be transformed into parallel execution, thereby reducing the number of instruction calls and data interaction overhead.
[0094] In some implementations, the second super-resolution processing includes weighted accumulation processing based on a fixed filter weight of the second filter, according to the luminance value of each pixel within the first sampling range.
[0095] Specifically, fixed filter weights can be understood as a set of preset weight values built into the second filter. Each weight corresponds to a specific pixel position within the first sampling range. The weight values are fixed and do not change with the local brightness, gradient, or other features of the target pixel. They are usually preset using empirical values or simple mathematical models.
[0096] In some implementations, the second super-resolution processing flow can be as follows: First, the coordinate information of the target pixel is received, and its position in the input image is located; then, the color acquisition module is invoked to extract the RGB channel data of the target pixel and its four neighboring pixels (upper, lower, left, and right) within the first sampling range. Subsequently, for the five pixels within the first sampling range, the RGB data is converted into luminance values using the luminance calculation formula (e.g., target pixel luminance L0, upper neighbor pixel L1, lower neighbor pixel L2, left neighbor pixel L3, and right neighbor pixel L4). Next, preset fixed filter weights are retrieved from the built-in parameter library of the second filter and matched to the corresponding pixels according to their positions (e.g., L0 matches weight W0=0.4, L1 matches W1=0.15, L2 matches W2=0.15, L3 matches W3=0.15, and L4 matches W4=0.15). Then, the contribution value of "luminance value × weight" (e.g., L0×W0, L1×W1) is calculated pixel by pixel. Finally, sum all the contribution values to obtain the super-resolution brightness value of the target pixel (L_out=L0×W0+L1×W1+L2×W2+L3×W3+L4×W4), and map this super-resolution brightness value back to the RGB channel and output it to the corresponding position in the target image.
[0097] Thus, the second super-resolution processing includes weighted accumulation processing based on the fixed filter weights of the second filter, according to the brightness value of each pixel within the first sampling range. In this way, the use of fixed filter weights in the second filter eliminates the need for end-to-end computation to generate dynamic filter weights, thereby reducing the overall computational load and processing latency of the algorithm.
[0098] This application also provides an electrical device, which includes a processor and a memory for storing processor-executable instructions, wherein the processor is configured to execute instructions to implement the method described above.
[0099] Specifically, the aforementioned electrical equipment can be any conventionally power-consuming device, including but not limited to controllers, vehicles, etc. When the electrical equipment is a controller, it can serve as the core control unit of the image acquisition and processing system, applicable to scenarios such as security monitoring and industrial vision. The memory pre-stores filtering parameters, sampling configurations, and judgment thresholds. After receiving a low-resolution image, the processor quickly extracts the first pixel features (brightness gradient, variance, etc.) to determine the region type: for flat regions, the second filter with fixed weights is used to complete weighted accumulation; for edge texture regions, the first filter is activated. Through dynamic negative lobe control and dual-channel parallel feature extraction, weights are generated and processed to ensure real-time output of high-definition details.
[0100] When the electrical equipment is a vehicle, it can be integrated into the control unit of the vehicle surround view and driver assistance system. The processor relies on parallel computing capabilities to perform dual-channel feature extraction, and the memory caches real-time images from the camera and algorithm parameters. When processing reversing / panoramic images, a second super-resolution is used for fast processing of flat areas such as the road surface, while a first filter is used to optimize edge sharpness for textured areas such as vehicles and curbs. Combined with an early exit mechanism for flat areas, it reduces computing power consumption and improves driving visual safety.
[0101] Thus, based on the first feature of the first sampling range of the input image, and assuming the target pixel is located in a first type region, a first super-resolution process is performed on the input image based on the brightness value of each pixel within a second sampling range, using a first filter, to generate the target image. The first sampling range includes the target pixel and its associated first neighboring pixels. The first type region indicates areas in the input image where edge textures exist. The second sampling range includes the target pixel and its associated second neighboring pixels, where the number of pixels in the second neighboring region is greater than the number of pixels in the first neighboring region. Next, assuming the target pixel is located in a second type region, a second super-resolution process is performed on the input image based on the brightness value of each pixel within the first sampling range, using a second filter, to generate the target image. The second type region indicates flat areas in the input image. By using different filters to process target pixels in different types of regions, the uneven distribution of computational resources caused by applying a uniform processing flow to pixels in any type of region in traditional super-resolution processing can be solved, avoiding unnecessary computational redundancy and resource waste. Furthermore, for the first type of region with edge texture, a larger sampling range is adopted, and a first filter is used for targeted first super-resolution processing, thereby ensuring that the first filter can adapt to the local features of the target pixel, avoiding the detail blurring, jagged artifacts or ringing effects that occur when traditional fixed parameter filters process tilted edges and complex textures, thus improving the accuracy of image processing.
[0102] This application also provides a computer-readable storage medium storing a computer program that, when executed by one or more processors, implements the above-described method.
[0103] It is understood that a computer program includes computer program code. Computer program code can be in the form of source code, object code, executable files, or some intermediate form. Computer-readable storage media can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), and software distribution media, etc.
[0104] This application also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the above-described method.
[0105] In this specification, the terms "specifically," "furthermore," "particularly," "understandably," etc., refer to specific features, structures, materials, or characteristics described in connection with embodiments or examples that are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0106] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of executable request code comprising one or more steps for implementing a particular logical function or process, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order according to the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0107] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. An image processing method, characterized in that, The image processing method includes: Based on a first feature of a first sampling range of the input image, and assuming the target pixel is located in a first type region, a first super-resolution process is performed on the input image based on a first filter and the brightness value of each pixel in a second sampling range to generate a target image. The first sampling range includes the target pixel and first neighboring pixels associated with the target pixel. The first type region indicates regions in the input image where edge textures exist. The second sampling range includes the target pixel and second neighboring pixels associated with the target pixel, and the number of pixels in the second neighboring pixels is greater than the number of pixels in the first neighboring pixels. If the target pixel is determined to be located in a second type region, the input image is subjected to a second super-resolution process based on a second filter and the brightness value of each pixel within the first sampling range to generate the target image, wherein the second type region is used to indicate a flat region in the input image.
2. The method according to claim 1, characterized in that, The first feature includes at least one of the following: the brightness gradient intensity, the gradient direction dispersion, and the brightness value variance of the first sampling range.
3. The method according to claim 2, characterized in that, If the brightness gradient intensity is greater than or equal to a preset gradient threshold, or the gradient direction dispersion is greater than or equal to a preset direction dispersion, or the brightness value variance is greater than or equal to a preset brightness value variance, the target pixel is determined to be located in the first type of region. If the brightness gradient intensity is less than the preset gradient threshold, the gradient direction dispersion is less than the preset direction dispersion, and the brightness value variance is less than the preset brightness value variance, the target pixel is determined to be located in the second type region.
4. The method according to any one of claims 1-3, characterized in that, The first super-resolution processing includes dynamic filtering weights based on the first filter, and weighted accumulation processing of the input image based on the brightness value of each pixel within the second sampling range. The dynamic filtering weights are generated based on a negative lobe intensity parameter and a distance parameter. The negative lobe intensity parameter is generated based on the accumulated gradient intensity, which is calculated based on the brightness value of each pixel within the second sampling range. The distance parameter is generated based on an anisotropic stretching coefficient, a first offset, a second offset, and a truncation parameter. The anisotropic stretching coefficient is generated based on a stretching coefficient and the accumulated gradient intensity, and includes a first preset direction stretching coefficient and a second preset direction stretching coefficient. Both the first offset and the second offset are generated based on the accumulated gradient direction vector and the obtained sampling point coordinate offset information, and the accumulated gradient direction vector is calculated based on the brightness value of each pixel within the second sampling range.
5. The method according to any one of claims 1-4, characterized in that, The first super-resolution processing also includes color cropping and sharpening of the input image after weighted accumulation processing.
6. The method according to any one of claims 1-5, characterized in that, The step of generating a target image by performing a first super-resolution process on the input image based on a first filter and the brightness value of each pixel within a second sampling range, when the target pixel is determined to be located in a first type region, includes: If the target pixel is determined to be located in the first type of region, the first super-resolution processing is performed serially based on the first filter and the brightness value of each pixel within the second sampling range to generate the target image; or The second sampling range is divided into multiple sub-regions; If the target pixel is determined to be located in the first type of region, the first super-resolution process is performed in parallel for each sub-region based on the first filter, so as to generate the target image according to the results of multiple parallel first super-resolution processes.
7. The method according to claim 1, characterized in that, The second super-resolution processing includes weighted accumulation processing based on the fixed filtering weights of the second filter and the brightness value of each pixel within the first sampling range.
8. An electrical appliance, characterized in that, The electrical device includes a processor and a memory for storing processor-executable instructions, wherein the processor is configured to execute the instructions to implement the method as described in any one of claims 1-7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by one or more processors, implements the method of any one of claims 1-7.
10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the method described in any one of claims 1-7.