A resin impurity detection and sorting method and system based on machine vision

CN122605749APending Publication Date: 2026-08-21HAINAN JIANBANG PHARM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611092745.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-22
Publication Date
2026-08-21

AI Technical Summary

Technical Problem

[0004]然而,当树脂颗粒连续经过多个检测工位时,由于输送速度波动、颗粒位置变化以及多个颗粒连续输送等因素,不同检测工位获取的图像容易发生对应关系混淆,导致同一树脂颗粒不同表面的检测结果难以准确关联,影响后续融合判定及自动分拣的准确性

Benefits of technology

[0058]1.本发明根据树脂颗粒的输送状态建立跨检测工位的运动预测关系,并以预测范围约束关联匹配过程,实现不同检测工位获取的树脂颗粒图像准确对应,有效降低连续输送过程中因颗粒位置变化导致的误匹配。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122605749A_ABST
    Figure CN122605749A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of machine vision detection, in particular to a resin impurity detection and sorting method and system based on machine vision. The present application obtains images of the first surface and the second surface of resin particles and performs impurity detection and feature extraction; a motion prediction relationship across detection stations is established according to the conveying state of the resin particles to determine a prediction range; the prediction range is used as a constraint to complete correlation matching, and the motion prediction relationship is corrected and updated according to the correlation matching result; the impurity detection results of the first surface and the second surface are fused to generate sorting control information and complete automatic sorting. The present application improves the accuracy of correlation matching of resin particles between different detection stations, and improves the reliability of impurity detection and automatic sorting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine vision inspection technology, specifically to a method and system for detecting and sorting resin impurities based on machine vision. Background Technology

[0002] With the widespread application of resin materials in electronics, automotive, and packaging industries, the purity of resin particles directly affects the processing quality of subsequent products. Therefore, machine vision technology is commonly used in the production process to perform online impurity detection on resin particles and automatically sort them based on the detection results. Machine vision inspection technology identifies target defects by acquiring target images and combining them with image processing algorithms. It has advantages such as fast detection speed and high degree of automation, and has become an important technical means for resin particle quality inspection.

[0003] Existing resin particle impurity detection equipment typically acquires images of resin particles through one or more detection stations, performs impurity detection on the images, and controls the actuator to complete automatic sorting based on the detection results. To improve detection integrity, some detection equipment uses multiple detection stations to acquire images of different surfaces of the resin particles.

[0004] However, when resin particles continuously pass through multiple inspection stations, factors such as fluctuations in conveying speed, changes in particle position, and continuous conveying of multiple particles can easily lead to confusion in the correspondence between images acquired at different inspection stations. This makes it difficult to accurately correlate the inspection results of different surfaces of the same resin particle, affecting the accuracy of subsequent fusion judgment and automatic sorting. Furthermore, existing technologies lack a mechanism for continuously correcting and updating particle motion relationships based on correlation matching results. When the conveying state changes, it is difficult to promptly correct the predicted range of subsequent resin particles, thus affecting the stability and accuracy of correlation matching between different inspection stations. Summary of the Invention

[0005] This invention provides a method and system for resin impurity detection and sorting based on machine vision, which realizes accurate correlation of detection results of different surfaces of resin particles and improves the accuracy of resin particle impurity detection and automatic sorting.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] This invention provides a machine vision-based method for detecting and sorting resin impurities, comprising:

[0008] S100: Acquire an image of the first surface of the resin particles, perform impurity detection on the image of the first surface, and extract the feature information of the corresponding resin particles;

[0009] S200: Establish a motion prediction relationship across detection stations based on the conveying state of the resin particles, and determine the predicted range of the resin particles moving from the first detection station to the second detection station.

[0010] S300: Acquire an image of the second surface of the resin particles, perform impurity detection on the image of the second surface, and extract the feature information of the corresponding resin particles;

[0011] S400: Using the prediction range as a constraint, the resin particles obtained by the first detection station and the second detection station are associated and matched within the prediction range to establish the correspondence between different surface images of the same resin particle.

[0012] S500: Based on the deviation between the correlation matching result and the prediction range, the motion prediction relationship is corrected and updated, and the prediction range of subsequent resin particles is re-determined based on the corrected and updated motion prediction relationship.

[0013] S600: Based on the impurity detection results of the first surface and the impurity detection results of the second surface, a fusion determination is made to determine the detection results of the resin particles;

[0014] S700: Generate sorting control information for the corresponding resin particles based on the detection results, and complete the sorting when the resin particles move to the preset sorting position.

