Single plate defect detection algorithm and sorting device based on machine vision
Through the single board defect detection algorithm based on machine vision and an integrated sorting device, the problems of unintuitive board defect detection, large parameters and difficult to deploy in the existing technology are solved, and efficient and real-time single board defect detection and sorting in the actual working environment are realized, reducing space and manpower consumption.
Patent Information
- Application Number
- CN202510189122.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-20
- Publication Date
- 2025-06-10
AI Technical Summary
The existing veneer defect detection methods have unintuitive defect display, great influence on the surface smoothness of the veneer to be detected, large amount of deep learning model parameters, difficult to deploy in PLC programming environment, long inference, difficult to achieve real-time detection, and single-body veneer sorting machines lack the integration of pipelines, especially in visual systems.
The single-board defect detection algorithm based on machine vision is used, including brightness, contrast transformation and digital image filtering technology to process the original image, search the best image binarization threshold based on the genetic algorithm, design defect detection and positioning algorithms for sliding windows and area growth methods, and integrate sorting devices for feeding modules, vision modules, sorting units and discharge modules.
It realizes defect detection and sorting of boards that are easy to deploy in the actual working environment, reduces the amount of parameters, reduces computing power requirements, improves detection efficiency, and can accurately locate multi-defect boards, saving space and manpower consumption.
Smart Images

