how can I make the vascular structures in the retina image incisively and clearly in image processing?

19 次查看(过去 30 天)
How can I make the vascular structure on the retina image more continuous and distinct?
% in R, the feature contrast is low, but the spot and border contrast is high.
% in G, the feature contrast is high and the spot contrast is low.
inpict = imread('4bcee3cbe232.png');
resized_img=imresize(inpict, [512,512]);
imshow(resized_img);
% split the image channels
[R,G,~] = imsplit(resized_img);
% get a mask for the black border area
bordermask = imfill(R>30,'holes'); % everything that's not the border
bordermask = ~imerode(bordermask,ones(3));
imshow(bordermask);
% get a mask for the edge of the spot
fg = R<220; % everything that's not the spot
fg = bwareafilt(fg,1); % get rid of any specks
spotedges = bwperim(fg); % get the edge regions
spotedges = imdilate(spotedges,ones(3)); % dilate the mask as needed
imshow(spotedges);
% get a edge map of G
sigma = 1;
fk = fspecial('log',[1 1]*2*ceil(4*sigma)+1,sigma);
fgedges = imfilter(G,fk,'symmetric');
fgedges = mat2gray(fgedges); % normalize
% get rid of unwanted features
fgedges = fgedges-spotedges-bordermask;
imshow(fgedges)
%Finding threshold-binarization
threshold=graythresh(fgedges);
binarize_img=imbinarize(fgedges, threshold);
imshow(binarize_img), title 'Binarization';
%Noise removal
ortalama_filtre = fspecial('average', 5);
noise_removal = imfilter(binarize_img, ortalama_filtre);
imshow(noise_removal),title 'Average filtering noise removal';
%Noise removal
ortalama_filtre = fspecial('disk', 3);
noise_removal2 = imfilter(I_eroded, ortalama_filtre);
imshow(noise_removal2),title 'Average filtering noise removal2';
Output image

回答(1 个)

Image Analyst
Image Analyst 2024-4-2,17:49
  2 个评论
Senanur
Senanur 2024-4-2,21:58
Actually I want to new things so I just want to your suggestion about how can I do good image processing. So I ask part of a code or a function.

请先登录,再进行评论。

Community Treasure Hunt

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

Start Hunting!

Translated by