Remove shadow using using elevation information
By Antonio in ERDAS Software Forum
Can you please inform me how to remove the shadow using the elevation? I have the contours shapefile and a Landsat TM image. what would be the following steps for achieving this?
----------------------------------
You were sent this email because you opted to receive email notifications when someone created a new thread, or replied to a topic within this forum, ERDAS Software Forum.
To unsubscribe:
Re: Remove shadow using using elevation information
By Donn Rodekohr in ERDAS Software Forum
Antonio,
If by stating "removing shadows" you mean removing shadowed areas from consideration, we can do that. Revealing the features hidden by the shadows is not possible.
Be sure the contours shapefile has sufficient precision to compute the elevation at the same cell spacing as the Landsat TM image, i.e., 30 m. The contours need to be converted to a raster elevation data set (DEM). Be sure that the spatial coordinates for the shapefile are NOT geographic lat/long; they need to be a planar coordinate system of some sort, e.g., UTM. Ideally it should be the same coordinate, projection/datum/spheroid as the landsat image. Making the DEM can be done in a couple of ways:
-- Topo_to_Raster command in ArcGIS. This was developed in the 80's and produces "industry standard" elevation data. Be sure to specify 30m cell size.
-- Imagine :: Terrain :: Terrain Prep :: Surfacing Tool. Input your contour file, Click the Surface button and make it happen. I am unsure of the level of precision of the DEM product but it might be OK for finding shadows. Once again, be sure to specify 30 m cell size.
-- Geostatistics to Kriege the contours. This can get weird, but it is an option.
For the sake of argument, lets call the output of the elevation file exercise DEM1.img.
Next you need subset the DEM to match the area of the LandSat data. Use the SubSet tool and an Inquire Box set to the extent of the Landsat data to do this job. Product DEM_LS.img
Next, determine the date and time that the Landsat imagery was collected. You will probably have to read the Landsat metadata to get this but it is important to determine the sun angle. For the sake of argument, lets say the collection date was April 15, 10:45 a.m., 2010.
In Imagine, open a 3D viewer and load DEM_LS.img as the DEM file. You should get this green shaded thing showing the drainage structure of the DEM.
-- Click the Scene Tab :: Illumination :: Sun Position. This tool allows you to place the sun at the same position and angle at the date the data were collected.
-- Click the Advanced button. Aha! Enter the year, date, and time you want the sun to be positioned. It is a 24 hour clock so 10:45 would be entered as 1045. Click Apply.
-- The Azimuth, Ambiance, and elevation are set. WRITE these values down somewhere; or at least leave this window open so you can see the values.
-- Click the Terrain tab :: Shaded Relief. Input file is DEM_LS, output file is SHADOWS.img
-- Set the Azimuth, Ambiance, and elevation from the Sun Position values in the 3D view.
-- Click OK
SHADOWS.img now should be a gray scale image duplicating the shadows caused by the elevation. Note that if there is any striping or diagonal lines in the shadows, these are artifact errors from computing the DEM, oftentimes related to having too many significant digits in the elevation. If the errors are too egregious, you will have to recompute the DEM using a more appropriate radiometric resolution.
Now you have to determine what is shadow and what is not. the shaded relief image has values that range from 0.00 to 1.00.
Display SHADOWS in a 2D viewer. Roam to where you have some nice distinctive shadows on the screen.
-- Click Panchromatic tab :: Utilities :: Spatial Profile. Use this tool to determine the threshold value range of what is shadowed vs. what is lit. In this example the value I found was ~0.75, but it will be dependent upon the sun angle and brightness. WRITE this value down.
Now you have all the tools necessary to remove the areas from your Landsat image that are in shadows caused by elevation. I would write a simple masking model that would be something like this:
Input files: $n1_Landsat, $n2_SHADOWS
Function statement:
EITHER 0 IF ($n2_SHADOWS LE 0.75) OR $n1_Landsat OTHERWISE
Output file: Landsat_NOShade
The critical factor is determining the threshold point of shadows/lit. If the 0.75 values takes out too much area then increase it slightly (0.80) until you get acceptable results.
----------------------------------
You were sent this email because you opted to receive email notifications when someone responded to this thread.
By Antonio in ERDAS Software Forum
This is exactly what I was looking for. Thanks a lot Donn!