I want to implement watermarking algorithm based on Intermediate Significant Bit replacement
Afficher commentaires plus anciens
Hi everyone
I want to implement watermarking algorithm based on Intermediate Significant Bit replacement, it's for a project.
How to create ranges for each bitplane ?
Réponses (1)
Rahul
le 18 Juin 2025
I understand that you wish to implement watermarking algorithm based on Intermediate Significant Bit replacement.
Here are some steps you can follow:
- Use the 'bitget' function to extract the 'kth' bit plan from the image.
- You can choose which bit plane to change to add the watermark.
- The watermark can be of random values within certain limits, can be adjusted according to requirements.
- The 'bitset' function can be used to add the watermark values in the desired bit plane.
Here is an example:
img = imread('cameraman.png');
img = uint8(img);
% Extract each bitplane
bitplanes = zeros([size(img), 8], 'logical');
for k = 1:8
bitplanes(:,:,k) = bitget(img, k); % Extract k-th bitplane
end
% Replacing bitplane 4 with a watermark
watermark = randi([0 1], size(img)); % Example binary watermark
watermarked_img = bitset(img, 4, watermark); % Embed in bitplane 4
imshow(watermarked_img),
The following MathWorks documentations can be referred:
Thanks.
Catégories
En savoir plus sur Watermarking dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!