how to display an image from a matrix in matlab?

Hello, I am looking for the matlab function that allows me to transfer a confusion matrix has a picture, thank you

Antworten (2)

Image Analyst
Image Analyst am 24 Dez. 2012

2 Stimmen

Use image(), or imshow() (in the Image Processing Toolbox). If it's a floating point image, you need to use imshow(yourImage, []).

3 Kommentare

BANI tita
BANI tita am 24 Dez. 2012
thank you for your answer but I'm looking to transform a confusion matrix to an image, and function you my data is just to display an image.
There is no difference to MATLAB between an "image matrix" and a "data matrix". It is all just data. Use imagesc(YourMatrix) or imshow(YourMatrix,[])
BANI tita
BANI tita am 25 Dez. 2012
thank you

Melden Sie sich an, um zu kommentieren.

Maurizio De Pitta'
Maurizio De Pitta' am 25 Dez. 2012

0 Stimmen

imagesc(yourmatrix)
will solve your issue.
Cheers,
M

1 Kommentar

By default, imagesc applies some weird colormap that's almost never what you want. Then you have to apply the correct colormap, like gray or whatever. That's why I avoid it and use imshow instead, which applies no colormap - it's just the normal gray scale colormap for a gray scale image.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Convert Image Type finden Sie in Hilfe-Center und File Exchange

Tags

Gefragt:

am 24 Dez. 2012

Community Treasure Hunt

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

Start Hunting!

Translated by