📄 compdiff3.m
字号:
%Program : Non Linear Complex Diffusion%Author : Jeny Rajan%The following program will produce scale space image based on the concept of %non linear complex diffusion.%Application area : Image Denoising.%Ref : Guy Gilboa, Nir Sochen and Yehoshua Y Zeevi, "Image Enhancement and Denoising by Complex Diffusion Processes", %IEEE Trans. On Pattern Analysis and Machine Imtelligence, Vol. 26, No. 8, Aug. 2004% *************************************************% * method : It=del(c(Im(I)del I) *% * c(Im(I)) = e^i*theta *% * ---------------------- *% * 1+ [Im(I)/(k*theta)]^2 *% *************************************************% Usage% compdiff1(I,T)% I - Input image, in case of denoising, noisy image% T - Threshold, an integer >= 1function [ncdif] = compdiff3(I,T)I = double(I);[x y z]=size(I);im=imag(I);theta=3*3.14/30;dt = 0.1;It1 = I; It2 = I; k=1.5;t=1;for t=1:T [Ix, Iy] = gradient(It1); tmp1=cos(theta)+sqrt(-1)*sin(theta); tmp2=(imag(It1)./(k*theta)).^2; g=tmp1./(1+tmp2); [div1, div2] = gradient( g .* Ix); [div3, div4] = gradient( g .* Iy); div = div1 + div4; It2 = It1 + dt .* div; It1 = It2;end;im1=uint8(real(It1)); im2=uint8(imag(It1));figure,imshow(im1,[]);figure,imshow(im2,[]);ncdif = uint8(real(It1));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -