Plastic package sorting method, system, electronic device, and storage medium
By combining hyperspectral data and image model data, the material type and geometric properties of plastics are determined, and a correlation model is generated. This solves the problem of poor sorting effect of plastic packaging in the existing technology and achieves precise air volume control and efficient sorting effect.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGZHOU JIUZHAO INTELLIGENT TECH CO LTD
- Filing Date
- 2026-02-02
- Publication Date
- 2026-05-12
AI Technical Summary
Existing plastic packaging sorting methods are ineffective because weight-based and visual sorting technologies struggle to accurately distinguish plastic material types.
By combining hyperspectral data and image model data, the material type and geometric properties of plastics are determined through spectral feature analysis and morphological analysis. A correlation model is generated to calculate the valve control commands of the jetting equipment, so as to achieve precise jet volume control.
It improves the identification efficiency and accuracy of plastic packaging sorting, solves the sorting problem of plastics of the same color but different textures, and avoids the problem of over-blowing or under-blowing of large-volume plastics.
Smart Images

Figure CN121607346B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of plastic packaging sorting methods, and more particularly to a plastic packaging sorting method, system, electronic device, and storage medium. Background Technology
[0002] Currently, the sorting process for plastic packaging primarily relies on two key technologies: gravimetric sorting and visual sorting. Gravimetric sorting achieves effective separation by precisely measuring the weight differences of different plastic materials, a method particularly efficient when handling large volumes of similar plastics. Visual sorting, on the other hand, utilizes high-resolution cameras and advanced image processing algorithms to sort plastics by recognizing surface features such as color, shape, and texture, enabling the handling of more complex mixtures. These two technologies each have their advantages and are often used in combination in practical applications to improve sorting accuracy and efficiency, meeting the needs of environmental protection and resource recycling.
[0003] Existing plastic packaging sorting technologies, such as weight sorting and visual sorting, are ineffective at accurately distinguishing the type of plastic material, resulting in poor sorting performance. Summary of the Invention
[0004] This application provides a method, system, electronic device, and storage medium for sorting plastic packaging to solve the problems existing in related technologies. The technical solution is as follows:
[0005] In a first aspect, embodiments of this application provide a method for sorting plastic packaging, including:
[0006] Acquire jet equipment parameters, hyperspectral data, image model data, and conveyor speed. The hyperspectral data is the spectral data of the plastic packaging being conveyed on the belt at the conveyor speed, which is collected using a hyperspectral imager. The image model data is the image data of the plastic packaging being conveyed on the belt at the conveyor speed, which is collected using a hyperspectral imager.
[0007] Spectral feature analysis was performed on the hyperspectral data to extract the characteristic absorption peaks of the material and calculate the spectral similarity to determine the material type of the plastic.
[0008] Morphological analysis of image model data is performed, and the shape analysis results are verified by multimodal matching with the spatial distribution of hyperspectral data to determine geometric properties;
[0009] Based on the specified sorting strategy database, material type, and geometric properties, an association model is generated. The specified sorting strategy database is used to store the mapping relationship between material type and the basic jet intensity value of the jet equipment.
[0010] The pixel-level contour set of the object is extracted from the image model data and mapped to the corresponding jet equipment parameters to obtain the target vent matrix;
[0011] Based on the jet equipment parameters, correlation model, target orifice matrix, and delivery speed, determine the air valve control commands for the jet equipment.
[0012] In one embodiment of this application, generating an association model based on a specified sorting strategy database, material type, and geometric properties includes:
[0013] The basic jetting intensity value is obtained by retrieving the material type from the database based on the specified sorting strategy.
[0014] Determine the jet correction weights based on geometric characteristics;
[0015] The basic jet intensity value is associated with the jet correction weight and stored to generate an associated model.
[0016] In one embodiment of this application, the jetting device parameters include one-dimensional coordinate axes of the jetting device arrangement direction. The pixel-level contour set of the object is extracted from image model data and mapped to the corresponding jetting device parameters to obtain the target vent matrix, which includes:
[0017] The region of interest is obtained by locating the vertex coordinates of an object in the image model data using a specified convolution algorithm.
[0018] Perform grayscale conversion, binarization, and edge detection algorithms on the region of interest to obtain a set of pixel-level contours of the object;
[0019] The pixel-level contour set is mapped onto a one-dimensional coordinate axis corresponding to the arrangement direction of the jet equipment, the coordinate interval covered by the contour is identified, and a target vent matrix composed of valve index numbers is generated.
[0020] In one embodiment of this application, the jet equipment parameters include the installation distance of the air valve. Based on the jet equipment parameters, the correlation model, the target air orifice matrix, and the delivery speed, the air valve control command of the jet equipment is determined as follows:
[0021] Traverse each valve index number in the target vent matrix and obtain the target opening duration of each valve based on the base jet intensity value and jet correction weight in the correlation model.
[0022] The opening trigger timestamp of each air valve is calculated based on the conveying speed and the installation distance of the air valve, and the opening trigger timestamp of each air valve is generated.
[0023] Based on the opening trigger timestamp of each valve, the valve index number, and the target opening duration, the valve control command of the jet equipment is determined.
[0024] In one embodiment of this application, spectral feature analysis is performed on hyperspectral data to extract material characteristic absorption peaks and calculate spectral similarity to determine the material type of the plastic, including:
[0025] The hyperspectral data is smoothed and differentiated to generate derivative spectral curves, and the characteristic peak values corresponding to the preset wavelengths are extracted from the derivative spectral curves.
[0026] The similarity coefficient between the derivative spectral curve and each standard curve in the standard material spectral library is calculated using a spectral angle plotting algorithm or an Euclidean distance algorithm, and the similarity coefficient is obtained.
[0027] The current dynamic classification threshold is determined based on the inverse correlation mapping function between the conveying speed and the preset speed threshold.
[0028] The similarity coefficient is compared with the dynamic classification threshold. If the similarity coefficient is greater than or equal to the dynamic classification threshold, the standard material type corresponding to the similarity coefficient is taken as the material type of the plastic.
[0029] In one embodiment of this application, morphological analysis of image model data is performed, and the shape analysis results are verified by multimodal matching with the spatial distribution of hyperspectral data to determine geometric properties, including:
[0030] Connectivity analysis is performed on the image model data to obtain the pixel connected regions of the target object;
[0031] Construct the minimum bounding rectangle for the pixel connected regions to obtain the number of pixels along the major axis and the number of pixels along the minor axis;
[0032] The ratio of the number of pixels on the major axis to the number of pixels on the minor axis is calculated to obtain the aspect ratio feature value;
[0033] The fill rate feature value is obtained by calculating the ratio of the area of the pixel connected region to the area of the minimum bounding rectangle.
[0034] The aspect ratio feature value and the fill rate feature value are input into the morphology classification rule library for comparison.
[0035] When the aspect ratio feature value falls within the first preset range and the fill rate feature value is less than the preset threshold, the geometric properties characterizing the thin film type are generated.
[0036] When the aspect ratio feature value falls within the second preset range and the fill rate feature value is greater than the preset threshold, geometric attributes characterizing the bottle-shaped pieces are generated.
[0037] By establishing a pixel-level spatial mapping relationship between hyperspectral data and image model data through coordinate transformation;
[0038] Based on pixel-level spatial mapping relationships, the effective spectral response region of the same object in hyperspectral data is determined.
[0039] The geometric centroid coordinates are obtained by calculating the connected regions of pixels in the image model data.
[0040] The effective spectral response region in the hyperspectral data is calculated to obtain the coordinates of the spectral centroid.
[0041] The Euclidean distance is obtained by calculating the geometric centroid coordinates and the coordinates of the two centroids.
[0042] Determine whether the Euclidean distance is less than a preset spatial deviation threshold;
[0043] If the Euclidean distance is not less than the preset spatial deviation threshold, the currently identified object is determined to be an optical ghost or noise, and the generation of geometric properties for the plastic is stopped.
[0044] In one embodiment of this application, it further includes:
[0045] Principal component analysis was performed on the hyperspectral data to obtain principal component features;
[0046] The principal component features are input into a pre-trained random forest classification model to obtain classification results that characterize whether materials are stacked.
[0047] Secondly, embodiments of this application provide a plastic packaging sorting system, including:
[0048] The first acquisition module is used to acquire jet equipment parameters, hyperspectral data, image model data and conveying speed. The hyperspectral data is the spectral data of the plastic package being conveyed on the belt at the conveying speed, which is collected by a hyperspectral imager. The image model data is the image data of the plastic package being conveyed on the belt at the conveying speed, which is collected by a hyperspectral imager.
[0049] The first determination module is used to perform spectral feature analysis on hyperspectral data, extract material characteristic absorption peaks and calculate spectral similarity to determine the material type of plastic.
[0050] The second determination module is used to perform morphological analysis on the image model data and perform multimodal matching verification between the shape analysis results and the spatial distribution of hyperspectral data to determine geometric properties;
[0051] The first generation module is used to generate an associated model based on a specified sorting strategy database, material type, and geometric properties. The specified sorting strategy database is used to store the mapping relationship between material type and the basic jet intensity value of the jet equipment.
[0052] The first module is used to extract the pixel-level contour set of the object based on the image model data and map it to the corresponding jet equipment parameters to obtain the target vent matrix.
[0053] The third determining module is used to determine the air valve control commands of the jet equipment based on the jet equipment parameters, the associated model, the target air hole matrix, and the delivery speed.
[0054] Thirdly, embodiments of this application provide an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the above-described plastic packaging sorting method.
[0055] Fourthly, embodiments of this application provide a computer-readable storage medium that stores computer instructions, wherein when the computer instructions are executed on a computer, the methods in any of the above-described embodiments are performed.
[0056] The advantages or beneficial effects of the above technical solutions include at least the following:
[0057] In this embodiment, the plastic packaging sorting method includes: acquiring data such as jetting equipment parameters, hyperspectral data, image model data, and conveying speed; determining the material type of the plastic by performing spectral feature analysis on the hyperspectral data; analyzing and verifying the geometric properties of the image model data; obtaining a correlation model based on a specified sorting strategy database, material type, and geometric properties; extracting the pixel-level contour set of the object according to the image model data and mapping it to the corresponding jetting equipment parameters to obtain the target pore matrix; and finally determining the air valve control command of the jetting equipment through the jetting equipment parameters, the correlation model, the target pore matrix, and the conveying speed. This embodiment's plastic packaging sorting method, through the dual combination of hyperspectral data and image model data, solves the deficiency of single vision technology in distinguishing heterogeneous plastics of the same color (such as transparent PET and PVC). Simultaneously, by combining material type with geometric properties to calculate the air volume, the problem of over-blowing or under-blowing of large-volume plastics is solved. This achieves more precise air volume control of the air jetting equipment to separate products based on weight differences. It effectively solves the problem that existing plastic packaging sorting technologies, such as weight sorting and visual sorting, are unable to accurately distinguish the type of plastic material, resulting in poor sorting performance. This effectively improves recognition efficiency and accuracy.
[0058] The above overview is for illustrative purposes only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features of this application will become readily apparent from the accompanying drawings and the following detailed description. Attached Figure Description
[0059] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the various drawings denote the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings depict only some embodiments disclosed in this application and should not be construed as limiting the scope of this application.
[0060] Figure 1 This is a flowchart of a plastic packaging sorting method according to an embodiment of this application.
[0061] Figure 2 This is a block diagram of an electronic device according to an embodiment of the present application. Detailed Implementation
[0062] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the spirit or scope of this application. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.
[0063] Figure 1 A flowchart illustrating a plastic packaging sorting method according to an embodiment of this application is shown. Figure 1 As shown, a method for sorting plastic packaging includes:
[0064] S110: Acquire jet equipment parameters, hyperspectral data, image model data, and conveyor speed. The hyperspectral data is the spectral data of the plastic packaging being conveyed on the belt at the conveyor speed, which is collected using a hyperspectral imager. The image model data is the image data of the plastic packaging being conveyed on the belt at the conveyor speed, which is collected using a hyperspectral imager.
[0065] S120: Perform spectral feature analysis on hyperspectral data, extract material characteristic absorption peaks and calculate spectral similarity to determine the material type of plastic;
[0066] S130: Perform morphological analysis on the image model data and verify the shape analysis results with the spatial distribution of hyperspectral data through multimodal matching to determine geometric properties;
[0067] S140: Generate an association model based on the specified sorting strategy database, material type, and geometric properties. The specified sorting strategy database is used to store the mapping relationship between material type and the basic jet intensity value of the jet equipment.
[0068] S150: Extract the pixel-level contour set of the object from the image model data and map it to the parameters corresponding to the jetting equipment to obtain the target vent matrix;
[0069] S160: Determine the valve control commands for the jet equipment based on the jet equipment parameters, the associated model, the target orifice matrix, and the delivery speed.
[0070] In this embodiment, the plastic packaging sorting method includes: acquiring data such as jetting equipment parameters, hyperspectral data, image model data, and conveying speed; determining the material type of the plastic by performing spectral feature analysis on the hyperspectral data; analyzing and verifying the geometric properties of the image model data; obtaining a correlation model based on a specified sorting strategy database, material type, and geometric properties; extracting the pixel-level contour set of the object according to the image model data and mapping it to the corresponding jetting equipment parameters to obtain the target pore matrix; and finally determining the air valve control command of the jetting equipment through the jetting equipment parameters, the correlation model, the target pore matrix, and the conveying speed. This embodiment's plastic packaging sorting method, through the dual combination of hyperspectral data and image model data, solves the deficiency of single vision technology in distinguishing heterogeneous plastics of the same color (such as transparent PET and PVC). Simultaneously, by combining material type with geometric properties to calculate the air volume, the problem of over-blowing or under-blowing of large-volume plastics is solved. This achieves more precise air volume control of the air jetting equipment to separate products based on weight differences. It effectively solves the problem that existing plastic packaging sorting technologies, such as weight sorting and visual sorting, are unable to accurately distinguish the type of plastic material, resulting in poor sorting performance. This effectively improves recognition efficiency and accuracy.
[0071] The plastic packaging sorting method of this embodiment can be applied to an air jetting device containing multiple independent air valves arranged in a linear array. The air jetting device controls the airflow by opening and closing the air valves. By opening the air valves, the airflow is controlled to spray onto the plastic packaging being transported on the conveyor belt. If the plastic packaging is not heavy enough (the plastic packaging contains no contents), it will be blown over and leave the conveyor belt. If the plastic packaging is heavy enough (the plastic packaging contains contents), it can still be stably transported on the conveyor belt under the action of the airflow, thereby achieving the sorting effect. However, when dealing with plastic packaging of different volumes or materials, if the same air jet volume is used for all of them, it may lead to sorting failure and the sorting purpose cannot be achieved. The plastic sorting method of this embodiment can be a real-time online sorting method.
[0072] In step S110, the jet equipment parameters, hyperspectral data, image model data, and conveying speed are acquired. The hyperspectral data is the spectral data of the plastic package being conveyed on the belt at the conveying speed, which is collected by a hyperspectral imager. The image model data is the image data of the plastic package being conveyed on the belt at the conveying speed, which is collected by a hyperspectral imager.
[0073] In the embodiments of this application, plastic packages are placed on a conveyor belt and transported at a specified speed. A jetting device is arranged downstream of the belt. The jetting device can blow the plastic packages by spraying air. Theoretically, if there are items inside the plastic packages, they will not be blown off the belt by the air spraying device. If there are no items inside the plastic packages, they will be blown off the belt by the air spraying device to achieve sorting. However, due to the differences in the material type and geometric dimensions of the plastic packages, if only a theoretical jetting airflow is used to blow the plastic packages, it may be affected by different material types or geometric dimensions. Regardless of whether there are items inside the plastic packages, the jetting device's airflow may not be able to blow the plastic packages, or the jetting airflow may blow the plastic packages off the belt regardless of whether there are items inside, thus making sorting impossible.
[0074] In this embodiment, hyperspectral data refers to image data containing light intensity information of continuous wavelength bands (such as 400-2500nm), with each pixel corresponding to a spectral curve.
[0075] Image model data is used to assist in establishing three-dimensional or two-dimensional spatial morphology, including but not limited to RGB images, three-dimensional point clouds, etc., for subsequent shape factor calculation and contour extraction.
[0076] In this embodiment, hyperspectral data and image model data are acquired using a hyperspectral imager. The parameter configuration of the hyperspectral imager includes the following:
[0077] Spectral range selection: Based on the molecular vibration absorption peaks of plastic materials (such as PE, PET, PVC, etc.), a wide spectral range of 400-2500nm is configured, with a focus on covering the near-infrared (NIR) region (900-1700nm) to enhance material differentiation.
[0078] Spatial resolution setting: Adjust the pixel sampling rate according to the belt running speed to ensure that a single frame image covers at least 3-5 plastic particles to avoid motion blur or data redundancy.
[0079] Angle calibration: The camera's pitch angle is 15°-30° with the belt surface (the optimal angle needs to be determined experimentally) to balance the reflectivity of the particle surface and the suppression of background interference.
[0080] The environmental and synchronization control conditions for the hyperspectral imager include:
[0081] Lighting conditions: Use halogen lamps and LEDs for uniform light sources to avoid fluctuations in natural light; if outdoor work is required, a light shield must be provided and the ambient light intensity must be recorded.
[0082] Synchronous triggering mechanism: The encoder monitors the conveyor speed of the belt in real time, triggering the hyperspectral imager to dynamically adjust the exposure time according to the speed, ensuring image clarity.
[0083] Background settings: Select a background based on the belt color and subtract background reflection signals in real time.
[0084] Data quality control methods for hyperspectral imagers:
[0085] Anomaly detection: Real-time monitoring of spectral signal-to-noise ratio and image saturation to remove overexposed or underexposed frames.
[0086] Redundant acquisition: For plastics of the same material, multiple samples of different shapes are collected to cover real-world variables such as surface wear and contamination.
[0087] The parameters of the jet equipment can be directly determined based on the operating conditions of the jet equipment, such as the one-dimensional coordinate axis coordinates of the jet equipment arrangement direction and the installation distance of the air valves.
[0088] In this embodiment, image model data can also be obtained through an image recognition device, such as a camera or webcam.
[0089] The conveying speed of the belt can be calculated based on the motion signal, and multiple frames of continuously acquired hyperspectral data can be spatially stitched together according to the conveying speed to generate a hyperspectral data cube. Denoising and normalization processing is performed on the hyperspectral data cube, and geometric correction is performed on the visual model data to preprocess the hyperspectral data and image model data.
[0090] In step S120, spectral feature analysis is performed on the hyperspectral data to extract the material characteristic absorption peaks and calculate the spectral similarity to determine the material type of the plastic.
[0091] In the embodiments of this application, due to the complex environment at the plastic sorting site, the original spectral curves are often accompanied by baseline drift and background noise. To accurately extract the material characteristics, this embodiment employs a Savitzky-Golay (SG) digital filter to smooth and differentiate the spectral data. The core principle of the SG algorithm is based on local polynomial least squares fitting, performing convolution operations on the spectral data in the time domain. This preserves the signal variation trend while filtering out high-frequency noise, and eliminates baseline background interference through differentiation operations, enhancing the sharpness of characteristic absorption peaks.
[0092] The specific calculation process can be as follows:
[0093]
[0094] in:
[0095] Y represents the spectral value of the j-th band after processing (i.e., the first or second derivative); j+i This represents the value of the (j+i)th band in the original spectrum; m is the half-width of the sliding window. In this embodiment, the window size is dynamically adjusted according to the conveyor speed of the belt, typically taking a width of 5-15 bands; C i represents the convolution weighting coefficients of the corresponding order polynomial; N is the normalization factor.
[0096] In the embodiments of this application, the first derivative is preferably used to eliminate linear baseline drift, or the second derivative is used to separate overlapping peaks and enhance weak absorption peak signals.
[0097] The spectral curves after differentiation can clearly show the molecular vibrational characteristics of different chemical materials. Feature values are extracted for specific wavelength positions within the preset near-infrared (NIR) band (900-1700nm).
[0098] Different plastic materials exhibit significant absorption characteristics at specific wavelengths due to differences in their molecular structures (such as stretching vibrations of CH bonds, C=O bonds, and NH bonds). This embodiment focuses on monitoring the following typical characteristic wavelengths:
[0099] PET (polyethylene terephthalate): exhibits strong second-order overtone absorption peaks near 1660 nm or 1720 nm;
[0100] PP (polypropylene): There is a significant CH bond stretching vibration absorption peak in the region of 1190 nm to 1210 nm;
[0101] PVC (polyvinyl chloride): exhibits characteristic absorption behavior around 1420 nm.
[0102] The derivative spectral values at the aforementioned characteristic wavelengths are extracted to construct the characteristic spectral vector of the object under test.
[0103] To determine the material of the object under test, a pre-defined standard material spectral library is invoked. This library stores standard characteristic spectral vectors of samples such as high-purity PET, PP, PE, and PVC.
[0104] This embodiment uses the Spectral Angle Mapper (SAM) algorithm to calculate the similarity between the measured spectrum and the standard spectrum. The SAM algorithm treats the spectrum as a vector in a multi-dimensional space and measures its similarity by calculating the angle between two vectors. This method is insensitive to changes in light intensity and is particularly suitable for industrial conveyor belt scenarios.
[0105] The formula for calculating similarity (spectral angle α) is as follows:
[0106]
[0107] in, is the spectral vector of the object to be measured; is the reference spectral vector in the standard library; n is the total number of bands.
[0108] The closer the calculated α value is to 0 (i.e., the closer the cosine value is to 1), the more similar the chemical composition of the object being tested is to the standard material.
[0109] In actual operation, when the belt speed increases, the camera's exposure time shortens, which may cause slight image blurring and a decrease in spectral purity. If a strict static threshold is still used under these conditions, a large amount of valid material will be missed.
[0110] In the embodiments of this application, the conveying speed V of the belt is obtained in real time by an encoder. current The classification threshold T is dynamically adjusted based on the following logic. dynamic :
[0111]
[0112] Wherein: T base The baseline similarity threshold at standard speed (e.g., 0.95); V std The standard set speed; k is the adjustment coefficient (determined experimentally, k>0); V current This represents the current real-time delivery speed.
[0113] When V current >V std (When the speed is too fast), (V) std V current If the value is negative, the calculated T dynamic This means that the matching criteria have been appropriately relaxed to accommodate the slight decrease in spectral quality caused by high-speed motion, thus preventing missed detections.
[0114] When V current <V std When the speed is relatively slow, the calculated T dynamic The spectral quality is high at this point, allowing for the use of stricter thresholds to ensure extremely high classification accuracy and prevent misclassification.
[0115] Finally, the material type corresponding to the highest similarity is used as the candidate result. If this similarity is higher than the current T, the candidate material type is considered as the candidate material type. dynamic If the material type is correct, the object is determined to be of the corresponding material type (e.g., PET); otherwise, it is marked as unknown or an impurity.
[0116] In step S130, morphological analysis is performed on the image model data, and the shape analysis results are verified by multimodal matching with the spatial distribution of hyperspectral data to determine geometric properties.
[0117] Due to the inability of traditional visual sorting to accurately distinguish between materials and shapes, and the technical problems of inaccurate air jet control for large-volume plastics.
[0118] In this embodiment, a pre-trained convolutional neural network algorithm is used to identify materials in the image model data and output the position information of the materials on the conveyor belt plane. This position information is specifically represented by the vertex coordinates of the rectangle surrounding the materials. Let the coordinates of the four vertices of this rectangle be X1(x1, y1), X2(x2, y2), X3(x3, y3), and X4(x4, y4). These four coordinates define the region of interest (ROI) of the materials in the image.
[0119] The rectangular region defined by the four vertex coordinates is magnified and projected onto the material recognition image result. Within the projected region, instead of determining the material based on a single pixel, a pixel filtering and statistical analysis based on a weighted algorithm is performed: the number of pixels with different spectral classification results within the region is counted; different confidence weights are assigned based on the pixel's position distribution within the region (e.g., the weight of the central region is higher than that of the edge region); and the final material category of the object is determined through weighted calculation.
[0120] After determining the material type and approximate range, precise geometric properties, such as the material's exact geometric contour, are required for accurate air jet sorting. Within the rectangular coordinate range, the following image processing steps are performed: the ROI region image is converted to grayscale to reduce computational dimensionality; a dynamic threshold is set; the grayscale image is then converted to a binary image to separate the foreground (material) from the background (belt). Dissolve and dilate operations (or opening and closing operations) are performed on the binary image to remove edge burrs, fill internal pores, and break weakly connected adhesion areas. Edge detection algorithms (such as the Canny operator or the FindContours function) are used to trace the boundaries of the binary image, drawing the material's geometric contour information.
[0121] In this embodiment, the three-dimensional morphology of the material is inferred using shape factors (e.g., to distinguish between films and bottle flakes). Based on the extracted contours, geometric parameters are calculated, and the specific judgment logic is as follows:
[0122] Aspect Ratio Calculation: Calculate the aspect ratio of the smallest bounding rectangle of the outline. The formula is as follows:
[0123]
[0124] Among them, L maxW is the principal axis length of the profile. min The width is perpendicular to the main axis.
[0125] Classification threshold determination:
[0126] Thin film classification: When an object is detected to have a high aspect ratio (specifically ranging from 2.0 to 8.0) and exhibits high elongation (i.e., it has obvious unidirectional elongation characteristics), it is classified as a thin film.
[0127] Bottle flake classification: When an object is detected to have a medium aspect ratio (specifically, within the range of 1.0 - 2.5) and exhibits high elongation but no obvious single curl direction, it is classified as a bottle flake.
[0128] To eliminate misjudgments caused by reflections, shadows, or motion artifacts, the geometric attributes extracted from the above image model data are verified by multimodal matching with the spatial distribution of hyperspectral data.
[0129] The edge detection results of the RGB image are superimposed and compared with the edges of a specific band (or principal component map) of the hyperspectral image. If the RGB image shows the outline of an object, but the hyperspectral data has no effective material spectral signal at the corresponding coordinates (e.g., only the reflective spectrum), it is determined to be ghosting interference and is removed.
[0130] Verify whether the material pixels identified by hyperspectral imaging fall completely within the geometric contours extracted by RGB, thereby correcting the boundary accuracy of material identification.
[0131] After performing multimodal matching verification between the extracted geometric attributes and the spatial distribution of the hyperspectral data, the final geometric attributes are obtained.
[0132] In step S140, an association model is generated based on the specified sorting strategy database, material type, and geometric properties. The specified sorting strategy database is used to store the mapping relationship between material type and the basic jet intensity value of the jetting equipment.
[0133] In the embodiments of this application, an association model is generated by associating the material types and geometric properties obtained above with a specified sorting strategy database.
[0134] The specified sorting strategy database stores the static mapping between material types and the jet intensity values of the jetting equipment. The database contains lookup tables where each identifiable plastic material (such as PET, PVC, PP, etc.) corresponds to a base jet intensity value.
[0135] The base jet intensity value is a dimensionless parameter (range 0-100%) preset based on the material’s average physical density and standard aerodynamic characteristics. It represents the valve pressure or duty cycle required to successfully blow away the material under a standard unit volume.
[0136] Based on geometric properties, the projected area, shape factor, and centroid location of the material are determined. A shape correction coefficient is calculated based on the geometric characteristics to dynamically compensate for the base jet intensity value.
[0137] For materials with large volume or high aspect ratio (such as films), the estimated ratio of their wind-receiving area to mass is calculated based on their outline coverage area, and a large correction coefficient is generated to prevent air blowing tumbling or separation failure caused by uneven force.
[0138] A material-shape-jet volume correlation model is generated by fusing the base jet intensity value corresponding to the material type with the shape correction coefficient derived from the geometric attributes to create a correlation model specific to the material to be sorted. This model is essentially a real-time calculation logic used to output the final executed jet intensity (Ij). final ).
[0139] The association model can be represented as follows:
[0140]
[0141] Among them, I base The base jet intensity value retrieved from the database; K geo V is a correction coefficient calculated based on geometric properties. belt For real-time monitoring of belt conveyor speed (used to compensate for momentum).
[0142] In step S150, the pixel-level contour set of the object is extracted from the image model data and mapped to the parameters corresponding to the jetting device to obtain the target vent matrix.
[0143] In the embodiments of this application, as a concrete manifestation of the spatial dimension of the associated model, an air hole matrix is constructed based on the projection of the material's geometric contour onto the jet actuator. This matrix determines which air valves need to be opened.
[0144] The pixel-level contour set of the object obtained by the specified convolution algorithm is combined with the conveying speed and delay time of the belt, and the contour coordinates are projected onto the one-dimensional coordinate axis of the jet equipment arrangement direction.
[0145] Let the linear resolution of the jet valve array along the belt width be R (number of valves / mm), and the coverage area of the pixel-level contour set of the object perpendicular to the running direction be... .
[0146] The set of active valves V corresponding to the pore matrix set Defined as
[0147]
[0148] Among them, v i This represents the index of the i-th air valve. It is clarified that only air valves whose physical location is within the projection range of the pixel-level contour set of the object will be activated, thereby achieving precise coverage of irregularly shaped materials and avoiding accidental blowing (over-blowing) of adjacent materials or under-blowing of edge areas (under-blowing).
[0149] For conventional materials, a PID algorithm is used to maintain the stability of the jet pressure; for abnormal operating conditions (such as material stacking or extreme shapes), pre-trained reinforcement learning parameters are invoked to adjust the above I... final and V set Nonlinear adjustments are performed. The precise timing (milliseconds) of the valve trigger is calculated to ensure that the valve opening action and the arrival time of the material at the nozzle are strictly aligned in time and space.
[0150] In step S160, the air valve control command of the jet equipment is determined based on the jet equipment parameters, the associated model, the target air hole matrix, and the delivery speed.
[0151] In the embodiments of this application, since there is a physical distance between the material moving from the hyperspectral imager (detection position) to the jetting device (execution position), and the conveying speed of the belt may have slight fluctuations, the delay time is calculated by integration or discretization accumulation.
[0152] Let D be the physical distance between the detection location and the jet equipment. gap The current time is t now The encoder provides real-time feedback on the conveying speed as v(t). Calculate the estimated arrival time of the material at the jet center, i.e., the trigger time T. trigger :
[0153]
[0154] Or, in a digital control system, it can be simplified to:
[0155]
[0156] Where: V avg t represents the average conveyor speed of the belt within the current time window. sys Due to inherent computation and transmission delays (such as a 50ms response delay); Δt comp This is a dynamic compensation value for PID control based on historical data, used to correct mechanical response lag.
[0157] Based on the target vent matrix, determine the specific valve numbers that physically require action. The target vent matrix is essentially a two-dimensional array or bitmap, where rows represent valve indices perpendicular to the belt movement direction, and columns represent material length slices along the belt movement direction. Based on the jetting equipment parameters (especially the physical spacing and arrangement of the valves), map the effective pixels in the matrix to a valve ID set {ID1, ID2, ..., ID...}. n}
[0158] To ensure that large volumes of plastic are blown away completely, the duration of the air valve opening must be strictly matched with the time it takes for the material to pass through the air nozzle. This is based on the physical length L of the material along the belt running direction. obj (Derived from visual contours) and real-time delivery speed V belt Calculate the basic startup duration and add the safety margins before and after:
[0159]
[0160] Wherein, α is the overlap coefficient (e.g., 0.1-0.2), which ensures that the airflow covers the head and tail edges of the material, preventing rotation or incomplete separation due to uneven force.
[0161] The execution jet intensity value (I) calculated based on the correlation model final This intensity value is not merely a simple switching signal, but is converted into a specific control parameter. For jet valves supporting analog control, the command includes the specific pressure setpoint; for high-speed solenoid valves using pulse width modulation, the command includes the corresponding duty cycle. For example: Command Intensity D pwm =I final The range is 0-100%. This ensures that large-mass materials receive high-pressure gas flow, while lightweight films receive moderate gas flow, solving the technical problem of gas imbalance.
[0162] Based on the above calculation results, standardized valve control instruction packages are generated. Each instruction package is for a specific material to be sorted and contains multiple sub-instructions for different valves. The data structure of a single control instruction can be expressed as follows:
[0163]
[0164] Where: Valve_ID: Valve number determined by the target vent matrix; T start That is, the calculated T trigger Accurate to the millisecond level; T end : By T start +T duration Calculated; Strength: The jet intensity parameter determined by the correlation model.
[0165] The valve control command packet is sent to the actuator via a high-speed bus. If the detected calculation delay exceeds a set threshold (e.g., >100ms), the safety mechanism will automatically intervene and switch to a backup control mode (e.g., default full-power injection or reduced-speed operation) to prevent sorting errors.
[0166] In one embodiment of this application, generating an association model based on a specified sorting strategy database, material type, and geometric properties includes:
[0167] The basic jetting intensity value is obtained by retrieving the material type from the database based on the specified sorting strategy.
[0168] Determine the jet correction weights based on geometric characteristics;
[0169] The basic jet intensity value is associated with the jet correction weight and stored to generate an associated model.
[0170] In the embodiments of this application, in order to solve the various sorting errors caused by the uniform air volume when dealing with plastic particles of different shapes and sizes in the prior art (such as large-volume materials not being blown away and lightweight films being blown away and scattered), this embodiment achieves refined air volume control by constructing an association model.
[0171] Specifically: based on the material type (such as PET, PP, PE, etc.), access the preset database of specified sorting strategies.
[0172] The specified sorting strategy database consists of pre-stored physical density properties and basic jetting intensity values (I0.05) of various plastic materials. base The static mapping relationship between the two. The basic jet intensity value refers to the minimum valve pressure or opening pulse width required to successfully separate a unit volume of this type of material in a standard shape under standard experimental conditions.
[0173] The system uses the material type as the index key to search within a specified sorting strategy database. For example, for high-density PET materials, the database returns a higher base strength value; for low-density PE film materials, it returns a lower base strength value. This ensures that the physical basis of the sorting conforms to the density characteristics of the material itself.
[0174] After obtaining the base strength value, the jet correction weight (W) for the specific material particle is calculated based on the geometric properties. corr This step aims to dynamically compensate for the base values.
[0175] Geometric features: Geometric features mainly include aspect ratio and elongation.
[0176] When the material's aspect ratio is detected to be in the range of 2.0-8.0 and it exhibits a clear directionality (high elongation), it is identified as a film-type material. Considering that films have a large wind-exposed area and are prone to floating, the correction weight may be set to limit the airflow to prevent turbulence from causing uncontrollable sorting paths.
[0177] When the aspect ratio of the material is detected to be in the range of 1.0-2.5 and there is no obvious directionality, it is identified as a bottle-like material. Considering the mass concentration of the bottle-like material, the correction weight is set to enhance the airflow rate to ensure sufficient momentum transfer.
[0178] A weighted algorithm is used to generate a dimensionless correction coefficient based on the projected area and contour complexity of the material on the conveyor belt. For example, for large-volume plastics with a projected area exceeding the standard threshold, a weighting coefficient > 1.0 means that the jetting volume needs to be increased.
[0179] Based on the basic jet intensity value (I) base ) and jet correction weight (W corr It performs associated storage and computation to construct an association model for the particles to be sorted.
[0180] This correlation model is not a single numerical value, but a set of control parameters containing execution logic. Its core operational logic can be expressed as:
[0181]
[0182] Among them, I final The target strength is ultimately used to control the opening degree of the air valve.
[0183] The calculation results are combined with the object contour information (X1-X4 coordinates) and the projected vent matrix obtained by the convolution algorithm to form a complete control strategy package.
[0184] This embodiment of the method changes the traditional sorting equipment's reliance on material or location for single-factor control. By introducing geometric correction weights, it can automatically fine-tune the jetting intensity for large-volume or specially shaped plastics (such as films), avoiding energy waste and turbulence interference caused by excessive air usage, as well as sorting failures caused by insufficient air usage, significantly improving sorting accuracy. By distinguishing between films (high aspect ratio) and bottle flakes (low aspect ratio) and applying different jetting strategies, it can not only differentiate materials but also adapt to materials with different physical forms, overcoming the limited particle size classification capabilities of existing technologies. By using a database of specified sorting strategies to store basic values and calculate correction values in real time, when dealing with new types or unknown batches of plastics, only the database basic parameters need to be updated or the geometric weight algorithm fine-tuned, without reconstructing the entire control system. This reduces maintenance costs and improves adaptability to complex operating conditions.
[0185] In one embodiment of this application, the jetting device parameters include one-dimensional coordinate axes of the jetting device arrangement direction. The pixel-level contour set of the object is extracted from image model data and mapped to the corresponding jetting device parameters to obtain the target vent matrix, which includes:
[0186] The region of interest is obtained by locating the vertex coordinates of an object in the image model data using a specified convolution algorithm.
[0187] Perform grayscale conversion, binarization, and edge detection algorithms on the region of interest to obtain a set of pixel-level contours of the object;
[0188] The pixel-level contour set is mapped onto a one-dimensional coordinate axis corresponding to the arrangement direction of the jet equipment, the coordinate interval covered by the contour is identified, and a target vent matrix composed of valve index numbers is generated.
[0189] In the embodiments of this application, a convolution algorithm is used to locate the vertex coordinates of an object in image model data. The convolutional localization involves using a convolution algorithm with a specific kernel size to scan the image for features, identifying the boundary features between the background (belt) and the foreground (material). Based on the feature map output by the convolution, the coordinates of the four vertices enclosing the bounding rectangle of the material are calculated and extracted, denoted as X1, X2, X3, and X4. These four coordinate points define the minimum bounding box of the material in the image coordinate system.
[0190] Based on the coordinates of these four vertices, a rectangular region containing the material is cropped from the entire image frame and defined as the region of interest (ROI). The purpose of the ROI is to narrow down the processing range of subsequent high-performance algorithms, eliminate background interference, and improve computational efficiency.
[0191] After acquiring the region of interest (ROI), a series of image processing algorithms are executed within that region to obtain the precise morphology of the material. Specifically: the color or multi-channel data of the ROI is converted into a single-channel grayscale image to reduce data dimensionality. An adaptive threshold is set to convert the grayscale image into a black-and-white binary image (e.g., material area as 1, background as 0) to achieve foreground separation. Morphological operations (such as dilation or closure operations) are performed to address any noise or tiny holes that may appear inside the object after binarization. The fracture texture inside the object is filled, confirming it as a connected component to prevent discontinuous jetting commands due to surface reflections or dirt.
[0192] By applying curve-finding algorithms (such as the Canny operator or the findContours function), the boundaries of regions with a pixel value of 1 in the binary image are traced, generating a set of pixel-level contours. The set of pixel-level contours consists of a series of closely spaced coordinate points (x, y, y). i y i The composition describes the edge direction of the material.
[0193] The pixel-level contour set is projected onto a one-dimensional coordinate axis corresponding to the physical arrangement direction of the jet equipment. This one-dimensional coordinate axis represents the physical distribution of the jet valve array along the belt width direction. Let the resolution of the valve array be R (valve / mm), and the starting position of the jet equipment be the origin.
[0194] Traverse the pixel-level contour set to find the coverage area of the material perpendicular to the belt running direction (i.e., the direction of the jet valve arrangement) [Y]. min Y max The following formula is used to determine the range of gas valve indexes that need to be activated:
[0195]
[0196]
[0197] Among them, K scale This is the conversion scaling factor from the image pixel coordinate system to the valve physical coordinate system.
[0198] Based on the aforementioned interval, a target vent matrix composed of valve index numbers is generated. For example, if the calculated coverage interval corresponds to valve numbers 10 to 15, then the target vent matrix is {10,11,12,13,14,15}. This target vent matrix indicates which valves are facing the material entity, achieving complete coverage of the material width.
[0199] Unlike existing technologies that only apply air jets at a single point or with a fixed width based on the material's centroid, the method in this embodiment extracts pixel-level contours and maps them to one-dimensional valve coordinates, generating an air hole matrix that perfectly matches the actual shape of the material. Regardless of whether the material is elongated, circular, or irregularly shaped, the jetting range precisely conforms to the material's contour. Furthermore, by precisely defining the coordinate range covered by the contour, it avoids opening valves that are not aligned with the material (preventing waste of high-pressure gas and disruption of adjacent materials), while ensuring that valves aligned with the material's edge are correctly activated (preventing edge leakage leading to sorting failure). This significantly reduces energy consumption while maintaining sorting purity.
[0200] In one embodiment of this application, the jet equipment parameters include the installation distance of the air valve. Based on the jet equipment parameters, the correlation model, the target air orifice matrix, and the delivery speed, the air valve control command of the jet equipment is determined as follows:
[0201] Traverse each valve index number in the target vent matrix and obtain the target opening duration of each valve based on the base jet intensity value and jet correction weight in the correlation model.
[0202] The opening trigger timestamp of each air valve is calculated based on the conveying speed and the installation distance of the air valve, and the opening trigger timestamp of each air valve is generated.
[0203] Based on the opening trigger timestamp of each valve, the valve index number, and the target opening duration, the valve control command of the jet equipment is determined.
[0204] In this embodiment, each valid valve index (i.e., those valves covered by the material outline) in the target vent matrix is traversed. For each specific valve, its target opening duration T is calculated based on the parameters in the association model. duration .
[0205] Based on the material-shape-jet volume correlation model, obtain the basic jet intensity value I corresponding to this material. base And jet correction weight W corr Although the physical time of material passing through the jet nozzle mainly depends on its length and the conveyor belt speed, to ensure that large-volume or high-density materials (such as solid bottle caps and large pieces of PET) are completely blown away, the physical time is dynamically modulated using a base jet intensity value and a jet correction weight. The formula for calculating the target opening time can be expressed as:
[0206]
[0207] Where: L pixel R is the pixel length of the material in the conveying direction. res V represents the actual physical size resolution of the pixel (mm / pixel); belt is the current conveying speed; k is the gain coefficient. (I) base ×W corr) This demonstrates the role of the correlation model: for materials that are difficult to blow, the correlation model will output a higher correction value, thereby extending the valve opening time and increasing the total air momentum acting on the material; conversely, for lightweight materials such as films, it will maintain the base time to prevent overblowing.
[0208] Among them, the installation distance D of the air valve install : This refers to the physical distance (unit: mm) between the data acquisition centerline of the hyperspectral imager and the execution centerline of the jet device. This value is a fixed equipment parameter.
[0209] Conveying speed V belt : Belt running speed fed back in real time by the encoder (unit: mm / ms).
[0210] Delay T lag Total latency, including image processing, data transmission, and mechanical valve response.
[0211] Timestamp calculation: based on image acquisition time T capture Based on this, calculate the estimated time when the material will arrive at the jet position, i.e., the activation trigger timestamp T. trigger :
[0212]
[0213] The absolute timing of the valve's action can be determined using the above-mentioned trigger timestamp formula. If the belt speed fluctuates, V belt The change will directly correct T trigger This ensures that the jetting action and the material position are strictly aligned on the time axis.
[0214] The calculated discrete data is integrated into a standardized execution instruction package. The valve index number (ID), the opening trigger timestamp, and the target opening duration are matched one-to-one to generate the valve control instructions for the jet equipment.
[0215] This embodiment's method dynamically adjusts the target opening duration by utilizing a base jet intensity value and a correction weight, breaking the limitation of traditional equipment that only sprays air based on object length. For large-mass or large-volume plastics, the jetting time is automatically extended to provide a greater separation impulse, effectively solving the sorting failure problem caused by insufficient gas usage for large-volume plastics, while avoiding over-jetting of lightweight materials. A timestamp calculation mechanism based on real-time conveyor speed and installation distance is introduced, achieving dynamic compensation capabilities. Even if the belt runs unstable or its speed changes, the trigger time can be corrected in real time to ensure the airflow accurately hits the center of the material, significantly improving the accuracy of the sorting landing point. Furthermore, by traversing the target air hole matrix to independently generate control commands for each air valve, multiple materials passing side-by-side can be processed simultaneously, and each material (even different parts of the same material) can obtain differentiated jetting control parameters, truly achieving fine grading at the particle size level.
[0216] In one embodiment of this application, spectral feature analysis is performed on hyperspectral data to extract material characteristic absorption peaks and calculate spectral similarity to determine the material type of the plastic, including:
[0217] The hyperspectral data is smoothed and differentiated to generate derivative spectral curves, and the characteristic peak values corresponding to the preset wavelengths are extracted from the derivative spectral curves.
[0218] The similarity coefficient between the derivative spectral curve and each standard curve in the standard material spectral library is calculated using a spectral angle plotting algorithm or an Euclidean distance algorithm, and the similarity coefficient is obtained.
[0219] The current dynamic classification threshold is determined based on the inverse correlation mapping function between the conveying speed and the preset speed threshold.
[0220] The similarity coefficient is compared with the dynamic classification threshold. If the similarity coefficient is greater than or equal to the dynamic classification threshold, the standard material type corresponding to the similarity coefficient is taken as the material type of the plastic.
[0221] In this embodiment, hyperspectral data acquired by a hyperspectral imager and after basic correction is used. To eliminate baseline drift and background noise caused by fluctuations in light source intensity, scattering from particle surfaces, or uneven thickness, smoothing and differentiation operations are performed on the hyperspectral data.
[0222] The Savitzky-Golay (SG) filtering algorithm is employed to simultaneously achieve smoothing and differentiation. This algorithm calculates the first or second derivative of the spectrum by performing polynomial least-squares fitting on data points within a moving window. The mathematical expression of the derivative operation aims to highlight the rate of change of the spectrum. The processed derivative spectrum curve, with its peaks and troughs corresponding to the inflection points of the original spectrum, can more sensitively reflect the chemical bond absorption characteristics of the material molecules. Feature values are extracted from the derivative spectrum curve for preset key wavelengths. For PET material, the CH bond overtone absorption peak near 1720 nm is extracted; for PP material, the feature peak near 1210 nm is extracted. The extracted feature peak values constitute the feature vector for subsequent comparison.
[0223] The extracted derivative spectral curve (or feature vector) of the object under test is compared with a pre-set standard material spectral library. The standard material spectral library stores standard derivative spectral data for various pure plastic materials.
[0224] The similarity between the two is quantified using spectral angle mapping or Euclidean distance algorithms to obtain the similarity score (S).
[0225] Treating spectral data as vectors in an N-dimensional space, the method involves calculating the spectral vector to be measured. Compared with the standard reference spectral vector The similarity is determined by the angle θ between them.
[0226]
[0227] Among them, t i and r i These are the values of the spectrum to be measured and the reference spectrum in the i-th band, respectively. The smaller the included angle θ (or the closer cosθ is to 1), the more similar the spectral shapes of the two spectra are, meaning they are more likely to be made of the same material. Here, the similarity coefficient S can be defined as cosθ or 1-θ (after normalization).
[0228] In this embodiment, the advantage of using the spectral angle mapping algorithm is that it is not sensitive to light intensity and only focuses on the shape of the spectral curve, making it very suitable for industrial environments where lighting may fluctuate.
[0229] In traditional techniques, classification thresholds are usually fixed. However, on high-speed conveyor belts, the movement of materials can cause subtle image blurring or spectral mixing, resulting in an overall low calculated similarity coefficient S. Insisting on using a high threshold would lead to a large number of missed detections.
[0230] In this embodiment, an inverse correlation mapping function is introduced, based on the real-time conveying speed V. belt The judgment criteria are dynamically adjusted to determine the current dynamic classification threshold T. dyn The higher the transmission speed, the lower the relative image quality, and the similarity requirement (threshold) should be appropriately reduced to ensure the recognition rate; conversely, at lower speeds, the image is clearer, and the threshold should be increased to ensure purity. The mapping function relationship can be expressed as:
[0231]
[0232] Alternatively, a piecewise function can be used:
[0233]
[0234] Wherein: T base λ is the standard threshold at the reference speed; λ is the sensitivity coefficient, used to control the magnitude of the threshold decrease with speed; V belt For real-time belt speed; T dyn This is the current dynamic classification threshold.
[0235] Based on the similarity coefficient (S) and the determined dynamic classification threshold (T) dyn Compare them.
[0236]
[0237] If the similarity coefficient is greater than or equal to the dynamic classification threshold, it is determined that the spectral features of the object to be tested are successfully matched with a certain type of material in the standard library. The standard material type (such as PET bottle flakes) is marked as the final material type of the plastic particle and passed to the subsequent control unit.
[0238] In the embodiments of this application, by smoothing and differential operations (derivative method), baseline drift interference caused by surface dirt, uneven thickness, or uneven illumination of plastic particles is effectively eliminated. This allows for the capture of weak but crucial chemical bond absorption peaks (such as the 1720nm peak of PET), fundamentally distinguishing plastics with similar appearances but different materials (such as PVC and PE). Furthermore, by utilizing the Spectral Angle Mapping (SAM) algorithm, which focuses on the direction of spectral vectors rather than their magnitude, combined with derivative processing, the identification results are no longer limited by changes in the absolute value of particle size or illumination intensity, ensuring consistency in the identification of plastic fragments of different shapes.
[0239] In one embodiment of this application, morphological analysis of image model data is performed, and the shape analysis results are verified by multimodal matching with the spatial distribution of hyperspectral data to determine geometric properties, including:
[0240] Connectivity analysis is performed on the image model data to obtain the pixel connected regions of the target object;
[0241] Construct the minimum bounding rectangle for the pixel connected regions to obtain the number of pixels along the major axis and the number of pixels along the minor axis;
[0242] The ratio of the number of pixels on the major axis to the number of pixels on the minor axis is calculated to obtain the aspect ratio feature value;
[0243] The fill rate feature value is obtained by calculating the ratio of the area of the pixel connected region to the area of the minimum bounding rectangle.
[0244] The aspect ratio feature value and the fill rate feature value are input into the morphology classification rule library for comparison.
[0245] When the aspect ratio feature value falls within the first preset range and the fill rate feature value is less than the preset threshold, the geometric properties characterizing the thin film type are generated.
[0246] When the aspect ratio feature value falls within the second preset range and the fill rate feature value is greater than the preset threshold, geometric attributes characterizing the bottle-shaped pieces are generated.
[0247] By establishing a pixel-level spatial mapping relationship between hyperspectral data and image model data through coordinate transformation;
[0248] Based on pixel-level spatial mapping relationships, the effective spectral response region of the same object in hyperspectral data is determined.
[0249] The geometric centroid coordinates are obtained by calculating the connected regions of pixels in the image model data.
[0250] The effective spectral response region in the hyperspectral data is calculated to obtain the coordinates of the spectral centroid.
[0251] The Euclidean distance is obtained by calculating the geometric centroid coordinates and the coordinates of the two centroids.
[0252] Determine whether the Euclidean distance is less than a preset spatial deviation threshold;
[0253] If the Euclidean distance is not less than the preset spatial deviation threshold, the currently identified object is determined to be an optical ghost or noise, and the generation of geometric properties for the plastic is stopped.
[0254] In the embodiments of this application, the image model data is traversed, and adjacent (4-neighborhood or 8-neighborhood) pixels with the same characteristics (such as foreground binary) are marked as the same set to obtain the pixel connected region of the target object. This region represents the physical coverage area of the material on the conveyor belt.
[0255] For each connected region of a pixel, the smallest rectangle that can completely contain the region is constructed using the Rotating Calipers method or other geometric algorithms. This is the Minimum Enclosing Rectangle (MER).
[0256] Based on the minimum bounding rectangle MER, the number of pixels L along the major axis is extracted. major With the number of pixels on the short axis L minor .
[0257] To digitally describe the shape of a material, it is necessary to calculate the aspect ratio characteristic value R. aspect (Characterizing the elongation or thinness of an object) and fill rate characteristic value (R) fill (Also known as solidity, which characterizes the compactness or wrinkleness of an object) Two key dimensionless characteristic values, the specific calculation formulas are as follows:
[0258]
[0259]
[0260] Among them, Area blob Area represents the actual total number of pixels in the connected region. rect It represents the area of the smallest bounding rectangle.
[0261] The aspect ratio and fill rate feature values are input into a preset morphology classification rule library for comparison to distinguish the aerodynamic characteristics of materials.
[0262] Thin film classification: when R aspect It falls within the first preset range (usually a higher value, such as 2.0-8.0), and R fill If the value is less than a preset threshold (indicating that the object is thin and has an irregular outline with gaps, such as a wrinkled plastic wrap), then geometric properties representing the film type are generated.
[0263] Bottle / Flake Classification: When R aspect It falls within the second preset range (usually a lower value, such as 1.0-2.5), and R fill When the value exceeds a preset threshold (indicating that the object has a square and full shape, such as broken bottle fragments), geometric attributes representing the bottle fragment class are generated. This attribute directly determines the selection of jet correction weights in the subsequent association model.
[0264] Due to the difference in physical installation locations between the hyperspectral camera and the visual camera, a correspondence needs to be established between them, i.e., coordinate unification is required. Based on the current conveyor belt speed and the physical distance between the two cameras, a coordinate transformation matrix is applied to map the coordinate system of the visual image to the coordinate system of the hyperspectral data, establishing a pixel-level spatial mapping relationship between the hyperspectral data and the image model data. Based on this pixel-level spatial mapping relationship, the region corresponding to the pixel-connected region in the visual image is delineated within the hyperspectral data cube, and this region is determined as the effective spectral response region. This ensures that the identified shape and the detected material belong to the same object.
[0265] To prevent false triggering caused by belt vibration, liquid reflection, or shadows, a spatial consistency check is performed.
[0266] Calculate the first moment of the pixel connected regions in the image model data to obtain the visual center coordinates (x, y). v y v ), that is, the geometric centroid C geo .
[0267] The chemical composition response intensities within the effective spectral response region of the hyperspectral data are weighted and calculated to obtain the center coordinates (x, y) of the material distribution. s y s ), that is, the spectral centroid C spec .
[0268] The Euclidean distance D is obtained by calculating the geometric centroid coordinates and the coordinates of the two centroids. The specific formula is as follows:
[0269]
[0270] Determine if the Euclidean distance D is less than a preset spatial deviation threshold (e.g., 5-10 pixels). If the Euclidean distance D is less than the preset spatial deviation threshold, it means that the appearance position of the object coincides with the position of the chemical composition, confirming that it is a real plastic particle.
[0271] If the Euclidean distance is not less than a preset spatial deviation threshold, the currently identified object is determined to be either an optical ghost (such as a shadow with only shape and no spectral signal) or noise (such as sensor noise with only spectral signal but no entity). At this point, the generation of geometric properties for the plastic is stopped, that is, the target is directly discarded and no jet command is generated.
[0272] In this embodiment, by combining aspect ratio and fill rate, the method can accurately distinguish between films and bottle flakes with vastly different physical properties. This solves the problem that traditional technologies cannot differentiate between elongated films and bulky bottle flakes based solely on area size, effectively preventing films from being blown away and bottle flakes from being immobilized. Furthermore, through pixel-level spatial mapping and consistency judgment, a one-to-one correspondence between hyperspectral data and visual data is ensured, preventing the misalignment of material from object A onto the shape of object B during high-speed flow, thus improving the accuracy of the jetting equipment's output commands.
[0273] In one embodiment of this application, it further includes:
[0274] Principal component analysis was performed on the hyperspectral data to obtain principal component features;
[0275] The principal component features are input into a pre-trained random forest classification model to obtain classification results that characterize whether materials are stacked.
[0276] In the embodiments of this application, hyperspectral data has a three-dimensional characteristic of combining image and spectrum (i.e., two-dimensional spatial coordinates x, y and spectral band dimension λ), resulting in an extremely large data volume and high redundancy between bands. In order to extract key information characterizing the mixed state of the material of an object from the massive data, principal component analysis (PCA) should be performed on the cube of the collected hyperspectral data.
[0277] The cube (H×W×N, where NN is the number of bands) of the three-dimensional hyperspectral data is unfolded in space to form a two-dimensional matrix X. To eliminate the influence of different intensity dimensions of different bands, the data is standardized (e.g., by SNV or mean centering).
[0278] The core purpose of projecting high-dimensional spectral data into a low-dimensional space through linear transformation is to find the direction with the largest data variance (principal component direction), because the larger the variance, the more information (material difference characteristics) it contains. This transformation process can be expressed by the following formula:
[0279]
[0280] Where: X is the original high-dimensional spectral data matrix; W is the transformation matrix, which is composed of the eigenvectors of the data covariance matrix; and Y is the principal component feature matrix obtained after dimensionality reduction.
[0281] Instead of retaining all transformed components, the top k principal components (e.g., the first 3-5 components) are truncated, and these components typically contribute more than 95% cumulatively. These principal component features (Y) highly condense the mixed characteristics of the spectrum. For example, when PET is stacked on top of PVC, its spectral curve is no longer a feature of a single material, but rather a specific vector composite in the principal component space, and this composite feature is preserved in Y.
[0282] After obtaining the denoised and highly concentrated principal component features, a pre-trained random forest classification model is used to determine the spatial state of the materials. The principal component feature vector of each pixel or object region is input as an input variable into the random forest classification model. The random forest classification model contains multiple independent decision trees. Each decision tree independently distinguishes the input features as either single-layer or stacked materials based on the rules learned during training (i.e., the distribution boundaries of stacked materials and single-layer materials in the principal component space).
[0283] Characteristics of single-layer materials: They typically exhibit pure spectral characteristics, with principal component values falling near specific cluster centers;
[0284] Stacked material characteristics: They exhibit spectral mixing, with principal component values deviating from the cluster center of a single material, and are located in transitional or specific anomalous regions.
[0285] The random forest classification model aggregates the outputs of all decision trees and generates the final classification result using either "majority voting" or "probability averaging".
[0286] If the classification result is marked as stacked, the coordinates of the area and sorting suggestions will be output. You can choose not to spray air to avoid missorting, or increase the amount of air spray to blow it away at the same time.
[0287] If the classification result is marked as non-stacked, the regular material classification process continues.
[0288] Traditional techniques often rely solely on single spectral features for matching. When materials are stacked, the mixed spectra can easily lead to identification as unknown or misclassification. The method in this embodiment utilizes PCA to extract deep statistical features that reflect the mixed state, and combines this with the powerful nonlinear classification capabilities of random forests to effectively identify stacked areas. This prevents different materials stacked together from being mistakenly placed in the same silo, significantly improving the purity of the final product.
[0289] Secondly, embodiments of this application provide a plastic packaging sorting system, including:
[0290] The first acquisition module is used to acquire jet equipment parameters, hyperspectral data, image model data and conveying speed. The hyperspectral data is the spectral data of the plastic package being conveyed on the belt at the conveying speed, which is collected by a hyperspectral imager. The image model data is the image data of the plastic package being conveyed on the belt at the conveying speed, which is collected by a hyperspectral imager.
[0291] The first determination module is used to perform spectral feature analysis on hyperspectral data, extract material characteristic absorption peaks and calculate spectral similarity to determine the material type of plastic.
[0292] The second determination module is used to perform morphological analysis on the image model data and perform multimodal matching verification between the shape analysis results and the spatial distribution of hyperspectral data to determine geometric properties;
[0293] The first generation module is used to generate an associated model based on a specified sorting strategy database, material type, and geometric properties. The specified sorting strategy database is used to store the mapping relationship between material type and the basic jet intensity value of the jet equipment.
[0294] The first module is used to extract the pixel-level contour set of the object based on the image model data and map it to the corresponding jet equipment parameters to obtain the target vent matrix.
[0295] The third determining module is used to determine the air valve control commands of the jet equipment based on the jet equipment parameters, the associated model, the target air hole matrix, and the delivery speed.
[0296] In this embodiment, the plastic packaging sorting system includes: acquiring data such as jetting equipment parameters, hyperspectral data, image model data, and conveying speed; determining the plastic material type by performing spectral feature analysis on the hyperspectral data; analyzing and verifying the geometric properties of the image model data; obtaining a correlation model based on a specified sorting strategy database, material type, and geometric properties; extracting the pixel-level contour set of the object according to the image model data and mapping it to the corresponding jetting equipment parameters to obtain the target pore matrix; and finally determining the air valve control command of the jetting equipment using the jetting equipment parameters, the correlation model, the target pore matrix, and the conveying speed. This embodiment's plastic packaging sorting method, through the dual combination of hyperspectral data and image model data, overcomes the limitation of single-vision technology in distinguishing heterogeneous plastics of the same color (such as transparent PET and PVC). Simultaneously, by combining material type with geometric properties to calculate the air volume, the problem of over-blowing or under-blowing of large-volume plastics is solved. This achieves more precise air volume control of the air jetting equipment to separate products based on weight differences. It effectively solves the problem that existing plastic packaging sorting technologies, such as weight sorting and visual sorting, are unable to accurately distinguish the type of plastic material, resulting in poor sorting performance. This effectively improves recognition efficiency and accuracy.
[0297] In one embodiment of this application, generating an association model based on a specified sorting strategy database, material type, and geometric properties includes:
[0298] The basic jetting intensity value is obtained by retrieving the material type from the database based on the specified sorting strategy.
[0299] Determine the jet correction weights based on geometric characteristics;
[0300] The basic jet intensity value is associated with the jet correction weight and stored to generate an associated model.
[0301] In one embodiment of this application, the jetting device parameters include one-dimensional coordinate axes of the jetting device arrangement direction. The pixel-level contour set of the object is extracted from image model data and mapped to the corresponding jetting device parameters to obtain the target vent matrix, which includes:
[0302] The region of interest is obtained by locating the vertex coordinates of an object in the image model data using a specified convolution algorithm.
[0303] Perform grayscale conversion, binarization, and edge detection algorithms on the region of interest to obtain a set of pixel-level contours of the object;
[0304] The pixel-level contour set is mapped onto a one-dimensional coordinate axis corresponding to the arrangement direction of the jet equipment, the coordinate interval covered by the contour is identified, and a target vent matrix composed of valve index numbers is generated.
[0305] In one embodiment of this application, the jet equipment parameters include the installation distance of the air valve. Based on the jet equipment parameters, the correlation model, the target air orifice matrix, and the delivery speed, the air valve control command of the jet equipment is determined as follows:
[0306] Traverse each valve index number in the target vent matrix and obtain the target opening duration of each valve based on the base jet intensity value and jet correction weight in the correlation model.
[0307] The opening trigger timestamp of each air valve is calculated based on the conveying speed and the installation distance of the air valve, and the opening trigger timestamp of each air valve is generated.
[0308] Based on the opening trigger timestamp of each valve, the valve index number, and the target opening duration, the valve control command of the jet equipment is determined.
[0309] In one embodiment of this application, spectral feature analysis is performed on hyperspectral data to extract material characteristic absorption peaks and calculate spectral similarity to determine the material type of the plastic, including:
[0310] The hyperspectral data is smoothed and differentiated to generate derivative spectral curves, and the characteristic peak values corresponding to the preset wavelengths are extracted from the derivative spectral curves.
[0311] The similarity coefficient between the derivative spectral curve and each standard curve in the standard material spectral library is calculated using a spectral angle plotting algorithm or an Euclidean distance algorithm, and the similarity coefficient is obtained.
[0312] The current dynamic classification threshold is determined based on the inverse correlation mapping function between the conveying speed and the preset speed threshold.
[0313] The similarity coefficient is compared with the dynamic classification threshold. If the similarity coefficient is greater than or equal to the dynamic classification threshold, the standard material type corresponding to the similarity coefficient is taken as the material type of the plastic.
[0314] In one embodiment of this application, morphological analysis of image model data is performed, and the shape analysis results are verified by multimodal matching with the spatial distribution of hyperspectral data to determine geometric properties, including:
[0315] Connectivity analysis is performed on the image model data to obtain the pixel connected regions of the target object;
[0316] Construct the minimum bounding rectangle for the pixel connected regions to obtain the number of pixels along the major axis and the number of pixels along the minor axis;
[0317] The ratio of the number of pixels on the major axis to the number of pixels on the minor axis is calculated to obtain the aspect ratio feature value;
[0318] The fill rate feature value is obtained by calculating the ratio of the area of the pixel connected region to the area of the minimum bounding rectangle.
[0319] The aspect ratio feature value and the fill rate feature value are input into the morphology classification rule library for comparison.
[0320] When the aspect ratio feature value falls within the first preset range and the fill rate feature value is less than the preset threshold, the geometric properties characterizing the thin film type are generated.
[0321] When the aspect ratio feature value falls within the second preset range and the fill rate feature value is greater than the preset threshold, geometric attributes characterizing the bottle-shaped pieces are generated.
[0322] By establishing a pixel-level spatial mapping relationship between hyperspectral data and image model data through coordinate transformation;
[0323] Based on pixel-level spatial mapping relationships, the effective spectral response region of the same object in hyperspectral data is determined.
[0324] The geometric centroid coordinates are obtained by calculating the connected regions of pixels in the image model data.
[0325] The effective spectral response region in the hyperspectral data is calculated to obtain the coordinates of the spectral centroid.
[0326] The Euclidean distance is obtained by calculating the geometric centroid coordinates and the coordinates of the two centroids.
[0327] Determine whether the Euclidean distance is less than a preset spatial deviation threshold;
[0328] If the Euclidean distance is not less than the preset spatial deviation threshold, the currently identified object is determined to be an optical ghost or noise, and the generation of geometric properties for the plastic is stopped.
[0329] In one embodiment of this application, it further includes:
[0330] Principal component analysis was performed on the hyperspectral data to obtain principal component features;
[0331] The principal component features are input into a pre-trained random forest classification model to obtain classification results that characterize whether materials are stacked.
[0332] The functions of each module in each device in the embodiments of this application can be found in the corresponding descriptions in the above methods, and will not be repeated here.
[0333] Figure 2 A structural block diagram of an electronic device according to an embodiment of this application is shown. Figure 2 As shown, the electronic device includes a memory 410 and a processor 420. The memory 410 stores instructions that can be executed on the processor 420. When the processor 420 executes the instructions, it implements the plastic packaging sorting method in the above embodiments. The number of memories 410 and processors 420 can be one or more. This electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or claimed herein.
[0334] The electronic device may also include a communication interface 430 for communicating with external devices and exchanging data. The devices are interconnected using different buses and can be mounted on a common motherboard or otherwise as needed. The processor 420 can process instructions executed within the electronic device, including instructions stored in or on memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In other embodiments, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple electronic devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). The bus can be divided into address buses, data buses, control buses, etc. For ease of illustration, Figure 2 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0335] Optionally, in a specific implementation, if the memory 410, processor 420 and communication interface 430 are integrated on a single chip, the memory 410, processor 420 and communication interface 430 can communicate with each other through an internal interface.
[0336] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. General-purpose processors can be microprocessors or any conventional processor. It is worth noting that the processor can be a processor supporting Advanced Reduced Instruction Set Machines (ARM) architecture.
[0337] This application provides a computer-readable storage medium (such as the memory 410 described above) that stores computer instructions, which, when executed by a processor, implement the method provided in this application.
[0338] Optionally, memory 410 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the electronic device, etc. Furthermore, memory 410 may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory 410 may optionally include memory remotely located relative to processor 420, and these remote memories can be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0339] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.
[0340] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified.
[0341] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more (two or more) executable instructions for implementing a particular logical function or process. Furthermore, the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functionality involved.
[0342] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus or device (such as a computer-based system, a processor-included system or other system that can fetch and execute instructions from, an instruction execution system, apparatus or device).
[0343] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. All or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware, the program being stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiments.
[0344] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. This storage medium can be a read-only memory, a disk, or an optical disk, etc.
[0345] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various variations or substitutions within the technical scope disclosed in this application, and these should all be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for sorting plastic packaging, characterized in that, include: Acquire jet equipment parameters, hyperspectral data, image model data, and conveying speed. The hyperspectral data is spectral data of the plastic package being conveyed on the belt at the specified conveying speed, collected using a hyperspectral imager. The image model data is image data of the plastic package being conveyed on the belt at the specified conveying speed, collected using a hyperspectral imager. The hyperspectral data is subjected to spectral feature analysis to extract the material characteristic absorption peaks and calculate the spectral similarity to determine the material type of the plastic. Morphological analysis is performed on the image model data, and the shape analysis results are verified by multimodal matching with the spatial distribution of the hyperspectral data to determine the geometric properties; Based on the specified sorting strategy database, the material type, and the geometric properties, an association model is generated. The specified sorting strategy database is used to store the mapping relationship between the material type and the basic jet intensity value of the jet equipment. The pixel-level contour set of the object is extracted from the image model data and mapped to the corresponding jetting device parameters to obtain the target vent matrix; The air valve control command of the jet equipment is determined based on the jet equipment parameters, the correlation model, the target air hole matrix, and the delivery speed. The step of performing morphological analysis on the image model data and performing multimodal matching verification between the shape analysis results and the spatial distribution of the hyperspectral data to determine geometric properties includes: Connectivity analysis is performed on the image model data to obtain the pixel connected regions of the target object; Construct the minimum bounding rectangle for the pixel connected regions to obtain the number of pixels along the major axis and the number of pixels along the minor axis; The ratio of the number of pixels on the major axis to the number of pixels on the minor axis is calculated to obtain the aspect ratio feature value; The ratio of the area of the pixel connected region to the area of the minimum bounding rectangle is calculated to obtain the fill rate feature value; The aspect ratio feature value and the fill rate feature value are input into the morphology classification rule library for comparison; When the aspect ratio feature value falls within a first preset range and the fill rate feature value is less than a preset threshold, geometric properties characterizing the thin film type are generated. When the aspect ratio feature value falls within the second preset range and the fill rate feature value is greater than the preset threshold, geometric attributes characterizing the bottle-shaped flakes are generated. By transforming coordinates, a pixel-level spatial mapping relationship between hyperspectral data and image model data is established; Based on the pixel-level spatial mapping relationship, the effective spectral response region of the same object in the hyperspectral data is determined. The geometric centroid coordinates are obtained by calculating the connected regions of pixels in the image model data; The effective spectral response region in the hyperspectral data is calculated to obtain the spectral centroid coordinates; The Euclidean distance is obtained by calculating the geometric centroid coordinates and the spectral centroid coordinates. Determine whether the Euclidean distance is less than a preset spatial deviation threshold; If the Euclidean distance is not less than a preset spatial deviation threshold, the currently identified object is determined to be an optical ghost or noise, and the generation of geometric properties for the plastic is stopped.
2. The method according to claim 1, characterized in that, The generation of the association model based on the specified sorting strategy database, the material type, and the geometric attributes includes: The basic jet intensity value is obtained by searching the database based on the specified sorting strategy for the material type. Based on the aforementioned geometric features, determine the jet correction weights; The basic jet intensity value and the jet correction weight are associated and stored to generate the association model.
3. The method according to claim 2, characterized in that, The jetting device parameters include one-dimensional coordinate axes of the jetting device arrangement direction. The step of extracting the pixel-level contour set of the object from the image model data and mapping it to the corresponding jetting device parameters to obtain the target vent matrix includes: The region of interest is obtained by locating the vertex coordinates of the object in the image model data using a specified convolution algorithm. Perform grayscale conversion, binarization, and edge detection algorithms on the region of interest to obtain a set of pixel-level contours of the object; The pixel-level contour set is mapped onto a one-dimensional coordinate axis corresponding to the arrangement direction of the jet equipment, the coordinate interval covered by the contour is identified, and a target air hole matrix composed of air valve index numbers is generated.
4. The method according to claim 3, characterized in that, The jet equipment parameters include the installation distance of the air valve. Determining the air valve control command for the jet equipment based on the jet equipment parameters, the correlation model, the target air orifice matrix, and the delivery speed includes: Traverse each valve index number in the target vent matrix and obtain the target opening duration of each valve based on the base jet intensity value and jet correction weight in the association model. The opening trigger timestamp of each air valve is calculated based on the conveying speed and the installation distance of the air valve, and the opening trigger timestamp of each air valve is generated. Based on the opening trigger timestamp of each valve, the valve index number, and the target opening duration, the valve control command of the jet equipment is determined.
5. The method according to claim 4, characterized in that, The step of performing spectral feature analysis on the hyperspectral data, extracting material characteristic absorption peaks, calculating spectral similarity, and determining the material type of the plastic includes: The hyperspectral data is smoothed and differentiated to generate a derivative spectral curve, and the characteristic peak values corresponding to a preset wavelength are extracted from the derivative spectral curve. The similarity coefficient between the derivative spectral curve and each standard curve in the standard material spectral library is calculated using a spectral angle plotting algorithm or an Euclidean distance algorithm to obtain the similarity coefficient. Based on the conveying speed and the preset speed threshold inverse correlation mapping function, the current dynamic classification threshold is determined; The similarity coefficient is compared with the dynamic classification threshold. If the similarity coefficient is greater than or equal to the dynamic classification threshold, then the standard material type corresponding to the similarity coefficient is the material type of the plastic.
6. The method according to claim 1, characterized in that, Also includes: Principal component analysis was performed on the hyperspectral data to obtain principal component features; The principal component features are input into a pre-trained random forest classification model to obtain classification results that characterize whether materials are stacked.
7. A plastic packaging sorting system, characterized in that, include: The first acquisition module is used to acquire jet equipment parameters, hyperspectral data, image model data and conveying speed. The hyperspectral data is the spectral data of the plastic package being conveyed on the belt at the conveying speed, which is collected by a hyperspectral imager. The image model data is the image data of the plastic package being conveyed on the belt at the conveying speed, which is collected by a hyperspectral imager. The first determining module is used to perform spectral feature analysis on the hyperspectral data, extract the material feature absorption peaks and calculate the spectral similarity to determine the material type of the plastic. The second determining module is used to perform morphological analysis on the image model data and perform multimodal matching verification between the shape analysis results and the spatial distribution of the hyperspectral data to determine geometric properties; The first generation module is used to generate an association model based on a specified sorting strategy database, the material type, and the geometric properties. The specified sorting strategy database is used to store the mapping relationship between the material type and the basic jet intensity value of the jet equipment. The first obtaining module is used to extract the pixel-level contour set of the object according to the image model data and map it to the corresponding jet device parameters to obtain the target vent matrix; The third determining module is used to determine the air valve control command of the jet equipment based on the jet equipment parameters, the association model, the target air hole matrix and the delivery speed; The step of performing morphological analysis on the image model data and performing multimodal matching verification between the shape analysis results and the spatial distribution of the hyperspectral data to determine geometric properties includes: Connectivity analysis is performed on the image model data to obtain the pixel connected regions of the target object; Construct the minimum bounding rectangle for the pixel connected regions to obtain the number of pixels along the major axis and the number of pixels along the minor axis; The ratio of the number of pixels on the major axis to the number of pixels on the minor axis is calculated to obtain the aspect ratio feature value; The ratio of the area of the pixel connected region to the area of the minimum bounding rectangle is calculated to obtain the fill rate feature value; The aspect ratio feature value and the fill rate feature value are input into the morphology classification rule library for comparison; When the aspect ratio feature value falls within a first preset range and the fill rate feature value is less than a preset threshold, geometric properties characterizing the thin film type are generated. When the aspect ratio feature value falls within the second preset range and the fill rate feature value is greater than the preset threshold, geometric attributes characterizing the bottle-shaped flakes are generated. By transforming coordinates, a pixel-level spatial mapping relationship between hyperspectral data and image model data is established; Based on the pixel-level spatial mapping relationship, the effective spectral response region of the same object in the hyperspectral data is determined. The geometric centroid coordinates are obtained by calculating the connected regions of pixels in the image model data; The effective spectral response region in the hyperspectral data is calculated to obtain the spectral centroid coordinates; The Euclidean distance is obtained by calculating the geometric centroid coordinates and the spectral centroid coordinates. Determine whether the Euclidean distance is less than a preset spatial deviation threshold; If the Euclidean distance is not less than a preset spatial deviation threshold, the currently identified object is determined to be an optical ghost or noise, and the generation of geometric properties for the plastic is stopped.
8. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the method as described in any one of claims 1-6.