To remove blood vessel [closed]

You could do something like this:

A = imread ('tFKeD.jpg');

C=bwlabel(A);
IM2 = imcomplement(C); % // invert the image so that your objects are 1
se = strel('diamond',3); % // Create a morphological object
BW2 = imdilate(IM2,se);  
L=bwlabel(BW2); % // Label your objects

E = regionprops(L,'area'); % // Get the respective area
Area = cell2mat(struct2cell(E)); % // Convert to a matrix
[~,largestObject] = max(Area); % // Find the one with the largest area
vessel = L==largestObject; 
imshow(vessel)

enter image description here

Leave a Comment