crop.m

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

M
20
字号
function y=crop(x,borde)


%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  

[M,M]=size(x);
mask_crop=ones(M);
N=M/2-borde;
aux=mask_crop(M/2-N:M/2+N,M/2-N:M/2+N);
mask_crop(M/2-N:M/2+N,M/2-N:M/2+N)=0*aux;
mask_crop=1-mask_crop;
y=x.*mask_crop;
return

⌨️ 快捷键说明

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