Extraction of blood vessel using entropic thresholding

1 Ansicht (letzte 30 Tage)
vidya
vidya am 25 Nov. 2013
Kommentiert: Priya Natarajan am 23 Dez. 2013
hello sir m working with extraction of blood vessels..i want to extract the blood vessels using entropic thresholding method .I also have a code..but when i execute it i get a plain blank image i tried varying the values but still its the same.can somebody please help me on this..please?
Heres my entire code
function GABOR_Callback(hObject, eventdata, handles)
% hObject handle to GABOR (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
A = getimage();
I = A(:,:,2);
%A(:,:,1) =0;
%A(:,:,3) =0;
N = 12;
Sx = 8;
Sy = 2;
f = 0.1;
nf = 1;
theta = 0;
I = im2double(I);
img_out = zeros(size(I,1),size(I,2),N);
for i = 1:12
theta = (i*15*pi)/180;
for x = -fix(Sx):fix(Sx)
for y = -fix(Sy):fix(Sy)
xPrime = x * cos(theta) + y * sin(theta);
yPrime = y * cos(theta) - x * sin(theta);
G(fix(Sx)+x+1,fix(Sy)+y+1) = exp(-nf*pi*((xPrime/Sx)^2+(yPrime/Sy)^2))*cos(2*pi*f*xPrime);
end
end
%G = max(G(:))-G;
%s=sum(G(:));
%mn=s/357;
%G=G-mn;
%figure;
%imshow(real(G));
%title('real image');
c = conv2(I,real(G),'same');
%figure;
%imshow(c);
%title('convo image');
img_out=zeros(size(c,1),size(c,2),N);
img_out(:,:,i)= c;
image3D = cat(3,img_out(:,:,1),img_out(:,:,2), img_out(:,:,3),img_out(:,:,4),img_out(:,:,5), img_out(:,:,6),img_out(:,:,7),img_out(:,:,8), img_out(:,:,9),img_out(:,:,10),img_out(:,:,11),img_out(:,:,12));
% Find the max along dimension #3.
maxG = max(image3D, [], 3);
end
figure;
imshow(maxG);
title('convoluted image');
rt = fix(maxG);
[M,N] =size(rt);
cmtx = zeros(256,256);
for m = 1:M-1
for n = 1:N-1
cmtx(rt(m,n)+1,rt(m,n+1)+1) = cmtx(rt(m,n)+1,rt(m+1,n+1)+1) + 1;
end
end
scmtx = sum(cmtx(:));
prob = cmtx/scmtx;
emax = -100;
for i=1:255
probA = 0;
probC = 0;
subProbA = prob(1:i,1:i);
probA = sum(subProbA(:));
HA(i) = -0.5*(probA*log2(probA+0.0000001));
subProbC = prob(i+1:256,i+1:256);
probC = sum(subProbC(:));
HC(i) = -0.5*(probC*log2(probC+0.0000001));
e1(i) = HA(i) + HC(i);
if e1(i) >= emax
emax = e1(i);
tt1 = i;
end
end
figure;
imshow(e1(i));
and my image for thresholding is (this image is the output of convolution)
%
  7 Kommentare
Image Analyst
Image Analyst am 29 Nov. 2013
I don't know what you did, but if you fixed it, then you are doing the right thing.
Priya Natarajan
Priya Natarajan am 23 Dez. 2013
since the values are in double try converting the output to uint8 im2uint8(image) or use mat2gray(image).

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Image Analyst
Image Analyst am 25 Nov. 2013
Evidently no pixels are above your threshold. What is the threshold that your code chose?
  3 Kommentare
Image Analyst
Image Analyst am 26 Nov. 2013
What you posted seems to start past the beginning of your code. Please attach your m-file.
vidya
vidya am 27 Nov. 2013
sir i have pasted my m-file code

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Images finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by