Watermark splicing stripe suppression method and system based on spatial pyramid decomposition and adaptive learning rate

By using spatial pyramid decomposition and adaptive learning rate, the low-frequency and high-frequency components of digital watermarks are separated and optimized, solving the technical challenges of stripe suppression and detail protection in digital watermark splicing. This achieves efficient and stable watermark processing results, suitable for digital watermark splicing generation and document anti-counterfeiting.

CN121860862APending Publication Date: 2026-04-14SHANGHAI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-31
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

In digital watermark splicing, large, visually abrupt stripes are formed due to the superposition of local brightness differences. Traditional methods cannot effectively suppress splicing stripes while protecting watermark details, and parameter settings rely on human experience, resulting in unstable effects.

Method used

The spatial pyramid decomposition technique is used to separate low-frequency and high-frequency components. Combined with an adaptive learning rate and a high-frequency protection factor, and through weighted global mean correction and pixel limiting, the low-frequency components are optimized in a directional manner and the high-frequency components are recombined adaptively, resulting in the output of the target watermark image.

Benefits of technology

It achieves a balance between effectively suppressing splicing stripes and protecting watermark details. The adaptive optimization process is stable and efficient, suitable for digital watermark splicing generation and document anti-counterfeiting. It reduces the technical requirements for operators and is suitable for mass production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121860862A_ABST
    Figure CN121860862A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of digital watermark and digital image processing, and discloses a watermark splicing stripe suppression method and system based on spatial pyramid decomposition and an adaptive learning rate, and the method comprises the steps: converting a to-be-processed image into a single-channel gray floating point matrix; pyramid decomposition is carried out through 3 * 3 mean filtering, and a low-frequency component reflecting the brightness distribution trend and a high-frequency component containing edge textures are separated out; a multi-round iterative optimization strategy is adopted, reflection boundary filling, the dynamic learning rate of linear attenuation and protective pixel amplitude limiting are combined, and large fringes which are spliced and displayed are restrained in a targeted mode; recombining the optimized low-frequency component with the original high-frequency component based on a preset high-frequency protection factor; and through weighted global mean correction and 0-255 pixel amplitude limiting, outputting a target watermark image without obvious splicing stripes and with complete high-frequency details. According to the method, the balance between splicing stripe suppression and watermark detail protection is realized, and the method is suitable for scenes such as digital watermark splicing generation and document anti-counterfeiting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of digital watermarking and digital image processing technology, specifically relating to a watermark splicing stripe suppression method and system based on spatial pyramid decomposition and adaptive learning rate. Background Technology

[0002] In the field of digital watermarking technology, generating large-area watermarks through splicing is an important means of achieving document anti-counterfeiting and copyright protection. However, this technology has long faced a difficult-to-overcome quality defect: due to the microscopic brightness unevenness of each small watermark in the initial design stage, when these small blocks are spliced ​​according to a regular grid, the originally localized minute brightness differences are drastically amplified through the spatial continuity effect, forming large, macroscopically visible bright and dark stripes. This stripe phenomenon appears visually abrupt, severely damaging the overall uniformity and professionalism of the watermark, and reducing its application value in high-end anti-counterfeiting and fine printing scenarios. Currently, the industry mainly uses traditional image smoothing methods, such as mean filtering and Gaussian filtering, which, while theoretically able to reduce brightness differences to some extent, have fundamental technical limitations in practical applications. These methods are essentially a "one-size-fits-all" processing strategy, unable to distinguish between the low-frequency brightness components that cause the stripes and the high-frequency detail components that constitute the watermark recognition features. Key visual elements in watermarks, including delicate text strokes, fine pattern outlines, and decorative texture details, mainly exist in the high-frequency components of the image. Traditional smoothing processes indiscriminately attenuate all frequency components, inevitably blurring these important features and losing details while suppressing stripes, sometimes even affecting watermark recognition and authentication. More problematic is the heavy reliance on operator experience for parameter settings in traditional methods. Key parameters such as the filter kernel size and smoothing intensity need manual adjustment based on different watermark patterns and splicing scales, often requiring trial and error, which is time-consuming and inconsistent. Inexperienced operators often struggle to find the optimal balance between stripe suppression and detail preservation, frequently resulting in watermarks with either insufficient stripe suppression or excessive detail loss. While some improvements have been attempted, such as edge-protection-based smoothing algorithms, these methods typically only identify obvious edges with large gradients, failing to adequately protect visually important details with smaller gradients. Furthermore, while multi-scale analysis-based methods alleviate this problem to some extent, they are often computationally complex and lack effective theoretical guidance for designing recombination rules for components at different scales.

[0003] Therefore, the field of digital watermarking urgently needs an innovative technical solution that can fundamentally overcome the limitations of traditional methods and achieve an organic unity between splicing stripe suppression and watermark detail protection. Such a solution should possess precise component separation capabilities, an adaptive parameter adjustment mechanism, and stable processing results to truly meet the urgent demand for high-quality watermarks in practical applications. Summary of the Invention

[0004] To address the issue of visually abrupt large stripes formed by the superposition of local brightness differences in digital watermark splicing, and to avoid the technical problem of excessive smoothing of high-frequency details in watermarks caused by traditional averaging processing, this invention provides a watermark splicing stripe suppression method and system based on spatial pyramid decomposition and adaptive learning rate. This method achieves a balance between splicing stripe suppression and watermark detail protection, and is applicable to scenarios such as digital watermark splicing generation and document anti-counterfeiting.

[0005] To achieve the above objectives, the present invention provides the following solution: A watermark splicing stripe suppression method based on spatial pyramid decomposition and adaptive learning rate, the method comprising: The watermark image to be processed is decomposed to separate the low-frequency component that reflects the brightness distribution trend and the high-frequency component that contains edge texture. Targeted optimization of low-frequency components; Based on a preset high-frequency protection factor, the optimized low-frequency components are recombined with the high-frequency components; Based on the recombination results, the target watermark image is output through weighted global mean correction and pixel limiting.

