preprocessing for circle detection