Watermark adaptive placement and fusion method, device and equipment based on perspective constraint

By introducing perspective constraints and recognizability determination mechanisms in the watermark placement, evaluation, and rendering stages, the problems of watermark fit and recognizability in digital artworks are solved, improving the naturalness and visual quality of watermarks and meeting copyright labeling requirements.

CN122115187AActive Publication Date: 2026-05-29HUNAN UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUNAN UNIV
Filing Date
2026-04-28
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In existing technologies for digital artworks, the placement of watermarks lacks constraints on local perspective structures, making it difficult to naturally integrate with the spatial structure of the artwork. The watermark recognition mechanism is insufficient, and the simple rendering method results in limited visual fusion effects, making it difficult to meet the overall aesthetic requirements.

Method used

By introducing a perspective constraint mechanism to generate a perspective geometric carrier during the watermark placement stage, a layered readability judgment mechanism to screen candidate positions during the evaluation stage, and a fusion processing method during the rendering stage, the spatial fit, structural usability, and visual consistency of the watermark and the digital artwork are ensured.

Benefits of technology

It improves the naturalness, stability, and recognizability of watermarks in complex artistic scenarios, generating natural, recognizable, and visually high-quality visible watermark results to meet the actual needs of copyright identification for digital artworks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122115187A_ABST
    Figure CN122115187A_ABST
Patent Text Reader

Abstract

The application relates to a watermark adaptive placement and fusion method, device and equipment based on perspective constraints, which takes a digital artwork image and watermark text content as input, introduces perspective constraints in a watermark placement stage, introduces an identifiable judgment mechanism in a placement evaluation stage, and adopts a fusion processing mode in a rendering stage, so that the spatial fitting, structural usability and visual consistency of the watermark in the digital artwork are effectively improved. By adopting the method, a natural, identifiable and high-visual-quality visible watermark result can be more stably generated for an artistic image with a complex composition, and the actual application requirements of digital artwork copyright identification are better met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of digital image copyright protection technology, and relates to a method, apparatus and device for adaptive placement and fusion of watermarks based on perspective constraints. Background Technology

[0002] With the diversification of digital content dissemination methods, the copyright protection of digital artworks (such as illustrations, paintings, designs, digital posters, etc.) has become increasingly prominent. Watermarking, as a direct and low-cost means of copyright identification, is widely used in the publication and dissemination of digital artworks. Watermarks are typically superimposed on the original image in the form of text or graphics to indicate the author's identity or copyright ownership, thereby deterring unauthorized dissemination.

[0003] Existing visible watermarking technologies mainly focus on watermark content generation, transparency control, and positional overlay. Common methods include fixing the watermark in the corners or edges of an image, or determining the watermark position based on simple rules such as brightness and color contrast. While these methods are relatively simple to implement, they often struggle to simultaneously ensure readability and overall visual consistency in digital artworks with complex compositions and diverse visual styles. To improve the rationality of watermark placement, some existing technologies have introduced automated watermark placement methods based on region analysis or salience detection, reducing interference with the original artwork by avoiding the main subject or highly salient areas. However, these methods typically do not consider local perspective structures common in digital artworks, such as tilted planes or oblique compositions, making it difficult for the watermark to naturally blend with the background geometry in areas with perspective variations. Furthermore, some existing methods improve visual effects by scaling, rotating, or adjusting the color of the watermark, but due to the lack of clear geometric constraints and structural evaluation mechanisms, they struggle to guarantee the integrity and recognizability of the watermark structure in limited or irregular scenes, affecting the stability of automated watermark placement results. In terms of watermark rendering, existing technologies mostly use direct alpha blending to overlay the watermark onto the original image. This method is prone to producing obvious edge marks or halo phenomena at the watermark boundary, making it difficult to maintain consistency with the original color and texture style of the digital artwork and reducing the overall visual quality.

[0004] In summary, existing technologies for visible watermarking of digital artworks generally suffer from the following shortcomings: the watermark placement method lacks constraints on local perspective structure, making it difficult to naturally fit with the spatial structure of the artwork; the watermark placement and cropping process lacks an effective mechanism for determining the recognizability of the watermark, easily generating unreadable watermark results; the watermark rendering method is simple, with limited visual fusion effects, making it difficult to meet the overall aesthetic requirements of digital artworks. Summary of the Invention

[0005] To address the problems existing in the above-mentioned traditional methods, this invention proposes a watermark adaptive placement and fusion method, apparatus and device based on perspective constraints. By introducing corresponding improvement mechanisms in each stage of watermark placement, evaluation and rendering, the naturalness, stability and recognizability of watermarks in complex artistic scenes can be improved.

[0006] To achieve the above objectives, the embodiments of the present invention adopt the following technical solutions:

[0007] On the one hand, a perspective-constrained adaptive watermark placement and fusion method is provided, including the following steps: Step 1: Obtain the digital artwork image and watermark text content.

[0008] Step 2: Segment the digital artwork image, construct a perspective geometric carrier based on the segmented region mask, generate a set of region geometric candidates, and sort each region geometric candidate.

[0009] Step 3: Based on the watermark text content, generate watermarks for each region geometric candidate on the standard plane, then perform perspective mapping to the image domain, and then evaluate and filter the watermarks based on geometric readability and information retention rate. Extract feature vectors for preference selection from the filtered region geometric candidates.

[0010] Step 4: Based on the feature vector and the corresponding region geometric candidates, a human preference alignment placement selection strategy based on a linear sorting model is adopted to determine the final placement position of the watermark.

[0011] Step 5: Determine the final watermark color based on the overall color characteristics of the digital artwork image and the background color of the local area where the watermark will be placed; fill the visible area of ​​the watermark with the final watermark color and blend it with the digital artwork image to output a digital artwork image with the watermark.

[0012] On the other hand, a perspective-constrained watermark adaptive placement and fusion device is also provided, the device comprising: The input data acquisition module is used to acquire images and watermark text content of digital artworks.