[0015] As a preferred embodiment of the present invention, in S100 and S300, acquiring the image of the first surface of the resin particles and acquiring the image of the second surface of the resin particles respectively include:

[0016] Acquire transmission images of the corresponding surface;

[0017] Acquire reflection images of the corresponding surfaces;

[0018] Impurity detection is performed on the transmitted image and the reflected image respectively. If impurities are detected in either image, it is determined that impurities exist on the corresponding surface.

[0019] As a preferred embodiment of the present invention, in S100, the extraction of the feature information of the corresponding resin particles specifically includes:

[0020] Extract the projected area of ​​the resin particles;

[0021] Extract the aspect ratio of the resin particles;

[0022] Extract the roundness of the resin particles;

[0023] The Hu moment of the resin particles was extracted.

[0024] As a preferred embodiment of the present invention, in S200, establishing the motion prediction relationship across detection stations specifically includes:

[0025] Obtain the conveying status of the conveying mechanism containing the resin particles;

[0026] A particle motion prediction model is established based on the motion trajectory of the resin particles after they leave the first detection station.

[0027] The predicted time range and predicted spatial range for the resin particles to reach the second detection station are determined based on the particle motion prediction model.

[0028] As a preferred embodiment of the present invention, in S400, the specific steps for associating and matching the resin particles obtained from the first and second detection stations include:

[0029] A set of candidate particles that satisfy the spatiotemporal constraints is established based on the predicted time range and the predicted spatial range.

[0030] The correlation confidence between the candidate particle and the resin particle at the first detection station is calculated based on the feature information;

[0031] Based on the aforementioned association credibility, an identity mapping relationship is established across detection stations, and the first surface image and the second surface image belonging to the same particle are associated with the same identity identifier.

[0032] As a preferred embodiment of the present invention, the method for calculating the correlation credibility is as follows:

[0033] The candidate particles are filtered in the first stage according to the preset projection area threshold and aspect ratio threshold.

[0034] The feature similarity of the remaining candidate particles after the first-level filtering is calculated based on roundness and Hu moment, and the feature similarity is used as the association confidence.

[0035] As a preferred embodiment of the present invention, in S500, the step of correcting and updating the motion prediction relationship based on the deviation between the association matching result and the prediction range specifically includes:

[0036] Obtain the actual movement trajectory of multiple successfully matched resin particles between the first detection station and the second detection station;

[0037] Based on the deviation between the actual motion trajectory and the motion prediction relationship, the particle motion prediction model is updated, and the prediction range of subsequent resin particles is re-determined based on the updated particle motion prediction model.

[0038] As a preferred embodiment of the present invention, in S600, the fusion determination based on the impurity detection results of the first surface and the impurity detection results of the second surface specifically includes:

[0039] Obtain the impurity detection results of the first surface;

[0040] Obtain the impurity detection results for the second surface;

[0041] If the image quality of the first surface or the second surface is lower than a preset threshold, the detection result of the corresponding surface is marked as uncertain, and the determination is made only based on the detection result of the image quality of the other surface that is not lower than the preset threshold.

[0042] If any of the surfaces involved in the determination test results for the presence of impurities, then the resin particles are identified as unqualified particles.

[0043] As a preferred embodiment of the present invention, in S700, the step of generating sorting control information for the corresponding resin particles based on the detection result specifically includes:

[0044] The position coordinates of the resin particles at the first or second detection station are obtained based on the association matching results.

[0045] If there is no associated matching result for the resin particles, the current position coordinates of the resin particles are calculated based on the position coordinates of the resin particles at the first detection station and the conveying status.

[0046] The predicted time when the resin particles will arrive at the preset sorting position is calculated based on the conveying status and the position coordinates.

[0047] Generate motion control instructions for the actuator based on the predicted time;

[0048] At the predicted time, the actuator is controlled to separate the defective particles from the qualified particles.

[0049] This invention also proposes a resin impurity detection and sorting system based on machine vision, comprising:

[0050] The first acquisition module is used to acquire an image of the first surface of the resin particles, perform impurity detection on the image of the first surface, and extract the feature information of the corresponding resin particles.

[0051] The motion prediction module is used to establish a motion prediction relationship across detection stations based on the conveying state of the resin particles, and to determine the predicted range of the resin particles moving from the first detection station to the second detection station.

[0052] The second acquisition module is used to acquire an image of the second surface of the resin particles, perform impurity detection on the image of the second surface, and extract the feature information of the corresponding resin particles.

