Injection Molded Product Grouping Verification Method and System

By using a binocular camera and PID controller in the automatic sorting equipment for injection molded finished products, the exposure parameters are dynamically adjusted to improve image quality, and the problem of unstable image quality under complex lighting conditions is solved, and efficient and accurate automatic grouping verification is achieved.

CN119666877BActive Publication Date: 2025-06-03ZHEJIANG HENGDAO TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510188495.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-20
Publication Date
2025-06-03
Estimated Expiration
2045-02-20

AI Technical Summary

Technical Problem

The existing automatic sorting equipment for injection molded finished products is affected under complex lighting conditions, resulting in inaccurate coordinates of the grab point, which may damage the injection molded finished products and increase the defective rate.

Method used

The binocular camera is used to acquire images in real time, and the exposure parameters (shutdown speed and gain) are dynamically adjusted through the PID controller to ensure that the image information entropy is within the target range, thereby improving image quality.

Benefits of technology

By optimizing image quality, accurately identifying and mapping point coordinates and mapping them to three-dimensional space, efficient and accurate automatic grouping verification is achieved, reducing manual operation costs and defective rates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119666877B_ABST
    Figure CN119666877B_ABST
Patent Text Reader

Abstract

This application relates to the technical field of injection molded product inspection. It discloses a method and system for grouped verification of injection molded products. It uses a binocular camera to collect images in real time and dynamically adjusts the exposure parameters (shutter speed and gain) through a PID controller to ensure that the image information entropy is within the target range, thereby improving the image quality. Based on the optimized high-quality images, the coordinates of the grasping points can be accurately identified and mapped to the three-dimensional space. The robotic gripper then grabs the injection molded products and moves them to the defect detection position for appearance inspection and defect identification, ultimately achieving efficient and accurate automatic grouped verification. At the same time, the brightness statistical eigenvalue and the PID controller are used to dynamically adjust the camera exposure parameters to ensure the consistency of the image quality. In this way, even under complex lighting conditions, efficient and accurate automatic grouped verification can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of injection molded product inspection, and more specifically, to a method and system for grouping and verifying injection molded products. Background Art

[0002] In modern manufacturing, the production and quality inspection of injection molded parts is a key link. With the improvement of the automation level, the processing and manufacturing of injection molded parts have basically achieved assembly line production, but the quality inspection and sorting links still rely on manual operation. Although existing automated sorting equipment can save labor costs to a certain extent, there are still many deficiencies. For example, CN112150439A discloses an automatic sorting equipment and method for injection molded parts. The equipment collects binocular images of injection molded parts through a binocular camera, identifies the coordinates of the grasping points, maps them to positions in three-dimensional space, and then uses a mechanical gripper to grasp the injection molded parts and move them to the defect detection position for appearance image collection and defect identification. However, this method faces some challenges and areas for improvement in practical applications.

[0003] For example, under complex lighting conditions, the quality of the images collected by the binocular cameras in the prior art may be affected. Due to the diverse surface materials of injection molded parts, the phenomenon of light reflection is relatively common, which can lead to a decrease in the image matching accuracy, and further affect the accuracy of the grasping point coordinates. If the grasping position is offset, it may cause the mechanical gripper to damage the injection molded finished products during the grasping process, thereby increasing the defective rate.

[0004] Therefore, an optimized grouping and verification scheme for injection molded finished products is expected. Summary of the Invention

[0005] To solve the above technical problems, this application is proposed. Embodiments of this application provide a method and system for grouping and verifying injection molded products. It uses a binocular camera to collect images in real time and dynamically adjusts the exposure parameters (shutter speed and gain) through a PID controller to ensure that the image information entropy is within the target range and improve the image quality. Based on the optimized high-quality images, the coordinates of the grasping points can be accurately identified and mapped to three-dimensional space. The mechanical gripper then grasps the injection molded finished products and moves them to the defect detection position for appearance inspection and defect identification, ultimately achieving efficient and accurate automatic grouping and verification.

[0006] According to one aspect of the present application, a method for grouping and inspecting injection-molded finished products is provided, including: S1: Using a binocular camera to collect binocular images of the injection-molded finished products to be detected; S2: Identifying the two-dimensional coordinates of a preset grasping position and mapping the two-dimensional coordinates to a three-dimensional space to determine the spatial position of the grasping point; S3: Grasping the injection-molded finished products to be detected according to the spatial position and moving them to the defect detection position; S4: At the defect detection position, collecting the appearance images of the injection-molded finished products to be detected; S5: According to the appearance images, performing defect identification on the injection-molded finished products to be detected and grouping and placing the injection-molded finished products to be detected according to the identification results. It is characterized in that S1: Using a binocular camera to collect binocular images of the injection-molded finished products to be detected includes the steps of: S11: Using the binocular camera to collect the initial binocular images of the injection-molded finished products to be detected; S12: Extracting the brightness statistical feature values of the initial binocular images; S13: Calculating the difference between the brightness statistical feature values and the brightness target value as the current error; S14: Inputting the current error into a camera exposure parameter adjuster based on a PID controller to obtain a shutter adjustment strategy and a gain adjustment strategy; S15: Based on the shutter adjustment strategy and the gain adjustment strategy, adjusting the shutter speed and gain of the binocular camera, and using the binocular camera with adjusted parameters to collect the updated binocular images of the injection-molded finished products to be detected; S16: Calculating the image information entropy of the updated binocular images and determining whether the image information entropy of the updated binocular images enters the target range; S17: If the image information entropy of the updated binocular images enters the target range, stop adjusting the exposure parameters of the binocular camera; if the image information entropy of the updated binocular images does not enter the target range, loop through steps S11 to S16.

