To eliminate rotation deviation of sequential images mosaic when measuring linear dimensions of large scale parts with computer vision, a novel algorithm based on the chain code searching method is proposed. After image preprocessing, including image filtering, image segmentation, and edge detection, the chain code length of the contour line can be searched out by the proposed method. Then, the angle from the contour line to the coordinate axis is computed with the length of the contour line. After that, the sequence is rotated in the opposite direction and the rotation deviation is eliminated. It is prepared for the next mosaic of sequences in eliminating shifting deviation. Experiments are carried out on parts with a linear profile rotating angle from 0° to 9°. The results show that compared with the commonly used Hough transform, the new method has higher precision and faster speed, which is important in realizing online high precision measurements of large scale parts with a linear profile.