[0053] The association matching module is used to perform association matching on the resin particles obtained by the first detection station and the second detection station within the prediction range, constrained by the prediction range, and to establish the correspondence between different surface images of the same resin particle.

[0054] The correction and update module is used to correct and update the motion prediction relationship based on the deviation between the association matching result and the prediction range, and to redetermine the prediction range of subsequent resin particles based on the corrected and updated motion prediction relationship.

[0055] The fusion determination module is used to determine the fusion result of the resin particles based on the impurity detection results of the first surface and the impurity detection results of the second surface.

[0056] The sorting control module is used to generate sorting control information for the corresponding resin particles based on the detection results. When the resin particles move to the preset sorting position, the actuator is triggered to separate the unqualified particles according to the sorting control information.

[0057] The beneficial effects of this invention are:

[0058] 1. This invention establishes a motion prediction relationship across detection stations based on the conveying state of resin particles, and constrains the association matching process with the prediction range, so as to achieve accurate correspondence of resin particle images obtained from different detection stations, and effectively reduce mismatches caused by changes in particle position during continuous conveying.

[0059] 2. This invention uses the correlation matching results to correct and update the motion prediction relationship, so that the prediction range can be dynamically adjusted according to the changes in the conveying state, thereby achieving continuous optimization of the prediction relationship, improving the stability and accuracy of subsequent resin particle correlation matching, and redetermining the prediction range of subsequent resin particles.

[0060] 3. This invention combines cross-detection station correlation matching, motion prediction relationship correction, and dual-surface detection results fusion, so that the sorting control of resin particles is based on the complete detection results of the same resin particles, thereby improving the reliability of resin particle impurity detection results and the accuracy of automatic sorting. Attached Figure Description

[0061] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0062] Figure 1This is a schematic flowchart of a resin impurity detection and sorting method based on machine vision according to the present invention.

[0063] Figure 2 This is a schematic diagram of the structure of a resin impurity detection and sorting system based on machine vision according to the present invention. Detailed Implementation

[0064] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0065] Example 1: As Figure 1 As shown, the present invention provides a resin impurity detection and sorting method based on machine vision, comprising:

[0066] S100: Acquire an image of the first surface of the resin particles, perform impurity detection on the image of the first surface, and extract the feature information of the corresponding resin particles;

[0067] Specifically, resin particles are conveyed to the first inspection station by a conveyor mechanism. In one embodiment, the conveyor mechanism is a conveyor belt. The first surface is the surface of the resin particle facing the image acquisition unit, and the second surface is the other surface of the resin particle opposite to the first surface. After the resin particles arrive at the first inspection station, transmission and reflection images of the first surface of the resin particles are acquired. The transmission image is acquired by placing a transmission light source below the conveyor mechanism, allowing light to pass through the conveyor mechanism and the resin particles, and then being captured by an industrial camera positioned above the conveyor mechanism. Impurities such as bubbles, black spots, and gel inside the resin particles form abnormal areas in the transmission image due to differences in light transmission characteristics compared to normal resin. The reflection image is acquired by placing a reflection light source above the conveyor mechanism to illuminate the first surface of the resin particles, and then being captured by an industrial camera. Impurities such as discoloration, scratches, and dirt on the surface of the resin particles form abnormal areas in the reflection image due to differences in reflection characteristics compared to normal resin.

[0068] Furthermore, acquiring an image of the first surface of the resin particles specifically includes:

[0069] Acquire a transmission image of the first surface of the resin particles;

[0070] Acquire reflection images from the first surface of the resin particles;

[0071] Impurity detection is performed on the transmitted image and the reflected image respectively.

[0072] Image preprocessing is performed on both the transmission and reflection images, including noise reduction and region of interest (ROI) extraction. The preprocessed images are converted to grayscale and binarized to extract the contours of candidate impurity regions. The area and perimeter of each contour are calculated, and the results are compared with preset thresholds. If the contour area exceeds the preset area threshold and the contour perimeter meets a preset range, the region corresponding to that contour is determined to be an impurity. If an impurity is detected in either the transmission or reflection image, it is determined that an impurity exists on the first surface of the resin particles.

[0073] Furthermore, extracting the feature information of the corresponding resin particles specifically includes:

[0074] Extract the projected area of ​​the resin particles and calculate the projected area based on the projected region of the resin particles in the image.

[0075] Extract the aspect ratio of the resin particles, which is the ratio of the long side to the short side of the smallest bounding rectangle of the resin particle's projected area.

[0076] The roundness of the resin particles is extracted to characterize the regularity of the resin particle outline.

