Image normalization method based on adaptive content-aware and multi-scale structure preservation
Patent Information
- Application Number
- CN202611123501.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-28
- Publication Date
- 2026-08-28
AI Technical Summary
[0002]在机器视觉和数字图像处理领域,图像归一化作为基础性预处理环节,旨在减弱成像条件、设备差异与环境变化等因素引入的干扰,使图像数据映射到更统一的参考框架或特征空间,从而提升后续视觉任务的鲁棒性、准确性与泛化能力;未经有效归一化的图像数据常出现像素强度、对比度、颜色分布等统计特性差异显著的情况,易导致深度学习模型训练收敛困难或部署时性能下降,表现为域偏移问题
[0014] The above technical solution has the following beneficial effects: First, the normalization parameters are guided by the content-aware weight map generated by the low-level visual features of the input image itself, achieving content adaptive processing without external supervision and pre-trained semantic models, thereby improving the versatility and deployability of the solution; Second, through the multi-scale representation and cross-scale fusion mechanism of Gaussian pyramids, information trade-offs and collaboration are achieved between textured and flat regions, enabling normalization to obtain more stable regional statistical estimates while preserving edge and texture details, thus improving structure preservation capabilities; Third, based on spatially varying local means... Pixel-level normalization of the field and local standard deviation field helps eliminate complex degradations such as non-uniform illumination and contrast differences, making the normalized image more consistent both locally and globally. Fourth, as a preprocessing step for advanced vision tasks, the normalized output can provide a more consistent input distribution for subsequent feature extraction and model learning, thereby improving the stability and generalization performance of downstream tasks. Fifth, the image processing workflow mainly consists of classic image processing operators such as Gaussian filtering, guided filtering, interpolation, and local statistics, which do not rely on large neural network inference, making it easy to accelerate and parallelize, thus balancing performance and computational efficiency.
Smart Images

