How to convert an array to an image?
17 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Jahnavi Mrudula Mudduluru
el 4 de Mzo. de 2018
Comentada: Walter Roberson
el 28 de Dic. de 2019
I have a 1*784 matrix, I need to convert it to a 28*28 image, can anyone please tell me how to do it?I used reshage, imagesc for this, but the picture doesn't seem right, any suggestions would be a great help. I'm attaching a file which contains X_train which contains pixels of 12,000 images as row vectors, I'm supposed to study the 12,000th image, it is a 9, but I'm getting some weird shape.
Thank You
0 comentarios
Respuesta aceptada
Walter Roberson
el 4 de Mzo. de 2018
images = permute(reshape(uint8(X_train),12000,28,28),[3 2 1]);
image(images(:,:,12000)); colormap(gray(256));
0 comentarios
Más respuestas (2)
Fatih Sandayuk
el 28 de Dic. de 2019
hello!
how did you studied the 12 000th picture? I have the same Problem, but matlab says taht unit 8 is not defined.
THANK YOU!
1 comentario
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!