[0077] The Hu moment of the resin particles is extracted, and the invariance of the Hu moment to translation, rotation and scale changes is used to characterize the overall shape features of the resin particles.

[0078] The projected area, aspect ratio, roundness, and Hu distance are used to form the characteristic information of the corresponding resin particles, and are associated with and saved with the first surface image of the corresponding resin particles.

[0079] S200: Establish a motion prediction relationship across detection stations based on the conveying state of the resin particles, and determine the predicted range of the resin particles moving from the first detection station to the second detection station.

[0080] Specifically, after the resin particles complete image acquisition at the first inspection station, they continue to move towards the second inspection station via the conveying mechanism. The conveying status of the conveying mechanism containing the resin particles is acquired, and a cross-inspection station motion prediction relationship is established based on the movement trajectory of the resin particles after leaving the first inspection station. Based on this motion prediction relationship, the time and position of the resin particles arriving at the second inspection station are predicted, further determining the predicted range of the resin particles' movement from the first to the second inspection station. This allows for subsequent association and matching of resin particles acquired at different inspection stations only within the predicted range.

[0081] Furthermore, the establishment of motion prediction relationships across detection stations specifically includes:

[0082] The motion prediction relationship is used to describe the mapping relationship between the position and time of the resin particles as they move from the first detection station to the second detection station, depending on the conveying state. The conveying state of the conveying mechanism containing the resin particles is obtained. The conveying state includes the operating speed and direction of the conveying mechanism, as well as the relative positional relationship between the first and second detection stations. Specifically, the operating speed reflects the conveying speed of the resin particles, the operating direction determines the direction of movement of the resin particles, and the relative positional relationship determines the distance the resin particles travel between the two detection stations.

[0083] A particle motion prediction model is established based on the motion trajectory of the resin particles after they leave the first detection station. Taking the position of the resin particle when it leaves the first detection station as the starting point of motion, the model continuously predicts the position of the resin particle during the conveying process based on the conveying status. When the operating speed of the conveying mechanism changes, the predicted position of the resin particle is updated synchronously according to the updated conveying status, ensuring that the particle motion prediction model reflects the actual conveying process of the resin particles.

[0084] The predicted time for resin particles to enter the second detection station is calculated based on the particle motion prediction model. The predicted time range is then determined by combining the fluctuation range of the conveying mechanism's operating speed and the arrival time deviation caused by changes in particle posture during conveying. The predicted position of the resin particles upon entering the second detection station is obtained from the particle motion prediction model, and the predicted spatial range is determined by combining this deviation with the aforementioned deviation. The predicted time range and the predicted spatial range together constitute the predicted range. Subsequent correlation matching is performed only within this predicted range, thereby reducing the number of candidate particles and improving the accuracy of cross-detection station correlation matching.

[0085] It should be noted that the predicted time range and predicted spatial range are not limited to specific values. They can be set according to the operational stability of the conveying mechanism, the size of the resin particles, and the spacing between the detection stations, as long as they can cover the actual movement range of the resin particles from the first detection station to the second detection station.

[0086] S300: Acquire an image of the second surface of the resin particles, perform impurity detection on the image of the second surface, and extract the feature information of the corresponding resin particles;

[0087] Specifically, after the resin particles are conveyed by the conveying mechanism to the second inspection station, an image of the second surface of the resin particles is acquired, impurity detection is performed on the image of the second surface, and the feature information of the corresponding resin particles is extracted, providing a data basis for establishing the association and matching between the first inspection station and the second inspection station.

[0088] Since the second inspection station uses the same inspection method as the first inspection station, it acquires both transmission and reflection images of the second surface of the resin particles. The transmission image is used to detect internal impurities in the resin particles, while the reflection image is used to detect surface impurities such as discoloration, scratches, and dirt on the second surface of the resin particles. Impurity detection is performed on both the transmission and reflection images; if an impurity is detected in either image, it is determined that impurities exist on the second surface.

[0089] When extracting the feature information of the corresponding resin particles, the projected area, aspect ratio, roundness, and Hu moment of the resin particles are extracted based on the image of the second surface. Among them, the projected area is used to characterize the size feature of the resin particles, the aspect ratio is used to characterize the overall shape feature of the resin particles, the roundness is used to characterize the regularity of the resin particle outline, and the Hu moment is used to characterize the overall shape feature of the resin particles.

[0090] After extracting the projected area, aspect ratio, roundness, and Hu moment, the projected area, aspect ratio, roundness, and Hu moment are used to form the feature information of the corresponding resin particles. The feature information is then saved after establishing a correspondence with the second surface image of the corresponding resin particles. This provides feature data for subsequent association and matching of the resin particles obtained by the first and second detection stations based on the prediction range.

