EnSpec / hytools

Hyperspectral image processing library
GNU General Public License v3.0
56 stars 25 forks source link

TOPO correction returns noise #12

Open jantin1 opened 2 years ago

jantin1 commented 2 years ago

I am trying to correct an aerial hyperspectral image topographically. I have a DEM acquired in the same time as the image and with the same spatial resolution and coverage. I have created slope and aspect maps and calculated solar angles and fed the whole package to hyTools. I used modified scripts from this github to create a config .json and to perform the correction. Nevertheless the result of the processing is colorful noise, which looks like it has nothing to do with the HS image or the DEM. What do I do wrong to get this kind of result? Is there some setting or input I forget or don't know about? Attached is the image of my product. I work on PopOS flavour of Ubuntu. image

adamchlus commented 2 years ago

It’s difficult to diagnose the issue from the screenshot alone, but it looks as though there is an issue with the interleaving of the dataset(s). I would recommend double-checking the data by visually inspecting all of the input images as well as ensuring the ancillary datasets are in the correct units, see below (ignore unused bands):

       1) path length (sensor-to-ground in meters)
       2) to-sensor-azimuth (0 to 360 degrees clockwise from N)
       3) to-sensor-zenith (0 to 90 degrees from zenith)
       4) to-sun-azimuth (0 to 360 degrees clockwise from N)
       5) to-sun-zenith (0 to 90 degrees from zenith)
       6) solar phase (degrees between to-sensor and to-sun vectors in principal plane)
       7) slope (local surface slope as derived from DEM in degrees)
       8) aspect (local surface aspect 0 to 360 degrees clockwise from N)
       9) cosine i (apparent local illumination factor based on DEM slope and aspect 
jantin1 commented 2 years ago

Thank you for the reply. My ancillaries (terrain slope and aspect, solar azimuth and zenith) are all in radians as this is what your scripts require. Should they be recalculated to degrees?

adamchlus commented 2 years ago

Yes, the angles in the ancillary files should in degrees, however any angles in the config file should be specified in radians.