Effacer les filtres
Effacer les filtres

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

3 vues (au cours des 30 derniers jours)
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

Réponses (1)

Image Analyst
Image Analyst le 2 Avr 2024
  2 commentaires
Senanur
Senanur le 2 Avr 2024
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.
Image Analyst
Image Analyst le 3 Avr 2024
Not sure I understand your comment, but I think COSFIRE filters would be a "new thing" for you that you could try.

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by