Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

regionprops function retrieving only small vein line instead of total vein pattern

2 vues (au cours des 30 derniers jours)
Balaji M. Sontakke
Balaji M. Sontakke le 13 Avr 2018
Clôturé : MATLAB Answer Bot le 20 Août 2021
clc; clear all;
chart = imread('202.bmp'); chart = gray2rgb(chart); bw = im2bw(imcomplement(rgb2gray(chart)));
imshow(bw) title('Grayscaled/Reversed/Binarized')
%Now that the axes are bordered in white, we can fill the image regions to create solid %regions of interest: filled = imfill(bw,'holes'); imshow(filled); title('All Regions Filled')
BW3 = bwmorph(bw,'thin',Inf); figure, imshow(BW3)
cc = bwconncomp(filled); stats = regionprops(cc,'Area'); A = [stats.Area]; [~,biggest] = max(A); filled(labelmatrix(cc)~=biggest) = 0;
imshow(filled); title('Axis mask')
bb = regionprops(filled,'BoundingBox'); %We'll use this later! bb = bb.BoundingBox;
chart(~repmat(filled,[1 1 3])) = 0; curveOfInterest = rgb2ycbcr(chart); curveOfInterest = curveOfInterest(:,:,2);
curveOfInterest = imextendedmax(im2double(filled),0.30,8); imshow(curveOfInterest) title('Binary Curves')
curveOfInterest = imdilate(curveOfInterest, strel('Disk',6)); curveOfInterest = bwmorph(curveOfInterest, 'skeleton', Inf); curveOfInterest = bwmorph(curveOfInterest, 'spur', 11); imshow(curveOfInterest)

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by