In recent years, China's semiconductor industry has developed vigorously. Due to its late start, although many parts of production have achieved high-speed automation, the quality inspection of integrated blocks also mainly relies on human visual and subjective judgment capabilities, thus occupying a lot of manpower And, due to personal vision, emotion, fatigue, light and other factors, the work efficiency is low and the sorting difference is large. What this article studies is the application of computer industry image detection technology in integrated block pin detection. Compared with traditional manual detection, computer image detection technology has the following advantages: 1) replace manpower to reduce costs. 2) Improve product quality. 3) Improve production efficiency. This article mainly aims at the problem that the integrated block on the pipeline is prone to pin loss and attitude tilt, and realizes the automatic detection of the pin of the integrated block on the pipeline and the attitude of the integrated block. 1.1 Median filtering 1.2 Image threshold segmentation 2 Integrated block attitude detection The area method is to search for the white area in the entire image by writing a program, and at the same time record the area (the number of pixels) and the number of the white area and the coordinates of its four corners. Add the statistical areas and divide by the number of white areas to get a threshold. Since the area occupied by the pins of the integrated block is much larger than the area occupied by other useless information, the average area is The obtained threshold can remove the smaller area, thereby retaining the useful pin information of the integrated block. The area of ​​the area larger than this threshold is framed by a rectangle formed by the coordinate connections of its four corners, and the pin positioning of the integrated block can be completed. 2.2 Determination of the inclination angle of the integrated block At this time, the radian is obtained, and it must be converted into an angle. ω is the tilt angle of the manifold. Since the center point slope method takes into account the slope between the two pins on the same side, the accuracy is high, but the program is complicated, the calculation amount is large, and the program running time is long, so it is not suitable for use on high-speed pipelines. In view of this situation, an improved algorithm for the center point slope method is proposed. If the pins are on the same side, the slope between them is almost equal. On the contrary, the slopes vary greatly. Therefore, by comparing the slopes, the pins on the same side can be divided together. At this time, there are only three slope values, and then the slopes are arithmetically averaged, and the slope angle of the integrated block can be obtained with the original algorithm. The work in this paper is currently limited to the laboratory research stage. In order to make the system more widely used and better adaptable, it is also necessary to improve the automatic threshold segmentation of images under different lighting conditions and improve real-time performance. 21.5 & 22 Inch Aio,All In One Desktop,All In One Touch Screen Computer,All In One Desktop Pc Guangzhou Bolei Electronic Technology Co., Ltd. , https://www.nzpal.com
l Preprocessing The process of turning an image into a standard image is image preprocessing. The images processed in this article are taken by industrial cameras above the integrated block pipeline. The image signal contains various noises and distortions due to the influence of the input A / D conversion device and the surrounding environment. For post-detection and other work, image preprocessing must be used to eliminate noise and correct distortion, so as to improve image quality and facilitate image measurement.
The main purpose of median filtering is to remove the salt and pepper noise in the image. The object integrated block studied in this paper has more pepper and salt noise, so median filtering is adopted to optimize the image.
The median filtered image achieves better denoising purpose, and then performs threshold segmentation processing. Image threshold segmentation is a widely used image segmentation technology based on spatial domain clustering analysis. It mainly uses the difference in gray characteristics of the target and background to be extracted from the image to select an appropriate threshold. By judging the image Whether the characteristic attribute of each pixel satisfies the threshold requirement to determine whether the pixel in the image belongs to the target or should belong to the background, thereby generating a corresponding binary image. Since this system works on a high-speed pipeline and requires high real-time performance, two dynamic threshold segmentation methods are adopted, namely, between-class variance threshold segmentation and maximum entropy threshold segmentation to achieve image segmentation. The method is to use the histogram of the target image to have a typical double-peak characteristic, use probability theory and maximum entropy theory to automatically determine an optimal threshold, and binarize the image. The objects in this article are obtained after median filtering. The histogram of the image satisfies the bimodal characteristic, so the above two methods are used to process the image to obtain a binarized image.
2.1 Pin detection and positioning of the integrated block
After preprocessing the image, you can clearly see that the pins and the numbers on the integrated block are segmented from the background. The pin of the integrated block is a connected white area, and its area is much larger than that of other useless information. Therefore, the area method is used to detect the position of the pin of the integrated block.
The area of ​​the connected component in the binary image is actually the number of pixels in the connected pixel set, that is, the number of pixels included in the area boundary class. Let the size of the connected component ψ (x, y) of the binary image f (x, y) be M × N, where
The effect after processing is shown in Figure 4. The red box in the figure is used to locate the pin position.
In industrial applications, in order to allow the robotic arm to clamp the integrated block from the assembly line, it is necessary to know whether the edge of the integrated block is parallel to the assembly line, or know the angle of inclination to correct its attitude. The attitude of the integrated block on the pipeline is detected, and the inclination angle of the integrated block on the pipeline from the horizontal direction is known to determine the inclination angle of an object. The innovation of this article lies in the use of the center point slope method.
Center point slope method: assuming the coordinates of the center point of each pin of the integrated block in the image are {(xl, y1), (x2, y2), ..., (x8, y8)}, calculate each pin and its same side The slope of the pin {ll, l2, ..., ln}, then find the arithmetic average of all slopes
The main difference between the improved algorithm and the original algorithm is that the improved algorithm does not calculate all the slopes between the two pins on the same side, but first determines a point and records it as {x0, y0}. As a basis, calculate the slope of it with other pins
The calculation amount of the improved algorithm is much less than the original algorithm, and the real-time performance is stronger, so it is more practical. In order to test the accuracy of the angle measured by the program, Photoshop was used to rotate the original image at an angle of 5, 10, 30, 45, and 90 degrees. The following is a comparison table of angle recognition.
This paper describes a novel method of industrial target detection. Testing the target image shows that the system can already complete the automatic detection of the pin position of the integrated block and the real-time measurement of the inclination angle of the integrated block. In this paper, combined with the image preprocessing and area method, a new method of measuring the inclination angle of the integrated block by the center point slope method is proposed, which achieves a very good effect.