Plastic bottle classification and identification method, sorting machine, electronic equipment and readable storage medium

By acquiring near-infrared spectral images in multiple bands, the bottleneck area of ​​plastic bottles can be identified and located, solving the problem of interference from labels and reflected light spots, and achieving efficient and accurate classification of PET plastic bottles.

CN121589047AActive Publication Date: 2026-03-03BEIJING HONEST TECHNOLOGY CO LTD
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202411135815.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2026-03-03
Estimated Expiration
2044-08-19

AI Technical Summary

Technical Problem

Existing near-infrared plastic sorting systems are easily interfered with by factors such as labels, caps, and reflected light spots on the plastic surface when identifying PET plastic bottles, resulting in low accuracy of feature extraction and material identification, which affects sorting efficiency and accuracy.

Method used

By acquiring near-infrared spectral images in multiple different bands, the bottleneck region is identified and located. The stable characteristics of the bottleneck region are used to eliminate interference factors, and the category of plastic bottle is determined by combining gray-scale mean analysis.

Benefits of technology

It improves the accuracy of feature extraction and material identification in the plastic bottle recognition process, enhances sorting efficiency, adapts to plastic bottles of different sizes and shapes, and has high practicality and versatility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121589047A_ABST
    Figure CN121589047A_ABST
Patent Text Reader

Abstract

The invention relates to the field of near-infrared plastic sorting, in particular to a plastic bottle classification and identification method, a sorting machine, electronic equipment and a readable storage medium. The plastic bottle classification and identification method comprises the steps that a plurality of near infrared spectrum images of a to-be-detected plastic bottle are acquired, and the near infrared spectrum images at least comprise a first image and a second image which are different in wave band; determining a bottleneck region according to the first image; and based on the bottleneck regions of the plurality of near infrared spectrum images, identifying the bottleneck regions, and determining the category of the to-be-detected plastic bottle. By means of the method and device, near infrared spectrum image recognition can be conducted on the bottleneck areas of the plastic bottles, the bottleneck areas can be accurately positioned, interference factors such as non-PET materials and reflection flares can be effectively eliminated, the accuracy of feature extraction and material recognition in the plastic bottle recognition process is improved, the sorting efficiency and accuracy of the plastic bottles can be improved, and the sorting efficiency and accuracy of the plastic bottles can be improved. And the device can adapt to various to-be-detected plastic bottles with different sizes and shapes, and has relatively high practicability and universality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of near-infrared plastic sorting, specifically to a method for classifying and identifying plastic bottles, a sorting machine, electronic equipment, and a readable storage medium. Background Technology

[0002] Near-infrared plastic sorting systems typically utilize near-infrared optics technology, employing near-infrared spectral acquisition in key wavelengths to image plastic products. The core objective of this system is to accurately identify and sort polyethylene terephthalate (PET) bottles from a variety of plastic materials. However, in practical applications, factors such as labels, caps, and reflected light spots on the plastic surface can interfere with accurate image recognition, especially when selecting key areas for feature extraction. This can easily lead to low accuracy in feature extraction and material identification, resulting in low sorting efficiency and accuracy. Summary of the Invention

[0003] To overcome the problems existing in related technologies, an exemplary embodiment of this disclosure provides a method for classifying and identifying plastic bottles, comprising: acquiring multiple near-infrared spectral images of a plastic bottle to be tested, wherein the multiple near-infrared spectral images include at least a first image and a second image with different wavelengths; determining a bottleneck region based on the first image; and identifying the bottleneck region based on the bottleneck region of the multiple near-infrared spectral images to determine the category of the plastic bottle to be tested.

[0004] In some embodiments, determining the bottleneck region based on the first image includes: determining a region image based on the first image, wherein the region image includes the bottleneck region and the bottle mouth region;

[0005] The bottleneck region is determined based on the region image.

[0006] In some embodiments, determining the region image based on the first image includes: determining the farthest point of the plastic bottle to be tested based on the first image; and determining the region image with the farthest point as the center.

[0007] In some embodiments, determining the farthest point of the plastic bottle to be tested based on the first image includes: determining the outline of the plastic bottle to be tested based on the first image; determining the centroid of the outline and the minimum bounding rectangle of the outline based on the outline; and determining the midpoint of the edge of the minimum bounding rectangle that is furthest from the centroid as the farthest point based on the centroid and the minimum bounding rectangle.

[0008] In some embodiments, determining the bottleneck region based on the region image includes: determining a pair of bottleneck indentations based on the region image; and determining the bottleneck region based on the pair of bottleneck indentations.

[0009] In some embodiments, determining bottleneck concave point pairs based on the region image includes: performing morphological operations on the region image using multiple sets of kernels to obtain multiple region preprocessed images; performing concave point detection on the multiple region preprocessed images to determine concave point pairs for each region preprocessed image; determining the vector angle between the vector connecting each concave point pair and the vector of the edge of the smallest bounding rectangle where the farthest point is located; and determining one bottleneck concave point pair based on each vector angle.

[0010] In some embodiments, determining the bottleneck region based on the bottleneck concave point pair includes: determining the length of the line connecting the bottleneck concave point pair as the width of the bottleneck region based on the bottleneck concave point pair.

[0011] The bottleneck region is determined based on its width.

[0012] In some embodiments, determining the bottleneck region based on its width includes: determining the height of the bottleneck region using one or more of the following distance information: determining first distance information based on the width and aspect ratio of the bottleneck region; or, cropping the region image based on the bottleneck indentation pair to determine a bottle mouth image; performing a distance transformation based on the bottle mouth image to determine a maximum point; determining the distance between the maximum point and the line connecting the maximum point and the bottleneck indentation pair as second distance information; or, determining the minimum height of the bottleneck region as third distance information; and determining the bottleneck region based on its width and height.

[0013] In some embodiments, determining the height of the bottleneck region includes: determining a minimum value as a minimum distance information based on the first distance information and the second distance information; and determining a maximum value as the height of the bottleneck region based on the minimum distance information and the third distance information.

[0014] In some embodiments, identifying the bottleneck region based on the bottleneck regions of multiple near-infrared spectral images and determining the category of the plastic bottle to be tested includes: determining the average gray value of the bottleneck region based on the bottleneck regions of the multiple near-infrared spectral images; and determining the category of the plastic bottle to be tested based on the average gray value.