[0007] In the above method for grouping and inspecting injection-molded finished products, S12: Extracting the brightness statistical feature values of the initial binocular images includes: Extracting the brightness statistical feature values of the initial left-view image in the initial binocular images; Extracting the brightness statistical feature values of the initial right-view image in the initial binocular images; Based on the brightness statistical feature values of the initial left-view image and the brightness statistical feature values of the initial right-view image, determining the brightness statistical feature values of the initial binocular images.

[0008] In the above method for grouping and inspecting injection-molded finished products, extracting the brightness statistical feature values of the initial left-view image in the initial binocular images includes: Calculating the average brightness value of the initial left-view image as the brightness statistical feature value; Extracting the brightness statistical feature values of the initial right-view image in the initial binocular images includes: Calculating the average brightness value of the initial right-view image as the brightness statistical feature value.

[0009] In the above-mentioned injection molded product grouping verification method, based on the brightness statistical feature value of the initial left-view image and the brightness statistical feature value of the initial right-view image, determining the brightness statistical feature value of the initial binocular image includes: calculating the weighted sum of the brightness statistical feature value of the initial left-view image and the brightness statistical feature value of the initial right-view image based on a preset weight as the brightness statistical feature value of the initial binocular image.

[0010] In the above-mentioned injection molded product grouping verification method, S14: inputting the current error into a camera exposure parameter adjuster based on a PID controller to obtain a shutter adjustment strategy and a gain adjustment strategy, includes: calculating a proportional adjustment term, an integral adjustment term, and a derivative adjustment term; calculating the sum value of the proportional adjustment term, the integral adjustment term, and the derivative adjustment term as the PID adjustment output value; converting the PID adjustment output value into a shutter increment; calculating the sum value of the current shutter speed and the shutter increment to obtain the updated shutter speed in the shutter adjustment strategy.

[0011] In the above-mentioned injection molded product grouping verification method, S14: inputting the current error into a camera exposure parameter adjuster based on a PID controller to obtain a shutter adjustment strategy and a gain adjustment strategy, further includes: if the updated shutter speed in the shutter adjustment strategy exceeds the shutter upper limit speed, converting the PID adjustment output value into a gain increase amount; calculating the sum value of the gain increase amount and the current gain to obtain the updated gain in the gain adjustment strategy.

[0012] In the above-mentioned injection molded product grouping verification method, S16: calculating the image information entropy of the updated binocular image and determining whether the image information entropy of the updated binocular image enters a target range, includes: calculating the image information entropy of the updated left-view image in the updated binocular image; calculating the image information entropy of the updated right-view image in the updated binocular image; respectively determining whether the image information entropy of the updated right-view image and the image information entropy of the updated left-view image enter the target range; determining whether the mean value of the image information entropy of the updated right-view image and the image information entropy of the updated left-view image enters the target range; if the judgment result is that the image information entropy of the updated right-view image and the image information entropy of the updated left-view image enter the target range and the mean value of the image information entropy of the updated right-view image and the image information entropy of the updated left-view image enters the target range, determining that the image information entropy of the updated binocular image enters the target range.

[0013] According to another aspect of the present application, there is also provided an injection molded product grouping and inspection system, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the injection molded product grouping and inspection method as described above are implemented.

[0014] Compared with the prior art, the injection molded product grouping and inspection method and system provided by the present application use a binocular camera to collect images in real time and dynamically adjust the exposure parameters (shutter speed and gain) through a PID controller to ensure that the image information entropy is within the target range, thereby improving the image quality. Based on the optimized high-quality images, the coordinates of the grasping points can be accurately identified and mapped to the three-dimensional space. The mechanical gripper then grabs the injection molded products and moves them to the defect detection position for appearance inspection and defect identification, ultimately achieving efficient and accurate automatic grouping and inspection. At the same time, the brightness statistical feature value and the PID controller are used to dynamically adjust the camera exposure parameters to ensure the consistency of the image quality. In this way, even under complex lighting conditions, efficient and accurate automatic grouping and inspection can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] By describing the embodiments of the present application in more detail in conjunction with the drawings, the above and other objects, features, and advantages of the present application will become more obvious. The drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation to the present application. In the drawings, the same reference numerals generally represent the same components or steps.

