Grouping verification method and system for injection molding finished products

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 inaccurate coordinates of the grab point under complex lighting conditions is solved, and efficient and accurate automatic grouping verification is achieved.

CN119666877AActive Publication Date: 2025-03-21ZHEJIANG HENGDAO TECH
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510188495.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-20
Publication Date
2025-03-21
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

Improve image quality, accurately identify and map point coordinates and map them to three-dimensional space, achieving efficient and accurate automatic grouping verification, and reducing labor costs and defective rates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119666877A_ABST
    Figure CN119666877A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of injection molding finished product detection, and discloses an injection molding finished product grouping verification method and system, which utilize a binocular camera to collect images in real time, and dynamically adjust exposure parameters (shutter speed and gain) through a PID controller to ensure that the image information entropy is in a target range, thereby improving the image quality. On the basis of the optimized high-quality image, the coordinates of the grabbing points can be accurately recognized and mapped to a three-dimensional space, a mechanical gripper grabs the injection molding finished products according to the coordinates and moves to a defect detection position for appearance detection and defect recognition, and finally efficient and accurate automatic grouping verification is achieved. Meanwhile, the camera exposure parameters are dynamically adjusted through the brightness statistical characteristic value and the PID controller, and the consistency of image quality is ensured. In this way, efficient and accurate automatic grouping verification can be achieved even under the complex illumination condition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of injection molded finished product detection, and more specifically, to a method and system for grouping and detecting injection molded finished products. Background Art

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

[0003] For example, under complex lighting conditions, the image quality collected by the binocular camera in the prior art may be affected. Due to the variety of surface materials of injection molded parts, reflection is common, which will lead to a decrease in image matching accuracy, thereby affecting the accuracy of the grasping point coordinates. If the grasping position is offset, the mechanical gripper may damage the injection molded product during the grasping process, thereby increasing the defective rate.

[0004] Therefore, an optimized grouping inspection scheme for finished injection molded products is desired. Summary of the invention

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

[0006] According to one aspect of the present application, a method for grouping and inspecting injection molded products is provided, 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: based on the appearance image, performing defect identification on the injection molded product to be inspected, and placing the injection molded products to be inspected in groups according to the identification 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 the initial binocular image The method comprises the following steps: 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; step S15: adjusting the shutter speed and gain of the binocular camera based on the shutter adjustment strategy and the gain adjustment strategy, and collecting an updated binocular image of the injection molded product to be inspected by using the binocular camera after parameter adjustment; 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; step S17: if the image information entropy of the updated binocular image enters a target range, stopping adjusting the exposure parameters of the binocular camera; and if the image information entropy of the updated binocular image does not enter the target range, executing steps S11 to S16 in a loop.

[0007] In the above-mentioned method for grouping and inspecting injection molded products, the S12: extracting the brightness statistical characteristic value of the initial binocular image, includes: extracting the brightness statistical characteristic value of the initial left-view image in the initial binocular image; extracting the brightness statistical characteristic value of the initial right-view image in the initial binocular image; and 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.

[0008] In the above-mentioned method for grouping and inspecting injection molded products, the brightness statistical characteristic value of the initial left-view image in the initial binocular image is extracted, including: calculating the average brightness value of the initial left-view image as the brightness statistical characteristic value; the brightness statistical characteristic value of the initial right-view image in the initial binocular image is extracted, including: calculating the average brightness value of the initial right-view image as the brightness statistical characteristic value.

[0009] In the above-mentioned method for grouping and inspecting injection molded products, the brightness statistical characteristic value of the initial binocular image is determined 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, including: calculating the weighted sum of the brightness statistical characteristic value of the initial left-view image and the brightness statistical characteristic value of the initial right-view image based on preset weights as the brightness statistical characteristic value of the initial binocular image.

