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.
Image Analyst
Image Analyst 2024년 4월 3일 2:21
Not sure I understand your comment, but I think COSFIRE filters would be a "new thing" for you that you could try.

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by