Filtering technique for image analysis