フィルターのクリア

can you explain this code?

4 ビュー (過去 30 日間)
MARIYA DAVIS
MARIYA DAVIS 2016 年 2 月 20 日
コメント済み: Reyhaneh ST 2021 年 5 月 21 日
%Lung Mask Creation
croped = [];
croped = i(10:end-10,10:end-10) ;
figure(2)
subplot(221);imshow(mat2gray(croped));title('Croped Image');
binaryImage = croped < 120;
subplot(222),imshow(binaryImage, []),title('Original Binary Image');
se = strel('disk',6);
lungMask = zeros(m,n);
lungMask(10:end-10,10:end-10)= imclose(binaryImage,se);
subplot(223);imshow(lungMask);title('Lung mask');

回答 (1 件)

Stalin Samuel
Stalin Samuel 2016 年 2 月 20 日
croped = [];%empty matrix created
croped = i(10:end-10,10:end-10) ;% we going to crop first 10 rows and and 10 columns of the image
figure(2)
subplot(221);imshow(mat2gray(croped));%croped region displayed
title('Croped Image');
binaryImage = croped < 120;%binaryImage contains pixel value less than 120 from the croped image
subplot(222),
imshow(binaryImage, []),%binary image displayed
title('Original Binary Image');
se = strel('disk',6); %Create a disk-shaped structuring element
lungMask = zeros(m,n);
lungMask(10:end-10,10:end-10)= imclose(binaryImage,se);%se shape fills the gap with structuring element
subplot(223);
imshow(lungMask);
title('Lung mask');
  2 件のコメント
Stalin Samuel
Stalin Samuel 2016 年 2 月 20 日
Reyhaneh ST
Reyhaneh ST 2021 年 5 月 21 日
Hi
I want to use this code to create a lungmusk, but i'm get this error!
can you say me what should i do?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeCode Generation, GPU, and Third-Party Support についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by