| The detection of port block’s internal thread defects has the characteristics of difficulty to observing,various kinds,high manual missing rate and not unified standard.Therefore,this paper proposes a vision-based electromechanical control system that combines different camera viewing and lighting angles,multi-threading,and sequential control to replace manual detection.The paper studies the structure of the feeding and transmission parts,the key method of detecting defect characteristics,the detection process judgment of the vision system,and the automatic screening results.The thesis composes the hardware framework of the whole system by building an image acquisition module,a vibration feeding module,a mechanical transmission material distribution module and an electrical control module.According to the specific functional requirements of the system and the environment of the port block production site,the system hardware is selected,and a port block positioning and clamping mechanism is designed,so that the workpiece can move stably during the entire system inspection process and determine the defect results.Solved the problem of increased false detection rate due to workpiece shaking.(1)Aiming at the problem of difficult image acquisition caused by the concealment of some defect positions,this paper proposes a multi-directional photographing processing scheme based on the combination of different angles and lighting of the endoscope.Responsible for 120° sub-angle lighting and photography,realizing the complete naked image acquisition of port block defects,making the detection content clear.(2)Considering the time length of three cameras for detection and work step design,this paper proposes a visual and electrical control scheme for FIFO queue multi-thread processing of sub-feeding,which not only ensures the stable operation of the system process,but also improves the performance of the system.Feeding speed.(3)Aiming at the randomness of the position of thread defects,this paper separates and converts the entire thread of the thread by using curve-circle fitting,curve-polar coordinate transformation,straight line adaptive segmented one-side processing and global distance detection.Visual data greatly facilitates the determination of detection standards.The visual part of the inspection system cooperates with the control part composed of programmable logic controller PLC,air cylinder,precision electric cylinder positioning module and light source controller,which clarifies the inspection standard and process,and completes phased verifications such as system testing.,which solves the problem of simultaneous detection of such workpieces.In the actual use test after the completion of the system construction,the design scheme of the paper has been effectively verified.Finally,after multiple defects are jointly detected and processed,the test results are better than the standards required by the system,which realizes the project requirements of fast and accurate sorting,and greatly improves the production efficiency. |