[0013] The location generation module is used to segment digital art images, construct perspective geometric carriers based on the segmented region masks, generate a set of region geometric candidates, and sort each region geometric candidate.

[0014] The candidate location evaluation module is used to generate watermarks on a standard plane for each region geometric candidate based on the watermark text content, then perspective map them to the image domain, and then evaluate and filter the watermarks based on geometric readability and information retention rate, and extract feature vectors for preference selection from the filtered region geometric candidates.

[0015] The adaptive placement selection module is used to determine the final placement position of the watermark by adopting a human preference alignment selection strategy based on a linear ranking model, according to the feature vector and the corresponding region geometric candidates.

[0016] The watermark rendering and fusion module is used to determine the final watermark color based on the overall color characteristics of the digital artwork image and the background color of the local area where the watermark will be placed; after filling the visible area of ​​the watermark with the final watermark color, it is fused with the digital artwork image to output a digital artwork image with the watermark.

[0017] In another aspect, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the above-mentioned perspective-constrained watermark adaptive placement and fusion methods.

[0018] One of the above technical solutions has the following advantages and beneficial effects: The aforementioned perspective-constrained adaptive watermark placement and fusion method, apparatus, and device take digital artwork images and watermark text content as input. By introducing perspective constraints in the watermark placement stage, a recognizability determination mechanism in the placement evaluation stage, and a fusion processing method in the rendering stage, the spatial fit, structural usability, and visual consistency of the watermark in the digital artwork are effectively improved. This method can more stably generate natural, recognizable, and visually high-quality visible watermarks for art images with complex compositions, better meeting the practical application needs of copyright identification for digital artworks. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the conventional technology, the drawings used in the description of the embodiments or the conventional technology will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a flowchart illustrating a perspective-constrained watermark adaptive placement and fusion method in one embodiment. Figure 2 This is a flowchart illustrating the completion of a perspective-constrained adaptive placement and fusion method for watermarks in one embodiment. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.

[0023] It should be noted that, in this document, the reference to "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The presentation of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will understand that the embodiments described herein can be combined with other embodiments. The term "and / or" as used herein refers to any combination of one or more of the associated listed items, and all possible combinations, including such combinations.

[0024] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0025] In one embodiment, such as Figure 1 , Figure 2 As shown, a watermark adaptive placement and fusion method based on perspective constraints is provided, which may include the following processing steps 1 to 5: Step 1: Obtain the digital artwork image and watermark text content.

[0026] Specifically, this method takes digital artwork images and watermarked text content as input.

[0027] Step 2: Segment the digital artwork image, construct a perspective geometric carrier based on the segmented region mask, generate a set of region geometric candidates, and sort each region geometric candidate.

[0028] Specifically, step 2 is used to generate candidate locations for the watermark. For digital art images, multiple candidate regions are first extracted through semantic segmentation or unsupervised segmentation, and corresponding binary masks are generated. Then, based on the contour shape, saliency, and spatial structure of the region masks, the candidate regions are geometrically represented and filtered, and approximately rectangular, circular, and elliptical regions are uniformly represented as candidate geometric carriers that can be projected. When there are many candidates, a coarse scoring mechanism based on region features is introduced to sort the candidate regions in order to organize the subsequent processing flow.

[0029] To address the shortcomings of existing watermark placement methods, such as a lack of constraints on local perspective structure and difficulty in naturally integrating with the spatial structure of artworks, this invention introduces a perspective constraint modeling mechanism during watermark placement. Before watermark generation and overlay, a perspective relationship between the watermark and local areas is established based on the geometric structure of the candidate regions. This ensures that the watermark, when overlaid on an inclined plane or obliquely viewed composition area, changes consistently with the spatial structure of the region. Through this method, the watermark no longer appears as a simple two-dimensional planar overlay but maintains harmony with the local spatial structure of the digital artwork, significantly improving its natural fit in complex compositions and reducing the appearance of abrupt or discordant watermarks.

[0030] Step 3: Based on the watermark text content, generate watermarks for each region geometric candidate on the standard plane, then perform perspective mapping to the image domain, and then evaluate and filter the watermarks based on geometric readability and information retention rate. Extract feature vectors for preference selection from the filtered region geometric candidates.

[0031] Specifically, addressing the problem that existing automated watermarking methods lack an effective mechanism for determining watermark recognizability under complex placement conditions, easily generating unreadable watermark results, this invention introduces a layered recognizability determination mechanism in the watermark placement evaluation stage. After perspective transformation, this mechanism first evaluates the recognizability of the watermark's geometric shape, identifying and eliminating placement schemes that have suffered excessive compression or stretching due to perspective distortion, rendering them geometrically devoid of normal text form. Subsequently, while ensuring geometric recognizability, it further evaluates the visible structure of the watermark under regional constraints. Only when the watermark maintains sufficient structural integrity within the candidate region is it allowed to proceed to the subsequent placement selection and rendering stages. Through this layered determination mechanism, this invention can simultaneously avoid unrecognizable watermark results caused by perspective distortion and region clipping at the algorithm level, thereby significantly reducing the probability of unusable results during automated watermark generation and improving the stability and reliability of the overall watermark placement and generation process.

[0032] Based on each region geometric candidate obtained in step 2, a clear watermark image is first generated on a standard plane (such as a rectangular front view) according to the preset watermark text content. Then, using the perspective homography transformation or cylindrical / spherical projection parameters corresponding to the candidate, the watermark is inversely mapped back to the original image domain so that it fits the geometric carrier surface of the region. Next, two evaluations are performed on the mapped watermark: geometric legibility and information retention rate, thereby filtering out region geometric candidates that are below the threshold. Finally, feature vectors for subsequent preference selection are extracted from the filtered region geometric candidates, thereby establishing comparable preference attributes for each region geometric candidate.

