GERSL / Fmask

The software called Fmask (Function of mask) is used for automated clouds, cloud shadows, and snow masking for Landsats 4-8 and Sentinel 2 images.
MIT License
168 stars 57 forks source link

missing mapping toolbox (Landsat 8 Level 1 collection 1 product) #15

Closed SorourMo closed 4 years ago

SorourMo commented 4 years ago

Hello, Thank you for releasing Fmask 4.2 version. When I run autoFmask.m on a Landsat 8 Level 1 collection 1 product (sceneid = LC08_L1TP_034037_20160520_20170223_01_T1), I get the following error:

Fmask 4.2 start ...
Cloud/cloud shadow/snow dilated by 3/3/0 pixels.
Cloud probability threshold of 17.50%.
Load or calculate TOA reflectances.
Error using GRIDobj (line 299)
GRIDobj cannot read the TIF-file because it does not have a tfw-file.

Error in nd2toarbt (line 575)
    trgt = GRIDobj(fullfile(path_top,n_B3.name)); clear n_B3;

Error in LoadData (line 101)
        [Temp,data,trgt,dim,ul,bbox,zen,azi,zc,satu_B1,satu_B2,satu_B3,resolu]=nd2toarbt(path_data,main_meta.name);

Error in autoFmask (line 114)
    [data_meta,data_toabt,angles_view,trgt] = LoadData(path_data,sensor,InputFile,main_meta);

Error in autoFmaskBatch (line 11)
        autoFmask();% 4.0

I followed the lines of code and finally got to this point that the problem is that the code cannot read *.TIF files for generating tgrt properly using mapping toolbox and instead tries to read tfw files, which do not exist. I guess the main problem is at line https://github.com/GERSL/Fmask/blob/db9f01f262e69b5b4efc9fdbc65182a3bec72587/GRIDobj.m#L259 or [DEM.Z, DEM.refmat, ~] = geoimread(filename); Both geotiffread and geoimread give me the above-mentioned error. However, I do not see any geotiffread.m between the files. Here is what I get for ME structure when I use geoimread(filename):

matfmascr

Would you please help me to fix this error?

Also, it would be great if you could explain a bit more on how to use AuxiData folder as axuilary inputs of Fmask 4.2. Thanks

SorourMo commented 4 years ago

For future reference: I installed the mapping toolbox https://www.mathworks.com/products/mapping.html and the problem solved.