Profile Detection in Medical and Astronomical Images by Means of the Hough Transform of Special Classes of Curves