| 66 | * Further discussion about the algorithm mechanism (about the edge effect) |
| 67 | >>Markus: |
| 68 | >>That is easy, there is no need to cut off edges.I would also not work with the number of pixels in nominator and denominator, because this number of pixels will vary for each window anyway depending on how many pixels are discarded because the spectral difference is larger than the spectral bandwidth. NULL cells are discarded anyway. Chopping off edges can be avoided for example for the very first pixel at row 0, col 0 by setting the window to those pixels east and south of the corner pixel, of course adhering to the spatial bandwidth. The window will thus be about a quarter of the size of a full window, that is not a problem. The new bandvalue is new value += weight * current value and weightsum += weight |
| 69 | >> |
| 70 | >>after processing all cells in the window, the new value is new value = new value / weightsum |
| 71 | >> |
| 72 | >>It does not matter how many valid cells are in the moving window. |
| 73 | >> |
| 74 | >>See also r.resamp.filter |
| 75 | |
| 76 | |
| 77 | * Got the access for GRASS-addons-svn and [https://trac.osgeo.org/grass/browser/sandbox/bo/i.segment.gsoc2016 sandbox] |
| 78 | |