⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 get_kmat.m

📁 采用matlab编写的数字图像恢复程序
💻 M
字号:
  function Kmat = get_Kmat(kernel_hat)  %  Kmat = get_Kmat(kernel_hat)%%  Construct block Toeplitz matrix Kmat with Toeplitz blocks which %  corresponds to 2-d integral operator. %%  kernel_hat contains the 2-D FFT of the discretized kernel of the %  operator. This kernel has been zero extended, so its size is 4 times%  that of Kmat.  [nx2,ny2] = size(kernel_hat);  kernel = real(ifft2(kernel_hat));  nx = nx2 / 2;  ny = ny2 / 2;  kernel = kernel(1:nx,1:ny);  N = nx*ny;  hx = 1/nx;  hy = 1/ny;%  Use MATLAB's Toeplitz function to construct matrix.  Kmat = zeros(N,N);  for j = 1:ny    jmin = (j-1)*nx+1;    jmax = j*nx;    for jp = 1:ny      jpmin = (jp-1)*nx+1;      jpmax = jp*nx;      arg = kernel(:,abs(j-jp)+1);      block = toeplitz(arg);      Kmat(jmin:jmax,jpmin:jpmax) = block;    end  end  Kmat = Kmat * (hx * hy);

⌨️ 快捷键说明

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