Convert matrix to image and image to matrix
6 views (last 30 days)
Show older comments
Hi, I have a matrix with values between 1 - 10, and I would like to transform that in a kind of image.
and after that, I would like transform the image into the same previous matrix.
Could someone help me?
0 Comments
Answers (1)
Walter Roberson
on 9 Nov 2016
AsImage = uint8(YourMatrix .* (255/10));
BackAsMatrix = double(AsImage) .* (10/255);
2 Comments
See Also
Categories
Find more on Convert Image Type in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!