Steve on Image Processing with MATLAB

Image processing concepts, algorithms, and MATLAB

上坡区域– Plateau processing

[NOTE: After I originally wrote this post about handling plateaus, I discovered problems with the method, so I am no longer using it. I revisited the plateau issue in a以后发布。-se]

今天我将跟inue thinking about plateaus in a DEM and what they mean for calculating pixel flow. Here's a very tiny portion of my DEM array, just northwest ofNorth Pond

a = [120 118 123;120 118 125;119 119 126]
a = 120 118 123 120 118 125 119 119 126

中心像素没有下坡邻居,所以我称之为plateau pixel。No matter that it's a very small plateau; we can't compute a pixel flow direction for it, and that will cause problems when we get around to computing upslope area.

图像处理中用于处理高原的一种技术称为较低的完整转换。Alower complete imageis one where the only pixels having no downhill neighors are the pixels belonging to regional minima. Roughly speaking, the lower complete transformation operates by elevating plateau pixels. Pixels further from the plateau edge get elevated more. Of course, pixels uphill from the plateau need to be elevated as well so that they remain uphill. I have read about this technique but have never implemented it myself. (For more information, I recommend P. Soille,Morphological Image Analysis: Principles and Applications,第二版,施普林格,2003年,第222-226页。

I'm going to use a different technique, one that's based on the algorithm in the Image Processing Toolbox functionroifill。该函数通过从该区域周围的像素平滑插值来填充特定区域中的像素。它通过解决稀疏的线性系统基于以下概念,即在填充的输出中,填充区域中的每个像素等于其北,东,南和西邻居的平均值。(这是一种有趣的方法。也许这将是未来的博客主题。)

Here's the example (slightly modified) from theroifill文档:

I = imread('eight.tif'); imshow(I) c = [222 272 300 270 221 194 222]; r = [21 21 75 121 121 75 21]; holdplot(c,r,'r','LineWidth',4)
j = roifill(i,c,r);imshow(j)

And here's whatroifilldoes to our tiny snippet from the DEM:

mask = true(3,3);b = roifill(a,面具)
B = 120.0000 118.0000 123.0000 120.0000 120.5000 125.0000 119.0000 119.0000 126.0000

You can see that the center pixel has been replaced by a new value, and that the center pixel now has a downhill neighbor.

这是一个更大的例子,两个中心像素没有下坡邻居:

A2 =池塘(15:17,19:22)
a2 = 116 116 116 120 117 115 115 117 119 115 115 116

And the output ofroifill

mask2 = true(3, 4); b2 = roifill(a2, mask2)
B2 = 116 116 116 120 117 116 116 117 119 115 115 116

好吧,两个中心像素现在有下坡的邻居,但是等等!(1,2)像素不再有下坡邻居!好的,是时候''我并没有真正期待这是一个问题。我必须考虑一下。我的第一个反应是:这是可以的,因为我们可以使用原始的,未修改的DEM值来计算Nonplateau像素的像素流。我们只需要修改的DEM值即可计算高原像素的像素流。但是我会睡在上面。

假设我可以成功解决这个问题,我们可以使用roifill计算Midplateau像素的像素流方向。但是,对于是区域最大值或区域最小值的高原像素,这对我们无济于事。下周我会弄清楚该怎么办。




Published with MATLAB® 7.4

|
  • print
  • send email

注释

To leave a comment, please click这里to sign in to your MathWorks Account or create a new one.