Abstract:One scan algorithms of labeling connceted components aren't so efficient because of the need of a large number of stack operations and repeated search pixel neighborhood. The algorithm of labeling connceted components based on contour tracing, could decrease times of searching neighbours and accessing stack, improves it's efficiency, through labeling all contour pixels of one object in image before scanning and labelling it's pixels in image. In order to improve the efficiency, the proposed algorithm of labeling connected components based on contour tracing discards accessing stack, and adopts efficient algorithm of contour tracing. The algorithm has the advantages of higher efficiency, better stability than others.