[0006] Preferably, the method for decomposing the watermark image to be processed and separating the low-frequency component reflecting the brightness distribution trend and the high-frequency component containing edge texture includes: A predefined low-pass filter kernel is used to perform image convolution processing on the watermarked image to be processed, and low-frequency components reflecting the brightness distribution trend are extracted. By performing a difference operation between the watermark image to be processed and the low-frequency component, the high-frequency component containing edge texture is separated.

[0007] Preferably, the method for targeted optimization of low-frequency components includes: Calculate the fill width based on the window size, and perform reflection-symmetric fill on the current low-frequency component; For the padded extended matrix, perform convolution operation using a matrix of all 1s with the same size as the window, and then normalize by dividing by the window area to obtain the local mean field at each pixel location; Based on the current iteration progress, calculate the decayed learning rate according to the formula: "Dynamic learning rate = Initial learning rate × (1 - 0.9 × Current iteration number / Total iteration number)". Based on the difference between the local mean field and the target global mean, the update amount is calculated in combination with the dynamic learning rate, and then the update amount is smoothed and filtered by the 3×3 mean check. After each update, all pixel values ​​in the low-frequency components are strictly limited to the range of [50, 200].

[0008] Preferably, the method for recombining the optimized low-frequency components and high-frequency components based on a preset high-frequency protection factor includes: An adaptive high-frequency protection factor calculation mechanism based on multi-feature image content analysis is used to comprehensively evaluate the detail richness of the image; The protection factor value is dynamically adjusted based on the detail richness assessment results to establish a matching relationship between image characteristics and protection strength; By implementing differentiated reconstruction parameters based on matching relationships and the characteristics of different regions of the image, pixel-level adaptive fusion control is achieved to obtain reconstruction results.

[0009] Preferably, the method for outputting the target watermark image based on the recombination result, through weighted global mean correction and pixel limiting, includes: Based on the reconstruction results, the global brightness mean of the current image is calculated, and the overall brightness is fine-tuned by a weighted compensation term "(target global mean - current global mean) × 0.7". The fine-tuned image matrix is ​​constrained to the standard range of [0, 255] for all pixel values ​​and converted to an 8-bit unsigned integer data type to output the target watermark image.

[0010] The present invention also provides a watermark splicing stripe suppression system based on spatial pyramid decomposition and adaptive learning rate. The system is used to implement the aforementioned method and includes: a spatial frequency decomposition module, a low-frequency component iterative optimization module, an adaptive detail reconstruction module, and a global correction and output module. The spatial frequency decomposition module is used to decompose the watermark image to be processed, separating the low-frequency component that reflects the brightness distribution trend and the high-frequency component that contains edge texture. The low-frequency component iterative optimization module is used to perform targeted optimization on the low-frequency components; The adaptive detail reconstruction module is used to reconstruct the optimized low-frequency components and high-frequency components based on a preset high-frequency protection factor. The global correction and output module is used to output the target watermark image based on the reconstruction result through weighted global mean correction and pixel limiting.

[0011] Preferably, the spatial frequency decomposition module includes: a low-frequency component unit and a high-frequency component unit; The low-frequency component unit is used to perform image convolution processing on the watermark image to be processed using a predefined low-pass filter kernel to extract low-frequency components that reflect the brightness distribution trend. The high-frequency component unit is used to separate the high-frequency component containing edge texture by performing a difference operation between the watermark image to be processed and the low-frequency component.

[0012] Preferably, the low-frequency component iterative optimization module includes: a reflection boundary filling unit, a local mean field calculation unit, a dynamic learning rate adjustment unit, a smooth update application unit, and a protective numerical limiting unit; The reflection boundary filling unit is used to calculate the filling width according to the window size and to perform reflection symmetry filling on the current low-frequency component; The local mean field calculation unit is used to perform convolution operation on the filled extended matrix using a matrix of all 1s with the same window size, and then divide it by the window area for normalization to obtain the local mean field at each pixel position. The dynamic learning rate adjustment unit is used to calculate the decayed learning rate according to the current iteration progress, based on the formula "dynamic learning rate = initial learning rate × (1 - 0.9 × current iteration number / total iteration number)". The smooth update application unit is used to calculate the update amount based on the difference between the local mean field and the target global mean, combined with the dynamic learning rate, and then smooth the update amount by using a 3×3 mean check. The protective numerical limiting unit is used to strictly limit all pixel values ​​in the low-frequency component to the numerical range of [50, 200] after each update.

[0013] Preferably, the adaptive detail reconstruction module includes: a pixel evaluation unit, a protection factor establishment unit, and a reconstruction unit; The pixel evaluation unit is used to comprehensively evaluate the detail richness of the image by employing an adaptive high-frequency protection factor calculation mechanism based on multi-feature image content analysis. The protection factor establishment unit is used to dynamically adjust the protection factor value according to the detail richness evaluation result, and establish a matching relationship between image characteristics and protection strength. The recombination unit is used to implement differentiated recombination parameters based on matching relationships and the characteristics of different regions of the image, thereby achieving pixel-level adaptive fusion control and obtaining recombination results.

[0014] Preferably, the global correction and output module includes: a global correction unit and an output unit; The global correction unit is used to calculate the global brightness mean of the current image based on the reconstruction result, and to fine-tune the overall brightness through a weighted compensation term "(target global mean - current global mean) × 0.7". The output unit is used to limit all pixel values ​​of the fine-tuned image matrix to the standard range of [0, 255] and convert them into 8-bit unsigned integer data type, and output the target watermark image.

