Image content protection method for android platform
By acquiring device information in real time and fusing multiple features on the Android platform, the JND model is optimized, solving the problem of poor adaptability of traditional models on the Android platform. This achieves a balance between the visual effect and robustness of watermarking technology on the Android platform, improving the quality and anti-attack capability of watermarked images.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANDONG NORMAL UNIV
- Filing Date
- 2023-03-10
- Publication Date
- 2026-04-17
AI Technical Summary
The traditional JND model cannot be effectively adapted to the Android platform, making it difficult to balance visual effects and robustness in digital watermarking technology on the Android platform.
A JND model adapted to the Android platform is proposed. By acquiring the screen size, brightness and ambient light of the Android device in real time, and combining the visual masking effect of multi-feature fusion, the adaptive spatial contrast sensitivity function threshold and the visual masking value of multi-feature weighted fusion are calculated for adaptive estimation of the quantization step size of the STDM watermarking framework.
It achieves a better balance between the robustness and invisibility of watermarks on the Android platform, improving the visual quality and anti-attack capabilities of watermarked images.
Smart Images

Figure CN116503231B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of digital image watermarking technology, and relates to an image content protection method for the Android platform. Background Technology
[0002] With the advent of the mobile internet era, smartphones have penetrated every aspect of our lives, driving the development of internet and multimedia information technologies and making the use of digital information more frequent. For example, we can share photos anytime, anywhere through social networks. Therefore, the security of digital information has become an increasingly important concern. The mobile internet era has made it easier to tamper with digital information, significantly impacting the copyright of digital media and causing economic losses to some extent. In the field of copyright protection and digital information encryption, research on digital watermarking technology has yielded significant results, gradually becoming an effective means of intellectual property protection and anti-counterfeiting of digital multimedia information. The widespread adoption of smartphones and the trend of applications gradually shifting from PCs to mobile devices have made Android-based digital watermarking technology a hot research topic, and the development of mobile digital watermarking systems has become a demand. This invention focuses on images on the Android platform, improving the digital watermarking algorithm and designing a digital watermarking application suitable for the Android platform.
[0003] Generally, the balance between invisibility and robustness in watermarking technology is achieved by improving the perceptual model or adjusting the embedding method, with Spread Transform Dither Modulation (STDM) being a commonly used embedding method. Currently, watermarking technology can be optimized using the Human Visual System (HVS), with Just Noticeable Difference (JND) being a classic method. JND represents the maximum visual distortion that HVS cannot detect, offering significant advantages in maintaining both invisibility and robustness of watermarking technology. Traditional JND models typically consider the visual effects experienced by viewers on televisions or desktop monitors. However, due to differences in size and brightness between Android platforms and desktop monitors, resulting in different viewing angles and visual effects, traditional JND models are not well-suited for Android platforms. To address this issue, this invention considers the impact of viewing conditions (display size and viewing distance), ambient light, and three features—image sharpness, texture, and directional complexity—on visual perception on the Android platform. It yields a JND model adapted for the Android platform and applies it to quantization watermarking methods, resulting in a multi-feature fusion-based JND watermarking method adapted for the Android platform. Summary of the Invention
[0004] This invention proposes an image content security protection method for the Android platform. During system design, it proposes real-time acquisition and calculation of the spatial contrast sensitivity function threshold adapted to the Android platform, considering factors such as the Android platform screen size, image pixel count, ambient light, and the brightness of the Android device itself. When images are displayed on the Android platform, high-resolution images on small screens are significantly affected by sharpness, texture, and directional complexity in terms of human visual attention. This invention proposes a masking effect based on multi-feature fusion. Based on the spatial contrast sensitivity function threshold adapted to the Android platform and the masking effect of multi-feature fusion, a JND model adapted to the Android platform is obtained and used to adaptively estimate the optimal quantization step size of the STDM watermarking framework. This leads to the proposal of a JND watermarking method adapted to the Android platform based on multi-feature fusion.
[0005] The technical solution adopted in this invention is as follows:
[0006] A method for image content security protection on the Android platform, comprising the following steps:
[0007] Step 1: Call the screen brightness, screen size and light sensor parameters of the Android platform, calculate and adjust the spatial contrast sensitivity function threshold in real time to adapt to the Android platform;
[0008] Step 2: Obtain the visual mask value by weighted fusion of multiple features based on texture, sharpness, and directional complexity.
[0009] 1) Using a Gaussian model to simulate the differences between the center and surrounding feature blocks to characterize visually salient regions in an image, the saliency mapping of texture, sharpness, and directional complexity can be represented as:
[0010]
[0011] Where k represents the feature, and T represents the texture feature. G represents the directional complexity feature, and D represents the sharpness feature. k (n,Ω2) represents the feature differences between the current block n and other blocks in region Ω2 with respect to k. Ω2 has a size of 5×5 and uses a Gaussian distribution function α. l This is used to simulate the visual attention mechanism of HVS, and to measure the impact of blocks at different distances on the current block.
[0012]
[0013] Where l represents the Euclidean distance between the current block n and other blocks in region Ω2;
[0014] 2) By combining the saliency mapping of texture, sharpness, and directional complexity with the visual attention mechanism using formula (3), the expected center position of the saliency mapping of texture, sharpness, and directional complexity is calculated.
[0015]
[0016] Where N represents the total number of blocks, R s It represents the set of all blocks, where (i,j) represents the index of the block;
[0017] 3) Under the influence of the central block, the probability that the current block is located in a salient region is calculated as follows:
[0018]
[0019] Where p k (s|d) represents the probability that feature k is located in a significant region under the influence of parameter d, p k (s|c) represents the probability that the current block is located in a significant region under the influence of feature k and parameter c, d represents the Euclidean distance between the current block and the central block, and c represents the connectivity parameter;
[0020] 4) The entropy function of the significance probability can be obtained from formula (5):
[0021]
[0022] Where k∈{T,f Or ,G},U k (d) represents the entropy function of the significance probability of feature k under the influence of parameter d, U k (c) represents the entropy function of the significance probability of feature k under the influence of parameter c;
[0023] 5) The saliency weights of three different features—sharpness, texture, and directional complexity—can be obtained using formula (6):
[0024]
[0025] 6) Combine the saliency weights of the three features—sharpness, texture, and directional complexity—and perform a weighted fusion to obtain the saliency value R(n) of the three features:
[0026]
[0027] Here, μ is a non-zero constant, which ensures that the denominator term is not zero;
[0028] 7) The visual mask value of multi-feature weighted fusion is represented as:
[0029] F S =1-(R(n)-0.2)·0.2 (8)
[0030] Step 3: Use the JND model adapted for the Android platform based on multi-feature weighted fusion for watermark embedding and extraction.
[0031] 1) The JND model adapted to the Android platform based on multi-feature weighted fusion is defined as follows:
[0032] T jnd =T CSF ·F ls ·M cm ·F S (9)
[0033] Among them, T CSF It is the spatial contrast sensitivity threshold adapted for the Android platform, F ls It is the brightness masking value, M cm It is the contrast masking value, F. S It is a visual mask value obtained by weighted fusion of multiple features;
[0034] 2) The watermark is quantized using the Extended Transform Dithering Modulation (STDM) method. The quantization step size is obtained using the JND model adapted to the Android platform based on multi-feature weighted fusion, and the watermark is embedded and extracted.
[0035] Specifically, the threshold for the spatial contrast sensitivity function adapted to the Android platform is defined as follows:
[0036] T CSF =a·f(i,j)·exp(-b·f(i,j))[1+c·exp(b·f(i,j))] 0.5 (10)
[0037]
[0038]
[0039]
[0040] Where L amb The ambient light level can be estimated in real time from the light sensor on the Android device. dev Here, c represents the screen brightness value obtained in real time from the system on the Android device, and f(i,j) represents the spatial frequency at position (i,j), which can be expressed as...
[0041]
[0042]
[0043] VR represents the ratio of the viewing distance of the image to the screen height, with the viewing distance set to 70cm. N represents the dimension of the DCT block, and ε is the number of pixels in the image. The screen size and number of pixels can be obtained in real time from the Android device.
[0044] Compared with the prior art, the beneficial effects of the present invention are:
[0045] 1. The original spatial contrast sensitivity function threshold only considers the impact of ambient light on vision. This invention takes into account the brightness of Android device screens and proposes a spatial contrast sensitivity function threshold adapted to the Android platform, taking into account the visual effect under real-world Android device usage.
[0046] 2. This invention takes into account the influence of multiple features on human visual attention. By combining texture, directional complexity, and sharpness on the visual attention mechanism, the saliency weights of the three features of texture, sharpness, and directional complexity are obtained, and finally, a visual masking value of multi-feature weighted fusion is obtained.
[0047] 3. Based on the spatial contrast sensitivity function threshold adapted to the Android platform, a visual masking value of multi-feature weighted fusion is added to form a JND model adapted to the Android platform based on multi-feature weighted fusion. This model is then applied to quantized watermarking, enabling the watermarking technology to better balance the robustness and invisibility of the watermark on the Android platform. Attached Figure Description
[0048] Figure 1 This is a flowchart of the image content protection method for the Android platform proposed in this invention.
[0049] Figure 2 These are four classic grayscale images, (ad) representing airplane, barbara, buildings, and mandrill, respectively.
[0050] Figure 3 It is a binary watermark.
[0051] Figure 4 yes Figure 2 The results of the VSI comparison experiment of four watermarked images are shown in the figure.
[0052] Figure 5 yes Figure 2 Comparison of the average bit error rate of four watermarked images after being attacked: (a) Gaussian noise; (b) JPEG compression; (c) Salt and pepper noise; (d) Scale attack.
[0053] Figure 6 These are visual representations of watermark recovery after an image airplane attack: (a) Gaussian noise 0.0006; (b) JPEG compression 40; (c) Salt and pepper noise 0.0008; (d) Scale attack 1.2; (e) Sina Weibo transmission; (f) Facebook transmission. Detailed Implementation
[0054] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0055] Example 1:
[0056] like Figure 1 As shown, an image content protection method for the Android platform comprises the following steps:
[0057] Watermark embedding steps:
[0058] Step 1: Select a grayscale image, such as... Figure 2 The image is read into a Bitmap object in ARGB_8888 format, the getPixel function is used to read the grayscale image pixel values, and DCT transformation is performed.
[0059] Step 2: Perform a zigzag scan on the DCT coefficients to obtain the carrier vector.
[0060] Step 3: Select the watermark image, such as... Figure 3 The watermark is read into the Bitmap object, converted into a 0,1 sequence and stored in an array, and then embedded into the carrier vector. The specific operation process is as follows:
[0061] (1) On the Android side, the system data provided by the ContentProvider is accessed through the ContentResolver interface. The screen brightness of the Android side is obtained through the statement Settings.System.getInt(contentResolver,Settings.System.SCREEN_BRIGHTNESS,defVal).
[0062] (2) The Android client obtains the screen size through the WindowManager interface class. The implementation statement is as follows:
[0063] WindowManager=(WindowManager).getSystemService(Context.WINDOW_SERVICE);
[0064] WindowManager.getDefaultDisplay().getWidth();
[0065] WindowManager.getDefaultDisplay().getHeight().
[0066] (3) On the Android side, ambient light information is obtained through sensors. First, the SensorEventListener interface is implemented to obtain the sensor management object (sensormanager). Finally, the ambient light value is returned by the light sensor object. The implementation code is as follows:
[0067] Sensor sensor=sensorManager.getDefaultSensor(Sensor.TYPE_LIGHT).
[0068] (4) The spatial contrast sensitivity function threshold adapted to the Android platform is obtained by formula (10).
[0069] (5) Extract three features for each block: texture, sharpness, and directional complexity. Use low-to-medium frequency DCT coefficients and consider the compression factor. Use the quantization step size corresponding to the low-frequency coefficients to maintain a balance between robustness and accuracy. The sharpness feature is shown below:
[0070]
[0071] Q N It is a redundant function used to improve the robustness of the method. The subscripts of AC indicate the position of the coefficient in each DCT block.
[0072] Meanwhile, the texture features and directional complexity features are obtained according to formulas (17) and (18).
[0073]
[0074] Where AC and DC represent DCT coefficients.
[0075]
[0076] Where n represents the current DCT block, Ω1 represents the local 3×3 region centered on block n, and δ(·) is the impulse function, as shown in formula (19).
[0077]
[0078] Where γ is the threshold value used to determine whether the orientations of two blocks are similar, O r The directional characteristics are represented by the definition in formula (20).
[0079]
[0080] E max and E med They are E X ={AC 0,1 AC 1,0 AC 1,1 The maximum and median values in}.
[0081] (6) Obtain the saliency mapping of texture, sharpness, and directional complexity using formula (1), and obtain the visual masking value F of multi-feature weighted fusion according to formula (8). S .
[0082] (7) The final JND model threshold is obtained according to formula (9).
[0083] (8) The watermark bits are embedded by using the STDM watermarking method.
[0084] (9) Update the image block after embedding the watermark.
[0085] Step 4: Repeat step 3 until all image blocks have the corresponding watermark bit embedded. Use createBitmap to convert the pixels in the one-dimensional array into a Bitmap object with specified length and width, generate the image with embedded watermark and save it.
[0086] Watermark extraction steps:
[0087] Step 1: Read the image into a Bitmap object in ARGB_8888 format, use the getPixel function to read the grayscale image pixel values, and perform DCT transformation.
[0088] Step 2: Perform a zigzag scan on the DCT coefficients to obtain the carrier vector.
[0089] Step 3: For each image block, obtain the final JND value according to formula (9).
[0090] Step 4: Extract one bit of the watermark information based on the STDM watermarking method and the minimum distance detection method.
[0091] Step 5: Repeat step 4 until the watermark sequence extraction is complete. For the extracted 0,1 sequence, restore it to a binary watermark image, save it as a Bitmap object, and display it on the Android interface, as shown below. Figure 6 .
[0092] The experimental results of the method of the present invention are as follows:
[0093] The original images used in the experiment were four classic grayscale images (256×256), such as... Figure 2 A watermark is composed of 1024 bits of binary data, such as... Figure 3 .
[0094] A visual quality comparison experiment of watermarked images was conducted, using the structural similarity index (SSIM) and visual saliency index (VSI) of the image quality assessment model for evaluation. When the SSIM value equals 0.982, the VSI value was compared to determine the visual quality of the images. Under the premise of the same SSIM value, a higher VSI value indicates better visual fidelity of the JND model. The comparison results are as follows: Figure 4The VSI of the four images in this invention is higher than that of the traditional JND model, and the average VSI can reach 0.990. The experimental results show that the method is imperceptible and the watermarked image has good visual quality.
[0095] Robustness comparison experiments were conducted, using image processing methods such as Gaussian noise, salt-and-pepper noise, JPEG compression, and scaling to test the robustness of the watermarking method. A VSI of 0.992 and a bit error rate close to 0 indicate stronger robustness. The comparison results are as follows: Figure 5 As can be seen from the figure, this method has good robustness against common image processing methods.
[0096] Experiments on restoring the visual quality of watermarks, such as Figure 6 As shown, the recovered watermark is identifiable under attacks such as Gaussian noise of 0.0006, JPEG compression of 40, salt and pepper noise of 0.0008, scale attack of 1.2, and transmission via Sina Weibo and Facebook. Therefore, this method has good robustness to common image processing and social network transmission.
Claims
1. A method for image content security protection on the Android platform, comprising the following steps: Step 1: Call the screen brightness, screen size and light sensor parameters of the Android platform, calculate and adjust the spatial contrast sensitivity function threshold in real time to adapt to the Android platform; Step 2: Obtain the visual mask value by weighted fusion of multiple features based on texture, sharpness, and directional complexity. 1) Using a Gaussian model to simulate the differences between the center and surrounding feature blocks to characterize visually salient regions in an image, the saliency mapping of texture, sharpness, and directional complexity can be represented as: Where k represents the feature, and T represents the texture feature. G represents the directional complexity feature, and D represents the sharpness feature. k (n,Ω2) represents the feature differences between the current block n and other blocks in region Ω2 with respect to k. Ω2 has a size of 5×5 and uses a Gaussian distribution function α. l This is used to simulate the visual attention mechanism of HVS, and to measure the impact of blocks at different distances on the current block. Where l represents the Euclidean distance between the current block n and other blocks in region Ω2; 2) By combining the saliency mapping of texture, sharpness, and directional complexity with the visual attention mechanism using formula (3), the expected center position of the saliency mapping of texture, sharpness, and directional complexity is calculated. where N denotes the total number of blocks, R s denotes the set of all blocks, (i,j) denotes the index of a block; 3) Under the influence of the central block, the probability that the current block is located in a salient region is calculated as follows: where p k (s|d) denotes the probability that the k feature under the influence of parameter d locates the current block in the salient region, p k (s|c) denotes the probability that the k feature under the influence of parameter c locates the current block in the salient region, d denotes the Euclidean distance between the current block and the center position block, and c denotes the connectivity parameter. 4) The entropy function of the significance probability can be obtained from formula (5): in U k (d) represents the entropy function of the significance probability of feature k under the influence of parameter d, U k (c) represents the entropy function of the significance probability of feature k under the influence of parameter c; 5) The saliency weights of three different features—sharpness, texture, and directional complexity—can be obtained using formula (6): 6) Combine the saliency weights of the three features—sharpness, texture, and directional complexity—and perform a weighted fusion to obtain the saliency value R(n) of the three features: wherein The value of μ is a non-zero constant, which guarantees that the denominator term is not zero; 7) The visual mask value of multi-feature weighted fusion is represented as: F S = 1 - (R(n) - 0.2) - 0.2 (8) Step 3: Use the JND model adapted for the Android platform based on multi-feature weighted fusion for watermark embedding and extraction. 1) The JND model adapted to the Android platform based on multi-feature weighted fusion is defined as follows: T jnd = T CSF • F ls • M cm • F S (9) Among them, T CSF It is the spatial contrast sensitivity threshold adapted for the Android platform, F ls It is the brightness masking value, M cm It is the contrast masking value, F. S It is a visual mask value obtained by weighted fusion of multiple features; 2) The watermark is quantized using the Extended Transform Dithering Modulation (STDM) method. The quantization step size is obtained using the JND model adapted to the Android platform based on multi-feature weighted fusion, and the watermark is embedded and extracted.
2. The image content security protection method for Android platform according to claim 1, characterized in that, The threshold for the spatial contrast sensitivity function adapted to the Android platform is defined as follows: T CSF = a - f(i, j) - exp(-b - f(i, j)) [1 + c - exp(b - f(i, j))] 0.5 (10) Where L amb The ambient light level can be estimated in real time from the light sensor on the Android device. dev Here, c represents the screen brightness value obtained in real time from the system on the Android device, and f(i,j) represents the spatial frequency at position (i,j), which can be expressed as... VR represents the ratio of the viewing distance of the image to the screen height, with the viewing distance set to 70cm. N represents the dimension of the DCT block, and ε is the number of pixels in the image. The screen size and number of pixels can be obtained in real time from the Android device.
Citation Information
Patent Citations
Self-adaptive robust video watermarking method based on AVS (Audio Video Standard)
CN102238388A
Image watermarking method and system fusing intra-block and inter-block texture rule features of image
CN111260533A