Improve filter performance using a resized image