From: center15 on 7 Dec 2009 03:09 Hi, I got a project which extracting vessels from retinal image. The filter must be in frequency domain. I am having a problem with my filter algorithm. On my research, usually gaussian filter method modified for matched filter. Then use imrotate 90 degree and use sigma 1 and 3. After all sigma1-sigma3 will give final result, but I cannot get the final result as correct. I thing my filter algorithm is wrong or I am missing some method after filter. Could you please help. Please dont send any link about matched filter, I allready checked. Thank you function [sigm1] = test(im) imf = fftshift(fft2(im)); [co,ro]=size(im); H1 = Gfilter(co,ro, 1); %sigma 1 out1= imf.*H1; sigm1=abs(ifft2(out1)); H3 = Gfilter(co,ro, 3); %sigma 3 out3= imf.*H3; sigm3=abs(ifft2(out3)); imshow(sigm1-sigm3,[]); function H = Gfilter(nx,ny, s) x_orig =floor(nx/2) + 1; y_orig = floor(ny/2) + 1; H=zeros(nx,ny); for x=1:nx for y=1:ny u = sqrt((x-x_orig)^2 + (y-y_orig)^2); H(x,y)=exp(-u/2/s^2); end end H=imrotate(H,90); H=imresize(H,[nx,ny]);
|
Pages: 1 Prev: cognitive radio Next: when exact differential equation solvers go bad! |