[0033] Feature vectors used for subsequent preference selection include, but are not limited to: visual saliency, texture complexity, color complexity, spatial scale, and surface regularity. Visual saliency includes: mean saliency, saliency fluctuation, and high saliency quantile; texture complexity includes: mean gradient magnitude, gradient variability, and Canny edge density; color complexity includes: Lab(a,b) chromaticity variation and mean saturation; spatial scale includes: region mask percentage of the whole image and plane fill degree; and surface regularity includes: solidity, compactness, and aspect ratio.

[0034] Step 4: Based on the feature vector and the corresponding region geometric candidates, a human preference alignment placement selection strategy based on a linear sorting model is adopted to determine the final placement position of the watermark.

[0035] Specifically, even after the candidate location evaluation and filtering in step 3, multiple geometrically feasible and identifiable region candidates may still exist. Since the final effect of the visible watermark has significant subjectivity and contextual dependence, a single deterministic rule is insufficient to uniquely determine the optimal placement position. Therefore, a human preference-based alignment placement selection strategy based on a linear ranking model is introduced.

[0036] Step 5: Determine the final watermark color based on the overall color characteristics of the digital artwork image and the background color of the local area where the watermark will be placed; fill the visible area of ​​the watermark with the final watermark color and blend it with the digital artwork image to output a digital artwork image with the watermark.

[0037] Specifically, addressing the limitations of existing watermark rendering methods that rely primarily on direct overlay and offer limited visual fusion effects, this invention employs a fusion rendering strategy to process the watermark during the rendering stage. On one hand, based on the overall color characteristics of the digital artwork and the background features of the local area where the watermark is located, the appearance of the watermark is adaptively adjusted to maintain necessary readability while remaining as consistent as possible with the overall style of the artwork. On the other hand, by embedding the watermark into the original image through fusion, a smooth transition is achieved between the watermark's boundary area and the background, effectively reducing the hard edges or halos commonly seen in traditional overlay methods. Through these improvements, the watermark appears more visually natural, contributing to maintaining the overall visual quality of the digital artwork.

[0038] The aforementioned perspective-constrained adaptive watermark placement and fusion method takes digital artwork images and watermark text content as input. By introducing perspective constraints during the watermark placement stage, a recognizability determination mechanism during the placement evaluation stage, and a fusion processing method during the rendering stage, the method effectively improves the spatial fit, structural usability, and visual consistency of the watermark within the digital artwork. This method can more stably generate natural, recognizable, and visually high-quality visible watermarks for art images with complex compositions, better meeting the practical application needs of copyright identification for digital artworks.

[0039] In one embodiment, step 2 includes: segmenting the digital artwork image to obtain a label map; wherein non-zero labels correspond to different segmented regions; determining a mask for each segmented region based on the label map; constructing a convex quadrilateral for perspective mapping for each segmented region mask; obtaining a set of region geometric candidates based on each segmented region mask and the corresponding convex quadrilateral for perspective mapping; calculating a coarse score for each region geometric candidate, and sorting the region geometric candidates based on the coarse score; wherein the coarse score expression is:

[0040] in, For the first k Coarse scoring of geometric candidates for each region. , , There are three proportionality coefficients. For shape regularity, For regional saliency, This represents the normalized area of ​​the region.

[0041] Specifically, the process of constructing the candidate set based on the segmentation and perspective geometry assumptions includes: (1) Region proposal based on image segmentation Input digital artwork images Segmentation is performed to obtain the label image. ,in, L For label images, For a set of integers, H , W These represent the height and width of the image, respectively.

[0042] Non-zero labels correspond to different segmentation regions. The first... k The region mask is defined as follows:

[0043] in, For the first k A region mask, For the firstk The pixel coordinates of each region in the image. For the label image in pixels The label value at that location.

[0044] To provide a weak prior (not as a hard exclusion), a significance map can be computed. ,in, S This is a saliency plot.

[0045] The saliency map is used to describe the distribution of visually salient regions and is subsequently used only for the organization and retrieval ranking of candidate locations.

[0046] (2) Perspective geometric carrier: the largest inscribed convex quadrilateral in the region To establish perspective constraints within a region, a mask is applied to each region. Construct a convex quadrilateral for perspective mapping:

[0047] in, A convex quadrilateral used for perspective mapping. , , , These are the 1st, 2nd, 3rd, and 4th vertices of the convex quadrilateral used for perspective mapping.

[0048] The convex quadrilateral used for perspective mapping is constructed by first calculating the region mask. The convex hull is then fitted, and a convex quadrilateral with the largest area is inscribed inside the convex hull. To avoid the risk of clipping caused by edge fitting, the quadrilateral is moderately shrunk towards the centroid, finally obtaining a set of candidate region geometries; k The candidate regions for geometry are:

[0049] in, For the first k Regional geometric candidates.

[0050] At the same time, a geometric validity check is performed to eliminate degenerate quadrilaterals, such as those with too short a side or insufficient effective thickness, to ensure that subsequent perspective mapping can be carried out stably.

[0051] (3) Coarse sorting of candidates When the segmentation generates a large number of geometrical candidates for a region, a coarse score is calculated to organize the candidate processing order. For the geometrical candidates of the region... Calculate three types of indicators: 1) Shape regularity Used to measure the tightness and fillability of a region; 2) Regional saliency That is, the mean significance within the region; regional significance. for: ; in, For regional significance; For saliency maps at pixels The saliency value at a given location represents the visual saliency of that pixel, and its value ranges from [0,1].

[0052] 3) Area And normalize it to get for:

[0053] in, For the first k Area normalized score of each region For the area, , Let represent the maximum and minimum areas of all candidate regions in the image, respectively. To prevent extremely small constants with a denominator of zero, .

[0054] The comprehensive score of the regional geometric candidates is calculated using the above coarse scoring expression, and the regional geometric candidates are ranked according to this comprehensive score to enter the evaluation stage.

[0055] In one embodiment, constructing a convex quadrilateral for perspective mapping for each segmented region mask includes: first, finding the convex hull of each segmented region mask; then, fitting a convex quadrilateral with the largest area inside the convex hull; moderately shrinking the convex quadrilateral towards the centroid; then performing a set validity check to remove degenerate quadrilaterals, thus obtaining the convex quadrilateral for perspective mapping.

