when i remove the optic disk can i remove blood vessels from this image.if possible how i can plz help me.

3 views (last 30 days)
for removing of optic disk i used this code clear all clc % Read retinal image image=imread('image1.png'); image=imresize(image,[376 520]);
% image(:,:,1) = red component, image(:,:,2) = green component, image(:,:,3) = blue % Assigning green component to green green = image(:,:,2); % Extract green component imshow(green);
% Morphological opening using the octagon structuring element s1 = strel('octagon',9); imc = imclose(green,s1); imshow(imc)
imc = double(imc); fun = @var; im2 = uint8(colfilt(imc,[11 11],'sliding',fun)); imshow(im2);
th = im2bw(im2,0.7);
s2 = strel('disk',10); d1 = imdilate(th,s2); %dilation imshow(d1); e1 = imerode(d1,s2); %erosion imshow(e1);
canny = edge(uint8(e1),'canny'); imshow(canny)
g = rgb2gray(image); % Convert RGB image to grayscale g1 = imadjust(g); % Adjust image intensity values imshow(g1);
% Detection of Optical Disk max_Ie = max(max(g1)); % Finding maximum value on the image [r, c] = find(g1 == max_Ie); Rmed = median(r); Cmed = median(c); R = floor(Rmed); C = floor(Cmed); % Mask IeSizeX = 376; IeSizeY = 520; radius = 62; [x,y] = meshgrid(1:IeSizeY, 1:IeSizeX); mask = sqrt((x-C).^2 + (y-R).^2) <= radius; imshow(mask)
% Optical Disk Removal ex2 = imsubtract(e1, mask); imshow(ex2); for removing of blood vessels i used this code clear all; close all; clc; I = imread('image1.png'); I = imresize(I,[500 700]); greenc = I(:,:,2); % Extract Green Channel ginv = imcomplement (greenc); % Complement the Green Channel adahist = adapthisteq(ginv); % Adaptive Histogram Equalization se = strel('ball',8,8); % Structuring Element gopen = imopen(adahist,se); % Morphological Open godisk = adahist - gopen; % Remove Optic Disk
medfilt = medfilt2(godisk); %2D Median Filter background = imopen(medfilt,strel('disk',15));% imopen function I2 = medfilt - background; % Remove Background I3 = imadjust(I2); % Image Adjustment
level = graythresh(I3); % Gray Threshold bw = im2bw(I3,level); % Binarization bw = bwareaopen(bw, 30); % Morphological Open figure,imshow(bw); how it possible in one image as result it show me only exudate and hemorrhages plzzzzzzzzzzzzz help me.

Answers (1)

KALYAN ACHARJYA
KALYAN ACHARJYA on 7 Jul 2017
Edited: KALYAN ACHARJYA on 7 Jul 2017
Yes, Using Spatial filtering and thresholding, There is no direct link between the OD and vessels, you should do both the cases separately.

Community Treasure Hunt

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

Start Hunting!