[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: (1) A perfect balance between efficient wrinkle suppression and precise detail preservation By using high- and low-frequency separation technology, the processing target is locked on the low-frequency components that cause stripes, while the high-frequency components that carry details are preserved as is. This fundamentally solves the problem of blurred details caused by the "one-size-fits-all" approach of traditional methods, and achieves a high degree of unity between visual uniformity and content clarity.

[0016] (2) Adaptive optimization process The dynamic learning rate mechanism employed makes the optimization process intelligent and stable, with rapid convergence in the early stages and fine-tuning in the later stages, achieving excellent results without human intervention.

[0017] (3) Strong robustness Multiple safeguards, including protective limiting and weighted global correction, ensure the numerical stability of the processing flow, effectively avoiding pixel overflow and over-adjustment, making the method applicable to watermarked images of various types and complexities.

[0018] (4) High degree of automation The entire process has clearly defined parameters and provides an adaptive parameter selection strategy, which greatly reduces the technical requirements for operators and is suitable for mass industrial production environments.

[0019] (5) Broad application prospects This invention is not only applicable to the splicing and generation of digital watermarks and document anti-counterfeiting, but can also be extended to any image processing field that requires the elimination of block artifacts and the preservation of image details, and has high practical value and promotion potential. Attached Figure Description

[0020] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a schematic diagram of a watermark splicing stripe suppression method based on spatial pyramid decomposition and adaptive learning rate according to an embodiment of the present invention. Figure 2 This is a detailed flowchart of the low-frequency component iterative optimization steps in an embodiment of the present invention; Figure 3 The following are schematic diagrams of the watermark image before and after processing according to an embodiment of the present invention. (a) is the watermark splicing effect without processing, in which obvious large stripes are visible. (b) is a comparison diagram of the watermark effect after processing by the method of the present invention, showing that the stripes are effectively suppressed and the details are clear. Detailed Implementation

[0022] 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 some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0023] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0024] Example 1 like Figure 1 As shown, this invention provides a watermark splicing stripe suppression method based on spatial pyramid decomposition and adaptive learning rate, the method comprising: The watermark image to be processed is decomposed to separate the low-frequency component that reflects the brightness distribution trend and the high-frequency component that contains edge texture. Targeted optimization of low-frequency components; Based on a preset high-frequency protection factor, the optimized low-frequency components are recombined with the high-frequency components; Based on the recombination results, the target watermark image is output through weighted global mean correction and pixel limiting.

[0025] In this embodiment, the method for decomposing the watermark image to be processed and separating the low-frequency component reflecting the brightness distribution trend and the high-frequency component containing edge texture includes: A predefined low-pass filter kernel is used to perform image convolution processing on the watermarked image to be processed, and low-frequency components reflecting the brightness distribution trend are extracted. By performing a difference operation between the watermark image to be processed and the low-frequency component, the high-frequency component containing edge texture is separated.

[0026] like Figure 2 As shown, in this embodiment, the method for directional optimization of low-frequency components includes: Calculate the fill width based on the window size, and perform reflection-symmetric fill on the current low-frequency component; For the padded extended matrix, perform convolution operation using a matrix of all 1s with the same size as the window, and then normalize by dividing by the window area to obtain the local mean field at each pixel location; Based on the current iteration progress, calculate the decayed learning rate according to the formula: "Dynamic learning rate = Initial learning rate × (1 - 0.9 × Current iteration number / Total iteration number)". Based on the difference between the local mean field and the target global mean, the update amount is calculated in combination with the dynamic learning rate, and then the update amount is smoothed and filtered by the 3×3 mean check. After each update, all pixel values ​​in the low-frequency components are strictly limited to the range of [50, 200].

[0027] In this embodiment, the method for recombining the optimized low-frequency components and high-frequency components based on a preset high-frequency protection factor includes: An adaptive high-frequency protection factor calculation mechanism based on multi-feature image content analysis is used to comprehensively evaluate the detail richness of the image; The protection factor value is dynamically adjusted based on the detail richness assessment results to establish a matching relationship between image characteristics and protection strength; By implementing differentiated reconstruction parameters based on matching relationships and the characteristics of different regions of the image, pixel-level adaptive fusion control is achieved to obtain reconstruction results.

[0028] In this embodiment, the method for outputting the target watermark image based on the recombination result, through weighted global mean correction and pixel limiting, includes: Based on the reconstruction results, the global brightness mean of the current image is calculated, and the overall brightness is fine-tuned by a weighted compensation term "(target global mean - current global mean) × 0.7". The fine-tuned image matrix is ​​constrained to the standard range of [0, 255] for all pixel values ​​and converted to an 8-bit unsigned integer data type. The target watermark image is then output. Figure 3 As shown.

[0029] Example 2 The present invention also provides a watermark splicing stripe suppression system based on spatial pyramid decomposition and adaptive learning rate. The system is used to implement the method described in Embodiment 1. The system includes: a spatial frequency decomposition module, a low-frequency component iterative optimization module, an adaptive detail reconstruction module, and a global correction and output module. The spatial frequency decomposition module is used to decompose the watermark image to be processed, separating the low-frequency component that reflects the brightness distribution trend and the high-frequency component that contains edge texture. The low-frequency component iterative optimization module is used to perform targeted optimization of low-frequency components; An adaptive detail reconstruction module is used to reconstruct optimized low-frequency components and high-frequency components based on a preset high-frequency protection factor. The global correction and output module is used to output the target watermark image based on the reconstruction results through weighted global mean correction and pixel limiting.

[0030] In this embodiment, the spatial frequency decomposition module includes: a low-frequency component unit and a high-frequency component unit; The low-frequency component unit is used to perform image convolution processing on the watermark image to be processed using a predefined low-pass filter kernel to extract the low-frequency component that reflects the brightness distribution trend. The high-frequency component unit is used to separate the high-frequency component containing edge texture by performing a difference operation between the watermark image to be processed and the low-frequency component.

[0031] Specific implementation process: This module uses advanced spatial convolution technology to accurately decompose the input watermark image into frequency components carrying different visual information, establishing the technical foundation for subsequent processing. Specifically, it includes: Image convolution processing is performed using a predefined low-pass filter kernel, with a 3×3 uniform kernel preferred as the basic configuration. Each element of this filter kernel has a value of 1 / 9, which can effectively extract low-frequency components that reflect the overall brightness distribution of the image, while preserving the structural information of the original image to the greatest extent. By performing precise differential operations between the original image and the low-frequency components, the high-frequency components are completely separated. These high-frequency components contain all the edge features, texture details, and stroke outlines of the watermark image, ensuring the integrity of the detailed features. An independent high-frequency component storage and protection mechanism was established, and strict isolation and protection of high-frequency components were implemented in subsequent processing, which fundamentally avoided the problem of detail loss and provided a reliable technical guarantee for the final detail-protected reconstruction.