[0016] Figure 1 FIG. shows a schematic flow chart of the injection molded product grouping and inspection method according to an embodiment of the present application.

[0017] Figure 2 FIG. shows a schematic flow chart of S1 in the injection molded product grouping and inspection method according to an embodiment of the present application.

[0018] Figure 3 FIG. shows a schematic flow chart of S12 in the injection molded product grouping and inspection method according to an embodiment of the present application.

[0019] Figure 4 FIG. shows a schematic flow chart of S14 in the injection molded product grouping and inspection method according to an embodiment of the present application.

[0020] Figure 5 FIG. shows a schematic flow chart of S16 in the injection molded product grouping and inspection method according to an embodiment of the present application.

[0021] Figure 6 FIG. shows a schematic structural diagram of the injection molded product grouping and inspection system according to an embodiment of the present application. Detailed implementation manners

[0022] Next, exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. It should be understood that the present application is not limited by the exemplary embodiments described herein.

[0023] Figure 1 The figure illustrates a schematic flowchart of a method for grouping and inspecting injection-molded finished products according to an embodiment of the present application. As Figure 1 shown, the present application provides a method for grouping and inspecting injection-molded finished products, including: S1: Collecting binocular images of the injection-molded finished products to be detected by using a binocular camera; S2: Identifying the two-dimensional coordinates of a preset grasping position and mapping the two-dimensional coordinates to a three-dimensional space to determine the spatial position of the grasping point; S3: Grasping the injection-molded finished products to be detected according to the spatial position and moving them to a defect detection position; S4: At the defect detection position, collecting appearance images of the injection-molded finished products to be detected; S5: According to the appearance images, performing defect identification on the injection-molded finished products to be detected and grouping and placing the injection-molded finished products to be detected according to the identification results.

[0024] First, a binocular camera is used to collect binocular images of the injection-molded finished product to be detected, which is the first step of the whole process. The binocular camera consists of two independent imaging cameras on the left and right, which can respectively capture the left-view and right-view images of the injection-molded part, so as to obtain a stereoscopic vision effect. These binocular images not only provide rich visual information, but also lay the foundation for subsequent three-dimensional space mapping. Next, after obtaining the binocular images, the two-dimensional coordinates of the preset grasping positions are identified and mapped to the three-dimensional space to determine the spatial positions of the grasping points. It should be understood that accurate grasping positions can ensure that the robotic gripper will not damage the injection-molded part during operation. Specifically, the positions of the key points are identified from the binocular images through an artificial intelligence image segmentation algorithm, and stereo matching is performed by combining the image data of the left and right cameras, and finally the coordinates of these key points in the actual three-dimensional space are restored. This process relies on the pre-calibrated binocular camera parameters, that is, the mapping relationship between the coordinates in the binocular images and the coordinates in the three-dimensional space. Once the spatial positions of the grasping points are determined, the robotic gripper grasps the injection-molded finished product to be detected according to these positions and moves it to the defect detection position. When the injection-molded part is moved to the defect detection position, the image acquisition device collects the appearance image of the injection-molded part at this position. The goal of this step is to obtain high-resolution appearance images for subsequent detailed defect identification. To ensure the image quality, high-resolution industrial cameras may be used and the injection-molded part is photographed from multiple angles to comprehensively cover its surface features. Subsequently, based on these appearance images, a trained defect recognition model is used to identify the defects of the injection-molded part. The defect recognition model is trained based on the sample images with labeled defect categories and can effectively identify common defects such as burrs, scratches, fractures, cracks, black dots, blisters or color changes. Finally, according to the results of the defect identification, the injection-molded parts are grouped and placed. For example, the injection-molded parts with specific types of defects will be grouped together for easy later processing; while the defect-free injection-molded parts will be neatly stacked and ready to enter the packaging process. The whole process not only realizes the automatic identification and classification of the defects of the injection-molded parts, but also greatly improves the sorting efficiency, reduces the labor cost, and improves the sorting accuracy.

[0025] Specifically, in the above injection-molded finished product grouping and inspection method, although efficient automatic sorting and defect detection have been achieved, there are still some deficiencies. For example, under complex lighting conditions or when the surface of the injection-molded part is reflective, the images captured by the binocular camera may have uneven brightness or reflection phenomena, which will affect the subsequent image matching accuracy and the accuracy of the grasping points, and may even cause damage to the injection-molded part during the grasping process. In addition, the fixed exposure parameters cannot adapt to different lighting conditions, easily resulting in unstable image quality, and further affecting the reliability and accuracy of the whole system.

