Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Create an image using and displaying only specific types.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello, I have an excel file that includes specific land types of Greece, and a tif image of Greece I want to Zoom a specific region in Greece and from all the land types that exist in the excel file, I would like to display only specific ones 10-30, and include them as a legend at the side of the figure.
So my code so far is:
[I,map1],imread('greece.tif');
Greece_Image=ind2rgb(I,map1);
Types=readtable('clc_legend.xls');
land_red=double(table2array(Types(:,10)));
land_green=double(table2array(Types(:,11)));
land_blue=double(table2array(Types(:,12)));
Region=Greece_Image(ceil(0.87*size(Greece_Image,1)):end,ceil(0,5**size(Greece_Image,1)):ceil(0.9*size(Greece_Image,1)),:);
figure;
imshow(Region);
title('Zoom');
xlabel('longtitude');
ylabel('latitude');
set(gca,'XTickLabel',[],'YTickLabel',[])
set(gcf,'ColorMap',a2);
p=colorbar('Location','WestOutside','Ytick',12:1:32,'YTickLabel',Region.textdata(12:1:34,4),'fontsize',5);
I tried this but on the figure it displays all the land types of all Greece, and the names of the lands are not visible.
Does anyone know how to fix it so it displays only the land types 10-30 with their names visible?Also If possible every bar to have the color of the land type that it represent.
0 Kommentare
Antworten (0)
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!