Machine vision defect detection method for multi-curved-surface transparent plastic injection molded part
Through multi-view angle imaging and light source control combined with image preprocessing, object segmentation and machine learning model defect detection methods, the complex structure and diffuse reflection problems of multi-surface transparent plastic injection molded parts are solved, and defect detection with high accuracy and high efficiency is achieved.
Patent Information
- Application Number
- CN202411713515.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-05-02
AI Technical Summary
The production and quality control of multi-curved transparent plastic injection molded parts is difficult, and existing defect detection technology is difficult to accurately divide different surfaces and eliminate or alleviate diffuse reflection problems, resulting in high false detection rates and missed detection rates, and unsatisfactory efficiency and cost.
The machine vision defect detection method is adopted for multi-viewing angle imaging, light source control, image preprocessing, object segmentation, defect initial detection, image repair and defect confirmation. The image is captured through multiple cameras and controllable light sources, light correction and background deduction are performed, object areas are divided, transparency is calculated, and defects are detected using machine learning models, diffuse interference is repaired and defects are confirmed.
It improves the accuracy and reliability of defect detection, reduces the diffuse light reflection problem, improves detection performance, and is suitable for a variety of multi-surface transparent plastic injection molded parts.
Smart Images

Figure CN119915842A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of machine vision, and in particular relates to a defect detection method for multi-curved transparent plastic injection molded parts. Background Art
[0002] In the injection molding industry, transparent plastic injection molded parts are widely used to manufacture automotive lampshades, transparent plastic bottles, transparent plastic containers, transparent plastic optical lenses and other products. However, the production and quality control of multi-curved transparent plastic injection molded parts are very difficult because the multi-faceted nature of these objects will cause diffuse reflection and refraction of light, which makes the detection of defects very high, both in terms of false detection rate and missed detection rate, and the efficiency and cost are far less than manual labor, which has caused great obstacles to fully automated production lines.
[0003] Diffuse reflection is the scattering of light on the surface of an object, causing it to reflect in multiple directions, not just toward the light source. This phenomenon can cause interference in the image and make surface defects difficult to identify. Especially in the case of multi-curved transparent plastic injection molded parts, the diffuse reflection phenomenon is more complicated because light may be reflected and refracted between multiple surfaces.
[0004] Existing defect detection technologies are often difficult to adapt to the complex structure of such multi-curved transparent plastic injection molded parts because they have difficulty accurately segmenting different surfaces and eliminating or mitigating diffuse reflection problems. Traditional visual inspection methods often cannot provide sufficient accuracy, so we overcome these problems through multi-view imaging, transparency models and image restoration methods visual algorithms. Summary of the invention
[0005] The present invention relates to a machine vision defect detection algorithm for multi-curved transparent plastic injection molded parts. Specifically, the present invention aims to provide a method to alleviate the problem of light diffuse reflection and refraction caused by the complex geometric shapes and multi-curved surface structures of the transparent plastic injection molded parts, thereby improving the accuracy and reliability of defect detection.
[0006] The machine vision defect detection method for multi-curved transparent plastic injection molded parts provided by the present invention comprises the following steps:
[0007] Multi-view imaging: Use a multi-camera configuration to capture images of multi-curved transparent plastic injection molded parts to provide image data from multiple viewpoints;
[0008] Light source control: configure multiple controllable light sources to control the incident angle and intensity of light to reduce the diffuse reflection and refraction effects of light;
[0009] Image preprocessing: Preprocess the captured images, including illumination correction, background subtraction, and color space transformation, to enhance object features and reduce noise;
[0010] Object segmentation: Use edge detection, shape analysis, and region growing techniques to segment multi-surface transparent plastic injection molded parts into different regions;
[0011] Initial defect detection: extract features from the segmented area, calculate the transparency through the transparency calculation model, and then input it into the pre-trained machine learning model to detect defective images;
[0012] Image restoration: The detected defective image is then restored using the calculated transparency to remove diffuse reflection;
[0013] Defect confirmation: Based on the repaired image, the transparency calculation model is used to calculate the new transparency, which is then compared with the defect-transparency comparison relationship to confirm the defect.
[0014] Preferably, the machine vision defect detection method for multi-curved transparent plastic injection molded parts of the present invention further includes the steps of:
[0015] Results display: Detected defects are marked on the image and the results can be stored or transmitted to the production line control system.
[0016] Preferably, in the machine vision defect detection method for multi-curved transparent plastic injection molded parts of the present invention, the multi-curved transparent plastic injection molded parts include: a bottle, a container and an optical lens.
[0017] Preferably, in the machine vision defect detection method for multi-curved transparent plastic injection molded parts of the present invention, the defects include: bubbles, impurities and scratches.
[0018] Preferably, in the machine vision defect detection method for multi-curved transparent plastic injection molded parts of the present invention, the defects include: the preprocessing includes using a background subtraction method to remove background noise and enhance the contrast of the object.
[0019] Preferably, in the machine vision defect detection method for multi-curved transparent plastic injection molded parts of the present invention, the transparency is calculated using the following method:
[0020] Transparency α is a function of the depth z of the object corresponding to the pixel, the material transparency T and the incident light angle θ_in: α = f(z, T, θ_in) The refraction law Snell's Law is used to calculate the transmittance;
[0021] The transmittance τ is calculated according to the following formula: τ = nmateria|nair·cos(θtransmitted). Through the transmittance τ, the transparency α is further obtained: α = 1-τ;
[0022] The transparency calculated by the above two methods is weighted to obtain the final transparency α. When weighting, the weights of the two are both greater than 0 and less than 1, and the sum of the two weights is 1.
[0023] Preferably, in the machine vision defect detection method for multi-curved transparent plastic injection molded parts of the present invention, the defects include: the machine learning model is a convolutional neural network or a support vector machine.
[0024] The machine vision defect detection algorithm for multi-curved transparent plastic injection molded parts of the present invention has the following advantages:
[0025] The present invention can improve the accuracy and efficiency of defect detection, is applicable to a variety of multi-curved transparent plastic injection molded parts, reduces the problem of light diffuse reflection, and improves detection performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:
[0027] Figure 1 It is a flow chart of an embodiment of a method for machine vision defect detection of multi-curved transparent plastic injection molded parts of the present invention. DETAILED DESCRIPTION
[0028] In order to have a clearer understanding of the technical features, purposes and effects of the present invention, specific embodiments of the present invention are now described in detail with reference to the accompanying drawings.
[0029] The core idea of the present invention is to combine multi-view imaging, light source control, image processing, object segmentation, defect detection and light diffuse reflection problem solving steps to cope with the complexity of multi-curved transparent plastic injection molded parts.
[0030] refer to Figure 1 The machine vision defect detection method for multi-curved transparent plastic injection molded parts provided by the present invention comprises the following steps:
[0031] S100, Multi-view imaging: Use a multi-camera configuration to capture images of multi-curved transparent plastic injection molded parts to provide image data from multiple viewpoints; multi-view imaging provides multiple views, enabling the algorithm to more fully understand the surface features of the object. For example, at least two cameras are placed at different positions and angles. These cameras may include high-resolution color cameras, infrared cameras, etc. to capture images of multi-curved transparent plastic injection molded parts. The multi-camera configuration should be able to capture images from multiple viewpoints simultaneously. Multi-curved transparent plastic injection molded parts include, but are not limited to: bottles, containers, and optical lenses.
[0032] S200, light source control: configuring multiple controllable light sources to control the incident angle and intensity of light, so as to reduce the diffuse reflection and refraction effects of light; by reasonably adjusting the position and intensity of the light source, the present invention helps to reduce the diffuse reflection and refraction effects of light, thereby improving image quality.
[0033] S300, image preprocessing: preprocessing the captured image, including illumination correction, background subtraction, and color space transformation, to enhance object features and reduce interference; these preprocessing steps help prepare the image for the next step of processing. Preprocessing includes using background subtraction methods to remove background noise and enhance the contrast of objects.
[0034] S400, Object Segmentation: Segment a multi-surface transparent plastic injection molded part into different regions using edge detection, shape analysis, and region growing techniques; this helps to process different parts of the injection molded part separately and provides information about its geometric structure.
[0035] S500, initial defect detection: extract features from the segmented area, calculate the transparency through the transparency calculation model, and then input it into the pre-trained machine learning model to detect defective images. Defects may include one or more of bubbles, impurities and scratches. The defect recognition algorithm feature extraction and machine learning model effectively detect defective areas. The machine learning model for defect detection can be a deep learning model, such as a convolutional neural network or a support vector machine, or a traditional feature extraction and classification method. Regarding the machine learning model, a batch of data can be collected in advance, and then the defects can be manually compared, marked and used together with the transparency as training samples to train the machine learning model and obtain a trained machine learning model.
[0036] The transparency is calculated using the following method:
[0037] Transparency α is a function of the depth z of the object corresponding to the pixel, the material transparency T and the incident light angle θ_in: α = f(z, T, θ_in) The refraction law Snell's Law is used to calculate the transmittance;
[0038] The transmittance τ is calculated according to the following formula: τ = nmateria | nair · cos(θtransmitted). The transmittance τ is used to further obtain the transparency α: α = 1-τ; where | represents a division sign, nair is the refractive index of air, nmaterial is the refractive index of the object material, and θtransmitted is the angle of the transmitted light.
[0039] The transparency calculated by the above two methods is weighted to obtain the final transparency α. When weighting, the weights of the two are both greater than 0 and less than 1, and the sum of the two weights is 1.
[0040] S600, image restoration: The calculated transparency is then used to repair the detected defective image to remove diffuse reflection; diffuse reflection is usually caused by the scattering of light on the surface of the object, which interferes with the accurate detection of defects. In order to remove diffuse reflection, image restoration methods can be used, among which Poisson image restoration is a commonly used technique. In Poisson image restoration, the problem can be modeled as a partial differential equation (PDE) problem, and the restoration is performed by minimizing the gradient of the pixel values in the image. For areas of diffuse reflection, the pixel values are recalculated based on the relationship with the surrounding pixels to maintain the overall consistency of the image. Poisson image restoration can be implemented through the corresponding functions in the image processing library (for example: OpenCV), and the following is a simplified code:
[0041] Here is a simplified code:
[0042]
[0043] cv::imshow("Repaired Image",recoveredImage);
[0044] cv::waitKey(0);
[0045] return 0;
[0046] }
[0047] S700, defect confirmation: based on the repaired image, the transparency calculation model is used to calculate a new transparency, and then compared with the defect-transparency comparison relationship, so as to confirm the defect. The defect-transparency comparison relationship can be manually calibrated in advance or trained using a learning algorithm.
[0048] S800, Result Display: Detected defects are marked on the image for operator verification and decision making, and the results can be stored or transmitted to the production line control system for automated feedback and control.
[0049] Preferably, in the machine vision defect detection method for multi-curved transparent plastic injection molded parts of the present invention, the defects include: the machine learning model is a convolutional neural network or a support vector machine.
[0050] The method of the present invention has wide application potential in the production line of the lamp injection molding industry, can improve production efficiency, reduce the defective rate, and improve product quality. In addition, it can also adapt to different types of multi-curved transparent plastic parts, making it a technical innovation with broad application prospects.
[0051] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.
Claims
1. A machine vision defect detection method for multi-curved transparent plastic injection molded parts, characterized in that: The following steps are involved: Multi-view imaging: Use a multi-camera configuration to capture images of multi-curved transparent plastic injection molded parts to provide image data from multiple viewpoints; Light source control: configure multiple controllable light sources to control the incident angle and intensity of light to reduce the diffuse reflection and refraction effects of light; Image preprocessing: Preprocess the captured images, including illumination correction, background subtraction, and color space transformation, to enhance object features and reduce noise; Object segmentation: Use edge detection, shape analysis, and region growing techniques to segment multi-surface transparent plastic injection molded parts into different regions; Initial defect detection: extract features from the segmented area, calculate the transparency through the transparency calculation model, and then input it into the pre-trained machine learning model to detect defective images; Image restoration: The detected defective image is then restored using the calculated transparency to remove diffuse reflection; Defect confirmation: Based on the repaired image, the transparency calculation model is used to calculate the new transparency, which is then compared with the defect-transparency comparison relationship to confirm the defect.
2. The method for detecting defects of multi-curved transparent plastic injection molded parts by machine vision according to claim 1, characterized in that: Also includes the steps: Results display: Detected defects are marked on the image and the results can be stored or transmitted to the production line control system.
3. The method for detecting defects of multi-curved transparent plastic injection molded parts by machine vision according to claim 1, characterized in that: The multi-curved transparent plastic injection molded part includes: a bottle, a container and an optical lens.
4. The method for machine vision defect detection of multi-curved transparent plastic injection molded parts according to claim 1, characterized in that: The defects include: bubbles, impurities and scratches.
5. The method for machine vision defect detection of multi-curved transparent plastic injection molded parts according to claim 1, characterized in that: The preprocessing includes removing background noise and enhancing the contrast of the object by using a background subtraction method.
6. The method for machine vision defect detection of multi-curved transparent plastic injection molded parts according to claim 1, characterized in that: The transparency is calculated using the following method: Transparency α is a function of the depth z of the object corresponding to the pixel, the material transparency T and the incident light angle θ_in: α = f(z, T, θ_in) The refraction law Snell's Law is used to calculate the transmittance; The transmittance τ is calculated according to the following formula: τ = nmateria | nair · cos(θtransmitted). The transmittance τ is used to further obtain the transparency α: α = 1-τ; where | represents a division sign, nair is the refractive index of air, nmaterial is the refractive index of the object material, and θtransmitted is the angle of the transmitted light. The transparency calculated by the above two methods is weighted to obtain the final transparency α. When weighting, the weights of the two are both greater than 0 and less than 1, and the sum of the two weights is 1.
7. The method for machine vision defect detection of multi-curved transparent plastic injection molded parts according to claim 1, characterized in that: The machine learning model is a convolutional neural network or a support vector machine.