ubarsc / pyshepseg

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).
https://www.pyshepseg.org
MIT License
10 stars 4 forks source link

Handle nodata in source image during stats calculation #21

Closed gillins closed 2 years ago

gillins commented 2 years ago

Fixes #19

Ignores pixels that are equal to the nodata (if set). Really rough initial commit, will do more testing tomorrow.

@neilflood any issues with this approach?

neilflood commented 2 years ago

I think that looks like the right approach. Very good.

I feel uncomfortable about using zero for the DFLT_STATS_VALUE, but I don't have a substantially better option, off the top of my head. Let's make sure we have explored all the possibilities on that, before we merge this.