Abstract:One of the key issues for a vision system used for inspection of defects in Valve rocker arm installation is the real-time performance request for image process. A new Blob analysis algorithm based on Run-Length Encoding(RLE) for binary image was proposed. This algorithm requires only a single pass over the image by using the method of run-lists and dynamic array, without any need to be compared with all the RLEs at the upper line. Moreover, add the rescan algorithm in order to eliminate the labeling errors aroused by label conficts, which simplifys the process and improves the entire efficiency. The experiment results show that the proposed approach is a viable alternative for effectively labeling connected component. The algorithm has been successfully applied to a vision system fort the inspection of defects in valve rocker arm installation.