1. Introduction
Remote sensing imaging is a vital strategic asset utilized in military operations, environmental conservation, land management, and other essential fields [
1,
2,
3]. In recent years, advancements in Internet information technology have significantly enhanced the utilization and transmission of remote sensing imagery, yet they have also exacerbated security concerns such as data theft, leakage, and unlawful publication [
4]. To completely eradicate security concerns associated with remote-sensing image data and to guarantee copyright protection throughout data distribution and utilization, there is an immediate necessity for reliable technical methods to safeguard the lawful and compliant use of remote-sensing image data [
5]. Digital watermarking technology, a conventional technique of copyright protection, provides robust technological support for safeguarding remote-sensing image data by creating a tight link between digitized data and copyright information [
6,
7].
Digital watermarking methods for remote sensing imagery are currently categorized into two types: spatial domain watermarking and transform domain watermarking [
8]. Spatial domain watermarking methods [
9,
10] integrate watermark information directly into pixel values, brightness levels, and other spatial features. These algorithms exhibit notable resilience to general panning, lossy compression, and various other assaults. Nonetheless, the technique is vulnerable to the geometric manipulation of the image and too reliant on the embedding carrier. An assault on the information carrier will immediately impact the methodology, constraining its efficacy due to its sensitivity to the geometric processing of the image and its excessive reliance on the embedding carrier. Assaults on the information carrier would directly affect the information itself and thus are incapable of managing scaling, interpolation, noise, and other assaults on the image data during transmission.
Algorithms based on the transform domain perform an invertible mathematical transformation of the carrier data before embedding it, after which the transform domain coefficients are replaced according to the embedding rules, and the data are inverted to obtain the carrier data containing the watermark [
11,
12]. Invertible transforms include orthogonal transforms like DWT [
13], DCT [
14], and DFT [
15]. Transform domain-based algorithms that embed watermarks in low-frequency regions have no effect on the entire original data, and modification operations on the original data have no effect on the low-frequency coefficients in the transform domain, which can significantly improve watermarks’ ability to resist attacks such as compression and noise while ensuring very high invisibility. Current research on transform-domain watermarking algorithms mostly addresses resistance to conventional attacks (such as noise and filtering) and minor geometric attacks, but is inadequate against strong geometric transform attacks.
Template watermarking algorithms are a significant category of watermarking techniques based on the transform domain. This category of methods uses standard watermarking patterns, allowing for the extraction of the watermark template from the compromised image to recover the watermark information post-attack [
16]. In comparison to conventional transform domain algorithms, the template watermarking algorithm enhances resistance to geometric transformation attacks, resulting in its broader application. The effectiveness of template watermarking methods is contingent upon the precision of watermark template detection and the efficacy of template matching. Chen Hui and colleagues [
17] propose a template-matching watermarking algorithm based on LS-SVM, which effectively withstands conventional geometric attacks such as noise, filtering, and cropping while enhancing detection accuracy; however, the algorithm may fail with a certain probability under extreme geometric attacks. Pang Xinyan and associates employ a ring-shaped watermarking template and implement a cyclic watermarking embedding method to bolster resistance against geometric attacks [
18]. Similarly, Qifei Zhou and his team utilize circular template watermarking and a multi-scale LCM method for watermark detection and extraction, further enhancing the accuracy and success rate of watermark template detection [
19]. When the carrier data undergoes an affine transformation, the watermark template changes from a typical circle to an ellipse, resulting in a dramatic decline in the success rate of template matching. This algorithm shows little resistance to affine transformations, which is the fundamental issue that limits its practical applicability.
In conclusion, the spatial domain watermarking technique is easy to build; however, the watermarking information is excessively reliant on the carrier and is unduly sensitive to image processing, failing to satisfy robustness requirements in actual applications. The transform domain-based watermarking technique enhances resistance to conventional attacks, including compression and noise, to some degree, and can withstand modest geometric attacks; nevertheless, it fails to resist geometric attacks of arbitrary magnitude. The transform domain-based template watermarking algorithm enhances the watermarking’s resistance to arbitrary geometric attacks; however, accurately identifying the watermark template and restoring the watermark information in the presence of affine transformations remains a significant challenge due to template deformation.
This work provides a watermarking approach for remote sensing images that uses semantic segmentation and elliptical fitting to resolve the aforementioned issues. We employ the feature learning capabilities of deep learning technology, implementing semantic segmentation to precisely and autonomously identify the coverage location of the ring template watermark. Additionally, we apply the least-squares method to perform ellipse fitting on the detected coordinate points, thereby utilizing mathematical relations to restore the deformed ring template watermark and extract the embedded watermark information. This paper is structured as follows: The initial section presents the proposed fundamental algorithm concept and requisite background knowledge; the subsequent section details the algorithm and its implementation; the third section elucidates the experimental results and their analysis; the fourth section examines the impact of the algorithm’s parameter configurations on key metrics; and the final section concludes the paper.
2. Materials and Methods
2.1. Basic Idea
The essence of the ring template watermarking algorithm presented in this paper is founded on the precision of watermark template detection and template matching. Irrespective of any deformation resulting from an attack on the carrier image, both the watermark detection algorithm and the template matching algorithm can execute template identification and restoration of the carrier image, thereby extracting information that is closely associated with the original watermark data. The fundamental concept for addressing this issue involves leveraging the feature learning capabilities of deep learning to isolate the watermark information within the image spectrogram from other data. This enables the watermark extraction algorithm to identify the coverage location of the watermark and provide the corresponding coordinates. Furthermore, the returned coordinate points consist of a series of arrays formed by scattered points, necessitating the application of ellipse-fitting algorithms to curve-fit these coordinates, thereby obtaining ellipses. The ellipse-fitting algorithm must be employed to curve-fit the returned coordinates, thereby acquiring the parameters of the ellipse, including the major and minor axes, rotation angle, and focal point. Subsequently, mathematical methods should be utilized to restore the deformation curve to ascertain the actual coordinate points required for detection.
This paper employs semantic segmentation technology to isolate watermark information from other data, thereby identifying the watermark coverage area. It utilizes the least-squares method to fit the detected coordinate scatter, enabling the restoration of the watermark template based on the fitting results. Ultimately, it extracts watermark information from the original image spectrogram using the restored coordinate points. The algorithm’s framework is illustrated in
Figure 1, and the primary algorithm module is principally separated into two components:
(1) Watermark design and embedding component. The watermarking algorithm, which combines template and message watermarking, converts the watermark information into a diminutive target within the DFT domain, embedding the watermark into the magnitude coefficients of the DFT domain at a predetermined radius to create a standard watermark circle.
(2) Watermark extraction component. Initially, the algorithm employs U-Net to semantically segment the spectrogram containing watermark data, isolating the watermark information bit from extraneous data and providing the coordinates of the watermark information bit. Subsequently, an ellipse is fitted to the watermark information bit utilizing the least-squares method to derive the general equation of the ellipse along with parameters such as the major and minor axes, the focal point, and the angle of rotation, thereby facilitating the reduction of the template watermark to ascertain the coordinates of the watermark information bit. The original image is denoised and binarized, and the watermark information is recovered based on the coordinates.
2.2. U-Net Semantic Segmentation
The U-Net technique is a convolutional neural network architecture designed for image segmentation [
20].The U-Net algorithm features a U-shaped network architecture, as illustrated in
Figure 2.
The U-Net architecture comprises two components: the encoder and the decoder [
21]. The encoder incrementally harvests image features and diminishes resolution via a sequence of convolutional and pooling layers, whereas the decoder progressively reinstates image resolution by up-sampling and convolutional layers, ultimately producing the segmentation results. The two components are linked by skip connections, allowing the decoder to leverage feature information from the encoder, thereby enhancing segmentation accuracy and detail preservation, as well as precisely identifying target points for detection. Additionally, U-Net demonstrates strong performance on small sample datasets, offering advantages of high efficiency and lightweight design. Consequently, this research employs U-Net for the binary segmentation of images.
2.3. Ellipse-Fitting Algorithm: Least-Squares Approach
Ellipse fitting is analogous to resolving a general elliptic equation. Equation (1) demonstrates that the five parameters can be determined from the coordinates of five points. In practice, we obtain more than five points with coordinates, resulting in a over-determined equation that lacks a unique solution. Consequently, it is essential to determine its least-squares solution [
22].
The concept of the algorithm is as follows:
Step 1: Define the coordinate detection values of N locations on the known ellipse as
(with error), where
, Substituting each coordinate point
into Equation (2) yields the equation error
, represented by the following expression:
Step 2: Define
as the sum of the squares of the errors in the equations following the substitution of each detection point, and compute its specific value. The equation is as follows:
Step 3: The approach aims to determine the least value of the squared error
of the equation. Based on the extreme value concept, Equation (4) can be derived:
Step 4: By expanding the equation derived from Step 3, the subsequent equation can be formulated, which can be resolved to ascertain the values of the five parameters A, B, C, D, and E.
Step 5: Utilizing the geometric characteristics of an ellipse, determine the lengths of the major axis
, the minor axis
, the coordinates of the focus
, and the angle of rotation
.
3. Algorithm and Implementation
This study presents a template watermarking system that integrates both template and message watermarking. The watermarking template features a predefined design for attack mitigation while concurrently storing binary copyright information. The algorithm’s design and implementation are as follows:
Step 1: Encode the copyright information as a binary sequence of a defined length (recommended 40 to 80 bits) and arrange the binary sequence sequentially into a circular configuration at consistent angular intervals.
Step 2: Identify the embedding location of the watermark circle’s center (in this study, we utilize the center of the amplitude spectrum), ascertain the radius for the watermark circle embedding, and systematically substitute the amplitude values in the spectrum map to facilitate the embedding of the watermark information.
Step 3: The spectrogram of the target image is denoised and provided as an input to the semantic segmentation network, with the result subsequently binarized.
Step 4: Utilize the output from the previous step to sequentially deposit the coordinates of the non-zero points from the binary image into an array. Employ the least-squares method to fit the scatter points within the array, derive the general equation of the ellipse, and calculate the ellipse’s major and minor axes, focal lengths, angle of rotation, and additional parameters.
Step 5: Simplify the elliptic curve based on the resolved parameters to obtain the precise coordinate spots for detection.
Step 6: The spectrogram is denoised and binarized, followed by the sequential extraction of binary values based on the coordinate points to retrieve the watermark information.
3.1. Template Watermark Design
The watermark information comprises a binary sequence of “0”s and “1”s, referred to as a
, with its length indicated as
. The watermark is expressed as
, The ring template watermark is formulated utilizing the magnitude coefficients within the DFT domain [
23].
Figure 3 illustrates the schematic representation of the template watermark, wherein the black sections denote the watermark information bit “0” and the white highlights signify the watermark information bit “1”.
The watermark information is uniformly dispersed around the ring. The duration
between two watermark bits is denoted as follows:
3.2. Watermark Embedding Algorithm
Designate the horizontal length of the image as
and the vertical length as
. Designate the center of the image as the focal point of the circular template watermark, represented as (
,
), with the following formula:
Where mod denotes the act of determining the mode. The high-frequency center point (,) of the DFT domain serves as the circle’s center, from which a circular template watermark with a radius of ] is created. The value S regulates the template’s dimensions, with S = 2 being recommended in this article.
The incorporation of watermark information is achieved by substituting the magnitude value in the spectrogram with the radius designated as R. The watermark information is embedded at coordinates (
,
) with a step length of
as the embedding interval in
Section 2.1, and the position is determined as follows:
Where
and
transform the angle
into radian values, thereafter computing the cosine and sine, respectively. The magnitude of angle
is collectively influenced by the radius R and the step size
. The position of symmetry
at
is determined using the following approach, owing to symmetry.
The formula for watermark replacement is as follows:
Figure 4 illustrates the spectral image of the ring template post-watermark embedding, where the highlighted circle denotes the watermark information bit “1”, and the non-highlighted portion of the circle signifies the watermark information bit “0”.
3.3. Watermark Extraction Algorithm
3.3.1. Semantic Segmentation
This paper delineates the training dataset into two components: the original image and its associated mask. The original image is segmented into two components: background and watermark, as illustrated in
Figure 5, where the black section represents the background and the red section denotes the watermark.
This paper utilizes 600 spectrum images and their corresponding masks, both unaltered and subjected to various attacks (e.g., projection transformation, affine transformation, rotation transformation, etc.), as training data, with the training and test sets divided in a 5:1 ratio.
The model employs the sigmoid activation function, with a training duration of 200 epochs, and the loss curve is illustrated in
Figure 6.
The model test sample is depicted in
Figure 7a, and the resulting image is binarized to produce
Figure 7b. The coordinates of all non-zero points post-binarization are retained in the array template, and elliptical fitting is executed to derive the elliptic equation of the watermarked coverage region.
3.3.2. Ellipse Fitting
Utilizing the coordinate array template defined in
Section 3.3.1, extract several coordinate points and allocate the x coordinates to the sample sequence x_sample and the y coordinates to the sample sequence y_sample. x_sample and y_sample serve as the input coordinates for ellipse fitting, employing the least-squares approach to derive the elliptic curve P. Calculate the rotation angle
of the ellipse, the focal length
, the semi-major axis
, and the semi-minor axis
in sequence to produce the fitted elliptical curve. This is illustrated in
Figure 8.
3.3.3. Ellipse Repositioning
The localization algorithm is outlined as follows:
The major axis of the ellipse is denoted as
, and the minor axis as
, the distance between the two foci is represented as
, and the angle of inclination of the ellipse is
, where
, as derived in
Section 3.3.2.
Rotate image P clockwise by degrees. Designate the rotated image as P′. When the center of the ellipse is positioned in the center of the image, the major axis of the ellipse, denoted as a, aligns with the x-axis in the horizontal orientation, while the minor axis, denoted as b, aligns with the y-axis in the vertical orientation.
The relocation of the watermark elliptic curve is finalized, as illustrated in the subsequent image (
Figure 9).
3.3.4. Determination of Watermark Information Coordinates
- 1.
Methods for establishing standard circular coordinates:
A circle is a specific type of ellipse characterized by equal lengths of its axes, and the length of an arc of a circle corresponding to a central angle
is given by
*
. The distance of a circle between two watermarked points is articulated in increments as follows:
The conventional equation of a circular curve is
, accompanied by the corresponding parametric equations.
The position of the point to be detected
(
,
can be articulated in relation to the step size
.
- 2.
The elliptic coordinates are defined as follows:
The standard equation of an ellipse:
It can be regarded as the standard circle
1 where all the horizontal coordinate components become
times the original, and all the vertical coordinate components become
times the original. If the circular template watermark ring is compressed to a radius of 1, the coordinates of the point to be detected are
, and the values of
and
are:
The coordinates of the spots to be identified on the adjusted elliptical template watermark curve can be derived as
(
.
All points in
(
are centered at the origin
and rotated counterclockwise by the declination angle
to obtain the coordinate coordinates F(
,
in the original watermarked image, where the values of
and
are specified in the following equation:
- 3.
Watermark information extraction:
The original watermark spectrogram is denoised and binarized; the pixel value at the coordinate F(
,
) is read sequentially. If the value is non-zero, it indicates that the watermark bit is “1”; otherwise, it is “0”. The watermark information is denoted as
6. Conclusions
This study offers a robust watermarking approach for annular templates, utilizing semantic segmentation and elliptic curve fitting, to enhance the limited robustness of classic template watermarking against geometric and affine attacks. This method incorporates deep learning technology into the watermark information extraction process, addressing the limitation of classic ring template watermarking, which fails to extract watermark information when the template deforms due to affine attacks. The method is resilient to diverse geometric attacks, such as scaling, rotation, and cropping. Even under various affine transformations, the watermark template can still be restored, allowing for the retrieval of watermark coordinates and extraction of watermark information. The experimental results demonstrate that the watermark information extracted by the algorithm retains substantial integrity across diverse challenging environments. Subsequent efforts will enhance the precision of semantic segmentation to accommodate a wide range of contexts; additionally, the watermark template will be modified to transmit a greater volume of effective information bits.