摘要

Image output by computer is done row by row, the shortcoming of which is that we cannot know the topological relations between points at the image boundary. To obtain the closed boundary of the target from an image and turn points' row permutation of boundary into sequence permutation, an algorithm based on 4-connection relation of pixel points is proposed and the analysis of its correctness and complexity is given. Compared with classical operators and existing method, the single pixel boundary extracted from gray images by this algorithm is more complete and more distinct. Moreover, it has a lower time complexity and can eliminate the noise inside and outside the target area. The obtained sequence permutation of points is also conducive to follow-up image processing.