[0056] In one embodiment, step 3 includes: using the average length of opposite sides of the convex quadrilateral used for perspective mapping as an estimate of the width and height of the standard planar canvas; introducing a margin factor and a minimum size constraint, and determining the width and height of the standard planar canvas based on the margin factor, minimum size constraint, and the estimated width and height of the standard planar canvas; rendering the watermark text content on the standard plane to obtain an RGBA watermark patch; performing perspective mapping on the RGBA watermark patch on the entire image canvas to obtain the visible alpha before cropping; applying a segmented region mask as a mask constraint to the visible alpha before cropping to obtain the visible alpha after cropping; performing geometric readability filtering on the visible alpha before cropping that meets the preset geometric readability filtering conditions and the corresponding visible alpha after cropping that meets the information retention rate filtering conditions; using the visible alpha after cropping that meets the visibility information retention rate filtering conditions as the selected region geometric candidates; and performing effective text height estimation and extracting feature vectors for preference selection for each selected region geometric candidate.

[0057] In one embodiment, the width and height of a standard planar canvas are expressed as follows:

[0058] in, , These are the width and height of a standard flat canvas, respectively. , These are the estimated width and height of a standard flat canvas, respectively. Margin factor , These are the minimum size constraints for the width and height of a standard planar canvas, respectively.

[0059] In one embodiment, the specific process of geometric readability filtering includes: estimating a minimum bounding quadrilateral that tightly surrounds the watermark structure from the foreground pixels of the alpha before cropping, and calculating the scale of the minimum bounding quadrilateral in two principal directions. The ratio of the minimum scale to the maximum scale in the two principal directions is used as the geometric readability of the watermark. When the geometric readability of the watermark is not less than a preset geometric readability threshold, the identifiability filtering based on information retention rate is performed. When the geometric readability of the watermark is less than the preset geometric readability threshold, the corresponding region set candidate is determined to be geometrically unreadable and is filtered out.

[0060] The specific process of information retention rate identifiability filtering includes: calculating the degree of alpha information retention of the watermark before and after cropping; the expression for the degree of alpha information retention of the watermark before and after cropping is:

[0061] in, To determine the degree to which the alpha information of the watermark is preserved before and after cropping. The visible alpha value before clipping. The visible alpha value after cropping. For the first k The pixel coordinates of a region in the image.

[0062] When the degree of alpha information retention of the watermark before and after cropping is not less than a preset information retention rate threshold. If the cropped visible alpha is used as the candidate region geometry for filtering, then if the degree of alpha information retention of the watermark before and after cropping is less than the preset information retention rate threshold, then it is determined that the corresponding candidate region geometry cannot maintain sufficient structural information under the region constraint and is directly eliminated.

[0063] Specifically, for each region's geometric candidate In this stage, a watermark is first generated on a standard plane, then mapped onto the image domain, and then the watermark is evaluated and filtered for geometric readability and information retention rate. Finally, features are extracted from the selected candidates.

[0064] The specific processes of perspective simulation, mask constraints, and recognizability determination include: (1) Standard planar watermark generation The convex quadrilateral used for perspective mapping The four points are arranged in a consistent order. The estimated standard planar canvas dimensions (width and height) are the average lengths of opposite sides.

[0065]

[0066] To avoid overfilling and boundary risks, a margin factor is introduced. With minimum size constraints, the width and height of the standard planar canvas are calculated using the expressions for the width and height of the standard planar canvas described above.

[0067] Render watermark text content on a standard plane. T Obtain the RGBA watermark patch .

[0068] The alpha channel encodes the structural layout of the watermark text (the transparency structure of text strokes / outlines). The font size adopts a width-dominated deterministic strategy: the upper limit of the font size is mainly determined based on the available width and character length, with height as a secondary constraint, to avoid unstable fluctuations in font size in different aspect ratio regions.

[0069] (2) Perspective mapping and region mask clipping Based on the four corners of a standard plane and the convex quadrilateral used for perspective mapping A homography mapping is established at four points. Let the perspective transformation operator be denoted as . The mapped watermark layer is then:

[0070] in, This is the mapped watermark layer.

[0071] The mapped watermark layer is defined across the entire image canvas. Let the visible alpha after perspective mapping (before cropping) be:

[0072] in, The visible alpha value before clipping.

[0073] area mask Applying a mask constraint, the visible alpha value after clipping is:

[0074] in, The visible alpha value after cropping. This is a point-by-point multiplication.

[0075] This step is used to simulate the actual constraint that watermarks are only allowed to appear inside the candidate region.

[0076] (3) Geometric readability filtering After perspective transformation, watermarks may suffer severe geometric compression or stretching due to perspective distortion, rendering the text structure geometrically unreadable. To explicitly characterize this problem, the geometric legibility of the watermark is evaluated before cropping. Specifically, from... Estimate a minimum bounding quadrilateral that tightly encloses the watermark structure from the foreground pixels, and calculate the scale of the bounding structure in the two principal directions. and The geometric legibility of a watermark is characterized by the ratio of its minimum to its maximum scale:

[0077] in, Geometric readability of the watermark.

