altitude, the function Æ(x, y) is a function of the altitude scalar field as well as of .... By deriving the secondary LMVs functions of the given order (the parent LMV) in ..... âx3 -. â3f. âxây2. ,. J = â3f. âxây2 G + 2. â2f. âxây (. ) â2f. ây2. âf.
57 Chapter five
Terrain skeleton and local morphometric variables: geosciences and computer vision technique Marián Jenčo, Jan Pacina and Peter A. Shary
5.1
Introduction
Valley and ridge lines that create the terrain skeleton are the significant elements of a topographic surface. They are composed of lines which pass through the lowest valley’s points and the highest points of ridges. These lines have on the real terrain the character of convergent or divergent flow-lines. Their determination is required when contour lines are constructed using surveying elevation points. Similarly in computer graphics, a three-dimensional object can be represented by a two-dimensional skeleton, called surface skeleton. Edge lines connecting points with maximum gradient and ridge and valley lines are the specific lines of any surface. From the third dimension point of view, we can suggest these lines to be the borders of inner geometrically homogenous areas. Cartography uses surface networks derived from the terrain skeleton for automated surface generalization through the process known as the homomorphic contraction. In the field of geosciences the terrain skeleton is very important not only for hydrological modeling, but as well for the other operations using terrain analysis. The determination of general terrain skeleton lines by quantitative geomorphology is used, for example, by the land surface segmentation. Segments, which are elementary land forms, may be considered as continuous surfaces, which are characterized by different types and levels of homogeneity. This may be expressed by the constant value of altitude or derived local morphometric variables. Discontinuity of these variables marks logical boundaries of the elementary forms. Ridge and valley lines of the abstract surface of given morphometric variable may serve as such a boundary.
5.2 Brief history of specific lines detection Since the beginning of 70’s, there has appeared many algorithms of drainage network determination using DEM and some specification of catchment areas, in that case the area basin is laying upon the sample point of a drainage network. These algorithms were mostly based on the idea of constructing runoff lines from the given point of the surface (Mark, 1984; O’Calaghan and Mark, 1984). If the water drainage from any point of the surface is tracing the path of the steepest descent, then the water draining from the current donor point is the increase for all the points laying on the given drainage line. The drainage direction from given point is defined by the direction of the steepest descent and is opposite to elevation gradient direction. For the application of this algorithm in the context of gridbased models, it is sufficient to test the eight adjacent neighbors’ cells of the actually computed cell. Therefore this algorithm is denoted as Deterministic 8 (D8) one (Fairfield and Leymarie, 1991). Determination of drainage routes in flat areas and depressions was identified by Tribe (1992) as one of main problems of automated drainage networks determination methods. To solve the DEM generalization problems connected with the necessity of spurious sinks removal, or determining the drainage directions in the shallow depressions, it is necessary to recognize depression and saddle points (lowest outlets). Jones and Wright and Maidment (1993) have introduced an algorithm for construction of drainage lines by tracing the path of the steepest slope from a given point of a DEM, defined by
58
Chapter five
triangulated irregular network. They, using this type of DEM, had to deal with similar problems as the authors of algorithms designed for grid-based DEMs. Removal of false depressions, eventually generalization and course of the flow in flat landscapes remained one of main topics in drainage network modeling and a number of papers are dedicated to this topic. For the determination of the drainage area or the whole watershed area in the frame of drainage network, it is required to delineate path routes of surface water flows together with boundaries between the watersheds. As noted above, path routes of surface water flow follow the path of the steepest slope. In general, they are identical to the slope curves1. We can imagine each watershed as enclosed collecting area rain water, in which path routes of surface water flow are concentrating water into the receiving watercourse, which is the lowest point of the watershed. Each watershed is composed of a system of own path routes of surface water flow. Path routes, type of valley lines have special features. They are called ravine lines, especially in the case of ravines and gullies. Valley lines are in the frame of a watershed that passes through points with the features of local receiving watercourse. The second type of important lines are the boundaries between watersheds, or boundaries between adjacent sub-watersheds of hypothetical sample valley point of river basin. In 1859, Alfred Cayley suggested a mathematical theory of spatial fields in his paper entitled “On Contour Lines and Slope Lines”, in which he laid out a comprehensive theory for continuous, smooth, single-valued surfaces. James Clerk Maxwell based on the work of Alfred Cayley in his paper published in 1870 entitled “On Hills and Dales”, where he defined singular points and lines creating terrain skeleton. The saddle point between two peaks is crossed by two “lines of slope” originating from peaks (lines of watershed) and a saddle-bar between two depressions that is crossed by two “lines of slope” going into these depressions (lines of watercourse). Maxwell’s definitions may be considered as global (i.e. planetary), because he has considered a closed planet’s surface, and deduced a relationship between numbers of peak, pit, and saddle points. Warntz (1966) has added intersection points to the set of specific points of the surface, beyond saddle points. In these points, ridge or valley lines are connected. Such points should be handled as points at which a single ridge or valley is split into two ridges or valleys. Surface network of specific points and lines can be described as a topological graph (Pfalz, 1976). Nodes of this graph are saddle, peak and depression points. Edges of the graph are ridge and valley lines that begin at saddles and terminate at peaks and depressions. Valleys are lines that run from a saddle point along a path of steepest descent, and ridges are lines that run to a saddle point along a path of steepest ascent. Surface networks may comprise some hierarchical substructure (Schneider, 2005). Each peak (or depression) point with a system of its slope lines defines an area. These facts were introduced first time by Maxwell (1870) and called singular area for peaks by Krcho (1979), and dead zones for depressions by Martz and de Jong (1988). Singular areas are separated one from another by delimitation valley lines and may contain “their own” depression regions, which means depressions situated inside given singular area. Saddle points are constrained to these depression regions which are not crossed by delimitation valley lines (Krcho, 1990). Each double singular point is crossed by a pair of ridge and valley lines. This means that all saddle points are simultaneously valley and ridge passes, but they are not always entered by ridges from up to two peak points. Based on this, Beucher (2001) sub-divided saddle points onto local and regional ones. Surface network patterns should be replenished with more lines, upon creating the terrain skeleton. As noted before, some ridges can apparently bifurcate. This property has river network as well. Defining ridge and valley lines only by applying the rule that these lines are crossing the double singular points may lead to unsuccessful result. Authors Márkus (1985), Hutchinson (1989), Mitášová and Hofierka and Zlocha (1990) or Kweon and Kanade (1994) were working with the idea to define the ridge and valley lines as the extremes of plan/contour curvature. Mitášová and Hofierka (1993) supported the 1
Contour line and slope line in the text is a two-dimensional element of the contour and its (orthogonal) trajectory field. Slope curve or contour is a three-dimensional element on the topographic surface.
Marián Jenčo, Jan Pacina and Peter A. Shary
59
methods for detection of ridge and valley lines by computing the density of constructed slope lines. Márkus’s work seems very interesting. Author suggested identifying ridge and valley lines by the condition of perpendicularity of the gradient direction and the azimuth with the maximal curvature of the normal section, which resembles to the tangential direction of the contour line. He used methods based on computer graphics algorithms designed to detect some features of computer objects. First steps in binary image analysis were related to mathematical morphology theory. Morphological operations (geodetic transformations) adjust objects in the binary image, so that they shrink (erosion), extend (dilatation), eventually smooth the outlines, remove little objects, fill little sinks or disconnect object connected by a narrow neck (morphologic separation, or opening). Reconstructing an image results in isolated objects (with edges) which have feature to be interpreted. The result of image segmentation is an image sub-divided onto multiple regions (sets of pixels) separated by edges. Boundaries or edges then create the basic image skeleton. Basic image skeleton can be replenished by lines creating the surface skeleton, for example, medial axis of a polygon, locus of centers of all circles that are contained inside the polygon and touch at least two polygon’s edges. One of skeletonization methods uses the influence zones. The influence zone is defined by means of geodetic distance which represents the length of the shortest path that connects two points of a given set. So, the path has to be inside this set. Influence zones are composed of points placed closer to the given image object than to other objects. The boundaries between various influence zones provide the Euclidean geodetic skeleton. A binary object is possible to transform to grey scale, for example, by opposite distance transformation. The set of pixels is morphologically eroded. Each component is separated from the rest of the set before it is removed by the erosion process (Figure 5.1). Nevertheless, skeletons in computer graphics and in geomorphometry are not identical. Beucher and Lanteujoul (1979) tried to show that image segmentation may be based on usage of topographic surface properties (flooding of the topographic surface). If the grey scale value has the meaning of altitude z then the graph of grey scale function z = f (x, y) of an image f may be considered as the topographic surface S. Based on drainage processes, one may understand the segmentation of the image f as delimitation of catchment basins or watersheds by drainage divides.
Figure 1 Successive erosions of a set modified by Vincent and Dougherty (1994)
5.3 Singular points of the surface and local morphometric variables Let’s consider a single-real valued function ƒ : R2 → R. Let this function be continuous and differentiable and represents a smooth surface, which means a surface without sharp edges. Let it be denoted by
60
Chapter five
z = ƒ(x, y); x = g1 (φ, λ); y= g2 (φ, λ),
(1)
where g1 and g2 are concrete cartographic projections, projecting any point (φ i, λ i; hi) with geographical latitude φi and geographical longitude λi with added value of relevant scalar magnitude hi onto Cartesian plane (x, y) as a point (xi, yi; hi). Concrete scalar geo-field is now expressed by the function ƒ(x, y). If the scalar values represent the altitude, the function ƒ(x, y) is a function of the altitude scalar field as well as of the topographic surface S as its interpolated surface. 5.3.1
Singular points
We use a simple definition, let the formula z = ƒ(x, y) represent height function on an image (surface) which is a smooth two-dimensional manifold M ⊆ R3 defined as M = {(x, y, z): z = ƒ(x, y)}2. The manifold represents n-dimensional abstract space, similar to Euclidean space. It is possible to apply topological characteristics of the Euclidian space onto this manifold by means of charts3. This means that the surroundings of every point of two-dimensional manifold appears to be almost a plane. If the height function ƒ(x, y) has only non-degenerating points then we call it the Morse function. Critical points4 of this function are peak, depression or saddle points. A point (xo, yo) is a critical point of the Morse function ƒ(x, y) if the gradient at this point is zero, ∇f = 0. Critical point is nondegenerating if the Hessian matrix ∇2f of the second partial derivatives of the function ƒ(x, y) is nonsingular, which means the matrix has a non-zero determinant. Let the point (xo, yo) be a nondegenerating critical point and a Hessian be a determinant of the Hessian matrix ∇2f. If the Hessian at the point (xo, yo) has a positive value then this point is a local extreme of the function ƒ(x, y) and simultaneously this point is an isolated singular point. Eigenvalues5 of the Hessian matrix ∇2f are positive for depression points, or negative for peaks. If the Hessian at the point (xo, yo) is negative then this point is a double singular point of the function ƒ(x, y) and is simultaneously a saddle point. Degenerating critical points, for example limit cases of double saddle points or multiple saddle points, are very unstable, and they disappear even by a small change in the altitude. On a surface degenerating points appear only for a short time by its disruptions, for example, in a form of inflection points of ideal landslide profiles, in which “concave” part (valley of landslide slip surface area) is turning into “convex” part (ridge of its accumulation zone). 5.3.2
Local morphometric variables
Modern geomorphometry uses many local morphometric variables (LMVs) called land surface parameters (LSPs) as well. The definition of these variables is based on the requirements of particular 2
Height function defined on a smooth manifold is a real-valued function f : M → R. Hence f is the orthogonal projection with respect to the z axis.
3
A chart is representing the local projection parts of the manifold into the Euclidean space.
4
A critical point of a smooth function of a smooth manifold is simultaneously it’s stationary point (the partial derivatives of the function equals zero). Each critical point of the Morse function is then a singular point.
Eigenvalues λ1 , λ2 of the Hessian matrix are computed by solving the quadratic ∂2ƒ ∂2ƒ ∂2ƒ ∂2ƒ ∂2f 2 λ2-λ + + = 0. ∂x2 ∂y2 ∂x2 ∂y2 ∂x∂y 5
(
) (
( ))
Marián Jenčo, Jan Pacina and Peter A. Shary
61
geo-sciences, starting with geomorphology and later for other geo-branches as well. We know LMVs from common practice as height gradient magnitude or slope angle and slope aspect, later replenished with different types of surface curvatures, from curvatures representing basic methods of differential geometry to curvatures of specific lines of topographic surface. Particular LMVs create structured fields derived from the primary altitude field and therefore they are abstract scalar fields. Independently on the way of derivation, we may divide LMVs along the highest derivation order of the function ƒ(x, y) inhered in formulas for the abstract scalar fields of these LMVs. Following Minár (1999) and Krcho and Benová (2004), magnitude of the two-dimensional gradient vector, or its absolute value |∇f | ≡ |grad f |, slope angle S, aspect of slope kn (in the plane (x, y), direction of normal to the contour line) or aspect angle A are LMVs of the first order. Modules for computation of plan/contour curvature At and two normal curvatures - curvature of normal section in the direction tangential to the slope line (in gradient or normal to the contour line direction), called profile curvature (KN)n and curvature of a normal section in the direction tangential to the contour line, called tangential curvature (KN)t , are included in most standard GIS software packages. These curvatures are LMVs of the second order. If we look closer on presented LMVs, we find out that they are in some way related to the orthogonal system of contour lines and slope lines. It is a result of current practice that needs mostly LMVs characterizing given surface in the directions of extreme effects which form physical processes. These directions are usually directions of the gradient vector and the equi-potential. One may consider the direction tangential to the contour line (below tangent) and the direction of normal to the contour line (below normal) at any point on the land surface placed in the gravity field of the Earth as the basic directions on the land surface. The concept of expressing particular LMVs, including vertical and horizontal convexity, by deriving the function ƒ(x, y) in the both basic directions was suggested by Evans (1972). Krcho, in works from 1973, derived analytical formulas for the reverse oriented plan and profile curvature by means of partial derivatives of this function along x and y axes. Jenčo (1992) defined hierarchical set of LMVs based on derivation of slope and aspect angle structural field in both basic directions on the land surface. By deriving the secondary LMVs functions of the given order (the parent LMV) in the direction of normal and tangent, it is possible to derive functions of LMVs of higher order. This method may be applied upon the order of LMVs allowed by the highest derivation order of function ƒ(x, y). By deriving the altitude field equation in the direction of normal we may derive field equation of the intensity of maximum change of the altitude field (gradient magnitude field). By deriving the concrete parent LMV equation in the direction of normal and tangent we can derive LMVs, which are the parent LMV intensity of change in the normal and tangent direction. The derivation method is determining the specific features of LMVs isoline fields. The course of zero isolines of a given LMV is constrained to points with extreme values of parent LMV isoline field in normal or tangent direction of the altitude field. In the notation of each LMV in Table 5.1, to describe the direction of derivation subscripts n and t are used. The subscript n stands for normal direction and t for tangent direction. To express the structural scalar field gradient magnitude |∇f | ≡ |grad f |, a single symbol G was used. In the Table 5.1, LMV of kn and LMVs derived from are omitted, to provide better interpretability in practice. The characters of LMVs derived in this way are used for delimitation of elementary forms for land surface segmentation. Minár and Evans (2008) used for defining the unified system of basic elementary forms expressed by variations in the general fitted function beyond LMVs of the first order presented in Table 5.1 as well LMVs of the second and third order. The usage of LMVs of the fourth order is, according to the authors, still open.
62
Chapter five
Table 5.1: Hierarchical system of local morphometric variables
Local morphometric variables of first order: gradient magnitude
slope angle 2
∂f ∂x
∂f = tg S = G = ∂n
∂f ∂y
( ) +( )
2
aspect angle ∂f ∂y = arctg kn A = arctg ∂f ∂x
∂f S = arctg = arctg G ∂n
Local morphometric variables of second order: normal change of gradient 2
tangent change of gradient 2
∂f ∂f ∂f ∂f ∂ f ∂f + 2 + ( ) ∂x ∂y ∂x∂y ∂y ∂G (∂x ) ∂x = G = ∂n (∂x∂f ) + (∂y∂f ) 2
2
∂f ∂y2 2
2
n
2
Gt =
2
normal change of slope 2
Sn =
∂S = ∂n
∂G = ∂t
∂f ∂f ∂x ∂y
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
∂f ∂f ∂f ∂f ∂f + ( ∂x ∂y ) ∂x∂y ((∂y ) (∂x ) ) ∂S S = = ∂t ((∂x∂f ) + (∂y∂f ) ) ( 1 + (∂x∂f ) + (∂y∂f ) ) ∂f ∂f ∂x ∂y
∂f ∂f ∂f + ( ) (∂x∂f ) ∂x∂ f + 2 ∂x∂f ∂y∂f ∂x∂y ∂y ∂y ((∂x∂f ) + (∂y∂f ) ) ( 1 + (∂x∂f ) + (∂y∂f ) )
t
2
2
2
2
2
2
2
2
2
2
normal change of aspect angle 2
2
∂f ∂f ∂f ∂f ∂ f ∂f - 2 + ( ) ∂x ∂y ∂x∂y ∂y ∂A (∂x ) ∂y A= = ∂t ((∂x∂f ) + (∂y∂f ) ) 2
2
2
t
2
2
∂f ∂x2 2
An =
3
∂A = ∂n
∂f ∂f ∂x ∂y
2
2
∂f ∂f ∂f + ( ) (∂x∂f ) ∂x∂ f + 2 ∂x∂f ∂y∂f ∂x∂y ∂y ∂y ((∂x∂f ) + (∂y∂f ) ) ( 1 + (∂x∂f ) + (∂y∂f ) ) 2
2
2
2
(KN)n = Sn cos S =
2
2
2
2
2
tangential curvature 2
2
∂f ∂f ∂f ∂ f ∂f ∂f ∂f - 2 + ( ) ( ∂x ) ∂y ∂x ∂y ∂x∂y ∂y ∂x (K ) = A sin S = ((∂x∂f ) + (∂y∂f ) ) ( 1 + (∂x∂f ) + (∂y∂f ) ) 2
2
2
2
2
2
2
2
2
3
2
2
∂f (∂x∂ f - ∂y∂ f) + ∂x∂y ((∂y∂f ) - (∂x∂f ) ) ((∂x∂f ) + (∂y∂f ) ) 2
2
2
2
2
2
profile curvature
t
2
tangent change of slope
2
plan curvature
N t
2
∂f (∂x∂ f - ∂y∂ f) + ∂x∂y ((∂y∂f ) - (∂x∂f ) ) (∂x∂f ) + (∂y∂f )
2
3
Marián Jenčo, Jan Pacina and Peter A. Shary
63
Local morphometric variables of third order: normal change of normal change of the gradient ∂Gn Gnn = = ∂n
tangent change of normal change of the gradient
∂f ∂f 2LN - EM ) + 2LO - FM ) ∂x ( ∂y (
∂f ∂f (FM - 2LO) + ∂y (2LN - EM ) ∂Gn ∂x Gnt = = 5 ∂t M
5
M
tangent change of tangent change of the gradient
normal change of tangent change of the gradient
∂f ∂f (IM - 2NR) - ∂x (JM - 2OR) ∂Gt ∂y Gtt = = 5 ∂t M
∂f ∂f (IM - 2NR) - ∂y (2OR - JM ) ∂Gt ∂x Gtn = = 5 ∂n M
normal change of normal change of the slope ∂Sn Snn = = ∂n
tangent change of normal change of the slope
∂f ∂f 2LN (1+2M) - EMP) + (2LO (1+2M) - FMP) ∂x ( ∂y 5
2
P
M
tangent change of tangent change of the slope ∂f ∂f (IMP - 2NR (1+2M)) - ∂x (JMP - 2OR (1+2M)) ∂St ∂y Stt = = 5 2 ∂t P M normal change of normal change of aspect angle ∂An Ann = = ∂n
∂f ∂f (FMP - 2LO (1+2M)) + ∂y (2LN (1+2M) - EMP) ∂Sn ∂x Snt = = 5 2 ∂t M P normal change of tangent change of the slope ∂f ∂f (IMP - 2NR (1+2M)) - ∂y (2OR (1+2M) - JMP) ∂St ∂x Stn = = 2 5 ∂n P M tangent change of normal change of aspect angle
∂f ∂f 3NR - IM) + 3OR - JM) ∂x ( ∂y (
∂f ∂f (JM - 3OR) + ∂y (3NR - IM) ∂An ∂x Ant = = 3 ∂t M
3
M
tangent change of plan curvature
normal change of plan curvature
∂f ∂f (3KN - BM) - ∂x (3KO - CM) ∂At ∂y Att = = 3 ∂t M
∂f ∂f (3KN - BM) - ∂y (CM - 3KO) ∂At ∂x Atn = = 3 ∂n M
normal change of profile curvature ∂(KN)n (KN)nn = = ∂n
P
(∂x∂f (2LN - EM) + ∂y∂f (2LO - FM) ) + 3LM (O ∂y∂f + N ∂x∂f ) 5
P
5
M
tangent change of profile curvature ∂(KN)n (KN)nt = = ∂t
P
(∂x∂f (FM - 2LO) + ∂y∂f (2LN - EM )) + 3LM (N ∂y∂f - O ∂x∂f ) 5
P
5
M . . .
64
Chapter five
Local morphometric variables of fourth order: normal change of normal change of normal change of the gradient Gnnn =
tangent change of normal change of normal change of the gradient
∂Gnn ∂n
Gnnt =
∂Gnn ∂t
. . . ____________________________________________________________________________________________________________ ∂f (∂x∂y ) - ∂x∂ f ∂y∂ f , ∂f ∂ f ∂f ∂f ∂f ∂f ∂f B = 2 (A + , ∂x ∂x ∂y ∂y) (∂y ) ∂x (∂x) ∂x∂y ∂f ∂ f ∂f ∂f ∂f ∂f ∂f C = 2 (A + , ∂y ∂x∂y ∂x) (∂y ) ∂x y (∂x) ∂y ∂f ∂f ∂f D = + , ∂x∂y (∂x ∂y ) ∂ f ∂f ∂f ∂f ∂f ∂ f ∂f ∂f ∂f ∂f + + +D , E = -2 ∂x (∂x ∂y ∂y (∂x∂y ) (∂x ) ) ∂y ∂x (∂x) ∂x∂y (∂y) ∂f ∂ f ∂f ∂f ∂f ∂f ∂ f ∂f ∂f ∂f F = -2 + + +D , ∂y (∂x∂y ∂x ( ∂x∂y ) ( ∂y ) ) ∂x ∂y (∂y) ∂x ∂y (∂x) ∂f ∂f G = ( ) -( ) , ∂y ∂x 2
2
2
A=
2
2
2
3
3
2
2
3
2
2
3
2
3
2
2
2
3
2
2
2
2
3
2
2
3
2
2
3
2
3
2
2
2
H =
3
2
3
2
2
2
2
3
3
2
2
2
2
2
3
3
2
2
2
∂2f ∂2f , ∂x2 ∂y2
∂ f ∂f ∂ f ∂f ∂ f ∂f ∂ f ∂f ∂f ∂f ∂ f ∂f +H( + + , (∂x∂y ∂y ∂x ∂x) ∂x ∂y ∂x∂y ∂x) ∂x ∂y (∂x ∂x∂y ) ∂f ∂f ∂ f ∂f ∂ f ∂f ∂ f ∂f ∂ f ∂f ∂f ∂f ∂f ∂f J= G+2 +H( + + , ∂x∂y ∂x∂y (∂y ∂y ∂x∂y ∂x) ∂x∂y ∂y ∂y ∂x) ∂x ∂y (∂x ∂y ∂y ) ∂ f ∂f ∂f ∂ f ∂f ∂ f ∂f K=2 , ∂x∂y ∂x ∂y ∂x (∂y ) ∂y (∂x) ∂ f ∂f ∂ f ∂f ∂f ∂ f ∂f , L=-2 ∂x∂y ∂x ∂y ∂y (∂y ) ∂x (∂x) ∂f ∂f M=( ) +( ), ∂y ∂x I=
∂3f ∂2f G+2 ∂x2∂y ∂x∂y 3
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
N=
∂2f ∂f ∂2f ∂f + , 2 ∂x ∂x ∂x∂y ∂y
O=
∂2f ∂f ∂2f ∂f + , ∂y2 ∂y ∂x∂y ∂x
P=1+M, ∂f ∂f ∂2f R= H+ G. ∂x ∂y ∂x∂y
2
2
2
2
3
2
2
2
3
3
2
3
2
2
2
2
2
2
2
3
3
Marián Jenčo, Jan Pacina and Peter A. Shary
65
Shary (1991, 1995) and Shary and Sharaya and Mitusov (2002) have created a system of LMVs containing 14 curvatures (second order LMVs). In this system, besides tangential, plan and rotor curvatures from Table 5.1, the following LMVs were introduced:
difference curvature 2 2 2 2 2 1 + ∂f ∂ f2 - 2 ∂f ∂f ∂ f + 1 + ∂f ∂ f2 ∂x ∂y ∂x∂y ∂y ∂x ∂x ∂y E = (KN)t , 2 2 3 ∂f ∂f 2 1 + ∂x + ∂y
(2)
unsphericity curvature M= 2
Y+Z 6 2 2 3 , ∂f ∂f 1+ + ∂x ∂y
(3)
total ring curvature 2
2
2
∂f ∂f ∂ f2 - ∂ f2 + ∂ f ∂f - ∂f 2 ∂x ∂y ∂x ∂y ∂x∂y ∂y ∂x KR = St = , 2 2 2 2 2 2 ∂f + ∂f 1 + ∂f + ∂f ∂x ∂y ∂x ∂y 2
2
2
(4)
together with Gaussian basic differential geometry curvatures (mean H, total Gaussian K) and principal curvatures (maximal (KN)max = H + M , minimal (KN)min = H – M), horizontal/tangential excess curvature ((KN)t)e = M - E, vertical/profile excess curvature ((KN)n)e = M + E and total accumulation curvature KA = H2 – M2. To describe some general points that lie in the basis of LMVs (e.g., to classify LMVs), one may note the following: The land surface is in several three-dimensional geophysical vector fields, such as gravitational field or vector field of solar rays. In practice, gravitational field appears mostly important. Consequently, one may study the land surface itself (this is the approach of differential geometry of
∂ f Y = ∂x
∂f ∂y ∂f 1+ ∂x
6
Whereby
() ()
2
∂f ∂f ∂ f Z = ∂x ∂y ∂x 2
2
2
1+
2
∂f ∂y ∂f 1+ ∂x
2
2
-
∂f ∂y2
( ) ( )
∂f ∂x ∂f 1+ ∂y
2
2
1+
2
1 +
( ) ( ) , ∂f ∂x
2
+
∂f ∂y
2
() ()
1+
2
∂2f - 2 ∂x∂y
1+ ∂f ∂x
1+ ∂f ∂y
2
()
( ) 2
∂f ∂f ∂2f + ∂x ∂y ∂y2
2
) )
∂f ∂x ∂f 1+ ∂y
( (
1+
2
2
2
66
Chapter five
surfaces – to ignore external vector fields), or the mathematically and physically double system “land surface + gravitational field” (Shary, 1995). For example, slope steepness changes when the surface is inclined as a whole, in contrast to maximal or minimal curvature (KN)max or (KN)min. So, there are four directions at a point on the land surface, not only tangent and normal directions caused by gravitational field. Other two directions are defined by the surface itself: the principal direction in which curvature of a normal section is maximal and in which it is minimal at the same point (Shary and Sharaya and Mitusov, 2002). The results on critical points above may be generalized by considering the so-called umbilical points where maximal and minimal curvatures coincide, so that corresponding directions appear arbitrary (e.g., for a sphere) similarly to arbitrary tangent and normal directions for critical points (e.g., for a horizontal plane). Most LMVs of modern geomorphometry describe the double system land surface and gravitational field (insolation describes the system land surface and solar irradiation field), except for curvatures (KN)min , (KN)max , H, M, and K that describe the land surface itself. These LMVs provide an alternative way to describe land forms, the so-called geometrical forms (Shary and Sharaya and Mitusov, 2002); one example (map image of M from Figure 5.2) is shown below. Although two independent curvatures are expected to describe two-dimensional manifold M in differential geometry of surfaces (e.g., (KN)min and (KN)max , or H and M), three independent curvatures are expected to describe the system of land surface and gravitational field, because gravitational field “adds a third dimension” as noted by Koenderink and van Doorn (1994). It was shown that H, M, and E are independent and form a simple set of curvatures that permits to represent almost any other curvature as a sum or difference of pairs of these three ones, or as a difference of their squares (Shary, 1995). Another way to introduce curvatures is to consider two-dimensional analogs of three-dimensional operators of divergence and rotor (Shary, 1991) that are commonly used in the theory of threedimensional fields, such as electric or magnetic ones. In this approach, one may consider a twodimensional vector field of unit-length vector s = ∇f / |∇f | along a slope line and calculate div(s) and rot(s). It appears that div(s) equals to plan curvature (Shary, 1995). On the other hand, plan curvature is proportional (with a positive coefficient) to tangential curvature. rot(s) is a vector directed along z axis, so that it is LMV. It will be shown that it is a slope line curvature. KR is proportional (with a positive coefficient) to squared rotor (Shary and Sharaya and Mitusov, 2002); among curvatures, only plan and rotor curvatures cannot be represented by H, M, and E.
5.4 Ridge and edge detection This chapter was written following (Jenčo and Pacina, 2009). Haralick (1983) defines ridge or valley lines as bright or dark areas of a digital image: ridges and valleys on digital images are found by seeking the zero crossings of the first directional derivative taken in a direction which extremizes the second directional derivative. This is based on the idea that ridge and valley lines pass through points which are local extremes of a function in direction perpendicular to direction of gradient vector. Lindberg (1998) defines the conditions for existence of ridge and valley lines. Let at the point (xo, yo) in a two-dimensional image; introduce a local coordinate system (u, v) with the v-axis parallel to the gradient direction at point (xo, yo) and the u-direction perpendicular. Local coordinate system (u, v) is characterized by the fact that the first order partial derivative ∂ƒ/∂u is equal to zero. Directional derivatives in local coordinate system (u, v) are related to the partial derivatives in the Cartesian coordinate system (x, y) by
Marián Jenčo, Jan Pacina and Peter A. Shary
67
2 2 2 2 2 2 2 ∂f ∂ f2 = ∂f ∂ f2 - 2 ∂f ∂f ∂ f + ∂f ∂ f2 , ∂x ∂y ∂x∂y ∂v ∂u ∂x ∂y ∂y ∂x 2 2 2 2 2 2 2 ∂f ∂ f = ∂f ∂f ∂ f2 - ∂ f2 + ∂ f ∂f - ∂f , ∂v ∂u∂v ∂x ∂y ∂x ∂y ∂x∂y ∂y ∂x 2 2 2 2 2 2 2 ∂f ∂ f2 = ∂f ∂ f2 + 2 ∂f ∂f ∂ f + ∂f ∂ f2 . ∂x ∂y ∂x∂y ∂v ∂v ∂x ∂x ∂y ∂y
(5)
Now rise from the assumption that the points of ridge or valley lines of function ƒ(x, y) are local maxima or local minims in the direction perpendicular to the direction of gradient vector. In the local coordinate system (u, v), the following condition should be valid for ridge and valley lines ∂2f = 0. ∂u∂v
(6)
Not all segments of isolines fulfilling this condition have the character of ridge or valley lines. Following Lindenberg (1998), this is the case of non-degenerating function ƒ(x, y) required to replenish this condition by the condition 2
2
2
2
∂ f2 - ∂ f2 > 0, ∂u ∂v
(7)
which arise from the assumption, that the numerical value of normal change of gradient Gn is always less than the numerical value of the product of plan curvature At and gradient magnitude G. In contrast to the requirements of computer graphics, it is more suitable in the case of geomorphology to substitute this condition by another one. Such a condition may be that contour line is perpendicular to ridge or valley line, similar to a condition proposed by Márkus (1985). This condition corresponds to the following equation ∂f ∂x
∂2f ∂2f = 0 ∂ = 0 ∂u∂v ∂f ∂u∂v + = 0. ∂x ∂y ∂y
∂
(8)
If the point belongs to a valley line (in image processing terminology called the dark ridge as well), the additional condition must be stated ∂2f > 0, ∂u2
(9)
that is, the contour line which passes through this point must be convex. For a point which belongs to a ridge line (in image processing terminology called the bright ridge as well) the following inequality should be valid
68
Chapter five
∂2f < 0, ∂u2
(10)
that is, the contour line which passes through this point must be concave.
Figure 5.2 An original surface (top), rotor (middle), and unsphericity curvature (bottom) of this surface (Shary, 2008)
If we modify the second equation in (5) in accordance to (6), we receive a relation of the zero isolines of trinity LMVs. The first LMV - tangent change of gradient Gt was first introduced by Minár (1999),
Marián Jenčo, Jan Pacina and Peter A. Shary
69
the second LMV - tangent change of slope St , which is indicator of a torsion of the contour by Krcho and Benová (2008), was introduced by Jenčo (1992), and the third LMV - normal change of aspect angle An was introduced by Shary (1991). Normal change of aspect angle An is the curvature of slope line in plane (x, y), that is, on a topographic map, then opposite normal change of aspect angle An is the curvature of flow line7 and as stated before, called the rotor following the vector rot(s) which is widely used in the theory of an electromagnetic field. Sign of rotor curvature is positive when a flow line turns clockwise and negative in the opposite case. The isoline Gt = St = An = 0 passes through a set of points with extreme value of gradient magnitude G or slope angle S in tangent direction. If Gt , St or An at point (xo, yo) equals to zero, than the point (xo, yo) is a point of surface in which a change of drainage route (inflection point of slope or flow line - in plane (x, y) ). The principal directions of the surface depend at this point on the direction of slope and contour line. Based on the condition (6), the condition (8) can be rewritten as
∂f ∂(Gt = 0 ∨ St = 0 ∨ An = 0) ∂f ∂(Gt = 0 ∨ S t = 0 ∨ An = 0) + ∂x ∂x ∂y ∂y
≈ 0.
(11)
The given conditions may be substituted by other conditions in the case of simple geo-surfaces. An alternative way may be based on the unsphericity curvature M that indicates relatively long (nonspherical) surface forms. This curvature is zero for a sphere, and increases as surface forms become longer. An example from geophysics is shown in the map images for all the Earth (Figure 5.2). The top map image is that of the horizontal component of the so-called non-dipole component of the main magnetic field, resulting from electrical circuits in the Earth's liquid interior (Langel, 1987). It contains several minima (dark color) that seem to be located along some regular curves. Middle map is the rotor curvature (dark color indicates positive rotor, light color is negative rotor). It is important that the isoline of zero rotor connects minima, maxima and saddle points thus forming a special case of a surface skeleton. Now one may calculate unsphericity (bottom map) to ensure that these isolines connect relatively long surface forms (here dark color corresponds to zero unsphericity, and lighter colors indicate greater values of unsphericity). Bands of light color in this map image indicate elongated surface forms. The development of ridge and valley lines computed by equations in (6) and (11) (left side of Figure 5.3) was compared in the frame of testing area with ridge and valley lines from right side of Figure 5.3 delimitated by detecting local extremes with the help of the Canny edge detector. The process of detecting for local extremes consists of two steps: At the first step, the Canny edge detector8 was applied. The results are edges corresponding to inflexion points of slope curves. In these inflection points the gradient magnitude reaches a local maximum in the gradient/normal direction. Following Lindeberg (1998) in local coordinate system (u, v) for these points, the following conditions are valid
∂f 2 ∂2f 2 = 0, ∂v ∂v 7
(12)
Flow direction is opposite to the gradient direction. The amount of ridge and valley detected in and between edge lines is limited by properties of applied Canny edge detector. The usage of Canny edge detector is followed by application of noise eliminating filters in the input data and thresholding the gradient to eliminate weak edges. 8
70
Chapter five
3 3 3 3 3 3 2 2 3 3 ∂f ∂ f3 = ∂f ∂ f3 + 3 ∂f ∂f ∂2 f + 3 ∂f ∂f ∂ f 2 + ∂f ∂ f3 ≤ 0. ∂v ∂v ∂x ∂x ∂x ∂y ∂x ∂y ∂y ∂x ∂x∂y ∂y ∂y
(13)
If we modify the left side of the last equation in (5) according to relation (12), we get the relation for expressing the zero isolines of trinity others LMVs. The first LMV is a normal change of gradient Gn introduced (with opposite sign) in Minár (1999). The second LMV (profile curvature) represents the normal curvature of surface (KN)n in the gradient/normal direction. The third LMV, normal change of slope Sn , was derived (with opposite sign) in Jenčo (1992). The intersections of zero isoline in (12) with zero isoline from relation (13) are not identical with the intersections of isoline Gn = (KN)n = Sn = 0 with zero isolines of LMVs Gnn from Minár (1999) and (KN)nn and Snn from Jenčo (1992), which are the parent LMVs (normal change of gradient Gn , profile curvature (KN)n and normal change of slope angle Sn) intensity of change in the normal direction. At the next step, between these inflexion points, the local altitude maxima and minima were found by testing the cell neighborhoods. One may see that application of both of the methods results in almost the same range of ridge and valley lines.
Figure 5.3 Ridge and valley lines deliminated by function analysis and Canny edge detector
It was noted in the above section “Brief history of specific line detection” that one of the proposed methods of ridge and valley lines detection tested the extremes of plan curvature (tangent change of plan curvature Att from Jenčo (1992) is zero). With condition that Att = 0,
(14)
must be satisfactory ∂f ∂(Att = 0) ∂f ∂(Att = 0) + ∂x ∂y ∂y ∂x
≈ 0.
(15)
Marián Jenčo, Jan Pacina and Peter A. Shary
71
The results of this method are influenced not only by the third order partial derivatives errors, but as well by errors of the necessary fourth order. This method more frequently produces false ridge and valley lines. The points that belongs to ridge and valley lines satisfy the condition (6) and (7), or (6) and (8) or (11), and do not create a system of continuous lines. These points create set of continuous lines when they are replenished by points of connector set – these lines are then passing through all the critical points, including singular points of the function ƒ(x, y). Merged set of these points is in computer graphics called Relative critical set. Lines created by points of this merged set may be considered as those building the basic terrain skeleton. Finally, it is important to note that the second member of the first equation in (5) is identical to the numerator in the relations expressing two other LMVs in Table 5.1. The first LMV is the plan curvature At (in image processing terminology called the isophote curvature as well). The second LMV is the normal curvature (KN)t - curvature of the normal section in the tangent direction. The curvature (KN)t is tangential curvature and its formula (with opposite sign) was introduced in geomorphometry in Krcho (1983). By means of these LMVs, one may substitute the condition (9) with one of the conditions
At > 0 or (KN)t > 0
(16)
and the condition (10) with
At < 0 or (KN)t < 0.
(17)
Figure 5.4 Nodes of the 5x5 neighborhood
72
5.5
Chapter five
Approximation of partial derivatives of the third order
Many of software used for GIS analysis implements approximation of the first and the second partial derivative. For computing surfaces of derived LMVs of the third order, we need to approximate partial derivatives up to the third order with sufficient quality. The method presented in this work is fulfilling these requirements. We will approximate the input data by a general polynomial of the third order:
.
(18)
We will use the 5x5 neighborhood of an actually computed point. Now mark the coordinates of the centre of the 5x5 neighborhood in which we will approximate the derivatives (xi, yj). The nodes of the 5x5 neighborhood are shown in Figure 5.4. Symbol f in each of the nods represents measured high value. The value h is the distance between the nodes. Estimation of derivatives: Now estimate the derivatives of the polynomial at the point (xi, yj). Than z(xi, yj) = a0. The partial derivative of z by x is:
.
(19)
The result is:
(20)
For other derivatives:
(21)
Estimation of the derivatives coefficients: We interleave the polynomial (18) across 25 nods (5x5 neighborhood) see Figure 5.4, but the polynomial (18) has got only 10 coefficients, so that we use the least squares method. To encounter the higher influence of points closer to the centre of approximate area, we will use the weighted least squares method
’
(22)
Marián Jenčo, Jan Pacina and Peter A. Shary
73
where wi,j is the weight of xi, yj point, fk,l is the value in the node, and z(xi, yj) is the function value of the polynomial (18) at the point (xi, yj). It is important for the right choice of the weight to take into account the influence of the surrounding nodes, which should decrease as the distance from the middle point increases. The following weights were used for the computation:
(23) where δ ≥ 0 (for example 0.1) influences the relative importance of points that are far from the centre. The system of linear equations Qa = f for computing the unknown coefficients a can be overestimated hence, it must not have any solution, generally speaking. We will then estimate the unknown coefficients a by the least squares method9. The unknown coefficients a0, … a9 of the polynomial (18) are given by
(24)
and BW is computed using this formula
(25)
The size of matrix Q is 25x10, the size of a is 10x1 (vector of unknown coefficients), and f is 25x1 (vector of the nodes). The computation made this way is very fast. The matrix BW is computed only once during the first computation. We do not have to compute all the coefficients of a, but only those we need for computation of the partial derivatives of the desired order. The matrix BW was computed analytically (by means of symbolic computations in Matlab). This permitted to avoid rounding errors during computation of matrix BW, thus making the computation more precise. Precision of this method was tested in Pacina (2009).
5.6
Conclusion
Ridge and valley lines are specific lines of any surface. One cannot avoid delimitation of them in the terrain analysis or in digital image processing. Theoretical basis of methods used for detection of ridge and valley lines, are very close in geomorphometry and in computer graphics. Applications of methods developed in the frame of these branches leads to similar results. The analytical methods provide good results in rugged terrain, but even in such a case the algorithms are not capable of detecting the continuous network of ridge and valley lines. It is very probable that by
9
See Pacina (2008) for the whole derivation of the weighted least squares method.
74
Chapter five
removing the discontinuities in the ridge and valley lines network we will have to apply the graphical methods. The easiest way how to identify the connecting lines is with the detectors based on grid-based algorithms using comparisons of neighboring cell altitudes to the altitude of the computed cell. To use derived surfaces of local morphometric variables of higher orders, a robust method for approximation of partial derivatives up to the third order was implemented and tested. This method produces partial derivatives of the third order with a quality sufficient for further use in the ridge and valley lines detection process.
Acknowledgements The first author is grateful to the Slovak Scientific Grant Agency of the Ministry of Education of Slovak Republic and the Slovak Academy of Science (VEGA) through projects No. 1/4042/07 and No. 1/0434/09 for the support of this work.
References Beucher, S. Lantuejoul, C. (1979) Use of watersheds in contour detection. In International Workshop on Image Processing, Rennes. Available at . Beucher, S. (2001) Geodesic reconstruction, saddle zones & hierarchical segmentation. Image Anal Stereol 20, p. 137-41. Caylley, A. (1859) On Contour Lines and Slope Lines. The London, Edinburgh and Dublin Philosophical Magazine and Journal of Science 18, p. 264-68. Evans, I. S. (1972) General geomorphometry, derivatives of altitude and descriptive statistics. In Chorley R (ed) Spatial Analysis in Geomorphology, London: Methuen and Co., p. 17-90. Fairfield, J., Leymarie, P. (1991) Drainage networks from grid digital elevation models. Water Resources Research 27, p. 709-17. Haralick, R. M. (1983) Ridges and valleys on digital images. Computer Vision, Graphics and Image Processing 22, p. 28-38. Hutchinson, M. F. (1989) A new procedure for gridding elevation and sream line data with automatic removal of spurious pits. Journal of Hydrology 106, p. 211-32. Jenčo, M. (1992) The Morphometric Analysis of Georelief in Terms of a Theoretical Conception of the Complex Digital Model of Georelief. In Acta Facultatis Rerum Naturalium Universitatis Comenianae, Geographica 33, p. 133–53. Jenčo, M., Pacina, J. (2009) Edge and ridge detectors as a techniques for geomorphometry. In Pešková K (ed) Proceedings – Symposium GIS Ostrava 2009, Available at . Jones, N. L., Wright, S. G., Maidment, D. R. (1990) Watersheed Delineation with Triangle-Based Terrain Models. Journal of Hydraulic Engineering 116, p. 1232-51. Koenderink, J. J., van Doorn, A. J. (1994) Two-plus-one-dimensional differential geometry. Pattern Recognition Letters 15, p. 439-43. Krcho, J. (1973) Morphometric Analysis of Relief on the Basis of Geometric Aspect of Field Theory. In Acta geographica Universitatis Comenianae, Geographico-Physica 1, p. 7–233. Krcho, J. (1979) Relief as the Spatial Subsystem SR of Geographical Landscape and Its Complex Digital Model (CDMT) (in Slovak). Geografický časopis 31, p. 237-62. Krcho, J. (1983) Theoretical Conception and Interdisciplinary Applications of the Complex Digital Model of Relief in Modelling Bidimensional Fields (in Slovak). Geografický časopis 35, p. 265-91. Krcho, J. (1990) Morphometric Analysis and Digital Models of Georelief (in Slovak). Bratislava, Veda. 427 pp.
Marián Jenčo, Jan Pacina and Peter A. Shary
75
Krcho, J., Benová, A. (2004) Georelief and its geometrical structure: georelief modelling with and without time parameter (in Slovak). Geografický časopis 56, p. 3-32. Krcho, J., Benová, A. (2008) Exactly understood geomorphometry of georelief as special subsystem of landscape and its geometrical structure; Professor Michal Lukniš, his merit and impact on its development (in Slovak). In Acta geographica Universitatis Comenianae 50, p. 33-61. Kweon, I. S., Kanade, T. (1994) Extracting Topographic Terrain Features from Elevation Maps. CVGIP: Image Understanding 59, p. 171-82. Langel, R.A. (1987). Main Field. In Jacobs J A (ed.) Geomagnetism. San Diego: Academic Press, p. 249-512. Lindeberg, T. (1998) Edge detection and ridge detection with automatic scale selection. International Journal of Computer Vision 30, p. 117-54. Mark, D., M. (1984) Automated detection of drainage networks from digital elevation models. Cartographica 21, p. 168-78. Márkus, B. (1985) Terrain analysis in consideration of surface curvature conditions. In Periodica polytechnica, Budapest: Technical University, p. 71-81. Martz, L.W., de Jong, E. (1988) CATCH: a Fortran program for measuring catchment area from digital elevation models. Computers and Geosciences 14, p. 627-640. Maxwell, J. C. (1870) On hills and dales. The London, Edinburgh and Dublin Philosophical Magazine and Journal of Science 43, p. 421-27. Minár, J. (1999) Morphometric analysis of the fields and its utilization in geoecology. Geografický časopis 51, p. 261-77. Minár, J., Evans, I. S. (2008) Elementary forms for land surface segmentation: The theoretical basis of terrain analysis and geomorphological mapping. Geomorphology 95, p. 236-59. Mitášová, H., Hofierka, J., Zlocha, M. (1990) Cartographic Modelling Surfaces and Bodies by Means of Global Splines with Tension. Kartografický a geodetický obzor 36, p. 232-36. Mitášová, H., Hofierka, J. (1993) Interpolation by Regularized Spline with Tension: II Application to Terrain Modelling and Surface Geometry Analysis. Mathematical geology 25, p. 657-69. O’Calaghan, J. F., Mark, D. M. (1984) The extraction of drainage networks from digital elevation data. Computer Vision, Graphics and Image Processing 28, p. 323-44. Pacina, J. (2008) Methods for automatic delimitation of elementary forms of georelief as a part of Geomorphologic information system. Plzeň: FAV ZČU, dissertation thesis. Available at . Pacina, J. (2009) Testing of the partial derivatives approximation preciseness. In Proceedings of the conference State of Geomorphological Research in 2009. Tribun EU. Pfaltz, J. (1976) Surface networks. Geographical Analysis 8, p. 77-93. Schneider, B. (2005) Extraction of Hierarchical Surface Networks from Bilinear Surface Patches. Geographical Analysis 37, p. 244-63. Shary, P. A. (1991) Topographic method of second derivatives. In Stepanov I N (ed) The Geometry of Earth Surface Structures. Poushchino Scientific Center, p. 28-58. Shary, P. A. (1995) Land surface in gravity points classification by a complete system of curvatures. Mathematical geology 27, p. 373-90. Shary, P. A. (2008) Models of Topography. In Zhou Q Lees B Tang G (ed) Advances in Digital Terrain Analysis, Berlin Heidelberg: Springer, p. 29-57. Shary, P. A., Sharaya, L. S., Mitusov, A. V. (2002) Fundamental quantitative methods of land surface analysis. Geoderma 107, p. 1-32. Tribe, A. (1992) Automated recognition of valley lines and drainage networks from grid digital elevation models: a review and a new methods. Journal of Hydrology 139, p. 263-93.
76
Chapter five
Vincent, L., Dougherty, E. R. (1994) Morphological Segmentation for Textures and Particles. In Dougherty E R (ed) Digital image processing methods. New York: Marcel Dekker, p. 43-102. Warntz, W. (1966) The Topology of a Socioeconomic Terrain and Spatial Flows. Papers in Regional Science 17, p. 47-61.