[0032] The process of extracting low-frequency components that reflect the overall brightness distribution of the image includes: 1. Input Image Preprocessing First, the watermark image to be processed is converted into a single-channel grayscale image (the color image is converted according to the weight of human visual perception). Then, the pixel values ​​of the grayscale image are converted from 8-bit integers to 32-bit floating-point numbers. This is done to fully preserve the tiny brightness differences of ≤1 between pixels—this is the core reason for the macroscopic stripes formed after watermark splicing, and to avoid truncating this kind of critical information through integer operations.

[0033] 2. Custom design of a 3×3 uniform low-pass filter core A 3×3 uniform filter kernel is specially designed for watermark splicing scenarios: the weight of each position in the kernel is 1 / 9. This size will not blur the brightness difference within the sub-blocks due to an excessively large kernel (such as 5×5), nor will it fail to capture the overall brightness trend due to an excessively small kernel (such as 1×1). It can accurately extract the brightness distribution characteristics of the spliced ​​watermark. The equal weight design can also avoid the problem of "weighted suppression of brightness extrema" of traditional Gaussian kernels, and fully preserve the brightness offset between spliced ​​sub-blocks.

[0034] 3. Reflection boundary filling treatment Before extracting low frequencies via convolution, the preprocessed image undergoes reflection boundary padding (with a padding width of 1, meaning the image is expanded by 1 row / column on all sides). The padding rule is to "mirror-replicate" the pixel values ​​at the image edges (e.g., the padding pixels outside the upper boundary replicate the pixels at the symmetrical position of the top row of the image). This padding method solves the problems of traditional zero padding (darker edges) and nearest-neighbor padding (distorted edge brightness), ensuring that the low-frequency components in the image edge region accurately reflect the true brightness trend—which is crucial for suppressing edge stripes in spliced ​​watermarks.

[0035] 4. Extracting low-frequency components using spatial convolution. A custom 3×3 uniform filter kernel is used to perform a two-dimensional spatial convolution on the padded image: For each pixel, all pixel values ​​within its 3×3 neighborhood are taken, multiplied by the weight (1 / 9) of the corresponding position of the filter kernel, and then summed to obtain the low-frequency value of that pixel. After convolution, the padded edge portions are removed, resulting in a low-frequency component matrix with the same size as the original image—this matrix only retains the overall brightness distribution trend of the image, completely eliminating pixel-level details (such as text strokes and fine textures).

[0036] 5. Low-frequency component numerical calibration Perform simple numerical limiting on the low-frequency components obtained from convolution: limit all pixel values ​​to the minimum and maximum grayscale value range of the original image to ensure that the overall brightness trend of the low-frequency components is consistent with the original image, and avoid deviation of the brightness trend caused by small errors in the convolution operation.

[0037] The range of low-frequency components is defined as follows: The numerical characteristics of low-frequency components must meet two core constraints: Overall brightness consistency: The global average brightness of the low-frequency component deviates from the average brightness of the original image by no more than ±5%, ensuring that the extracted brightness trend matches the original image and that the overall brightness shift is not caused by low-frequency extraction. Local consistency: The low-frequency value of any pixel deviates from the average brightness of the original 7×7 neighborhood centered on that pixel by no more than ±10%, ensuring that the low-frequency component can accurately reflect the brightness trend of the local area, rather than meaningless values ​​that are detached from the original image.

[0038] The low-frequency component is strictly limited to "carrying only the brightness distribution trend and containing no high-frequency details": specifically, the pixel gradient value of the low-frequency component (the core indicator reflecting the edge / detail) does not exceed 10% of the gradient value of the original image - this ensures that the low-frequency component only serves to suppress the splicing stripes and will not mix in the watermark's detailed features, thus avoiding the destruction of key information for watermark recognition during subsequent optimization.

[0039] The process of achieving complete separation of high-frequency components through precise difference operations between the original image and the low-frequency components includes: 1. Consistency calibration before separation: Before performing differential operations, ensure that the original image and the low-frequency component meet the "double consistency" requirement: consistent size: after convolution and cropping, the height and width of the low-frequency component are completely matched with the original preprocessed image (32-bit floating-point grayscale image), with no pixel dimension deviation; consistent numerical precision: both are 32-bit floating-point data to avoid detail truncation caused by integer operations (such as a pixel brightness difference of ≤1).

[0040] 2. Pixel-by-pixel precise difference operation (core step): Using pixels as the smallest unit, a pixel-by-pixel subtraction operation is performed on the original preprocessed image and the low-frequency components to directly separate the high-frequency components. Simplified formula: H(x,y) = I_f(x,y) - L_{final}(x,y) Where: H(x,y) is the high-frequency component value at coordinate (x,y); I_f(x,y) is the pixel value at (x,y) of the original preprocessed image (32-bit floating point); L_{final}(x,y) is the pixel value at (x,y) of the calibrated low-frequency component.

[0041] The entire operation is performed with floating-point precision, which can completely preserve the tiny brightness difference of ≤1 between the original image and the low-frequency components—these differences are the core carriers of key details such as the fine edges and stroke textures of the watermark.

[0042] 1. Numerical calibration of high-frequency components (denoising + preservation of details): Targeted calibration is performed on the high-frequency components obtained by differential calculation, removing only meaningless numerical noise without losing effective details: Amplitude limiting calibration: The high-frequency component values ​​are limited to the range of (-50, 50); Zero value rounding: High-frequency values ​​with an absolute value ≤ 0.1 are rounded to 0 (these values ​​are small errors in floating-point operations and have no actual detail significance), avoiding meaningless noise interference with subsequent reconstruction.

[0043] High frequency limitation range: High-frequency components are strictly limited to "carrying only the identification details of the watermark, without any brightness trend information": Functional boundary: It does not participate in the suppression of splicing stripes throughout the entire process (only low-frequency components participate in optimization), and is only superimposed back into the image according to the protection factor in the final reconstruction stage; Protection rules: After separation, the data is immediately stored independently and protected in isolation. All subsequent processing steps (such as low-frequency iterative optimization) will not modify any pixel values ​​of the high-frequency components. This is the core difference from the existing technology of "high-frequency and low-frequency mixed optimization", ensuring that details are not destroyed.

