A method and device for judging the quality of recycled plastic speckled points
By combining a CCD camera and the OpenCV library, and using the Canny operator for edge extraction and image processing, the problem of identifying small-sized colored spots in the quality judgment of recycled plastics is solved, achieving efficient and accurate quality judgment.
Patent Information
- Application Number
- CN202111439308.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-30
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2041-11-30
AI Technical Summary
Existing technologies struggle to identify small-sized impurities and lack accuracy in identifying large-sized impurities, resulting in low efficiency and insufficient precision in judging the quality of recycled plastics.
RGB images of recycled plastic samples are acquired using a CCD camera. Image stitching is performed using the OpenCV library. Edge extraction, dilation, and erosion operations are performed using the Canny operator. The center coordinates and area of noise points are calculated using the OpenCV library. The noise point score is calculated by averaging the gray values. The quality of recycled plastic is judged in conjunction with industry rules.
It achieves high-precision identification of small-sized discoloration spots, improves the efficiency and accuracy of recycled plastic quality assessment, reduces manual intervention, and meets industry needs.
Smart Images

Figure CN114119565B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of quality judgment of recycled plastic mixed color points, and in particular to a method and device for quality judgment of recycled plastic mixed color points using a new fire extinguisher. BACKGROUND
[0002] In recent years, the production demand of recycled plastics has rapidly increased. On the one hand, the white pollution caused by plastic products is becoming more and more serious, and the land resources and marine resources are seriously polluted. On the other hand, plastic products lack green treatment channels, and the process of burning can easily pollute the atmospheric environment and consume a lot of energy. The degradation process takes tens of years or even hundreds of years and occupies a large amount of land resources. Purifying and finely classifying plastics and then granulating them into recycled plastics can effectively alleviate the above problems, but recycled plastics need to play a similar role as virgin plastics, and the quality of recycled plastics needs to be considered. Low-quality recycled plastics not only have poor appearance due to carrying mixed color points or impure color, but also can directly cause harm to human and animal bodies and pollution to the natural environment.
[0003] The quality judgment of recycled plastics is currently almost entirely performed by manual work. The quality inspector finds the mixed color points on the plastic sheet or rectangular plastic plate by naked eye, compares the area of the mixed color points with the mixed color points on the standard plate, judges the score of the mixed color points, finally calculates the total score of the sample sheet, and judges whether the quality of the recycled plastic meets the standard based on the score. This process consumes a lot of manual work, is harmful to the eyes of the quality inspector, and takes a long time, and each piece of plastic needs 3 to 10 minutes or even longer. At the same time, the precision of manual judgment is low, and it is difficult for the human to distinguish whether the smallest two-level mixed color points (areas are 0.1, 0.2mm 2 ) on the standard plate belong to the first level or the second level. For slightly larger mixed color points, the human's level judgment is also prone to be imprecise. Therefore, an intelligent device and a method with strictly unified judgment standard are particularly necessary. SUMMARY
[0004] This section is intended to summarize some aspects of the embodiments of the present application and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the abstract and title of the specification to avoid obscuring the purpose of this section, the abstract and the title, and such simplifications or omissions cannot be used to limit the scope of the present application.
[0005] In view of the above and / or existing problems in the prior art, the present application is proposed.
[0006] Therefore, the technical problem to be solved by the present application is that the prior art cannot identify small-size mixed color points and has low identification precision for large-size mixed color points.
[0007] To solve the above technical problems, the present application provides the following technical solutions: a method for judging the quality of recycled plastic mixed color points, comprising,
[0008] Obtaining image information of a target area and preprocessing it;
[0009] Using a Canny operator to perform edge extraction on the preprocessed image information to obtain a mixed color point contour;
[0010] Judging the coordinates of the mixed color points and the corresponding mixed color point area and color based on the mixed color point contour;
[0011] Calculating the mixed color point score according to the judgment result, and analyzing the quality of the recycled plastic sample in combination with the score.
[0012] As a preferred scheme of the method for judging the quality of recycled plastic mixed color points, the preprocessing comprises,
[0013] Using a CCD camera to obtain an RGB image of the recycled plastic sample;
[0014] If one image cannot cover all sampling points, then using the CCD camera to obtain a block RGB image of the recycled plastic sample, and performing image stitching through an OpenCV library to obtain a complete sample image.
[0015] As a preferred scheme of the method for judging the quality of recycled plastic mixed color points, obtaining the mixed color point contour comprises,
[0016] Converting an RGB three-channel image into a single-channel grayscale image;
[0017] Using the Canny operator to perform contour information extraction based on the color gradient of the grayscale image;
[0018] Performing dilation and erosion operations on the extracted contour information to obtain complete and closed contour lines for each mixed color point.
[0019] As a preferred scheme of the method for judging the quality of recycled plastic mixed color points, it further comprises,
[0020] Using the Canny operator to perform convolution operation on the image information to obtain gradient information;
[0021] The expressions of the Canny operator in x and y directions are as follows, respectively:
[0022]
[0023]
[0024] wherein, Sx S is a Canny operator in the x direction y S is a Canny operator in the y direction.
[0025] As a preferred scheme of the method for judging the quality of the color spot of the recycled plastic according to the application, wherein:
[0026] The OpenCV library is used to calculate the center coordinates and the area of each color spot contour.
[0027] If there is a color spot with an area greater than a specified threshold, a rectangle generated based on a rule in the contour is obtained.
[0028] The rule includes generating a rectangle with the center point of the contour as the center and the area equal to one quarter of the area contained by the contour line or obtained by rounding down from one quarter.
[0029] The average gray value of the pixels in the rectangle is calculated.
[0030] As a preferred scheme of the method for judging the quality of the color spot of the recycled plastic according to the application, wherein:
[0031] As a preferred scheme of the method for judging the quality of the color spot of the recycled plastic according to the application,
[0032] The area calculation includes using the formula:
[0033]
[0034] The coordinates of the pixels in the contour are converted from the pixel coordinate system to the world coordinate system, and the pixel area of the rectangle with one quarter of the area contained by the contour line or obtained by rounding down from one quarter is calculated.
[0035] The average gray value calculation includes taking the average of the gray values of all the pixels in the contour.
[0036] As a preferred scheme of the method for judging the quality of the color spot of the recycled plastic according to the application, wherein:
[0037] The application also provides a device for judging the quality of the color spot of the recycled plastic, comprising:
[0038] A material platform is used to carry and fix the recycled plastic sample, and a clamp is arranged on the material platform to fix the sample.
[0039] Camera and lens for taking images of plastic samples;
[0040] Focusing knob for focusing the camera, which needs to be focused to the highest precision of the standard speckle point on the speckle point contrast plate that can be recognized by the program;
[0041] Light source for providing stable and fixed illumination with uniform brightness, which is beneficial to the stability of the edge extraction method;
[0042] Moving guide rail on which the material platform is mounted, which can move the material platform horizontally under the control of the controller, including moving between the feeding port and the sampling lens, and moving under the lens according to the sample type;
[0043] Guide rod for fixing the camera and lens and enabling vertical movement thereof;
[0044] Driver for providing energy and power, controlling the guide rail to move in a certain path, and assisting the camera to complete the shooting of the whole plastic.
[0045] As a preferred scheme of the device for judging the quality of the speckle point of the regenerated plastic according to the application, wherein:
[0046] Thin metal shell for protecting the equipment and controlling the light intensity;
[0047] Flip cover for dustproof and feeding of the feeding port;
[0048] External computer for image stitching, contour extraction, area calculation, and color judgment, wherein a general software of the TriNovel instrument is mounted in the external computer, which is used for collecting images and transmitting the images to the computer storage, and an application script is also mounted in the external computer, which is used for processing the images and calculating the quality of the regenerated plastic.
[0049] The method uses the OpenCV library for speckle point recognition, area calculation, and color discrimination, and the highest recognition precision exceeds the highest precision that can be achieved by the human eye, far exceeding the current industry requirements, and the processing speed is fast. The Canny operator is used for edge extraction, the effect is good, the graphics operation of expansion and corrosion can ensure the connection of the contour line and also ensure high precision when calculating the area; the automatic image acquisition equipment based on the method can control the moving path of the guide rail according to the type of the feeding material, and quickly and efficiently complete the image acquisition. The equipment is equipped with a thin metal shell, the main advantage of which is to stably control the light intensity without increasing the weight of the equipment too much. BRIEF DESCRIPTION OF DRAWINGS
[0050] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort on the basis of these drawings. Among them:
[0051] Figure 1 The flowchart of the method for judging the quality of the mixed color points of the regenerated plastic according to an embodiment of the present application is shown in the figure.
[0052] Figure 2 The detailed flowchart of the method for judging the quality of the mixed color points of the regenerated plastic according to an embodiment of the present application is shown in the figure.
[0053] Figure 3 The sample image of one example in the method for judging the quality of the mixed color points of the regenerated plastic according to an embodiment of the present application is shown in the figure.
[0054] Figure 4 The edge extraction effect diagram of the method for judging the quality of the mixed color points of the regenerated plastic according to an embodiment of the present application is shown in the figure.
[0055] Figure 5 The diagram of the minimum mixed color point that can be recognized by the method for judging the quality of the mixed color points of the regenerated plastic according to an embodiment of the present application is shown in the figure.
[0056] Figure 6 The return value of the area, the center coordinates and the color of the sample corresponding mixed color point contour of the method for judging the quality of the mixed color points of the regenerated plastic according to an embodiment of the present application is shown in the figure.
[0057] Figure 7 The structure diagram of the whole device for judging the quality of the mixed color points of the regenerated plastic according to an embodiment of the present application is shown in the figure.
[0058] Figure 8 The internal structure diagram of the device for judging the quality of the mixed color points of the regenerated plastic according to an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0059] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the drawings.
[0060] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. However, it will be apparent to one skilled in the art that the present application can be practiced without the specific details set forth in this description. In other instances, well-known methods, procedures, components, and circuits have not been described in detail so as not to unnecessarily obscure aspects of the present application.
[0061] Secondly, the present application is described in detail in combination with the schematic diagram. In the detailed description of the embodiments of the present application, the sectional view of the device structure is partially enlarged without the general proportion for the convenience of illustration, and the schematic diagram is only an example which should not limit the scope of protection of the present application. In addition, the three-dimensional spatial dimensions of length, width and depth should be included in the actual manufacture.
[0062] Thirdly, "one embodiment" or "an embodiment" referred to herein means that a specific feature, structure, or characteristic described can be included in at least one implementation of the present application. "In one embodiment" appearing in different places in the specification does not mean the same embodiment, nor is it an embodiment that is independent of or mutually exclusive with other embodiments.
[0063] Embodiment 1
[0064] Reference Figures 1-6 For the first embodiment of the present application, a method for judging the quality of recycled plastic mixed color points is provided, which specifically comprises:
[0065] S1: Obtain image information of the target area and pre-process it. It should be noted that the pre-processing includes:
[0066] Obtain the RGB image of the recycled plastic sample by using the CCD camera;
[0067] If one image cannot cover all the sampling points, obtain the block RGB image of the recycled plastic sample by using the CCD camera, and obtain the complete sample image by image stitching through the OpenCV library.
[0068] S2: Use the Canny operator to extract the edge of the pre-processed image information to obtain the mixed color point contour. It should be noted that obtaining the mixed color point contour includes:
[0069] Convert the RGB three-channel image to a single-channel grayscale image;
[0070] Use the Canny operator to extract the contour information based on the color gradient of the grayscale image;
[0071] Perform inflation and corrosion operations on the extracted contour information to obtain complete and closed contour lines for each mixed color point.
[0072] Also includes,
[0073] The Canny operator is used to perform convolution operation on the image information to obtain gradient information.
[0074] The expressions of the Canny operator in the x and y directions are as follows:
[0075]
[0076]
[0077] wherein S x is the Canny operator in the x direction, and S y is the Canny operator in the y direction.
[0078] S3: judging the coordinates of the speckle points and the corresponding area and color of the speckle points based on the contour of the speckle points. It should be further noted that:
[0079] The OpenCV library is used to calculate the center coordinates and the area of each speckle point contour;
[0080] If there is a speckle point with an area greater than a specified threshold, a rectangle is obtained based on a rule within the contour;
[0081] One rule includes generating a rectangle with the center point of the contour as the center and an area equal to one quarter of the area contained by the contour line or obtained by rounding down from one quarter.
[0082] The average value of the gray values of the pixels in the rectangle is calculated.
[0083] The center coordinate calculation includes:
[0084] In the specific implementation process, the image processing based on machine vision is used to calculate the physical size in the world coordinate system by the number of pixels. For the valve recognition and positioning in this paper, the target object image is collected under the working distance of the corresponding camera, and the pixel coordinates of the valve position are obtained through the corresponding algorithm. In order to detect the two-dimensional physical coordinates of the valve position in the component, the camera under the working distance needs to be calibrated to calculate the pixel ratio.
[0085] In this paper, the relationship between image pixel value and actual size is calculated by calibrating the pixel resolution of the camera, the pixel coordinates of the valve are detected, and the physical coordinates of the valve in the world coordinate system are obtained by calculating the pixel resolution of the calibration, and the position of the screw is located. In the calibration process of the camera, the checkerboard is used as the calibration detection object, the corresponding values of the side length of the checkerboard and the number of pixels in the image are calculated in the calibration process, and the fitting of the pixel resolution of the selected industrial camera is completed. Due to the errors of the lens itself and the installation errors in the calibration process, the results may be affected when the calibration times are less, therefore, in the calibration process, multiple experimental data are used for calculation, and then the average value of the multiple calibration coefficients is solved to obtain the pixel resolution calibration coefficient, so as to reduce the calibration error as much as possible.
[0086] The pixel resolution calibration of the camera is to combine the working distance and the image size collected under the current state of the industrial camera, use the computer to process the image and obtain the length pixel value of the object, then detect the actual length value of the object in the actual space, and calculate the actual size represented by each pixel under the working distance by comparing the length pixel value with the actual length value.
[0087] There are four plane coordinate systems in the camera model: pixel plane coordinate system (u, v), image physical coordinate system (image plane coordinate system) (x, y), camera coordinate system (X C ,Y C ,Z C ) and world coordinate system (X W ,Y W ,Z W ).
[0088] The pixel coordinates can be obtained from the image plane coordinates by the following formula:
[0089]
[0090] dx, dy, u0, v0 are assumed parameters, dx and dy represent the actual size of the pixels on the photosensitive chip, which connects the pixel coordinate system and the real size coordinate system, u0 and v0 are the centers of the image plane, and the internal and external parameters are finally to be solved. After obtaining this formula, we can use the knowledge of linear algebra to express the equation in matrix form:
[0091]
[0092] The relationship between the camera coordinate system and the world coordinate system: the camera coordinate system is the world coordinate system after rotation and translation, we can get the following relationship through the rotation matrix R and the translation matrix T:
[0093]
[0094] The relationship between the camera coordinate system and the image plane coordinate system: according to the camera imaging principle, we can get the length relationship formula based on similar triangles:
[0095]
[0096] Finally, the following conversion formula can be obtained:
[0097]
[0098] Where dx, dy represents the actual size of the pixel on the photosensitive chip, which connects the pixel coordinate system and the real size coordinate system, u0, v0 is the center of the image plane, the world coordinate system (X W ,Y W ,Z W ), rotation matrix R and translation matrix T, pixel plane coordinate system (u, v),
[0099] Area calculation includes,
[0100]
[0101] The coordinates of the pixel points in the contour are converted from the pixel coordinate system to the world coordinate system, and the pixel area of the rectangle obtained by taking one fourth of the contour line area or rounding down from one fourth is calculated.
[0102] The threshold is set to the actual area of the color point according to the actual product demand. For example: if a recycled plastic pen is manufactured, the actual size of the color point on the pen barrel should be less than a circle with a diameter of 0.1mm, and color points larger than this area are recorded as exceeding the threshold.
[0103] The average value of the gray value includes taking the average of the gray value of all pixel points in the contour.
[0104] S4: Calculate the score of the color point according to the judgment result, and analyze the quality of the recycled plastic sample according to the score. It should be noted that this step:
[0105] According to the industry demand or company specific rules, different weights are given to different area and different color color points, the information of color points on the complete plastic image is counted and the score is calculated to judge whether it meets the standard;
[0106] Calculate the score of the color point, the color point is determined by the specific task. For example, for a recycled plastic pen, it can be specified that the color point with a diameter of 0.1mm-0.5mm has a score of 1, and the color point with a diameter of 0.5mm-1mm has a score of 3, and so on.
[0107] Due to the machining error of camera lens itself and the deviation of lens assembly process, the image collected by machine vision system produces distortion, which makes the difference between the collected image and the actual image, so that the image processing result in actual use cannot reach the ideal effect. Industrial camera usually adopts pinhole imaging model to complete distortion correction. The distortion of lens can be divided into radial distortion, tangential distortion and thin prism distortion. Among them, the radial distortion and tangential distortion have greater influence on the projection image. Radial distortion mainly occurs in the edge part of the camera field of view, while the radial distortion degree in the center part of the image is weak, so the straight line in the edge part of the image collected by the camera may be distorted into a curve. The mathematical model of radial distortion is:
[0108]
[0109] In the formula, k1, k2, k3 represent the radial distortion coefficients of each order; (x, y) is the ideal non-distorted coordinate (image coordinate system); (xdr, ydr) is the coordinate of the pixel point of the distorted image; r 2 =x 2 +y 2 .
[0110] Tangential distortion is mainly caused by the machining and installation error in the production process. The installation error in the installation process causes the lens plane and the camera plane to be not parallel, so that the collected image is distorted. The mathematical model of tangential distortion is:
[0111]
[0112] In the formula, p1, p2 represent the tangential distortion coefficients of each order; r 2 =x 2 +y 2 .
[0113] Combine the two sets of mathematical models of radial and tangential distortion:
[0114]
[0115] Finally, five distortion parameters k1, k2, k3, p1 and p2 can be obtained. By calibrating the internal parameters and distortion parameters of the industrial camera, the collected image can be corrected by distortion correction processing to obtain the corrected image.
[0116] The color point area is calculated by using the obtained distortion parameters.
[0117] Camera calibration is performed using the Zhang Zhengyou calibration method. The Zhang Zhengyou calibration method combines the advantages of traditional calibration methods, such as high accuracy, with the advantages of self-calibration methods, avoiding the disadvantages of high equipment requirements and cumbersome operation. The Zhang Zhengyou calibration method proposes a method to obtain a good initial value through numerical calculation, and then applies this initial value to an optimization algorithm. This requires determining the physical coordinates of the calibration template's points, performing image-to-image matching, and then simultaneously solving for intrinsic and extrinsic parameters and distortion coefficients. The specific implementation is done in a Python script.
[0118] In one embodiment of the present invention, the hardware mainly includes a computer, a CCD camera, and a lens. The specific configuration parameters of the computer used in the experiment are shown in Table 1.
[0119] During the positioning process using this method, the working distance of the camera may change, so its focal length also needs to be adjusted.
[0120] Table 1. Experimental Computer Configuration Parameters
[0121] Configuration properties Parameters System Windows 10 64 CPU Intel(R) Celeron(R) CPU G1840 @ 2.80GHz Memory 8.00 GB GPU NVIDIA RTX 2080 Ti
[0122] The program was written and debugged using Python in a Windows 10 64-bit operating system environment, based on the system terminal and the PyCharm 2021 integrated development platform.
[0123] like Figure 3 As shown, this example uses a partial image captured from a rectangular recycled plastic plate. During image data acquisition, the CCD camera is fixed at the center of the field of view.
[0124] The RGB image captured by the camera is converted to grayscale. Edge detection is performed on the grayscale image using the Canny operator. Complete closed contour lines are obtained through dilation and erosion, and these contour lines are drawn on a white background. The result is as follows: Figure 4 As shown.
[0125] The minimum noise point that this method can identify and draw contours for is far smaller than industry requirements. For example... Figure 5 As shown, Figure 5 (a) is the smallest size standard on the standard plate (0.1mm). 2 ), Figure 5 (b) is the second smallest size standard on the standard plate (0.2mm). 2 Based on the same magnification of the same lens used for sampling the rectangular recycled plastic plate mentioned above, the minimum noise point that this method can extract is much smaller than 0.1mm. 2 This can meet the current industry needs;
[0126] like Figure 6As shown, the multi-color point information obtained by the method can include center coordinates, area, and gray value, and the numbering order is based on the uppermost point of each contour, which is sorted from small to large, and is the default method of the OpenCV library related function; the area is the pixel area, which can be converted into the real area based on the actual working magnification of the lens; the gray value is the average gray value in the contour, and the algorithm calculation result is compared with the actual image, and the effect is good. At present, it is generally needed to distinguish black, color and white multi-color points in the industry, and the gray value range of each color can be defined according to the distinguishing rule, that is, the color attribute can be directly output. The gray value can be changed to output RGB three channel values according to actual needs.
[0127] In the above, the patent of the application realizes efficient and intelligent identification of multi-color points of recycled plastics and quality judgment, improves the production efficiency, and reduces the labor intensity of workers.
[0128] Embodiment 2
[0129] Reference Figure 7 As a second embodiment of the application, the embodiment is different from the first embodiment in that a device for quality judgment of multi-color points of recycled plastics is provided, which specifically comprises:
[0130] The material platform 100 is used for carrying and fixing the recycled plastic sample, and a clamp 104 is arranged on the material platform 100 to fix the sample;
[0131] The camera 200 and the lens 203 are used for shooting the plastic sample image;
[0132] The focusing knob 201 is used for camera focusing, and needs to be focused to: the multi-color points that can be recognized by the program meet the highest precision on the standard multi-color point contrast plate;
[0133] The light source 202 is used for providing stable and fixed brightness illumination, and the illumination brightness is uniform, which is beneficial to the stability of the edge extraction method;
[0134] The moving guide rail 101 is used for carrying the material platform on the moving guide rail, and can move the material platform horizontally under the control of the controller, including moving between the feeding port and the sampling lens, and moving under the lens according to the sample type;
[0135] The guide rod 102 is used for fixing the camera and the lens, and enabling the camera and the lens to move vertically;
[0136] The driver 103 is used for providing energy and power, controlling the guide rail to move in a certain path, and assisting the camera to complete the shooting of the whole plastic.
[0137] The thin metal shell 300 is used for protecting the equipment and controlling the light intensity;
[0138] The flip cover 301 is used for dust prevention and feeding of the feeding port;
[0139] The external computer 400 is used for image stitching, contour extraction, area calculation, color judgment, and the external computer is equipped with general software of the three-instrument device, which is used for collecting images and transmitting the images to the computer storage. The external computer is also equipped with an application script, which is used for processing the images and calculating the quality of the recycled plastics.
[0140] It is important to note that the construction and arrangement of the application shown in the various exemplary embodiments is illustrative only. Although only a few embodiments have been described in detail in this disclosure, those skilled in the art who review this disclosure will readily appreciate that many modifications are possible (e.g., variations in sizes, dimensions, structures, shapes and proportions of the various elements, values of parameters, mounting arrangements, use of materials, colors, orientations, etc.) without materially departing from the novel teachings and advantages of the subject matter described in the application. For example, elements shown as integrally formed can be constructed of multiple parts or elements, the position of elements can be reversed or otherwise varied, and the nature or number of elements or positions can be altered or varied. Accordingly, all such variations are intended to be included within the scope of the present application. The order or sequence of any process or method steps can be varied or re-sequenced without materially affecting the application. Any "means plus function" clauses are intended to cover the structures described herein as performing the recited functionality and not only structural equivalents but also equivalent structures. Other substitutions, modifications, changes, and omissions can be made in the design, operating conditions, and arrangement of the exemplary embodiments without departing from the scope of the present application. Accordingly, the present application is not limited to the particular embodiments described and illustrated herein, but extends to equivalents of which the foregoing describes are intended to cover.
[0141] Also, in order to provide a concise description of exemplary embodiments, all features of an actual implementation can not be described (i.e., those unrelated to the presently contemplated best mode of carrying out the application, or those unrelated to enabling the claimed application).
[0142] It is understood that in the development of any actual implementation, as in any engineering or design project, numerous implementation-specific decisions can be made. Such development efforts can be complex and time-consuming, but would be a routine undertaking for those of ordinary skill in the art having the benefit of this disclosure.
[0143] It should be noted that the above examples are only used to illustrate the technical solutions of the present application but not limit the present application. Although the present application is described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or equivalently replaced, without departing from the spirit and scope of the technical solutions of the present application, which should be covered in the scope of the claims of the present application.
Claims
1. A method for judging the quality of recycled plastic specked dots, characterized by: The method comprises the following steps: acquiring image information of a target area and pre-processing the same; performing edge extraction on the pre-processed image information by using a Canny operator to obtain a speckle point contour; the step of obtaining the speckle point contour comprises the following steps: converting an RGB three-channel image into a single-channel grayscale image; performing contour information extraction based on a grayscale image color gradient by using the Canny operator; performing inflation and corrosion operations on the extracted contour information to obtain a complete and closed contour line for each speckle point; performing convolution operation on the image information by using the Canny operator to obtain gradient information; expressions of the Canny operator in x and y directions are as follows: where S x is a Canny operator in the x direction, S y is a Canny operator in the y direction; judging speckle point coordinates, corresponding speckle point areas and colors based on the speckle point contour; calculating center coordinates and areas of each speckle point contour by using an OpenCV library; if there is a speckle point with an area greater than a specified threshold, a rectangle generated based on a rule in the contour is obtained; the rule comprises generating a rectangle with a center point of the contour as a center and an area equal to one quarter of an area contained by the contour line or an area obtained by rounding down one quarter; performing average value calculation on grayscale values of pixels in the rectangle; the center coordinate calculation comprises calculating center coordinates of a minimum circumscribed rectangle of the contour; calculating a score of the speckle point according to a judgment result, and analyzing the quality of the recycled plastic sample in combination with the score.
2. The method for judging the quality of recycled plastic specked points according to claim 1, characterized in that: the pre-processing comprises the following steps: acquiring an RGB image of the recycled plastic sample by using a CCD camera; if one image cannot cover all sampling points, acquiring a sub-block RGB image of the recycled plastic sample by using the CCD camera, and obtaining a complete sample image by image splicing through an OpenCV library.
3. The method for judging the quality of recycled plastic specked points according to claim 2, characterized in that: the area calculation comprises the following formula: the coordinate of a pixel point in the contour is converted from a pixel coordinate system coordinate into a world coordinate system coordinate, and a pixel area of a rectangle obtained by rounding down one quarter of an area contained by the contour line is calculated; the grayscale value average calculation comprises taking an average of grayscale values of all pixel points in the contour.
4. The method for judging the quality of recycled plastic specked points according to claim 3, characterized in that: According to industry requirements or company-specific rules, different areas and different colors of speckle points are given weights, speckle point information on a complete plastic image is counted, and a score is calculated to determine whether it meets the standard.
5. A device for quality judgment of recycled plastic speckle, applying a method for quality judgment of recycled plastic speckle according to any one of claims 1 to 4, characterized in that: The method comprises the following steps: a material platform (100) is used to carry and fix a recycled plastic sample, and a clamp (104) is arranged on the material platform to fix the sample; a camera (200) and a lens (203) are used to shoot a plastic sample image; a focusing knob (201) is used to focus the camera, and the camera needs to be focused to the highest precision on a standard speckle point contrast plate that can be recognized by a program; a light source (202) is used to provide stable and fixed brightness illumination, and the illumination brightness is uniform, which is beneficial to the stability of the edge extraction method; a moving guide rail (101) is used to carry the material platform, and the material platform can be horizontally moved under the control of a controller, including moving between a feeding port and a sampling lens, and moving under the lens according to the type of the sample; a guide rod (102) is used to fix the camera and the lens, and the camera and the lens can be vertically moved. Driver (103), for providing energy and power, controlling the guide rail to move in a certain path, assisting the camera to complete the shooting of the whole piece of plastic.
6. The device for judging the quality of recycled plastic specked points according to claim 5, characterized in that: Also includes, Thin metal shell (300), for protecting equipment, controlling light intensity; Flip cover (301), for dustproof and feeding of the feeding port; External computer (400), for image stitching, contour extraction, area calculation, color judgment, the external computer is equipped with a general software for collecting images and transmitting them to the computer storage, the external computer is also equipped with an application script for processing images and calculating the quality of recycled plastics.
Citation Information
Patent Citations
Plastic pipe surface defect detection method and system and computer readable storage medium
CN107564002A
Product surface defect identification method based on image processing technology
CN113516619A