[0026] To address these issues, Figure 2The figure shows a schematic flowchart of S1 in the method for grouped verification of injection-molded finished products according to an embodiment of the present application. As Figure 2 shown, a binocular camera is used to collect binocular images of the injection-molded finished product to be detected, including the steps of: S11: using the binocular camera to collect initial binocular images of the injection-molded finished product to be detected; S12: extracting the brightness statistical feature values of the initial binocular images; S13: calculating the difference between the brightness statistical feature values and the brightness target value as the current error; S14: inputting the current error into a camera exposure parameter adjuster based on a PID controller to obtain a shutter adjustment strategy and a gain adjustment strategy; S15: based on the shutter adjustment strategy and the gain adjustment strategy, adjusting the shutter speed and gain of the binocular camera, and using the binocular camera with adjusted parameters to collect updated binocular images of the injection-molded finished product to be detected; S16: calculating the image information entropy of the updated binocular images, and determining whether the image information entropy of the updated binocular images enters the target range; S17: if the image information entropy of the updated binocular images enters the target range, stop adjusting the exposure parameters of the binocular camera; if the image information entropy of the updated binocular images does not enter the target range, loop through steps S11 to S16.

[0027] In S11, the initial binocular images of the injection molded product to be detected are collected using the binocular camera. Specifically, to collect the initial binocular images, first, the binocular camera needs to be installed at an appropriate height and angle to cover all possible positions of the injection molded products passing by. Usually, the binocular camera is fixed on a bracket and fine-tuned through a robotic arm or a slide rail to adapt to injection molded parts of different sizes and shapes. This can ensure that no matter where the injection molded product is located, the binocular camera can accurately capture its complete appearance features. Next, to ensure the quality of the images, the binocular camera must be calibrated. During the calibration process, a standard calibration board (such as a checkerboard pattern) is placed on the conveyor belt and the binocular camera is used to take pictures of it. By analyzing these calibration images, the geometric relationship between the left and right cameras and their respective internal parameter matrices are calculated, thus establishing an accurate stereo matching model. This model is the basis for subsequent 3D reconstruction and grasping point recognition. In actual operation, when the injection molded product enters the field of view of the binocular camera, the system triggers the camera to take pictures. At this time, the left and right cameras simultaneously take pictures of different perspectives of the same injection molded product, forming a pair of binocular images. Since the positions of the left and right cameras are slightly different, the positions of the objects in each image will also have a slight offset, and this parallax information is the key to realizing 3D reconstruction. The reason for adopting this method is that the binocular vision system can simulate the way human eyes observe the world and perceive depth through parallax information. This method not only provides rich stereo information but also effectively avoids the occlusion problem that may occur with a single camera. In addition, the binocular camera system is relatively simple and low-cost, suitable for large-scale industrial applications. Compared with other 3D imaging technologies (such as laser scanning or structured light), the binocular camera does not require additional light source equipment, reducing the complexity and maintenance cost of the system.

[0028] In S12, the luminance statistical feature values of the initial binocular images are extracted. It should be understood that in an industrial environment, changes in the position or intensity of the light source or ambient light may cause uneven image luminance, thereby affecting the subsequent image processing results. By extracting the luminance statistical feature values, the overall luminance level of the image can be quantified, providing a basis for subsequent adjustment of the camera exposure parameters to ensure the consistency of image quality. For example, in high-reflection areas or under complex lighting conditions, relying solely on the luminance values of a single perspective may lead to problems such as underexposure or overexposure. By extracting and balancing the luminance statistical feature values of the left and right perspective images, the influence caused by reflection can be effectively reduced, ensuring that the image information is complete and accurate. In addition, extracting the luminance statistical feature values can also improve the accuracy of stereo matching. The binocular vision system relies on the disparity information between the left and right perspective images to reconstruct the position of an object in three-dimensional space. If the luminance difference between the left and right perspective images is large, it may cause the stereo matching algorithm to fail or produce large errors. By extracting the luminance statistical feature values and dynamically adjusting the camera parameters according to these values, the luminance consistency of the left and right perspective images can be ensured, thereby improving the accuracy of stereo matching and more accurately determining the spatial position of the grasping point.

[0029] Figure 3 The figure shows a schematic flowchart of S12 in the injection molded product grouping verification method according to an embodiment of the present application. As Figure 3 shown, in one embodiment, the step S12: extracting the luminance statistical feature values of the initial binocular images includes: S121: extracting the luminance statistical feature values of the initial left perspective image in the initial binocular images; S122: extracting the luminance statistical feature values of the initial right perspective image in the initial binocular images; S123: determining the luminance statistical feature values of the initial binocular images based on the luminance statistical feature values of the initial left perspective image and the luminance statistical feature values of the initial right perspective image.

[0030] In one embodiment, extracting the luminance statistical feature value of the initial left-view image in the initial binocular image includes: calculating the average luminance value of the initial left-view image as the luminance statistical feature value. Specifically, to extract the luminance statistical feature value, it is necessary to perform grayscale conversion on the image, converting the color image into a grayscale image to simplify subsequent calculations. Each pixel value in the grayscale image represents the luminance of that pixel, usually ranging from 0 to 255. For the left-view image, scan each pixel point row by row, calculate its grayscale value and accumulate them, and finally divide by the total number of pixels to obtain the average luminance value of the image. Similarly, extracting the luminance statistical feature value of the initial right-view image in the initial binocular image includes: calculating the average luminance value of the initial right-view image as the luminance statistical feature value. These two average luminance values respectively represent the luminance levels of the left and right view images. They not only reflect the overall luminance situation of the image but also provide an important reference for subsequent exposure parameter adjustment.