[0044] The specific process of establishing an independent high-frequency component storage and protection mechanism is as follows: Independent storage: The separated high-frequency components are saved as a separate file in a dedicated folder, completely separate from the low-frequency components and other processing files, to avoid accidental operation due to mixed storage; Read-only protection: Set the file to "read-only" attribute, allowing only reading in all subsequent processing stages, prohibiting modification / deletion; at the code level, only the read interface is exposed, with no modification permissions; Simple verification: Record the MD5 eigenvalues ​​and gradient mean of high-frequency components during storage (reflecting whether the details are complete). Recalculate and compare them before use. If the eigenvalues ​​are consistent and the gradient mean deviation is ≤5%, it is determined that the details are intact.

[0045] In this embodiment, the low-frequency component iterative optimization module includes: a reflection boundary filling unit, a local mean field calculation unit, a dynamic learning rate adjustment unit, a smooth update application unit, and a protective numerical limiting unit. The reflection boundary filling unit is used to calculate the filling width based on the window size and to perform reflection symmetry filling on the current low-frequency component. The local mean field calculation unit is used to perform convolution operation on the padded extended matrix using a matrix of all 1s with the same size as the window, and then normalize it by dividing it by the window area to obtain the local mean field at each pixel location. The dynamic learning rate adjustment unit is used to calculate the decayed learning rate according to the current iteration progress, based on the formula "Dynamic learning rate = Initial learning rate × (1 - 0.9 × Current iteration number / Total iteration number)". The smooth update application unit is used to calculate the update amount based on the difference between the local mean field and the target global mean, combined with the dynamic learning rate, and then smooth the update amount by using a 3×3 mean check. A protective numerical limiting unit is used to strictly limit all pixel values ​​in the low-frequency components to the range of [50, 200] after each update.

[0046] Specific implementation process: This module specifically addresses the splicing stripe problem in low-frequency components and designs a complete iterative optimization solution, which includes: An intelligent dynamic learning rate adjustment mechanism is introduced, in which the learning rate decreases linearly with the iteration process. A larger learning rate is used in the early stage of optimization to ensure rapid convergence, and a smaller learning rate is used in the later stage of optimization to achieve fine adjustment, ensuring that the entire optimization process has the dual advantages of convergence speed and processing accuracy. The update strategy based on the local mean field ensures the processing accuracy of the image boundary area through reflection boundary filling technology. It uses local neighborhood statistical information to guide the brightness value of each pixel to intelligently approach the target global mean, effectively eliminating the splicing stripes caused by brightness jumps. A strict protective limiting mechanism is implemented to restrict the numerical range of low-frequency components to a strict range of [50, 200]. This measure not only ensures the numerical stability of the processing process, but also reserves sufficient dynamic range for subsequent high-frequency component recombination, effectively preventing pixel value overflow or truncation in the final result. It supports extended optimization functions based on local statistical characteristics. By analyzing the variance, gradient and other statistical features of local regions, it can achieve more refined control effects and further improve the suppression quality of splicing stripes.

[0047] Among them, the extended optimization function based on local statistical characteristics, by analyzing the statistical features such as variance and gradient of local regions, achieves a more refined control effect, and further improves the suppression quality of splicing fringes. 1. During each iteration of optimization for the low-frequency components, two additional core features are calculated for the 7×7 local neighborhood of each pixel (consistent with the original local mean calculation window): Local variance: reflects the uniformity of brightness in the region (the smaller the variance, the more uniform the region, and the more obvious the stitching stripes). Simplified formula: Local variance = Average of the squared differences between the pixel values ​​in the neighborhood and the neighborhood mean. Local gradient mean: reflects the amount of detail in the region (the larger the gradient mean, the richer the detail). Simplified formula: Local gradient mean = Average of the gradient values ​​of all pixels in the neighborhood (gradient value = absolute value of the brightness difference between the pixel and its surrounding pixels).

[0048] 2. Dynamically adjust the optimization intensity. Based on statistical characteristics, assign differentiated optimization intensities to different regions: Striped areas (local variance < 5, threshold can be easily adjusted): Optimization intensity = 1.2 (increase intensity, quickly eliminate stripes); Detail areas (local gradient mean > 3, threshold can be easily adjusted): Optimization intensity = 0.8 (reduce intensity, protect details); Normal areas: Optimization intensity = 1 (maintain original intensity).

[0049] 3. Refined updates of low-frequency pixels integrate the optimization intensity into the original iterative update logic. The formula is: \(\text{updated pixel value} = \text{original pixel value} + (\text{target mean} - \text{local mean}) × \text{dynamic learning rate} × \text{optimization intensity}\). Only the optimization intensity is adjusted, without the need to refactor the original iterative process, making it simple and easy to integrate.

[0050] In this embodiment, the adaptive detail reconstruction module includes: a pixel evaluation unit, a protection factor establishment unit, and a reconstruction unit; The pixel evaluation unit is used to comprehensively evaluate the detail richness of an image by employing an adaptive high-frequency protection factor calculation mechanism based on multi-feature image content analysis. The protection factor establishment unit is used to dynamically adjust the protection factor value based on the detail richness assessment results and establish a matching relationship between image characteristics and protection strength. The recombination unit is used to implement differentiated recombination parameters based on matching relationships and the characteristics of different regions of the image, thereby achieving pixel-level adaptive fusion control and obtaining recombination results.

[0051] Specific implementation process: This module is responsible for intelligently fusing the optimized components and ensuring the visual quality of the final result through a precise correction mechanism, specifically including: An adaptive high-frequency protection factor calculation mechanism based on multi-feature image content analysis is adopted. It comprehensively evaluates the detail richness of the image through various techniques such as edge detection, gradient magnitude analysis, and texture complexity evaluation, providing a scientific basis for the intelligent selection of protection factors. The protection factor value is dynamically adjusted based on the detail richness assessment results to establish a precise matching relationship between image characteristics and protection strength. A stronger protection strength (0.4-0.5) is used for images with rich details, and a moderate protection strength (0.3-0.4) is used for images with relatively few details. The weighted global brightness correction technique is used to finely adjust the reconstruction results. Through a carefully designed correction formula and a weight coefficient (preferably 0.7) optimized through a large number of experiments, the global brightness of the reconstructed image is ensured to accurately meet the expected target, while maintaining the balance between the frequency components. It supports spatially variable recombination strategies, which can implement differentiated recombination parameters according to the characteristics of different regions of the image, achieve pixel-level adaptive fusion control, and further improve the visual naturalness and detail fidelity of the processing results.

