您的位置:首页 > 编程语言 > MATLAB

图像处理 | MATLAB实现图像的水印去除

2019-03-13 14:03 267 查看
版权声明:本文为博主原创文章,未经博主允许不得转载。转载注明文章出处!!! https://blog.csdn.net/u011344545/article/details/88530872

博主github:https://github.com/MichaelBeechan   

博主CSDN:https://blog.csdn.net/shuiu1344545 

  • 萌萌的预处理图像

  • Matlab代码

[code]I=imread('2.jpg');
figure(10), imshow(I);
t =I(590 : 620, 240 : 440, 1 : 3);%估计水印区域
figure(1), imshow(t);
t1 = t(:,:,1);
figure(2), imshow(t1);
t2 = t(:, :, 2);
figure(3), imshow(t2);
t3 = t(:, :, 3);
figure(4), imshow(t3);

[m,n] = size(t2)
for i = 1:m
for j = 1:n
if t2(i,j) >= 150
t2(i,j) = 250;
end
end
end

figure(5), imshow(t2);

for i = 1:m
for j = 1:n
if t3(i,j) >= 150
t3(i,j) = 250;
end
end
end

figure(6), imshow(t3);

for i = 1:m
for j = 1:n
if t1(i,j) >= 150
t1(i,j) = 255;
end
end
end

figure(7),imshow(t1);

for i = 1:m
for j = 1:n
t(i,j,1) = t1(i,j);
t(i,j,2) = t2(i,j);
t(i,j,3) = t3(i,j);
end
end
figure(8), imshow(t);

for i = 1:31
for j = 1:201
I(i + 589, j + 239, 1:3)=t(i, j, 1:3);
end
end
figure(9), imshow(I);
  • 运行结果

 

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