Closed perrygeo closed 8 years ago
lossy_curved_edges.tif :+1:
In slightly more detail, the original image (with some edge artifacts that are likely nodata)
the simple mask
the slic mask
lossy_irregular_edges.tif :+1:
losey_noisey_nodata.tif :-1:
And setting slic n_clusters to 100, still :-1:
For the similar-edges images, slic solves both the lossy collars
And the simple mask's tendency to assign nodata to interior pixels
:+1: :+1:
So the scorecard is 4/5 for slic, 0/5 for simple
I should note performance... numbers look roughly like
slic_mask(...) 3.9418361187
simple_mask(...) 0.0145719051361
So for imagery that's known to have non-lossy edges, simple makes a huge difference in speed. Still some opportunities to speed up slic approach too I'm sure.
Awesome @perrygeo ! So happy that the slic
approach is working.
So for imagery that's known to have non-lossy edges, simple makes a huge difference in speed
Yes, so right now we'll assume that the command will be invoked w/ a lossy flag that will only run if the imagery is lossy. This brings up an important point: we'll want to add test fixtures / tests for non lossy imagery as well. I'll ticket and take this on.
Another side note that we discussed: we are going to implement a function that will check if the buffered window contains any nodata, and simply return a fully valid mask band - this will speed it up as a whole.
Screenshots to illustrate.
Red = Simple Mask (ie exactly equal to nodata) Purple = Additional Pixels Masked by slic approach