Computer vision techniques have played an important role in promoting the informatization, digitization and intelligence of industrial manufacturing systems. Considering the rapid development of computer vision techniques, we present a comprehensive review of the state-of-the-art of these techniques and their applications in manufacturing industries. We survey the most common methods, including feature detection, recognition, segmentation and 3D modeling. A system framework of computer vision in the manufacturing environment is proposed, consisting of a lighting module, a manufacturing system, a sensing module, computer vision algorithms, a decision-making module, and an actuator. Applications of computer vision to different stages of the entire product life cycle are then explored, including product design, modeling and simulation, planning and scheduling, the production process, inspection and quality control, assembly, transportation, and disassembly. Challenges include algorithm implementation, data pre-processing, data labeling, and benchmarks. Future directions include building benchmarks, developing methods for non-annotated data processing, developing effective data pre-processing mechanisms, customizing computer vision models, and opportunities aroused by 5G.