| Screw as an indispensable industrial necessity in our daily life,its output in China has been very large.So in the process of screw production,the number of screws for real-time monitoring and packaging is of great significance.At present,the packaging production line of most screw manufacturers mainly uses the method of weighing type counting.Although the efficiency is high,it is vulnerable to oil pollution,poor accuracy,low degree of automation,and easy to leak material.The production and packaging of screws urgently needs to develop high-precision,high-automation screw counting equipment.Computer vision has developed rapidly in recent years and has become one of the important means to assist intelligent factory.Based on computer vision,counting screws through image processing and image segmentation recognition technology is an effective way to realize automatic counting screws.Therefore,the following research work is carried out in this paper from the th ree aspects of imaging hardware system,image preprocessing and screw counting recognition algorithm:First of all,this paper counting objects screw for imaging analysis,according to the imaging needs to set up the screw automatic counting system hardware implementation scheme,the analysis of the different types of light source,camera,lens,imaging methods such as influence on imaging quality,after comparing with rigorous analysis after decided to adopt the high brightness light source as a back light bar,At the same time,a 2K pixel wire array CMOS camera with focal length adjustable lens was used to conduct a large number of experiments for debugging,and strive to achieve high-quality imaging.Counting system based on machine vision is presented fi nally screw of the overall layout and preliminary building experiment platform,set up a camera and a light source above the belt is for blanking control station,the end of the belt just close to the belt height set a light source and the camera to counting station,the operation of the computer and display algorithm and the effect of demonstration.And use special gigabit network for image data transmission.Secondly,the pre-processing technology of the falling screw image is studied.The characteristics and key information of the screw image are analyzed,and the gray scale is used to remove the color information and retain the area and contour information.Compared with four classical filtering algorithms,the verification conclusion is that bilateral filtering is more suitable for the working conditions of this subject,which can not only filter out certain isolated point noise,but also retain the original contour of the screw.Finally,for the difficulty of screw adhesion,morphological treatment is carried out.Corrosion and open operation are adopted to eliminate the fine adhesion area between screws,smooth the screw contour boundary,and prepare and pave for the subsequent screw counting algorithm.Thirdly,the screw counting recognition algorithm is studied,and the screw counting logic used in this topic is briefly introduced.Then the paper analyzes in detail the screw identification and counting algorithm used in the actual project--Blob analysis.After several experiments,the paper puts forward the need to improve the current algorithm in view of the low accuracy of the algorithm in the count of adhesive screws and the strict requirements on hardware.Finally,the experiment compares the two kinds of template matching method and the watershed algorithm,experiment on adhesion screw counting effect which can identify the most stable,which is based on the shape of the template matching method,counting on the adhesion screw identification effect is the most stable connected domain analysis method,is put forward based on connected domain analysis with the shape of the template matching method combining the improved algorithm.Finally,the application software development and field test of the screw automatic counting system based on machine vision are carried out.The software system mainly includes image processing module,intelligent blanking module and system setting module.Next,the Halcon platform used in the algorithm research of this topic is explained and introduced,and the joint development of Halcon and Visual Studio is completed,and the design and test of the application software is completed.Finally,field experiments were carried out.Based on the experimental platform built by ourselves,the prototype was improved and a large number of experiments were carried out.Online tests were carried out on the screw automatic counting system,and the counting accuracy and timeliness met the requirements of the project,and the counting accuracy reached 99.93%. |