Figure CN120125530A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of machine vision, and in particular, to a single-board defect detection algorithm and sorting device based on machine vision. Background Art
[0002] Wood is the only renewable resource among the world's four major building materials. Plywood can greatly improve the utilization rate of log. The quality of plywood depends to a large extent on the surface quality of the single board. Detecting and positioning the defects on the surface of the single board by using a single-board sorter and automatically sorting them have a profound impact on improving the production efficiency of plywood.
[0003] At present, the single-board defect detection methods can be divided into two categories. One is the instrument-based detection method, which mainly detects by means of X-rays, microwaves, infrared rays, etc. However, the defects shown by this type of method are not intuitive and are greatly affected by the smoothness of the surface of the single board to be detected, and there are many restrictions in actual applications. The other is the machine vision-based detection method. This type of detection method mainly realizes the detection and positioning of single-board defects through digital image processing algorithms or deep learning detection models. Among them, the parameter quantity of the single-board defect detection model based on deep learning is often large, and it is often difficult to deploy in the actual working environment. The single-board defect detection model constructed based on deep learning is often stacked by multiple convolutional neural networks, which involves a large number of matrix parameters and post-processing operations, and the parameter quantity is large. In the actual working environment, especially in the currently common PLC programming environment, a large number of neural network parameters are difficult to directly program to realize matrix operation processing, and the actual inference time is relatively long without the support of GPU devices, and it is difficult to meet the real-time requirement. The existing single-board sorting pipeline is very complex, involving multiple units such as feeding, vision detection, sorting, etc. The single sorting mechanism has greater application value. At present, the single-board sorter often lacks the integration degree of the pipeline, especially in the vision system.
[0004] Therefore, we propose a single-board defect detection algorithm and sorting device based on machine vision. Summary of the Invention
[0005] The present invention mainly solves the technical problems existing in the above-mentioned prior art, and provides a single-board defect detection algorithm and sorting device based on machine vision.
[0006] In order to achieve the above purpose, the present invention adopts the following technical solutions. A single-board defect detection algorithm based on machine vision specifically includes the following steps:
[0007] The first step: Process the original image by using brightness, contrast transformation and digital image filtering technology to enhance the difference between the defective part and the background image;
[0008] Step 2: Search for the optimal image binarization threshold based on the genetic algorithm;
[0009] Step 3: Design a defect detection and localization algorithm for scanning the image line by line based on the sliding window and region growing method.
[0010] A sorting device for a single-board defect detection algorithm based on machine vision, including the above-mentioned single-board defect detection algorithm based on machine vision, specifically including a feeding device, a vision acquisition device, an industrial control computer, a sorting mechanism, and a discharging device.
[0011] Preferably, the feeding device includes a scissor lift, front and rear baffle plates, a supporting plate, a driving frame, and a feeding chute. The feeding part can be directly connected to the single-board production line. The stacked single boards are stabilized by the front and rear baffle plates, and the feeding chute is driven by the driving frame to send the single boards to the sorting area. At the same time, after the previous single board is sorted, the lift rises a certain height to align the current single board with the feeding chute and continue the feeding and sorting operations.
[0012] Preferably, the vision acquisition device is used to capture the single-board image before the sorting stage, transmit the image to the industrial control computer for defect detection and localization, and perform sorting operations according to the detection results. The vision acquisition device includes a light source system and an industrial camera. Compared with general cameras, industrial cameras are more adaptable to the complex working conditions in actual factory operations and support bus transmission.
[0013] Preferably, the sorting mechanism includes a double-layer feeding module and a sorting module. The double-layer feeding module is composed of two layers of motion mechanisms, both of which are driven by sliding guide rails. The horizontal guide rail is located at the bottom layer and is used to drive the first-level material transportation platform to move horizontally. A longitudinal guide rail is provided on the first-level material transportation platform and is used to drive the second-level material transportation platform located thereon to move longitudinally, so as to ensure that defects at any position can be aligned with the sorting punching holes.
[0014] Preferably, the sorting module includes an upper punch, a pressing die, a pressing die hole, a middle die, a middle die hole and a lower punch. When the sorting device moves to the first single-board defect position, after the device receives an operation instruction, it can drive the upper feeding punch, the upper punch and the lower punch to press the lower feeding plate and the defective single board. At this time, the removing punch is facing the defect. Control the removing punch and the upper feeding punch to punch downward within the stroke. While cutting off the defective part of the single board, a patch is obtained and embedded into the hole of the single board. At this time, the defective piece falls into the lower feeding plate channel, the upper feeding punch resets, the upper feeding plate advances, and the defective piece generated during the operation of the previous upper sorting mechanism is ejected. The sorting device moves to the second single-board defect position. After the device receives an operation instruction, it can drive the lower feeding punch, the upper punch and the lower punch to press the lower feeding plate and the defective single board. At this time, the removing punch is facing the defect. Control the removing punch and the lower feeding punch to punch upward within the stroke. While cutting off the defective part of the single board, a patch is obtained and embedded into the hole of the single board. At this time, the defective piece is pushed to the upper feeding plate channel, then the lower feeding punch resets, the lower feeding plate advances, and the defective piece generated during the operation of the lower sorting mechanism is ejected.
[0015] The present invention provides a single-board defect detection algorithm and a sorting device based on machine vision. It has the following beneficial effects:
[0016] 1. For the single-board defect detection algorithm and sorting device based on machine vision, by setting the single-board defect detection algorithm and the sorting device, the defect detection and recognition algorithm based on the sliding window and region growing method and the filtering and grayscale operations of RGB images are essentially operations on grayscale matrices, which are easy to be implemented by PLC programming and are easy to be deployed in the actual working environment. The threshold search method based on the genetic algorithm greatly speeds up the threshold search efficiency of the binarization operation and is convenient for deployment in the actual operation environment. At the same time, the detection method proposed in this patent is also reliable for the detection of multi-defect single boards, and can accurately locate multiple defects on a single single board. The sorting device integrates a feeding module, a vision module, a sorting unit and a discharging module, and can automatically complete the defect detection, positioning and subsequent sorting work of the single board. At the same time, the highly integrated single machine greatly saves space.
[0017] 2. For the single-board defect detection algorithm and sorting device based on machine vision, the single-board defect detection algorithm is based on digital image processing technology, can locate the defect position and judge the defect size. Compared with the current common detection models based on machine learning or convolutional neural networks, the number of parameters is reduced exponentially, which is convenient for PLC programming implementation, greatly reduces the computing power requirements, and is more convenient for deployment in the actual production environment.
[0018] 3. For the single-board defect detection algorithm and sorting device based on machine vision, the threshold segmentation method needs to traverse the image gray threshold to find the optimal threshold segmentation point, which takes a long time in the actual production environment and is difficult to meet the requirements of real-time operation. This patent proposes a threshold search method based on genetic algorithm, which uses genetic algorithm to quickly search for the optimal segmentation threshold, improves the defect detection efficiency, and facilitates the deployment in the actual operation environment.
[0019] 4. For the single-board defect detection algorithm and sorting device based on machine vision, the sorting device integrating the feeding module, vision module, sorting unit and discharging module greatly saves the operation space and labor consumption compared with the complicated assembly line design. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is the flowchart of the technical solution of the present invention;
[0021] Figure 2 It is the flowchart of the adaptive threshold calculation of the present invention;
[0022] Figure 3 It is the flowchart of the genetic algorithm of the present invention;
[0023] Figure 4 It is the flowchart of the single-board defect detection of the present invention;
[0024] Figure 5 It is the schematic diagram of the principle of the region growing method algorithm of the present invention;
[0025] Figure 6 It is the schematic diagram of the sorting mechanism of the present invention;
[0026] Figure 7 It is the comparison diagram of the original single-board image and the detection result of the present invention;
[0027] Figure 8 It is the detection effect diagram of the multi-defect single board of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0028] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only exemplary, and for those of ordinary skill in the art, other implementation drawings can be obtained by extension according to the provided drawings without creative work.
[0029] The structures, proportions, sizes, etc. illustrated in this specification are only used to cooperate with the content disclosed in the specification for those skilled in this technology to understand and read, and are not used to limit the qualified conditions for the implementation of the present invention. Therefore, they do not have substantial technical significance. Any modification of the structure, change of the proportional relationship, or adjustment of the size, without affecting the effects that the present invention can produce and the purposes that can be achieved, should still fall within the scope covered by the technical content disclosed in the present invention.
[0030] It should be noted that like reference numerals and letters refer to like items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0031] In the description of the embodiments of the present invention, it should be noted that the orientation or positional relationship indicated by the terms "center", "upper", "lower", "inner", "outer", "side", etc. is based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the product of the present invention is usually placed during use. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation of the present invention. In addition, the terms "first", "second", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.
[0032] In the description of the embodiments of the present invention, it should also be noted that unless otherwise clearly specified and limited, the terms "set", "installed", "connected", "connected to" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the embodiments of the present invention can be understood according to specific situations.
[0033] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0034] Embodiment 1: A single-board defect detection algorithm based on machine vision, such as Figure 1As shown in the figure, it specifically includes the following steps: The first step: Use brightness, contrast transformation, and digital image filtering technology to process the original image to enhance the difference between the defective part and the background image; The second step: Search for the optimal image binarization threshold based on the genetic algorithm; The third step: Design a set of defect detection and localization algorithms for scanning the image line by line based on the sliding window and region growing method. By setting up a single-board defect detection algorithm and a sorting device, the defect detection and recognition algorithm based on the sliding window and region growing method and the filtering and grayscaling operations of the RGB image are essentially operations on the gray matrix, which are easy to implement by PLC programming and are easy to deploy in the actual working environment. The threshold search method based on the genetic algorithm greatly speeds up the threshold search efficiency of the binarization operation, which is convenient for deployment in the actual working environment. At the same time, the detection method proposed in this patent is also reliable for the detection of multi-defect single boards, and can accurately locate multiple defects on a single single board. The sorting device integrates a feeding module, a vision module, a sorting unit, and a discharging module, and can automatically complete the defect detection, localization, and subsequent sorting of single boards. At the same time, the highly integrated single machine greatly saves space.
[0035] Embodiment 2: On the basis of Embodiment 1, as Figures 2 - 8 shown, the single-board defect detection and localization algorithm based on the sliding window and region growing method: The original single-board image is stored in the computer in the form of a three-dimensional matrix (RGB three channels). The detection and localization of single-board defects are essentially to determine the positions of defective pixels. Defects such as knots, holes, cracks, and color changes on the single board are generally darker in color than normal single boards. Therefore, based on this defect feature, the original image can be preprocessed and grayscaled to highlight the difference between the defective part and the background. Then, based on the sliding window, the entire single board is scanned line by line to ensure the completeness of defect detection, and it is judged whether there are defects in the window according to the gray mean value in the sliding window. For the window with defects, the region growing method is used for defect detection and localization. The specific process is as follows:
[0036] The first step: Brightness and contrast adjustment: There are many types of single-board defects. For some defects, the gray values are small after grayscaling and are relatively close to the background gray values. In order to highlight the difference between such defects and the background, and at the same time to make the defective part and the background have better contrast, first perform brightness transformation and contrast transformation on the picture. Images with large contrast and high brightness generally have better layering. The image brightness transformation formula is:
[0037] T(x) = I(x) + (1 - I(x)) × I(x)
[0038] where I(x) is the pixel value of the original image, and T(x) is the pixel value of the processed image, and both are images with values in the range of [0, 1].
[0039] Step 2: Grayscale conversion: Grayscale conversion is the process of converting a color image into a grayscale image. In this project, the defects on the veneer have a large difference from the background in terms of pixel values, and the veneer defects often do not have rich color details. Therefore, after grayscale conversion, there is still a large difference from the background. At the same time, grayscale conversion converts a three-channel RGB image into a single-channel grayscale image, greatly reducing the computational complexity of subsequent image processing and defect detection, and significantly improving the speed of wood veneer defect detection. The RGB pixel weighted average method is used for image grayscale conversion, and the specific formula is as follows:
[0040] Gray(i,j) = α × R(i,j) + β × G(i,j) + γ × B(i,j)
[0041] Among them, the sum of the three weights is 1. R(i,j), G(i,j), and B(i,j) are the pixel values of the three channels of the original color image respectively, and Gray is the grayscale value of the processed image. The selection of weights can also be further optimized later. The formula currently used refers to the empirical formula of grayscale transformation, that is, according to the sensitivity of people to different colors, the green channel is enhanced, and the other channels are adjusted accordingly. The specific formula is as follows:
[0042] Gray(i,j) = 0.299 × R(i,j) + 0.587 × G(i,j) + 0.114 × B(i,j)
[0043] Step 3: Threshold segmentation based on genetic algorithm: First, determine the growth threshold based on the adaptive threshold method. In this invention, the image segmentation threshold is determined based on the improved maximum inter-class variance method. The maximum inter-class variance method ensures that the variance between the two pixel sets after segmentation is the largest when the selected threshold is determined. The specific process is as follows:
[0044] Denote the grayscale range of the image as between 0 and L - 1. In this patent, the value of L for the veneer image processed is 256. The number of pixel points with grayscale j is nj. Then the probability of the pixel with grayscale j appearing is:
[0045] p j = n j / N,
[0046] If a certain threshold t is selected, the original image pixels can be divided into the following two categories:
[0047] C 0 ={0, 1,..., t}, C 1 ={t + 1,...., L - 1}
[0048] Then, for any pixel taken from the image, the probabilities of it belonging to the two categories are respectively:
[0049]
[0050] Let the overall grayscale mean of the image be denoted as:
[0051]
[0052] Then the between-class variance between the two types of pixels can be obtained as:
[0053] φ(t) = P 0 (t)[μ 0 (t) - μ T + P 1 (t)[μ 1 (t) - μ T
[0054] When the between-class variance is maximized, the taken t is the segmentation mean. On this basis, further considering the pixel distribution difference between the defective part and the background part, the single-board image is regarded as composed of defective pixels and background pixels, and its grayscale distribution can be regarded as the probability density functions of the background and defective pixel distributions. Assuming that the two components of this mixed distribution, the background and the defect, both follow normal distributions, their means, standard deviations, and prior probabilities are respectively denoted as. The calculation methods of the mean and prior probability have been given above. The following gives the calculation method of the standard deviation:
[0055]
[0056] When the defect and the background are separated enough, the following conditions should be satisfied:
[0057] μ 1 - μ 0 > λ(σ 0 + σ 1 )
[0058] where λ is the distribution characteristic coefficient of the defect and the background, generally between 2 and 3. The flow of this adaptive threshold determination algorithm is as Figure 2 shown. Based on the genetic algorithm to find the optimal segmentation threshold, the genetic algorithm simulates the biological evolution mechanism in nature to optimize the function. Its core idea is to maintain a certain scale of population, and continuously cross and mutate the dominant individuals in the population to generate new individuals until the termination condition is met. When using the genetic algorithm, first encode the optimization parameters. In this patent, the grayscale values ranging from 0 to 255 are encoded as 8-bit binary digit strings using binary encoding. The overall flow of the algorithm is as follows:
[0059] S1: Create the initial population, randomly select a certain number of thresholds, and encode them as binary strings;
[0060] S2: Select the inter-class variance as the fitness function to evaluate the quality of individuals, calculate the fitness of each individual in the initial population, and use the roulette wheel selection method to select individuals for crossover to generate new individuals. This step can be achieved by randomly exchanging the chromosome fragments of the parent generation;
[0061] S3: Mutate the new population individuals with a certain probability to obtain a new evolved population;
[0062] S4: Calculate the fitness of the new population. If it meets the requirements, select the individual with the highest fitness as the optimization result. Otherwise, repeat the above process. Figure 3 shown.
[0063] Step 4: Line-by-line scanning of single-board images based on sliding windows: After preprocessing the original image and graying it to obtain a grayscale image, the image is scanned line by line based on a sliding window. The size of the sliding window can be further optimized according to the size of the sorting punch. The idea of the sliding window is to specify the size of the rectangular window (width and height) and the step length of the window movement, and use the window to scan the image to obtain the pixel value of the image within the window. After the image is grayed, the grayscale value of the defective part is often relatively large, so a certain threshold can be selected. When the pixel mean in the sliding window is less than the threshold, it can be considered that there is no defect in the window, and the sliding window continues to scan the image; when the pixel mean in the sliding window is greater than or equal to the threshold, it is considered that there is a defect in the area, and the defect is detected and located in the area. The detection and positioning algorithm used in this step initially uses the regional growing method. This method can well determine the center position of the defect, that is, the size information. The sliding window logic is as follows: Figure 4 shown.
[0064] Step 5: Region growing method: The grayscale values of the images at the defects of wood veneers are very close and the defects often appear in blocks. It is very suitable to use the region growing method to determine the center position and size information of the defects. The main idea of the region growing method is to start from a certain pixel and continuously expand in the direction of the grayscale around it. The similarity can be determined by the grayscale difference. If it is lower than a certain threshold, the two pixels are considered similar and can be expanded. After determining the threshold in the third step, during the growth process, two coordinate values are recorded, namely the upper leftmost (the point with the smallest pixel u and v values during the expansion process) and the lower rightmost (the value with the largest pixel u and v values during the expansion process) of the expanded pixel. The u and v values are actually the row and column subscripts of the matrix that stores the grayscale image of the veneer in the computer. They are continuously maintained during the growth process to obtain the upper left corner vertex and lower right corner vertex values of the largest circumscribed rectangle of the defect. These two coordinates can also be used to determine the center coordinates of the rectangle, thereby obtaining the defect center and size information. The specific process of the algorithm is as follows Figure 5As shown. At this point, the size of the defective area can be determined based on the u and v values of the upper left and lower right boundaries of the defective pixel, that is, the size of the rectangular area determined by the upper left and lower right boundary points, and the center coordinates of the rectangle are the coordinates of the center position of the defect. This single-board defect detection algorithm is based on digital image processing technology and can locate the defect position and determine the size of the defect. Compared with the currently common detection models based on machine learning or convolutional neural networks, the number of parameters is reduced exponentially, which is convenient for PLC programming implementation, greatly reduces the computing power requirements, and is easier to deploy in actual production environments. The threshold segmentation method needs to traverse the image grayscale threshold to find the optimal threshold segmentation point, which takes a long time in the actual production environment and is difficult to meet the real-time operation requirements; this patent proposes a threshold search method based on a genetic algorithm, which uses a genetic algorithm to quickly search for the optimal segmentation threshold, improves the efficiency of defect detection, and facilitates deployment in actual operating environments.
[0065] Embodiment 3: Based on Embodiment 1 and Embodiment 2, as shown in Table 1, the detection accuracy can exceed 0.9 for different types of defects.
[0066] Table 1 Algorithm detection accuracy analysis
[0067]
[0068] As shown in Table 2, the average processing time of a single board image by different algorithms is statistically analyzed. Compared with the traversal threshold search method, the detection time is shortened by 180ms, which can meet the standard of real-time detection.
[0069] Table 2 Algorithm running time analysis
[0070]
[0071] Embodiment 4: A sorting device based on a single board defect detection algorithm of machine vision, such as Figure 6As shown in the figure, it includes the above-mentioned single-board defect detection algorithm based on machine vision, specifically including a feeding device, a vision acquisition device, an industrial computer, a sorting mechanism, and a discharging device. The feeding device includes a scissor lift, front and rear baffle plates, a supporting plate, a driving frame, and a feeding trough. The feeding part can be directly connected to the single-board production line. The stacked single boards are stabilized by the front and rear baffle plates, and the feeding trough is driven by the driving frame to send the single boards to the sorting area. At the same time, after the previous single board is sorted, the lift rises a certain height to align the current single board with the feeding trough and continue to perform the feeding and sorting operations. The vision acquisition device is used to capture the single-board image before the sorting stage and transmit the image to the industrial computer for defect detection and positioning, and perform sorting operations according to the detection results. The vision acquisition device includes a light source system and an industrial camera. Compared with general cameras, industrial cameras are more adaptable to the complex working conditions in actual factory operations and support bus transmission. The sorting mechanism includes a double-layer feeding module and a sorting module. The double-layer feeding module is composed of two layers of moving mechanisms, both driven by sliding guide rails. The horizontal guide rail is located at the bottom layer and is used to drive the first-level material transportation platform to move horizontally. A longitudinal guide rail is provided on the first-level material transportation platform to drive the second-level material transportation platform located thereon to move longitudinally, so as to ensure that defects at any position can be aligned with the sorting punching holes. The sorting module includes an upper punch, a pressing die, a pressing die hole, a middle die, a middle die hole, and a lower punch. When the sorting device moves to the first single-board defect position, after the device receives the operation instruction, it can drive the upper feeding press head, the upper press head, and the lower press head to press the lower feeding plate and the defective single board. At this time, the removing punch is facing the defect. Control the removing punch and the upper feeding punch to punch downward within the stroke. While cutting off the defective part of the single board, a patch is obtained and embedded into the hole of the single board. At this time, the defective piece falls into the lower feeding plate channel, the upper feeding punch resets, and the upper feeding plate advances, ejecting the defective piece generated during the previous operation of the upper sorting mechanism. When the sorting device moves to the second single-board defect position, after the device receives the operation instruction, it can drive the lower feeding press head, the upper press head, and the lower press head to press the lower feeding plate and the defective single board. At this time, the removing punch is facing the defect. Control the removing punch and the lower feeding punch to punch upward within the stroke. While cutting off the defective part of the single board, a patch is obtained and embedded into the hole of the single board. At this time, the defective piece is pushed to the upper feeding plate channel, and then the lower feeding punch resets, and the lower feeding plate advances, ejecting the defective piece generated during the operation of the lower sorting mechanism. Through the sorting device integrating the feeding module, the vision module, the sorting unit, and the discharging module, compared with the complex assembly line design, it greatly saves the working space and labor consumption.
[0072] The foregoing has shown and described the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments, and what is described in the above embodiments and the specification is only to illustrate the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention will also have various changes and improvements, and these changes and improvements fall within the scope of the present invention claimed. The scope of the present invention claimed is defined by the appended claims and their equivalents.
Claims
1. A single board defect detection algorithm based on machine vision, characterized in that: The specific steps include: Step 1: Use brightness, contrast transformation and digital image filtering technology to process the original image and enhance the difference between the defective part and the background image; Step 2: Search for the optimal image binarization threshold based on genetic algorithm; Step 3: Design a defect detection and location algorithm for line-by-line scanned images based on sliding window and region growing method.
2. A sorting device based on a single board defect detection algorithm using machine vision, characterized in that: It includes the single board defect detection algorithm based on machine vision as described in claim 1, and specifically includes a feeding device, a visual acquisition device, an industrial computer, a sorting mechanism and a discharging device.
3. The sorting device of the single board defect detection algorithm based on machine vision according to claim 2 is characterized in that: The feeding device comprises a scissor-type lift, front and rear baffle plates, a supporting plate, a driving frame and a feeding trough.
4. The sorting device of the single board defect detection algorithm based on machine vision according to claim 2 is characterized in that: The visual acquisition device includes a light source system and an industrial camera.
5. The sorting device of the single board defect detection algorithm based on machine vision according to claim 2 is characterized in that: The sorting mechanism includes a double-layer feeding module and a sorting module. The double-layer feeding module is composed of two layers of motion mechanisms, both of which are driven by sliding guide rails, wherein the transverse guide rail is located at the bottom layer, and a longitudinal guide rail is arranged on the first-level material transport platform. The sorting module includes an upper punch, a die, a die hole, a middle die, a middle die hole and a lower punch.