Why does my screen go black?

1 vue (au cours des 30 derniers jours)
Matthew Worker
Matthew Worker le 19 Nov 2021
Modifié(e) : John Kelly le 8 Déc 2021
My region filled image and skeletonized image just appears black
I fill in all the bones using the function below
%% 3. Region Filling
%a. Region filling the “hand.jpg”. You should fill all bones.
hand = imread('hand.jpg');
n = imbinarize(hand);
sq = ones(3,3);
nb=n&imerode(n,sq);
nf=regfill(nb,[227,178],sq); %regfill fxn
%the centre of the image is [227,178]
figure
subplot(1,3,1);
imshow(n)
subplot(1,3,2);
imshow(mat2gray(nb))
subplot(1,3,3);
imshow(mat2gray(nf))
%b. Make Skeletons of filled hand image. You can use proper structuring element.
nk=imskel(nf,sq); %imskel fxn
figure
imshow(nk)
  1 commentaire
Rena Berman
Rena Berman le 8 Déc 2021
(Answers Dev) Restored edit

Connectez-vous pour commenter.

Réponses (1)

Image Analyst
Image Analyst le 19 Nov 2021
Why not simply use imfill()???
nFilled = imfill(n, 'holes');

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