[0031] In one embodiment, based on the luminance statistical feature value of the initial left-view image and the luminance statistical feature value of the initial right-view image, determining the luminance statistical feature value of the initial binocular image includes: calculating the weighted sum of the luminance statistical feature value of the initial left-view image and the luminance statistical feature value of the initial right-view image based on a preset weight as the luminance statistical feature value of the initial binocular image. It should be understood that in order to synthesize the luminance information of the left and right view images, a weighted average method is usually used to calculate the overall luminance statistical feature value. According to the preset weight ratio, the overall luminance statistical feature value is calculated. In a specific embodiment, the average luminance value of the left-view image is 120, the average luminance value of the right-view image is 130, the weight of the left-view image is 60%, and the weight of the right-view image is 40%. Then the overall luminance statistical feature value is (120×0.6 + 130×0.4 = 72 + 52 = 124). This weighted average method can effectively balance the differences between the left and right view images, especially in the case of slightly asymmetric illumination, making the final luminance statistical feature value more representative.

[0032] In S13, calculating the difference between the luminance statistical feature value and the luminance target value as the current error. It should be understood that changes in lighting conditions may cause uneven image luminance, thereby affecting subsequent image processing results. By calculating the difference between the luminance statistical feature value and the luminance target value, we can quantify this deviation and accordingly adjust the exposure parameters of the camera to achieve the best image quality. For example, in high-reflection areas or complex lighting conditions, relying solely on the luminance value of a single view may lead to problems such as underexposure or overexposure. By calculating the current error, the shutter speed and gain of the camera can be dynamically adjusted to reduce the impact of reflections and ensure that the image information is complete and accurate.

[0033] In a specific embodiment, when the injection-molded finished product enters the field of view of the binocular camera, the system triggers the camera to take a picture and obtains the initial binocular image. Then, the system automatically calculates the average brightness values of the left-view image and the right-view image, and calculates the overall brightness statistical feature value according to the preset weight ratio. For example, if the calculated overall brightness statistical feature value is 124 and the preset brightness target value is 120, then the current error is 4. This error value indicates that the overall brightness of the current image is too low and the exposure needs to be increased to improve the brightness.

[0034] In S14, the current error is input into a camera exposure parameter adjuster based on a PID controller to obtain a shutter adjustment strategy and a gain adjustment strategy. It should be understood that a PID (Proportional-Integral-Derivative) controller is a common feedback control system that adjusts the control variable through three links: proportional, integral, and derivative, so that it is as close as possible to the set target value. In this application, the PID controller is used to adjust the exposure parameters of the camera (such as shutter speed and gain) so that the brightness statistical feature value of the image is as close as possible to the preset brightness target value.

[0035] Figure 4 The figure shows a schematic flowchart of S14 in the injection-molded finished product grouping verification method according to an embodiment of the present application. As Figure 4 shown, in one embodiment, S14: inputting the current error into a camera exposure parameter adjuster based on a PID controller to obtain a shutter adjustment strategy and a gain adjustment strategy, includes: S141: calculating a proportional adjustment term, an integral adjustment term, and a derivative adjustment term; S142: calculating the sum value of the proportional adjustment term, the integral adjustment term, and the derivative adjustment term as the PID adjustment output value; S143: converting the PID adjustment output value into a shutter increment; S144: calculating the sum value of the current shutter speed and the shutter increment to obtain the updated shutter speed in the shutter adjustment strategy; S145: if the updated shutter speed in the shutter adjustment strategy exceeds the shutter upper limit speed, converting the PID adjustment output value into a gain increase amount; S146: calculating the sum value of the gain increase amount and the current gain to obtain the updated gain in the gain adjustment strategy.

[0036] In a specific embodiment, the luminance statistical feature values of the initial binocular images have been extracted through the previous steps, and the overall luminance statistical feature value is calculated to be 124, while the preset luminance target value is 120. Then the current error is 124 minus 120, that is, 4. Next, this current error is input into the exposure parameter adjuster based on a PID controller. In specific implementation, first, the proportional adjustment term, integral adjustment term, and differential adjustment term need to be calculated. These three adjustment terms respectively reflect the influences of the current error, cumulative error, and error change rate on the system. The proportional adjustment term is directly proportional to the current error, and the formula is , where is the proportional coefficient, is the current error, is the proportional adjustment term. The integral adjustment term accumulates all past errors to avoid long-term deviations, and the formula is , where is the integral coefficient, is the integral adjustment term. The differential adjustment term reflects the change rate of the error and suppresses rapid changes, and the formula is , where is the differential coefficient, is the differential adjustment term.