Figure CN122656910A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to an image normalization method based on adaptive content awareness and multi-scale structure preservation. Background Technology
[0002] In the fields of machine vision and digital image processing, image normalization, as a fundamental preprocessing step, aims to reduce interference introduced by factors such as imaging conditions, equipment differences, and environmental changes, so that image data is mapped to a more unified reference frame or feature space, thereby improving the robustness, accuracy, and generalization ability of subsequent vision tasks. Image data that has not been effectively normalized often shows significant differences in statistical characteristics such as pixel intensity, contrast, and color distribution, which can easily lead to difficulties in the convergence of deep learning model training or performance degradation during deployment, manifesting as a domain offset problem.
[0003] In existing technologies, common global normalization is usually based on global statistics of the entire image, which makes it difficult to take into account the local differences between different regions within the image. Although instance normalization and its variants can alleviate cross-image style differences to some extent, they still tend to perform global statistics in the channel dimension, which easily ignores the spatial structure and scale information of objects. This can cause feature weakening or distortion of targets at different scales and levels of detail under the same statistical constraints. In addition, local normalization based on attention or segmentation masks attempts to introduce spatial adaptability, but often relies on the inference accuracy of external models, which brings additional computational overhead and may lead to error propagation. Furthermore, the granularity and flexibility of region partitioning are limited.
[0004] Therefore, there is a need for an image normalization scheme that can generate normalization parameters driven by the content of the input image itself without relying on external supervision or additional large models, while maintaining structural information, suppressing degradation effects such as non-uniform illumination, and taking into account computational efficiency across multiple scales. Summary of the Invention
[0005] The purpose of this application is to provide an image normalization method based on adaptive content awareness and multi-scale structure preservation to solve the problems mentioned in the background art.
[0006] This application provides an image normalization method based on adaptive content-aware and multi-scale structure preservation, comprising: acquiring an original RGB image; constructing a Gaussian pyramid based on the original RGB image, including retaining the original scale image and downsampling it stepwise to obtain at least one low-resolution scale image to form a multi-scale image set; for each scale image in the multi-scale image set, generating a content-aware weight map associated with the content of the scale image, wherein the content-aware weight map is used to characterize the weight of each pixel in the calculation of local statistics, and the content-aware weight map is determined based on at least one low-level visual feature of the scale image, the low-level visual feature being used to characterize edge, contrast, or color consistency; for each scale image in the multi-scale image set, based on the corresponding content-aware weight map, within a preset window or preset... Within the pixel neighborhood of the radius, local mean and local standard deviation are calculated for each color channel at each pixel location to form a local mean field and a local standard deviation field. Cross-scale fusion is performed on the local mean fields and local standard deviation fields at each scale from coarse to fine scale to obtain the final local mean field and final local standard deviation field at the original scale. The cross-scale fusion includes: upsampling the local mean field and local standard deviation field at the coarser scale to the finer scale to be fused; determining the fusion coefficient based on the local statistical characteristics of the content-aware weight map at the finer scale; performing weighted fusion of the local mean field and local standard deviation field at the finer scale with the upsampled local mean field and local standard deviation field at the coarser scale; and performing a pixel-by-pixel and channel-by-channel normalization transformation on the original RGB image based on the final local mean field and the final local standard deviation field to obtain a normalized output image.
[0007] Furthermore, the construction of the Gaussian pyramid includes: performing Gaussian smoothing on the original scale image, then downsampling to obtain the next scale image, and repeating the Gaussian smoothing and downsampling to obtain the at least one low-resolution scale image.
[0008] Furthermore, the generation of the content-aware weight map includes: calculating at least two feature maps among gradient magnitude features, local contrast features, and color consistency features for the scale image, normalizing and fusing the feature maps to obtain an initial saliency map.
[0009] Furthermore, the generation of the content-aware weight map also includes: using the scale image as a guide, performing guided filtering on the initial saliency map to obtain a content-aware weight map aligned with the edge structure of the scale image.
[0010] Furthermore, the values of the content-aware weight map are constrained to a range greater than 0 and not greater than 1, and the constraint includes scaling, offsetting and / or truncating the content-aware weight map so that its minimum value is not less than a preset lower limit.
[0011] Furthermore, the calculation of the local mean and local standard deviation includes: performing weighted statistics on the neighboring pixels in the pixel neighborhood according to the content-aware weight to obtain the weighted local mean and weighted local variance of the corresponding pixel position, and determining the local standard deviation based on the weighted local variance.
[0012] Furthermore, determining the fusion coefficient based on the local statistical features of the content-aware weight map at a finer scale includes: calculating the local entropy based on the value distribution of the content-aware weight map within a local window, and performing a function mapping on the local entropy to obtain the fusion coefficient, wherein the function mapping is a Sigmoid function mapping.
[0013] Furthermore, the step of upsampling the coarser local mean field and local standard deviation field to the finer scale to be fused includes upsampling using bilinear interpolation; and after obtaining the final local mean field and final local standard deviation field at the original scale, edge-preserving smoothing is performed on the final local mean field and final local standard deviation field.
[0014] The above technical solution has the following beneficial effects: First, the normalization parameters are guided by the content-aware weight map generated by the low-level visual features of the input image itself, achieving content adaptive processing without external supervision and pre-trained semantic models, thereby improving the versatility and deployability of the solution; Second, through the multi-scale representation and cross-scale fusion mechanism of Gaussian pyramids, information trade-offs and collaboration are achieved between textured and flat regions, enabling normalization to obtain more stable regional statistical estimates while preserving edge and texture details, thus improving structure preservation capabilities; Third, based on spatially varying local means... Pixel-level normalization of the field and local standard deviation field helps eliminate complex degradations such as non-uniform illumination and contrast differences, making the normalized image more consistent both locally and globally. Fourth, as a preprocessing step for advanced vision tasks, the normalized output can provide a more consistent input distribution for subsequent feature extraction and model learning, thereby improving the stability and generalization performance of downstream tasks. Fifth, the image processing workflow mainly consists of classic image processing operators such as Gaussian filtering, guided filtering, interpolation, and local statistics, which do not rely on large neural network inference, making it easy to accelerate and parallelize, thus balancing performance and computational efficiency. Attached Figure Description
[0015] Figure 1 A flowchart of an exemplary image normalization method provided in this application; Figure 2A block diagram of an optional exemplary image normalization system 10 provided in this application; Figure 3 A flowchart for generating the content-aware weighted graph provided in this application. Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0017] In the description of this application, the terms "comprising," "including," and "having" are open-ended expressions, indicating that the object possesses at least the listed elements, but not excluding the possibility of possessing other elements. The terms "at least one" and "multiple" are used to describe a range of quantities; "at least one" means one or more, and "multiple" means two or more. The terms "first," "second," and "third" are used only to distinguish identical or similar technical elements and do not indicate a specific quantity, order, or degree of importance. The terms "connected," "coupled," and "linked" should be interpreted broadly, encompassing electrical, data, or communication connections, as well as direct connections or indirect connections via an intermediate medium; unless otherwise explicitly defined, they should not be construed as limited to a specific connection method. The term "based on" indicates that it is based on at least one factor or condition, and does not exclude the combination of other factors or conditions. The term "preset" indicates parameters, rules, or structures that can be configured before delivery, deployment, or operation, or dynamically configured during operation, and does not limit the timing or method of configuration. The terms "may / can / can" indicate the possibility of implementation and do not constitute a limitation on the necessity of adopting a particular method or achieving a particular effect. Terms such as “exemplary” and “for example” are used for illustration and do not constitute a limitation on the scope of protection.
[0018] The following provides further clarification on the technical terms used in this application. It should be understood that the following explanations are intended to standardize the meaning and interpretation of the terms and are not intended to limit the scope of protection.
[0019] In this application, "original RGB image" refers to color image data containing three color channels: red, green, and blue, where each pixel position corresponds to the pixel value of each color channel; "pixel position" refers to a position point or coordinate point in the image space; and "color channel" refers to the data dimension or data component used to represent the color components.
[0020] A "Gaussian pyramid" refers to a multi-level image representation structure built on the original scale image. It can obtain the next scale image by performing Gaussian smoothing on the current scale image and performing downsampling, and can be repeated to obtain multiple scale levels. A "multi-scale image set" refers to a set of images composed of multiple scales, which may include the original scale image and at least one low-resolution scale image. "Scale" can be used to characterize the image resolution level or spatial sampling level. In different embodiments, parameters such as the number of scale levels and scale factor can be preset or configurable parameters.
[0021] "Downsampling" refers to the process of reducing the spatial sampling density or resolution of an image; "upsampling" refers to the process of mapping lower resolution data to a higher resolution grid to achieve spatial size alignment, and the upsampling can be achieved by interpolation; "bilinear interpolation" is a commonly used interpolation method that obtains the interpolation result by weighting the neighboring pixels around the position to be interpolated.
[0022] "Low-level visual features" refer to features directly calculated from image data and used to characterize local structure or appearance attributes; "feature map" refers to the distribution representation of low-level visual features in image space. In some embodiments, low-level visual features may include "gradient magnitude" features, "local contrast" features, and "color consistency" features, etc.; "gradient magnitude" features can be used to characterize the intensity of edge or contour changes, "local contrast" features can be used to characterize the degree of local texture or intensity fluctuations, and "color consistency" features can be used to characterize the uniformity or dispersion of local color components.
[0023] "Saliency map" or "initial saliency map" refers to an intermediate representation obtained by normalizing and fusing at least two low-level visual feature maps; "normalization" here can refer to mapping the numerical range of different feature maps to a unified range that is easy to fuse, and the specific mapping method can be set according to the implementation needs.
[0024] "Guided filtering" refers to an edge-preserving filtering process that constrains the output of the filter with the structural information of the guiding image; "Guided image" refers to the image data used to provide structural constraints, which can be an image of the corresponding scale or image data related to it; "Filter radius" can be used to characterize the local range of action of guided filtering; "Regularization parameter" can be used to characterize the smoothness or numerical stability of the filter, and the specific value can be preset or configurable.
[0025] "Pixel neighborhood", "preset window", and "preset radius" refer to a local area selected around the target pixel position. The local area can be characterized by the window size or radius parameter, and the neighborhood shape can be square, circular, or other shapes. In some embodiments, the size of the pixel neighborhood can be configured to vary with the scale in order to balance local details and regional stability at different scale levels.
[0026] "Local mean" and "local standard deviation" refer to statistical quantities obtained by statistically analyzing pixel values within a pixel's neighborhood; "field" in "local mean field" and "local standard deviation field" refers to the distribution of statistical quantities that vary with pixel position in the image space, that is, each color channel at each pixel position corresponds to the local mean and local standard deviation respectively; "weighted statistics" refers to introducing content-aware weights when calculating the local mean or local standard deviation, so that different neighboring pixels have different degrees of influence on the statistical results.
[0027] "Cross-scale fusion" refers to the process of aligning and synthesizing local mean fields and local standard deviation fields obtained at different scale levels; "from coarse scale to fine scale" refers to performing fusion in the order of scale level from low resolution scale to high resolution scale; "fusion coefficient" refers to the coefficient used to control the relative weight of statistical fields at different scales in the synthesis, which can be determined based on the local statistical characteristics of the content-aware weight map.
[0028] "Local entropy" refers to a statistical quantity used to characterize the uncertainty or complexity of local value distribution, which can be calculated based on the value distribution of the content-aware weight graph within a local window; "function mapping" refers to the mapping process that converts local entropy into fusion coefficients; "Sigmoid" refers to a mapping form that can monotonically map the input quantity to a predetermined range, which can be used to convert local entropy into fusion coefficients for weighted fusion.
[0029] "Edge-preserving smoothing" refers to smoothing the data field to suppress local fluctuations while preserving the edge structure as much as possible. It can be applied to the fused local mean field and / or local standard deviation field, and can be achieved by bilateral filtering, non-local mean filtering, etc.
[0030] "Normalization transformation" refers to the process of performing pixel-by-pixel and channel-by-channel standardization on the original RGB image based on the final local mean field and the final local standard deviation field. In some embodiments, "global coordination post-processing" can be performed after normalization transformation. Global coordination post-processing refers to an optional process of adjusting the output based on the global statistics of the normalized output image to improve the overall appearance or batch consistency. "Blending coefficient" can be used to characterize the degree of trade-off between global adjustment and local normalization results. "Diagonal matrix" refers to a matrix structure with zero elements outside the main diagonal, which can be used to represent a linear transformation structure that scales independently by channel.
[0031] "Forward propagation" or "single forward propagation process" refers to the process of performing a complete computational flow on an input image according to predetermined steps to obtain the output result, which can be done without relying on additional iterative training or external supervision information.
[0032] Existing image normalization schemes mostly employ global statistics or local statistics at a single scale, making it difficult to simultaneously maintain local consistency and preserve structural details in scenarios with complex lighting, texture differences, and scale variations. Furthermore, some methods rely on additional models or external priors, leading to applicability and implementation cost issues. To address these problems, specific embodiments of the image normalization method, system, and computer-readable storage medium provided in this application are described below with reference to the accompanying drawings.
[0033] Figure 1 A flowchart illustrating an exemplary image normalization method provided in this application. Figure 1 As shown, the image normalization method provided in this embodiment mainly includes: S1. Obtain the original RGB image. (where superscript) H×B×3 (Characterizing the height, width, and number of channels of an image), based on the original RGB image. Constructing a Gaussian pyramid involves preserving the original scale image and downsampling it step by step to obtain at least one low-resolution scale image, thus forming a multi-scale image set. ,in For the original scale, The size is , The scaling factor (usually taken as...) ); S2. For each scale image in the multi-scale image set in step S1, generate a content-aware weight map that is associated with the content of the scale image. Among them, the content-aware weight graph The weights used to characterize the weights of each pixel in relation to local statistics, and the content-aware weight map Determined based on at least one low-level visual feature of the scaled image, the low-level visual feature being used to characterize edges, contrast, or color consistency; S3. For images at each scale in the multi-scale image set, based on the corresponding content-aware weight map... Within a pixel neighborhood centered on the pixel location and having a preset window or preset radius, the local mean and local standard deviation are calculated for each color channel at each pixel location to form a local mean field. and local standard deviation field Perform cross-scale fusion of the local mean and local standard deviation fields at each scale, from coarse to fine, to obtain the final local mean field at the original scale. and the final local standard deviation field The cross-scale fusion includes: upsampling the local mean field and local standard deviation field of the coarser scale to the finer scale to be fused, determining the fusion coefficient based on the local statistical characteristics of the content-aware weight map of the finer scale, and performing weighted fusion of the local mean field and local standard deviation field of the finer scale with the upsampled local mean field and local standard deviation field of the coarser scale. S4. Based on the final local mean field and the final local standard deviation field For the original RGB image Perform a pixel-by-pixel, channel-by-channel normalization transformation to obtain a normalized output image. .
[0034] In some embodiments, the window size or neighborhood radius of the pixel neighborhood in step S3 above can be set in association with the scale level, so that the coarse scale level corresponds to a larger neighborhood range to obtain a more stable regional statistical estimate, while the fine scale level corresponds to a smaller neighborhood range to better fit the edge and texture details; the association relationship can be determined by increasing proportionally, increasing in segments, or by a preset lookup table method, and the specific value can be configured according to the input resolution and application requirements.
[0035] Figure 2 A block diagram of an optional exemplary image normalization system 10 provided for this application. (See diagram below.) Figure 2 As shown, the exemplary normalization system 10 provided in this embodiment includes a multi-scale pyramid construction module 11, a content-aware weight map generation module 12, a multi-scale local statistical fusion estimation module 13, and a normalization transformation module 14. The multi-scale pyramid construction module 11 is used to generate a normalization transformation from the original RGB image. Generate multi-scale image sets Content-aware weighted graph generation module 12 is used to generate a multi-scale weighted graph set. The multi-scale local statistical fusion estimation module 13 is used to perform weighted local statistical calculations and coarse-to-fine cross-scale statistical fusion to obtain an adaptive statistical field. Figure 2 In the diagram, M~ and Σ~ represent the final local mean field and the final local standard deviation field, respectively; the normalization transformation module 14 is used to transform the original RGB image based on the final local statistical field. Perform pixel-level normalization transformation, and optionally, perform global coordinated fine-tuning, outputting the normalized image. .
[0036] The following combination Figure 1 and Figure 2 The implementation methods of each step and module in the above exemplary embodiments will be described in detail.
[0037] Steps S1 to S4 described above are the core steps of the technical solution of this application and are completed in a single forward propagation process. The Gaussian pyramid constructed in step S1 serves as the basis for subsequent multi-scale image data analysis steps. This construction process includes: performing Gaussian smoothing on the original scale image, then downsampling to obtain the next scale image, and then repeating the Gaussian smoothing and downsampling process. The multi-scale image set in this embodiment... It must include at least one low-resolution scale image.
[0038] In step S2, for the multi-scale image set formed by the Gaussian pyramid structure Each scale image in Instead of directly calculating the statistics of its pixels, it first calculates the content-aware weight map. This weighted map indicates the strength or importance of each pixel location within its local statistical region, with values ranging from (0, 1] and entirely determined by... The local features (such as gradient magnitude, local contrast, and color consistency) are calculated without any external supervision. A higher weight indicates that the pixel should account for a larger proportion in the local statistical calculation, which usually corresponds to a region with rich texture and prominent edges; a lower weight may correspond to a flat and uniform region.
[0039] Figure 3 A flowchart for generating the content-aware weighted graph provided in this application is shown. Figure 3 As shown, the specific implementation method of step S2 above is as follows. For the Gaussian pyramid... Layer Image Perform the following operations: First, calculate the multi-feature response map of the image. This method captures edge and contour information, texture activity, and color uniformity by designing a set of complementary low-level feature descriptors. In this embodiment, the low-level feature descriptors include the following three types.
[0040] Gradient magnitude map This descriptor is computed using the Sobel operator, with the following formula: ,in This is a Sobel convolution kernel. It captures edge and contour information.
[0041] Local contrast map This descriptor calculates each pixel in a small neighborhood. The standard deviation is obtained within a range of (e.g., 3x3 or 5x5). It reflects the activity level of the texture.
[0042] Color consistency diagram This descriptor converts the image to the CIELAB color space and calculates the sum of the variances of the a and b channels within the neighborhood of each pixel. The smaller the variance, the more uniform the color in that area.
[0043] The specific implementation of step S2 above involves concatenating the feature maps along the channel dimension to obtain... In order to... Generate content-aware weight map Typically, an adaptive weight transformation function needs to be designed. This function learns a set of parameters To map features to weights, this embodiment employs a non-parametric, guided filtering-based transformation strategy to avoid introducing complex network training. Specifically, each feature map is first normalized to the [0,1] interval, and then an initial saliency map is calculated. ,in This is the k-th feature map after normalization. Next, a fast guided filter is used to transform the original image... As a guide map, for Filtering is performed to obtain a smooth, edge-preserving content-aware weight map. : .in, It is the filter radius. It is a regularization parameter. A key characteristic of guided filtering is that it enables content-aware weight graphs. Smooth the image in flat areas (weight values tend to be consistent), and at edges, match the guide image. Edge alignment (abrupt weight distribution). This key feature satisfies the following requirements: in statistically homogeneous regions, the weight distribution is uniform, which is beneficial for calculating stable local statistics; at the boundaries of different regions, the weight map can also be clearly delineated, avoiding aliasing of statistics at the boundaries. Finally, through... Make slight offsets and scaling to ensure its minimum value is close to a small positive number. (e.g., 0.1), the maximum value does not exceed 1, that is This operation achieves the following effect: even the least significant regions have pixels that make a small contribution to the statistical calculation, thus ensuring numerical stability.
[0044] In the exemplary embodiment described above, the objective of step S3 is to comprehensively utilize information from each scale to estimate the optimal local mean and standard deviation for each pixel of the original image. Specifically, local statistical estimation is first performed within each scale. For each scale... The image below Content-aware weighting graph Calculate pixel position Location, passage The locally weighted mean and standard deviation. In some embodiments, defined as... Centered on, with radius The square window neighborhood is ,but The local statistics for location are: , , .
[0045] Of the three formulas listed above, Indicates the first Multi-feature response map of layer image, It is a scale-related parameter that can be set to... , This is the base radius. Using the formula above, the following effect can be achieved: at a coarse scale (downsampled image), a larger perceptual neighborhood is used to capture a wider range of regional statistics; at a fine scale, a smaller neighborhood is used to capture details. In the formula above, the content-aware weight... (in the square window neighborhood) The role of content-aware weights at location is crucial. These weights ensure that, when calculating local statistics, pixels with rich texture and sharp edges (high weight) dominate the calculation of statistics, while pixels in flat areas (low weight) have a smaller impact, thus making the estimated... and It is more representative of the local characteristics of the "meaningful" regions in an image.
[0046] The specific implementation method of cross-scale fusion in step S3 is provided below. When obtaining the data from the coarsest scale (… From the finest scale ( A series of statistical fields Then, this series of statistical fields is fused to the original scale (generally, the original scale uses...). This embodiment employs a coarse-to-fine fusion strategy. First, the coarsest-scale statistical field is upsampled to a smaller scale using bilinear interpolation. The size is obtained Then, with scale l The statistical fields calculated from the images themselves are weighted and fused. The fusion formula is as follows: , , in, These are adaptive fusion coefficients, derived from the weight graph at this scale. Local entropy Decide: ,in yes exist The normalized histogram distribution within a small neighborhood. High local entropy indicates complex texture and large weight variations in the region, thus placing greater trust in the current fine-scale statistical estimate. A value close to 1 indicates a flat region, suggesting greater confidence in coarse-scale, more stable statistical estimates. (Close to 0). Specifically, the adaptive fusion coefficient can be defined as: ,in It is the sigmoid function. It is the slope factor. It is the entropy threshold. It can be calculated in the same way or with Maintain consistency. Then, repeat the above upsampling and weighted fusion process until the fused statistical field at the original scale is obtained. and To further enhance global context awareness and suppress small-scale statistical fluctuations that may be caused by noise in the weight map, a fast one-step bilateral filtering or nonlocal mean filtering can be applied to the fused statistical field, using the original image... To guide the process and ensure the filtering process preserves the edges, an adaptive statistical field is ultimately obtained for normalization. and .
[0047] In the embodiments provided in this application, when obtaining the adaptive statistical field and Then, the normalization transformation itself is intuitive, and specifically, it is performed as follows: ,in It is a very small positive number used to prevent division by zero errors. According to the formula above, the normalization operation is performed independently at each pixel location. As the "local brightness center" of a pixel As a "local contrast measure," it eliminates the influence of non-uniform lighting by subtracting the local mean; and it normalizes contrast within each small local area by dividing by the local standard deviation. Because... and It is spatially variable and adaptively determined by the image content, thus enabling the transformation to simultaneously handle multiple regions in an image with uneven brightness and varying contrast. For example, when the same object is in a shadow area on one side and a highlight area on the other in an image, if global statistical normalization is used, the shadow and highlight areas may still retain significant brightness deviations, even leading to the compression of local details. However, this application uses content-aware weight-guided local statistical estimation, combined with cross-scale fusion to obtain a more stable and structure-fitting statistical field. This allows for the establishment of normalized references that better conform to local content in the shadow and highlight areas, thereby reducing the impact of uneven illumination while preserving the discernibility of edge and texture details as much as possible.
[0048] In some embodiments, given that completely unconstrained pixel-level adaptation may lead to inconsistencies in the global appearance of the normalized image, such as slight color shifts between different regions or inconsistent overall dynamic range, a lightweight global coordination module can be introduced as an optional post-processing step, based on the embodiments described above. This lightweight global coordination module does not change the essential advantages of the adaptive normalization described above, but only performs fine-tuning. Specifically, it calculates the normalized image... global mean and standard deviation (Across all pixels), then adjust the image to a mild global target statistic. ,For example , (i.e., standard normal distribution), or set based on prior knowledge of the dataset. Further, a soft constraint method is used for adjustment, with the specific formula as follows: ,in, The mixing coefficient is usually set to 0.7~0.9, indicating that the adaptive normalization result is still the main factor, with only slight global constraints applied. This function represents the construction of a diagonal matrix. Linear interpolation is performed on a globally normalized version to ensure that the entire image as a whole does not statistically deviate excessively from the normal range while preserving the advantages of local adaptation.
[0049] In summary, this application constructs a multi-scale image set, generates a content-aware weight map, calculates the local mean field and local standard deviation field based on the content-aware weight map at each scale, and performs cross-scale fusion from coarse to fine scale to obtain the final local statistical field of the original scale. Based on this, a pixel-by-pixel and channel-by-channel normalization transformation is performed on the original RGB image. Thus, without relying on external supervision or additional large models, it achieves image content-driven normalization processing while taking into account structural detail preservation and statistical estimation stability.
[0050] Furthermore, in some exemplary experiments, after normalizing the input image using the aforementioned exemplary technical solution, performance improvements in downstream visual tasks can be observed, with the improvements being more significant in cross-domain scenarios. For example, in tasks such as image classification, object detection, or semantic segmentation, using the normalized output as the input to the downstream model can result in a performance gain of approximately 1% to 3% on public datasets or equivalent scenarios compared to not performing this normalization or using conventional normalization methods. In scenarios with large domain shifts, such as from synthetic data to real data or from sunny days to rainy days, the gains are usually more significant because the differences in input distribution are effectively converged. Since the technical solution of this application mainly consists of operators such as multi-scale Gaussian pyramid construction, low-level feature calculation, local weighted statistics, interpolation upsampling and edge-preserving filtering, the overall computational complexity can be approximated as a linear order of magnitude with respect to the number of pixels. It is easy to achieve acceleration through sliding window accumulation, parallelized operators or parallel implementation by a graphics processor. For an input image with a resolution of approximately 1024×768, the normalization process proposed in this application can achieve a processing latency of milliseconds (e.g., about 10ms), thus balancing performance and engineering usability.
[0051] It should be understood that the above content is only used to illustrate the technical solution of this application and not to limit it. Equivalent modifications or substitutions made by those skilled in the art to the step sequence, feature extraction method, weight map generation method, neighborhood shape or parameter configuration, determination method of fusion coefficient, and post-processing form without departing from the concept of this application shall all fall within the protection scope of this application.
Claims
1. An image normalization method based on adaptive content-aware and multi-scale structure-preserving principles, characterized in that, include: Obtain the original RGB image, and construct a Gaussian pyramid based on the original RGB image, including retaining the original scale image and downsampling it step by step to obtain at least one low-resolution scale image, so as to form a multi-scale image set; For each scale image in the multi-scale image set, a content-aware weight map associated with the content of the scale image is generated. The content-aware weight map is used to characterize the weight of each pixel in the calculation of local statistics, and the content-aware weight map is determined based on at least one low-level visual feature of the scale image. The low-level visual feature is used to characterize edge, contrast or color consistency. For each scale image in the multi-scale image set, based on the corresponding content-aware weight map, the local mean and local standard deviation are calculated for each color channel at each pixel location within a pixel neighborhood centered on the pixel location and having a preset window or preset radius, so as to form a local mean field and a local standard deviation field. Cross-scale fusion is performed on the local mean and local standard deviation fields of each scale from coarse to fine scale to obtain the final local mean and final local standard deviation fields of the original scale. The cross-scale fusion includes: upsampling the local mean and local standard deviation fields of the coarser scale to the finer scale to be fused; determining the fusion coefficient based on the local statistical characteristics of the content-aware weight map of the finer scale; and performing weighted fusion of the local mean and local standard deviation fields of the finer scale with the upsampled local mean and local standard deviation fields of the coarser scale. Based on the final local mean field and the final local standard deviation field, a pixel-by-pixel and channel-by-channel normalization transformation is performed on the original RGB image to obtain a normalized output image.
2. The image normalization method according to claim 1, characterized in that, The construction of the Gaussian pyramid includes: performing Gaussian smoothing on the original scale image, then downsampling to obtain the next scale image, and repeating the Gaussian smoothing and downsampling to obtain the at least one low-resolution scale image.
3. The image normalization method according to claim 1, characterized in that, The generation of the content-aware weight map includes: calculating at least two feature maps among gradient magnitude features, local contrast features, and color consistency features for the scale image, normalizing and fusing the feature maps to obtain an initial saliency map.
4. The image normalization method according to claim 3, characterized in that, The generation of the content-aware weight map further includes: using the scale image as a guide, performing guided filtering on the initial saliency map to obtain a content-aware weight map aligned with the edge structure of the scale image.
5. The image normalization method according to claim 1, characterized in that, The values of the content-aware weight graph are constrained to a range greater than 0 and not greater than 1, and the constraint includes scaling, offsetting and / or truncating the content-aware weight graph so that its minimum value is not less than a preset lower limit.
6. The image normalization method according to claim 1, characterized in that, The calculation of the local mean and local standard deviation includes: performing weighted statistics on the neighboring pixels in the pixel neighborhood according to the content-aware weight to obtain the weighted local mean and weighted local variance of the corresponding pixel position, and determining the local standard deviation based on the weighted local variance.
7. The image normalization method according to claim 1, characterized in that, The step of determining the fusion coefficient based on the local statistical features of the content-aware weight map at a finer scale includes: calculating the local entropy based on the value distribution of the content-aware weight map within a local window, and performing a function mapping on the local entropy to obtain the fusion coefficient, wherein the function mapping is a Sigmoid function mapping.
8. The image normalization method according to claim 1, characterized in that, Upsampling the coarser local mean and local standard deviation fields to the finer scale to be fused includes upsampling using bilinear interpolation; and after obtaining the final local mean and final local standard deviation fields at the original scale, edge-preserving smoothing is performed on the final local mean and final local standard deviation fields.