[0015] In some embodiments, determining the average grayscale value of the bottleneck region based on the bottleneck regions of the plurality of near-infrared spectral images includes: excluding pixels in each bottleneck region that are higher than the grayscale threshold based on the bottleneck regions of the plurality of near-infrared spectral images; and determining the average grayscale value of the bottleneck region based on the bottleneck regions after excluding the pixels.

[0016] In some embodiments, before determining the bottleneck region based on the first image, one or more of the following steps are included: converting the first image to a grayscale image; or performing histogram equalization on the first image to obtain an enhanced image; or performing binarization on the first image to obtain a binary image; or performing morphological operations on the first image to obtain a denoised image.

[0017] Based on the same inventive concept, this disclosure also provides a plastic bottle sorting machine, comprising: a conveying module for conveying plastic bottles to be tested; a near-infrared spectral acquisition module for acquiring multiple near-infrared spectral images of the plastic bottles to be tested; an identification module for executing the plastic bottle classification and identification method as described in any of the above embodiments; and a sorting module for classifying and sorting the plastic bottles to be tested according to the identification result of the identification module.

[0018] Based on the same inventive concept, this disclosure also provides an electronic device, wherein the electronic device includes: a memory, a processor, and a data processing program stored in the memory and executable on the processor, wherein when the data processing program is executed by the processor, it implements the plastic bottle classification and identification method as described in any of the above embodiments.

[0019] Based on the same inventive concept, this disclosure also provides a computer-readable storage medium storing a program for executing the plastic bottle classification and identification method described in any of the above embodiments.

[0020] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure.

[0021] The plastic bottle classification and identification method provided in this embodiment can perform near-infrared spectral image recognition on the bottleneck area of ​​plastic bottles, accurately locate the bottleneck area, effectively eliminate interference factors such as non-PET materials and reflective flares, improve the accuracy of feature extraction and material identification in the plastic bottle identification process, improve the sorting efficiency and accuracy of plastic bottles, and can adapt to various sizes and shapes of plastic bottles to be tested, with high practicality and versatility. Attached Figure Description

[0022] The invention can be better understood by describing exemplary embodiments of the invention in conjunction with the accompanying drawings, in which:

[0023] Figure 1 This is a flowchart illustrating a method for classifying and identifying plastic bottles according to an exemplary embodiment of this disclosure;

[0024] Figure 2 A flowchart illustrating a method for classifying and identifying plastic bottles, as shown in another exemplary embodiment of this disclosure;

[0025] Figure 3 This is a flowchart illustrating a method for classifying and identifying plastic bottles, as shown in another exemplary embodiment of this disclosure.

[0026] Figure 4 A flowchart illustrating a method for classifying and identifying plastic bottles, as shown in another exemplary embodiment of this disclosure;

[0027] Figure 5 (a) A near-infrared spectral image of a plastic bottle classification and identification method shown in an exemplary embodiment of the present disclosure;

[0028] Figure 5 (b) is a schematic near-infrared spectral image of a plastic bottle classification and identification method shown in an exemplary embodiment of the present disclosure;

[0029] Figure 6 (a) A near-infrared spectral image of a method for classifying and identifying plastic bottles as shown in another exemplary embodiment of this disclosure;

[0030] Figure 6 (b) A schematic near-infrared spectral image of a method for classifying and identifying plastic bottles as shown in another exemplary embodiment of this disclosure;

[0031] Figure 7 A flowchart illustrating a method for classifying and identifying plastic bottles, as shown in another exemplary embodiment of this disclosure;

[0032] Figure 8 (a) A near-infrared spectral image of a method for classifying and identifying plastic bottles as shown in another exemplary embodiment of this disclosure;

[0033] Figure 8 (b) A schematic near-infrared spectral image of a method for classifying and identifying plastic bottles as shown in another exemplary embodiment of this disclosure;

[0034] Figure 9 A flowchart illustrating a method for classifying and identifying plastic bottles, as shown in another exemplary embodiment of this disclosure;

[0035] Figure 10 This is a flowchart illustrating a method for classifying and identifying plastic bottles, as shown in another exemplary embodiment of this disclosure.

[0036] Figure 11 This is a flowchart illustrating a method for classifying and identifying plastic bottles, as shown in another exemplary embodiment of this disclosure.

[0037] Figure 12 (a) A near-infrared spectral image of a method for classifying and identifying plastic bottles as shown in another exemplary embodiment of this disclosure;

[0038] Figure 12 (b) A schematic near-infrared spectral image of a method for classifying and identifying plastic bottles as shown in another exemplary embodiment of this disclosure;

[0039] Figure 13 This is a flowchart illustrating a method for classifying and identifying plastic bottles, as shown in another exemplary embodiment of this disclosure.

[0040] Figure 14 (a) A near-infrared spectral image of a method for classifying and identifying plastic bottles as shown in another exemplary embodiment of this disclosure;

[0041] Figure 14 (b) A schematic near-infrared spectral image of a method for classifying and identifying plastic bottles as shown in another exemplary embodiment of this disclosure;

[0042] Figure 15 This is a flowchart illustrating a method for classifying and identifying plastic bottles, as shown in another exemplary embodiment of this disclosure.

[0043] Figure 16 This is a flowchart illustrating a method for classifying and identifying plastic bottles, as shown in another exemplary embodiment of this disclosure.

[0044] Figure 17 This is a schematic diagram of a plastic bottle sorting machine structure shown in an exemplary embodiment of the present disclosure;

[0045] Figure 18 This is a schematic diagram of an electronic device structure shown in an exemplary embodiment of the present disclosure. Detailed Implementation

[0046] The following describes specific embodiments of the present invention. It should be noted that, in order to provide a concise description, this specification cannot exhaustively describe all features of the actual embodiments. It should be understood that, in the actual implementation of any embodiment, just as in any engineering or design project, various specific decisions are often made to achieve the developer's specific goals and to meet system-related or business-related constraints, and this can change from one embodiment to another. Furthermore, it is understood that although the efforts made in this development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this invention, some design, manufacturing, or production modifications based on the technical content disclosed herein are merely conventional technical means and should not be construed as insufficient content of this disclosure.