[0091] S400: Using the prediction range as a constraint, the resin particles obtained by the first detection station and the second detection station are associated and matched within the prediction range to establish the correspondence between different surface images of the same resin particle.

[0092] Specifically, based on the prediction range determined in S200, resin particles corresponding to those at the first detection station are searched among the resin particles acquired at the second detection station, and a correspondence is established between different surface images of the same resin particle. Since the association matching is limited to the prediction range, it is not necessary to match all resin particles acquired at the second detection station, effectively reducing the number of candidate particles, improving the association matching efficiency, and reducing the possibility of mismatches when multiple resin particles pass through the detection station simultaneously.

[0093] Furthermore, the association and matching of resin particles obtained from the first and second detection stations specifically includes:

[0094] A set of candidate particles that satisfy the spatiotemporal constraints is established based on the predicted time range and the predicted spatial range.

[0095] Specifically, the resin particles obtained at the first detection station are used as the matching objects. The resin particles detected at the second detection station are screened within the predicted time range, and the resin particles located in the corresponding predicted area are further screened according to the predicted spatial range. The resin particles that simultaneously meet the predicted time range and the predicted spatial range are determined as the candidate particle set.

[0096] The correlation confidence between the candidate particle and the resin particle at the first detection station is calculated based on the feature information.

[0097] The correlation confidence is calculated as follows: First, candidate particles are filtered at the first level according to the preset projection area threshold and aspect ratio threshold. The difference in projection area and aspect ratio between the candidate particle and the resin particle at the first detection station are calculated respectively. When the difference in projection area is not greater than the projection area threshold and the difference in aspect ratio is not greater than the aspect ratio threshold, the corresponding candidate particle is retained; otherwise, the corresponding candidate particle is removed.

[0098] After the first-level filtering is completed, the feature similarity between the remaining candidate particles and the resin particles at the first detection station is calculated based on roundness and Hu moment. Specifically, the roundness of the candidate particles is compared with that of the resin particles at the first detection station, and their Hu moments are also compared. The feature similarity of the corresponding candidate particles is obtained based on the comprehensive similarity of roundness and Hu moment, and this feature similarity is used as the association confidence level. The higher the association confidence level, the greater the probability that the resin particles obtained from the two detection stations belong to the same particle.

[0099] Based on the aforementioned association credibility, an identity mapping relationship is established across detection workstations.

[0100] Specifically, the candidate particle with the highest association confidence is selected from the candidate particle set as the matching result corresponding to the resin particle at the first detection station. An identity mapping relationship is established between the first and second detection stations, associating the first surface image and the second surface image with the same identity identifier. This ensures that subsequent fusion judgments are based on the two detection results of the same resin particle, rather than mixing the detection results of different resin particles. If no candidate particle in the candidate particle set meets the association conditions, the association matching is deemed a failure, no identity mapping relationship is established, and the resin particle is marked as an unmatched particle. The unmatched particle does not participate in the sorting logic based on dual-surface fusion judgment. Instead, when it moves to a preset sorting position, the execution mechanism sorts it to the re-inspection channel for manual or offline verification.

[0101] S500: Based on the deviation between the correlation matching result and the prediction range, the motion prediction relationship is corrected and updated, and the prediction range of subsequent resin particles is re-determined based on the corrected and updated motion prediction relationship.

[0102] Specifically, after completing the association matching between the first and second detection stations, the actual position and arrival time of the resin particles at the second detection station are determined based on the association matching result. This is then compared with the prediction range determined in S200 to obtain the deviation between the association matching result and the prediction range. The motion prediction relationship is then corrected and updated based on this deviation, enabling the motion prediction relationship to reflect changes in the operating state of the conveying mechanism and improving the accuracy of subsequent resin particle motion prediction.

[0103] Furthermore, the step of correcting and updating the motion prediction relationship based on the deviation between the association matching result and the prediction range specifically includes:

[0104] The actual movement trajectories of multiple successfully matched resin particles between the first detection station and the second detection station are obtained.

[0105] Specifically, for resin particles that have completed association matching, the actual movement trajectory of the resin particles from the first detection station to the second detection station is determined based on the detection position and time of the resin particles at the first detection station and the matching position and time at the second detection station. After multiple resin particles have completed association matching, the actual movement trajectories corresponding to the multiple successfully associated resin particles are obtained as the basis for correcting the motion prediction relationship.

