Grayscale to Matrix conversion

6 ビュー (過去 30 日間)
Fabio
Fabio 2011 年 10 月 20 日
回答済み: Dakshayani Virodhi 2020 年 11 月 23 日
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
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
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.

Fabio
Fabio 2011 年 10 月 21 日
Thank for the answer but i probably didn't explain my problem. I just wanted to get a matrix of data from the image. I solved the problem with the 'getimage' function. Now i have one other problem.. in my figure i've several axes and i want to select just some of them according to their title. i can get axes handles with
findobj(figureHandles,'type','axes');
or
findobj(figureHandles,'children');
but this way i get all the handles. I just want some of them (those with the right title). Is there a way?

Dakshayani Virodhi
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....

カテゴリ

Help Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by