[0010] In the above-mentioned method for grouping and calibrating injection molded finished products, the S14: inputs 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: calculating a proportional adjustment item, an integral adjustment item, and a differential adjustment item; calculating the sum of the proportional adjustment item, the integral adjustment item, and the differential adjustment item as a PID adjustment output value; converting the PID adjustment output value into a shutter increment; calculating the sum of the current shutter speed and the shutter increment to obtain an updated shutter speed in the shutter adjustment strategy.

[0011] In the above-mentioned method for grouping and inspecting injection molded finished products, the 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, also 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; calculating the sum of the gain increase and the current gain to obtain an updated gain in the gain adjustment strategy.

[0012] In the above-mentioned method for grouping and verifying injection molded finished products, the S16: calculating the image information entropy of the updated binocular image, and judging whether the image information entropy of the updated binocular image enters the target range, includes: calculating the image information entropy of the updated left-perspective image in the updated binocular image; calculating the image information entropy of the updated right-perspective image in the updated binocular image; judging respectively whether the image information entropy of the updated right-perspective image and the image information entropy of the updated left-perspective image enter the target range; judging whether the image information entropy mean of the image information entropy of the updated right-perspective image and the image information entropy of the updated left-perspective image enters the target range; if the judgment result is that the image information entropy of the updated right-perspective image and the image information entropy of the updated left-perspective image enter the target range and the image information entropy mean of the image information entropy of the updated right-perspective image and the image information entropy of the updated left-perspective image enters the target range, it is determined that the image information entropy of the updated binocular image enters the target range.

[0013] According to another aspect of the present application, a system for grouping and inspecting injection molded products is also provided, the system comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the aforementioned method for grouping and inspecting injection molded products when executing the computer program.

[0014] Compared with the prior art, the method and system for grouping and verifying injection molded products provided in this 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 image, the coordinates of the grasping points can be accurately identified and mapped to three-dimensional space. The mechanical gripper grabs the injection molded product based on this and moves it to the defect detection position for appearance inspection and defect identification, ultimately achieving efficient and accurate automatic grouping verification. At the same time, the camera exposure parameters are dynamically adjusted using the brightness statistical eigenvalue and the PID controller to ensure the consistency of image quality. In this way, efficient and accurate automatic grouping verification can be achieved even under complex lighting conditions. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] By describing the embodiments of the present application in more detail in conjunction with the accompanying drawings, the above and other purposes, features and advantages of the present application will become more apparent. The accompanying 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 of the present application. In the accompanying drawings, the same reference numerals generally represent the same components or steps.

[0016] Figure 1 The figure illustrates a schematic flow chart of a method for grouping and verifying injection molded products according to an embodiment of the present application.

[0017] Figure 2 The figure illustrates a schematic flow chart of S1 in the method for grouping and verifying injection molded products according to an embodiment of the present application.

[0018] Figure 3 The figure illustrates a schematic flow chart of S12 in the method for grouping and verifying injection molded finished products according to an embodiment of the present application.

[0019] Figure 4 The figure illustrates a schematic flow chart of S14 in the method for grouping and verifying injection molded products according to an embodiment of the present application.

[0020] Figure 5 The figure illustrates a schematic flow chart of S16 in the method for grouping and verifying injection molded finished products according to an embodiment of the present application.

[0021] Figure 6 The figure shows a schematic structural diagram of a system for grouping and verifying injection molded products according to an embodiment of the present application. DETAILED DESCRIPTION

[0022] Below, the exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described here.

[0023] Figure 1 FIG. 1 is a schematic flow chart of a method for grouping and testing injection molded products according to an embodiment of the present application. Figure 1 As shown, the present application provides a method for grouping and inspecting 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 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 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: based on the appearance image, performing defect identification on the injection molded product to be inspected, and placing the injection molded products to be inspected in groups according to the identification results.