[0078] when ( When the preset threshold for geometric readability is set, it is determined that the watermark has undergone excessive anisotropic distortion in geometry. Under the current perspective conditions, the watermark has been compressed into an approximately one-dimensional structure or an overly fine structure, making it difficult to maintain a normal text form. Such candidates are directly judged as geometrically unreadable and filtered out.

[0079] (4) Identifiability filtering based on information retention rate Even if the geometric shape is legible, excessive region cropping can still compromise the structural integrity of the watermark. Therefore, the expression for the retention of alpha information before and after cropping is further used to calculate the retention rate (visibility ratio) of the watermark's structural information before and after cropping.

[0080] when ( When a preset threshold for information retention rate is set, the geometric candidate region is determined. If sufficient structural information cannot be maintained under regional constraints, the candidate is directly eliminated; only when the candidate simultaneously meets the geometric readability filtering condition and the visibility information retention rate filtering condition will it proceed to the next stage.

[0081] (5) Robust estimation of effective text scale For candidates that pass the filtering, based on Estimate the effective text height scale. To avoid bounding box instability caused by a few outliers, a percentile robust estimation is introduced. Let the set of ordinates of visible pixels be:

[0082] in, It is the set of ordinates of visible pixels.

[0083] Effective height is defined as:

[0084] in, For effective height, , The set of ordinates of visible pixels The 5% and 95% quantiles.

[0085] (6) Candidate feature extraction For each candidate region that passes the geometry test, extract the feature vector for preference selection. .

[0086] In one embodiment, step 4 includes: constructing multiple feasible candidate rendering results for the same image; experts making preference selections on candidate pairs to form multiple preference samples; standardizing the feature vectors of the selected regional geometric candidates used for preference selection and then using a linear square function to model the selected regional geometric candidates to obtain a linear ranking model; during model training, for each preference sample, minimizing the pairwise logistic loss function based on the difference in candidate scores to ensure that the ranking results output by the model are consistent with human preferences, thus obtaining a trained linear ranking model; using the trained linear ranking model to calculate the ranking score of each selected regional geometric candidate, and selecting the selected regional geometric candidate with the highest ranking score as the final watermark placement position.

[0087] Specifically, even after the candidate position evaluation and filtering in step 3, multiple geometrically feasible and identifiable candidates may still exist. Since the final effect of the visible watermark has significant subjectivity and contextual dependence, a single deterministic rule is insufficient to uniquely determine the optimal placement position. Therefore, a human preference-based alignment placement selection strategy based on a linear ranking model is introduced.

[0088] The specific steps involved in adaptive placement selection based on preference alignment decisions using a linear ranking model include: (1) Construction of Paired Preference Supervision Data Images of the same digital artwork I Construct multiple feasible candidate rendering results Experts on the candidate pairs Making preference choices results in multiple preference samples; the preference samples are:

[0089] in, For the first i The candidate rendering result and the first j Pair preference labels between candidate rendering results are used to represent the relative superiority or inferiority between them. Indicates the first i The rendering result of the candidate is better than that of the first. j One candidate rendering result Indicates the first j The rendering result of the candidate is better than that of the first. i A number of candidate rendering results. Samples that cannot be determined can be skipped and not used for training.

[0090] (2) Construction and training of linear sorting model For region geometric candidates eigenvectors After standardization, a linear scoring function is used to model the candidates:

[0091] in, For the first k The overall score of each candidate region indicates its higher priority in the ranking process. These are learnable weight vectors.

[0092] During model training, for each pair of preference samples, the pairwise logistic loss function based on the difference in candidate scores is minimized to ensure that the ranking results output by the model are consistent with human preferences.

[0093] in, For loss function, D For the labeled pairwise preference supervision data set, control Regularization strength.

[0094] During inference, the candidate set evaluated in step 3 is calculated. The data is then sorted in descending order, and the region with the highest score is selected as the final watermark placement location and output. If the sorting model is unavailable, a fallback to a heuristic sorting strategy based on coarse scoring and visibility metrics can be implemented to ensure method availability.

[0095] In one embodiment, step 5 includes: determining the final watermark color based on the set of background pixels at the final watermark placement location using a three-stage color selection strategy of theoretical constraints + data priors + global-local optimization; combining the final watermark color and the effective watermark area to obtain a color watermark layer using gradient domain Poisson fusion rendering; and applying gradient domain Poisson fusion to the color watermark layer and the digital artwork image to obtain a digital artwork image containing the watermark.

[0096] Specifically, the final placement of the watermark Next, the watermark appearance is rendered, including color selection and blending output. Specific steps include: (1) Three-stage adaptive color selection To simultaneously ensure stylistic consistency and readability of artworks, this method employs a three-stage color selection strategy: "theoretical constraints + data priors + global / local optimization".

[0097] 1) Phase 1: Theory-driven hue direction constraints In the effective area of ​​the watermark Extract the main background color b from the set of background pixels (using the mean of the main clusters in the CIE Lab color space). Let its HSV hue be... The default color direction set is used:

[0098] in, Let it be the set of color directions.

[0099] 2) Phase 2: Selection and clustering modeling of human palette priors A color pool is formed by introducing a human color palette dataset (the Adobe Kuler color palette database containing approximately 45K human color themes):

[0100] in, For color pool, These are the 1st, 2nd, 3rd, ... colors in the color pool. M Each of the following color vectors... This represents the representation of a color in a three-channel color space.

[0101] To reduce redundancy and establish aesthetic priors, the color pool is... Clustering in the Lab space yields representative centers. Then, hue and contrast filtering is performed to retain the candidate set that is consistent with the theoretical direction and has the minimum perceived contrast:

[0102]

[0103] in For hue tolerance, This is the minimum contrast threshold. To control computational load, [the threshold is set to...]. Random downsampling candidate set .

[0104] 3) Phase 3: Global-Local, Aesthetic-Functional Joint Optimization For each Calculate the joint score:

[0105] in, For joint scoring, , These are the weighting coefficients for the aesthetic consistency term and the local readability term, respectively. , Candidate colors Aesthetic consistency score, candidate colors Relative to background color b Local readability score.

[0106] (a) Global style consistency: Extracted from the entire image G Main color The style consistency score is defined as follows:

[0107] in, Candidate colors Style consistency score between the current image and the global dominant color distribution. These are the first to the last extracted from the entire image. G One primary color vector, This is the scale parameter in the global style consistency section, used to control the sensitivity of distance decay between candidate colors and the primary color; (b) A priori consistency of human aesthetics: utilizing cluster centers calculate Specifically:

