Detecting ellipses and circles