This tool performs a range filter on an input image (input
). A range filter assigns to each cell in the output grid the range (maximum - minimum) of the values contained within a moving window centred on each grid cell.
Neighbourhood size, or filter size, is specified in the x and y dimensions using the filterx
and filtery
flags. These dimensions should be odd, positive integer values (e.g. 3, 5, 7, 9, etc.).
def range_filter(self, raster: Raster, filter_size_x: int = 11, filter_size_y: int = 11) -> Raster: ...