1

Is there a way to eliminate isolated pixels just like we can do with the classification sieve of the QGIS SCP plugin?

I've done a classification of an image that contains many isolated pixels which I want to remove.

enter image description here

1 Answer 1

5

Just use a focal operator or reduceNeighborhood with a mode reducer.

image.focalMode(3)

or

image.reduceNeighborhood(ee.Reducer.mode(), ee.Kernel.circle(1))
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.