[0024] First, the binocular image of the injection molded product to be inspected is collected using a binocular camera, which is the first step of the entire process. The binocular camera consists of two independent imaging cameras on the left and right sides, which can respectively capture the left and right perspective images of the injection molded part to obtain a stereoscopic visual effect. These binocular images not only provide rich visual information, but also lay the foundation for subsequent three-dimensional space mapping. Next, after the binocular image is acquired, the two-dimensional coordinates of the preset grasping position are identified, and these two-dimensional coordinates are mapped to the three-dimensional space to determine the spatial position of the grasping point. It should be understood that the accurate grasping position can ensure that the mechanical gripper will not damage the injection molded part during operation. Specifically, the position of the key points is identified from the binocular image through the artificial intelligence image segmentation algorithm, and the image data of the left and right cameras are combined for stereo matching, and finally the coordinates of these key points in the actual three-dimensional space are restored. This process requires the pre-calibrated binocular camera parameters, that is, the mapping relationship between the coordinates in the binocular image and the coordinates in the three-dimensional space. Once the spatial position of the grasping point is determined, the mechanical gripper grasps the injection molded product to be inspected according to the position and moves it to the defect detection position. When the injection molded part is moved to the defect detection position, the image acquisition device will capture the appearance image of the injection molded part at this position. The goal of this step is to obtain a high-resolution appearance image for subsequent detailed defect identification. In order to ensure image quality, a high-resolution industrial camera may be used to shoot the injection molded part from multiple angles to fully cover its surface features. Subsequently, the defect recognition model trained for the injection molded part is used based on these appearance images. The defect recognition model is trained based on sample images with labeled defect categories and can effectively identify common defects such as burrs, scratches, fractures, cracks, black spots, blistering or discoloration. Finally, according to the results of defect recognition, the injection molded parts will be grouped and placed. For example, injection molded parts with specific types of defects will be grouped together for later processing; while injection molded parts without defects will be neatly stacked and ready to enter the packaging stage. The entire process not only realizes the automatic identification and classification of injection molded part defects, but also greatly improves sorting efficiency, reduces labor costs, and improves sorting accuracy.

[0025] In particular, in the above-mentioned method for grouping and verifying injection molded finished products, although efficient automatic sorting and defect detection have been achieved, there are still some shortcomings. For example, under complex lighting conditions or when the surface of the injection molded parts is reflective, the images captured by the binocular camera may have uneven brightness or reflections, which will affect the subsequent image matching accuracy and the accuracy of the grasping points, and may even cause damage to the injection molded parts during the grasping process. In addition, fixed exposure parameters cannot adapt to different lighting conditions, which can easily lead to unstable image quality, thereby affecting the reliability and accuracy of the entire system.

[0026] To address these issues, Figure 2FIG. 1 is a schematic flow chart of step S1 in the method for grouping and testing injection molded products according to an embodiment of the present application. Figure 2 As shown, using a binocular camera to collect a binocular image of an injection molded product to be inspected includes the following steps: S11: using the binocular camera to collect an initial binocular image of the injection molded product to be inspected; S12: extracting a brightness statistical characteristic value of the initial binocular image; S13: calculating the difference between the brightness statistical characteristic value and the brightness target value as a 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: adjusting the shutter speed and gain of the binocular camera based on the shutter adjustment strategy and the gain adjustment strategy, and using the binocular camera after parameter adjustment to collect an updated binocular image of the injection molded product to be inspected; 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; S17: if the image information entropy of the updated binocular image enters the target range, stopping adjusting the exposure parameters of the binocular camera; if the image information entropy of the updated binocular image does not enter the target range, looping through steps S11 to S16.