[0047] Unless otherwise defined, the technical or scientific terms used in the claims and description shall have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in the patent application description and claims of this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. The terms "an" or "a" and similar terms do not indicate a quantity limitation, but rather indicate the presence of at least one. The terms "comprising" or "including" and similar terms mean that the element or object preceding "comprising" or "including" encompasses the element or object listed following "comprising" or "including" and its equivalents, and do not exclude other elements or objects. The terms "connected" or "linked" and similar terms are not limited to physical or mechanical connections, nor are they limited to direct or indirect connections.

[0048] This disclosure provides a method for classifying and identifying plastic bottles, such as... Figure 1 As shown, this may include steps S10 to S30.

[0049] Step S10: Acquire multiple near-infrared spectral images of the plastic bottle to be tested. These multiple near-infrared spectral images include at least a first image and a second image with different wavelengths. Multiple near-infrared spectral images of different wavelengths can be acquired for the plastic bottle to be tested, including at least two first and second images of different wavelengths. The wavelength of the first image can be smaller than that of the second image, such as acquiring a first image in the 1200nm wavelength band and a second image in the 1660nm wavelength band. Alternatively, based on the multiple near-infrared spectral images of different wavelengths and the sorting requirements of the plastic bottle to be tested, the image with the most obvious characteristic peaks corresponding to the material in the near-infrared spectral images can be selected as the first image. Since a smaller wavelength corresponds to higher photon energy and weaker penetration energy in near-infrared spectral images, the smaller the wavelength, the clearer and more obvious the characteristic peaks of the acquired near-infrared spectral image. Therefore, the first image can be the image with the smallest corresponding wavelength among the acquired near-infrared spectral images.

[0050] Step S20: Determine the bottleneck region 250 based on the first image. The bottleneck region 250 can be determined based on the first image. Since the near-infrared wavelength corresponding to the first image is relatively small, the first image is clearer and contains more surface feature information of the plastic bottle to be tested; therefore, the first image is processed. For the plastic bottle to be tested, due to the material of plastic, reflected light spots easily appear in the near-infrared spectral image during the acquisition of the near-infrared spectrum, which can easily affect image recognition. Furthermore, the bottle cap and label on the bottle body can also affect image recognition, leading to low classification accuracy of the plastic bottle. In the plastic bottle to be tested, the position of the bottleneck has more stable characteristics in near-infrared spectral images of different wavelengths. Therefore, the bottleneck region 250 can be obtained based on the first image, thereby eliminating interference factors from the bottle body and bottle mouth.

[0051] Step S30: Based on the bottleneck regions 250 of multiple near-infrared spectral images, identify the bottleneck regions 250 and determine the category of the plastic bottle to be tested. The bottleneck regions 250 of multiple near-infrared spectral images can be extracted according to the bottleneck region 250 determined in the first image, and the bottleneck regions 250 of the multiple near-infrared spectral images can be identified. Alternatively, the bottleneck regions 250 of each near-infrared spectral image can be comprehensively considered, and the bottleneck regions 250 of each near-infrared spectral image can be integrated. The integrated bottleneck region 250 can then be identified to determine the category of the plastic bottle to be tested.

[0052] The plastic bottle classification and identification method of this embodiment can locate the bottleneck region 250 to identify and classify plastic bottles. By identifying and classifying the bottleneck region 250, which has high feature stability, the influence of factors such as the bottle body, cap, and reflected light spots on the identification and sorting of plastic bottles is avoided, thus improving the accuracy of plastic bottle classification and identification. Classifying and identifying plastic bottles using near-infrared spectral images of multiple different bands avoids situations where the outline of the plastic bottle to be tested is unclear or features are missing in the near-infrared spectrum. By acquiring near-infrared spectra of multiple different bands, the bottleneck region 250 of the same plastic bottle to be tested can be identified in the near-infrared spectrum under different bands, resulting in better identification accuracy and higher classification and identification efficiency.

[0053] In some embodiments, such as Figure 2 As shown, step S20, which determines the bottleneck region 250 based on the first image, may include steps S21 and S22.

[0054] Step S21: Determine a region image based on the first image, wherein the region image includes the neck region 250 and the bottle mouth region. A smaller region image can be determined based on the first image, which is smaller than the overall image of the plastic bottle to be tested. The region image may include the neck region 250 and the bottle mouth region, and may also include a portion of the bottle body region near the neck region 250. The region image can be cropped based on the first image, removing most of the bottle body region of the plastic bottle to be tested from the first image, retaining only the bottle mouth region, the neck region 250, and a portion of the bottle body region of the neck region 250.

[0055] Step S22: Based on the region image, determine the bottleneck region 250. For example... Figure 14 (a) Figure 14 As shown in (b), the bottle mouth area and part of the bottle body area in the region image can be removed based on the region image, and only the bottleneck area 250 in the region image can be retained. Alternatively, the bottleneck area 250 can be found directly in the region image, and only the bottleneck area 250 can be extracted for identification and classification in the subsequent recognition and classification process.

[0056] The method of this embodiment can extract a regional image of the plastic bottle, so that the regional image only includes the bottleneck region 250, the bottle mouth region, and a portion of the bottle body region near the bottleneck region 250. Since the near-infrared spectral image is dark, the plastic bottle to be tested is thin, resulting in incomplete feature information of the bottle body region in the image. By cropping the regional image, it is easier to locate the bottleneck region 250, and the bottle body region including the label can be removed, thereby eliminating the influence of the bottle body region of the plastic bottle to be tested on the identification and classification results, and improving the accuracy and efficiency of the identification and classification of the plastic bottle to be tested.

[0057] In some embodiments, such as Figure 3 As shown, step S21, determining the region image based on the first image, may include steps S211 and S212.

[0058] Step S211: Determine the farthest point 210 of the plastic bottle to be tested based on the first image. The farthest point 210 can be the point on the plastic bottle furthest from its center of gravity 230. Because the bottle opening is small and the body is large, the center of gravity 230 of the bottle's outline is located far from the opening and close to the bottom of the body. Therefore, as... Figure 5 As shown, the farthest point 210 can be a point located at the bottle mouth or a point close to the bottle mouth. By determining the farthest point 210 on the plastic bottle to be tested from the center of gravity 230 of the plastic bottle to be tested, the location of the bottle mouth can be determined, which facilitates the determination of the area image including the bottle mouth area and the neck area 250.

