Grayscale to Matrix conversion
16 次查看(过去 30 天)
显示 更早的评论
Hi everybody,
is there a way to convert a grayscale map to a matrix? i'm able to realize the opposite operation but i've no idea on how to do this.
Thanks
1 个评论
Image Analyst
2011-10-20
What do you mean by "map"? Do you mean image, or do you mean lieterally a map, like a photo of a road map or something? What are you starting with? A grayscale image? Well that is already a matrix so there's nothing to do.
回答(3 个)
Walter Roberson
2011-10-20
You can convert it to a grayscale truecolor matrix by using
RGB = cat(3,Grey,Grey,Grey);
If you are hoping to go from a grayscale matrix to a full-color matrix, then you cannot do that without additional information. A particular grayscale value is a projection from a whole ellipsoid of RGB color combinations.
0 个评论
Dakshayani Virodhi
2020-11-23
As i'm working on matlab and i'm new to this...so please can u post the code for greyscale to matrix conversion....
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!