[0027] In the S11, the binocular camera is used to collect the initial binocular image of the injection molded product to be inspected. Specifically, in order to collect the initial binocular image, the binocular camera needs to be installed at an appropriate height and angle to cover all possible positions of the injection molded product. Usually, the binocular camera is fixed on a bracket and fine-tuned by a mechanical arm or a slide rail to adapt to injection molded parts of different sizes and shapes. This ensures that the binocular camera can accurately capture its complete appearance features no matter where the injection molded product is. Next, in order to ensure the quality of the image, the binocular camera must be calibrated. During the calibration process, a standard calibration plate (such as a checkerboard pattern) is used and placed on a conveyor belt for the binocular camera to shoot. By analyzing these calibration images, the geometric relationship between the left and right cameras and their respective internal reference matrices are calculated to establish an accurate stereo matching model. This model is the basis for subsequent three-dimensional 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 shoot. At this time, the left and right cameras simultaneously shoot different perspective images of the same injection molded product to form a pair of binocular images. Since the positions of the left and right cameras are slightly different, the positions of objects in each image will also be slightly offset. This parallax information is the key to achieving 3D reconstruction. The reason for this approach is that the binocular vision system can simulate the way humans observe the world with both eyes and perceive depth through parallax information. This method not only provides rich stereo information, but also effectively avoids occlusion problems that may occur with a single camera. In addition, the binocular camera system is relatively simple and low-cost, making it suitable for large-scale industrial applications. Compared with other 3D imaging technologies (such as laser scanning or structured light), binocular cameras do not require additional light source equipment, reducing the complexity and maintenance costs of the system.

[0028] In S12, the brightness statistical characteristic value of the initial binocular image is extracted. It should be understood that in an industrial environment, changes in the position, intensity or ambient light of the light source may cause uneven image brightness, thereby affecting the subsequent image processing results. By extracting the brightness statistical characteristic value, the overall brightness level of the image can be quantified, providing a basis for the subsequent adjustment of the camera exposure parameters to ensure the consistency of image quality. For example, in a highly reflective area or under complex lighting conditions, relying solely on the brightness value of a single perspective may lead to underexposure or overexposure problems. By extracting and balancing the brightness statistical characteristic values ​​of the left and right perspective images, the impact of reflections can be effectively reduced to ensure that the image information is complete and accurate. In addition, extracting the brightness statistical characteristic value can also improve the accuracy of stereo matching. The binocular vision system relies on the parallax information between the left and right perspective images to reconstruct the position of objects in three-dimensional space. If the brightness difference between the left and right perspective images is large, the stereo matching algorithm may fail or generate large errors. By extracting the brightness statistical characteristic values ​​and dynamically adjusting the camera parameters according to these values, the brightness 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 FIG. 1 is a schematic flow chart of step S12 in the method for grouping and verifying injection molded finished products according to an embodiment of the present application. Figure 3 As shown, in one embodiment, the step S12: extracting the brightness statistical characteristic value of the initial binocular image includes: S121: extracting the brightness statistical characteristic value of the initial left-view image in the initial binocular image; S122: extracting the brightness statistical characteristic value of the initial right-view image in the initial binocular image; S123: 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.

[0030] In one embodiment, extracting the brightness statistical characteristic value of the initial left-view image in the initial binocular image includes: calculating the average brightness value of the initial left-view image as the brightness statistical characteristic value. Specifically, in order to extract the brightness statistical characteristic value, it is necessary to perform grayscale conversion on the image, convert the color image into a grayscale image, and simplify subsequent calculations. Each pixel value in the grayscale image represents the brightness of the pixel, and the range is usually between 0 and 255. For the left-view image, each pixel point is scanned line by line, its grayscale value is calculated and added up, and finally divided by the total number of pixels to obtain the average brightness value of the image. Similarly, extracting the brightness statistical characteristic value of the initial right-view image in the initial binocular image includes: calculating the average brightness value of the initial right-view image as the brightness statistical characteristic value. These two average brightness values ​​represent the brightness levels of the left and right view images, respectively. They not only reflect the overall brightness of the image, but also provide important references for subsequent exposure parameter adjustments.

