Machine vision is a cross-cutting discipline with rich technologies,covering digital image processing,control,optical imaging,sensors,analog and digital video,computer software and hardware technologies,and human-machine interfaces and so on.It has the advantages of high precision detection,precise positioning,high degree of automation,and enabling non-contact measurement.Based on the Microsoft Foundation Classes(MFC)under VC++,the key technologies of image acquisition,machine vision inspection,decision making and I/O control are realized in this paper.Then a set of coach electric box testing system based on machine vision is built.The system effectively avoids mis-installation and miss-fitting of components in the assembly process,prevents the outflow of problem products,and plays a good effect in improving production efficiency and reducing the number of operating personnel.The dissertation focuses on the following research and implementation:1、Aiming at the motion control of the test bench actuator,various types of sensor signals are detected to realize the control of each cylinder to complete the predetermined movement,and the servo motor system is driven to bring the pressing mechanism to a predetermined working position,so as to ensure coordinated and normal motion.2、Aiming at conducting test of electric box,including insurance conduction and relays,DC contactor functions and connections are correct or not,through the analysis of different types of electrical boxes and planning the configuration database,the models are then divided and tested in stages to ensure the comprehensiveness of the test.3、Implementing color detection for semi-transparent fusesin electrical boxes,the color fluctuations under non-uniform illumination conditions are large,showing "data insensitive" characteristics.In view of this,the method of joint detection of HSI color space and histogram is proposed to perform color Detection and test data analysis show that this method can achieve the detection of translucency fuses better.Compared with single model and single algorithm,the proposed method has stronger robustness.4、For the character recognition of components,the traditional template matching method has the problems of poor similar character recognition and low recognition rate.In view of this,a recognition method based on support vector machine is proposed.Firstly,the image is preprocessed,then the features of the preprocessed characters are extracted.The multi-classification problem of SVM is designed and multiple classifiers are designed for training.Through the comparison of different kernel functions,the appropriate kernel functions are selected for classification and recognition.Experimental results show that this method shows a strong adaptability to similar character recognition ability,and the overall character recognition rate is higher. |