how to embed a watermark in a color image

17 ビュー (過去 30 日間)
shafaq innam
shafaq innam 2013 年 4 月 14 日
回答済み: cui,xingxing 2021 年 9 月 13 日
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?

回答 (2 件)

Image Analyst
Image Analyst 2013 年 4 月 14 日
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 件のコメント
SUBROTO KUNDU
SUBROTO KUNDU 2019 年 7 月 24 日
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
Image Analyst 2019 年 7 月 26 日
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.

サインインしてコメントする。


cui,xingxing
cui,xingxing 2021 年 9 月 13 日

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by