Changes between Version 7 and Version 8 of GSoC/2014/ImplementationOf3DRasterFlowLine
- Timestamp:
- 07/03/14 19:45:46 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GSoC/2014/ImplementationOf3DRasterFlowLine
v7 v8 118 118 119 119 I started to work on on-the-fly gradient computation. Gradient is computed with central differencing scheme of second order approximation (also on edges). I tested it against numpy implementation, the newest version is required because the older implementations are less precise on the edges. Then I tried to incorporate the computation of the gradient in r3.flow and it still needs some improvements and optimization. Tests show that the resulting flowlines differ slightly from flowlines computed when I use precomputed gradient. So I will look into that. 120 121 === Week 7 === 122 I fixed the on-the-fly gradient computation and it gives now identical results compared to case where I use precomputed gradient arrays. 123 The gradient array (2x2x2) is not computed every time when the algorithm requests the values, but instead, when it's close enough, it reuses the last gradient values (which happens quite often with reasonably small step size). As profiling showed, it made a significant difference. I wanted to see if computing gradient in larger window would improve it even more, however this required to rewrite this part and the code became too complicated and difficult to maintain because of handling map edges and other things that I decided to leave this approach. Moreover preliminary testing didn't show convincing improvement. I might get to it later. 124 Then, I started rewriting the module in c, some parts which are not likely to be changed. That made me reconsider and reorganize a few things in the main script.