Python implementation of image segmentation algorithm of Shepherd et al (2019) Operational Large-Scale Segmentation of Imagery Based on Iterative Elimination. Remote Sensing 11(6).
Sometimes you may need to create a large consistent segmentation, but then subset parts out of it for validation or further processing (ie. Landsat tile boundaries). This is more complex than a simple image subset - the RAT also must be collapsed to just the rows in the output image.
This PR does this by building on the paging functionality adding some handy routines at the same time. I hope this is a good example of further processing with the RatPage stuff. I've added this to the tiling module since it seemed to fit well with the existing code, although it has now made it rather large.
There is a new test script - test_pyshepseg_subset.py which can be used to exercise this functionality.
Further enhancements planned:
Add the ability to use projected coords with test_pyshepseg_subset.py
Update the histogram as we go
Optional Mask image for irregular shapes
Optional extra output column with the original segId in the input image so they can be linked
Sometimes you may need to create a large consistent segmentation, but then subset parts out of it for validation or further processing (ie. Landsat tile boundaries). This is more complex than a simple image subset - the RAT also must be collapsed to just the rows in the output image.
This PR does this by building on the paging functionality adding some handy routines at the same time. I hope this is a good example of further processing with the RatPage stuff. I've added this to the
tiling
module since it seemed to fit well with the existing code, although it has now made it rather large.There is a new test script -
test_pyshepseg_subset.py
which can be used to exercise this functionality.Further enhancements planned:
test_pyshepseg_subset.py
cc: @petescarth