[0059] Step S212: Based on the farthest point 210, determine the region image centered on 210. The region image can be determined based on 210, ensuring it includes the complete bottle neck and bottle neck regions 250. The size of the region image can be determined based on the outline of the plastic bottle to be tested, centered on 210. The size of the region image can also be determined based on the bottle neck or body dimensions of the plastic bottle to ensure it includes the complete bottle neck and bottle neck regions 250.

[0060] The method provided in this embodiment determines the farthest point 210 by the centroid 230 of the outline of the plastic bottle to be tested, and determines the regional image with the farthest point 210 as the center. This can effectively avoid recognition errors caused by the low clarity of near-infrared spectral images. The region image where the bottleneck region 250 is located can be located by the farthest point 210, which is convenient for subsequent identification of the bottleneck region 250.

[0061] In some embodiments, such as Figure 4 As shown, step S211, based on the first image, determines the farthest point 210 of the plastic bottle to be tested, including steps S2111, S2112, and S2113.

[0062] Step S2111: Determine the outline of the plastic bottle to be tested based on the first image. This can be done by performing outline detection on the first image to determine the outline of the plastic bottle. The outline information of the plastic bottle in the first image can be obtained through methods such as edge detection or morphological gradient. However, because the plastic bottle is thin and may be affected by reflected light spots, the obtained outline may differ slightly from the actual plastic bottle.

[0063] Step S2112: Based on the contour, determine the centroid 230 of the contour and the minimum bounding rectangle 220 of the contour. For example... Figure 5 As shown in (a) and (b), the centroid 230 of the plastic bottle's outline can be determined based on its contour. Since the bottle opening is small and the body is large, the centroid 230 is located far from the opening and close to the bottom of the body. The minimum bounding rectangle 220 of the plastic bottle's outline can be determined based on the contour. Because the near-infrared spectral image is dark and the plastic bottle is thin, the outline information in the image may be incomplete. Therefore, by determining the minimum bounding rectangle 220, the position of the plastic bottle in the image can be determined. The width of the minimum bounding rectangle 220 can be the maximum width of the outline, and the length of the minimum bounding rectangle 220 can be the maximum length of the outline.

[0064] Step S2113: Based on the centroid 230 and the smallest bounding rectangle 220, the midpoint of the edge of the smallest bounding rectangle 220, which has the largest distance from the centroid 230, is determined as the farthest point 210. For example... Figure 5 As shown in (b), the midpoints of the four edges of the minimum bounding rectangle 220 can be taken respectively. The distance between the midpoint on each edge and the centroid 230 can be determined and compared. The midpoint farthest from the centroid 230 is determined as the farthest point 210. Figure 6 As shown, by determining the farthest point 210 on the plastic bottle to be tested from the center of gravity 230 of the plastic bottle, the location of the bottle mouth can be determined, which facilitates the determination of the area image including the bottle mouth area and the neck area 250.

[0065] According to the method provided in this embodiment, the position of the region image can be determined based on the centroid 230 of the outline of the plastic bottle to be tested and the minimum bounding rectangle 220 of the outline. This can avoid incomplete outline extraction due to image clarity and reflection of the plastic bottle to be tested, effectively avoid the influence of outline acquisition errors, and more accurately extract the region image including the bottleneck region 250, which is convenient for subsequent identification and classification of the bottleneck region 250.

[0066] In some embodiments, such as Figure 7 As shown, step S22, determining the bottleneck region 250 based on the region image, may include steps S221 and S222.

[0067] Step S221: Based on the region image, determine the bottleneck concave point pair 240. (e.g., ...) Figure 8As shown, based on the region image, indentations in the region image of the plastic bottle to be tested can be determined by indentation detection. Since the region image includes the bottle mouth region and the bottle neck region 250, the outline of the plastic bottle to be tested has obvious indentations in the bottle neck region 250 compared to the bottle mouth region and the bottle body region. Therefore, the pair of indentations with the deepest indentation among the detected indentations can be identified as the bottle neck indentation pair 240. The bottle neck region 250 can be located by indentation detection. By detecting the indentations in the region image of the plastic bottle to be tested, a pair of bottle neck indentations 240 can be identified. It can be assumed that the bottle neck indentation pair 240 is located within the bottle neck region 250, and the position of the bottle neck region 250 can be determined by the bottle neck indentation pair 240 and its connecting line.

[0068] Step S222: Determine the bottleneck region 250 based on the bottleneck indentation pair 240. The bottleneck region 250 can be determined based on the bottleneck indentation pair 240, which is located within the bottleneck region 250. A line can be drawn connecting the bottleneck indentation pairs 240, and the position of the bottleneck region 250 can be determined based on the position of this line. The size of the bottleneck region 250 can be determined based on the shape of the plastic bottle to be tested, and the bottleneck region 250 can be determined based on the line connecting the bottleneck indentation pairs 240 and the size of the bottleneck region 250.

[0069] The method provided in this embodiment can extract bottleneck concave point pairs 240 from the region image. Since the concave point detection is performed directly on the outline of the plastic bottle to be tested, the outline recognition of the bottle body region of the thinner plastic bottle may be incomplete, and the detected concave points may appear in the bottle body region. The method provided in this embodiment can avoid concave point recognition errors and ensure that the determined concave points are located in the bottleneck region 250, which can effectively improve the accuracy of the detection of the plastic bottle to be tested.

[0070] In some embodiments, such as Figure 9 As shown, step S221, determining the bottleneck concave point pair 240 based on the region image, may include steps S2211 to S2214.

[0071] Step S2211: Based on the region image, perform morphological operations using multiple sets of kernels to obtain multiple preprocessed region images. Morphological operations can be performed on the region image, such as closing followed by opening, which effectively eliminates noise in the region image, smooths the edges, and preserves the main structural and feature information of the plastic bottle being tested, thus obtaining a denoised preprocessed region image. Different kernels can be used to preprocess the region image, such as [5, 7, 9, 11, 13, 15]. Performing morphological operations on the same region image using different kernels will ultimately yield multiple different preprocessed region images.

