Topic: More blurred image questions


I'm trying to use COSI-Corr to look at movement along slow moving landslides in Central California. 

I have NAPP aerial photographs (scanned at 14 microns) from 1989, 1994, and 2002.  I also have a LiDAR DEM (gridded to 0.5 meters, flown by NCALM for the EarthScope project) which covers a portion of the study area.   I've been using a hillshade from the LiDAR as a master image to set ground control points and rectify the aerial photo.  I've typically been using 30 GCP for my orthorectification.

I've been running into some problems which I think are due to the fact that my LiDAR does not completely cover the area I'm interested in using COSI-Corr over. 

Here's a snapshot of my DEM:


The landslide I'm interested in is ~90% contained within the LiDAR data, with just the toe cut off.  In order to avoid problems with outliers/negative values/etc, I've set all the no data points in my DEM to approximately the mean value of the DEM.

When I attempt to resample my NAPP image using the mapping matrices from the full extent of the LiDAR above, I get a rather blurry image:

(note the hdr file for my resampled image has the line: Kernel: Sinc Sinc Size : 25 Distance Max dx=31.4428 dy=10.5500)

I've done this same procedure on other nearby landslides and had only slightly blurred images:
Here's the other DEM:

And the resulting resampled image (Kernel: Sinc Sinc Size : 25 Distance Max dx=3.1748 dy=5.8180):

So, I'm not really sure why this time around it turned out significantly more blurry than previously, but (following instructions from the above post) I attempted to solve the bluriness problem by computing the resampling distances on a subset of the mapping matrices.  This worked to create a much crisper image (dx=1.8044 dy=1.1025), however I noticed that the areas of the image within the extent that I selected for the the subset of the mapping matrices seems to be better rectified than other parts of the image (I've observed trees on stable ground offset by 1-5 meters between the LiDAR and resampled image).  Given the geometry of the landslide I'm looking at, the extent of the LiDAR, and the fact that (as far as I can tell) one must use a rectangle to define the subset area, I'm not able to choose a subset such that the entire landslide area and immediate surrounding terrain is included within the subset. 

So I guess I have a few questions:
1.  Does it seem likely that the blurry resampled images are due to the inclusion of no data regions (replaced by mean values of elevation) in the DEM?  (This is what I've assumed is causing the problem, but I don't really know)

2.  If so, is there a way to define a polygon as the subset area to compute the resampling distances over instead of a rectangle.  This would allow me to select the entire landslide without including any no data values. 

3.  Does it seem likely that the offset I observed in my non-blurry resampled image is due to the fact that it's outside the spatial extent of the subset of the mapping matrices selected?  Or are there other factors which could explain why some parts of my image are near perfectly rectified (the LiDAR and resampled image match) and others are slightly offset?

Please let me know if I need to clarify any of these questions.

Many thanks,


Re: More blurred image questions

Hi Joel,

This pb is due to very large outliers in your DEM. Typically, you don't want the resampling distances to be larger than a few units, the best case being around 1.
To see where the DEM fails, you can look at the derivative of your ortho-rectification matrices. To do so, you can apply a simple filter in ENVI:
Filter -> convolution and morphology. Select a convolution 3x3 filter and input the following kernel:
0 0 0
-0.5 0 0.5
0 0 0

for a derivative in the X direction. You can apply this filter to the columns band of the ortho-mapping file. The large values will be where the DEM fails to deliver acceptable results. Errors in the DEM gridding will also become obvious. Depending on where the DEM fails, then we can imagine several solutions to fix the pb.

Sorry for the inconvenience. In the future, we'll propose an adaptive resampling version, which will isolate this pb.

Let me know,



Re: More blurred image questions


Thanks for the advice.  I did a "Convolution: High Pass" filter on my mapping matrices as you suggested.  Here's the resulting image and histogram:


It's a bit hard to see, but in the main image you can see a wavy line along which the shade of gray changes, this represents the boundary between the no data (left side) and LiDAR (right side). 

Below I've changed the color stretch to highlight this difference:
The southwest/northeast trending lines in the center of the image are also no data values associated with being near the edge of the DEM, but I previously used a fill sinks command in ArcGIS to give these more realistic values.

From looking at the histogram and these images, it doesn't appear to me that there are any extremely large values suggesting DEM failure.  Maybe I'm looking at the wrong thing or in the wrong spot?



Re: More blurred image questions

Hi Joel,

I don't think you used the kernel I suggested, your image doesn't look like a derivative,



Re: More blurred image questions

Opps.  I had a typo in my kernel and was off by a sign.

Here's the derivative with histogram:


It looks like most of my high values are coming from the edge of the DEM.  Since I placed a constant value for elevation in the no data regions, there looks to be a steep slope between the LiDAR and no data values. 

Any ideas on the base way to solve this? 

I'm considering trying to take a 10 m DEM, subsample it down to 0.5 m to match my LiDAR, and use that to fill in all the no data values...



Re: More blurred image questions

Hi Joel,

If you can't interpolate the DEM values more rigorously, you'll have to fix the resampling distances manually (you can do that in the resamping options of COSI-Corr). In your derivative image, search for the maximum value that looks to have 'physical meaning', i.e., that is not located on a DEM edge. The x-axis of your histogram is hard to read, but I'm guessing that this value should be around 1.5 or 2? That will give you an approximate "resampling distance" for the x direction.

Then, use the Row band of the ortho-mapping and apply a y-derivative to it:
0 -0.5 0
0 0 0
0 0.5 0

And do the same procedure to get the Y resampling matrix.

We have in-house an adaptive resampling algorithm we don't distribute yet. That would solve you pb, we could try it if needed.



Re: More blurred image questions

Hi Joel,

Beyond the blurring pb, since you have lots of negative values in your ortho-mapping derivative, it means the holes in your DEM are creating artificial occlusions in your ortho-images (creating artificial walls). Thus, even if you solve the resampling/blurring pb, your images will still look funny on the areas you zoomed-in above. If you actually care about these areas in your processing, you should interpolate your DEM more rigorously, it's the only solution.