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

📄 findcenter.m

📁 curves ti si s a nice code.
💻 M
字号:
function center = findCenter( PSF )%%       center = findCenter( PSF );%%  Given (possibly) several PSF images, this function sets the center %  of the PSFs (location of point source) to be the location of max %  entry of the PSFs.%%  Input:%         PSF  -  cell array containing the PSF image(s)%%  Output:%         center - array [row_index, col_index] containing the%                  location of the center of the PSF.%%  J.Nagy 1/8/02center = cell(size(PSF));%%  Note that this should work for 2D as well as 3D images.%for k = 1:size(PSF, 3)  for i = 1:size(PSF, 1)    for j = 1:size(PSF, 2)       P = PSF{i,j,k};       [ci, cj, ck] = ind2sub(size(P), find( P == max( P(:) ) ));       c = [min(ci), min(cj), min(ck)];       center{i,j,k} = c(1:length(size(P)));    end  endend

⌨️ 快捷键说明

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