A system of automatic deviation based on linear CCD is presented to deal with the deviation phenomenon during the process of transmission of flexible material. It can accurately and rapidly detect the position of the characteristic straight line by using the linear array CCD and real-time drive motor and ball screw to promote timely and accurate location. Experimental results show that the CCD automatic deviation system have high precision and it meets the needs of most occasions for deviation correction.