[0106] Based on the deviation between the actual motion trajectory and the motion prediction relationship, the particle motion prediction model is updated, and the prediction range of subsequent resin particles is re-determined based on the updated particle motion prediction model.

[0107] Specifically, the actual motion trajectories of multiple successfully matched resin particles are compared with the predicted motion trajectories corresponding to the particle motion prediction model to obtain the positional and temporal deviations between the two. The particle motion prediction model is then updated based on these positional and temporal deviations to better reflect the current actual conveying state of the conveying mechanism. After updating the particle motion prediction model, the predicted time and spatial ranges for subsequent resin particles arriving at the second detection station are recalculated using the updated model, and these newly determined predicted time and spatial ranges are used as the predicted ranges for subsequent resin particles.

[0108] It should be noted that this step uses the actual motion results of the resin particles that have been associated and matched to continuously correct and update the particle motion prediction model. There is no need to set additional calibration particles or manually adjust the prediction parameters. This allows the prediction range of subsequent resin particles to be adaptively adjusted according to changes in the conveying state, thereby improving the stability and accuracy of the association matching between different detection stations.

[0109] S600: Based on the impurity detection results of the first surface and the impurity detection results of the second surface, a fusion determination is made to determine the detection results of the resin particles;

[0110] Specifically, after completing the association matching between the first and second detection stations, the first surface impurity detection result and the second surface impurity detection result corresponding to the same resin particle are obtained, and the two detection results are fused and determined to determine the final detection result of the resin particle.

[0111] Furthermore, the fusion determination based on the impurity detection results of the first surface and the impurity detection results of the second surface specifically includes:

[0112] Obtain the impurity detection results of the first surface.

[0113] Obtain the impurity detection results for the second surface.

[0114] The system determines whether the image quality of the first and second surface images is below a preset threshold. Image quality can be evaluated based on image sharpness, brightness, contrast, or image integrity. When the image quality of either the first or second surface image is below the preset threshold, the detection result for the corresponding surface is marked as uncertain. The judgment is then made only based on the detection result of the other surface whose image quality is not below the preset threshold, in order to avoid misjudgment due to poor image quality.

[0115] If the image quality of both the first surface image and the second surface image is not lower than a preset threshold, then the determination is made by combining the impurity detection results of the first surface and the second surface. If the detection result of either surface indicates the presence of impurities, then the resin particles are determined to be unqualified particles; if the detection results of both the first surface and the second surface indicate the absence of impurities, then the resin particles are determined to be qualified particles.

[0116] After the fusion determination is completed, the detection results of the corresponding resin particles are output, providing a basis for the sorting control information of the subsequently generated resin particles.

[0117] S700: Generate sorting control information for the corresponding resin particles based on the detection results, and complete the sorting when the resin particles move to the preset sorting position.

[0118] Specifically, based on the resin particle detection results determined by S600, corresponding resin particle sorting control information is generated, and the timing of resin particle arrival at the preset sorting position is predicted in combination with the resin particle conveying status. When the resin particle arrives at the preset sorting position, the actuator is controlled to complete the sorting, so that unqualified particles are separated from qualified particles.

[0119] Furthermore, the step of generating sorting control information for the corresponding resin particles based on the detection results specifically includes:

[0120] The position coordinates of the resin particles at the first detection station or the second detection station are obtained based on the association matching results.

[0121] Specifically, based on the correlation matching results, the detection record corresponding to the resin particle is determined, and the position coordinates of the resin particle at the first or second detection station are obtained as the current position information of the resin particle. For resin particles without correlation matching results, their current position coordinates are calculated based on their position coordinates at the first detection station, combined with the running speed and direction of the conveying mechanism, and are used as the position coordinates.

[0122] The predicted time when the resin particles will arrive at the preset sorting position is calculated based on the conveying status and the position coordinates.

[0123] Specifically, based on the operating speed and direction of the conveying mechanism, as well as the distance between the current position of the resin particles and the preset sorting position, the predicted time when the resin particles will reach the preset sorting position is calculated. When the conveying status changes, the predicted time is recalculated based on the updated conveying status to ensure that the sorting control timing is consistent with the actual operating status of the resin particles.

[0124] The actuator's motion control command is generated based on the predicted time.

[0125] Specifically, sorting control information is generated based on the detection results of the resin particles and the predicted time. When the detection result of the resin particles is unqualified, a control command to drive the actuator is generated; when the detection result of the resin particles is qualified, no sorting action control command is generated, and the resin particles continue to be conveyed along the conveying mechanism.

