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

📄 divergencer.m

📁 3D shape reconstruction matlab code. It used shape from defocus technique with diffusion. You can re
💻 M
字号:
function [divF] = divergenceR(F,coeff)
% compute the divergence of the gradient of f
% multiplied by a diffusion coefficient
% backward difference scheme
%
% Copyright 2006 Paolo Favaro (p.favaro@hw.ac.uk)
% 
% School of Engineering and Physical Sciences
% Heriot-Watt University, Edinburgh, UK
% 
% Last revision: August 2006
%
% This program can be used only for research purposes.
% This program is distributed WITHOUT ANY WARRANTY; 
% without even the implied warranty of MERCHANTABILITY 
% or FITNESS FOR A PARTICULAR PURPOSE.

[nri,nrj]=size(F);
Gx = zeros(nri,nrj);
Gy = zeros(nri,nrj);
Gx(:,1:nrj-1) = diff(F,1,2);
Gy(1:nri-1,:) = diff(F,1,1);
% diffusion coefficient
Gxcoeff = Gx.*coeff;
Gycoeff = Gy.*coeff;
Gxx(:,2:nrj) = diff(Gxcoeff,1,2);
Gyy(2:nri,:) = diff(Gycoeff,1,1);
divF = Gxx+Gyy;
return

⌨️ 快捷键说明

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