Effacer les filtres
Effacer les filtres

How to Recognize and Detect the Vein Pattern in the image ?

7 vues (au cours des 30 derniers jours)
Ananthu Jayan
Ananthu Jayan le 9 Fév 2018
Commenté : Ananthu Jayan le 12 Fév 2018
The above image is obtained using an IR Camera using Near Infrared technology. I want to extract the veins in the image attached and then display it.The algorithm Followed so far is:
Kindly Support or give Suggestions to do it.
I have tried out the above algorithm as of my knowledge and am able to get an image as such given below:
The code I have written so far uses only direct methods and unaware of using multiple techniques in MATLAB, since am a beginer. Kindly help me with the code so that I can improve my output and learn more on MATLAB.
The code is as follows:
if true
% clc
%Remove items from workspace, freeing up system memory
clear all
%Remove figures
close all
%read image
img=imread('lab.jpg');
%display image
figure,imshow(img);
%convert image to grayscale
I=rgb2gray(img);
figure,imshow(I),title('Grayscale image');
%applying median filter to remove noise
K = medfilt2(I);
figure,imshow(K), title('median filtering');
%applying CLAHE
J = adapthisteq(I,'clipLimit',0.05,'Distribution','exponential');
figure,imshow(J), title('CLAHE');
%median filtering to remove the noise
K1 = medfilt2(J);
figure,imshow(K1), title('median filtering2');
%blurring images for accuracy
Iblur1 = imgaussfilt(K1,2);
figure,imshow(Iblur1), title('gaussian blurring');
%Adaptive thresholding
%T = adaptthresh(Iblur1, 0.7);
%BW = imbinarize(Iblur1,T);
%figure, imshow(BW), title('Adaptive threshold')
T1 = adaptthresh(Iblur1,0.5,'ForegroundPolarity','dark');
figure,imshow(T1), title('foreground');
BW = imbinarize(Iblur1,T1);
figure,imshow(BW), title('new thresholding');
%bw2 = imbinarize(K1,'adaptive','ForegroundPolarity','dark');
%figure, imshow(BW), title('Adaptive thresholding');
%morphological opening
se = strel('disk',5);
afterOpening = imopen(BW,se);
figure, imshow(afterOpening,[]), title('Morphological opening');
%eroding image
se1 = strel('line',11,90);
erodedBW = imdilate(afterOpening,se1);
figure, imshow(erodedBW,[]), title('dilated image');
%Morphological closing
%closeBW = imclose(afterOpening,se);
%figure, imshow(closeBW), title('Morphological closing');
BW2 = bwmorph(afterOpening,'skel',Inf);
figure, imshow(BW2,[]), title('Skeletonization');
BW3 = bwperim(afterOpening);
figure, imshow(BW3,[]),title('perimeter extraction');
C = imfuse(img,erodedBW,'blend','Scaling','joint');
figure, imshow(C), title('fusing images');
end
  2 commentaires
Jan
Jan le 10 Fév 2018
Moved from flag:
Ananthu Jayan wrote: I 'm a beginner and am working on this project. I have attached my code and the output that am getting in the image. Kindly give some suggestions to improve it as I guess this project has been tried out by many of them.
@Ananthu Jayan: Please use flags only to inform admins and editors about messages, which might conflict with the terms of use, e.g. by rudeness or spam. Thanks.
Ananthu Jayan
Ananthu Jayan le 12 Fév 2018
@Jan Simon, I am sorry that I used flag. I wanted a reply desperately, and that made me use a flag to get attention. I am sorry if it had other meanings. Kindly help me out with the solutions.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by