Detecting corners in an image