필터 지우기
필터 지우기

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 CenterFile Exchange에서 Geodesy and Mapping에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by