[0072] Step S2212: Based on multiple preprocessed images of different regions, perform concave point detection to determine the concave point pairs in each preprocessed image of a region. Concave point detection can be performed on each preprocessed image of different regions. Multiple concave points can be obtained from each preprocessed image of a region through concave point detection. The pair of concave points with the deepest concavity in the preprocessed image of a region can be selected as the concave point pair of the current preprocessed image. Each concave point pair can be located on the contour of the plastic bottle to be tested, and the concave point pair and its connecting line are all located in the bottleneck region 250.

[0073] Step S2213: Based on each pair of concave points, determine the angle between the vector of the line connecting each pair of concave points and the vector of the edge of the smallest bounding rectangle 220 containing the farthest point 210. This can be achieved by connecting the concave point pairs in each region's preprocessed image, determining the connecting lines, and determining the edge vector of the smallest bounding rectangle 220 containing the farthest point 210. Finally, determine the angle between the vector of the line connecting the concave point pairs in each region's preprocessed image and the vector of the edge vector of the smallest bounding rectangle 220 containing the farthest point 210 in that image.

[0074] Step S2214: Determine a bottleneck concave point pair 240 based on the included angle of each vector. Multiple vector angles can be compared based on the included angle of the concave point pairs in each region's preprocessed image. The concave point pair with the smallest included angle in the preprocessed image can be determined as a bottleneck concave point pair 240. Since the farthest point 210 can be considered as the end point of the bottle neck of the plastic bottle being tested, and the edge of the smallest bounding rectangle 220 containing the farthest point 210 can be located at the end of the bottle neck, while the actual bottleneck region 250 can be parallel to the end of the bottle neck, the smaller the angle between the vector of the line connecting the concave point pairs and the edge vector of the smallest bounding rectangle 220 containing the farthest point 210 in the image, the closer the concave point pair is to the actual location of the bottleneck region 250. Therefore, the concave point pair with the smallest included angle can be determined as the bottleneck concave point pair 240.

[0075] The method in this embodiment enables morphological processing using multiple sets of different kernels. Based on each morphologically processed image, a pair of concave points is determined for each image, ultimately identifying a set of bottleneck concave point pairs 240. These pairs are more accurate and closer to the actual bottleneck region 250. By setting multiple kernels for morphological operations, it better adapts to different bottles. For example, thinner bottles require a larger kernel to accurately locate the bottleneck, while thicker bottles can be located with a smaller kernel. This maintains high robustness even in cases of poor image quality or interference. The more accurate determination of the bottleneck region 250 effectively improves the accuracy of identifying and classifying the tested plastic bottles.

[0076] In some embodiments, such as Figure 10 As shown, step S222, determining the bottleneck region 250 based on the bottleneck concave point pair 240, may include steps S2221 and S2222.

[0077] Step S2221: Based on the bottleneck concave point pair 240, determine the length of the line connecting the bottleneck concave point pair 240 as the width of the bottleneck region 250. The length of the line connecting the bottleneck concave point pair 240 can be determined as the width of the bottleneck region 250. Since both concave points in the bottleneck concave point pair 240 are located on the edge of the plastic bottle being tested, the length of the line connecting the bottleneck concave point pair 240 can be determined as the width of the bottleneck region 250.

[0078] Step S2222: Determine the bottleneck region 250 based on its width. The location of the bottleneck region 250 can be determined based on its width, and its height can be determined based on its width, thus determining its position on the plastic bottle to be tested. The height of the bottleneck region 250 can be determined based on its width and the shape information of the plastic bottle to be tested, thus determining its position in the region image and its position in the first image.

[0079] Through this embodiment, the width of the bottleneck region 250 can be determined based on the bottleneck indentation 240, and the bottleneck region 250 can be determined more accurately. It can exclude the bottle mouth and bottle body areas, determine the bottleneck region 250 of the plastic bottle to be tested, facilitate the identification and classification of the bottleneck region 250 with higher stability, eliminate the influence of other areas of the plastic bottle to be tested, and improve the identification and classification accuracy of the plastic bottle to be tested.

[0080] In some embodiments, such as Figure 11 As shown, step S2222, determining the bottleneck region 250 based on the width of the bottleneck region 250, may include: step S22221, determining the height of the bottleneck region 250 through one or more of the following distance information.

[0081] The first distance information can be determined based on the width and aspect ratio of the bottleneck region 250. The aspect ratio can be pre-set based on the shape and outline of the plastic bottle to be measured, and the first distance information can be calculated and determined based on the width and aspect ratio of the bottleneck region 250. The aspect ratio can be set to any value between 5 / 1 and 5 / 4. Setting the aspect ratio to 5 / 1 and calculating the first distance information based on the width of the bottleneck region 250 can be used as the height of the bottleneck region 250.

[0082] It is also possible to determine the bottle mouth image by cropping the region image based on the 240-point bottleneck indentation pair; to determine the maximum point based on the bottle mouth image by performing a distance transformation; and to determine the second distance information by determining the distance between the maximum point and the line connecting the 240-point bottleneck indentation pair. Furthermore, it is possible to determine the line connecting the 240-point bottleneck indentation pair and to rotate the region image, such as... Figure 12 As shown in (a), by making the line connecting the concave point of the bottle neck to 240 vertical, the image region can be cropped using this line as the boundary, retaining the bottle neck image including the bottle mouth region. The bottle neck image includes the farthest point 210. A distance transformation can be performed on the bottle neck image to determine its maxima. A maxima can be any point in the bottle neck image whose distance value obtained through the distance transformation is greater than or equal to that of all other pixels in its neighborhood, such as... Figure 12 As shown in (b), the maximum point a can be located at the plastic ring at the mouth of the plastic bottle to be tested. Based on the maximum point a, the distance between the maximum point a and the line connecting the bottleneck concave point pair 240 can be determined. This distance is then used as the second distance information, which can be directly used to determine the height of the bottleneck region 250. Since the concave point is located at the center of the width of the minimum bounding rectangle 220 of the plastic bottle's outline, when determining the second distance information as the height of the bottleneck region 250, the bottleneck concave point pair 240 needs to be located at the midpoint of the height direction of the obtained bottleneck region 250. This ensures that the obtained bottleneck region 250 is at a certain distance from the maximum point, preventing the selected bottleneck region 250 from including non-PET material at the bottle mouth.

