A defect detection method and system for injection molding
By collecting multi-angle images and different light intensities of injection molded parts, combined with digital image processing technology, the problem of low manual detection efficiency in the existing technology is solved, and automated defect detection and efficiency improvement of injection molded parts are realized.
Patent Information
- Application Number
- CN202210588037.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-26
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2042-05-26
AI Technical Summary
Most of the existing technologies rely on manual defect detection of injection molded parts, which makes it difficult to realize automated defect detection and reduces the efficiency of defect detection of injection molded parts.
By collecting multi-angle images and different light intensities of target injection molded parts, a surface defect detection model is constructed, and digital image processing technology is used for preprocessing and target defect element detection to determine the location distribution of defect elements and make subsequent process adjustments.
Automatic defect detection of injection molded parts is realized, defect detection efficiency is improved, and image collection and analysis processing of injection molded parts are realized through computer vision.
Smart Images

Figure CN114926441B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and in particular to a defect detection method and system for injection molding. Background Art
[0002] In recent years, with the rapid development of technologies such as digitalization and the Internet of Things, higher requirements have been put forward for industry and manufacturing. How to use automation to improve the efficiency of product defect detection in the production process and reduce the rate of unqualified products has attracted widespread attention from manufacturers. Injection molding products have the characteristics of short molding cycle, high precision, and strong adaptability, and are widely used in automobiles, aerospace, electronics and electrical fields. Injection molding defect detection is an important technical link in realizing the industrial upgrading of the injection molding industry. Due to the large size and curved shape of injection molded parts, the curved surface of the injection molding part and the strong mirror reflection, image acquisition and analysis processing for automated defect detection are very difficult.
[0003] However, most of the existing technologies rely on manual defect detection of injection molded parts, which makes it difficult to perform image acquisition and analysis processing for automated defect detection, thereby reducing the technical problem of defect detection efficiency of injection molded parts. Summary of the invention
[0004] The purpose of the present invention is to provide a defect detection method and system for injection molded parts processing, so as to solve the technical problem that most of the existing technologies rely on manual defect detection of injection molded parts, which makes it difficult to perform image acquisition and analysis processing for automated defect detection, thereby reducing the defect detection efficiency of injection molded parts.
[0005] In view of the above problems, the present invention provides a method and system for defect detection in injection molding.
[0006] In a first aspect, the present invention provides a defect detection method for injection molded parts, the method comprising: based on an image acquisition device, performing multi-angle image acquisition on the surface of a target injection molded part to obtain a multi-angle image set; performing multi-light intensity acquisition on each angle image in the multi-angle image set to obtain a multi-light intensity image set for each angle; constructing a surface defect detection model, wherein the surface defect detection model comprises a data input layer, a multi-function data processing layer and a data output layer; inputting the multi-light intensity image set for each angle as input data into the data input layer, and preprocessing the input data to obtain a preprocessed sample data set; uploading the sample data set to the multi-function data processing layer, and based on digital image processing technology, detecting target defect elements in the sample data set to obtain a target defect element position distribution; outputting the target defect element position distribution according to the data output layer, and performing subsequent process adjustments.
[0007] In a second aspect, the present invention further provides a defect detection system for injection molding, which is used to execute a defect detection method for injection molding as described in the first aspect, wherein the system comprises: a first acquisition unit, which is used to perform multi-angle image acquisition on the surface of the target injection molded part based on an image acquisition device to obtain a multi-angle image set; a second acquisition unit, which is used to perform multi-light intensity acquisition on each angle image in the multi-angle image set to obtain a multi-light intensity image set for each angle; a first construction unit, which is used to construct a surface defect detection model, wherein the surface defect detection model comprises a data input layer, a multi-function layer, a A data processing layer and a data output layer; a first input unit, the first input unit is used to input the angle-multi-light intensity image set as input data to the data input layer, and pre-process the input data to obtain a pre-processed sample data set; a first detection unit, the first detection unit is used to upload the sample data set to the multi-functional data processing layer, and based on the digital image processing technology, detect the target defect element of the sample data set to obtain the target defect element position distribution; a first output unit, the first output unit is used to output the target defect element position distribution according to the data output layer, and perform subsequent process adjustments.
[0008] In a third aspect, a defect detection system for injection molded parts processing comprises: a processor, the processor is coupled to a memory, the memory is used to store a program, when the program is executed by the processor, the system executes the steps of any one of the methods described in the first aspect above.
[0009] In a fourth aspect, a computer-readable storage medium is provided, wherein a computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the method described in any one of the first aspects are implemented.
[0010] One or more technical solutions provided in the present invention have at least the following technical effects or advantages:
[0011] By collecting images of the target injection molded parts at multiple angles and collecting images of different light intensities at a single angle, the comprehensive coverage of the sample images is ensured. At the same time, a surface defect detection model is built to preprocess the sample images, and the target defect elements are detected on the preprocessed images according to the digital image processing technology, so as to determine the position distribution of the target defect elements for defect correction and adjust the subsequent processes. The technical effect of realizing the image collection and analysis processing of automated defect detection of injection molded parts through computer vision and improving the defect detection efficiency of injection molded parts is achieved.
[0012] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0014] Figure 1 A schematic flow chart of a defect detection method for injection molded parts processing according to the present invention;
[0015] Figure 2 It is a schematic diagram of the process of performing image segmentation on the target angle image set in a defect detection method for injection molding of the present invention;
[0016] Figure 3 It is a schematic diagram of a flow chart of detecting target defect elements of the sample data set in a defect detection method for injection molding of the present invention;
[0017] Figure 4 It is a structural schematic diagram of a defect detection system for injection molding of the present invention;
[0018] Figure 5 FIG. 4 is a schematic diagram of the structure of an exemplary electronic device of the present invention.
[0019] Description of reference numerals:
[0020] A first acquisition unit 11 , a second acquisition unit 12 , a first construction unit 13 , a first input unit 14 , a first detection unit 15 , a first output unit 16 , a bus 300 , a receiver 301 , a processor 302 , a transmitter 303 , a memory 304 , and a bus interface 305 . DETAILED DESCRIPTION
[0021] The present invention provides a defect detection method and system for injection molding, which solves the technical problem that most of the existing technologies rely on manual defect detection of injection molded parts, and it is difficult to perform image acquisition and analysis processing for automated defect detection, which reduces the defect detection efficiency of injection molded parts. The present invention achieves the technical effect of realizing image acquisition and analysis processing for automated defect detection of injection molded parts through computer vision, and improving the defect detection efficiency of injection molded parts.
[0022] The acquisition, storage, use, and processing of data in the technical solution of the present invention are in compliance with the relevant provisions of national laws and regulations.
[0023] Below, the technical solutions in the present invention will be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments of the present invention. It should be understood that the present invention is not limited to the example embodiments described herein. 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. It should also be noted that, for the convenience of description, only the parts related to the present invention are shown in the accompanying drawings, rather than all of them.
[0024] The present invention provides a defect detection method for injection molding, the method comprising: collecting images of target injection molded parts at multiple angles, and collecting images of different light intensities at a single angle to ensure comprehensive coverage of sample images, and at the same time, building a surface defect detection model for preprocessing sample images, and detecting target defect elements in the preprocessed images according to digital image processing technology, thereby determining the position distribution of target defect elements for defect correction, and adjusting subsequent processes. The method achieves the technical effect of realizing image collection and analysis processing for automated defect detection of injection molded parts through computer vision, and improving the defect detection efficiency of injection molded parts.
[0025] After introducing the basic principles of the present invention, various non-limiting implementation methods of the present invention will be specifically described below in conjunction with the accompanying drawings.
[0026] Embodiment 1
[0027] Please refer to the attached Figure 1 The present invention provides a method for defect detection of injection molded parts, the method specifically comprising the following steps:
[0028] Step S100: Based on the image acquisition device, multi-angle images are acquired on the surface of the target injection molded part to obtain a multi-angle image set;
[0029] Step S200: performing multi-light-intensity acquisition on each angle image in the multi-angle image set to obtain a multi-light-intensity image set at each angle;
[0030] Specifically, in recent years, with the rapid development of technologies such as digitalization and the Internet of Things, higher requirements have been placed on industry and manufacturing. How to use automation to improve the efficiency of product defect detection in the production process and reduce the rate of unqualified products has attracted widespread attention from manufacturers. Injection molded products have the characteristics of short molding cycle, high precision, and strong adaptability, and are widely used in automobiles, aerospace, electronics and electrical fields. Injection molded parts defect detection is an important technical link in realizing the industrial upgrading of the injection molding industry. Due to the large size and curved shape of injection molded parts, the curved surface of the injection molded part and the strong mirror reflection, image acquisition and analysis processing for automated defect detection are very difficult.
[0031] However, most of the existing technologies rely on manual defect detection of injection molded parts, which makes it difficult to perform image acquisition and analysis processing for automated defect detection, thereby reducing the technical problem of defect detection efficiency of injection molded parts.
[0032] In order to solve the problems existing in the prior art, the present application proposes a defect detection method for injection molding. By collecting images of the target injection molded parts at multiple angles and collecting images of different light intensities at a single angle, the comprehensive coverage of the sample image is ensured. At the same time, a surface defect detection model is built to preprocess the sample image, and the target defect elements are detected on the preprocessed image according to the digital image processing technology, so as to determine the position distribution of the target defect elements for defect correction, and at the same time, the subsequent process is adjusted. The technical effect of realizing the image acquisition and analysis processing of automated defect detection of injection molded parts through computer vision and improving the defect detection efficiency of injection molded parts is achieved.
[0033] Specifically, the image acquisition device includes a camera, a video camera, a camera, a scanner, and other devices with a camera function (mobile phones, tablet computers, etc.). In this application, a dedicated high-definition camera in an industrial production process is often used as an example for application. The target injection molded parts refer to various injection molded products produced by an injection molding machine, collectively referred to as injection molded parts, including various packages, parts, etc. It is mainly made of materials such as polyethylene or polypropylene and added with a variety of organic solvents. Here, a small transparent injection molded part is used as an example for explanation. Since there are usually tiny bubbles, leaks, scratches, and marks on the surface of precision injection molded parts, which affect product quality, it is necessary to perform surface defect detection on them. The multi-angle image set can be understood as capturing images of the surface of the small transparent injection molded part from different angles to ensure that the angle coverage of the captured image is relatively complete, thereby improving the representativeness of the sample image. At the same time, multiple light intensity acquisition can also be performed on each angle image in the multi-angle image set to obtain a multi-light intensity image set of each angle. Due to the different light intensities, different image effects will be produced on the surface of the injection molded parts. By collecting images of the injection molded parts at different light intensities at a single angle, the representativeness of the sample image is further improved. The angle-multi-light intensity image set is a multiple angle collection set for collecting images at different light intensities at a single angle, which is convenient for subsequent image processing.
[0034] Step S300: constructing a surface defect detection model, wherein the surface defect detection model includes a data input layer, a multifunctional data processing layer and a data output layer;
[0035] Step S400: inputting the various angle-multi-light intensity image sets as input data to the data input layer, and preprocessing the input data to obtain a preprocessed sample data set;
[0036] Furthermore, step S400 includes:
[0037] Step S410: obtaining the resolution value of each image in the set of each angle-multi-light intensity image;
[0038] Step S420: obtaining a target angle image set corresponding to a target illumination intensity by screening the optimal value of each image resolution value;
[0039] Step S430: Based on the image segmentation technology, the target angle image set is segmented to obtain a set of segmented images of each element, which is the sample data set.
[0040] Among them, Figure 2 As shown, step S430 includes:
[0041] Step S431: traverse the target angle image set to determine an edge search starting point set;
[0042] Step S432: performing pixel detection of the next node on each edge search starting point in the edge search starting point set to obtain a next node detection result influence set;
[0043] Step S433: obtaining a target edge search starting point in the edge search starting point set by performing expected value screening on the next node detection result influence set;
[0044] Step S434: performing contour tracking on the target angle image set to determine a search end point;
[0045] Step S435: performing image segmentation on the target angle image set based on the target edge search starting point and the search end point.
[0046] Specifically, after obtaining the set of images of each angle and multiple light intensities, image processing is required. Specifically, a surface defect detection model can be constructed, wherein the surface defect detection model includes a data input layer, a multifunctional data processing layer, and a data output layer. The surface defect detection model is used to perform surface defect detection on the input sample image, and can be specifically implemented based on the data input layer-multifunctional data processing layer-data output layer. Specifically, the data input layer is used to screen the optimal value of the input image to ensure subsequent image processing of the screened optimal image; the multifunctional data processing layer is used to perform image processing methods such as element segmentation, feature extraction, clustering analysis of the same elements, and defect detection on the analysis results of the pre-processed optimal image set; the data output layer is used to output the detected defect elements so as to perform defect correction and adjustment of subsequent processes.
[0047] When the input image is screened for the optimal value, the set of images of each angle and multiple light intensity can be used as input data and input into the data input layer, and the input data is preprocessed to obtain a set of sample data after preprocessing, wherein the preprocessing process is the process of optimal value screening. Specifically, the resolution value of each image in the set of images of each angle and multiple light intensity can be obtained. Generally, the resolution, also known as resolution, can be subdivided into display resolution, image resolution, printing resolution and scanning resolution. Resolution determines the fineness of the details of the bitmap image. Generally speaking, the higher the resolution of the image, the more pixels it contains, the clearer the image is, and the better the printing quality is. The image resolution values reflect the clarity values of the input images. The clearer the image, the more conducive it is to the subsequent detection and segmentation of defective elements. By screening the optimal values of the image resolution values, a target angle image set corresponding to the target light intensity is obtained. Through optimal value screening, the highest resolution, that is, the clearest input image can be obtained. The target light intensity is the corresponding optimal light intensity. The target angle image set is the input image set with the highest resolution under the optimal light intensity.
[0048] Furthermore, the image segmentation technology can be used to perform image segmentation on the target angle image set to obtain a set of segmented images of each element, which is the sample data set. Image segmentation refers to the technology and process of dividing an image into regions with different characteristics and extracting targets of interest. The characteristics here can be grayscale, color, texture, etc., and the target can correspond to a single region or multiple regions. In the present application, segmentation can be performed based on the grayscale features of the image, that is, the segmentation of the grayscale image can often be based on two properties of the pixel grayscale value: discontinuity and similarity. Pixels inside a region generally have grayscale similarity, while pixels on the boundaries between regions generally have grayscale discontinuity. Therefore, the segmentation algorithm can be divided into a boundary-based algorithm that utilizes grayscale discontinuity between regions and a region-based algorithm that utilizes grayscale similarity within a region.
[0049] First, when segmenting an image, it is necessary to track the contour of the image to be segmented and determine the starting point, focus and path of the segmentation. Contour tracking, also known as edge point linking, is a method that starts from an edge point (gradient map), searches and connects adjacent edge points in sequence to gradually detect the contour. In order to eliminate the influence of noise and maintain the smoothness of the contour (also known as rigidity), each new contour point determined during the search must take into account the previously obtained contour points. In order to overcome the disconnection between edge points caused by noise, the previously obtained contour points must be considered for the gradient corridor points. In order to overcome the disconnection between edge points caused by noise, the gradient map must fully maintain its existing information (often it is no longer possible to take a threshold to remove low-gradient pixels). Generally speaking, contour tracking includes three steps: first, determine the edge point as the starting point of the search (depending on the algorithm, it can be one point or multiple points). The choice of the starting point is very important and the entire algorithm relies heavily on it. Second, determine and adopt a suitable data structure and search mechanism to determine new contour points based on the discovered contour points. Here, pay attention to studying the impact of previous results on the selection of the next detection pixel and the next result. Third, determine the criteria or termination conditions for the end of the search (such as returning to the starting point if the contour is closed), and stop the process and end the search when the conditions are met. Among them, the edge search starting point set is the appropriate search starting point set determined after traversing the target angle image set. In order to ensure the smoothness of the contour, it is necessary to screen out the optimal search starting point from the edge search starting point set. The next node detection result influence set can be obtained by performing pixel detection of the next node on each edge search starting point in the edge search starting point set, that is, studying the influence of the previous result on the selection of the next detection pixel and the next result. Then, by performing expected value screening on the next node detection result influence set, that is, performing minimum influence screening on the next node detection result influence set, the target edge search starting point in the edge search starting point set can be obtained as the optimal edge search starting point. At the same time, the contour of the target angle image set is tracked to determine the search end point. The search end point is the contour tracking end point for each image element. If the contour is closed, it returns to the starting point. Finally, based on the target edge search starting point and the search end point, the target angle image set is segmented to obtain the segmented image set of each element, that is, the sample data set. The set of segmented images of each element includes all surface elements to be segmented of the small transparent injection molded part, including image elements with a smooth and flawless surface as well as image elements with defects such as tiny bubbles, leaks, scratches and marks.
[0050] Step S500: uploading the sample data set to the multifunctional data processing layer, and detecting target defect elements on the sample data set based on digital image processing technology to obtain the position distribution of the target defect elements;
[0051] Step S600: Output the target defect element position distribution according to the data output layer, and perform subsequent process adjustments.
[0052] Further, such as Figure 3 As shown, step S500 includes:
[0053] Step S510: Scanning each element segmentation image set line by line to obtain each segmentation element pixel set;
[0054] Step S520: Obtain distributed discrete pixels by traversing the pixel sets of each segmentation element;
[0055] Step S530: taking the distributed discrete pixel as the first center point, performing a second traversal on the remaining pixels in the preset neighborhood, and determining whether the grayscale value of the remaining pixels is less than a preset pixel threshold;
[0056] Step S540: if the grayscale value of the remaining pixels is less than the preset pixel threshold, merging the remaining pixels less than the preset pixel threshold and the distributed discrete pixels;
[0057] Step S550: taking the merged new pixel as the second center point, and repeatedly expanding the pixel neighborhood until convergence;
[0058] Step S560: obtaining distribution of each element image corresponding to the convergence state;
[0059] Step S570: Based on the support vector machine classification algorithm, the decision boundary classification learning is performed on the distribution of each element image to obtain the flat area distribution and defect area distribution of the target injection molded part;
[0060] Step S580: Determine the target defect element position distribution by performing edge segmentation on the flat area distribution and the defect area distribution.
[0061] Specifically, after obtaining the preprocessed sample data set, it is necessary to perform subsequent image processing such as cluster analysis of the same elements and defect detection on the analysis results, which can be achieved based on the multifunctional data processing layer. Specifically, by uploading the sample data set to the multifunctional data processing layer, the target defect elements of the sample data set are detected based on the digital image processing technology to obtain the position distribution of the target defect elements, wherein the digital image processing technology includes the above-mentioned cluster analysis of the same elements and defect detection on the analysis results.
[0062] Specifically, after obtaining the image set of each element segmentation, the image segmentation can be performed on it. Here, the element segmentation can be performed according to the region growing segmentation algorithm. The basic idea of region growing is to combine pixels with similar properties to form a region. Specifically, a seed pixel is first found as the starting point of growth for each region to be segmented, and then the pixels with the same or similar properties as the seed pixel in the neighborhood around the seed pixel (determined according to a certain predetermined growth or similarity criterion) are merged into the region where the seed pixel is located. These new pixels are treated as new seed pixels and the above process is continued until no pixels that meet the conditions can be included. A key to region growing is to select a suitable growth or similarity criterion. The selection of the growth criterion depends not only on the specific problem itself, but also on the type of image data used. The growth criterion can be formulated according to different principles, and the use of different growth criteria will affect the process of region growing.
[0063] In the present application, the method based on regional grayscale difference is as follows: by scanning the image set of each element segmentation line by line, obtaining the pixel set of each segmentation element, the pixel set of each segmentation element represents the set of each independent and dispersed element, and then, by traversing the pixel set of each segmentation element, obtaining distributed discrete pixels, that is, pixels that have not yet been assigned, by taking the distributed discrete pixels as the first center point, traversing the remaining pixels in the preset neighborhood twice, and judging whether the grayscale value of the remaining pixels is less than the preset pixel threshold, in other words, checking the neighboring pixels with the pixel (the pixel that has not yet been assigned) as the center, that is, comparing the pixels in the neighborhood with it one by one, if the grayscale difference is less than the predetermined threshold, merge them, and at the same time, return to the above steps with the newly merged pixel as the center, and check the neighborhood of the new pixel until the area cannot be further expanded, that is, the convergence state. At this point, the segmentation of the surface image of the small transparent injection molded part is realized, and the distribution of each element image is the discrete image distribution of each element after segmentation, including the surface is flat and smooth, and also includes defects.
[0064] Furthermore, the distribution of each element image can be classified by supervised learning, and the classification learning is performed here by the support vector machine classification algorithm. Specifically, the support vector machine (SVM) is a generalized linear classifier that performs binary classification of data in a supervised learning manner, and its decision boundary is the optimal hyperplane for solving the learning sample. SVM uses the hinge loss function to calculate the empirical risk, and adds a regularization term to the solution system to optimize the structural risk. It is a classifier with sparsity and robustness. SVM can perform nonlinear classification through the kernel method, which is one of the common kernel learning methods. The flat area distribution and defect area distribution of the target injection molded part can be obtained. The flat area distribution is the standard surface element image of the small transparent injection molded part after classification, and the defect area distribution is the defect surface element image of the small transparent injection molded part after classification. By dividing the edge, the target defect element position distribution can be obtained, that is, the position of the defect surface element of the small transparent injection molded part. By outputting it, the defect surface element is corrected, and at the same time, subsequent process adjustments are made to avoid the recurrence of the same process error.
[0065] Further, step S570 includes:
[0066] Step S571: Divide the distribution of each element image to obtain a first training sample and a first test sample;
[0067] Step S572: obtaining a first training sample surface identification label and a first testing sample surface identification label according to the first training sample and the first testing sample;
[0068] Step S573: using the first training sample and the surface recognition label of the first training sample as training data to obtain a surface recognition support vector machine;
[0069] Step S574: inputting the first test sample into the surface recognition support vector machine to obtain a first output result, wherein the first output result includes a surface recognition result of each element image in the first test sample;
[0070] Step S575: Compare the first output result and the first test sample surface recognition label to obtain the evaluation accuracy of the surface recognition support vector machine.
[0071] Specifically, in order to train the surface recognition support vector machine, the distribution of each element image is randomly divided into two pieces of information, which are respectively defined as the first training sample and the first test sample. Further, according to the first training sample and the first test sample, the corresponding first training sample surface recognition label and the first test sample surface recognition label are obtained respectively. Among them, the first test sample surface recognition label includes the surface flatness of the first test sample and the surface defects of the first test sample. Further, the first training sample and the first training sample surface recognition label are used as input information of the surface recognition support vector machine to participate in the training of the surface recognition support vector machine. The surface recognition support vector machine obtained through training makes up for the shortcomings of the neural network such as slow convergence speed and overfitting, provides a fast and effective method for surface defect detection of injection molded parts, and achieves the technical effect of fast and high-accuracy surface defect detection of injection molded parts.
[0072] Then, the first test sample is input into the trained surface recognition support vector machine to obtain the first output result, wherein the first output result includes the surface recognition result of each element image in the first test sample. Then, the first output result obtained by the intelligent estimation of the surface recognition support vector machine and the surface recognition label of the first test sample are compared. When the output result of the surface recognition support vector machine is consistent with the surface recognition label of the first test sample, it indicates that the evaluation of the surface recognition support vector machine is accurate. In other words, based on all samples in the first test sample evaluated by the surface recognition support vector machine, the number of samples for surface flatness and defects are respectively counted and evaluated, and then the evaluation accuracy of the surface recognition support vector machine can be calculated. Through the first test sample, the goal of analyzing the evaluation results of the surface recognition support vector machine is achieved, and based on the evaluation accuracy, the technical effect of objectively and effectively evaluating the evaluation quality of the credit support vector machine is achieved.
[0073] In summary, the defect detection method for injection molding provided by the present invention has the following technical effects:
[0074] By collecting images of the target injection molded parts at multiple angles and collecting images of different light intensities at a single angle, the comprehensive coverage of the sample images is ensured. At the same time, a surface defect detection model is built to preprocess the sample images, and the target defect elements are detected on the preprocessed images according to the digital image processing technology, so as to determine the position distribution of the target defect elements for defect correction and adjust the subsequent processes. The technical effect of realizing the image collection and analysis processing of automated defect detection of injection molded parts through computer vision and improving the defect detection efficiency of injection molded parts is achieved.
[0075] Embodiment 2
[0076] Based on the defect detection method for injection molding of the aforementioned embodiment, the present invention also provides a defect detection system for injection molding, see the attached Figure 4 , the system comprising:
[0077] A first acquisition unit 11, the first acquisition unit 11 is used to acquire multi-angle images of the surface of the target injection molded part based on an image acquisition device to obtain a multi-angle image set;
[0078] A second acquisition unit 12, the second acquisition unit 12 is used to perform multi-light intensity acquisition on each angle image in the multi-angle image set to obtain a multi-light intensity image set of each angle;
[0079] A first construction unit 13, wherein the first construction unit 13 is used to construct a surface defect detection model, wherein the surface defect detection model includes a data input layer, a multifunctional data processing layer and a data output layer;
[0080] A first input unit 14, the first input unit 14 is used to input the various angle-multi-light intensity image sets as input data to the data input layer, and preprocess the input data to obtain a preprocessed sample data set;
[0081] A first detection unit 15, the first detection unit 15 is used to upload the sample data set to the multifunctional data processing layer, and detect target defect elements on the sample data set based on digital image processing technology to obtain the position distribution of the target defect elements;
[0082] The first output unit 16 is used to output the target defect element position distribution according to the data output layer and perform subsequent process adjustments.
[0083] Furthermore, the system also includes:
[0084] A first obtaining unit, the first obtaining unit is used to obtain the resolution value of each image in the set of each angle-multi-light-intensity image;
[0085] A second obtaining unit, the second obtaining unit is used to obtain a target angle image set corresponding to the target illumination intensity by screening the optimal value of each image resolution value;
[0086] The first segmentation unit is used to perform image segmentation on the target angle image set based on image segmentation technology to obtain a set of segmented images of each element, which is the sample data set.
[0087] Furthermore, the system also includes:
[0088] A first determining unit, the first determining unit is used to traverse the target angle image set to determine an edge search starting point set;
[0089] a third obtaining unit, the third obtaining unit being used to obtain a next node detection result influence set by performing pixel detection of the next node on each edge search starting point in the edge search starting point set;
[0090] A first screening unit, the first screening unit is used to obtain a target edge search starting point in the edge search starting point set by performing expected value screening on the next node detection result influence set;
[0091] a second determining unit, the second determining unit being used to perform contour tracking on the target angle image set to determine a search end point;
[0092] A second segmentation unit, wherein the second segmentation unit is used to perform image segmentation on the target angle image set based on the target edge search starting point and the search end point.
[0093] Furthermore, the system also includes:
[0094] A fourth obtaining unit, the fourth obtaining unit is used to scan the set of segmented images of each element line by line to obtain a set of pixels of each segmented element;
[0095] A fifth obtaining unit, the fifth obtaining unit being used to obtain distributed discrete pixels by traversing the pixel sets of each segmentation element;
[0096] A first judgment unit, the first judgment unit is used to take the distributed discrete pixel as the first center point, perform a second traversal on the remaining pixels in a preset neighborhood, and judge whether the grayscale value of the remaining pixels is less than a preset pixel threshold;
[0097] A first merging unit, the first merging unit is used to merge the remaining pixels less than the preset pixel threshold and the distributed discrete pixels if the grayscale value of the remaining pixels is less than the preset pixel threshold;
[0098] The first expansion unit is used to use the merged new pixel as the second center point to perform repeated pixel neighborhood expansion until a convergence state is reached.
[0099] Furthermore, the system also includes:
[0100] A sixth obtaining unit, the sixth obtaining unit being used to obtain distribution of each element image corresponding to the convergence state;
[0101] A seventh obtaining unit, the seventh obtaining unit is used to perform classification learning of decision boundaries on the distribution of each element image based on a support vector machine classification algorithm to obtain a flat area distribution and a defect area distribution of the target injection molded part;
[0102] The first division unit is used to determine the target defect element position distribution by performing edge division on the flat area distribution and the defect area distribution.
[0103] Furthermore, the system also includes:
[0104] A second division unit, the second division unit is used to divide the distribution of each element image to obtain a first training sample and a first test sample;
[0105] An eighth obtaining unit, the eighth obtaining unit being used to obtain a first training sample surface identification label and a first testing sample surface identification label according to the first training sample and the first testing sample;
[0106] A ninth obtaining unit is configured to obtain a surface recognition support vector machine by using the first training sample and the surface recognition label of the first training sample as training data.
[0107] Furthermore, the system also includes:
[0108] a tenth obtaining unit, the tenth obtaining unit being used to input the first test sample into the surface recognition support vector machine to obtain a first output result, wherein the first output result includes a surface recognition result of each element image in the first test sample;
[0109] A first comparison unit is used to compare the first output result and the first test sample surface recognition label to obtain an evaluation accuracy rate of the surface recognition support vector machine.
[0110] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. Figure 1 The defect detection method and specific examples of an injection molded part in the first embodiment are also applicable to a defect detection system for injection molded parts in the present embodiment. Through the above detailed description of the defect detection method for injection molded parts, those skilled in the art can clearly know the defect detection system for injection molded parts in the present embodiment, so for the sake of brevity of the specification, it will not be described in detail here. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method description.
[0111] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0112] Exemplary Electronic Devices
[0113] Reference below Figure 5 The electronic device of the present invention will be described.
[0114] Figure 5 The figure shows a schematic structural diagram of an electronic device according to the present invention.
[0115] Based on the inventive concept of a defect detection method for injection molded parts processing and molding in the aforementioned embodiment, the present invention also provides a defect detection system for injection molded parts processing and molding, on which a computer program is stored, and when the program is executed by a processor, the steps of any method of the defect detection method for injection molded parts processing and molding described above are implemented.
[0116] Among them, Figure 5 In the embodiment of the present invention, a bus architecture (represented by bus 300) is shown, which may include any number of interconnected buses and bridges, and bus 300 links various circuits including one or more processors represented by processor 302 and memory represented by memory 304. Bus 300 may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are not further described herein. Bus interface 305 provides an interface between bus 300 and receiver 301 and transmitter 303. Receiver 301 and transmitter 303 may be the same element, namely a transceiver, which provides a unit for communicating with various other devices over a transmission medium.
[0117] The processor 302 is responsible for managing the bus 300 and general processing, while the memory 304 may be used to store data used by the processor 302 when performing operations.
[0118] The present invention provides a defect detection method for injection molding, the method comprising: based on an image acquisition device, performing multi-angle image acquisition on the surface of a target injection molded part to obtain a multi-angle image set; performing multi-light intensity acquisition on each angle image in the multi-angle image set to obtain each angle-multi-light intensity image set; constructing a surface defect detection model, wherein the surface defect detection model comprises a data input layer, a multi-function data processing layer and a data output layer; inputting the each angle-multi-light intensity image set as input data into the data input layer, and preprocessing the input data to obtain a preprocessed sample data set; uploading the sample data set to the multi-function data processing layer, based on digital image processing technology, detecting target defect elements of the sample data set to obtain the target defect element position distribution; outputting the target defect element position distribution according to the data output layer, and performing subsequent process adjustments. The method solves the technical problem that most of the existing technologies rely on manual defect detection on injection molded parts, it is difficult to perform image acquisition and analysis processing for automated defect detection, and the defect detection efficiency of injection molded parts is reduced. By collecting images of the target injection molded parts at multiple angles and collecting images of different light intensities at a single angle, the comprehensive coverage of the sample images is ensured. At the same time, a surface defect detection model is built to preprocess the sample images, and the target defect elements are detected on the preprocessed images according to the digital image processing technology, so as to determine the position distribution of the target defect elements for defect correction and adjust the subsequent processes. The technical effect of realizing the image collection and analysis processing of automated defect detection of injection molded parts through computer vision and improving the defect detection efficiency of injection molded parts is achieved.
[0119] The present invention also provides an electronic device, which includes a processor and a memory;
[0120] The memory is used for storing;
[0121] The processor is used to execute any one of the methods in the above-mentioned embodiment 1 by calling.
[0122] The present invention also provides a computer program product, including a computer program and / or instructions, which, when executed by a processor, implement the steps of the method described in any one of the above-mentioned embodiments.
[0123] It should be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may adopt the form of a complete software embodiment, a complete hardware embodiment, or a combination of software and hardware embodiments. In addition, the present invention is in the form of a computer program product that can be implemented on one or more computer-usable storage media containing computer-usable program codes. The computer-usable storage medium includes, but is not limited to, various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), disk memories, compact disc read-only memories (CD-ROM), optical memories, etc.
[0124] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A system that specifies the functions of a box or multiple boxes.
[0125] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction system, which is implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0126] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they understand the basic creative concepts.
[0127] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention belong to the scope of the present invention and its equivalent technologies, the present invention is also intended to include these changes and variations.
Claims
1. A method for detecting defects in injection molded parts, characterized in that: The method comprises: Based on the image acquisition device, multi-angle images of the surface of the target injection molded part are acquired to obtain a multi-angle image set; Performing multi-light-intensity acquisition on each angle image in the multi-angle image set to obtain a multi-light-intensity image set for each angle; Constructing a surface defect detection model, wherein the surface defect detection model includes a data input layer, a multifunctional data processing layer, and a data output layer. The data input layer is used to screen the input image for optimal values to ensure that the screened optimal image is the optimal image. The multifunctional data processing layer is used to perform element segmentation, feature extraction, and cluster analysis of the same elements on the pre-processed optimal image set, and perform defect detection on the analysis results. The data output layer is used to output the detected defect elements. Inputting the multi-light intensity image set at each angle as input data to the data input layer, and preprocessing the input data to obtain a preprocessed sample data set; Uploading the sample data set to the multifunctional data processing layer, detecting target defect elements on the sample data set based on digital image processing technology, and obtaining the position distribution of the target defect elements; Outputting the target defect element position distribution according to the data output layer and performing subsequent process adjustments; The preprocessing of the input data includes: Obtaining a resolution value of each image in the angle-multi-light-intensity image set; By screening the optimal value of each image resolution value, a target angle image set corresponding to the target light intensity is obtained; Based on image segmentation technology, the target angle image set is segmented to obtain a set of segmented images of each element, which is the sample data set; The performing image segmentation on the target angle image set includes: Traversing the target angle image set to determine an edge search starting point set; Obtaining a next node detection result influence set by performing pixel detection of the next node on each edge search starting point in the edge search starting point set; Obtaining a target edge search starting point in the edge search starting point set by performing expected value screening on the next node detection result influence set; Performing contour tracking on the target angle image set to determine a search end point; Image segmentation is performed on the target angle image set based on the target edge search starting point and the search end point.
2. The method according to claim 1, wherein The detecting target defect elements on the sample data set includes: Scanning the element segmentation image set line by line to obtain the segmentation element pixel set; Obtain distributed discrete pixels by traversing the pixel sets of each segmentation element; Taking the distributed discrete pixel as the first center point, performing a second traversal on the remaining pixels in the preset neighborhood to determine whether the grayscale value of the remaining pixels is less than a preset pixel threshold; If the grayscale value of the remaining pixels is less than the preset pixel threshold, merging the remaining pixels less than the preset pixel threshold and the distributed discrete pixels; The merged new pixel is used as the second center point to repeatedly expand the pixel neighborhood until convergence.
3. The method according to claim 2, wherein The method comprises: Obtaining the distribution of each element image corresponding to the convergence state; Based on the support vector machine classification algorithm, the decision boundary classification learning is performed on the distribution of each element image to obtain the flat area distribution and defect area distribution of the target injection molded part; The target defect element position distribution is determined by performing edge segmentation on the flat area distribution and the defect area distribution.
4. The method according to claim 3, wherein The method comprises: Dividing the distribution of each element image to obtain a first training sample and a first test sample; Obtaining a first training sample surface identification label and a first testing sample surface identification label according to the first training sample and the first testing sample; The first training sample and the first training sample surface recognition label are used as training data to obtain a surface recognition support vector machine.
5. The method according to claim 4, wherein The method comprises: Inputting the first test sample into the surface recognition support vector machine to obtain a first output result, wherein the first output result includes a surface recognition result of each element image in the first test sample; The first output result and the first test sample surface recognition label are compared to obtain an evaluation accuracy rate of the surface recognition support vector machine.
6. A defect detection system for injection molded parts, characterized in that: The system comprises: a first acquisition unit, configured to acquire multi-angle images of a surface of a target injection-molded part based on an image acquisition device to obtain a multi-angle image set; a second acquisition unit, configured to perform multi-light-intensity acquisition on each angle image in the multi-angle image set to obtain a multi-light-intensity image set at each angle; a first construction unit, the first construction unit being used to construct a surface defect detection model, wherein the surface defect detection model comprises a data input layer, a multifunctional data processing layer, and a data output layer, the data input layer being used to screen the input image for optimal values to ensure that the screened optimal image is selected, the multifunctional data processing layer being used to perform element segmentation, feature extraction, and cluster analysis of the same elements on the preprocessed optimal image set, and to perform defect detection on the analysis results, and the data output layer being used to output the detected defect elements; a first input unit, configured to input the angle-multi-light-intensity image set as input data into the data input layer, and preprocess the input data to obtain a preprocessed sample data set; a first detection unit, configured to upload the sample data set to the multifunctional data processing layer, and detect target defect elements on the sample data set based on digital image processing technology to obtain a location distribution of the target defect elements; a first output unit, configured to output the target defect element position distribution according to the data output layer and perform subsequent process adjustments; a first obtaining unit, configured to obtain a resolution value of each image in the set of each angle-multi-light-intensity image; a second obtaining unit, configured to obtain a target angle image set corresponding to a target illumination intensity by screening the resolution values of the respective images for an optimal value; a first segmentation unit, configured to perform image segmentation on the target angle image set based on an image segmentation technology to obtain a set of segmented images of each element, which is the sample data set; a first determining unit, configured to traverse the target angle image set to determine an edge search starting point set; a third obtaining unit, configured to obtain a next node detection result influence set by performing pixel detection of a next node on each edge search starting point in the edge search starting point set; a first screening unit, configured to obtain a target edge search starting point in the edge search starting point set by performing expected value screening on the next node detection result influence set; a second determining unit, configured to perform contour tracking on the target angle image set to determine a search end point; A second segmentation unit is configured to perform image segmentation on the target angle image set based on the target edge search starting point and the search end point.
7. A defect detection system for injection molded parts, characterized in that: include: A processor, the processor is coupled to a memory, the memory is used to store a program, when the program is executed by the processor, the system is enabled to perform the steps of any one of the methods of claims 1 to 5.
8. A computer-readable storage medium, characterized in that The storage medium stores a computer program, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 5.
