how to embed a watermark in a color image
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
i=imread('golf.jpg'); imshow(i); j=rgb2gray(i); imshow(j); n=imread('copy.jpg'); l=imresize(n,0.5); m=rgb2gray(l); imshow(m); [r,c]=size(j); startrow=1; startcol=1; j(startrow:startrow+size(m,1)-1,startcol:startcol+size(m,2)-1) = m; imshow(j); i used this code for watermarking a grayscale image and i can embed the watermark anywhere by replacing the values but it doesnot work for color images how can i watermark a color image?
0 Kommentare
Antworten (2)
Image Analyst
am 14 Apr. 2013
You can do that same thing in every color channel.
% Extract the individual red, green, and blue color channels.
redChannel = rgbImage(:, :, 1);
greenChannel = rgbImage(:, :, 2);
blueChannel = rgbImage(:, :, 3);
% Now put in watermark, then recombine
newRGBImage = cat(3,watermarkedRed, watermarkedGreen, watermarkedBlue);
4 Kommentare
SUBROTO KUNDU
am 24 Jul. 2019
Hi Image Analyst,
I have tried several times to write the code. But it does not give the correct output. Please help me.
https://www.mathworks.com/matlabcentral/answers/473297-reversible-watermarking-based-on-binomial-transform-and-cholesky-decomposition
Image Analyst
am 26 Jul. 2019
But you didn't answer my two questions. And I'd have to research it just like you would, but since it's your project, not mine, and it will probably take more than about 5 minutes, I can't afford to donate that much time to you. Sorry. I'm sure you'd do just as good a job of delving into the intricate details as I could.
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!