[0083] The minimum height of the bottleneck region 250 can also be determined as the third distance information. A value can be pre-set as the minimum height of the bottleneck region 250 based on the shape and outline of the plastic bottle being tested, and this minimum height can be determined as the third distance information. Alternatively, multiple distance information, including the first, second, and third distance information, can be comprehensively evaluated, and one of these distance information can be selected as the height of the bottleneck region 250.

[0084] Step S22222: Determine the bottleneck region 250 based on its width and height. The bottleneck region 250 can be determined based on its width and the height determined by one or more of the first, second, and third distance information mentioned above. Specifically, in the bottleneck region 250, the bottleneck indentation pair 240 is located at the center of the bottleneck region 250 in the height direction, ensuring that the determined rectangular bottleneck region 250 can completely cover the outline of the plastic bottle under test at its location within the bottleneck region 250.

[0085] In some embodiments, determining the height of the bottleneck region 250 includes: determining a minimum value as the minimum distance information based on a first distance information and a second distance information; and determining a maximum value as the height of the bottleneck region 250 based on the minimum distance information and a third distance information. The minimum distance information can be determined by comparing the first and second distance information, and then compared with the third distance information (i.e., the possible minimum height of the bottleneck region 250) to determine the larger distance information as the final height of the bottleneck region 250. Since the third distance information is the possible minimum height of the bottleneck region 250, the height of the bottleneck region 250 should be greater than or equal to the third distance information. If the bottleneck region 250 is too small, insufficient data may occur during the identification and classification process, resulting in lower accuracy of the identification and classification results. Conversely, if the bottleneck region 250 is too high, it may include parts beyond the actual bottleneck of the plastic bottle being tested, such as the bottle mouth and body. Since the characteristics of the bottle mouth and body are unstable and have some error, the accuracy of the identification and sorting of the plastic bottle being tested will be reduced. Therefore, the method of this embodiment can comprehensively compare the first distance information, the second distance information, and the third distance information, eliminating the largest and smallest distance information to determine the final height of the bottleneck region 250. Making the height of the bottleneck region 250 appropriate ensures sufficient data within it, enabling accurate identification and classification of the plastic bottles under test. It also reduces the impact of influencing factors such as reflected light spots caused by the bottleneck's reflection on the identification and classification results, thereby improving the accuracy of identifying and sorting the plastic bottles under test.

[0086] In some embodiments, such as Figure 13 As shown, step S30, identifying the bottleneck region 250 based on multiple near-infrared spectral images and determining the category of the plastic bottle to be tested, may include:

[0087] Step S31: Determine the average grayscale value of the bottleneck region 250 based on the bottleneck region 250 of multiple near-infrared spectral images. For example... Figure 14 (a) Figure 14 As shown in (b), the bottleneck region 250 in multiple near-infrared spectral images of different bands can be extracted based on the bottleneck region 250 determined in the first image, the bottleneck region 250 of multiple near-infrared spectral images can be determined, and the mean value of the gray level of all bottleneck regions 250 can be determined based on the gray level image of each bottleneck region 250.

[0088] Step S32: Determine the category of the plastic bottle to be tested based on the average grayscale value. The category of the plastic bottle to be tested can be determined based on the average grayscale value of the bottleneck region 250 in different near-infrared spectral images. In some embodiments, through step S31, based on the position information of the bottleneck region 250 determined in the first image, the bottleneck region 250 of the plastic bottle to be tested corresponding to the first image in the second image is determined. The first image can be a near-infrared spectral image with a wavelength of 1200 nm, and the second image can be a near-infrared spectral image with a wavelength of 1660 nm. The grayscale images of the bottleneck region 250 in both the first and second images can be determined, and the average grayscale values ​​of the bottleneck region 250 in the first and second images can be taken. Then, according to step S32, the material of the plastic bottle to be tested is determined based on the average grayscale values ​​of the bottleneck region 250 in the 1200 nm and 1660 nm wavelength bands, thereby completing the identification and classification of the plastic to be tested. The method of this embodiment can identify and classify plastic bottles under test using bottleneck images of multiple different spectral bands, improving the accuracy of classification. Furthermore, when acquiring the bottleneck region 250, only one spectral band of the plastic bottle under test is processed. For other spectral bands of near-infrared spectral images, since the plastic bottles under test captured in each near-infrared spectral image are consistent and have the same location information, the bottleneck region 250 in each near-infrared spectral image can be determined based on the already acquired bottleneck region 250. This reduces the amount of image data processing and effectively improves the efficiency of identification and classification.

[0089] In some embodiments, such as Figure 15 As shown, step S31, determining the average grayscale value of the bottleneck region 250 based on the bottleneck regions 250 of multiple near-infrared spectral images, may include: step S311, based on a grayscale threshold, excluding pixels in each bottleneck region 250 that are higher than the grayscale threshold. A grayscale threshold can be preset according to the spectral bands of the near-infrared spectral images to exclude pixels in each bottleneck region 250 that are higher than the grayscale threshold, thereby excluding reflective portions in each bottleneck region 250 and preventing reflected light spots on the outer surface of the plastic bottle to be tested from affecting the identification and classification results. Since the brightness of near-infrared spectral images varies across different bands, different grayscale thresholds can be set for each band. In some embodiments, the first image is a near-infrared spectral image at 1200 nm, and the grayscale threshold can be set to 50. The second image is a near-infrared spectral image at 1660 nm. Since the brightness of the near-infrared spectral image at 1660 nm is lower than that at 1200 nm, a grayscale threshold of less than 50 can be set for the second image at 1660 nm. This eliminates the influence of reflected light spots and other factors in the lower-brightness second image, thereby improving the accuracy of identification and classification of the plastic bottles to be tested.

[0090] Step S312: Determine the average grayscale value of the bottleneck region 250 after excluding pixels. Multiple bottleneck regions 250 can be identified by excluding some pixels based on a grayscale threshold. The average grayscale value of these multiple bottleneck regions 250 is then taken. Based on the average grayscale value of the bottleneck regions 250 from near-infrared spectral images of multiple different wavelengths, the plastic bottle to be tested is identified and classified. By setting a grayscale threshold, the influence of reflected light spots on the surface of the plastic bottle can be eliminated, improving the accuracy of identification and classification.

