With an initial water mask after unsupervised classification, an important task and the focus of this paper is how to connect discontinuous river segments. Natural rule based connection (NRBC) connects discontinuous river segments based on a group of natural rules, with the detailed steps given in middle column of
Figure 2. An image pyramid is used to search for candidate pairs of water segments that may connect to each other. For each candidate pair, a series of criteria are tested. A successful candidate pair that satisfies all the criteria will be connected by filling the gap between the pair. After all the pairs are tested and filled (if succeed), a connected water mask is achieved.
3.1. Image Pyramid Construction
An image pyramid increases pixel (cell) size when moving upward, fills gaps between neighbouring river segments at upper levels, and generates a pool of connectable river segment candidates. A conceptual image pyramid is illustrated in
Figure 3a. Given a scale factor (
s), an
s by
s pixel block in current level is aggregated as one pixel in the upper level. After compared with the Gaussian and Laplacian kernels [
32], a simple Mean value kernel satisfies the gap connection in this study. The aggregated pixel at upper level is set as 1 if any pixel in the
s by
s pixel block is 1; otherwise the pixel value is set as 0. The spatial resolution of the image at level
k (
mk) is given in Equation (1).
As illustrated in
Figure 3b, two pixels at level
k will be connected in level
k+1 if their distance is less than
Lmin. They will not be connected if their distance is larger than
Lmax. They have a chance to be connected in distance between
Lmin and
Lmax, depending on their direction difference with pyramid construction direction. The
Lmin and
Lmax are defined in Equations (2) and (3). It is desirable to design an image pyramid that is expected to fill gaps up to the length of
Lmin , with cell size of the top level image equals to or slightly larger than
Lmin.
Figure 3.
The structure of the image pyramid and the illustration of image resolutions. (a) The image pyramid from level 0 (original water mask) to level n, with scale factor s between each level. (b) The image spatial resolution change from level k to level k+1 in the image pyramid, and minimum and maximum distances that neighbours will be connected at level k+1.
Figure 3.
The structure of the image pyramid and the illustration of image resolutions. (a) The image pyramid from level 0 (original water mask) to level n, with scale factor s between each level. (b) The image spatial resolution change from level k to level k+1 in the image pyramid, and minimum and maximum distances that neighbours will be connected at level k+1.
The topology of connected segments at the top level of the image pyramid is transmitted to lower levels gradually (mentioned as “topology transmission”). In contrast to the image pyramid construction process, each pixel in the binary mask at level
k+1 is assigned to a
s by
s pixel block in level
k. This inverse process is constrained by NDVI [
23], where a pixel at level
k will not be assigned as potential connectable area if that pixel is dense vegetation. After this inverse process, a new water mask maintains the topology at level
n, but with spatial resolution the same as level 0 (original water mask). A pool of potential connectable river segment pairs is detected in this new water mask after image pyramid.
Figure 4 is an example of the image “pyramid construction” and “topology transmission” for a part of the Bow River site.
Figure 4.
An example of image pyramid construction and topology transmission for river segments. (a)–(c) Image pyramid construction: images at level 0, 2, and 4 with pixel size at 1, 4, and 16 times of the original water mask, respectively; (d)–(f) illustrate river segments topology transmission: the topology of river segments at top level (level 4) in (d) is inherited by images at level 3, level 2 in (e), level 1, and finally to level 0 in (f); and (a,f) have the same spatial resolution.
Figure 4.
An example of image pyramid construction and topology transmission for river segments. (a)–(c) Image pyramid construction: images at level 0, 2, and 4 with pixel size at 1, 4, and 16 times of the original water mask, respectively; (d)–(f) illustrate river segments topology transmission: the topology of river segments at top level (level 4) in (d) is inherited by images at level 3, level 2 in (e), level 1, and finally to level 0 in (f); and (a,f) have the same spatial resolution.
3.2. Rules to Connect River Segments
For each pair of river segments in the pool of potential connectable segments that are adjacent to each other, a set of rules is tested to determine whether that pair of river segments is qualified to be connected. The most popular connection criteria are the centerline direction consistency, the distance (gap) between the two segments, and flow path direction [
14,
24,
25,
26]. This study avoids the method dependence on external terrain data, but develops method directly based on the water mask. After evaluating criteria that can infer the consecutiveness of two neighbouring segments, a list of most effective criteria is summarized, as illustrated in
Figure 5 and listed as follows:
Tg: The width of the gap
Tθ: The consistency of river direction
Tw: The consistency of river width
Tl: The minimum segment length of the segment pair
Ti: The consistency of imagery intensity (optionally)
Figure 5.
The conceptual model of river segment connection. The conditions that can infer the consecutiveness of two river segments include the gap width, the river direction consistency, the river width consistency, the minimum river length, and the image intensity consistency.
Figure 5.
The conceptual model of river segment connection. The conditions that can infer the consecutiveness of two river segments include the gap width, the river direction consistency, the river width consistency, the minimum river length, and the image intensity consistency.
The gap width between a segment pair should be less than a distance threshold. This distance threshold is applied to image pyramid construction, where segments further than the gap threshold will not be connected at the top level of the image pyramid. Due to the nature of rivers, river channels meander gently in most cases. Thus, two neighbouring segments of the same river should have consistent width and flow path direction. In most cases, rivers are different from other water bodies (e.g., lakes and ponds) and have a long thin shape. A minimum length is used to prevent other water bodies, such as the sewage treatment ponds in
Figure 6d from being connected. Finally, neighbouring river segments should appear to be consistent in imagery. The last rule did not apply to this study site, since the first few rules already provided satisfactory results.
Practically, gap width (
Tg) is defined before image pyramid construction.
Tg is set as 32 m in this study; then an image pyramid with 5 levels (from level 0 at bottom to level 4 at top) with scale factor 2 is built according to Equation 1.
Tg may require slight adjustments to satisfy different image scenes and image resolutions. River segment direction difference (
Tθ) is set as 90°, based on the assumption that two neighbouring river segments will have channel direction change that is less than a right angle. The segment width consistency threshold (
Tw) is given by the ratio of maximum width and minimum width of the two segments, given in Equation (4). As the width may vary along a river segment, the average width near the broken end is used to represent a segment’s width. The ratio for
Tw is set as 3 in this study, which means the maximum and minimum width should be less than three times. The minimum length threshold (
Tl) relies on the gap width between the pair, and the minimum length of a segment along the centerline direction should at least double the length of the gap, as defined in this study. Finally, the intensity difference (
Ti) can be defined as the Mean or Mahalanobis distance [
23] of image intensity between two segments, where intensity can be colour in optical imagery or backscatter value in SAR imagery. A pair is labelled as connected only if it satisfies all the rules at the same time.
Example scenarios of river segments from the Bow River site are given in
Figure 6. There are simple scenarios, where river segments are broken down by bridges and dams, with consistent direction and width, such as in
Figure 6a,b. There are also complicated cases, where river segments are broken down by waves or noise, with problematic centerlines and misleading directions, such as in
Figure 6c. There are even some cases of non-continuous rivers, such as the sewage treatment ponds in
Figure 6d. The proposed NRBC method can tackle complex cases such as in
Figure 6c, where pixel-level tracing method relied on the centerline will be invalid.
Figure 6.
Four examples of river segment connection scenarios. The blue mask is the river segments, while the over-draped red lines are centerlines extracted from the new water mask after image pyramid. (a) and (b) Simple scenarios: river segments discontinued by bridges; (c) Difficult scenario: river segments discontinued by a dam and waves; (d) Incorrected scenario: sewage treatment ponds.
Figure 6.
Four examples of river segment connection scenarios. The blue mask is the river segments, while the over-draped red lines are centerlines extracted from the new water mask after image pyramid. (a) and (b) Simple scenarios: river segments discontinued by bridges; (c) Difficult scenario: river segments discontinued by a dam and waves; (d) Incorrected scenario: sewage treatment ponds.
3.3. River Segment Connection Method
If a segment pair successfully passes all criteria and is qualified to be connected, the gap between the two segments is filled using a region growth strategy. The two segments can be connected by the centerline after image pyramid and topological transmission. The centerline pixels in the gap are used as seeds to grow and fill the gap. As shown in
Figure 7, a connected river segment includes the two original river segments and the growing centerline object filling the gap. As shown in
Figure 8, the perimeter of this connected river segment will first decrease then increase after it reaches a perimeter minima point. The growing centerline first fills the gap and reduces the perimeter until the width of the centerline object equals the width of the river itself, as illustrated in
Figure 7a–d. After this perimeter minima point, the perimeter increases due to the growing width expanding out of the gap, as in
Figure 7e–f. The perimeters associated with each centerline width produces a curve given in
Figure 8. A local minimum in
Figure 8 represents the point where the centerline growing width is close to the river width. To make the curve’s local minimum more stable, a fitted curve is used to replace the discrete values. The perimeter is minimized at the optimal width for simple scenarios. In complex scenarios with distracting factors that will generate a perimeter length curve with multiple local minimums, either the first local minimum or the overall minimum is selected, according to their corresponding shape similarity between filled area and the image pyramid.
Figure 7.
The growing centerline width to fill the gap between a river segment pair, with the centerline grows from width 1 (original mask), 10, 20, 25 (ideal width), 35, and 50 pixels in (a)–(f), respectively.
Figure 7.
The growing centerline width to fill the gap between a river segment pair, with the centerline grows from width 1 (original mask), 10, 20, 25 (ideal width), 35, and 50 pixels in (a)–(f), respectively.
Figure 8.
The perimeter of the connected river segment changes as the gap been filled with growing width centerline. The data in this Figure is related to
Figure 7.
Figure 8.
The perimeter of the connected river segment changes as the gap been filled with growing width centerline. The data in this Figure is related to
Figure 7.