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

📄 onepsfmatrix.m

📁 curves ti si s a nice code.
💻 M
字号:
function psfMatData = onePsfMatrix( PSF, center )%%       psfMatData = onePsfMatrix( PSF, center );%%  Construct matrix data for a single PSF.%%  Input:%         PSF  -  array containing the PSF%      center  -  array containing indices of center of the PSF.%%  Output:%    psfMatData -  array containing the (complex) eigenvalues of the extended%                  PSF%%  J. Nagy 1/6/02%%  Find the next power of 2 dimension of the extended PSF.%psf_size = size(PSF);for i = 1:length(psf_size);  e(i) = nextpow2( psf_size(i) );endm = 2 .^ (e+1);%%  Normalize the PSF so that the minimum pixel values is 0, and the %  sum of all entries is one (conservation of energy property).%% if sum( PSF(:) ~= min( abs(PSF(:)) ) ) > 0     % commented by Vio%   PSF = PSF - min( abs(PSF(:)) );              % commented by Vio% end                                            % commented by Vio% PSF = PSF / sum( abs(PSF(:)) );                % commented by VioPSF = PSF / sum(PSF(:));                         % added by VioP = padarray(PSF, m-size(PSF), 'post');P = circshift(P, -(center-1));psfMatData = fftn(P);

⌨️ 快捷键说明

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