[0031] In one embodiment, 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, determining the brightness statistical characteristic value of the initial binocular image includes: calculating the weighted sum of the brightness statistical characteristic value of the initial left-view image and the brightness statistical characteristic value of the initial right-view image based on a preset weight as the brightness statistical characteristic value of the initial binocular image. It should be understood that in order to integrate the brightness information of the left and right view images, a weighted average method is usually used to calculate the overall brightness statistical characteristic value. According to the preset weight ratio, the overall brightness statistical characteristic value is calculated. In a specific embodiment, the average brightness value of the left view image is 120, the average brightness 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 brightness statistical characteristic 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 presence of slightly asymmetric illumination, so that the final brightness statistical characteristic value is more representative.

[0032] In the S13, the difference between the brightness statistical characteristic value and the brightness target value is calculated as the current error. It should be understood that changes in lighting conditions may cause uneven image brightness, thereby affecting subsequent image processing results. By calculating the difference between the brightness statistical characteristic value and the brightness target value, we can quantify this deviation and adjust the camera's exposure parameters accordingly to achieve optimal image quality. For example, in highly reflective areas or complex lighting conditions, relying only on the brightness value of a single viewing angle may cause underexposure or overexposure problems. By calculating the current error, the camera's shutter speed and gain 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 product enters the field of view of the binocular camera, the system triggers the camera to shoot and obtain the initial binocular image. Then, the system automatically calculates the average brightness value of the left-view image and the right-view image, and calculates the overall brightness statistical characteristic value according to the preset weight ratio. For example, the calculated overall brightness statistical characteristic value is 124, and the preset brightness target value is 120, then the current error is 4. This error value tells that the overall brightness of the current image is low, and the exposure needs to be increased to increase the brightness.

[0034] In the S14, the current error is input into the camera exposure parameter adjuster based on the PID controller to obtain the shutter adjustment strategy and the gain adjustment strategy. It should be understood that the PID (proportional-integral-differential) controller is a common feedback control system that adjusts the control variable through the three links of proportion, integration and differentiation to make it as close to the set target value as possible. In the present 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 characteristic value of the image is as close as possible to the preset brightness target value.

[0035] Figure 4 FIG. 1 is a schematic flow chart of step S14 in the method for grouping and verifying injection molded finished products according to an embodiment of the present application. Figure 4 As shown, in one embodiment, the 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 item, an integral adjustment item, and a differential adjustment item; S142: calculating the sum of the proportional adjustment item, the integral adjustment item, and the differential adjustment item as a PID adjustment output value; S143: converting the PID adjustment output value into a shutter increment; S144: calculating the sum of the current shutter speed and the shutter increment to obtain an 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; S146: calculating the sum of the gain increase and the current gain to obtain an updated gain in the gain adjustment strategy.

[0036] In a specific embodiment, the brightness statistical characteristic value of the initial binocular image has been extracted through the previous steps, and the overall brightness statistical characteristic value is calculated to be 124, while the preset brightness 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 the PID controller. In specific implementation, it is first necessary to calculate the proportional adjustment term, the integral adjustment term, and the differential adjustment term. These three adjustment terms reflect the impact of the current error, the cumulative error, and the error change rate on the system respectively. The proportional adjustment term is directly proportional to the current error, and the formula is ,in is the proportionality coefficient, is the current error, is the proportional adjustment term. The integral adjustment term accumulates all past errors to avoid long-term deviations. The formula is ,in is the integration coefficient, is the integral adjustment term. The differential adjustment term reflects the rate of change of the error and suppresses rapid changes. The formula is ,in is the differential coefficient, is the differential adjustment term.

[0037] In this embodiment, the current error is 4, and the proportionality factor , integral coefficient , differential coefficient , and the previous error was 3. We can calculate the proportional adjustment term , integral adjustment item , differential adjustment term , add these adjustment items to get the PID adjustment output value: Next, the PID adjustment output value is converted 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 practical purposes, this is usually converted to a reasonable step size, such as increasing or decreasing by 1 / 1000 of a second per step. In this case, the shutter increment can be expressed as 29 units. Update the shutter speed according to the shutter increment: . If the current shutter speed is 0.01 seconds, the new shutter speed is 0.01 plus 0.0029, which is 0.0129 seconds.

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