[0052] The adaptive high-frequency protection factor calculation mechanism, based on multi-feature image content analysis, comprehensively evaluates the detail richness of images through various techniques such as edge detection, gradient magnitude analysis, and texture complexity assessment, providing a scientific basis for the intelligent selection of protection factors. The protection factor value is dynamically adjusted based on the detail richness assessment results, establishing a precise matching relationship between image characteristics and protection strength. A stronger protection strength (0.4-0.5) is applied to images with rich detail, while a moderate protection strength (0.3-0.4) is applied to images with relatively less detail. 1. Extract 3 core detail features For the core details of the watermarked image (focusing on edges, sharpness, and texture), only key features are extracted, without performing unnecessary calculations: Edge proportion: Use the Canny edge detection tool to find edge pixels such as text strokes and logo outlines in the image; count the number of these edge pixels, and then divide by the total number of pixels in the image to get the edge proportion; Gradient mean: Calculate the absolute value of the brightness difference between each pixel and its four adjacent pixels (top, bottom, left, and right); then average this difference across all pixels to obtain the gradient mean. Texture complexity: Take each pixel as the center and take a 3×3 pixel area around it; calculate the variance of the brightness values ​​in this small area (the larger the variance, the more drastic the brightness change in the area, and the more complex the texture, such as anti-counterfeiting dot matrix details); finally, average the variance of all small areas to get the texture complexity.

[0053] 2. Feature Normalization The three features have different numerical ranges: for example, the edge percentage is a number between 0 and 1, and the gradient mean might be a number between 0 and 255. Evaluating them directly together would cause interference. Therefore, a unified processing is needed: the value of each feature is converted to the range of 0 to 1 (for example, an edge percentage of 30% is converted to 0.3, and a large gradient mean is closer to 1). The reference standard used for the conversion is the minimum and maximum values ​​of each feature, which are pre-calibrated using a large number of watermark samples. This can be directly reused when batch processing watermarks later without recalculation. After the conversion, all three features become uniform values ​​between 0 and 1.

[0054] 3. Weighted calculation of comprehensive detailed score Custom weights are assigned based on the detailed characteristics of the watermark. The three converted features are then summed according to their weights to obtain a comprehensive score between 0 and 1 (the higher the score, the richer the details of the watermark). Weighting: Edges account for 40%, gradient mean accounts for 35%, and texture complexity accounts for 25%. Reasons for weight design: Whether a watermark can be accurately identified depends on the edges of the text and logo, so the edges have the highest weight; the gradient mean determines whether these edges are clear enough, which is the second most important; texture complexity only applies to watermarks with complex anti-counterfeiting textures, so it is relatively less critical.

[0055] 4. Matching the score to the protection factor (outputting the assessment results) The overall score is divided into three sub-ranges, each corresponding to a fixed protection factor, establishing a precise matching relationship of "the higher the score, the stronger the protection": A score of ≥0.6 indicates a case with extremely rich details (such as watermarks containing microtext or complex anti-counterfeiting textures), and the protection factor is set to 0.45 (strong protection, maximizing the preservation of details). 0.4≤score<0.6: This indicates a medium level of detail (e.g., regular text + logo watermark), with a protection factor of 0.4 (stronger protection, balancing text removal and detail preservation). A score of <0.4 indicates a situation with sparse details (such as simple graphics or single-line watermarks). The protection factor should be set to 0.35 (moderate protection, prioritizing the elimination of splicing stripes).

[0056] The recombination result is directly determined by the value of the protection factor, rather than a simple "matching relationship." The specific acquisition logic is as follows: ,in The adaptive protection factor calculated based on image detail features (e.g., 0.45 when details are rich and 0.35 when details are sparse) is used in the previous text. The value of the protection factor directly determines the weight of high-frequency components in the reconstruction (the higher the weight, the more details are preserved), and finally a preliminary reconstructed image is obtained (without brightness correction).

[0057] The specific process of weighted global brightness correction fine-tuning: Calculate the actual brightness: First, calculate the overall average brightness of the preliminary reconstructed image (add up the brightness values ​​of all pixels and divide by the total number of pixels); Find the brightness difference: Compare the actual average brightness with the expected target average brightness and calculate how much the two differ; Calculate the adjustment amount: Multiply this brightness difference by 0.7 to get the final brightness adjustment range; Uniform brightness adjustment: This adjustment is evenly applied to every pixel of the reconstructed image, bringing the overall brightness closer to the target value; Limiting brightness to prevent overflow: Finally, limit the brightness of all pixels to between 0 and 255 to avoid pixels that are too bright or too dark, thus completing the fine-tuning.

[0058] In this embodiment, the global correction and output module includes: a global correction unit and an output unit; The global correction unit is used to calculate the global brightness mean of the current image based on the reconstruction result, and to fine-tune the overall brightness through a weighted compensation term "(target global mean - current global mean) × 0.7". The output unit is used to limit all pixel values ​​of the fine-tuned image matrix to the standard range of [0, 255] and convert them into 8-bit unsigned integer data type, and output the target watermark image.

[0059] The three core modules work together to form a complete watermarking system. Through systematic technological innovation, it achieves an effective balance between splicing stripe suppression and watermark detail protection, providing reliable technical support for the practical application of digital watermarking technology.

