saturno.m

来自「ICA watermarking. Blind, fragile, robust」· M 代码 · 共 54 行

M
54
字号
function Imo=saturno(Imi)



%Copyright murillo 2001
%Please cite:
%F.J. Gonz醠ez-Serrano, H.Y. Molina-Bulla, J.J. Murillo-Fuentes "Independent component analysis applied to digital image watermarking". IEEE Int. Conf. on Acoustics, Speech and Signal Processing (ICASSP'2001). IEEE. Salt Lake City (EEUU). 
% and/or
%JJ Murillo-Fuentes "Independent component analisis in the blind
%watermarking of digital images" Neurocomputing Volume 70 ,  Issue 16-18
%(October 2007) Pages 2881-2890  

szs=size(Imi);
if length(szs)==3
   dim=3;
else
   dim=1;
end
m=szs(1);
n=szs(2);

if dim==3
   mnr=min(Imi(:,:,1));
   mng=min(Imi(:,:,2));
   mnb=min(Imi(:,:,3));
   mn=min([mnr mng mnb]);
   
   if mn<0
      Imi=Imi-mn;
   end
   mxr=max(Imi(:,:,1));
   mxg=max(Imi(:,:,2));
   mxb=max(Imi(:,:,3));
   mx=max([mxr mxg mxb]);
   if mx>1
      Imi=Imi/mx;
   end
   
else
   
   mn=min(min(Imi(:,:)));
   
   if mn<0
      Imi=Imi-mn;
   end
   mx=max(max(Imi(:,:)));
   if mx>1
      Imi=Imi/mx;
   end
   
end

Imo=Imi;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?