Flow accumulation
Algorithm
The accumulated flow value for each pixel is calculated using a recursive function.
When a pixel has neighboring pixels pointing to itself,
the values of these neighbours are accumulated, including the value of the pixel itself.
- The calculation is initialized by calling the recursive function for the outlet pixel.
- The function then recursively calls itself for all pixels that flow to the outlet pixel.
- The recursion stops when a pixel is reached that has no more neighbour pixels that flow into it.
See also:
Flow accumulation : functionality