Effacer les filtres
Effacer les filtres

imshow a 55*55*2 matrix

1 vue (au cours des 30 derniers jours)
talayeh ghodsi
talayeh ghodsi le 6 Déc 2020
Modifié(e) : Image Analyst le 6 Déc 2020
hi everyone
I have a 55*55*2 matrix which appears as the photo attached. hao can i imshow it? i need to save the result as an image

Réponses (1)

Image Analyst
Image Analyst le 6 Déc 2020
Modifié(e) : Image Analyst le 6 Déc 2020
Try this:
[rows, columns, slices] = size(m);
m8 = uint8(255 * mat2gray(m)); % Convert to 0-255;
blackImage = zeros(rows, columns, 'uint8'); % Create an invisible image for the blue channel.
% Create an RGB image with slice 1 in red, slice 2 in green, and blue as invisible.
rgbImage = cat(3, m8(:, :, 1), m8(:, :, 2), blackImage);
imshow(rgbImage, 'InitialMagnification', 1000);
axis('on', 'image')
impixelinfo; % Let user mouse around and see values.
Also see attached demo.

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