[0108] in, Candidate colors Aesthetic consistency score between the color palette and prior human color palette. For the k-th cluster center, The scale parameter in the aesthetic prior consistency term is used to control the sensitivity of distance decay between candidate colors and cluster centers; (c) Normalize and then weight-fuse the two:

[0109] in Indicates in Top The min-max normalization was performed. Indicates in Top The min-max normalization was performed. As weight; (d) Local readability items:

[0110] in, The color difference between candidate color c and background color b under the CIEDE2000 color difference formula is used to characterize the visual distinguishability between the two.

[0111] The final watermark color selection is:

[0112] in, This is the final watermark color.

[0113] (2) Gradient Domain Poisson Blending Rendering Color Fill into the visible area of ​​the watermark Obtain the color watermark layer To avoid hard edges and halos caused by simple alpha superposition, this method uses gradient domain Poisson fusion to solve the output image. :

[0114] in, To find the gradient field of the output image, The target gradient field is provided by the color watermark layer.

[0115] This constraint ensures that the gradient within the watermarked region follows the watermark layer, while the boundary conditions inherit from the original image, thus achieving a natural transition. If the Poisson solution is unstable in certain situations, a standard alpha blend can be used as a fallback to guarantee output stability.

[0116] In a verification embodiment, for performance verification, this embodiment conducted systematic experimental evaluations on two publicly available art image datasets, WikiArt and ArtBench. The experiments selected representative text editing and generation methods for comparison, including TextDiffuser2, AnyText, DiffSTE, and UDiffText, and used various objective metrics to quantitatively analyze the results. Specifically, PSNR and SSIM were used to measure the structural and pixel consistency of the image before and after watermark embedding; Sal_MAE and Sal_KL were used to evaluate the degree to which the watermark perturbs the image's saliency distribution; and ΔScore was used to comprehensively reflect the overall visual quality change of the image. Through these multi-dimensional metrics, different methods can be comprehensively compared from multiple perspectives, including image fidelity, saliency consistency, and perceptual quality.

[0117] The experimental results shown in Table 1 demonstrate that our proposed method significantly outperforms existing methods on both datasets. On the WikiArt dataset, our method achieves significantly higher PSNR (39.47) and SSIM (0.9885) scores than the comparative method, indicating that it can preserve the original image structure and details to the greatest extent after watermark embedding. Simultaneously, our method shows significantly lower saliency scores (Sal_MAE=0.0119, Sal_KL=0.0919) than the comparative method, indicating that the watermark has less interference with visual attention and better visual naturalness. A consistent trend is also observed on the ArtBench dataset, further validating the stability and generalization ability of our proposed method. Furthermore, our method exhibits the smallest performance decrease (close to 0) in the ΔScore, while other methods generally show a large negative decrease, indicating that our method has a significant advantage in maintaining the overall aesthetics of artworks. In summary, our proposed method demonstrates significant improvements in structural fidelity, saliency consistency, and visual aesthetics preservation after watermark embedding, fully demonstrating its superior performance in visible watermarking applications for digital art images.

[0118] Table 1 Experimental Results

[0119] It should be understood that, although the above Figure 1 The steps are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise explicitly stated in this document, there is no strict order in which these steps are executed; they can be performed in other orders. Furthermore, the above... Figure 1 At least some of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.

[0120] In one embodiment, a perspective-constrained watermark adaptive placement and fusion device is also provided, the device comprising: The input data acquisition module is used to acquire images and watermark text content of digital artworks.

[0121] The location generation module is used to segment digital art images, construct perspective geometric carriers based on the segmented region masks, generate a set of region geometric candidates, and sort each region geometric candidate.

[0122] The candidate location evaluation module is used to generate watermarks on a standard plane for each region geometric candidate based on the watermark text content, then perspective map them to the image domain, and then evaluate and filter the watermarks based on geometric readability and information retention rate, and extract feature vectors for preference selection from the filtered region geometric candidates.

[0123] The adaptive placement selection module is used to determine the final placement position of the watermark by adopting a human preference alignment selection strategy based on a linear ranking model, according to the feature vector and the corresponding region geometric candidates.

[0124] The watermark rendering and fusion module is used to determine the final watermark color based on the overall color characteristics of the digital artwork image and the background color of the local area where the watermark will be placed; after filling the visible area of ​​the watermark with the final watermark color, it is fused with the digital artwork image to output a digital artwork image with the watermark.

[0125] In one embodiment, the location generation module is further used to segment the digital artwork image to obtain a label map; wherein non-zero labels correspond to different segmented regions; based on the label map, a mask for each segmented region is determined; a convex quadrilateral for perspective mapping is constructed for each segmented region mask; based on each segmented region mask and the corresponding convex quadrilateral for perspective mapping, a set of region geometric candidates is obtained; a coarse score for each region geometric candidate is calculated, and the region geometric candidates are sorted according to the coarse score; wherein the coarse score is:

[0126] in, For the first k Coarse scoring of geometric candidates for each region. , , There are three proportionality coefficients. For shape regularity, For regional saliency, This represents the normalized area of ​​the region.

[0127] In one embodiment, constructing a convex quadrilateral for perspective mapping for each segmented region mask includes: first, finding the convex hull of each segmented region mask; then, fitting a convex quadrilateral with the largest area inside the convex hull; moderately shrinking the convex quadrilateral towards the centroid; then performing a set validity check to remove degenerate quadrilaterals, thus obtaining the convex quadrilateral for perspective mapping.

[0128] In one embodiment, the candidate position evaluation module is further configured to use the average length of opposite sides of the convex quadrilateral used for perspective mapping as an estimate of the width and height of the standard planar canvas; introduce a margin factor and a minimum size constraint, and determine the width and height of the standard planar canvas based on the margin factor, minimum size constraint, and the estimated width and height of the standard planar canvas; render the watermark text content on the standard plane to obtain an RGBA watermark patch; perform perspective mapping on the RGBA watermark patch on the entire image canvas to obtain the visible alpha before cropping; apply a segmented region mask as a mask constraint to the visible alpha before cropping to obtain the visible alpha after cropping; perform geometric readability filtering on the visible alpha before cropping that meets the preset geometric readability filtering conditions and perform information retention rate recognition filtering on the visible alpha before cropping and the corresponding visible alpha after cropping; use the visible alpha after cropping that meets the visibility information retention rate filtering conditions as the selected region geometric candidates; and perform effective text height estimation and extract feature vectors for preference selection for each selected region geometric candidate.

