Steve on Image Processing

March 30th, 2007

Upslope area - Introduction

A long time ago, blog reader Brendon asked me if I knew of a way to compute something called upslope area in MATLAB. I responded that I had never heard of that before. Brendan explained that it was a measurement related to digital elevation models (DEMs). The upslope area of a point (pixel) is the total area on the terrain above that point that drains through it.

That sounded like an interesting algorithm development problem to me, so I did a little research and found some suitable-looking algorithms. I even partially implemented one. But I never did find the time to work out all the different pieces, so I never got around to writing about it here.

I finally decided recently that I just need to dive in and try it. And I'm going to do it in front of you readers. I've picked a paper that looks promising (by David Tarboton of the Utah Water Research Laboratory, Utah State University), and for the next few weeks I'm going to try to turn the methods described in this paper into a working MATLAB implementation.

We're going to get into flow direction computations, how to deal with plateaus, and maybe (if I'm guessing right) even some sparse linear algebra.

Next up: the D∞ flow direction method.

2 Responses to “Upslope area - Introduction”

  1. Qi Chen replied on :

    look forward to it

  2. Wolfgang Schwanghart replied on :

    Steve,
    I am curious about your results. I have just submitted a flow accumulation and flow direction algorithm to the FEX, that routes across flats. I am very glad to hear that Digital Elevation Model analysis is pushed forward at Mathworks. Geoscientists will be delighted :-)

    Best regards,
    Wolfgang

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


Steve Eddins manages the Image & Geospatial development team at The MathWorks and coauthored Digital Image Processing Using MATLAB. He writes here about image processing concepts, algorithm implementations, and MATLAB.

  • murat: Hi Steve, I have an rgb image of a kind of cream and it contains some small black particles (black dots). In...
  • Steve: Ernest—Look at setting the FaceColor property. The code for setting that is shown on the page you asked...
  • Ernest Miller: Hi Steve, Understood. However, can you explain how to change the colors? Thanks, Ernest
  • Jan: Hi Steve Very useful code, yet what if I parts of my rotated+translated object are outside the original...
  • Steve: MoHDa—It might be possible. You’ll need to use one of the options that produces closed edge...
  • MoHDa: I have one question about the ROIPOLY: I have an image with stripes, I use the “edge” command for...
  • Steve: Shahn—My November 17, 2006 post shows you how to do it.
  • Steve: Kay-Uwe—Thanks for following up. I am planning to make it easier to use test directories in a package....
  • shahn: Hello Steve Instead of superimposing a star on the image to show the centroide. How would you superimpose a...
  • Kay-Uwe: Having TestSuite.fromPackag e() would be nice to have, but so far using simple “test” subdirs...

These postings are the author's and don't necessarily represent the opinions of The MathWorks.