Popular Science: About Machine Vision Technology
Machine vision technology is an interdisciplinary subject involving artificial intelligence, neurobiology, psychophysics, computer science, image processing, pattern recognition and many other fields. Machine vision technology mainly uses computers to simulate human visual functions, extract information from images of objective things, process and understand them, and finally use them for actual detection, measurement and control. The biggest feature of machine vision technology is fast speed, large amount of information and multiple functions.
1. Technical characteristics of machine vision technology
1.1 Basic introduction
Machine vision technology mainly uses computers to simulate human visual functions, but it is not just a simple extension of the human eye, but more importantly, it has a part of the function of the human brain - extracting information from images of objective things, processing and understanding, Ultimately used for actual detection, measurement and control.
1.2 System Advantages
The application of machine vision technology to egg quality inspection has incomparable advantages over manual inspection. Surface defects, size and shape are important characteristics of egg quality. Using machine vision technology for detection can not only eliminate the interference of human subjective factors, but also quantitatively describe these indicators, avoiding the detection results that vary from person to person, reducing In order to detect grading errors, the productivity and grading accuracy are improved.
1.3 System Composition
A typical industrial machine vision application system includes digital image processing technology, mechanical engineering technology, control technology, light source lighting technology, optical imaging technology, sensor technology, analog and digital video technology, computer software and hardware technology, human-machine interface technology, etc.
2. Technical Analysis of Machine Vision Technology
2.1 Basic Concepts
"Machine vision", that is, the use of machines instead of human eyes for measurement and judgment.
Machine vision system refers to the capture of images through machine vision products (ie, image capture devices, divided into CMOS and CCD), and then transmitted to the processing unit, through digital processing, according to pixel distribution and brightness, color and other information. , to determine the size, shape, color, etc. Further, on-site device operation is controlled based on the result of the determination.
2.2 Application Introduction
With the development of computer technology and fieldbus technology, machine vision technology has become increasingly mature and has become an indispensable product in modern processing and manufacturing industries. It is widely used in food and beverages, cosmetics, pharmaceuticals, building materials and chemicals, metal processing, electronic manufacturing, packaging. , automobile manufacturing and other industries.
2.3 Application Impact
The introduction of machine vision, instead of traditional manual detection methods, has greatly improved the quality of products put on the market and improved production efficiency.
Because the machine vision system can quickly obtain a large amount of information, it is easy to process automatically, and it is easy to integrate with design information and processing control information. Therefore, in the modern automated production process, people use the machine vision system widely for working condition monitoring and finished product inspection. and quality control. The feature of machine vision system is to improve the flexibility and automation of production. In some dangerous working environments that are not suitable for manual work or where artificial vision is difficult to meet the requirements, machine vision is often used to replace artificial vision; at the same time, in the process of mass industrial production, using artificial vision to check product quality is inefficient and not accurate. , The use of machine vision detection methods can greatly improve production efficiency and production automation. Moreover, machine vision technology is easy to realize information integration, which is the basic technology to realize computer integrated manufacturing.
2.4 Types of Machine Vision Industrial Inspection Systems
In terms of its detection nature and application scope, machine vision industrial inspection systems are divided into two categories: quantitative and qualitative inspections, and each category is divided into different subcategories. Machine vision is very active in various application fields of industrial online inspection, such as: visual inspection of printed circuit boards, automatic flaw detection of steel plate surfaces, parallelism and perpendicularity measurement of large workpieces, container volume or impurity detection, automatic identification and classification of mechanical parts and Geometric measurement, etc. In addition, in many situations that are difficult to detect by other methods, the use of machine vision systems can be effectively implemented. The application of machine vision technology is increasingly replacing humans to complete many tasks, which undoubtedly greatly improves the level of production automation and the intelligence level of inspection systems.
2.5 Differences between machine vision and computer vision
Machine vision technology is different from computer vision, it involves image processing, artificial intelligence and pattern recognition
Machine vision is the engineering that focuses on integrating mechanical, optical, electronic, software systems, inspecting natural objects and materials, human defects and manufacturing processes, it is designed to detect defects and improve quality, operational efficiency, and safeguard product and process safety. It is also used to control machines. Machine vision is the application of computer vision to industrial automation.
3. Application examples of machine vision technology
Machine vision technology systems have been widely used in various aspects of quality inspection, such as: large-scale workpiece parallelism and perpendicularity measuring instruments using laser scanning and CCD detection systems. Rotate the axis system, rotate the pentagonal prism to sweep out the reference planes that are parallel or perpendicular to each other, and compare them with the faces of the large workpiece to be measured. When machining or installing large workpieces, the error detector can be used to measure the parallelism and perpendicularity between surfaces.
Using the stroboscopic light as the illumination light source, and using the area array and linear array CCD as the detection device for the outline and dimension of the rebar, a dynamic detection system for online measurement of the geometric parameters of the hot-rolled rebar is realized.
Vision technology monitors bearing load and temperature changes in real time, eliminating the danger of overloading and overheating. The traditional passive measurement of machining quality and safe operation by measuring the ball surface is transformed into active monitoring.
Using microwave as the signal source, according to the square wave of different baud rates issued by the microwave generator, the crack on the metal surface is measured. The higher the frequency of the microwave wave, the narrower the measurable crack.
4. System Types of Machine Vision Technology
4.1 Intelligent Integrated Test System of Dashboard Assembly Based on Machine Vision
EQ140-II automobile instrument panel assembly is an instrument product produced by an automobile company in my country. The instrument panel is equipped with a speedometer, a water temperature meter, a gasoline meter, an ammeter, and a signal warning light. The production batch is large and needs to be carried out once before leaving the factory. Final quality inspection. The inspection items include: detecting the indication error of five instrument pointers such as the speedometer; detecting whether 24 signal warning lights and several lighting 9 lights are damaged or missing. Generally, manual visual inspection is used for inspection, which has large errors and poor reliability, which cannot meet the needs of automated production. The intelligent integrated test system based on machine vision technology has changed this status quo, realizing intelligent, fully automatic, high-precision and fast quality inspection of the instrument panel assembly, overcoming various errors caused by manual inspection, and greatly improving the detection performance. efficiency. The whole system is divided into four parts: an integrated multi-channel standard signal source that provides analog signal sources for the instrument panel, a dual-coordinate CNC system with image information feedback positioning, a camera image acquisition system and a master-slave parallel processing system.
4.2 Automatic damage control system on metal plate surface
The surface quality of metal plates such as large-scale power transformer coils, flat wires, radio masks, etc. has high requirements, but the original detection method using manual visual inspection or dial indicator plus needle control is not only susceptible to subjective factors, And may paint the surface to be tested and bring new scratches. The automatic flaw detection system for metal plate surface uses machine vision technology to automatically inspect metal surface defects, and performs high-speed and accurate detection during the production process. At the same time, due to the non-contact measurement, the possibility of new scratches is avoided. In this system, a laser is used as the light source, the stray light around the laser beam is filtered out by a pinhole filter, and the beam expander and collimator mirror make the laser beam into parallel light and uniformly illuminate the inspected object with an incident angle of 45 degrees. sheet metal surface. The metal plate is placed on the inspection table. The inspection table can move in three directions of X, Y and Z. The camera adopts TCD142D 2048 line Chen CCD, and the lens adopts ordinary camera lens. The CCD interface circuit adopts the single-chip microcomputer system. The host PC mainly completes image preprocessing, defect classification or scratch depth calculation, etc., and can display the detected defects or scratch images on the monitor. The two-way communication between the CCD interface circuit and the PC is carried out through the RS-232 port, and combined with the asynchronous A/D conversion method, it constitutes a man-machine interactive data acquisition and processing.
The system mainly uses the self-scanning characteristics of the linear CCD and the movement of the inspected steel plate in the X direction to obtain the three-dimensional image information of the surface of the metal plate.
4.3 Vehicle Body Inspection System
The 100% online inspection of the 800 series car body contour dimension accuracy of British ROVER Automobile Company is a typical example of machine vision system used in industrial inspection. The system consists of 62 measuring units, each measuring unit includes a laser and a CCD camera to detect 288 measurement points on the body shell. The car body is placed under the measuring frame, and the precise position of the body is calibrated by software.
The calibration of the measuring unit will affect the detection accuracy, so it is paid special attention. Each laser/camera unit is calibrated offline. At the same time, there is a calibration device calibrated with a coordinate measuring machine in an offline state, which can perform online calibration of the camera top.
The inspection system detects three types of car bodies at a rate of one car body every 40 seconds. The system compares the test results with the qualified size of the person and the CAD model, and the measurement accuracy is ±0.1mm. ROVER's quality inspectors use the system to determine the dimensional consistency of key parts, such as the overall shape of the body, doors, and glass windows. Practice has proved that the system is successful and will be used for vehicle body inspection of other ROVER systems.
4.4 Banknote Printing Quality Inspection System
The system uses image processing technology to compare and analyze more than 20 features (number, Braille, color, pattern, etc.) of the banknotes on the banknote production line to detect the quality of the banknotes, replacing the traditional human eye identification method.
4.5 Intelligent Traffic Management System
By placing cameras on traffic arteries, when there are illegal vehicles (such as running red lights), the cameras will take pictures of the license plates of the vehicles and transmit them to the central management system. The system uses image processing technology to analyze the captured pictures and extract the license plate number. Stored in the database, it can be retrieved by managers.
4.6 Metallographic Analysis
The metallographic image analysis system can accurately and objectively analyze the matrix structure, impurity content and tissue composition of metals or other materials, and provide a reliable basis for product quality.
4.7 Medical Image Analysis
Automatic classification and counting of blood cells, chromosome analysis, cancer cell identification, etc.
4.8 Inspection system of bottled beer production line
It can detect whether the beer reaches the standard capacity, whether the beer label is complete, etc.
5. Discussion and analysis of machine vision technology
The wide applicability of machine vision technology in various dosage forms in the pharmaceutical industry can usher in a wider market space for it: the filling level of liquid preparations, impurities in the bottle and the quality of the cap; unqualified capsules; The lack of medicines; the coding effect of the outer packaging of pharmaceutical products; the full box and quantity detection of the outer packaging carton.
Discuss the coexistence of constraints and driving factors
Voice from the end user - the calculation of cost should be viewed from a developmental perspective.
The main reason why machine vision technology has not been widely used is that the cost of products is too high. The environment for wide application has not yet been formed. But from the perspective of development, the long-term accumulation of manual inspection costs will also be the same as machine vision equipment. Matching machine vision equipment on high-speed production lines will be a relatively obvious development trend. With the gradual upgrading and improvement of pharmaceutical enterprises, the demand for machine vision technology by enterprises will become more and more common. In addition, from the perspective of social responsibility, more and more companies in the pharmaceutical industry regard "guarantee of patient life safety" and "responsible performance of enterprises" as their paramount mission. This also promotes the use of machine vision technology in the industry. within the application.
Voices from suppliers - responsibility, technology development, policy requirements, 'one must not be missing'.
Many domestic pharmaceutical companies hope to keep costs as low as possible in drug production. The application of some corresponding testing equipment is limited to a certain extent. The consideration of pharmaceutical companies to reduce production costs is a key factor restricting the wide application of machine vision technology in the pharmaceutical industry.
On the other hand, the industry characteristics of pharmaceutical companies also determine the urgent need for machine vision technology. If the company has very high requirements on itself. They have a very responsible attitude towards product quality and social responsibility. Then they will not hesitate to apply machine vision technology. Because they know where and what to do. what money to spend.
From a technical point of view, there are many detection technologies for pharmaceutical packaging. Machine vision technology is not alone. But for some more complex or specific detection items. Machine vision technology can indeed give the safest and clearest detection. On the premise that the testing equipment can reach the same quality, pharmaceutical companies can choose the equipment they think is more suitable. But if they give up quality for some reason. Select the equipment whose detection effect is not the best or can not fully meet the detection requirements. This is not worth the loss.
Analyze the advantages of machine vision technology compared to other inspection technologies
Voice from end users - manual detection and photoelectric detection can no longer meet the detection needs of enterprises
According to the reporter's interviews with many pharmaceutical manufacturers, manual inspection is still widely used in my country's pharmaceutical enterprises. Mr. Lin Jie, the production manager of Nu Skin's production base in Huzhou, China, explained the working process of manual inspection by taking capsule dosage forms as an example: Capsules, usually rotating, are driven by a conveyor belt. Passed by the operator and checked by human vision. There is no doubt that this traditional method cannot avoid some objective risks. Such as human eye fatigue, errors, lack of concentration in the high-speed production process, inability to quantitatively evaluate the detection effect, speed limitations, etc. These unfavorable factors will undoubtedly It will become a bottleneck for the development of pharmaceutical enterprises in the future. Packaging itself involves a problem of identification. Through some reliable machine identification technology, a more stable effect will be achieved than manual identification. In this case. Machine vision technology came into being. And will win a wider market. at the same time. In the high-tech particle counting process, photoelectric detection equipment is not as authoritative and accurate as machine vision technology in the process of imaging and particle counting.
voice from suppliers
——More comprehensive and reliable machine vision technology will replace other related detection technologies in the future
In addition to machine vision technology, inspection technologies such as manual inspection, optoelectronic technology, and weighing technology are also applied by pharmaceutical companies. But compared with other inspections, machine vision technology is superior in inspection accuracy and simplicity of operation. For example, photoelectric technology is more complicated in debugging and setting. A slight change in some details of the packaging line will lead to inaccurate test results. For example: the change of displacement and the appearance of vibration. Because the medical packaging line is a High-speed packaging lines are more complicated. So these situations often occur. It will be more troublesome for pharmaceutical companies to debug the settings of testing equipment after discovering problems. And if pharmaceutical companies do not find these problems in testing, then there may be products with packaging problems that are put on the market for sale. The consequences are unimaginable.
In addition, the detection items of photoelectric detection are very single. Only one item can be detected. This requires the installation of multiple photoelectric detection devices on the packaging line. For example: in the packaging inspection of bottled medicines. Bottle placement, liquid level, and labeling require three photoelectric detection devices. However, if machine vision equipment is used, one device can be inspected at one time. Moreover, when machine vision equipment is applied, it can be detected as long as it is within the line of sight. Then some problems such as displacement and vibration on the production line will not affect the final detection effect.
It is particularly worth mentioning that machine vision equipment is also very suitable for the situation that the packaging line of pharmaceutical companies often changes the packaging products. For example: a pharmaceutical company's blister packaging line is likely to produce related drugs for the treatment of gastric diseases today. And the second The day will be changed to the production of related drugs for the treatment of heart disease. The content of the detection of these two drugs will definitely be different. The machine vision equipment can save the inspection items of more than a dozen products in the software. When changing products, just call up the corresponding The content is enough. There is no need to re-debug the detected parameters. It wastes a lot of time.
6. The application status of machine vision technology
Machine vision technology is to use machines instead of human eyes to measure and judge. The machine vision system refers to converting the captured target into an image signal through a machine vision product (ie, image capturing device, divided into CMOS and CCD), and transmits it to a dedicated image processing system. The image system performs various operations on these signals to extract the characteristics of the target, and then controls the on-site equipment actions according to the results of the discrimination.
A typical industrial machine vision application system includes the following parts: light source, lens, CCD camera, image processing unit (or image capture card), image processing software, monitor, communication/input and output unit, etc. First, the camera is used to obtain the image signal of the target under test, and then it is converted into a digital signal through A/D conversion and sent to a dedicated image processing system. Then output the judgment result according to the preset judgment criterion, and control the driving actuator to perform corresponding processing. Machine vision technology is a comprehensive technology, including digital image processing technology, mechanical engineering technology, control technology, light source lighting technology, optical imaging technology, sensor technology, analog and digital video technology, computer software and hardware technology, human-machine interface technology, etc. Machine vision emphasizes practicality and requires the ability to adapt to the harsh environment of industrial sites, with reasonable cost performance, common industrial interfaces, high fault tolerance and safety, and strong versatility and portability. It puts more emphasis on real-time, requiring high speed and high precision.
The output of the vision system is not the image video signal, but the detection result after operation processing, such as size data. After the upper computer such as PC and PLC obtain the detection results in real time, the motion system or I/O system is instructed to perform corresponding control actions, such as positioning and sorting. From the classification of the operating environment of the vision system, it can be divided into PC-BASED system and PLC-BASED system. The PC-based system takes advantage of its openness, high programming flexibility and good Windows interface, while the overall system cost is low. Take DATA TRANSLATION company in the United States as an example, the system contains a high-performance image capture card, which can generally be connected to multiple lenses. In terms of supporting software, there are several levels from low to high, such as C/C++ programming in Windows95/98/NT environment. DLL, visual control activeX provides a graphical programming environment under VB and VC++, and even object-oriented machine vision configuration software under Windows, users can use it to quickly develop complex and advanced applications. In a PLC-based system, vision functions more like an intelligent sensor, and the image processing unit is independent of the system, exchanging data with PLC through serial bus and I/O. System hardware generally uses high-speed dedicated ASIC or embedded computer for image processing, system software is solidified in the image processor, and the menu displayed on the monitor is configured through a simple device similar to a game keyboard, or the software is developed on the PC and then download. The PLC-based system embodies the characteristics of high reliability, integration, miniaturization, high speed and low cost.
6.1 Automatic Print Quality Inspection
Most of the inspection systems used in automatic print quality inspection equipment use high-definition and high-speed camera lenses to capture standard images, and then set certain standards on this basis; then capture the images to be inspected, and then compare the two. The CCD linear sensor converts the change of the light quantity of each pixel into an electronic signal. After the comparison, as long as the detected image is different from the standard image, the system considers the detected image as an unqualified product. All kinds of errors in the printing process are only the difference between the standard image and the detected image to the computer, such as smudges, light printing, ink dot color difference and other defects are included in it.
The earliest technology used for quality inspection of printed matter is to compare the standard image with the image to be inspected. The more advanced technology is based on RGB three primary colors for comparison. What is the difference between automatic machine inspection and human eye inspection? Taking human eyes as an example, when we concentrate on a printed matter, if the contrasting colors of the printed matter are relatively strong, the smallest defects that can be found by human eyes, It is a defect that the contrast color is obvious and not less than 0.3mm; but it is difficult to maintain a continuous and stable visual effect relying on human ability. But on the other hand, if you are looking for defects in printed matter of the same color system, especially in a light color system, the defects that can be found by the human eye need to be at least 20 gray levels. An automated machine can easily find defects as small as 0.10mm, even if the defect is only one gray level away from a standard image.
However, in practical use, even the same full-color contrast system has different ability to distinguish chromatic aberration. Some systems are able to find defects with large contour and color variations, while others are able to identify extremely small defects. For white cardboard and some simple-style printed materials, such as the Japanese KENT cigarette label and the American Marlboro cigarette label, simple detection may be enough, while most domestic printed materials, especially various labels, have many characteristics. With too many glitter elements, such as gold, silver cardboard, hot stamping, embossing or varnishing prints, this requires the quality inspection equipment to have enough ability to find extremely small grayscale differences, maybe 5 grayscales level difference, perhaps a more stringent 1 grayscale difference. This is crucial to the domestic label market.
The accuracy of the comparison between the standard image and the image of the printed product to be inspected is the key issue for the inspection equipment. Usually, the inspection equipment collects the image through the lens. In the middle part of the lens range, the image is very clear, but the image at the edge may produce false The detection result of the ghost part will directly affect the accuracy of the whole detection. From this point of view, if only the contrast of the full-width area is not suitable for some fine prints. If the obtained image can be subdivided again, for example, the image is divided into 1024dpi X 4096dpi or 2048dpi X 4096dpi, the detection accuracy will be greatly improved, and the detection result will be more stable because the virtual image of the edge part is avoided.
The use of testing equipment for quality testing can provide real-time reports and detailed and complete analysis reports of the entire testing process. The on-site operator can rely on the timely alarm of the automatic detection equipment, and adjust the problems in the work in time according to the real-time analysis report, which may reduce the scrap rate by more than one percentage point. Tracking the production process is more conducive to the management of production technology. Because the high-quality testing equipment required by customers is not only to detect whether the printed matter is good or bad, but also to have the ability to analyze after the fact. What some quality testing equipment can do can not only improve the qualified rate of finished products, but also assist manufacturers to improve the technological process, establish a quality management system, and achieve a long-term stable quality standard.
6.2 Gravure printing machine position control and product inspection
The video image of the printed product is continuously captured by the camera set on the production line, and the camera speed is below 30 frames/s and can be adjusted. The image captured by the camera is first quantized, the analog signal is converted into a digital signal, a key frame that effectively represents the content of the lens is extracted from it, and it is displayed on the monitor. For a frame of image, the analysis method of still image can be used to process, through size measurement and multi-spectral analysis, each color mark on the video image can be identified, and the color mark spacing and color parameters of the color mark as well as some other correlations can be obtained.
Due to various factors, various noises, such as Gaussian noise, salt and pepper noise, and random noise, will appear. Noise brings many difficulties to image processing. It has a direct impact on image segmentation, feature extraction, and image recognition. Therefore, the images collected in real time need to be filtered. Image filtering requires the ability to remove noise outside the image while maintaining the details of the image. When the noise is Gaussian noise, the linear filter is most commonly used, which is easy to analyze and implement; however, the linear filter has a poor filtering effect on the salt and pepper noise. The traditional median filter can reduce the salt and pepper noise in the image, but the effect It is not ideal, that is, the noise that is sufficiently dispersed is removed, and the noise that is close to each other will be retained, so when the salt and pepper noise is serious, its filtering effect is significantly worse. The improved median filter method of this system. This method first obtains the median value after removing the pixels with the maximum and minimum gray values ??in the noise image window, then calculates the difference between the median value and the corresponding pixel gray value, and then compares it with the threshold value to determine whether to use the obtained value. Replace the gray value of the pixel.
Image segmentation In this stage, each color mark is detected and separated from the background. The edge of the object is reflected by the discontinuity of grayscale. The L edge types can be divided into two types, one is the step edge, the pixels on both sides of it are The gray value is significantly different; the second is the roof-shaped edge, which is located at the turning point L of the gray value from increasing to decreasing. For step edges, the second-order directional derivative is zero-crossing at the edge, so it can be calculated by differential. to do the edge detection operator. The differential operator edge detection method is similar to the high-pass filtering in the high spatial domain, and has the effect of increasing high-frequency components. This type of operator is quite sensitive to noise. For step edges, the commonly available operators are the gradient operator Sobel algorithm. sub and Kirsh operator. Laplace transform and Kirsh operator are available for roof-like edges. Since the color scale is a rectangle and the gray levels of adjacent edges are quite different, edge detection is used to segment the image. Here, the Sobert edge sub is used for edge detection, which uses the local difference operator to find the edge, which can better separate the color scale. In the actual detection process, the color image edge detection method is used, and the appropriate color base (such as intensity, chroma, saturation, etc.) is selected for detection. According to the type characteristics of the printing press, that is, the characteristics of the colors and layouts of the printing presses, multi-threshold processing is performed to obtain the binary images of each color.
The segmented image is measured, and the object is identified by the measured value. Since the color scale is a rectangle with a regular shape, the following features can be extracted: (1) Calculate the area of ??the rectangle by pixels, (2) Rectangularity, (3) ) chromaticity (H ) and saturation (S ), then according to the number of pixels in the interval of each color standard to get the spacing between the color scales, compare with the set value, get the difference between the two, carry out m times of measurement in total, take the average The difference value provides the corresponding adjustment signal to the digital AC servo adjustment part. To adjust the relative position of the color roller, thereby eliminating or reducing printing misalignment. In feature extraction, multispectral image analysis is performed on the image, which can quantitatively represent the color scale, such as the color of the pixels in the color number image, and the HIS format is used to obtain two parameters of the color information of each color scale: chroma and saturation. to test the quality of the ink. Statistical calculation is performed on the binary images of each color or model matching with standard graphics is performed, and parameters such as ink scraps in the printing process are measured.
The printing machine runs through the unwinding machine and passes through each printing unit in turn, printing and drying of various colors, and rewinding by the winder. Each color printing will print a color code on the edge of the printing material for color registration. The color marking line is 10 mm horizontally and 1 mm wide. The marking lines of each adjacent color should be parallel to each other when overprinting is accurate, and the vertical (longitudinal) is 20 mm larger. The video image of the printed product is continuously captured by the camera set on the production line. Through size measurement and multi-spectral analysis, each color mark on the video image can be identified, and the color mark spacing and the color parameter L of the color mark can be obtained. If the interval between adjacent two color marks is greater than or less than 20 mm, it means that there is a deviation in overprinting. The deviation signal is sent to the servo frequency conversion drive unit, and the AC servo motor is driven to make the corresponding color register correction roller ML move up and down to extend or shorten the stroke of the printing material from the printing plate roller of the previous unit to the printing plate roller of this unit for dynamic correction.