[0129] In one embodiment, the width and height of the standard planar canvas in the candidate location evaluation module are:

[0130] in, , These are the width and height of a standard flat canvas, respectively. , These are the estimated width and height of a standard flat canvas, respectively. Margin factor , These are the minimum size constraints for the width and height of a standard planar canvas, respectively.

[0131] In one embodiment, the specific process of geometric readability filtering in the candidate location evaluation module includes: estimating a minimum bounding quadrilateral that tightly surrounds the watermark structure from the foreground pixels of the alpha before cropping, and calculating the scale of the minimum bounding quadrilateral in the two principal directions. The ratio of the minimum scale to the maximum scale in the two principal directions is used as the geometric readability of the watermark. When the geometric readability of the watermark is not less than a preset geometric readability threshold, the identifiability filtering based on information retention rate is performed. When the geometric readability of the watermark is less than the preset geometric readability threshold, the corresponding region set candidate is determined to be geometrically unreadable and is filtered out.

[0132] The specific process of information retention rate identifiability filtering includes: calculating the degree of alpha information retention of the watermark before and after cropping.

[0133] in, To determine the degree to which the alpha information of the watermark is preserved before and after cropping. A preset threshold is set for the preset information retention rate. The visible alpha value before clipping. The visible alpha value after cropping. For the first k The pixel coordinates of a region in the image.

[0134] When the degree of alpha information retention of the watermark before and after cropping is not less than the preset information retention rate threshold, the visible alpha after cropping is used as the candidate region geometry for screening; when the degree of alpha information retention of the watermark before and after cropping is less than the preset information retention rate threshold, it is determined that the corresponding candidate region geometry cannot maintain sufficient structural information under the region constraints and is directly eliminated.

[0135] In one embodiment, the adaptive placement selection module is further used to construct multiple feasible candidate rendering results for the same image, and experts make preference selections on candidate pairs to form multiple preference samples; after standardizing the feature vectors of the selected regional geometric candidates used for preference selection, a linear square function is used to model the selected regional geometric candidates to obtain a linear ranking model; during the model training process, for each preference sample, the pairwise logistic loss function based on the difference in candidate scores is minimized to ensure that the ranking result output by the model is consistent with the human preference, thus obtaining a trained linear ranking model; the trained linear ranking model is used to calculate the ranking score of each selected regional geometric candidate, and the selected regional geometric candidate with the highest ranking score is selected as the final watermark placement position.

[0136] In one embodiment, the watermark rendering fusion module is further configured to determine the final watermark color based on the background pixel set at the final watermark placement location using a three-stage color selection strategy of theoretical constraints, data priors, and global-local optimization; to obtain a color watermark layer by performing gradient domain Poisson fusion rendering on the final watermark color and the effective watermark area; and to obtain a watermarked digital artwork image by performing gradient domain Poisson fusion on the color watermark layer and the digital artwork image.

[0137] It is understood that for a detailed explanation of the perspective-constrained adaptive watermark placement and fusion device, please refer to the corresponding explanations of the embodiments of the perspective-constrained adaptive watermark placement and fusion method above, which will not be repeated here. Each module in the above-described perspective-constrained adaptive watermark placement and fusion device can be implemented entirely or partially through software, hardware, or a combination thereof. Each module can be embedded in hardware or independently of a device with data processing capabilities, or stored in software in the memory of the aforementioned device, so that the processor can call and execute the operations corresponding to each module. The aforementioned device can be, but is not limited to, various types of data processing computer devices already existing in the art.

[0138] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0139] It is understood that, in addition to the memory and processor mentioned above, the computer equipment described above also includes other hardware and software components not listed in this specification. The specific components can be determined according to the model of the image processing computer in different application scenarios, and will not be listed and described in detail in this specification.

[0140] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0141] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of protection of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and all such modifications and improvements fall within the scope of protection of this application.

Claims

1. A watermark adaptive placement and fusion method based on perspective constraints, characterized in that, Including the following steps: Step 1: Obtain the digital artwork image and watermark text content; Step 2: Segment the digital artwork image, construct a perspective geometric carrier based on the segmented region mask, generate a set of region geometric candidates, and sort each region geometric candidate; Step 3: Based on the watermark text content, generate a watermark for each region geometric candidate on the standard plane, then map it to the image domain through perspective, and then evaluate and filter the watermark for geometric readability and information retention rate. Extract feature vectors for preference selection from the filtered region geometric candidates. Step 4: Based on the feature vector and the corresponding region geometric candidates, a human preference alignment and placement selection strategy based on a linear sorting model is adopted to determine the final placement position of the watermark; Step 5: Determine the final watermark color based on the overall color characteristics of the digital artwork image and the background color of the local area where the watermark will be placed; fill the visible area of ​​the watermark with the final watermark color and then blend it with the digital artwork image to output a digital artwork image with watermark.

2. The watermark adaptive placement and fusion method based on perspective constraints according to claim 1, characterized in that, Step 2 includes: The digital artwork image is segmented to obtain a label map; where non-zero labels correspond to different segmentation regions. Based on the label map, determine the mask for each segmented region; For each segmented region mask, construct a convex quadrilateral for perspective mapping; Based on the mask of each segmented region and the corresponding convex quadrilateral used for perspective mapping, a set of region geometry candidates is obtained; Calculate a coarse score for each region's geometric candidate, and sort the region's geometric candidates according to the coarse score; wherein the coarse score is: in, For the first k Coarse scoring of geometric candidates for each region. , , There are three proportionality coefficients. For shape regularity, For regional saliency, This represents the normalized area of ​​the region.