[0126] At the predicted time, the actuator is controlled to separate the defective particles from the qualified particles.

[0127] Specifically, when the resin particles move to the preset sorting position, the actuator completes the sorting according to the motion control command, removing the unqualified particles from the conveying path, while the qualified particles continue to be conveyed along the original conveying path, thereby completing the automatic sorting of resin particles.

[0128] It should be noted that the actuator can be any one of the following, such as an air blowing mechanism, a lever mechanism, a push plate mechanism, or a mechanical clamping mechanism, depending on the actual application scenario. This invention does not limit this, as long as it can complete the sorting when the resin particles reach the preset sorting position according to the sorting control information.

[0129] In summary, the method provided in this embodiment achieves accurate correlation and tracking of the same resin particles across different detection stations, enabling the fusion judgment of dual-surface detection results to be based on complete detection data of the same particle. Simultaneously, through a continuous correction and update mechanism based on the correlation matching results, the prediction range can adaptively adjust with changes in the conveying state, improving the stability and accuracy of correlation matching during continuous conveying. This method is suitable for online impurity detection and automatic sorting scenarios for large-volume resin particles.

[0130] Example 2:

[0131] like Figure 2 As shown, this embodiment provides a resin impurity detection and sorting system based on machine vision, including:

[0132] The first acquisition module is used to acquire an image of the first surface of the resin particles, perform impurity detection on the image of the first surface, and extract the feature information of the corresponding resin particles.

[0133] The motion prediction module is used to establish a motion prediction relationship across detection stations based on the conveying state of the resin particles, and to determine the predicted range of the resin particles moving from the first detection station to the second detection station.

[0134] The second acquisition module is used to acquire an image of the second surface of the resin particles, perform impurity detection on the image of the second surface, and extract the feature information of the corresponding resin particles.

[0135] The association matching module is used to perform association matching on the resin particles obtained by the first detection station and the second detection station within the prediction range, constrained by the prediction range, and to establish the correspondence between different surface images of the same resin particle.

[0136] The correction and update module is used to correct and update the motion prediction relationship based on the deviation between the association matching result and the prediction range, and to redetermine the prediction range of subsequent resin particles based on the corrected and updated motion prediction relationship.

[0137] The fusion determination module is used to determine the fusion result of the resin particles based on the impurity detection results of the first surface and the impurity detection results of the second surface.

[0138] The sorting control module is used to generate sorting control information for the corresponding resin particles based on the detection results. When the resin particles move to the preset sorting position, the actuator is triggered to separate the unqualified particles according to the sorting control information.

[0139] It should be noted that the machine vision-based resin impurity detection and sorting system provided in this embodiment of the invention is used to execute all the process steps of the machine vision-based resin impurity detection and sorting method in Embodiment 1. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.

[0140] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for detecting and sorting resin impurities based on machine vision, characterized in that, include: S100: Acquire an image of the first surface of the resin particles, perform impurity detection on the image of the first surface, and extract the feature information of the corresponding resin particles; S200: Establish a motion prediction relationship across detection stations based on the conveying state of the resin particles, and determine the predicted range of the resin particles moving from the first detection station to the second detection station. S300: Acquire an image of the second surface of the resin particles, perform impurity detection on the image of the second surface, and extract the feature information of the corresponding resin particles; S400: Using the prediction range as a constraint, the resin particles obtained by the first detection station and the second detection station are associated and matched within the prediction range to establish the correspondence between different surface images of the same resin particle. S500: Based on the deviation between the correlation matching result and the prediction range, the motion prediction relationship is corrected and updated, and the prediction range of subsequent resin particles is re-determined based on the corrected and updated motion prediction relationship. S600: Based on the impurity detection results of the first surface and the impurity detection results of the second surface, a fusion determination is made to determine the detection results of the resin particles; S700: Generate sorting control information for the corresponding resin particles based on the detection results, and complete the sorting when the resin particles move to the preset sorting position.

2. The resin impurity detection and sorting method based on machine vision according to claim 1, characterized in that, In S100 and S300, acquiring an image of the first surface of the resin particles and acquiring an image of the second surface of the resin particles respectively include: Acquire transmission images of the corresponding surface; Acquire reflection images of the corresponding surfaces; Impurity detection is performed on the transmitted image and the reflected image respectively. If impurities are detected in either image, it is determined that impurities exist on the corresponding surface.