[0091] In some embodiments, such as Figure 16 As shown, before determining the bottleneck region 250 based on the first image, one or more of the following steps may be included: Step S40, converting the first image into a grayscale image. Grayscale conversion transforms the first image from a multi-channel color image into a single-channel grayscale image, thereby reducing the amount of data processing required for the first image during the identification and classification process and improving the efficiency of identifying and sorting the plastic bottles to be tested.

[0092] Step S50: Perform histogram equalization on the first image to obtain an enhanced image. Histogram equalization can enhance the contrast of the first image, making the features of the plastic bottle to be tested more prominent. Since the first image is a near-infrared spectral image, its brightness is low and its brightness range is small. Histogram equalization can expand the brightness range of the image, thus enriching the details of the first image.

[0093] Step S60: Binarize the first image to obtain a binary image. Binarization can convert the first image into a black and white binary image. Binarization can be performed on the first image using global thresholding or adaptive thresholding methods, which can make the contour information of the image clearer and make the binary image easier to perform image segmentation, edge detection, etc.

[0094] Step S70: Perform morphological operations on the first image to obtain a denoised image. Morphological operations such as closing followed by opening, dilation, or erosion can be performed on the first image to fill black holes and eliminate white noise, resulting in a low-noise denoised image. This process preserves the overall shape of the plastic bottle in the first image while denoising, thus improving the image quality.

[0095] Based on the same inventive concept, this disclosure also provides a plastic bottle sorting machine, such as... Figure 17 As shown, it may include: a conveying module 310, a near-infrared spectral acquisition module 320, an identification module 330, and a sorting module 340.

[0096] The conveying module 310 is used to convey the plastic bottle to be tested. The conveying module 310 can be a conveyor belt or a chute, used to convey the plastic bottle to be tested, and can transfer the plastic bottle to be tested to the near-infrared spectroscopy acquisition module 320.

[0097] The near-infrared spectral acquisition module 320 is used to acquire multiple near-infrared spectral images of the plastic bottle to be tested. The near-infrared spectral acquisition module 320 is used to acquire near-infrared spectral images of the plastic bottle to be tested conveyed on the conveying module 310. The near-infrared spectral acquisition module 320 may include a multi-channel spectrophotometer or fiber optic array, etc., and is capable of simultaneously capturing near-infrared spectral images of the same plastic bottle to be tested in different wavelength bands.

[0098] The identification module 330 is used to execute the plastic bottle classification and identification method of any of the foregoing embodiments. The identification module 330 can identify multiple near-infrared spectral images of different bands acquired by the near-infrared spectral acquisition module 320, identify and classify each plastic bottle to be tested in the near-infrared spectral images, determine the category to which each plastic bottle to be tested belongs, and determine the material of the plastic bottle to be tested.

[0099] The sorting module 340 is used to classify and sort the plastic bottles to be tested based on the recognition results of the recognition module 330. The sorting module 340 can acquire data from the recognition module 330 and, based on the category of each plastic bottle determined by the recognition module 330, sort each bottle according to the sorting requirements. The sorting module 340 separates plastic bottles belonging to different categories, facilitating the final selection of the desired category. The plastic bottle sorting machine provided in this embodiment can transport, identify, and sort plastic bottles to be tested, improving the efficiency and accuracy of plastic bottle sorting.

[0100] Based on the same inventive concept, such as Figure 18 As shown, this disclosure also provides an electronic device, which includes: a memory, a processor, and a data processing program stored in the memory and executable on the processor. When executed by the processor, the data processing program implements the plastic bottle classification and identification method as described in any of the foregoing embodiments. Figure 18As shown, one embodiment of this disclosure provides an electronic device 400. The electronic device 400 includes a memory 410, a processor 420, and an input / output (I / O) interface 430. The memory 410 stores instructions. The processor 420 executes the plastic bottle classification and identification method of this disclosure by calling the instructions stored in the memory 410. The processor 420 is connected to both the memory 410 and the I / O interface 430, for example, via a bus system and / or other forms of connection mechanisms (not shown). The memory 410 can be used to store programs and data, including the program for the plastic bottle classification and identification method involved in this disclosure. The processor 420 executes various functional applications and data processing of the electronic device 400 by running the program stored in the memory 410.

[0101] In this embodiment of the disclosure, the processor 420 may be implemented in at least one of the following hardware forms: digital signal processor (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 420 may be one or a combination of several of the following: central processing unit (CPU) or other processing units with data processing capability and / or instruction execution capability.

[0102] Based on the same inventive concept, this disclosure also provides a computer-readable storage medium storing a program for executing the plastic bottle classification and identification method of any of the foregoing embodiments. The memory 410 in the embodiments of this disclosure may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD).

[0103] In this embodiment of the disclosure, the I / O interface 430 can be used to receive input instructions (such as numeric or character information, and to generate key signal inputs related to user settings and function control of the electronic device 400), and can also output various information (such as images or sounds) to the outside. In this embodiment of the disclosure, the I / O interface 430 may include one or more of the following: a physical keyboard, function keys (such as volume control keys, power buttons, etc.), a mouse, a joystick, a trackball, a microphone, a speaker, and a touch panel.

[0104] This application uses specific terms to describe embodiments of the application. Terms such as "an embodiment," "one embodiment," and / or "some embodiments" refer to a particular feature, structure, or characteristic associated with at least one embodiment of the application. Therefore, it should be emphasized and noted that references to "an embodiment," "one embodiment," or "an alternative embodiment" in different locations throughout this specification do not necessarily refer to the same embodiment. Furthermore, certain features, structures, or characteristics in one or more embodiments of the application can be appropriately combined.

[0105] In the context of this application, unless the context clearly indicates otherwise, the words "a," "an," "an," and / or "the" do not specifically refer to the singular and may also include the plural. Generally speaking, the terms "comprising" and "including" only indicate the inclusion of explicitly identified steps and elements, which do not constitute an exclusive list, and the method or apparatus may also include other steps or elements.

[0106] Similarly, it should be noted that, in order to simplify the description of the present application and thus aid in the understanding of one or more embodiments, the foregoing description of the embodiments of the present application sometimes combines multiple features into a single embodiment, drawing, or description thereof. However, this disclosure method does not imply that the subject matter of the present application requires more features than those mentioned in the claims. In fact, the embodiments contain fewer features than all the features of the single embodiments disclosed above.

