Images merging using matlab
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposta accettata
Walter Roberson
il 10 Gen 2022
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 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Image Processing Toolbox in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!