[0060] Example 3 This embodiment provides a complete digital watermarking method, and the specific implementation steps are as follows: 1. Image preprocessing First, the input image file to be processed is received. The file is opened using an image processing library. If the input image is not in RGB color mode, it is first converted to the standard RGB three-channel mode. Then, according to the ITU-R BT.601 standard recommended by the International Telecommunication Union, the RGB image is converted to a single-channel grayscale image using coefficients weighted by human visual perception. The specific conversion formula is as follows: Gray value = 0.299 × R component + 0.587 × G component + 0.114 × B component; After the conversion is complete, the resulting grayscale image matrix is ​​converted to a 32-bit floating-point data type to ensure the numerical accuracy of all subsequent calculation steps.

[0061] 2. Frequency separation Frequency decomposition is performed on the preprocessed grayscale image matrix. A 3×3 uniform low-pass filter kernel is defined, with all elements having a value of 1 / 9. This kernel is then used to perform a convolution operation on the grayscale image matrix, with the boundary processing mode set to "nearest". This extracts the low-frequency components that reflect the overall brightness distribution trend of the image.

[0062] By performing a precise subtraction operation between the original grayscale image matrix and the low-frequency components, the high-frequency components containing all edge, texture, and stroke details are separated. The separated high-frequency components are stored independently to ensure they are not affected in subsequent processing, thus fundamentally avoiding the loss of watermark detail features.

[0063] 3. Iterative optimization of low-frequency components This step is the core process for suppressing splicing stripes, and it involves targeted optimization of low-frequency components: (1) Initialize the optimization variables as the low-frequency component matrix obtained in step 2; (2) Preset key optimization parameters: the number of iterations is set to 100, the initial learning rate is set to 0.5, and the local mean calculation window size is set to 7; (3) In each iteration, perform the following operations in sequence: Reflection boundary filling: Calculate the filling width based on the window size (divided by 2) and perform reflection symmetric filling on the current low-frequency component matrix to ensure that the boundary region has complete neighborhood information when calculating local statistics; Local mean field calculation: For the padded extended matrix, perform convolution operation using a matrix of all 1s with the same size as the window, and then normalize by dividing by the window area to obtain the local mean field at each pixel location; Dynamic learning rate adjustment: Based on the current iteration progress, the decayed learning rate is calculated according to the formula "Dynamic learning rate = Initial learning rate × (1 - 0.9 × Current iteration number / Total iteration number)" to achieve rapid convergence in the early stage of the optimization process and fine adjustment in the later stage; Smooth Update Application: Based on the difference between the local mean field and the target global mean, the update amount is calculated using a dynamic learning rate (after decay). Then, a 3×3 mean check is used to smooth the update amount, ensuring a smooth and stable update process. The calculation process for the target global mean is as follows: using a single original watermark sub-block before stitching (e.g., a 128×128 base watermark image) as a benchmark, its global mean is calculated (without stitching stripe interference, representing the natural and reasonable brightness of the watermark). The formula is: ,in, H is the pixel value of the original watermark sub-block at coordinates (x,y); H×W is the total number of pixels in the sub-block (e.g., 128×128=16384); u_{base} is the baseline mean without stripe interference, ensuring that the target mean matches the brightness characteristics of the watermark itself.

[0064] Protective numerical limiting: After each update, all pixel values ​​in the low-frequency component matrix are strictly limited to the range of [50, 200] to reserve sufficient dynamic range of brightness for subsequent recombination with high-frequency components.

[0065] 4. Detail-protected restructuring To achieve intelligent matching of protection strength, an adaptive mechanism based on image content analysis is introduced: The original grayscale image matrix was converted to 8-bit unsigned integer format, and the Canny edge detection algorithm was used for image content analysis. The Gaussian filter standard deviation was set to 0.8, the high threshold to 60, and the low threshold to 30. The proportion of detected edge pixels to the total number of pixels in the image was calculated.

[0066] The high-frequency protection factor is automatically determined based on the proportion of edge pixels: when the proportion of edge pixels is greater than 20%, it is judged as an image with rich details, and the high-frequency protection factor is set to 0.45; when the proportion of edge pixels is less than 20%, it is judged as an image with relatively few details, and the high-frequency protection factor is set to 0.35.

[0067] The optimized low-frequency components are linearly reconstructed with the original high-frequency components. The reconstruction formula is as follows: The final image matrix = high-frequency protection factor × high-frequency component + optimized low-frequency component.

[0068] 5. Global calibration and output After reconstruction, the global brightness mean of the current image is calculated. A weighted compensation term "(target global mean - current global mean) × 0.7" is used to fine-tune the overall brightness, making it precisely approximate the preset target brightness value. Verification shows that a weighting coefficient of 0.7 can effectively correct the global brightness while avoiding disruption of the established frequency component balance.

[0069] Finally, all pixel values ​​of the corrected image matrix are restricted to the standard range of [0, 255] and converted to an 8-bit unsigned integer data type, and the output is the final processed image.

[0070] The method provided in this embodiment processes watermarked images containing spliced ​​stripes, completely eliminating visual stripes caused by abrupt changes in brightness while fully preserving key identification features such as the stroke outlines and edge details of the watermark. The processed watermarked image exhibits high visual naturalness and significant detail preservation, fully meeting the technical requirements for commercial applications of digital watermarking.

[0071] In summary, this invention achieves two key objectives simultaneously through systematic technological innovation: First, by innovatively implementing a frequency component decomposition architecture in the spatial domain, it effectively decouples splicing stripe suppression from watermark detail protection. This separates the watermark image into a low-frequency component reflecting brightness distribution and a high-frequency component containing detailed features, processing them independently. This completely eliminates splicing stripes while fully preserving the watermark's recognizability. Second, a robust adaptive optimization mechanism is established. Through dynamic learning rate design and automatic adjustment of the high-frequency protection factor based on image content, the processing method intelligently adapts to different watermark pattern characteristics, significantly reducing reliance on human experience and ensuring stable and excellent processing results even for non-professionals. Furthermore, this invention ensures numerical stability and visual naturalness of the processing process through multiple safeguard mechanisms, including protective amplitude limiting, reflection boundary processing, and weighted global correction, providing reliable technical support for the large-scale commercial application of digital watermarking.

[0072] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made to the technical solutions of the present invention by those skilled in the art without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.

Claims

