Embedding visible watermark in color document.

4 ビュー (過去 30 日間)
Balkar Singh
Balkar Singh 2021 年 2 月 16 日
コメント済み: Balkar Singh 2021 年 3 月 25 日
I want to embed a visible watermark in a color document image in the blank space (black rectangle as shown in image) as shown in the attached image. I'll be very thankful to you.
With regards

採用された回答

Shravan Kumar Vankaramoni
Shravan Kumar Vankaramoni 2021 年 3 月 23 日
編集済み: Shravan Kumar Vankaramoni 2021 年 3 月 23 日
Hi Balkar Singh,
Alpha blending method is used to watermark an image here
Watermarked_Image = Original_Image *alpha + (1-alpha)*watermark
Where alpha is the transparency parameter.
The following code demostrates this,
watermark = imread('saturn.png');
%Resize the watermark according to the area
modified = imresize(watermark,[64,64],'bilinear');
disp(size(modified));
original_image = imread('Marksheet1.png');
temp = zeros(size(original_image),'uint8');
[rows, cols, depth] = size(modified);
%Co-ordinnates to place the watermark
X = 21;
Y = 441;
temp(X:X+rows-1,Y:Y+cols-1,:) = modified;
temp(301:364,101:164,:) = modified;
temp(301:364,401:464,:) = modified;
alpha = 0.8;
watermarked_image = alpha * original_image + (1-alpha)*temp;
imshow(watermarked_image);
  4 件のコメント
Balkar Singh
Balkar Singh 2021 年 3 月 23 日
Thank you Sir. It's working
With regards
Balkar Singh
Balkar Singh 2021 年 3 月 25 日
@Shravan Kumar Vankaramoni Sir I have queries related to the above code
  1. is it possible to implement the above code with the help of any transform like DWT.
  2. How can I make the above code dynamic
With regards

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by