필터 지우기
필터 지우기

Why does my screen go black?

조회 수: 2 (최근 30일)
Matthew Worker
Matthew Worker 2021년 11월 19일
편집: John Kelly 2021년 12월 8일
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
Rena Berman
Rena Berman 2021년 12월 8일
(Answers Dev) Restored edit

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2021년 11월 19일
Why not simply use imfill()???
nFilled = imfill(n, 'holes');

카테고리

Help CenterFile Exchange에서 Explore and Edit Images with Image Viewer App에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by