This correspondence describes a contour extraction algorithm which can gradually improve its results until the extracted contours are closed. This is achieved by an architecture with a feedback path for local smoothing. The feedback path is activated only when one or more contours obtained are not closed in order to initiate smoothing in noisy areas of the image to remove local irregularities that cause the problems. A forward/backward boundary tracing mechanism is employed to facilitate locating any troubled areas. A smoothing method appropriate for reducing local irregularities is discussed. The proposed algorithm is very suitable for those applications that demand closed contours, such as character recognition and blob detection.