modify major/minor detection of ellipse