A method and system for detecting the quality of injection molded parts based on machine vision
By employing a machine vision-based method for quality inspection of injection molded parts, combined with surface image processing and internal stress simulation, the problem of low inspection accuracy in existing technologies for injection molded parts has been solved. This method enables accurate classification and risk prediction of defects in injection molded parts, thereby improving the accuracy and comprehensiveness of the inspection.
Patent Information
- Application Number
- CN202511605004.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-05
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2045-11-05
AI Technical Summary
Existing quality inspection methods for injection molded parts are difficult to correlate with internal mechanisms, resulting in low inspection accuracy, especially when identifying complex surface defects and fine textures.
A machine vision-based inspection method is adopted. The surface images of injection molded parts are collected and preprocessed to extract high-dimensional defect feature vectors. The internal stress distribution is simulated by combining a three-dimensional design model. The finite element method and decision tree algorithm are used for defect classification and risk prediction.
It enables precise classification and intelligent risk prediction of defects in injection molded parts, improves the accuracy and comprehensiveness of quality inspection, and can more accurately locate potential related factors and make process adjustment decisions.
Smart Images

Figure CN121053144B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of quality inspection technology, and in particular to a method and system for quality inspection of injection molded parts based on machine vision. Background Technology
[0002] In the manufacturing sector, quality inspection of injection molded parts is a crucial step in ensuring product performance and reliability. Its accuracy and efficiency directly impact production efficiency and the quality of the final product. As industrial production increasingly demands higher precision and consistency in products, efficient and accurate quality inspection technologies are playing an increasingly vital role in numerous fields, including automotive manufacturing, electronic equipment, and medical devices.
[0003] In existing technologies, quality inspection methods for injection molded parts mostly rely on manual visual inspection or simple image processing algorithms. While these methods can meet basic inspection needs, they have significant limitations. On the one hand, manual visual inspection is greatly affected by subjective factors, making it difficult to guarantee the consistency and stability of inspection results. On the other hand, the inspection method of acquiring surface images from a single angle, extracting defect features through traditional image processing algorithms, and finally comparing and matching them with preset defect features of a standard template has limited ability to identify complex surface defects and struggles to capture the three-dimensional features and subtle textures of wire-drawing defects. At a deeper level, existing technologies lack in-depth research into the defect formation mechanism and have failed to establish a correlation mechanism between surface defects and intrinsic factors such as internal stress during the injection molding process, resulting in an inability to accurately determine the nature of defects.
[0004] In summary, existing methods for inspecting the quality of injection molded parts are insufficient to correlate surface defects with internal mechanisms, resulting in low accuracy in quality inspection. Summary of the Invention
[0005] This invention provides a machine vision-based method and system for quality inspection of injection molded parts, which enables accurate defect classification and intelligent risk prediction, thereby improving the accuracy of quality inspection.
[0006] In a first aspect, to solve the above-mentioned technical problems, the present invention provides a machine vision-based method for quality inspection of injection molded parts, comprising:
[0007] Images of the injection molded part surface are acquired and preprocessed to obtain enhanced defect images;
[0008] Edge extraction is performed on the enhanced defect image, and a directional gradient histogram is calculated to obtain a high-dimensional defect feature vector;
[0009] Obtain the three-dimensional design model corresponding to the injection molded part to be tested, perform meshing on the three-dimensional design model, simulate the internal stress distribution and extract the coordinates of the stress peak points to obtain a stress distribution map;
[0010] Based on the high-dimensional defect feature vector, the defect location is extracted, and the stress concentration area is separated from the stress distribution map. The overlap between the pre-acquired supplier code attribute and the defect location and the stress concentration area is verified to obtain the predicted overlap index.
[0011] If the predicted overlap index meets the preset overlap threshold range, then the deformation type is analyzed, and the defect classification standard is obtained by combining the deformation type and the supplier code attribute.
[0012] Obtain the original deformation mode data, perform numerical simulation analysis on the original deformation mode data according to the defect classification criteria, obtain the stress-deformation relationship dataset, perform origin feature analysis on the stress-deformation relationship dataset, calculate the defect type probability, and obtain the deformation mode parameter dataset.
[0013] Based on the deformation mode parameter dataset, the plasticity index is calculated using the finite element method. When the plasticity index exceeds a preset plasticity index threshold, overlapping features are extracted and input into a decision tree algorithm to determine the cracking risk level.
[0014] When the cracking risk level is higher than the preset risk threshold, the deformation mode parameter dataset and the cracking risk level are integrated to generate a quality assessment report.
[0015] Preferably, the step of extracting edges from the enhanced defect image and calculating a directional gradient histogram to obtain a high-dimensional defect feature vector includes:
[0016] The Canny edge detection algorithm is used to extract edges from the enhanced defect image, highlighting texture boundary features, to obtain the first feature set;
[0017] Edge pixel values are obtained from the first feature set. When the edge pixel values are greater than a preset pixel threshold, a region growing algorithm is used to cluster connected regions to obtain a second feature set.
[0018] Based on the second feature set, a directional gradient histogram is calculated, and the number of pixels in the connected region is used as the weight to generate the high-dimensional defect feature vector.
[0019] Preferably, the step of meshing the three-dimensional design model, simulating the internal stress distribution, and extracting the coordinates of stress peak points to obtain a stress distribution map includes:
[0020] The three-dimensional design model is meshed using the finite element method to generate the first mesh model;
[0021] Obtain the process parameters corresponding to the injection molded part, and calculate the initial stress field based on the first mesh model and the process parameters to obtain the first stress distribution set;
[0022] Based on a Gaussian filter, stress values exceeding a preset stress threshold in the first stress distribution set are smoothed to obtain a second stress distribution set.
[0023] For the second stress distribution set, the coordinates of the stress peak points are extracted, and the region is segmented according to the coordinates of the stress peak points to form the stress distribution map.
[0024] Preferably, the step of extracting the defect location based on the high-dimensional defect feature vector, separating the stress concentration region from the stress distribution map, and verifying the overlap between the pre-acquired supplier code attribute and the defect location and the stress concentration region to obtain a predicted overlap index includes:
[0025] The high-dimensional defect feature vector is subjected to feature analysis, the geometric center coordinates of the texture contour are extracted as the defect position coordinates, and the maximum offset of the texture extension direction is calculated as the deformation amount.
[0026] Based on the Canny edge detection algorithm, the boundary of the stress concentration region is extracted from the stress distribution map to generate a dataset of the concentration region containing coordinates and stress values.
[0027] The supplier code attribute is obtained from the pre-established supply chain management database. The supplier code attribute is logically matched with the defect location coordinates and the centralized area dataset to calculate the first overlap index.
[0028] When the deformation exceeds a preset deformation threshold, the first overlap index is adjusted according to the preset index optimization rules to obtain the predicted overlap index.
[0029] Preferably, if the predicted overlap index meets a preset overlap threshold range, then the deformation type is analyzed, and a defect classification standard is obtained by combining the deformation type and the supplier code attribute, including:
[0030] Based on the supplier code attribute, obtain the material yield strength and material batch characteristics;
[0031] When the predicted coincidence index meets the preset coincidence threshold range, the deformation type caused by the stress value data of the stress concentration area at the defect location is determined by the decision tree algorithm in combination with the material yield strength, and the deformation determination result is obtained.
[0032] The support vector machine algorithm is used to correlate the deformation determination result with the characteristics of the material batch, and the defect occurrence pattern of the same material batch under the deformation type is statistically analyzed to generate the defect classification standard.
[0033] Preferably, the step of acquiring the original deformation mode data, performing numerical simulation analysis on the original deformation mode data according to the defect classification criteria to obtain a stress-deformation relationship dataset, performing origin feature analysis on the stress-deformation relationship dataset, and calculating the defect type probability to obtain a deformation mode parameter dataset includes:
[0034] The original deformation pattern data is obtained from the pre-established defect feature database. According to the defect classification criteria, the original deformation pattern data is classified into defects to obtain a classified defect type dataset.
[0035] Based on the defect type dataset, stress values and deformation values are obtained, and the correspondence between the stress values and deformation values for each type of defect is simulated using the finite element method to obtain the stress-deformation relationship dataset.
[0036] When the stress value exceeds a preset stress threshold, the stress-deformation relationship dataset is traced back to its source, defect origin features are extracted, and the K-means clustering algorithm is used to classify the defect origin features to obtain a defect origin feature dataset.
[0037] For the defect origin feature dataset, a Gaussian mixture model is used to calculate the probability of the defect type for each type of defect feature, thereby obtaining the deformation mode parameter dataset.
[0038] Preferably, the step of calculating the plasticity index based on the deformation mode parameter dataset using the finite element method, and extracting overlapping features when the plasticity index exceeds a preset plasticity index threshold, and then inputting these features into a decision tree algorithm to determine the cracking risk level, includes:
[0039] Based on the deformation mode parameter dataset, principal component analysis is used to extract deformation mode data and stress distribution data to form a strain characteristic dataset.
[0040] Finite element analysis is performed on the strain characteristic dataset to calculate the plasticity index. Boundary condition constraints are applied to the plasticity index to obtain the calibration plasticity index.
[0041] When the calibration plasticity index exceeds the preset plasticity index threshold, the K-means clustering algorithm is used to extract the overlap features between the deformation mode data and the stress distribution data to obtain the overlap index dataset.
[0042] Using the strain feature dataset and the coincident index dataset as input, a decision tree algorithm is used to classify cracking risks and determine the cracking risk level.
[0043] Secondly, the present invention provides a machine vision-based injection molded part quality inspection system, comprising:
[0044] The image preprocessing module is used to acquire images of the surface of injection molded parts, perform preprocessing, and obtain enhanced defect images;
[0045] The feature vector extraction module is used to extract edges from the enhanced defect image and calculate the directional gradient histogram to obtain a high-dimensional defect feature vector.
[0046] The stress distribution simulation module is used to obtain the three-dimensional design model corresponding to the injection molded part to be tested, perform meshing on the three-dimensional design model, simulate the internal stress distribution, extract the coordinates of the stress peak points, and obtain a stress distribution map.
[0047] The overlap verification module is used to extract the defect location based on the high-dimensional defect feature vector, separate the stress concentration area from the stress distribution map, and perform overlap verification between the pre-acquired supplier code attribute and the defect location and the stress concentration area to obtain the predicted overlap index.
[0048] The defect classification module is used to analyze the deformation type if the predicted overlap index meets the preset overlap threshold range, and to obtain the defect classification standard by combining the deformation type and the supplier code attribute.
[0049] The stress source analysis module is used to acquire the original deformation mode data, perform numerical simulation analysis on the original deformation mode data according to the defect classification criteria, obtain the stress-deformation relationship dataset, perform origin feature analysis on the stress-deformation relationship dataset, calculate the defect type probability, and obtain the deformation mode parameter dataset.
[0050] The risk level determination module is used to calculate the plasticity index based on the deformation mode parameter dataset using the finite element method. When the plasticity index exceeds the preset plasticity index threshold, it extracts the overlapping features and classifies them into types to determine the cracking risk level.
[0051] The quality report generation module is used to generate a quality assessment report by integrating the deformation mode parameter dataset and the cracking risk level when the cracking risk level is higher than a preset risk threshold.
[0052] Compared with the prior art, the present invention has the following beneficial effects:
[0053] (1) This invention obtains enhanced defect images by acquiring surface images of injection molded parts and performing preprocessing, and then performs edge extraction and directional gradient histogram calculation to obtain high-dimensional defect feature vectors. This process can improve image quality through preprocessing, accurately capture the subtle features and distribution patterns of defects through edge extraction and histogram calculation, and the high-dimensional feature vectors cover richer defect information, providing a high-quality data foundation for subsequent defect analysis and identification, and helping to improve the accuracy of defect detection.
[0054] (2) This invention simulates the internal stress distribution and extracts the coordinates of stress peak points by meshing the geometric model of the injection molded part to obtain a stress distribution map. Mesh generation ensures the accuracy of stress simulation, and the stress distribution map can clearly show the distribution state and peak position of the internal stress of the injection molded part, linking the detection of surface defects with the internal stress state, and providing a key basis for in-depth analysis of the internal mechanism of defect formation.
[0055] (3) This invention extracts the defect location based on the high-dimensional defect feature vector, combines the stress concentration area separated by the stress distribution map, and performs overlap verification with the supplier code attributes to obtain the predicted overlap index. This verification method associates the surface location and internal stress concentration of the defect with supplier information in multiple dimensions, realizing a comprehensive consideration of defect-related factors. This makes the predicted overlap index not only include the spatial characteristics of the surface defect, but also incorporates deeper information on stress and material source, enabling more accurate location of potential related factors of the defect.
[0056] (4) This invention calculates the plasticity index based on the deformation mode parameter dataset. When the index exceeds the preset plasticity index threshold, overlapping features are extracted and input into a decision tree algorithm to determine the cracking risk level. Finally, when the risk level exceeds the limit, the data is integrated to generate a quality assessment report. The plasticity index quantifies the plastic deformation capacity of the material under stress, the overlapping features relate the spatial matching relationship between the deformation mode and the stress distribution, and the quality assessment report integrates the results of multiple detections and analyses, realizing a comprehensive assessment of the quality of injection molded parts and helping to make accurate decisions on process adjustment. Attached Figure Description
[0057] Figure 1 This is a flowchart illustrating an embodiment of the machine vision-based injection molding part quality inspection method provided by the present invention.
[0058] Figure 2 This is a schematic diagram of an embodiment of the machine vision-based injection molding part quality inspection system provided by the present invention. Detailed Implementation
[0059] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0060] Reference Figure 1 The first embodiment of the present invention provides a machine vision-based method for quality inspection of injection molded parts, including steps S11 to S18:
[0061] S11: Acquire surface images of the injection molded part, perform preprocessing, and obtain enhanced defect images;
[0062] S12, perform edge extraction on the enhanced defect image and calculate the directional gradient histogram to obtain a high-dimensional defect feature vector;
[0063] S13, obtain the three-dimensional design model corresponding to the injection molded part to be tested, perform meshing on the three-dimensional design model, simulate the internal stress distribution and extract the coordinates of the stress peak point to obtain the stress distribution map;
[0064] S14. Based on the high-dimensional defect feature vector, extract the defect location and separate the stress concentration area from the stress distribution map. Perform overlap verification between the pre-acquired supplier code attribute and the defect location and the stress concentration area to obtain the predicted overlap index.
[0065] S15, if the predicted overlap index meets the preset overlap threshold range, then analyze the deformation type, and combine the deformation type and the supplier code attribute to obtain the defect classification standard;
[0066] S16, Obtain the original deformation mode data, perform numerical simulation analysis on the original deformation mode data according to the defect classification criteria, obtain the stress-deformation relationship dataset, perform origin feature analysis on the stress-deformation relationship dataset, calculate the defect type probability, and obtain the deformation mode parameter dataset.
[0067] S17. Based on the deformation mode parameter dataset, calculate the plasticity index using the finite element method. When the plasticity index exceeds the preset plasticity index threshold, extract the overlapping features, input them into the decision tree algorithm, and determine the cracking risk level.
[0068] S18, when the cracking risk level is higher than the preset risk threshold, integrate the deformation mode parameter dataset and the cracking risk level to generate a quality assessment report.
[0069] In step S11, an image of the injection molded part surface is acquired and preprocessed to obtain an enhanced defect image.
[0070] It is important to note that when acquiring images of the injection-molded part's surface, a high-resolution industrial camera should be used to obtain images from multiple angles (such as top, side, 45-degree angle, etc.) to comprehensively cover all areas of the injection-molded part's surface and avoid blind spots that may occur from a single viewpoint. For example, a 20-megapixel industrial camera can be used to first acquire high-resolution original images of different areas of the injection-molded part's surface. Then, according to the inspection requirements, the original images are downsampled, adjusting each high-resolution image to 1920×1080 pixels while preserving the subtle texture information of defects in the image. Subsequently, these multi-angle views are stitched together using the SIFT algorithm to integrate them into a panoramic image, ensuring that the image can completely reproduce the texture and structure of the injection-molded part's surface.
[0071] In this embodiment, the image preprocessing process includes several key steps. First, the acquired surface image of the injection-molded part is denoised while preserving defect edge information. For example, a bilateral filter is used for denoising. By setting the spatial standard deviation to 3 pixels and the grayscale standard deviation to 50, the image containing fine scratches and random noise is smoothed, keeping the scratch edges clear while significantly reducing background noise. Next, adaptive histogram equalization enhances image contrast. To address the issue of low contrast between defect areas and the background caused by material or lighting, the grayscale difference between the defect area and the background can be increased by adjusting the grayscale distribution of local areas. Subsequently, the Sobel operator is used to calculate pixel-level gradient intensity. Pixel grayscale changes are detected through horizontal and vertical convolution kernels, highlighting defect edge features. For example, the grayscale change in the scratch area is drastic. After processing with the Sobel operator, the gradient intensity value of the edge can reach 200, while the background area is only 20-50, further significantly enhancing the defect edge features. Finally, local contrast quantization is performed on the image, a pixel value threshold is set, and areas with pixel values exceeding the threshold are marked as defect areas to accurately locate the defect and obtain an enhanced defect image.
[0072] In step S12, edge extraction is performed on the enhanced defect image, and a directional gradient histogram is calculated to obtain a high-dimensional defect feature vector, including:
[0073] The Canny edge detection algorithm is used to extract edges from the enhanced defect image, highlighting texture boundary features, to obtain the first feature set;
[0074] Edge pixel values are obtained from the first feature set. When the edge pixel values are greater than a preset pixel threshold, a region growing algorithm is used to cluster connected regions to obtain a second feature set.
[0075] Based on the second feature set, a directional gradient histogram is calculated, and the number of pixels in the connected region is used as the weight to generate the high-dimensional defect feature vector.
[0076] It should be noted that the Canny edge detection algorithm achieves accurate edge extraction through four key steps: Gaussian smoothing, gradient calculation, non-maximum suppression, and dual thresholding. Gaussian smoothing filters the enhanced defect image by introducing a Gaussian kernel, reducing image noise interference with edge detection. The radius of the Gaussian kernel needs to be adjusted according to the defect size, generally set to 2-3 pixels. Gradient calculation uses the Sobel operator to calculate the gradient intensity and direction of pixels in both the horizontal and vertical directions, quantifying the rate of change of pixel grayscale and providing a data foundation for edge localization. Non-maximum suppression further refines the edges, retaining only local maxima points in the gradient direction, turning thick lines into thin lines of single-pixel width, enhancing edge accuracy. Dual thresholding filters edge pixels by setting high and low thresholds. Pixels above the high threshold are identified as strong edges, pixels between the high and low thresholds and connected to strong edges are identified as weak edges, and the remaining pixels are considered non-edges. This method highlights texture boundary features, forming a first feature set containing edge information.
[0077] Furthermore, the edge pixel values obtained from the first feature set represent the grayscale intensity of the edge pixels; higher values indicate clearer edges. The preset pixel threshold needs to be determined in conjunction with the defect type and image quality. When the edge pixel value is greater than this threshold, it indicates that the pixel belongs to a relatively obvious edge region and meets the conditions for being used as a seed point for region growing. The core of the region growing algorithm is to start from the seed point and merge pixels in the neighborhood that meet similarity conditions (such as a grayscale difference less than a preset grayscale difference threshold) into the same region. Through continuous iterative growth, connected regions are eventually clustered. This process can integrate discrete edge pixels into complete defect regions, distinguishing defects from the background. The resulting second feature set contains information such as the location, range, and pixel distribution of the connected regions, facilitating overall defect analysis.
[0078] In this embodiment, based on the second feature set, the gradient direction information of pixels within all connected regions is first extracted. Then, the gradient direction is divided into 8-16 fixed angle intervals (such as 0°-30°, 30°-60°, etc.) to balance feature precision and computational efficiency. Subsequently, the distribution of gradient directions of all pixels within each angle interval is counted to form a directional gradient histogram, which can effectively capture the texture direction features of different defects and reflect the texture structure of the defects. Since connected regions with more pixels account for a larger proportion of the overall defect and have a greater impact on feature description, the number of pixels in the connected regions is used as a weight. The histograms of each cell are combined according to the weight to finally form a high-dimensional defect feature vector containing the edge, region, and directional characteristics of the defect.
[0079] For example, for an enhanced defect image containing a wire-drawing defect, when using the Canny edge detection algorithm, the Gaussian kernel radius is set to 2 pixels, the high threshold is 150, and the low threshold is 50. After processing, the edge pixel values of the wire-drawing defect are mostly between 160 and 180, while the background region pixel values are below 50, forming the first feature set. Edge pixels with pixel values greater than 120 are selected from the first feature set as seed points. Based on the region growing algorithm, the gray-level difference threshold is set to 15, and pixels with a gray-level difference less than 15 in the neighborhood of the seed point are merged, finally clustering to form a connected region containing 200 pixels, resulting in the second feature set. Based on the second feature set, a directional gradient histogram is calculated, and the gradient direction is divided into 8 intervals. Statistical analysis shows that the gradient direction of this connected region is mainly concentrated in the 0-45° range, accounting for 70%, while the other directions account for 30%. The pixel count of this connected region is then used as a weight of 0.8, and the histogram data is combined to generate a high-dimensional defect feature vector containing 8 dimensions. This vector can accurately describe the directional characteristics and regional range of the wire-drawing defect.
[0080] In step S13, a three-dimensional design model corresponding to the injection molded part to be tested is obtained. The three-dimensional design model is meshed, the internal stress distribution is simulated, and the coordinates of the stress peak points are extracted to obtain a stress distribution map, including:
[0081] The three-dimensional design model is meshed using the finite element method to generate the first mesh model;
[0082] Obtain the process parameters corresponding to the injection molded part, and calculate the initial stress field based on the first mesh model and the process parameters to obtain the first stress distribution set;
[0083] Based on a Gaussian filter, stress values exceeding a preset stress threshold in the first stress distribution set are smoothed to obtain a second stress distribution set.
[0084] For the second stress distribution set, the coordinates of the stress peak points are extracted, and the region is segmented according to the coordinates of the stress peak points to form the stress distribution map.
[0085] It should be noted that the 3D design model corresponding to the injection molded part to be tested is a 3D digital model obtained from the design database corresponding to the injection molded part production. It completely restores the geometric structural features of the injection molded part, including key structural information such as the outline, wall thickness distribution, hole location, and corner curvature. Finite element mesh generation discretizes the complex 3D design model into a finite number of interconnected elements (such as tetrahedral or hexahedral elements), simplifying the calculation difficulty of the continuum and realizing the numerical simulation of the overall stress distribution. The selection of element size needs to balance calculation accuracy and efficiency. It is usually adjusted according to the structural complexity of the injection molded part and the size of key areas (such as corners or thickness transitions), generally controlled within the range of 0.2-1mm. For areas with high precision requirements, it can be reduced to 0.1mm. The generated first mesh model contains the spatial coordinates, connection relationships, and physical properties of the elements, and is the discretized geometric carrier for stress field calculation. The obtained injection molded part process parameters include injection pressure, mold temperature, melt temperature, and holding time, reflecting the mechanical and thermal conditions during the injection molding process.
[0086] Furthermore, based on the first mesh model, the momentum conservation equation and energy conservation equation are first decomposed into each mesh element. Then, process parameters are combined to assign boundary conditions and loads to the elements. For example, "mold temperature 60℃" is set as the temperature boundary of the mesh element and the mold contact surface, "injection pressure 120MPa" is set as the load on the element during the melt filling stage, and "melt temperature 220℃" is used as the initial temperature condition input into the energy equation. The momentum conservation equation and energy conservation equation are solved for each element using finite element analysis software (such as ANSYS, Abaqus) to obtain the temperature and displacement changes of the element during the cooling and solidification process. Then, according to the constitutive relationship of the material (such as elastic modulus, Poisson's ratio, etc.), the displacement is converted into stress value. Finally, the stress data of all elements are summarized to form the first stress distribution set, which contains multi-dimensional data such as principal stress and shear stress of each element. This can quantitatively describe the stress state inside the injection molded part caused by temperature gradient or uneven shrinkage.
[0087] In this embodiment, the Gaussian filter uses a weighted average of stress values exceeding a preset stress threshold to make stress changes more consistent with actual physical laws. The weight values conform to a normal distribution. The preset stress threshold is set with reference to the material's yield strength. The Gaussian kernel radius is related to the mesh cell size and can be set to 1-3 mm to ensure that high-frequency noise caused by insufficient meshing accuracy or calculation iteration errors is eliminated while preserving the overall trend of stress concentration. The coordinates of stress peak points are the key locations with the highest stress and are also high-incidence areas of defects (such as cracks, deformation, etc.). By dividing spatially adjacent stress peak points into the same region, each region represents a stress concentration area. The resulting stress distribution map visually displays the stress level of each region using color gradients, facilitating rapid identification of high-stress areas requiring special attention.
[0088] For example, for the geometric model of a plastic gear injection molded part, a first mesh model containing approximately 80,000 elements was generated using tetrahedral meshing. To ensure the calculation accuracy of critical parts such as the tooth root, the element size was controlled at 0.5 mm. The injection pressure of the injection molded part was obtained as 120 MPa, the mold temperature as 60°C, and the yield strength as 50 MPa. The stress threshold was set to 0.8 × 50 = 40 MPa. Combining the first mesh model with the initial stress field calculation, the resulting first stress distribution set showed stress concentration in the tooth root region due to restricted shrinkage, with a maximum stress value reaching 60 MPa, exceeding the preset stress threshold. Therefore, a Gaussian kernel radius of 2 mm was used to smooth the stress values exceeding 40 MPa, resulting in a second stress distribution set. The stress peak value in the tooth root region was reduced to 50 MPa, eliminating local abnormal fluctuations. When extracting the coordinates of the stress peak points, it was found that three peak points were concentrated in the circumferential direction of the tooth root, with coordinate ranges of 5-10mm on the x-axis, 8-12mm on the y-axis, and 0-2mm on the z-axis. After dividing the region based on these points, a stress concentration area of approximately 5mm² was formed. In the final stress distribution map, this area was marked in red, clearly showing the high stress state at the tooth root.
[0089] In step S14, the defect location is extracted based on the high-dimensional defect feature vector, and the stress concentration region is separated from the stress distribution map. The overlap between the pre-acquired supplier code attribute and the defect location and the stress concentration region is verified to obtain the predicted overlap index, including:
[0090] The high-dimensional defect feature vector is subjected to feature analysis, the geometric center coordinates of the texture contour are extracted as the defect position coordinates, and the maximum offset of the texture extension direction is calculated as the deformation amount.
[0091] Based on the Canny edge detection algorithm, the boundary of the stress concentration region is extracted from the stress distribution map to generate a dataset of the concentration region containing coordinates and stress values.
[0092] The supplier code attribute is obtained from the pre-established supply chain management database. The supplier code attribute is logically matched with the defect location coordinates and the centralized area dataset to calculate the first overlap index.
[0093] When the deformation exceeds a preset deformation threshold, the first overlap index is adjusted according to the preset index optimization rules to obtain the predicted overlap index.
[0094] It's important to note that the core of feature parsing high-dimensional defect feature vectors lies in extracting spatial features directly related to the defect from vectors containing multi-dimensional information such as edges, directions, and regions. The geometric center coordinates of the texture contour serve as the spatial location marker of the defect on the injection-molded part surface, obtained by calculating the average coordinates of all points on the texture contour boundary. The maximum offset in the texture extension direction, i.e., the deformation, represents the local displacement of the defect, reflecting the degree of deformation caused by stress in the defect area. For example, the deformation of a minor scratch is 0.03-0.08 mm, while the deformation of a severe crack can reach over 0.3 mm. The Canny edge detection algorithm can accurately capture stress value abrupt change boundaries containing a series of continuous spatial coordinate points while suppressing noise. Combined with the stress values of each point within the region, the generated concentrated region dataset not only clarifies the spatial range of stress concentration but also includes the stress magnitude distribution within the region.
[0095] In this embodiment, the supplier code attribute includes supplier number, material batch code, and material performance parameters. A first overlap index is obtained by calculating the spatial overlap rate between the defect location and the stress concentration area within the same material batch, with a value range of 0-1. The closer the index is to 1, the stronger the correlation between the supplier's material and the current defect and stress concentration. The preset deformation threshold needs to be set with reference to the material's allowable deformation limit. When the deformation exceeds this threshold, it indicates that the defect has significantly affected the structural integrity of the injection molded part. At this time, according to the preset index optimization rules, the overlap index needs to be reduced proportionally to the deformation exceeding the threshold. The resulting predicted overlap index comprehensively quantifies the correlation strength between the current defect and its potential causes by integrating the material's historical performance and the spatial correlation between the defect location and the stress concentration area.
[0096] For example, for an injection molded part with a wire drawing defect, after parsing its high-dimensional defect feature vector, the geometric center coordinates of the texture contour are extracted as (x: 150mm, y: 90mm), with a deformation of 0.25mm. Based on the Canny edge detection algorithm, the coordinate range of the stress concentration area is extracted from the stress distribution map as x: 145-155mm, y: 85-95mm, with a maximum stress value of 45MPa within the area, generating a concentration area dataset. The supplier code attribute of the injection molded part is obtained from the supply chain management database as supplier S002 and material batch M20250802. Through logical matching calculation, it is found that the defect incidence rate of this batch of material in the stress concentration area is 70%, and the first overlap index is 0.7. Since the deformation of 0.25mm exceeds the preset deformation threshold of 0.2mm, according to the optimization rules, the index is reduced by 0.1 for every 0.05mm exceeding the threshold. The first overlap index is adjusted to 0.6, and the final predicted overlap index is 0.6. This index indicates that the wire drawing defect is strongly related to the material batch of supplier S002, and the degree of deformation needs to be closely monitored.
[0097] In step S15, if the predicted overlap index meets the preset overlap threshold range, the deformation type is analyzed, and the defect classification criteria are obtained by combining the deformation type and the supplier code attribute, including:
[0098] Based on the supplier code attribute, obtain the material yield strength and material batch characteristics;
[0099] When the predicted coincidence index meets the preset coincidence threshold range, the deformation type caused by the stress value data of the stress concentration area at the defect location is determined by the decision tree algorithm in combination with the material yield strength, and the deformation determination result is obtained.
[0100] The support vector machine algorithm is used to correlate the deformation determination result with the characteristics of the material batch, and the defect occurrence pattern of the same material batch under the deformation type is statistically analyzed to generate the defect classification standard.
[0101] It should be noted that the yield strength of a material refers to the critical stress value at which a material transitions from elastic deformation to plastic deformation, and its magnitude is determined by the mechanical properties of the material itself. When the stress value exceeds the yield strength, the material undergoes plastic deformation and retains permanent deformation after unloading. Material batch characteristics encompass information such as production environment parameters (e.g., melting temperature fluctuations, additive ratios), and quality inspection records (e.g., tensile strength standard deviation) for the same batch of materials, used to trace whether defects exhibit batch-specific patterns. When the predicted overlap index meets the preset overlap threshold range, it indicates a high correlation between defects and stress concentration and the supplier's materials. At this point, the decision tree algorithm uses the stress value of the stress concentration area, the material's yield strength, and the amount of defect deformation as input features, and performs hierarchical judgments through preset branching rules. If the stress value exceeds the yield strength and the deformation is greater than the preset deformation threshold, it is determined to be plastic deformation; if the stress value is lower than the yield strength and the deformation is less than the preset deformation threshold, it is determined to be elastic deformation.
[0102] Furthermore, the support vector machine (SVM) algorithm is used for correlation analysis. Leveraging the algorithm's advantages in classifying small samples and high-dimensional data, the deformation determination results are mapped to the material batch characteristics into a high-dimensional feature space. By finding the optimal classification hyperplane, a correlation model of "deformation type - material batch - defect manifestation" is established. Specifically, the algorithm statistically analyzes the frequency of defect occurrence, defect location distribution, and defect morphological characteristics (such as crack length and width) of the same material batch under specific deformation types. The resulting defect classification criteria categorize defects into several types, such as wire drawing defects, crack defects, and void defects.
[0103] For example, the predicted overlap index of a certain injection molded part is 0.75, which is within the preset threshold range of 0.6-0.9. Based on its supplier code attribute (supplier S004, material batch C202509), the material yield strength is obtained as 45MPa. The batch characteristics show that the melting temperature of this batch of material fluctuates significantly, within ±5℃. Combining the stress value of 60MPa in the stress concentration area and the local defect deformation of 0.22mm, the decision tree algorithm determines the deformation type as plastic deformation. Support vector machine algorithm correlation analysis reveals that under plastic deformation, 80% of the defects in this batch of material are surface cracks with a length of 3-5mm and a width of 0.1-0.2mm, concentrated in the area with a stress value of 50-70MPa. The defect classification standard generated accordingly adds a new type of "plastic deformation - batch C202509 - crack defect", which is defined as "surface cracks with a material yield strength of less than 45MPa, stress value exceeding 50MPa, deformation amount >0.2mm, and crack length of 3-5mm", providing a clear standard for the rapid identification and risk assessment of similar defects in the future.
[0104] In step S16, the original deformation mode data is acquired. Based on the defect classification criteria, numerical simulation analysis is performed on the original deformation mode data to obtain a stress-deformation relationship dataset. Origin feature analysis is then performed on the stress-deformation relationship dataset, and the defect type probability is calculated to obtain a deformation mode parameter dataset, including:
[0105] The original deformation pattern data is obtained from the pre-established defect feature database. According to the defect classification criteria, the original deformation pattern data is classified into defects to obtain a classified defect type dataset.
[0106] Based on the defect type dataset, stress values and deformation values are obtained, and the correspondence between the stress values and deformation values for each type of defect is simulated using the finite element method to obtain the stress-deformation relationship dataset.
[0107] When the stress value exceeds a preset stress threshold, the stress-deformation relationship dataset is traced back to its source, defect origin features are extracted, and the K-means clustering algorithm is used to classify the defect origin features to obtain a defect origin feature dataset.
[0108] For the defect origin feature dataset, a Gaussian mixture model is used to calculate the probability of the defect type for each type of defect feature, thereby obtaining the deformation mode parameter dataset.
[0109] It should be noted that the pre-established defect feature database stores a large amount of raw deformation pattern data accumulated from historical inspections, covering deformation records of different defect types under various stress conditions, including stress values, deformation values, and defect morphology parameters. Based on defect classification standards, the raw data is filtered and categorized, integrating defect data with similar properties to obtain a defect type dataset, providing a structured data foundation for subsequent in-depth analysis of specific defect types. The finite element method (FEM) is a numerical analysis method that simulates the mechanical response of an overall structure under stress by establishing and solving the mechanical equations of each element simultaneously. In this embodiment, the finite element simulation constructs a finite element model consistent with the actual defect morphology, calculates the deformation response of the defect region under different stress loads, and thus establishes the correspondence between stress values and deformation values. For example, for crack defects, the simulation process sets a series of stress values from the material's yield strength to its fracture strength, records the deformation at the crack tip corresponding to each stress value, and finally forms a stress-deformation relationship dataset that presents the quantitative relationship between the two in tabular form.
[0110] Furthermore, when the stress value exceeds a preset stress threshold, it indicates that the defect has entered a rapid development stage. At this point, it is necessary to extract the defect origin features by associating key parameters in the production process and historical defect records. These defect origin features include abnormal ranges of process parameters and deviations in raw material performance. K-means clustering is an unsupervised learning algorithm that iteratively calculates the distance between data points and each center by pre-setting K cluster centers, assigning data points to the nearest cluster until the cluster centers stabilize, thereby grouping data with similar features into one category. In this embodiment, the clustering algorithm can classify defect origins into categories such as abnormal process parameters, raw material quality problems, and insufficient equipment precision. The resulting defect origin feature dataset can clearly identify the main causes of various types of defects.
[0111] It is worth noting that the Gaussian mixture model is a probability-based generative model composed of a linear combination of multiple Gaussian distribution functions. Utilizing its ability to fit complex data distributions, the probability of occurrence of each defect type under specific conditions is obtained by statistically analyzing the frequency of occurrence of various defects under different origin characteristics. The resulting deformation mode parameter dataset integrates multi-dimensional information such as defect type, stress-deformation relationship, origin characteristics, and occurrence probability, providing comprehensive parameter support for subsequent risk assessment and production optimization.
[0112] For example, 1000 sets of original deformation pattern data were obtained from the defect feature database. Based on the defect classification criteria, a defect type dataset containing 300 sets of crack defect data was obtained. The stress value range was set to 45-90 MPa, resulting in a stress-deformation relationship dataset. When the stress value was 50 MPa, the deformation value was 0.15 mm; when the stress value was 60 MPa, the deformation value was 0.22 mm. Since 60 MPa exceeded the preset stress threshold of 55 MPa, data tracing was initiated. The extracted origin features included "melt temperature fluctuation of material batch C202509 within ±5℃" and "injection molding holding pressure time shorter than the standard value by 2 seconds," etc. The K-means clustering algorithm was used to classify the origin features into two categories: "raw material batch problem" and "process parameter anomaly," resulting in a defect origin feature dataset. For this dataset, calculations using a Gaussian mixture model revealed that the probability of crack defects occurring under the "raw material batch problem" feature was 0.75; and under the "process parameter anomaly" feature, the probability was 0.6. The final deformation mode parameter dataset clearly shows that when the stress value of the crack defect is above 60 MPa, the deformation value increases significantly with the increase of stress, mainly originating from the batch problem of raw materials, with an occurrence probability of 0.75.
[0113] In step S17, based on the deformation mode parameter dataset, the plasticity index is calculated using the finite element method. When the plasticity index exceeds a preset plasticity index threshold, overlapping features are extracted, input into a decision tree algorithm, and the cracking risk level is determined, including:
[0114] Based on the deformation mode parameter dataset, principal component analysis is used to extract deformation mode data and stress distribution data to form a strain characteristic dataset.
[0115] Finite element analysis is performed on the strain characteristic dataset to calculate the plasticity index. Boundary condition constraints are applied to the plasticity index to obtain the calibration plasticity index.
[0116] When the calibration plasticity index exceeds the preset plasticity index threshold, the K-means clustering algorithm is used to extract the overlap features between the deformation mode data and the stress distribution data to obtain the overlap index dataset.
[0117] Using the strain feature dataset and the coincident index dataset as input, a decision tree algorithm is used to classify cracking risks and determine the cracking risk level.
[0118] It's important to note that Principal Component Analysis (PCA) is a data dimensionality reduction method. Through linear transformation, it converts multiple related variables into a few unrelated composite variables (i.e., principal components). These principal components retain the information of the original data to the maximum extent while eliminating redundancy between variables. For example, from a dataset containing multiple parameters such as stress values, deformation values, and defect lengths, key principal components such as "stress-deformation correlation" and "defect propagation rate" can be extracted. The resulting strain characteristic dataset simplifies the data structure while preserving core features. Finite Element Analysis (FEM) can efficiently simulate complex engineering problems that are difficult to solve analytically. By constructing a finite element model consistent with actual working conditions, it simulates the plastic response of materials under current stress conditions, obtaining initial values for plasticity indices. Plasticity indices are quantitative parameters that measure a material's ability to undergo plastic deformation, represented by plastic strain values. They characterize the degree of permanent deformation that occurs when the stress exceeds the yield strength. Dividing the original plastic strain value by the material's ultimate plastic strain (i.e., the plastic strain value at fracture) yields a normalized plasticity index ranging from 0 to 1. A larger value indicates a higher degree of irreversible deformation.
[0119] Furthermore, by imposing boundary condition constraints on the initial plasticity index, such as fixing the displacement of a certain edge or limiting the load direction, the resulting calibrated plasticity index more closely reflects the actual stress state, ensuring the accuracy and reliability of the index. When the calibrated plasticity index exceeds the preset plasticity index threshold, it indicates that the material's plastic deformation has exceeded the safe range, posing a risk of cracking. At this point, the K-means clustering algorithm is used to extract the overlap features between deformation pattern data and stress distribution data. These overlap features include the consistency between the defect deformation direction and the stress concentration direction, and the spatial overlap rate between high-stress regions and large deformation regions. The K-means clustering algorithm groups data with similar overlap features into one class, and the resulting overlap index dataset quantifies the correlation between deformation and stress.
[0120] In this embodiment, the strain feature dataset includes plasticity indices and strain distribution, while the coincidence index dataset includes spatial overlap rate and directional consistency. Using the plasticity indices and spatial overlap rate as algorithm inputs, a decision tree algorithm is employed to perform hierarchical judgments based on preset branching rules, classifying cracking risk into three levels: high, medium, and low. For example, when plastic strain > 0.8% and spatial overlap rate > 80%, it is determined to be high risk; when plastic strain is between 0.5% and 0.8% and spatial overlap rate is between 50% and 80%, it is determined to be medium risk; and all other cases are considered low risk.
[0121] For example, relevant data of an ABS injection molded part were obtained from the deformation mode parameter dataset. Principal component analysis was used to extract two principal components: the "stress-deformation ratio" and the "location of maximum plastic strain," forming a strain feature dataset. Finite element analysis was performed on this dataset, yielding an initial plasticity index of 0.7%. After applying fixed boundary constraints to the mold, the calibrated plasticity index was 0.9%, exceeding the preset plasticity index threshold of 0.8%. K-means clustering was used to extract overlapping features, revealing an 85% spatial overlap and 90% directional consistency between the region of maximum deformation and the region of stress concentration, resulting in an overlapping index dataset. The strain feature dataset and the overlapping index dataset were input into a decision tree algorithm. Because the plastic strain value (0.9%) > 0.8% and the spatial overlap (85%) > 80%, the cracking risk level of the injection molded part was ultimately determined to be high.
[0122] In step S18, when the cracking risk level is higher than a preset risk threshold, the deformation mode parameter dataset and the cracking risk level are integrated to generate a quality assessment report.
[0123] It should be noted that the preset risk threshold is set based on the product application scenario. For example, the threshold for critical automotive components is usually medium risk, while that for ordinary electronic components can be set to high risk. The deformation mode parameter dataset covers parameters such as defect type, stress-deformation relationship, origin characteristics, and occurrence probability. The risk level is matched with the corresponding parameters, such as associating high risk level with high stress value and large deformation amount, forming a structured data system. The quality assessment report includes basic defect information (such as type, location, size, etc.), stress and deformation data (stress peak and plasticity index), risk level, and cause analysis, among other multi-dimensional information. The production side can adjust process parameters and material selection accordingly.
[0124] In summary, this invention discloses a machine vision-based method for quality inspection of injection molded parts, including: acquiring surface images of the injection molded parts; preprocessing them to obtain enhanced defect images; extracting edges from the enhanced defect images and calculating directional gradient histograms to obtain high-dimensional defect feature vectors; acquiring a three-dimensional design model corresponding to the injection molded part to be inspected; meshing the three-dimensional design model; simulating the internal stress distribution and extracting the coordinates of stress peak points to obtain a stress distribution map; extracting defect locations based on the high-dimensional defect feature vectors; separating stress concentration regions from the stress distribution map; verifying the overlap between pre-acquired supplier code attributes and the defect locations and stress concentration regions to obtain a pre-judged overlap index; if the pre-judged overlap index meets the preset overlap... If the threshold range is defined, the deformation type is analyzed, and a defect classification standard is obtained by combining the deformation type and the supplier code attribute. Original deformation pattern data is acquired, and numerical simulation analysis is performed on the original deformation pattern data according to the defect classification standard to obtain a stress-deformation relationship dataset. Origin feature analysis is performed on the stress-deformation relationship dataset, and the defect type probability is calculated to obtain a deformation pattern parameter dataset. Based on the deformation pattern parameter dataset, a plasticity index is calculated using the finite element method. When the plasticity index exceeds a preset plasticity index threshold, overlapping features are extracted, and the cracking risk level is determined after inputting into a decision tree algorithm. When the cracking risk level is higher than a preset risk threshold, the deformation pattern parameter dataset and the cracking risk level are integrated to generate a quality assessment report. This invention achieves scientific and automated quality assessment of injection molded parts by multi-dimensionally correlating surface defect information detected by machine vision with stress distribution data simulated by finite element method and supplier material properties, thereby improving the accuracy of quality inspection.
[0125] Reference Figure 2 The second embodiment of the present invention provides a machine vision-based injection molded part quality inspection system, comprising:
[0126] The image preprocessing module is used to acquire images of the surface of injection molded parts, perform preprocessing, and obtain enhanced defect images;
[0127] The feature vector extraction module is used to extract edges from the enhanced defect image and calculate the directional gradient histogram to obtain a high-dimensional defect feature vector.
[0128] The stress distribution simulation module is used to obtain the three-dimensional design model corresponding to the injection molded part to be tested, perform meshing on the three-dimensional design model, simulate the internal stress distribution, extract the coordinates of the stress peak points, and obtain a stress distribution map.
[0129] The overlap verification module is used to extract the defect location based on the high-dimensional defect feature vector, separate the stress concentration area from the stress distribution map, and perform overlap verification between the pre-acquired supplier code attribute and the defect location and the stress concentration area to obtain the predicted overlap index.
[0130] The defect classification module is used to analyze the deformation type if the predicted overlap index meets the preset overlap threshold range, and to obtain the defect classification standard by combining the deformation type and the supplier code attribute.
[0131] The stress source analysis module is used to acquire the original deformation mode data, perform numerical simulation analysis on the original deformation mode data according to the defect classification criteria, obtain the stress-deformation relationship dataset, perform origin feature analysis on the stress-deformation relationship dataset, calculate the defect type probability, and obtain the deformation mode parameter dataset.
[0132] The risk level determination module is used to calculate the plasticity index based on the deformation mode parameter dataset using the finite element method. When the plasticity index exceeds the preset plasticity index threshold, it extracts the overlapping features and classifies them into types to determine the cracking risk level.
[0133] The quality report generation module is used to generate a quality assessment report by integrating the deformation mode parameter dataset and the cracking risk level when the cracking risk level is higher than a preset risk threshold.
[0134] It should be noted that the machine vision-based injection molding part quality inspection system provided in this embodiment of the invention is used to execute all the process steps of the machine vision-based injection molding part quality inspection method in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.
[0135] This invention also provides an electronic device. The electronic device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a defect feature extraction program. When the processor executes the computer program, it implements the steps described in the various machine vision-based injection molding part quality inspection method embodiments above, for example... Figure 1 The step S11 shown. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in the above-described device embodiments, such as the image preprocessing module.
[0136] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device.
[0137] The electronic device may be a desktop computer, laptop, handheld computer, or smart tablet, etc. The electronic device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. It may include more or fewer components than described above, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.
[0138] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the electronic device, connecting all parts of the electronic device via various interfaces and lines.
[0139] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0140] Wherein, if the modules / units integrated in the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0141] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0142] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A method for detecting quality of an injection molded part based on machine vision, characterized in that, The method comprises the following steps: Collecting the surface image of the injection molded part, preprocessing to obtain an enhanced defect image; Performing edge extraction on the enhanced defect image and calculating a direction gradient histogram to obtain a high-dimensional defect feature vector; Obtaining a three-dimensional design model corresponding to the injection molded part to be detected, performing mesh division on the three-dimensional design model, simulating the internal stress distribution and extracting the stress peak point coordinates to obtain a stress distribution map; According to the high-dimensional defect feature vector, the defect position is extracted, and the stress concentration area is separated from the stress distribution map, the pre-acquired supplier code attribute is checked with the defect position and the stress concentration area, and a pre-judgment coincidence index is obtained; If the pre-judgment coincidence index meets the preset coincidence threshold range, the deformation type is analyzed, and the deformation type and the supplier code attribute are combined to obtain a defect classification standard; Obtaining original deformation mode data, performing numerical simulation analysis on the original deformation mode data according to the defect classification standard to obtain a stress deformation relationship data set, performing origin feature analysis on the stress deformation relationship data set, and calculating a defect type probability to obtain a deformation mode parameter data set; According to the deformation mode parameter data set, a plasticity index is calculated based on the finite element method, and when the plasticity index exceeds a preset plasticity index threshold, the coincidence feature is extracted and input into a decision tree algorithm to determine a cracking risk level; When the cracking risk level is higher than a preset risk threshold, the deformation mode parameter data set and the cracking risk level are integrated to generate a quality evaluation report.
2. The machine vision-based injection molded part quality inspection method of claim 1, wherein, The edge extraction on the enhanced defect image and the calculation of the direction gradient histogram to obtain the high-dimensional defect feature vector comprise: Using a Canny edge detection algorithm to perform edge extraction on the enhanced defect image to highlight the texture boundary features and obtain a first feature set; Obtaining edge pixel values from the first feature set, and when the edge pixel values are greater than a preset pixel threshold, using a region growing algorithm to cluster connected regions to obtain a second feature set; Based on the second feature set, a direction gradient histogram is calculated, the pixel number of the connected regions is taken as a weight, and the high-dimensional defect feature vector is generated.
3. The machine vision-based injection molded part quality inspection method of claim 1, wherein, The mesh division on the three-dimensional design model, the simulation of the internal stress distribution and the extraction of the stress peak point coordinates to obtain the stress distribution map comprise: Performing finite element mesh division on the three-dimensional design model to generate a first mesh model; Obtaining process parameters corresponding to the injection molded part, calculating an initial stress field according to the first mesh model and the process parameters to obtain a first stress distribution set; Based on a Gaussian filter, the stress values in the first stress distribution set that exceed a preset stress threshold are smoothed to obtain a second stress distribution set; For the second stress distribution set, the stress peak point coordinates are extracted, and the stress distribution map is formed according to the stress peak point coordinates.
4. The machine vision-based injection molded part quality inspection method of claim 1, wherein, The defect position is extracted according to the high-dimensional defect feature vector, and a stress concentration area is separated from the stress distribution map; a pre-acquired supplier code attribute is checked for coincidence with the defect position and the stress concentration area to obtain a pre-judgment coincidence index, including: The high-dimensional defect feature vector is subjected to feature analysis, the geometric center coordinates of a thread profile are extracted as defect position coordinates, and the maximum offset of a thread extension direction is calculated as a deformation amount; Based on a Canny edge detection algorithm, the boundary of the stress concentration area is extracted from the stress distribution map to generate a concentration area dataset containing coordinates and stress values; Supplier code attributes are acquired from a pre-established supplier chain management database, and the supplier code attributes are logically matched with the defect position coordinates and the concentration area dataset to calculate a first coincidence index; When the deformation amount exceeds a preset deformation threshold, the first coincidence index is adjusted according to a preset index optimization rule to obtain the pre-judgment coincidence index.
5. The machine vision-based injection molded part quality inspection method of claim 4, wherein, When the pre-judgment coincidence index meets a preset coincidence threshold range, a deformation type is analyzed, and a defect classification standard is obtained in combination with the deformation type and the supplier code attribute, including: Based on the supplier code attribute, material yield strength and material batch features are acquired; When the pre-judgment coincidence index meets a preset coincidence threshold range, a deformation type caused by stress value data of the stress concentration area at the defect position is determined through a decision tree algorithm in combination with the material yield strength to obtain a deformation determination result; A support vector machine algorithm is used to associate and analyze the deformation determination result and the material batch features, the defect occurrence regularity of the same material batch under the deformation type is counted, and the defect classification standard is generated.
6. The machine vision-based injection molded part quality inspection method of claim 1, wherein, The original deformation mode data is acquired, numerical simulation analysis is performed on the original deformation mode data according to the defect classification standard to obtain a stress deformation relationship dataset, origin feature analysis is performed on the stress deformation relationship dataset, and a defect type probability is calculated to obtain a deformation mode parameter dataset, including: Original deformation mode data is acquired from a pre-established defect feature database, defects are classified according to the original deformation mode data based on the defect classification standard to obtain a classified defect type dataset; Based on the defect type dataset, stress values and deformation values are acquired, a finite element method is used to simulate the corresponding relationship between the stress values and the deformation values of each type of defect to obtain the stress deformation relationship dataset; When the stress value exceeds a preset stress threshold, data provenance is performed on the stress deformation relationship dataset to extract defect origin features, a K-means clustering algorithm is used to classify the defect origin features to obtain a defect origin feature dataset; For the defect origin feature dataset, a Gaussian mixture model is used to calculate the defect type probability of each type of defect feature to obtain the deformation mode parameter dataset.
7. The machine vision-based injection molded part quality inspection method of claim 1, wherein, The plasticity index is calculated based on the finite element method according to the deformation mode parameter data set, when the plasticity index exceeds a preset plasticity index threshold, a coincidence feature is extracted, and a cracking risk grade is determined after inputting a decision tree algorithm, comprising: According to the deformation mode parameter data set, the principal component analysis method is used to extract the deformation mode data and the stress distribution data to form a strain feature data set; For the strain feature data set, finite element analysis is performed to calculate the plasticity index, and the boundary condition constraint is applied to the plasticity index to obtain the calibrated plasticity index; When the calibrated plasticity index exceeds a preset plasticity index threshold, the K-means clustering algorithm is used to extract the coincidence feature of the deformation mode data and the stress distribution data to obtain a coincidence index data set; The strain feature data set and the coincidence index data set are used as input, and a decision tree algorithm is used to classify the cracking risk to determine the cracking risk grade.
8. A machine vision-based injection molded part quality inspection system, characterized by, Comprise: An image preprocessing module for acquiring an injection molding part surface image, preprocessing to obtain an enhanced defect image; A feature vector extraction module for edge extraction of the enhanced defect image and calculation of a direction gradient histogram to obtain a high-dimensional defect feature vector; A stress distribution simulation module for obtaining a corresponding three-dimensional design model of the injection molding part to be detected, performing mesh division on the three-dimensional design model, simulating the internal stress distribution and extracting the stress peak point coordinates to obtain a stress distribution map; A coincidence verification module for extracting a defect position according to the high-dimensional defect feature vector, and separating a stress concentration area from the stress distribution map, and performing coincidence verification on the pre-acquired supplier code attribute and the defect position and the stress concentration area to obtain a pre-judgment coincidence index; A defect classification module for analyzing the deformation type if the pre-judgment coincidence index meets a preset coincidence threshold range, combining the deformation type and the supplier code attribute to obtain a defect classification standard; A stress traceability analysis module for obtaining original deformation mode data, performing numerical simulation analysis on the original deformation mode data according to the defect classification standard to obtain a stress deformation relationship data set, performing origin feature analysis on the stress deformation relationship data set, and calculating a defect type probability to obtain a deformation mode parameter data set; A risk grade determination module for calculating a plasticity index based on a finite element method according to the deformation mode parameter data set, extracting a coincidence feature and dividing types when the plasticity index exceeds a preset plasticity index threshold, and determining a cracking risk grade; A quality report generation module for integrating the deformation mode parameter data set and the cracking risk grade when the cracking risk grade is higher than a preset risk threshold to generate a quality evaluation report.
Citation Information
Patent Citations
Injection product defect detection method based on machine vision
CN120726049A
Automobile injection molding part defect detection method and system based on machine vision
CN120894345A