Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

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

2 Ansichten (letzte 30 Tage)
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)

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by