1. A watermark splicing stripe suppression method based on spatial pyramid decomposition and adaptive learning rate, characterized in that, The method includes: The watermark image to be processed is decomposed to separate the low-frequency component that reflects the brightness distribution trend and the high-frequency component that contains edge texture. Targeted optimization of low-frequency components; Based on a preset high-frequency protection factor, the optimized low-frequency components are recombined with the high-frequency components; Based on the recombination results, the target watermark image is output through weighted global mean correction and pixel limiting.

2. The method according to claim 1, characterized in that, Methods for decomposing the watermark image to be processed and separating the low-frequency components that reflect the brightness distribution trend and the high-frequency components that contain edge textures include: A predefined low-pass filter kernel is used to perform image convolution processing on the watermarked image to be processed, and low-frequency components reflecting the brightness distribution trend are extracted. By performing a difference operation between the watermark image to be processed and the low-frequency component, the high-frequency component containing edge texture is separated.

3. The method according to claim 1, characterized in that, Methods for targeted optimization of low-frequency components include: Calculate the fill width based on the window size, and perform reflection-symmetric fill on the current low-frequency component; For the padded extended matrix, perform convolution operation using a matrix of all 1s with the same size as the window, and then normalize by dividing by the window area to obtain the local mean field at each pixel location; Based on the current iteration progress, calculate the decayed learning rate according to the formula: "Dynamic learning rate = Initial learning rate × (1 - 0.9 × Current iteration number / Total iteration number)". Based on the difference between the local mean field and the target global mean, the update amount is calculated in combination with the dynamic learning rate, and then the update amount is smoothed and filtered by the 3×3 mean check. After each update, all pixel values ​​in the low-frequency components are strictly limited to the range of [50, 200].

4. The method according to claim 1, characterized in that, Methods for recombining optimized low-frequency components with high-frequency components based on a preset high-frequency protection factor include: An adaptive high-frequency protection factor calculation mechanism based on multi-feature image content analysis is used to comprehensively evaluate the detail richness of the image; The protection factor value is dynamically adjusted based on the detail richness assessment results to establish a matching relationship between image characteristics and protection strength; By implementing differentiated reconstruction parameters based on matching relationships and the characteristics of different regions of the image, pixel-level adaptive fusion control is achieved to obtain reconstruction results.

5. The method according to claim 1, characterized in that, Based on the recombination results, methods for outputting the target watermark image through weighted global mean correction and pixel limiting include: Based on the reconstruction results, the global brightness mean of the current image is calculated, and the overall brightness is fine-tuned by a weighted compensation term "(target global mean - current global mean) × 0.7". The fine-tuned image matrix is ​​constrained to the standard range of [0, 255] for all pixel values ​​and converted to an 8-bit unsigned integer data type to output the target watermark image.

6. A watermark splicing stripe suppression system based on spatial pyramid decomposition and adaptive learning rate, the system being used to implement the method described in any one of claims 1-5, characterized in that, The system includes: a spatial frequency decomposition module, a low-frequency component iterative optimization module, an adaptive detail reconstruction module, and a global correction and output module; The spatial frequency decomposition module is used to decompose the watermark image to be processed, separating the low-frequency component that reflects the brightness distribution trend and the high-frequency component that contains edge texture. The low-frequency component iterative optimization module is used to perform targeted optimization on the low-frequency components; The adaptive detail reconstruction module is used to reconstruct the optimized low-frequency components and high-frequency components based on a preset high-frequency protection factor. The global correction and output module is used to output the target watermark image based on the reconstruction result through weighted global mean correction and pixel limiting.

7. The system according to claim 6, characterized in that, The spatial frequency decomposition module includes: a low-frequency component unit and a high-frequency component unit; The low-frequency component unit is used to perform image convolution processing on the watermark image to be processed using a predefined low-pass filter kernel to extract low-frequency components that reflect the brightness distribution trend. The high-frequency component unit is used to separate the high-frequency component containing edge texture by performing a difference operation between the watermark image to be processed and the low-frequency component.

8. The system according to claim 6, characterized in that, The low-frequency component iterative optimization module includes: a reflection boundary filling unit, a local mean field calculation unit, a dynamic learning rate adjustment unit, a smooth update application unit, and a protective numerical limiting unit. The reflection boundary filling unit is used to calculate the filling width according to the window size and to perform reflection symmetry filling on the current low-frequency component; The local mean field calculation unit is used to perform convolution operation on the filled extended matrix using a matrix of all 1s with the same window size, and then divide it by the window area for normalization to obtain the local mean field at each pixel position. The dynamic learning rate adjustment unit is used to calculate the decayed learning rate according to the current iteration progress, based on the formula "dynamic learning rate = initial learning rate × (1 - 0.9 × current iteration number / total iteration number)". The smooth update application unit is used to calculate the update amount based on the difference between the local mean field and the target global mean, combined with the dynamic learning rate, and then smooth the update amount by using a 3×3 mean check. The protective numerical limiting unit is used to strictly limit all pixel values ​​in the low-frequency component to the numerical range of [50, 200] after each update.

9. The system according to claim 6, characterized in that, The adaptive detail reconstruction module includes: a pixel evaluation unit, a protection factor establishment unit, and a reconstruction unit; The pixel evaluation unit is used to comprehensively evaluate the detail richness of the image by employing an adaptive high-frequency protection factor calculation mechanism based on multi-feature image content analysis. The protection factor establishment unit is used to dynamically adjust the protection factor value according to the detail richness evaluation result, and establish a matching relationship between image characteristics and protection strength. The recombination unit is used to implement differentiated recombination parameters based on matching relationships and the characteristics of different regions of the image, thereby achieving pixel-level adaptive fusion control and obtaining recombination results.

10. The system according to claim 6, characterized in that, The global correction and output module includes: a global correction unit and an output unit; The global correction unit is used to calculate the global brightness mean of the current image based on the reconstruction result, and to fine-tune the overall brightness through a weighted compensation term "(target global mean - current global mean) × 0.7". The output unit is used to limit all pixel values ​​of the fine-tuned image matrix to the standard range of [0, 255] and convert them into 8-bit unsigned integer data type, and output the target watermark image.