How to convert an array to an image?
显示 更早的评论
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
采纳的回答
更多回答(2 个)
Fatih Sandayuk
2019-12-28
0 个投票
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 个评论
Walter Roberson
2019-12-28
You might have accidentally typed unit8 instead of uint8
类别
在 帮助中心 和 File Exchange 中查找有关 Convert Image Type 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!