Clear Filters
Clear Filters

Is any edge detection used in this image, after having applied Gabor filter?

2 views (last 30 days)
I'm new to matlab.
I'm trying to implement a paper as my project. The images a) and c) are input images, and according to the paper, Gabor filter has been applied, and the images b) and d) are the outputs respectively. I did apply Gabor filter onto the same image, but my ouptput is way different than the one in the paper.
My question is that, the output images seem to have edges already, and it's not a B/W image completely. So, is there any edge detection technique that was used, if at all it is possible to figure that out by looking at the image?
This is the output I got
Since I couldn't get a dataset with similar images, I used a different set of images lateron but I still couldn't get the desired output. If needed, I'll add that as well.
sigma=0.1;
psi=0.2;
gamma=0.1;
n1=1;
lambda=1;
n2=1;
theta=120;
for i=1:n1
l=lambda(i);
for j=1:n2
t=theta(j);
g1=gabor_fn(sigma,t,l,psi,gamma);
%subplot_tight(1,n2,j);
GT=conv2(I,double(g1),'same');
figure;
imshow(GT);
title('Gabor Filter applied');
axis image;
end
end
------------------------
function gb=gabor_fn(sigma,theta,lambda,psi,gamma)
sigma_x = sigma;
sigma_y = sigma/gamma;
% Bounding box
nstds = 3;
xmax = max(abs(nstds*sigma_x*cos(theta)),abs(nstds*sigma_y*sin(theta)));
xmax = ceil(max(1,xmax));
ymax = max(abs(nstds*sigma_x*sin(theta)),abs(nstds*sigma_y*cos(theta)));
ymax = ceil(max(1,ymax));
xmin = -xmax; ymin = -ymax;
[x,y] = meshgrid(xmin:xmax,ymin:ymax);
% Rotation
x_theta=x*cos(theta)+y*sin(theta);
y_theta=-x*sin(theta)+y*cos(theta);
gb= 1/(2*pi*sigma_x *sigma_y) * exp(-.5*(x_theta.^2/sigma_x^2+y_theta.^2/sigma_y^2)).*cos(2*pi/lambda*x_theta+psi);
I removed noise using Wiener filter to the input image.
^This is what I've used.
Also, could you please shed some light on what basis should I use the Gabor filter parameters, to get the desired output? The references on the internet weren't much helpful.
Thanks a lot in advance.

Answers (1)

Image Analyst
Image Analyst on 1 Mar 2017
It does appear that in the lung region some sort of edge enhancement method was used. Not sure what though. Looks sort of like a DOG filter (Difference Of Gaussians) but could be almost anything, but is probably a Gabor filter since that's what you said they said they did in their paper. When you ask "is possible to figure that out" I'm not sure that " that" is. What do you want to filter out from the Gabor-filtered images?
  9 Comments
Image Analyst
Image Analyst on 4 Mar 2017
Try varying the filter parameters, or else contact the authors for more detailed instructions.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!