I have this two images and I want to merge them in order to receive somthing like the third image can someone help me?

3 件のコメント

Walter Roberson
Walter Roberson 2022 年 1 月 10 日
User removed files that were necessary to understand the question.
Fortunately, you can use the filenames from my post to get two of them back... at least for now.
Inês
Inês 2022 年 1 月 10 日
I don't now what happened but I attached the photos again sorry if I caused any trouble.
Rena Berman
Rena Berman 2022 年 1 月 25 日

(Answers Dev) Restored edit

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

 採用された回答

Walter Roberson
Walter Roberson 2022 年 1 月 10 日

1 投票

orig_filename = 'https://www.mathworks.com/matlabcentral/answers/uploaded_files/858715/CXR00000001.png';
roi_filename = 'https://www.mathworks.com/matlabcentral/answers/uploaded_files/858730/CXR00000001_lungs.png';
orig_image = imread(orig_filename);
roi_image = imread(roi_filename);
if ndims(roi_image) > 2; roi_image = rgb2gray(roi_image); end
roi = imbinarize(roi_image);
roi = repmat(roi, 1, 1, size(orig_image,3));
masked_image = zeros(size(orig_image), 'like', orig_image);
masked_image(roi) = orig_image(roi);
imshow(masked_image)

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeConvert Image Type についてさらに検索

質問済み:

2022 年 1 月 10 日

編集済み:

2022 年 1 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by