Info
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
Create an image using and displaying only specific types.
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (0)
Questa domanda è chiusa.
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!