how can I make the vascular structures in the retina image incisively and clearly in image processing?
1 view (last 30 days)
Show older comments
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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1657751/Output%20image.png)
0 Comments
Answers (1)
Image Analyst
on 2 Apr 2024
See this File Exchange entry:
2 Comments
Image Analyst
on 3 Apr 2024
Not sure I understand your comment, but I think COSFIRE filters would be a "new thing" for you that you could try.
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!