[0107] The basic concepts have been described above. Obviously, for those skilled in the art, the above disclosure is merely illustrative and does not constitute a limitation of this application. Although not explicitly stated herein, those skilled in the art may make various modifications, improvements, and corrections to this application. Such modifications, improvements, and corrections are suggested in this application, and therefore remain within the spirit and scope of the embodiments of this application.

Claims

1. A method for classifying and identifying plastic bottles, wherein, include: Acquire multiple near-infrared spectral images of the plastic bottle to be tested, wherein the multiple near-infrared spectral images include at least a first image and a second image with different spectral bands; Based on the first image, the bottleneck region is determined; Based on the bottleneck regions of multiple near-infrared spectral images, the bottleneck regions are identified, and the category of the plastic bottle to be tested is determined.

2. The method for classifying and identifying plastic bottles according to claim 1, wherein, Determining the bottleneck region based on the first image includes: Based on the first image, a region image is determined, wherein the region image includes a bottleneck region and a bottle mouth region; The bottleneck region is determined based on the region image.

3. The method for classifying and identifying plastic bottles according to claim 2, wherein, The step of determining the region image based on the first image includes: Based on the first image, determine the farthest point of the plastic bottle to be tested; Based on the farthest point, the region image is determined with the farthest point as the center.

4. The method for classifying and identifying plastic bottles according to claim 3, wherein, Determining the farthest point of the plastic bottle to be tested based on the first image includes: Based on the first image, determine the outline of the plastic bottle to be tested; Based on the contour, determine the centroid of the contour and the minimum bounding rectangle of the contour; Based on the centroid and the minimum bounding rectangle, the midpoint of the edge of the minimum bounding rectangle that is furthest from the centroid is determined as the farthest point.

5. The method for classifying and identifying plastic bottles according to claim 3, wherein, Determining the bottleneck region based on the region image includes: Based on the region image, determine the bottleneck concave point pairs; The bottleneck region is determined based on the bottleneck concave point pair.

6. The method for classifying and identifying plastic bottles according to claim 5, wherein, Based on the region image, the bottleneck indentation pairs are determined, including: Based on the region image, morphological operations are performed using multiple sets of kernels to obtain multiple preprocessed region images; Based on multiple preprocessed images of the regions, concave point detection is performed to determine concave point pairs for each preprocessed image of the region; Based on each pair of concave points, determine the angle between the vector of the line connecting each pair of concave points and the vector of the edge of the smallest bounding rectangle where the farthest point is located; A bottleneck concave point pair is determined based on the included angle of each vector.

7. The method for classifying and identifying plastic bottles according to claim 5, wherein, Determining the bottleneck region based on the bottleneck concave point pair includes: Based on the bottleneck concave point pair, the length of the line connecting the bottleneck concave point pair is determined to be the width of the bottleneck region; The bottleneck region is determined based on its width.

8. The method for classifying and identifying plastic bottles according to claim 7, wherein, Determining the bottleneck region based on its width includes: The height of the bottleneck region is determined using one or more of the following distance information: Based on the width and aspect ratio of the bottleneck region, determine the first distance information; or, Based on the bottleneck indentation pair, the region image is cropped to determine the bottle mouth image; based on the bottle mouth image, a distance transformation is performed to determine the maximum point; based on the maximum point, the distance between the maximum point and the line connecting the bottleneck indentation pair is determined as the second distance information; or, The minimum height of the bottleneck region is determined as the third distance information; The bottleneck region is determined based on its width and height.

9. The method for classifying and identifying plastic bottles according to claim 8, wherein, Determining the height of the bottleneck region includes: Based on the first distance information and the second distance information, the minimum value is determined to be the minimum distance information; Based on the minimum distance information and the third distance information, the maximum value is determined as the height of the bottleneck area.

10. The method for classifying and identifying plastic bottles according to claim 1, wherein, The process of identifying bottleneck regions based on multiple near-infrared spectral images and determining the category of the plastic bottle to be tested includes: The average gray value of the bottleneck region is determined based on the bottleneck regions of the multiple near-infrared spectral images. The category of the plastic bottle to be tested is determined based on the mean gray value.

11. The method for classifying and identifying plastic bottles according to claim 10, wherein, Determining the average grayscale value of the bottleneck region based on the bottleneck regions of multiple near-infrared spectral images includes: Based on the bottleneck regions of the multiple near-infrared spectral images, pixels in each bottleneck region that are higher than the grayscale threshold are excluded based on a grayscale threshold. The average grayscale value of the bottleneck region is determined based on the bottleneck region after excluding pixels.

12. The method for classifying and identifying plastic bottles according to claim 10, wherein, Before determining the bottleneck region based on the first image, the process includes one or more of the following steps: Convert the first image to a grayscale image; or, Perform histogram equalization on the first image to obtain an enhanced image; or, The first image is binarized to obtain a binary image; or, Morphological operations are performed on the first image to obtain a denoised image.

13. A plastic bottle sorting machine, comprising: The conveying module is used to transport the plastic bottles to be tested. The near-infrared spectroscopy acquisition module is used to acquire multiple near-infrared spectral images of the plastic bottle to be tested; The identification module is used to perform the classification and identification method for plastic bottles as described in claims 1-12; The sorting module is used to classify and sort the plastic bottles to be tested based on the recognition results of the recognition module.

14. An electronic device, wherein, The electronic device includes: a memory, a processor, and a data processing program stored in the memory and executable on the processor, wherein the data processing program, when executed by the processor, implements the plastic bottle classification and identification method as described in any one of claims 1-12.

15. A computer-readable storage medium storing a program for performing the classification and identification method for plastic bottles according to any one of claims 1-12.

Citation Information

Patent Citations

  • Dual infrared online plastic material sorting device

    CN103480586A

  • Method for detecting object attributes, block sorting system and related products

    CN117647188A

  • Plastic bottle intelligent identification method and device based on multispectral data

    CN118097248A

  • Lighting method and device for the detection of surface defects and / or unfilled finish on the finish of a container

    CN1708683A

  • Bottle, in particular returnable beverage bottle

    EP1652776A1