Plate processing edge sealing detection method and system based on machine vision
By machining the edge detection method based on machine vision, through image processing and clustering technology, to accurately identify the border seal area and defective area of the board, solve the problem of inaccurate information in the existing technology, improve the accuracy of defect detection Essence
Patent Information
- Application Number
- CN202411644613.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-11-18
AI Technical Summary
In the prior art, inaccurate boundary information in plate edge seal detection leads to poor results in the determination of edge sealing areas and defect detection effects.
Adopt the edge detection method based on machine vision, obtain and process the image, perform a clustering and merger of gradient images, calculate the merger coefficient and classification coefficient, mark the non -destructive area and use the minimum external rectangle to indicate the edge area. Computing identification defective areas.
The accuracy of the boundary recognition of the border area and the non -border area has been enhanced, and the identification ability of the edge defects is enhanced, especially in the case of boundary damage.
Smart Images

Figure CN119379661A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing, and in particular to a machine vision-based plate processing edge banding detection method and system. Background Art
[0002] Edge banding is a common process in furniture manufacturing and woodworking. It refers to the treatment of the edge of the board to protect the edge of the board and prevent the intrusion of moisture, dust, etc., while also improving the aesthetics and durability of the board. Edge banding usually uses edge banding, which is a slender material that matches the material of the board and is adhered to the edge of the board by hot melt adhesive or special edge banding adhesive.
[0003] Due to the operation problems of the edge banding machine, the edge of the board is prone to collapse, short bands and too long ends. In addition, due to the instability of the glue used in the edge banding, the edge banding is prone to bulging glue and debonding. Therefore, it is necessary to detect the edge banding effect. For example, the Chinese patent application document with publication number CN114820594A discloses a method, related equipment and storage medium for detecting edge banding defects of board materials based on images. The method includes: when the grayscale information of the specified area of the image to be detected meets the preset grayscale condition, the image to be detected is divided; the adaptive histogram equalization algorithm is used to equalize each divided sub-image and the edges of any two sub-images in adjacent positions are bilinearly interpolated; the board boundary information in the target image to be detected is detected; based on the board boundary information, the position of the edge banding is obtained; according to the position of the edge banding, the actual grayscale information of the edge banding is obtained; based on the actual grayscale information of the edge banding, the ideal grayscale information of the edge banding is obtained; based on the actual grayscale information of the edge banding, the grayscale abnormal area is identified based on the actual grayscale information and the ideal grayscale information of the edge banding; based on the identification result of whether there is a grayscale abnormal area, whether there is an edge banding defect is determined.
[0004] In the prior art, according to the edge detection method, the upper and lower boundary lines of the plate in the target image to be detected are detected, and the target boundary line of the plate in the target image to be detected is detected, and the upper boundary line, the lower boundary line and the target boundary line are used as the plate boundary information. However, if the upper and lower edges of the edge banding are damaged, the boundary information will be inaccurate, thereby affecting the determination of the edge banding area and subsequent defect detection. Summary of the invention
[0005] In order to solve the technical problem of how to improve the accuracy of boundary recognition between edge-banded areas and non-edge-banded areas, the present application provides a machine vision-based plate processing edge-banding detection method and system.
[0006] In the first aspect, the present application provides a plate processing edge banding detection method based on machine vision, which adopts the following technical solutions: The machine vision-based plate processing edge banding detection method comprises the following steps: acquiring a captured image and processing it to obtain a gradient map, clustering the gradient map to obtain a plurality of clusters, wherein a connected domain composed of pixels contained in each cluster is an initial region; calculating a merging coefficient of two clusters, and when the merging coefficient is greater than a preset merging threshold, merging the two clusters to obtain a region to be tested; calculating a ratio of a mean pixel value of pixels in the region to be tested to a mean pixel value in a preset standard edge banding region, taking the absolute value of the difference between the ratio and 1 as a classification coefficient, and marking a region to be tested whose classification coefficient is less than a preset coefficient threshold as a lossless region; making the minimum circumscribed rectangle of the lossless region the edge banding region, outputting 0 in response to the same pixel values of pixels between the edge banding region and the lossless region, and outputting 1 otherwise, to obtain a defective region.
[0007] The beneficial effects are as follows: the initial area is delineated, and then similar initial areas are merged according to the merging coefficient to obtain the area to be tested, the area to be tested is classified, the lossless area on the seal is found, and the minimum outer rectangle of the lossless area is used to express the area where the seal is located, that is, the edge-sealed area. The edge-sealed area includes the lossless area and the defective area. The defective area is obtained by performing an XOR operation on the pixel values in the edge-sealed area and the lossless area. Compared with directly using edge calculation to determine the edge of the edge-sealed area, the boundary division between the edge-sealed area and the non-edge-sealed area is more accurate, so as to improve the accuracy of subsequent defect recognition, especially for damage on the boundary, the recognition accuracy is higher.
[0008] Optionally, the calculation formula for the merging coefficient is: ,in, is the merging coefficient, is the number of pixel values of the first cluster, is the number of pixel values of the second cluster, The pixel value in the first cluster is The ratio of the pixel point to all the pixels of the first cluster, The pixel value in the second cluster is The ratio of the pixel of to all the pixels of the second cluster. represents the hyperbolic tangent function.
[0009] The beneficial effects are: It represents the difference in the number of pixel values in the cluster. It is used to measure the similarity between two clusters in pixel value distribution. The merger coefficient is obtained by combining the difference and similarity, and the possibility of merging two clusters is quantified by the merger coefficient.
[0010] Optionally, the captured image is taken and processed to obtain a gradient map, including the steps of: gray-scaling the captured image to obtain a gray-scale map; calculating the maximum value of the pixel value ratio between each pixel point and the pixel points in the eight neighborhoods, and taking the maximum value as the maximum gradient value; replacing the pixel value of each pixel point with the maximum gradient value to obtain a gradient image.
[0011] The beneficial effect is that in the gradient image, the pixel value of the edge area is higher, and the pixel value of the non-edge area is lower, thereby highlighting the edge features of the image.
[0012] Optionally, the gradient graph is clustered to obtain multiple clusters, and the clustering algorithm used is DBSCAN.
[0013] Optionally, the calculation method of the neighborhood radius in the cluster is: calculate the similarity evaluation of each grayscale value and the standard grayscale value; traverse the similarity evaluation of all grayscale values, take the pixel point corresponding to the maximum similarity evaluation value as the target pixel point, take the absolute value of the ratio of the gradient value of the target pixel point to the gradient value of any pixel point and 1 as the distance value, and take the minimum value of the distance value as the neighborhood radius.
[0014] The beneficial effect is that a suitable neighborhood radius is set according to the pixel values of the pixels in the edge-sealed area, that is, the value of the neighborhood radius is adaptively adjusted according to the image content, which improves the recognition accuracy compared to using a fixed neighborhood threshold.
[0015] Optionally, the similarity rating is calculated as: ,in, Gray value Similar evaluation with standard gray value, is the standard grayscale value, which is the pixel value of the pixel point in the standard edge sealing area. The gray value is The ratio of the pixel to the total number of pixels in the gradient map.
[0016] The beneficial effect is: identifying the area in the image that is most similar to the standard grayscale value, determining the area in the edge banding area that is more similar to the standard edge banding area (defect-free edge banding area), and finding the non-damaged area in the edge banding area in the image.
[0017] Optionally, the calculation formula for the merging coefficient is: ,in, is the merging coefficient, The pixel value in the first cluster is The ratio of the pixel point to all the pixels of the first cluster, The pixel value in the second cluster is The ratio of the pixel point to all the pixels of the second cluster, represents the hyperbolic tangent function.
[0018] In the second aspect, the present application provides a plate processing edge banding detection system based on machine vision, which adopts the following technical solutions: The machine vision-based plate processing edge banding detection system comprises: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the machine vision-based plate processing edge banding detection method is implemented.
[0019] The beneficial effect is: the above-mentioned machine vision-based plate processing edge banding detection method is generated into a computer program and stored in a memory so as to be loaded and executed by a processor, thereby making a system based on the memory and the processor for easy use.
[0020] This application has the following technical effects: 1. Define the initial area, then merge similar initial areas according to the merging coefficient to get the area to be tested, classify the area to be tested, find the lossless area on the seal, and use the minimum outer rectangle of the lossless area to express the area where the seal is located, that is, the edge-sealed area. The edge-sealed area includes the lossless area and the defective area. The defective area is obtained by performing an XOR operation on the pixel values in the edge-sealed area and the lossless area. Compared with directly using edge calculation to determine the edge of the edge-sealed area, the boundary division between the edge-sealed area and the non-edge-sealed area is more accurate, so as to improve the accuracy of subsequent defect recognition, especially for damage on the boundary, the recognition accuracy is higher.
[0021] 2. Set a suitable neighborhood radius according to the pixel values of the pixels in the edge-sealed area, that is, adaptively adjust the value of the neighborhood radius according to the image content. Compared with using a fixed neighborhood threshold, the recognition accuracy is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easily understood. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-restrictive manner, and the same or corresponding numbers represent the same or corresponding parts.
[0023] Figure 1 It is a method flow chart of the plate processing edge banding detection method based on machine vision in an embodiment of the present application.
[0024] Figure 2 is a diagram showing the plate structure of the seal.
[0025] Figure 3 It is a flow chart of a method for acquiring a gradient map in a plate processing edge banding detection method based on machine vision in an embodiment of the present application.
[0026] Description of the accompanying drawings: 1. Seal. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0028] It should be understood that when the terms "first", "second", etc. are used in the claims, specification and drawings of the present application, they are only used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the specification and claims of the present application indicate the presence of the described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their collections.
[0029] The present application embodiment discloses a machine vision-based plate processing edge banding detection method for detecting whether there are defects such as damage in the edge banding area of the plate. Figure 1 , including steps S1 to S4, which are specifically as follows: S1: Acquire and process the collected image to obtain a gradient map, cluster the gradient map to obtain multiple clusters, and the connected domain composed of the pixels contained in each cluster is an initial region.
[0030] The camera collects images including the edge banding area, referring to Figure 2 , the area where the seal 1 is located is the edge sealing area.
[0031] Reference Figure 3 , the acquisition of the gradient map includes steps S10 to S12, which are as follows: S10: grayscale the captured image to obtain a grayscale image.
[0032] The captured image is a color image, i.e., an RGB (Red, Green, Blue) image. Grayscale processing is an image processing technology that converts a color image into a grayscale image. In a grayscale image, the color value of each pixel is converted into a single brightness value, which usually ranges from 0 to 255, where 0 represents black, 255 represents white, and the values in between represent different shades of gray. Grayscale processing is an existing technology and will not be described in detail here.
[0033] S11: Calculate the maximum value of the ratio of the pixel value between each pixel point and the pixel points in the eight neighborhoods, and take the maximum value as the maximum gradient value.
[0034] In an image, each pixel has its own position and surrounding pixels adjacent to it, which are called the pixels in the neighborhood. The eight-neighborhood pixel refers to the pixel centered on the current pixel, including the adjacent pixels above, below, left, right, and four diagonals.
[0035] For each pixel in the image, calculate the ratio of its pixel value to that of each pixel in the eight neighborhoods, that is, divide the pixel value of the current pixel by the pixel value of each neighborhood pixel. Replace the original pixel value of each pixel with the calculated maximum gradient value. In this way, each pixel in the original image represents the intensity of its edge, rather than the original brightness or color information.
[0036] S12: Replace the pixel value of each pixel with the maximum gradient value to obtain a gradient image.
[0037] After completing the above steps, a gradient image is obtained. In the gradient image, the pixel values in the edge area are higher and the pixel values in the non-edge area are lower, thus highlighting the edge features of the image.
[0038] The gradient map is clustered to obtain multiple clusters, and the clustering algorithm used is DBSCAN (Density-Based Spatial Clustering of Applications with Noise, density-based spatial clustering algorithm). DBSCAN is an existing technology and will not be described in detail here.
[0039] The neighborhood radius is a parameter in the DBSCAN algorithm that determines the spatial range and density of clustering. A fixed neighborhood radius can be used. However, when the pixel value change in the edge area is not obvious (for example, the color of the edge area is lighter), a fixed neighborhood threshold may not be used to identify the damage in the edge area. Therefore, it is necessary to set a suitable neighborhood radius according to the pixel value of the pixel points in the edge area, that is, the value of the neighborhood radius needs to be adaptively adjusted according to the image content.
[0040] The neighborhood radius is set as follows: Calculate the similarity evaluation between each gray value and the standard gray value. The calculation formula for the similarity evaluation is: ,in, Gray value Similar evaluation with standard gray value, is the standard grayscale value, which is the pixel value of the pixel point in the standard edge sealing area. The gray value is The ratio of the pixel to the total number of pixels in the gradient map.
[0041] The standard gray value refers to the gray value of the pixel in the preset standard edge banding area. The standard edge banding area is a defect-free edge banding area.
[0042] Traverse the similarity evaluation of all gray values, take the pixel corresponding to the maximum similarity evaluation value as the target pixel, take the absolute value of the difference between the ratio of the gradient value of the target pixel and the gradient value of any pixel and 1 as the distance value, and take the minimum distance value as the neighborhood radius.
[0043] The distance value is expressed mathematically as: ,in, Represents the distance value, Represents the gradient value of the target pixel. Represents the gray value of any pixel.
[0044] In other embodiments, the calculation formula for similarity evaluation may also be: ,in, Gray value Similar evaluation with standard gray value, is the standard grayscale value, which is the pixel value of the pixel point in the standard edge sealing area. The gray value is The ratio of the pixel to the total number of pixels in the gradient map.
[0045] S2: Calculate the merging coefficient of the two clusters. When the merging coefficient is greater than a preset merging threshold, merge the two clusters to obtain the area to be tested.
[0046] After the above clustering step, multiple clusters are obtained, and the merging coefficient of any two clusters is calculated. When the merging coefficient is greater than a preset merging threshold, the clusters are merged.
[0047] In one embodiment, the merging process may be: merging adjacent clusters, obtaining a new cluster each time, performing clustering again after merging, and repeating the above operation until there is no merging coefficient greater than a preset merging threshold, then stopping merging clusters to obtain the area to be tested. Exemplarily, the merging threshold may be: 0.75.
[0048] In one embodiment, the calculation formula of the merging coefficient is: ,in, is the merging coefficient, is the number of pixel values of the first cluster, is the number of pixel values of the second cluster, The pixel value in the first cluster is The ratio of the pixel point to all the pixels of the first cluster, The pixel value in the second cluster is The ratio of the pixel of to all the pixels of the second cluster. represents the hyperbolic tangent function.
[0049] It indicates the difference in the number of pixel values in the clusters. If the difference in the number of pixels between the two clusters is small, The value will be close to 1, indicating that the two clusters are similar in size. If the difference is large, The value of will approach 0, indicating that the two clusters are different in size.
[0050] Used to measure the similarity between two clusters in pixel value distribution. It indicated and The difference between the two clusters, namely the KL divergence, is used to measure the similarity between the pixel value distributions of two clusters. The larger the value, the smaller the difference between the two distributions. The value of is close to 1. Merge coefficient The larger the value of is, the more similar the two clusters are in the number and distribution of pixel values, so the possibility of merging is greater, and vice versa, the possibility of merging is smaller.
[0051] In other embodiments, without considering the difference in the number of pixel values in the clusters, only The merging coefficient will not be elaborated here.
[0052] S3: Calculate the ratio of the mean pixel value of the pixel points in the test area to the mean pixel value of the preset standard edge sealing area, take the absolute value of the difference between the ratio and 1 as the classification coefficient, and mark the test area whose classification coefficient is less than the preset coefficient threshold as a lossless area.
[0053] Exemplarily, the coefficient threshold is 0.2, one region to be tested corresponds to one classification coefficient, and the region to be tested with a classification coefficient less than 0.2 is marked as a lossless region.
[0054] S4: Make the minimum circumscribed rectangle of the intact area the edge-sealed area, and output 0 if the pixel values of the pixels between the edge-sealed area and the intact area are the same, and output 1 if they are the same, to obtain the defective area.
[0055] Since the seal 1 is roughly presented as a standard rectangular area on the image, the minimum circumscribed rectangle of the lossless area is the edge-sealed area. When the pixel values of the pixels between the edge-sealed area and the lossless area are the same, 0 is output, otherwise 1 is output. That is, the pixel values corresponding to the edge-sealed area and the lossless area are XORed respectively to find the defective area.
[0056] An embodiment of the present application also discloses a plate processing edge banding detection system based on machine vision, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a plate processing edge banding detection method based on machine vision according to the present application is implemented.
[0057] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface, and their configuration and functions are known in the art, so they will not be described in detail here.
[0058] In the present application, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high bandwidth memory HBM (High Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of a device or accessible or connectable to a device.
[0059] Although this specification has shown and described a plurality of embodiments of the present application, it is obvious to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will think of many changes, modifications and alternatives without departing from the thought and spirit of the present application. It should be understood that in the process of practicing the present application, various alternatives to the embodiments of the present application described herein may be adopted.
[0060] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.
Claims
1. A machine vision-based plate processing edge banding detection method, characterized in that: Includes steps: The collected image is acquired and processed to obtain a gradient map, and the gradient map is clustered to obtain multiple clusters, and the connected domain composed of the pixels contained in each cluster is an initial region; Calculate the merging coefficient of the two clusters. When the merging coefficient is greater than the preset merging threshold, merge the two clusters to obtain the area to be tested. Calculate the ratio of the mean pixel value of the pixel points in the test area to the mean pixel value in the preset standard edge sealing area, take the absolute value of the difference between the ratio and 1 as the classification coefficient, and mark the test area with a classification coefficient less than the preset coefficient threshold as a lossless area; The minimum circumscribed rectangle of the lossless area is made into the edge-sealed area, and 0 is output in response to the pixel values of the pixel points between the edge-sealed area and the lossless area being the same, and 1 is output otherwise, thereby obtaining the defective area.
2. The machine vision-based plate processing edge banding detection method according to claim 1, characterized in that: The calculation formula of the merger coefficient is: ,in, is the merging coefficient, is the number of pixel values of the first cluster, is the number of pixel values of the second cluster, The pixel value in the first cluster is The ratio of the pixel point to all the pixels of the first cluster, The pixel value in the second cluster is The ratio of the pixel point to all the pixels of the second cluster, represents the hyperbolic tangent function.
3. The machine vision-based plate processing edge banding detection method according to claim 1, characterized in that: The gradient map is obtained by acquiring the collected image and processing it, including the following steps: Grayscale processing is performed on the acquired captured image to obtain a grayscale image; Calculate the maximum value of the ratio of the pixel value between each pixel point and the pixel points in the eight neighborhoods, and take the maximum value as the maximum gradient value; The pixel value of each pixel is replaced by the maximum gradient value to obtain a gradient image.
4. The machine vision-based plate processing edge banding detection method according to claim 1, characterized in that: The gradient graph is clustered to obtain multiple clusters, and the clustering algorithm used is DBSCAN.
5. The machine vision-based plate processing edge banding detection method according to claim 4, characterized in that: The calculation method of the neighborhood radius in clustering is: Calculate the similarity evaluation between each gray value and the standard gray value; Traverse the similarity evaluation of all gray values, take the pixel corresponding to the maximum similarity evaluation value as the target pixel, take the absolute value of the difference between the ratio of the gradient value of the target pixel and the gradient value of any pixel and 1 as the distance value, and take the minimum distance value as the neighborhood radius.
6. The machine vision-based plate processing edge banding detection method according to claim 5, characterized in that: The calculation formula for similarity evaluation is: ,in, Gray value Similar evaluation with standard gray value, is the standard grayscale value, which is the pixel value of the pixel point in the standard edge sealing area. The gray value is The ratio of the pixel to the total number of pixels in the gradient map.
7. The machine vision-based plate processing edge banding detection method according to claim 1, characterized in that: The calculation formula of the merger coefficient is: ,in, is the merging coefficient, The pixel value in the first cluster is The ratio of the pixel point to all the pixels of the first cluster, The pixel value in the second cluster is The ratio of the pixel point to all the pixels of the second cluster, represents the hyperbolic tangent function.
8. The machine vision-based plate processing edge banding detection system is characterized by: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the plate processing edge banding detection method based on machine vision according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method for detecting edge sealing defect of plate based on image, related equipment and storage medium
CN114820594A
Plate edge sealing defect detection method, device and equipment and storage medium
CN116128867A
Plate edge sealing flexible control method and system and flexible edge sealing intelligent production line
CN117381935A
Road pavement construction quality detection method and system
CN117557569A
Chip defect detection method and device, equipment and storage medium
CN117746077A
Cited By
Abnormality monitoring method for intelligent flow production line of prefabricated slabs
CN120088251A
Soil moisture detection method based on forestry and agriculture combined operation mode
CN121049477A