[0039] In the 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 inspected is collected by using the binocular camera after parameter adjustment. It should be understood that through the aforementioned 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, on 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 shoot and obtain an updated binocular image. At this time, since the shutter speed and gain have been optimized and adjusted, the newly collected image will have 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 verification of injection molded finished products, in order to ensure the consistency of image quality and subsequent processing effects, 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 camera parameters to adapt to different lighting conditions, but also significantly improves the reliability and stability of the entire system.

[0041] Figure 5 FIG. 1 is a schematic flow chart of S16 in the method for grouping and verifying injection molded finished products according to an embodiment of the present application. Figure 5As shown, in one embodiment, the S16: calculating the image information entropy of the updated binocular image, and judging whether the image information entropy of the updated binocular image enters the 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: judging 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 respectively; S164: judging whether 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; 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 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.

[0042] In one embodiment, for each updated binocular image, the system divides it into multiple sub-regions and calculates the grayscale histogram of each sub-region. Then, the image information entropy of each sub-region is calculated using the grayscale histogram. The specific formula is as follows: ,in, Represents grayscale value 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, the image information entropy of the updated left-view image in the updated binocular image is first calculated. For example, the information entropy of the left-view image is 7.2. Next, 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 determined whether the information entropy of the updated right-view image and the updated left-view image has entered the target range. Assuming that the target range is set to [7.0, 8.0], if the information entropy of a certain view image is not within this range, it means that the brightness distribution of the image is uneven or there is overexposure or underexposure. At this point, 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 of the information entropy of the left and right view images and determines whether it has also entered the target range.

[0043] In particular, considering that if the image information entropy of the right-view image and the image information entropy of the left-view image are offset in opposite directions, then there may be deviations in the method of directly calculating the mean of the information entropy of the left and right-view images and judging whether it enters the target range. When using the grayscale histogram to calculate the image information entropy of each sub-area, an adaptive histogram equalization mechanism based on restricted probability contrast enhancement can be further introduced.

[0044] That is, for grayscale values Probability of occurrence , because the probability of some gray values ​​appearing is too low and the probability of some gray values ​​appearing is too high, which will lead to the amplification of the probability distribution noise, so the method of limiting the probability contrast is adopted, which can be expressed as: ;in, Can be with The limit correction factor is proportional to the variance of the distribution, is the limit boundary threshold.

[0045] In this way, after setting the limit value of the contrast gain of the probability distribution, the offsets of the image information entropy in opposite directions are aligned based on the mutual information registration equalization of updating the image information entropy of the right view image and updating the image information entropy of the left view image.

[0046] For example, update the image information entropy of the right view image And update the image information entropy of the left view image In the case of: ;have ;in is the registration factor used for image information entropy fine-tuning.

[0047] In this way, the adjustment deviation of the exposure parameters caused by the local complexity difference of the binocular image can be avoided by compensating the consistency shift in the opposite direction of the information entropy.

[0048] In S17, if the image information entropy of the updated binocular image enters the target range, the exposure parameters of the binocular camera are stopped from being adjusted; if the image information entropy of the updated binocular image does not enter the target range, steps S11 to S16 are executed cyclically. In a specific embodiment, it is assumed 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 entropy of the left and right view images is 7.35. If the target range is set to [7.0, 8.0], the sum of these three values ​​is within the target range. At this point, the system can confirm that the image quality meets 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 of the target range of 7.0, indicating that the image may be underexposed. At this point, the system will not stop adjusting, but will continue to execute steps S11 to S16 cyclically, that is, recalculate the current error, and generate 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 acquire an updated stereo image again and recalculate its information entropy.

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

