Azzera filtri
Azzera filtri

How to create MASK from "image.tiff"?

7 visualizzazioni (ultimi 30 giorni)
Hi Everybody,
I tried to MASK the shapefile of my study area but the matrix of the MASK is only NaN data. so please I need your help. I have attached the script_MASK.
Thank you in advance.

Risposta accettata

Image Analyst
Image Analyst il 3 Mag 2016
What are the values of your tiff file? It's probably in the range 0-255 so most values will be set to nan because you set all values more than 1 to nan. You might want to set the to nan only if they're outside the range 0-255, or use im2double() to change the range of your image from 0-255 to 0-1.
  3 Commenti
Image Analyst
Image Analyst il 3 Mag 2016
If you pass an array into mat2gray() it will scale it to the 0-1 range.
reyadh Albarakat
reyadh Albarakat il 3 Mag 2016
Thank you so much
I have question I want to save the output images.tiff in same name of the original images. suppose the names of files are 1981_07_15.n07-VI3g and 1981_07_16.n07-VI3g respectively SO how can I save outputs in same names of inputs.
Thank you
if true
for i=1:length(Ii)
LATLIMS=[30.952 32.01];
LONLIMS=[47.09 47.818];
m_proj('Equidistant Cylindrical','lon',LONLIMS,'lat',LATLIMS);
% a=fliplr(a);
shading flat;

Accedi per commentare.

Più risposte (0)


Scopri di più su Read, Write, and Modify Image in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by