[0037] In this embodiment, the current error is 4, the proportional coefficient , the integral coefficient , the differential coefficient , and the previous error is 3. We can calculate the proportional adjustment term , the integral adjustment term , the differential adjustment term , add these adjustment terms together to obtain the PID adjustment output value: . Next, convert the PID adjustment output value into a shutter increment. In this embodiment, the current shutter speed is 1 / 100 second, that is, 0.01 second, and the shutter increment can be calculated by the following formula: . Therefore, the shutter increment is 2.9. For ease of actual operation, it is usually converted into a reasonable step size, for example, increasing or decreasing by 1 / 1000 second per step. In this case, the shutter increment can be expressed as 29 units. Update the shutter speed according to the shutter increment: . The current shutter speed is 0.01 second, then the new shutter speed is 0.01 plus 0.0029, that is, 0.0129 second.

[0038] If the updated shutter speed exceeds the upper limit set by the system (such as 0.012 second), then the PID adjustment output value needs to be converted into a gain increase amount. The current gain is 1.0, and the gain increase amount can be calculated by the following formula: Therefore, the increase in gain is 2.9. The new gain is 1.0 plus 2.9, which is 3.9. Since the gain cannot increase infinitely, a maximum gain value (e.g., 2.0) is usually set, so the new gain should be 2.0.

[0039] In S15, based on the shutter adjustment strategy and the gain adjustment strategy, the shutter speed and gain of the binocular camera are adjusted, and the updated binocular image of the injection molded product to be detected is captured using the binocular camera with adjusted parameters. It should be understood that through the foregoing steps, the calculation of the current error has been completed, and the shutter adjustment strategy and the gain adjustment strategy have been obtained through the PID controller. Next, the parameter settings of the binocular camera will be updated according to these adjustment strategies. This step usually involves directly modifying the internal configuration file of the camera or sending instructions to the camera hardware through a software interface. For example, in an automated production line, when the injection molded product enters the field of view of the binocular camera, the system will automatically apply the new shutter speed and gain settings, and then trigger the camera to take a picture to obtain the updated binocular image. At this time, since the shutter speed and gain have been optimized and adjusted, the newly captured image will have a better brightness distribution and detail performance.

[0040] In S16, the image information entropy of the updated binocular image is calculated, and it is determined whether the image information entropy of the updated binocular image enters the target range. It should be understood that in the process of grouping and verifying injection molded products, calculating the image information entropy of the updated binocular image and determining whether it enters the target range is a key step. This process not only helps to dynamically adjust the camera parameters to adapt to different lighting conditions, but also significantly improves the reliability and stability of the entire system.

[0041] Figure 5 The figure illustrates a schematic flowchart of S16 in the injection molded product grouping verification method according to an embodiment of the present application. As Figure 5As shown, in one embodiment, S16: calculating the image information entropy of the updated binocular image and determining whether the image information entropy of the updated binocular image enters a target range includes: S161: calculating the image information entropy of the updated left-view image in the updated binocular image; S162: calculating the image information entropy of the updated right-view image in the updated binocular image; S163: respectively determining whether the image information entropy of the updated right-view image and the image information entropy of the updated left-view image enter the target range; S164: determining whether the mean value of the image information entropy of the updated right-view image and the image information entropy of the updated left-view image enters the target range; S165: if the judgment result is that the image information entropy of the updated right-view image and the image information entropy of the updated left-view image enter the target range and the mean value of the image information entropy of the updated right-view image and the image information entropy of the updated left-view image enters the target range, determining that the image information entropy of the updated binocular image enters the target range.

[0042] In one embodiment, for each updated binocular image, the system divides it into multiple sub-regions and calculates the gray-level histogram of each sub-region. Then, the image information entropy of each sub-region is calculated using the gray-level histogram. The specific formula is as follows: , where represents the gray value and

[0043] is the probability of occurrence. By accumulating the information entropy of each sub-region, the information entropy of the entire image can be obtained. In this process, first, the image information entropy of the updated left-view image in the updated binocular image is calculated. For example, the information entropy of the left-view image is 7.2. Then, the image information entropy of the updated right-view image in the updated binocular image is calculated. For example, the information entropy of the right-view image is 7.5. Next, it is respectively determined whether the information entropy of the updated right-view image and the updated left-view image enters the target range. Suppose the target range is set as [7.0, 8.0]. If the information entropy of a certain view image is not within this range, it indicates that the brightness distribution of the image is uneven or there is overexposure or underexposure. At this time, the system needs to adjust the camera parameters again and repeat the above process until the information entropy of all view images enters the target range. In addition, the system also calculates the mean value of the information entropy of the left and right view images and determines whether it also enters the target range.

[0044] That is, for the probability of occurrence of the represented grayscale value , since the probability of occurrence of some grayscale values is too low and that of some grayscale values is too high, which will lead to the amplification of probability distribution noise. Therefore, the method of restricting the probability contrast enhancement can be expressed as: ; where can be a restricted correction factor proportional to the distribution variance of , and is the restricted boundary threshold.

