How could I add colors to regions in a global map?

1 回表示 (過去 30 日間)
Robert
Robert 2018 年 10 月 21 日
回答済み: Image Analyst 2018 年 10 月 21 日
Hi,
Wondering if is an easy and quick way to add colors to regions in a global map (matrix)?
Like this...(attached figure).
I would like to make a "mask map" with different numbers for the regions (colors) (e.g. South Pacific = 1, North Pacific = 2, etc) and then extract from a global map (matrix) the values for South Pacific = 1, North Pacific =2, etc.
In this case, the global map is a matrix with ocean temperature data.
  1 件のコメント
jonas
jonas 2018 年 10 月 21 日
編集済み: jonas 2018 年 10 月 21 日
If you can define polygons for the different regions, then yes. You can probably find free shapefiles online.

サインインしてコメントする。

採用された回答

Image Analyst
Image Analyst 2018 年 10 月 21 日
If you have an image where each region is separated by solid black lines, you can identify each region with bwlabel(), then use label2rgb() to make a colored image
labeledImage = bwlabel(binaryImage);
rgbImage = label2rgb(labeledImage, yourColorMap);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGeodesy and Mapping についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by