A device and method for quickly detecting and eliminating defective glass beads based on image recognition
By acquiring and processing the shadow data of glass beads, eliminating the shadow influence and generating the final discriminant image, the problem of shadow interference in image recognition is solved and the accuracy and efficiency of detection is improved.
Patent Information
- Application Number
- CN202411276334.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-09-12
AI Technical Summary
In image recognition, refraction and reflection will occur when the light source contacts the detected object, resulting in shadows, affecting the accuracy and stability of image recognition.
By obtaining the shadow data of the glass beads after being applied to the light source, establishing the central processing end, associating the shadow data and detection instructions, building a peak chart, generating a correction and elimination model, adjusting the characteristic attributes of the detection instructions, eliminating the impact of shadows on the recognition results, and generating The final identification of the image.
Effectively eliminate the impact of shadows on the recognition results, improve the accuracy and efficiency of detection, provide an accurate judgment basis, and intuitively display the degree of influence of each indicator on the results through the influence weight matrix.
Smart Images

Figure CN118788627B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image detection, and in particular to a device and method for quickly detecting and eliminating defective glass beads based on image recognition. Background Art
[0002] In the glass bead production line, quality monitoring is the key link to ensure product quality. In order to speed up the detection of glass bead quality, image recognition-based methods and equipment are currently used to achieve rapid detection and elimination of glass beads.
[0003] After searching, the Chinese invention patent with publication number "CN115165737A" discloses "a visual inspection device and its inspection method". The application scans the product through a scanning component to determine the orientation of the product. The adjustment mechanism adjusts the position of the visual inspection head according to the orientation of the product, so that the visual inspection head can inspect the part of the product that needs to be inspected, thereby reducing the effect of incomplete inspection of the visual inspection head caused by improper product placement.
[0004] In addition, the Chinese invention patent with publication number "CN108254540A" discloses "a device and method for grading the surface quality of sawn timber". This application uses a visual inspection device to analyze whether the surface of the sawn timber meets the preset conditions, and then uses machine vision technology to visually grade the sawn timber, thereby improving the accuracy and efficiency of visual grading of sawn timber.
[0005] Finally, the Chinese invention patent with publication number "CN113533358 A" discloses "a visual detection method and a detection device for surface shape defects of a silk ingot". The silk ingot lifting and rotating mechanism used in this application can clamp the silk ingot and enable it to rotate at a uniform speed in a circular direction. In combination with a lateral camera and an oblique camera, it can conduct a comprehensive detection of the side surface and the upper and lower end surfaces of the silk ingot, thereby avoiding local missed detection and effectively improving the detection effect. At the same time, the lateral fill light source, the semi-circular fill light source and the backlight light source can fill light on the side surface and the upper and lower end surfaces of the silk ingot, further improving the visual signal acquisition effect, thereby improving the detection effect.
[0006] However, when the above-disclosed method and device are actually used, due to the phenomenon that in image recognition, when the light source contacts the detection object, refraction and reflection will occur, resulting in shadows in the acquired image, and these shadows may affect the accuracy and stability of image recognition. Summary of the invention
[0007] The purpose of the present invention is to provide a device and method for quickly detecting and eliminating defective glass beads based on image recognition, so as to solve the problems raised in the above-mentioned background technology.
[0008] In the first aspect, in order to achieve the above-mentioned purpose, the present invention provides the following technical solutions: a method for rapid detection and elimination of defective glass beads based on image recognition, comprising:
[0009] Obtaining detection instructions, which include: glass bead external detection and glass bead internal detection;
[0010] Obtain the shadow data of the glass beads after the light source is applied;
[0011] A central processing end is established, the central processing end associates the shadow data with the detection instruction and outputs a discrimination image, and the central processing end eliminates defective glass beads based on the discrimination image;
[0012] Acquire a real-time discrimination image, extract the distribution position of the shadow in the real-time discrimination image based on the features of the detection instruction, and construct a peak map based on the distribution position;
[0013] Establishing an influence model, the influence model generates influence data for defect location in a peak diagram based on the characteristics of the detection instructions;
[0014] Constructing a correction elimination model, the correction elimination model is associated with the central processing end, the correction elimination model adjusts the characteristic attributes of the detection instruction based on the influencing data, and transmits the correction shadow data to the central processing end, the central processing end outputs a correction discrimination image based on the correction shadow data, compares the correction discrimination image with the real-time discrimination image, and outputs discrimination data, the central processing end integrates the discrimination image and the correction discrimination image based on the discrimination data, and outputs a final discrimination image;
[0015] The influence model includes: obtaining detection instructions, analyzing and extracting features of the detection instructions, establishing defect identification standards and an influence factor matrix based on the features of the detection instructions, associating the defect identification standards and the influence factor matrix, and outputting the influence factors in the influence factor matrix that are related to the detection instruction features, creating a weight allocation method, assigning weights to the output influence factors, and forming an influence weight matrix based on the influence factor matrix, associating the influence weight matrix with a peak graph, and outputting influence data for determining the position of each influence factor in the peak graph.
[0016] As a further preferred embodiment of the present technical solution, a method for establishing a defect identification standard includes: acquiring defect target data based on the characteristics of the detection instruction, presetting a discrimination threshold, setting the discrimination threshold based on the characteristic attributes of the defect target data, comparing the defect target data with the discrimination threshold, and if the defect target data exceeds the discrimination threshold, determining that the characteristic attribute is a defect attribute, and establishing a defect identification standard based on the defect attribute.
[0017] As a further preferred embodiment of the present technical solution, the method for constructing the influence factor matrix includes: obtaining the influence factors affecting the glass bead detection results and the detection data of the glass beads under the corresponding influence factors, constructing an association matrix for matching the features of the associated detection instructions and the influence factors, and inputting the detection data into the association matrix to form the influence factor matrix;
[0018] The method for constructing the association matrix includes: classifying and numbering the influencing factors, extracting the attribute characteristics of each influencing factor, matching the characteristics of the associated detection instructions based on the attribute characteristics and constructing a mapping relationship, and constructing the association matrix based on the mapping relationship.
[0019] As a further preferred embodiment of the present technical solution, the weight allocation method includes: obtaining the influencing factors and integrating them into influencing data of the same format, calculating the information entropy of each influencing data, creating and calculating the difference coefficient, and calculating the weight of each indicator according to the difference coefficient;
[0020] The information entropy is used to reflect the amount of information that affects the data. The calculation formula for information entropy is: , where H i is the information entropy of the i-th influencing data, n is the number of data points, and p ij is the proportion of the jth data value under the i-th influencing data;
[0021] The calculation of the coefficient of difference is used to reflect the degree of difference between the indicator data. The formula for calculating the coefficient of difference is: , where D i Indicates the calculation of the difference coefficient, "1" is a constant used to convert the information entropy Hi into the difference coefficient D i ;
[0022] The calculation formula for calculating the weight of each indicator according to the coefficient of difference is: , where W i is the weight of the ith indicator, m is the number of indicators, k is the index of the influencing factor, and D k represents the coefficient of variation of the kth influencing factor.
[0023] As a further preferred embodiment of the present technical solution, a method for associating the influence weight matrix with the peak map includes: determining an association method based on the characteristics of the detection instruction, mapping the weight values in the influence weight matrix to the corresponding areas of the peak map, and adjusting the brightness or color of each area in the peak map based on the weight values to highlight the defect location, analyzing the adjusted peak map, obtaining the brightness or color values of each area in the peak map, and querying the influence data in the influence weight matrix based on the brightness or color values.
[0024] As a further preferred embodiment of the present technical solution, the correction elimination model is divided into a correction sub-model and an elimination sub-model;
[0025] The correction sub-model includes: determining the characteristic attributes of the data acquisition nodes that need to be adjusted based on the influencing data, such as adjusting the brightness of the light source or changing the position of the data acquisition node, adjusting the characteristic attributes of the data acquisition nodes that need to be adjusted, and re-collecting the shadow data of the glass beads after the light source is applied, that is, the correction shadow data, sending the correction shadow data to the central processing end, and the central processing end generates a correction discrimination image according to the correction shadow data;
[0026] The elimination sub-model includes: comparing the corrected discrimination image with the real-time discrimination image, the comparison content includes the distribution position and shape characteristics of the shadow, generating discrimination data based on the comparison result, and the discrimination data is used to determine whether the glass beads have defects. After the central processing end receives the discrimination data, the real-time discrimination image and the corrected discrimination image are integrated to generate a final discrimination image.
[0027] As a further preferred embodiment of the present technical solution, a method for constructing a peak map includes: real-time discrimination image acquisition, extracting the shadow distribution position in the discrimination image, informationally processing the shadow distribution position, and outputting the distribution data, reading the distribution data and constructing a peak map based on a chart tool.
[0028] As a further preferred embodiment of the present technical solution, a method for acquiring shadow data is as follows: constructing a plurality of light source nodes, the light source nodes are used to apply light sources to the outside of the glass beads, and establishing a plurality of data collection nodes, the data collection nodes are used to collect shadow data obtained after the glass beads are applied with light sources.
[0029] In the second aspect, to supplement the above technical solution, the present invention also provides the following technical solution: a device for rapid detection and elimination of defective glass beads based on image recognition, which uses the above-mentioned method for rapid detection and elimination of defective glass beads based on image recognition, and includes:
[0030] Light source application module, data acquisition module, central processing module and display module;
[0031] The light source application module is used to construct a plurality of light source nodes and apply light sources to the glass beads;
[0032] The data acquisition module is used to construct a plurality of data acquisition nodes and collect shadow data obtained by the glass beads after a light source is applied;
[0033] The central processing module is used to output a corrected discrimination image based on shadow data, compare the corrected discrimination image with the real-time discrimination image, and output discrimination data, integrate the discrimination image and the corrected discrimination image based on the discrimination data, and output a final discrimination image;
[0034] The display module is used to display the final judgment image;
[0035] The light source application module includes a plurality of light source nodes, each of which includes a light source and a light source bracket, wherein the light source bracket is used to support the light source, and an angle adjuster is provided on the light source bracket, and the angle adjuster is used to adjust the angle between the light source and the glass beads, and the light source node also includes a brightness adjuster, and the brightness adjuster is used to adjust the brightness of the light source;
[0036] The data acquisition module includes a plurality of data acquisition nodes, and the data acquisition nodes include an image collector and a data collector. The image collector is used to collect shadow images of glass beads after a light source is applied, and the data collector is used to convert the shadow images into shadow data.
[0037] The central processing module includes a processor and a memory, the processor is used to execute the image processing algorithm and the discrimination algorithm, and the memory is used to store the shadow data and the discrimination data;
[0038] The display module includes a display, and the display is used to receive and display the final identification image output by the central processing module.
[0039] As a further preferred embodiment of the present technical solution, the central processing module is externally connected to an elimination module, the elimination module is used to receive the discrimination data output by the central processing module, and eliminate the glass beads according to the discrimination data;
[0040] The elimination module includes an elimination actuator and an elimination determiner, the elimination determiner is used to receive the discrimination data and determine whether the glass beads need to be eliminated according to the discrimination data, and the elimination actuator is used to eliminate the glass beads according to the judgment result of the elimination determiner;
[0041] The elimination actuator is any one of a mechanical arm or a pneumatic device, and the mechanical arm or the pneumatic device grabs or pushes out the glass beads that need to be eliminated according to the instructions of the elimination determiner.
[0042] Compared with the prior art, the present invention has the following beneficial effects:
[0043] The defective glass bead rapid detection and elimination detection method based on image recognition receives shadow data and executes image processing algorithm and discrimination algorithm. By processing the shadow data, it can generate a corrected discrimination image to eliminate the influence of shadow on the recognition result. Then, the real-time discrimination image and the corrected discrimination image are integrated through the central processing module to generate a final discrimination image, which provides an accurate judgment basis for subsequent elimination processing.
[0044] In addition, when the influence model of the present invention is used, it is possible to adjust the influence factors and weights according to actual conditions, so that the model is more in line with actual application scenarios, and the flexibility and applicability of the model are improved. Through the calculation of the difference coefficient, it is possible to reflect the degree of difference between the indicator data, which helps to more accurately evaluate the influence of each indicator on the result. At the same time, the influence weight matrix is associated with the peak graph, which can intuitively show the influence of each indicator on the result, providing strong support for decision-making.
[0045] Secondly, this application constructs a correction elimination model to correct and eliminate glass beads, which can effectively eliminate the influence of shadows on the recognition results and improve the accuracy and efficiency of detection elimination. In addition, by constructing a peak graph and associating it based on the influence weight matrix, it can intuitively show the influence of each indicator on the result, helping users to better understand and evaluate the effect of detection elimination;
[0046] It should also be added that the defective glass bead rapid detection and elimination equipment based on image recognition realizes the rapid detection and elimination of glass beads through the cooperation of the light source application module, the data acquisition module, the central processing module and the display module. The light source application module can ensure the quality and stability of the shadow data by adjusting the angle and brightness of the light source. The data acquisition module converts the shadow image into shadow data through the cooperation of the image collector and the data collector, which provides convenience for subsequent processing. The central processing module can generate a corrected discrimination image by executing the image processing algorithm and the discrimination algorithm, and integrate the discrimination image and the corrected discrimination image to generate a final discrimination image. The display module can intuitively display the final discrimination image, which is convenient for users to observe and judge. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 It is an operation flow chart of the method of the present invention;
[0048] Figure 2 It is a flow chart of the operation of the impact model of the present invention;
[0049] Figure 3 A flow chart of a method for establishing a defect identification standard of the present invention;
[0050] Figure 4 A flow chart of the method for constructing the impact factor matrix of the present invention;
[0051] Figure 5 A flow chart of a method for associating an impact weight matrix with a peak map according to the present invention;
[0052] Figure 6 It is a composition diagram of the device of the present invention. DETAILED DESCRIPTION
[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0054] When the present invention is actually used, it is mainly applied to the rapid screening and classification of defective glass beads on the glass manufacturing production line. When the present invention is specifically applied to the glass manufacturing production line, in the actual working scene, the working environment on the glass manufacturing production line may have a certain impact on the detection of glass beads, such as lighting conditions, temperature, humidity and other factors. In order to ensure the accuracy and stability of the present invention, these potential influencing factors need to be optimized.
[0055] First, regarding the light source application module, considering that the lighting conditions on the production line may not be stable enough, we specially designed an angle adjuster and a brightness adjuster. The angle adjuster allows us to adjust the angle between the light source and the glass beads according to actual needs to ensure that the shadow data can accurately reflect the surface characteristics of the glass beads. The brightness adjuster can adjust the brightness of the light source in a timely manner according to the lighting conditions on the production line to ensure the stability and consistency of the shadow data.
[0056] Secondly, the data acquisition module is also optimized for the special environment of the production line. The image collector uses a high-resolution and high-sensitivity camera to ensure that clear and accurate shadow images can be captured under different lighting conditions. The data collector is responsible for converting these image data into processable shadow data, providing a basis for subsequent image processing and analysis.
[0057] In addition, the central processing module adopts advanced image processing algorithms and discrimination algorithms when dealing with various conditions on the production line. For example, the image processing algorithm is a combination of an image filtering algorithm and an edge detection algorithm, and the discrimination algorithm is a support vector machine (SVM) algorithm in a machine learning algorithm. When using a combination of an image filtering algorithm and an edge detection algorithm, the central processing module first pre-processes the shadow data to remove noise and interference information, and enhance the quality and contrast of the image. Then, the edge features of the glass beads are extracted through the edge detection algorithm to provide key information for the subsequent discrimination algorithm. The support vector machine (SVM) algorithm classifies and discriminates based on the extracted edge features to determine whether the glass beads are defective. In addition, when the present invention is actually applied, the central processing module can also be equipped with an artificial intelligence-based processing algorithm, such as a deep learning algorithm. The central processing module further improves the accuracy and efficiency of defective glass bead detection through a deep learning algorithm.
[0058] Finally, the design of the display module also fully considers the actual needs of the production line. The display adopts a high-definition large-screen design, which can clearly display the final judgment image, making it convenient for operators to observe and judge. In addition, in actual use, the display can also have a real-time update function. This setting enables the display to reflect the inspection situation on the production line in real time, helping operators to grasp the production progress and product quality in a timely manner.
[0059] like Figure 1-Figure 5 As shown, the present invention provides a technical solution: a method for rapid detection and elimination of defective glass beads based on image recognition, comprising: obtaining a detection instruction, the detection instruction comprising: glass bead external detection and glass bead internal detection, obtaining shadow data obtained after the glass bead is applied with a light source, establishing a central processing end, the central processing end associating the shadow data with the detection instruction, and outputting a discrimination image, the central processing end eliminating defective glass beads based on the discrimination image, obtaining a real-time discrimination image, extracting the distribution position of the shadow in the real-time discrimination image based on the features of the detection instruction, constructing a peak map based on the distribution position, establishing an influence model, the influence model generates influence data for defect positioning in the peak map based on the features of the detection instruction, constructing a correction elimination model, the correction elimination model is associated with the central processing end, the correction elimination model adjusts the feature attributes of the detection instruction based on the influence data, and transmits the correction shadow data to the central processing end, the central processing end outputs a correction discrimination image based on the correction shadow data, compares the correction discrimination image with the real-time discrimination image, and outputs the discrimination data, the central processing end integrates the discrimination image and the correction discrimination image based on the discrimination data, and outputs the final discrimination image.
[0060] Among them reference Figure 2 It can be seen that in the present invention, the influence model includes: obtaining detection instructions, analyzing and extracting the characteristics of the detection instructions, establishing defect identification standards and an influence factor matrix based on the characteristics of the detection instructions, associating the defect identification standards and the influence factor matrix, and outputting the influence factors related to the detection instruction characteristics in the influence factor matrix, creating a weight allocation method, assigning weights to the output influence factors, and forming an influence weight matrix based on the influence factor matrix, associating the influence weight matrix with the peak graph, and outputting influence data for determining the position of each influence factor in the peak graph.
[0061] It should be added that, when the present invention is actually running, the external detection of glass beads and the internal detection of glass beads in the detection instructions can specifically be "detection of external cracks of glass beads". When the detection instruction is detection of external cracks of glass beads, the impact model analyzes and extracts key features in the detection instruction "detection of external cracks of glass beads", where the key features include the size, shape, direction and position of the cracks. These features will be used to establish defect recognition standards so as to accurately identify cracks in subsequent processing. Then, based on the extracted features, the impact model establishes defect recognition standards and an impact factor matrix. The impact factor matrix is a matrix containing multiple impact factors, which are related to relevant parameters of crack detection, such as the brightness and angle of the light source, the resolution and exposure time of the camera. Next, the impact model The impact model associates the defect recognition standard with the influencing factor matrix. Specifically, when the extracted feature is "crack size", the impact model will output the influencing factors related to the crack size in the influencing factor matrix, such as light source brightness and camera resolution, because these two factors directly affect the visibility and clarity of the crack in the image. Subsequently, a weight assignment method is created. This method assigns weights to each influencing factor according to its importance to crack detection to form an influence weight matrix. At this time, based on the content of the detection instruction, the feature of "crack size" is given a high weight, and the associated influencing factors of light source brightness and camera resolution will also be given corresponding weights. Finally, the impact model associates the influence weight matrix with the peak graph and outputs the influence data used to determine the position of each influencing factor in the peak graph.
[0062] As a preferred embodiment, refer to Figure 3 It can be seen that in this embodiment, the method for establishing the defect identification standard includes: obtaining defect target data based on the characteristics of the detection instruction, presetting a discrimination threshold, setting the discrimination threshold based on the characteristic attributes of the defect target data, comparing the defect target data with the discrimination threshold, if the defect target data exceeds the discrimination threshold, then determining that the characteristic attribute is a defect attribute, and establishing the defect identification standard based on the defect attribute.
[0063] It should be added that, in this embodiment, when the detection instruction is "detection of external cracks on glass beads", the defect target data is crack-related data, such as crack length, width, depth, etc., and the discrimination threshold is set according to the normal appearance characteristics of the glass beads. For example, for normal glass beads, the surface should be smooth and crack-free. Therefore, the discrimination threshold is set to the maximum allowable value of the crack length and width. When the acquired crack data exceeds these thresholds, it is determined that the glass bead has a crack defect, and a corresponding defect identification standard is established based on this defect attribute.
[0064] As a preferred embodiment, refer to Figure 4It can be seen that in this embodiment, the method for constructing the influence factor matrix includes: obtaining the influence factors that affect the glass bead detection results and the detection data of the glass beads under the corresponding influence factors, constructing an association matrix for matching the features of the associated detection instructions and the influence factors, inputting the detection data into the association matrix to form the influence factor matrix, wherein the method for constructing the association matrix includes: classifying and numbering the influence factors, extracting the attribute characteristics of each influence factor, matching the features of the associated detection instructions based on the attribute characteristics and constructing a mapping relationship, and constructing the association matrix based on the mapping relationship.
[0065] It should be added that, in the present embodiment, when the influencing factor is illumination shadow, the detection data of the glass beads includes the brightness, angle and uniformity of the light source. It should also be noted that when a certain feature in the detection instruction matches the attribute feature of a certain influencing factor, a corresponding relationship between the two is established. This corresponding relationship is a mapping relationship. For example, when the detection instruction is "detection of external cracks of glass beads", the visibility of the cracks is closely related to the brightness of the light source. Therefore, the attribute feature of the influencing factor of the light source brightness matches the feature of the crack visibility, thereby establishing a mapping relationship between the two.
[0066] As a preferred implementation, in this implementation, the weight allocation method includes: obtaining the influencing factors and integrating them into the influencing data of the same format, calculating the information entropy of each influencing data, creating and calculating the difference coefficient, and calculating the weight of each indicator according to the difference coefficient;
[0067] The information entropy is used to reflect the amount of information that affects the data. The calculation formula for information entropy is: , where H i is the information entropy of the ith influencing data, n is the number of data points, and p ij is the proportion of the jth data value under the i-th influencing data. Specifically, when a certain influencing factor (such as light source intensity) is tested at different levels and n data samples are obtained, then p ij It is the proportion of the jth sample among these samples under this impact factor.
[0068] In addition, the calculation difference coefficient in this embodiment is used to reflect the degree of difference between the indicator data. The formula for calculating the difference coefficient is: , where D i Indicates the calculation of the difference coefficient, "1" is a constant used to convert the information entropy Hi into the difference coefficient D i It should be added that the difference coefficient is the inverse of the information entropy, which is used to reflect the degree of difference between the data of the influencing factor. The larger the difference coefficient, the greater the impact of the influencing factor on the test result, so its weight should also increase accordingly.
[0069] It should also be added that the operating formula for calculating the weight of each indicator based on the coefficient of difference is: , where W i is the weight of the ith indicator, m is the number of indicators, k is the index of the influencing factor, and D k represents the coefficient of difference of the kth influencing factor, where in the weight calculation formula, D k Used for summation to ensure that the sum of the weights of all influencing factors is 1.
[0070] refer to Figure 5 It can be seen that in this embodiment, the method of associating the influence weight matrix and the peak map includes: determining the association method based on the characteristics of the detection instruction, mapping the weight values in the influence weight matrix to the corresponding areas of the peak map, and adjusting the brightness or color of each area in the peak map based on the weight value to highlight the defect location, analyzing the adjusted peak map, obtaining the brightness or color value of each area in the peak map, and querying the influence data in the influence weight matrix based on the brightness or color value.
[0071] It should be added that, in this embodiment, the selection of the association method depends on the specific requirements of the detection instruction and the characteristics of the peak map. For example, when the detection instruction emphasizes the identification of the crack size, the association method may choose to map the weight value related to the crack size in the impact weight matrix to the area corresponding to the crack in the peak map, and highlight the location and size of the crack by adjusting the brightness or color of these areas.
[0072] In addition, in order to further improve the accuracy and efficiency of crack detection, this embodiment can also introduce a feedback mechanism during actual use. Specifically, after crack detection is performed based on the influence weight matrix and the peak diagram, the detection results will be compared with the actual crack situation. If errors or deficiencies are found, the weights of the influencing factors can be adjusted in time or the association method can be improved to optimize the detection effect. This feedback mechanism makes the entire detection system more adaptable and flexible, and can adapt to crack detection needs under different environments and conditions.
[0073] As a preferred embodiment, in this embodiment, the correction and elimination model is divided into a correction sub-model and an elimination sub-model, wherein it should be noted that the correction sub-model includes: determining the characteristic attributes of the data acquisition nodes that need to be adjusted based on the influencing data, such as adjusting the brightness of the light source or changing the position of the data acquisition node, adjusting the characteristic attributes of the data acquisition nodes that need to be adjusted, and re-collecting the shadow data of the glass beads after the light source is applied, that is, the corrected shadow data, and sending the corrected shadow data to the central processing end, and the central processing end generates a corrected discrimination image based on the corrected shadow data.
[0074] It should also be noted that, in this embodiment, the elimination sub-model includes: comparing the corrected discrimination image with the real-time discrimination image, the comparison content includes the distribution position and shape characteristics of the shadow, and generating discrimination data based on the comparison result. The discrimination data is used to determine whether the glass beads have defects. After the central processing end receives the discrimination data, it integrates the real-time discrimination image and the corrected discrimination image to generate a final discrimination image.
[0075] As a preferred embodiment, in this embodiment, the method for constructing a peak map includes: real-time discrimination image acquisition, extracting the shadow distribution position in the discrimination image, information processing of the shadow distribution position, and outputting the distribution data, reading the distribution data and constructing a peak map based on a chart tool.
[0076] It should be noted that in this embodiment, the chart tool is MATLAB's graphical user interface toolbox GUIDE. By using MATLAB's powerful numerical analysis and graphics processing capabilities, the peak map can be efficiently constructed and visualized. It should be added that when constructing the peak map, the shadow image of the glass beads under light is first obtained by the real-time discrimination image acquisition module. Then, the shadow distribution position is extracted using image processing technology, which usually involves edge detection, binarization and other steps. Next, the extracted shadow distribution position is processed informatically and converted into processable distribution data. Finally, the distribution data is read using MATLAB's GUIDE tool, and a peak map is constructed using chart tools (such as surface graphs, bar graphs, etc.).
[0077] As a preferred embodiment, in this embodiment, the method for obtaining shadow data is: constructing a plurality of light source nodes, the light source nodes are used to apply light sources to the outside of the glass beads, and establishing a plurality of data collection nodes, the data collection nodes are used to collect shadow data obtained after the glass beads are applied with light sources.
[0078] In addition, to supplement the above technical solution, the present invention further proposes a device using the above method, referring to Figure 6 It can be seen that the device includes: a light source application module, a data acquisition module, a central processing module and a display module. The light source application module is used to construct a number of light source nodes and apply light sources to the glass beads. The data acquisition module is used to construct a number of data acquisition nodes and collect shadow data obtained after the glass beads are applied with light sources. The central processing module is used to output a corrected discrimination image based on the shadow data, compare the corrected discrimination image with the real-time discrimination image, and output the discrimination data, integrate the discrimination image and the corrected discrimination image based on the discrimination data, and output the final discrimination image. The display module is used to display the final discrimination image.
[0079] It should be noted that the light source application module includes a number of light source nodes, the light source node includes a light source and a light source bracket, the light source bracket is used to support the light source, an angle adjuster is provided on the light source bracket, the angle adjuster is used to adjust the angle between the light source and the glass beads, the light source node also includes a brightness adjuster, the brightness adjuster is used to adjust the brightness of the light source, the data acquisition module includes a number of data acquisition nodes, the data acquisition node includes an image collector and a data collector, the image collector is used to collect the shadow image of the glass beads after the light source is applied, the data collector is used to convert the shadow image into shadow data, the central processing module includes a processor and a memory, the processor is used to execute the image processing algorithm and the discrimination algorithm, the memory is used to store the shadow data and the discrimination data, the display module includes a display, the display is used to receive and display the final discrimination image output by the central processing module, the central processing module is externally connected to an elimination module, the elimination module is used to receive the discrimination data output by the central processing module, and eliminate the glass beads according to the discrimination data, the elimination module includes an elimination actuator and an elimination determiner, the elimination determiner is used to receive the discrimination data, and determine whether the glass beads need to be eliminated according to the discrimination data, and the elimination actuator is used to eliminate the glass beads according to the judgment result of the elimination determiner.
[0080] It should be further added that the elimination actuator is any one of a mechanical arm or a pneumatic device, which grabs or pushes out the glass beads that need to be eliminated according to the instructions of the elimination determiner, wherein the elimination determiner is an electronic device that makes judgments based on a preset discrimination threshold, and the electronic device receives the discrimination data output by the central processing module and compares it with the preset discrimination threshold. When the discrimination data exceeds the discrimination threshold, it is judged that the glass beads are defective and need to be eliminated. At the same time, in actual use, the elimination module can also adjust the discrimination threshold according to actual needs to meet the detection needs of glass beads of different batches or specifications.
[0081] During the actual operation of this detection and elimination equipment, when the instruction input by the detection instruction is "detect whether there are bubbles inside the glass ball", first, the light source application module is started, and several light source nodes start to work. Each light source node stably supports the light source through its light source bracket, and accurately adjusts the angle between the light source and the glass bead through the angle adjuster to ensure that the light source can fully illuminate various parts of the glass bead. At the same time, the brightness adjuster adjusts the brightness of the light source according to preset parameters or real-time feedback to obtain the best shadow effect. Then, the data acquisition module starts to collect shadow data, and the image acquisition device captures the shadow images of the glass beads after the light source is applied. These images contain detailed information about the internal structure of the glass beads. The data acquisition device converts the captured shadow images into shadow data, which will be used for subsequent image processing and analysis, and then After that, the central processing module starts working. The processor receives the shadow data sent by the data acquisition module and runs the preset image processing algorithm and discrimination algorithm. These algorithms will process and analyze the shadow data to identify whether there are defects such as bubbles inside the glass beads. During the image processing, the processor will construct a peak map, extract the shadow distribution position and perform information processing, and convert the shadow data into a visual peak map. The peak map can intuitively display the distribution of the internal structure of the glass beads. Next, the central processing module will compare the generated corrected discrimination image with the real-time discrimination image. By comparing the distribution position and shape characteristics of the shadows, it can be determined whether there are bubbles or other defects in the glass beads. In addition, the central processing module will also generate discrimination data based on the comparison results. These data will be used to determine whether the glass beads need to be eliminated.
[0082] If the discrimination data indicates that the glass beads are defective, the elimination module will be activated, the elimination judge will receive the discrimination data, and judge whether the glass beads need to be eliminated according to the preset judgment rules. If the judgment result is that they need to be eliminated, the elimination actuator will perform the elimination operation, such as using a mechanical arm or pneumatic device to grab or push out the defective glass beads. Finally, the central processing module will integrate the discrimination image and the correction discrimination image to generate the final discrimination image. These images will be displayed through the display module for operators to view and analyze.
[0083] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is limited by the attached embodiments and their equivalents.
Claims
1. A method for rapid detection and elimination of defective glass beads based on image recognition, characterized in that: include: Obtaining detection instructions, which include: glass bead external detection and glass bead internal detection; Obtain the shadow data of the glass beads after the light source is applied; A central processing end is established, the central processing end associates the shadow data with the detection instruction and outputs a discrimination image, and the central processing end eliminates defective glass beads based on the discrimination image; Acquire a real-time discrimination image, extract the distribution position of the shadow in the real-time discrimination image based on the features of the detection instruction, and construct a peak map based on the distribution position; Establishing an influence model, the influence model generates influence data for defect location in a peak diagram based on the characteristics of the detection instructions; Constructing a correction elimination model, the correction elimination model is associated with the central processing end, the correction elimination model adjusts the characteristic attributes of the data detection instruction based on the influencing data, and transmits the correction shadow data to the central processing end, the central processing end outputs a correction discrimination image based on the correction shadow data, compares the correction discrimination image with the real-time discrimination image, and outputs discrimination data, the central processing end integrates the discrimination image and the correction discrimination image based on the discrimination data, and outputs a final discrimination image; The influence model includes: obtaining detection instructions, analyzing and extracting features of the detection instructions, establishing defect identification standards and an influence factor matrix based on the features of the detection instructions, associating the defect identification standards and the influence factor matrix, and outputting the influence factors in the influence factor matrix that are related to the detection instruction features, creating a weight allocation method, allocating weights to the output influence factors, and forming an influence weight matrix based on the influence factor matrix, associating the influence weight matrix with a peak map, and outputting influence data for determining the position of each influence factor in the peak map; The method for establishing a defect recognition standard includes: acquiring defect target data based on the characteristics of the detection instruction, presetting a discrimination threshold, the discrimination threshold being set based on the characteristic attribute of the defect target data, comparing the defect target data with the discrimination threshold, and if the defect target data exceeds the discrimination threshold, determining that the characteristic attribute is a defect attribute, and establishing a defect recognition standard based on the defect attribute; The method for constructing an influence factor matrix includes: obtaining influence factors affecting glass bead detection results and glass bead detection data under corresponding influence factors, constructing an association matrix for matching features of associated detection instructions and influence factors, inputting detection data into the association matrix, and forming an influence factor matrix; The method for constructing the association matrix includes: classifying and numbering the influencing factors, extracting the attribute characteristics of each influencing factor, matching the characteristics of the associated detection instructions based on the attribute characteristics and constructing a mapping relationship, and constructing the association matrix based on the mapping relationship; The weight allocation method includes: obtaining the influencing factors and integrating them into the influencing data of the same format, calculating the information entropy of each influencing data, creating and calculating the difference coefficient, and calculating the weight of each indicator according to the difference coefficient; The information entropy is used to reflect the amount of information that affects the data. The calculation formula for information entropy is: , where H i is the information entropy of the i-th influencing data, n is the number of data points, and p ij is the proportion of the jth data value under the i-th influencing data; The calculation of the coefficient of difference is used to reflect the degree of difference between the indicator data. The formula for calculating the coefficient of difference is: , where D i Indicates the calculation of the difference coefficient. "1" is a constant used to convert the information entropy Hi into the difference coefficient D. i ; The calculation formula for calculating the weight of each indicator according to the difference coefficient is: , where W i is the weight of the ith indicator, m is the number of indicators, k is the index of the influencing factor, and D k represents the coefficient of difference of the kth influencing factor; The method of associating the influence weight matrix with the peak map includes: determining the association method based on the characteristics of the detection instruction, mapping the weight values in the influence weight matrix to the corresponding areas of the peak map, and adjusting the brightness or color of each area in the peak map based on the weight value to highlight the defect location, analyzing the adjusted peak map, obtaining the brightness or color value of each area in the peak map, and querying the influence data in the influence weight matrix based on the brightness or color value.
2. The method for rapid detection and elimination of defective glass beads based on image recognition according to claim 1, characterized in that: The correction elimination model is divided into a correction sub-model and an elimination sub-model; The correction sub-model includes: determining the characteristic attributes of the data acquisition nodes that need to be adjusted based on the influencing data, such as adjusting the brightness of the light source or changing the position of the data acquisition node, adjusting the characteristic attributes of the data acquisition nodes that need to be adjusted, and re-collecting the shadow data of the glass beads after the light source is applied, that is, the correction shadow data, sending the correction shadow data to the central processing end, and the central processing end generates a correction discrimination image according to the correction shadow data; The elimination sub-model includes: comparing the corrected discrimination image with the real-time discrimination image, the comparison content includes the distribution position and shape characteristics of the shadow, generating discrimination data based on the comparison result, and the discrimination data is used to determine whether the glass beads have defects. After the central processing end receives the discrimination data, the real-time discrimination image and the corrected discrimination image are integrated to generate a final discrimination image.
3. The method for rapid detection and elimination of defective glass beads based on image recognition according to claim 1, characterized in that: The method for constructing a peak map includes: real-time discrimination image acquisition, extracting the shadow distribution position in the discrimination image, informatization processing of the shadow distribution position, and outputting distribution data, reading the distribution data and constructing a peak map based on a chart tool.
4. The method for rapid detection and elimination of defective glass beads based on image recognition according to claim 1, characterized in that: The method for acquiring shadow data is as follows: constructing several light source nodes, which are used to apply light sources to the outside of glass beads, and establishing several data collection nodes, which are used to collect shadow data obtained after the glass beads are applied with light sources.
5. A device for rapid detection and elimination of defective glass beads based on image recognition, using a method for rapid detection and elimination of defective glass beads based on image recognition as claimed in any one of claims 1 to 4, characterized in that: include: Light source application module, data acquisition module, central processing module and display module; The light source application module is used to construct a plurality of light source nodes and apply light sources to the glass beads; The data acquisition module is used to construct a plurality of data acquisition nodes and collect shadow data obtained by the glass beads after a light source is applied; The central processing module is used to output a corrected discrimination image based on the shadow data, compare the corrected discrimination image with the real-time discrimination image, and output discrimination data, integrate the discrimination image and the corrected discrimination image based on the discrimination data, and output a final discrimination image; The display module is used to display the final judgment image; The light source application module includes a plurality of light source nodes, each of which includes a light source and a light source bracket, wherein the light source bracket is used to support the light source, and an angle adjuster is provided on the light source bracket, and the angle adjuster is used to adjust the angle between the light source and the glass beads, and the light source node also includes a brightness adjuster, and the brightness adjuster is used to adjust the brightness of the light source; The data acquisition module includes a plurality of data acquisition nodes, and the data acquisition nodes include an image collector and a data collector. The image collector is used to collect shadow images of glass beads after a light source is applied, and the data collector is used to convert the shadow images into shadow data. The central processing module includes a processor and a memory, the processor is used to execute the image processing algorithm and the discrimination algorithm, and the memory is used to store the shadow data and the discrimination data; The display module includes a display, and the display is used to receive and display the final identification image output by the central processing module.
6. The defective glass bead rapid detection and elimination device based on image recognition according to claim 5 is characterized by: The central processing module is externally connected to an elimination module, which is used to receive the discrimination data output by the central processing module and eliminate the glass beads according to the discrimination data; The elimination module includes an elimination actuator and an elimination determiner, the elimination determiner is used to receive the discrimination data and determine whether the glass beads need to be eliminated according to the discrimination data, and the elimination actuator is used to eliminate the glass beads according to the judgment result of the elimination determiner; The elimination actuator is any one of a mechanical arm or a pneumatic device, and the mechanical arm or the pneumatic device grabs or pushes out the glass beads that need to be eliminated according to the instructions of the elimination determiner.
Citation Information
Patent Citations
Sawn timber surface quality grade classifying apparatus and method
CN108254540A
Yarn spindle surface shape defect visual detection method and detection device
CN113533358A
Visual detection device and detection method thereof
CN115165737A
Compressive-sensing-based object reconstruction method
CN102592269A
Underwater image enhancement method based on hierarchical weighted fusion
CN106971379A