[0045] In this way, after setting the limit value of the contrast gain of the probability distribution, based on the mutual information registration equilibrium of the image information entropy of the updated right-view image and the image information entropy of the updated left-view image, the offset of the image information entropy in the opposite direction is aligned.

[0046] For example, when the image information entropy of the updated right-view image and the image information entropy of the updated left-view image are as follows: ; there is ; where is the registration factor for fine-tuning the image information entropy.

[0047] In this way, the influence of the local complexity difference of the binocular images on the adjustment deviation of the exposure parameters can be avoided through the compensation of the reverse consistency offset of the information entropy.

[0048] In S17, if the image information entropy of the updated binocular images enters the target range, stop adjusting the exposure parameters of the binocular camera; if the image information entropy of the updated binocular images does not enter the target range, loop through steps S11 to S16. In a specific embodiment, assume that after calculation, the information entropy of the left-view image is 7.2, the information entropy of the right-view image is 7.5, and the average of the information entropies of the left and right-view images is 7.35. If the target range is set to [7.0, 8.0], then these three values are all within the target range. At this time, the system can confirm that the image quality meets the expectations, so it stops further adjusting the exposure parameters of the binocular camera and directly enters the subsequent defect detection and classification process. However, if the information entropy of a certain view image is not within this range, for example, the information entropy of the left-view image is 6.8, which is lower than the lower limit 7.0 of the target range, it indicates that the image may be underexposed. At this time, the system does not stop adjusting, but continues to loop through steps S11 to S16, that is, recalculates the current error and generates a new shutter adjustment strategy and gain adjustment strategy through the PID controller. For example, the system may further increase the shutter speed or gain, then collect the updated binocular images again and recalculate their information entropy.

[0049] In summary, the injection molding finished product grouping and inspection method provided by this application uses a binocular camera to collect images in real time, and dynamically adjusts the exposure parameters (shutter speed and gain) through a PID controller to ensure that the image information entropy is within the target range and improve the image quality. Based on the optimized high-quality images, the coordinates of the grasping points can be accurately identified and mapped to the three-dimensional space. The mechanical gripper then grabs the injection molding finished products and moves them to the defect detection position for appearance inspection and defect identification, ultimately achieving efficient and accurate automatic grouping and inspection.

[0050] This application also provides an injection molding finished product grouping and inspection system. As Figure 6 shown, the injection molding finished product grouping and inspection system 600 includes a memory 601, a processor 602, and a computer program 603 stored in the memory and executable on the processor. It is characterized in that when the processor 602 executes the computer program 603, the steps of the injection molding finished product grouping and inspection method described above are implemented.

[0051] The basic principles of this application have been described above in conjunction with specific embodiments. However, it should be noted that the advantages, benefits, effects, etc. mentioned in this application are only examples and not limitations. It cannot be considered that these advantages, benefits, effects, etc. are essential for each embodiment of this application. Additionally, the specific details disclosed above are only for illustrative and easy-to-understand purposes and are not limitations. These details do not limit this application to necessarily implementing with the above specific details.

[0052] The block diagrams of the devices, apparatuses, equipment, and systems involved in this application are only illustrative examples and do not intend to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any way. Words such as "including", "comprising", "having", etc. are open-ended terms, meaning "including but not limited to", and can be used interchangeably with each other. The word "or" and "and" used here refer to the word "and / or" and can be used interchangeably with each other, unless the context clearly indicates otherwise. The word "such as" used here refers to the phrase "such as but not limited to" and can be used interchangeably with each other.

[0053] It also needs to be pointed out that in the devices, equipment, and methods of this application, each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent solutions of this application.

[0054] The foregoing description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present application. Thus, the present application is not intended to be limited to the aspects shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0055] The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of the present application to the form disclosed herein. Although several example aspects and embodiments have been discussed above, those skilled in the art will recognize some of their variations, modifications, alterations, additions, and subcombinations.

Claims