3. The resin impurity detection and sorting method based on machine vision according to claim 2, characterized in that, In S100, the extraction of feature information of the corresponding resin particles specifically includes: Extract the projected area of ​​the resin particles; Extract the aspect ratio of the resin particles; Extract the roundness of the resin particles; The Hu moment of the resin particles was extracted.

4. The resin impurity detection and sorting method based on machine vision according to claim 1, characterized in that, In S200, establishing the motion prediction relationship across detection stations specifically includes: Obtain the conveying status of the conveying mechanism containing the resin particles; A particle motion prediction model is established based on the motion trajectory of the resin particles after they leave the first detection station. The predicted time range and predicted spatial range for the resin particles to reach the second detection station are determined based on the particle motion prediction model.

5. The resin impurity detection and sorting method based on machine vision according to claim 4, characterized in that, In S400, the specific steps for associating and matching the resin particles obtained from the first and second detection stations include: A set of candidate particles that satisfy the spatiotemporal constraints is established based on the predicted time range and the predicted spatial range. The correlation confidence between the candidate particle and the resin particle at the first detection station is calculated based on the feature information. Based on the aforementioned association credibility, an identity mapping relationship is established across detection stations, and the first surface image and the second surface image belonging to the same particle are associated with the same identity identifier.

6. The resin impurity detection and sorting method based on machine vision according to claim 5, characterized in that, The method for calculating the reliability of the association is as follows: The candidate particles are filtered in the first stage according to the preset projection area threshold and aspect ratio threshold. The feature similarity of the remaining candidate particles after the first-level filtering is calculated based on roundness and Hu moment, and the feature similarity is used as the association confidence.

7. The resin impurity detection and sorting method based on machine vision according to claim 4, characterized in that, In S500, the step of correcting and updating the motion prediction relationship based on the deviation between the association matching result and the prediction range specifically includes: Obtain the actual movement trajectory of multiple successfully matched resin particles between the first detection station and the second detection station; Based on the deviation between the actual motion trajectory and the motion prediction relationship, the particle motion prediction model is updated, and the prediction range of subsequent resin particles is re-determined based on the updated particle motion prediction model.

8. The resin impurity detection and sorting method based on machine vision according to claim 1, characterized in that, In S600, the fusion determination based on the impurity detection results of the first surface and the impurity detection results of the second surface specifically includes: Obtain the impurity detection results of the first surface; Obtain the impurity detection results for the second surface; If the image quality of the first surface or the second surface is lower than a preset threshold, the detection result of the corresponding surface is marked as uncertain, and the determination is made only based on the detection result of the image quality of the other surface that is not lower than the preset threshold. If any of the surfaces involved in the determination test results for the presence of impurities, then the resin particles are identified as unqualified particles.

9. The resin impurity detection and sorting method based on machine vision according to claim 1, characterized in that, In S700, the step of generating sorting control information for the corresponding resin particles based on the detection result specifically includes: The position coordinates of the resin particles at the first or second detection station are obtained based on the association matching results. If there is no associated matching result for the resin particles, the current position coordinates of the resin particles are calculated based on the position coordinates of the resin particles at the first detection station and the conveying status. The predicted time when the resin particles will arrive at the preset sorting position is calculated based on the conveying status and the position coordinates. Generate motion control instructions for the actuator based on the predicted time; At the predicted time, the actuator is controlled to separate the defective particles from the qualified particles.

10. A resin impurity detection and sorting system based on machine vision, characterized in that, include: The first acquisition module is used to acquire an image of the first surface of the resin particles, perform impurity detection on the image of the first surface, and extract the feature information of the corresponding resin particles. The motion prediction module is used to establish a motion prediction relationship across detection stations based on the conveying state of the resin particles, and to determine the predicted range of the resin particles moving from the first detection station to the second detection station. The second acquisition module is used to acquire an image of the second surface of the resin particles, perform impurity detection on the image of the second surface, and extract the feature information of the corresponding resin particles. The association matching module is used to perform association matching on the resin particles obtained by the first detection station and the second detection station within the prediction range, constrained by the prediction range, and to establish the correspondence between different surface images of the same resin particle. The correction and update module is used to correct and update the motion prediction relationship based on the deviation between the association matching result and the prediction range, and to redetermine the prediction range of subsequent resin particles based on the corrected and updated motion prediction relationship. The fusion determination module is used to determine the fusion result of the resin particles based on the impurity detection results of the first surface and the impurity detection results of the second surface. The sorting control module is used to generate sorting control information for the corresponding resin particles based on the detection results. When the resin particles move to the preset sorting position, the actuator is triggered to separate the unqualified particles according to the sorting control information.