using a spatial filtering method