1. A method for grouping and testing injection molded products, comprising: S1: using a binocular camera to collect a binocular image of the injection-molded product to be inspected; S2: identifying the two-dimensional coordinates of a preset grabbing position, and mapping the two-dimensional coordinates to a three-dimensional space to determine the spatial position of the grabbing point; S3: grabbing the injection-molded product to be inspected according to the spatial position, and moving it to a defect detection position; S4: at the defect detection position, collecting an appearance image of the injection-molded product to be inspected; S5: performing defect recognition on the injection-molded product to be inspected according to the appearance image, and placing the injection-molded products to be inspected in groups according to the recognition results, characterized in that S1: using a binocular camera to collect a binocular image of the injection-molded product to be inspected, comprises the steps of: S11: using the binocular camera to collect an initial binocular image of the injection molded product to be inspected; S12: extracting brightness statistical characteristic values ​​of the initial binocular image; S13: Calculate the difference between the brightness statistical characteristic value and the brightness target value as the current error; S14: inputting the current error into a camera exposure parameter adjuster based on a PID controller to obtain a shutter adjustment strategy and a gain adjustment strategy; S15: Based on the shutter adjustment strategy and the gain adjustment strategy, adjusting the shutter speed and gain of the binocular camera, and using the binocular camera after parameter adjustment to collect an updated binocular image of the injection molded product to be inspected; S16: Calculate the image information entropy of the updated binocular image, and determine whether the image information entropy of the updated binocular image enters a target range; S17: If the image information entropy of the updated binocular image enters the target range, stop adjusting the exposure parameters of the binocular camera; if the image information entropy of the updated binocular image does not enter the target range, loop through steps S11 to S16; Wherein, the step S16: calculating the image information entropy of the updated binocular image, and determining whether the image information entropy of the updated binocular image enters a target range, includes: If the image information entropy of the updated right view image and the image information entropy of the updated left view image shift in opposite directions, a registration factor for fine-tuning the image information entropy is introduced; Based on the image information entropy of the updated left-view image and the registration factor of the image information entropy fine-tuning, the image information entropy of the updated right-view image is registered and balanced to obtain an updated image information entropy of the updated right-view image; Based on the image information entropy of the updated right-view image and the registration factor of the image information entropy fine-tuning, the image information entropy of the updated left-view image is registered and balanced to obtain the updated image information entropy of the updated left-view image.

2. The method for grouping and checking injection molded products according to claim 1, characterized in that: The step S12: extracting brightness statistical characteristic values ​​of the initial binocular image comprises: Extracting brightness statistical characteristic values ​​of an initial left-view image in the initial binocular image; Extracting brightness statistical characteristic values ​​of an initial right-viewing angle image in the initial binocular image; Based on the brightness statistical characteristic value of the initial left-view image and the brightness statistical characteristic value of the initial right-view image, the brightness statistical characteristic value of the initial binocular image is determined.

3. The method for grouping and checking injection molded products according to claim 2, characterized in that: Extracting a brightness statistical characteristic value of an initial left-view image in the initial binocular image, comprising: calculating an average brightness value of the initial left-view image as the brightness statistical characteristic value; Extracting a brightness statistical characteristic value of an initial right-view image in the initial binocular image includes: calculating an average brightness value of the initial right-view image as the brightness statistical characteristic value.

4. The method for grouping and checking injection molded products according to claim 3, characterized in that: Determining the brightness statistical characteristic value of the initial binocular image based on the brightness statistical characteristic value of the initial left-view image and the brightness statistical characteristic value of the initial right-view image includes: A weighted sum of the brightness statistical feature value of the initial left-view image and the brightness statistical feature value of the initial right-view image is calculated based on a preset weight as the brightness statistical feature value of the initial binocular image.

5. The method for grouping and checking injection molded products according to claim 4, characterized in that: The step S14: inputting the current error into a camera exposure parameter adjuster based on a PID controller to obtain a shutter adjustment strategy and a gain adjustment strategy, including: Calculate proportional adjustment items, integral adjustment items, and differential adjustment items; Calculating a sum of the proportional adjustment term, the integral adjustment term and the differential adjustment term as a PID adjustment output value; Converting the PID adjustment output value into a shutter increment; The sum of the current shutter speed and the shutter increment is calculated to obtain an updated shutter speed in the shutter adjustment strategy.

6. The method for grouping and checking injection molded products according to claim 5, characterized in that: The step S14: inputting the current error into a camera exposure parameter adjuster based on a PID controller to obtain a shutter adjustment strategy and a gain adjustment strategy, further comprising: If the updated shutter speed in the shutter adjustment strategy exceeds the shutter upper limit speed, converting the PID adjustment output value into a gain increase; The sum of the gain increase and the current gain is calculated to obtain an updated gain in the gain adjustment strategy.

7. The method for grouping and checking injection molded products according to claim 6, characterized in that: The step S16: calculating the image information entropy of the updated binocular image, and determining whether the image information entropy of the updated binocular image enters a target range, comprises: Calculating the image information entropy of the updated left-view image in the updated binocular image; Calculate the image information entropy of the updated right viewing image in the updated binocular image; respectively determining whether the image information entropy of the updated right-view image and the image information entropy of the updated left-view image enter a target range; Determine whether the mean of the image information entropy of the updated right-view image and the image information entropy of the updated left-view image enters a target range; If the judgment result is that the image information entropy of the updated right-view image and the image information entropy of the updated left-view image enter the target range and the image information entropy mean of the image information entropy of the updated right-view image and the image information entropy of the updated left-view image enters the target range, it is determined that the image information entropy of the updated binocular image enters the target range.

8. A system for grouping and checking injection molded finished products, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method for grouping and inspecting injection molded products as described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Automatic sorting equipment and method for injection molded parts

    CN112150439A