3. The watermark adaptive placement and fusion method based on perspective constraints according to claim 2, characterized in that, For each segmented region mask, construct a convex quadrilateral for perspective mapping, including: First, calculate the convex hull of the mask for each segmented region. Then, fit the maximum area inscribed convex quadrilateral inside the convex hull. Slim the convex quadrilateral appropriately towards the centroid. Then, perform a set validity check to remove degenerate quadrilaterals and obtain the convex quadrilateral used for perspective mapping.

4. The watermark adaptive placement and fusion method based on perspective constraints according to claim 1, characterized in that, Step 3 includes: The mean length of opposite sides of the convex quadrilateral used for perspective mapping is used as an estimate of the width and height of the standard planar canvas. Introducing a margin factor and a minimum size constraint, the width and height of the standard planar canvas are determined based on the margin factor, the minimum size constraint, and estimated values ​​of the width and height of the standard planar canvas. Render the watermark text content on a standard plane to obtain an RGBA watermark patch; Perspective mapping is performed on the RGBA watermark patch on the entire image canvas to obtain the visible alpha before cropping; a segmentation region mask is applied as a mask constraint on the visible alpha before cropping to obtain the visible alpha after cropping. Geometric readability filtering is performed on the visible alpha before cropping. For the visible alpha before cropping and the corresponding visible alpha after cropping that meet the preset geometric readability filtering conditions, the information retention rate is used for the identifiability filtering. The visible alpha after cropping that meets the visibility information retention rate filtering conditions is used as the selected region geometric candidate. For each selected region geometric candidate, effective text height estimation is performed and feature vectors for preference selection are extracted.

5. The watermark adaptive placement and fusion method based on perspective constraints according to claim 4, characterized in that, The width and height of the standard planar canvas are: in, , These are the width and height of a standard flat canvas, respectively. , These are the estimated width and height of a standard flat canvas, respectively. Margin factor , These are the minimum size constraints for the width and height of a standard planar canvas, respectively.

6. The watermark adaptive placement and fusion method based on perspective constraints according to claim 4, characterized in that, The specific process of geometric readability filtering includes: estimating a minimum bounding quadrilateral that tightly surrounds the watermark structure from the foreground pixels of the alpha before cropping, and calculating the scale of the minimum bounding quadrilateral in the two principal directions. The ratio of the minimum scale to the maximum scale in the two principal directions is used as the geometric readability of the watermark. When the geometric readability of the watermark is not less than the preset geometric readability threshold, the recognizable filtering based on information retention rate is performed. When the geometric readability of the watermark is less than the preset geometric readability threshold, the corresponding region set candidate is determined to be geometrically unreadable and is filtered out. The specific process of information retention rate identifiability filtering includes: calculating the degree of alpha information retention of the watermark before and after cropping. in, To determine the degree to which the alpha information of the watermark is preserved before and after cropping. The visible alpha value before clipping. The visible alpha value after cropping. For the first k The pixel coordinates of each region in the image; When the degree of alpha information retention of the watermark before and after cropping is not less than the preset information retention rate threshold, the visible alpha after cropping will be used as the candidate region geometry for filtering. When the degree of alpha information retention of the watermark before and after cropping is less than the preset information retention rate threshold, it is determined that the corresponding geometric candidate cannot maintain sufficient structural information under the region constraint and is directly eliminated.

7. The watermark adaptive placement and fusion method based on perspective constraints according to claim 1, characterized in that, Step 4 includes: For the same image, multiple feasible candidate rendering results are constructed, and experts make preference selections on candidate pairs to form multiple preference samples. After standardizing the feature vectors of the selected regional geometric candidates used for preference selection, a linear square function is used to model the selected regional geometric candidates to obtain a linear ranking model; During model training, for each preference sample, the pairwise logistic loss function based on the difference in candidate scores is minimized to ensure that the ranking result output by the model is consistent with human preferences, thus obtaining a trained linear ranking model. A trained linear ranking model is used to calculate the ranking score of each selected region geometric candidate, and the region geometric candidate with the highest ranking score is selected as the final watermark placement position.

8. The watermark adaptive placement and fusion method based on perspective constraints according to claim 1, characterized in that, Step 5 includes: Based on the set of background pixels at the final watermark placement location, a three-stage color selection strategy of theoretical constraints, data priors, and global-local optimization is adopted to determine the final watermark color. The final watermark color and effective watermark area are used to obtain a color watermark layer by gradient domain Poisson fusion rendering; Gradient domain Poisson fusion is applied to the color watermark layer and the digital artwork image to obtain a watermarked digital artwork image.

9. A watermark adaptive placement and fusion device based on perspective constraints, characterized in that, include: The input data acquisition module is used to acquire images and watermark text content of digital artworks; The location generation module is used to segment the digital artwork image, construct a perspective geometric carrier based on the segmented region mask, generate a set of region geometric candidates, and sort each region geometric candidate. The candidate location evaluation module is used to generate a watermark on a standard plane for each region geometric candidate based on the watermark text content, then to map it onto the image domain, and then to evaluate and filter the watermark for geometric readability and information retention rate, and extract feature vectors for preference selection from the filtered region geometric candidates. An adaptive placement selection module is used to determine the final placement position of the watermark by adopting a human preference alignment placement selection strategy based on a linear sorting model, according to the feature vector and the corresponding region geometric candidate. The watermark rendering and fusion module is used to determine the final watermark color based on the overall color characteristics of the digital artwork image and the background color of the local area where the watermark is finally placed; after filling the visible area of ​​the watermark with the final watermark color, it is fused with the digital artwork image to output a digital artwork image with watermark.

10. A computer device, comprising a memory and a processor, characterized in that, The memory stores a computer program, and when the processor executes the computer program, it implements the steps of the perspective-constrained watermark adaptive placement and fusion method according to any one of claims 1 to 8.