[0050] The present application also provides a system for grouping and checking injection molded products, such as Figure 6 As shown, the injection molded 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, wherein the processor 602 implements the steps of the injection molded product grouping and inspection method as described above when executing the computer program 603.

[0051] The basic principles of the present application are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present application are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present application. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, not for limitation, and the above details do not limit the present application to being implemented by adopting the above specific details.

[0052] The block diagrams of the devices, apparatuses, equipment, and systems involved in this application are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.

[0053] It should also be noted that in the apparatus, device and method of the present application, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present application.

[0054] The above 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. Therefore, the present application is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0055] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present application to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

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 the defect detection position; S4: at the defect detection position, collecting the 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 following steps: S11: using the binocular camera to collect an initial binocular image of the injection-molded product to be inspected; S12: extracting the brightness statistical characteristic value of the initial binocular image; S13: calculating The difference between the brightness statistical characteristic value and the brightness target value is used as the current error; S14: the current error is input into the camera exposure parameter adjuster based on the 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, the shutter speed and gain of the binocular camera are adjusted, and the updated binocular image of the injection molded product to be inspected is collected by using the binocular camera after parameter adjustment; 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; S17: if the image information entropy of the updated binocular image enters the target range, the exposure parameters of the binocular camera are stopped from being adjusted; if the image information entropy of the updated binocular image does not enter the target range, steps S11 to S16 are executed in a loop.

2. The method for grouping and checking injection molded products according to claim 1, characterized in that: The S12: extracting the brightness statistical characteristic value of the initial binocular image, comprising: extracting the brightness statistical characteristic value of the initial left-view image in the initial binocular image; extracting the brightness statistical characteristic value of the initial right-view image in the initial binocular image; and 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.

3. The method for grouping and checking injection molded products according to claim 2, characterized in that: Extracting the brightness statistical characteristic value of the initial left-view image in the initial binocular image includes: calculating the average brightness value of the initial left-view image as the brightness statistical characteristic value; extracting the brightness statistical characteristic value of the initial right-view image in the initial binocular image includes: calculating the 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: 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 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 based on preset weights 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 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: calculating a proportional adjustment item, an integral adjustment item, and a differential adjustment item; calculating the sum of the proportional adjustment item, the integral adjustment item, and the differential adjustment item as a PID adjustment output value; converting the PID adjustment output value into a shutter increment; calculating the sum of a current shutter speed and the shutter increment 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 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; calculating the sum of the gain increase and the current gain 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 S16: calculating the image information entropy of the updated binocular image, and judging whether the image information entropy of the updated binocular image enters the 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; judging 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 respectively; judging whether 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; 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. The method for grouping and checking injection molded products according to claim 7, characterized in that: The S16: calculating the image information entropy of the updated binocular image, and judging whether the image information entropy of the updated binocular image enters the target range, further includes: if the image information entropy of the updated right-view image and the image information entropy of the updated left-view image are offset in opposite directions, introducing a registration factor for fine-tuning the image information entropy; based on the image information entropy of the updated left-view image and the registration factor for fine-tuning the image information entropy, performing registration and equalization on the image information entropy of the updated right-view image to obtain the updated image information entropy of the updated right-view image; and based on the image information entropy of the updated right-view image and the registration factor for fine-tuning the image information entropy, performing registration and equalization on the image information entropy of the updated left-view image to obtain the updated image information entropy of the updated left-view image.

9. A system for grouping and checking finished injection molded 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 8 are implemented.

Citation Information

Patent Citations

  • Stereo image quality evaluation method based on adaptive fused image

    CN108769671A

  • Image brightness determination method and device, and equipment

    CN111479070A

  • Automatic sorting equipment and method for injection molded parts

    CN112150439A

  • Infrared image exposure method and device, equipment and storage medium

    CN112887636A

  • Automatic exposure adjusting method for binocular camera of fire-fighting robot

    CN113382143A