Automatic adjustment method and system of intelligent pelletizing device based on machine vision
Through the intelligent pelletizing device based on machine vision, the cutting parameters are automatically adjusted, and the problems of low cutting efficiency and unstable quality in the prior art are solved, and efficient and stable plastic particles are achieved.
Patent Information
- Application Number
- CN202510273572.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-06-20
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing intelligent pelletizing control methods cannot optimize cutting parameters in a timely manner according to dynamic changes during the cutting process, resulting in low cutting efficiency and cannot meet the requirements for consistency and stability of cutting quality during the production process.
The automatic adjustment method of the intelligent pelletizing device based on machine vision is adopted, and the image preprocessing and cutting is performed by obtaining the original plastic particles image and the feedback value of the measuring instrument, extracting image features, calculating image geometric data and quality indicators, performing closed-loop calculations and random forest algorithm training, and generating optimal cutting control instructions.
It realizes timely optimization of cutting parameters according to dynamic changes during the cutting process, improves the cutting efficiency of plastic particles, and ensures the consistency and stability of cutting quality.
Smart Images

Figure CN120182222A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent cutting, and particularly to an automatic adjustment method and system for an intelligent granulation device based on machine vision. Background Art
[0002] Intelligent granulation control is a commonly used technology in industrial production. Intelligent granulation control means that the granulation device sets cutting parameters according to the size and shape of the particles, thereby completing the cutting of the particles.
[0003] The existing intelligent granulation control methods mainly compare the currently collected particle size and shape data with a preset ideal particle quality threshold. When the particle size or shape does not meet the user's preset value, the cutting parameters are adjusted accordingly. This intelligent granulation control method can only adjust the cutting parameters after the particle size and shape change to the user's preset value.
[0004] This cutting method cannot optimize the cutting parameters in a timely manner according to the dynamic changes during the cutting process, resulting in low cutting efficiency and unable to meet the requirements for the consistency and stability of cutting quality in the production process. Summary of the Invention
[0005] The present invention provides an automatic adjustment method and system for an intelligent granulation device based on machine vision to solve the problem that the existing intelligent granulation control methods cannot optimize the cutting parameters in a timely manner according to the dynamic changes during the cutting process, resulting in low cutting efficiency and unable to meet the requirements for the consistency and stability of cutting quality in the production process.
[0006] In a first aspect, to solve the above technical problems, the present invention provides an automatic adjustment method for an intelligent granulation device based on machine vision, including: Obtaining an original plastic particle image and a measuring instrument feedback value; Performing image preprocessing and image cutting on the original plastic particle image to obtain an independent plastic particle image; Performing image feature extraction on the independent plastic particle image to obtain a target plastic particle shape and a target plastic particle size; Classifying according to the target plastic particle shape, and performing geometric calculation according to the classification result and the target plastic particle size to obtain image geometric data; Performing quality index calculation according to the image geometric data to obtain an image quality index value; Performing quality index judgment according to the image quality index value to obtain an image resolution parameter; Performing closed-loop calculation according to the image resolution parameter and the measuring instrument feedback value to obtain a feedback cutting parameter; Construct an image cutting dataset based on the feedback cutting parameters, and train it using the random forest algorithm to obtain the image cutting control instruction parameters; Match the image cutting control instruction parameters with the data in the preset plastic particle cutting database to obtain the optimal cutting control instruction, so as to cut the plastic particles according to the optimal cutting control instruction.
[0007] In an alternative embodiment, the image preprocessing and image cutting are performed on the original plastic particle image to obtain independent plastic particle images, including: Denoise the original plastic particle image to obtain a noiseless plastic particle image; Sharpen the noiseless plastic particle image to obtain a sharpened plastic particle image; Perform image cutting on the sharpened plastic particle image to obtain independent plastic particle images.
[0008] In an alternative embodiment, the classification is performed according to the target plastic particle shape, and geometric calculations are performed based on the classification result and the target plastic particle size to obtain image geometric data, including: Classify according to the target plastic particle shape to obtain the target plastic particle shape category; Perform geometric calculations based on the target plastic particle shape category and the target plastic particle size to obtain image geometric data; The target plastic particle shape category includes triangular plastic particles, rectangular plastic particles, rhombic plastic particles, and circular plastic particles; The image geometric data includes image perimeter, image area, image curvature, and image centroid.
[0009] In an alternative embodiment, the calculation of the quality index is performed based on the image geometric data to obtain the image quality index value, including: The image quality index value is calculated through the following formula: In the formula, is the image quality index value, is the image curvature, is the image perimeter, is the image area, is the image centroid, is the base of the natural logarithm.
[0010] In an alternative embodiment, the quality index judgment is performed based on the image quality index value to obtain the image resolution parameter, including: When the image quality index value is less than the preset index threshold, calculate the deviation value of the image quality index value, and match the deviation value with the data in the preset deviation database to obtain the image resolution parameter; When the image quality index value is greater than the preset index threshold, match the data with the data in the preset image database to obtain the image resolution parameter.
[0011] In an alternative embodiment, the closed-loop calculation based on the image resolution parameter and the measuring instrument feedback value to obtain the feedback cutting parameter includes: Taking the image resolution parameter as the feedforward parameter, and performing Laplace transform on the feedforward parameter to obtain the Laplace feedforward parameter; Taking the measuring instrument feedback value as the negative feedback parameter, and performing Laplace transform on the negative feedback parameter to obtain the Laplace negative feedback parameter; Performing closed-loop calculation according to the Laplace feedforward parameter and the Laplace negative feedback parameter to obtain the feedback cutting parameter; Among them, the feedback cutting parameter is calculated by the following formula: In the formula, is the feedback cutting parameter, is the proportionality coefficient, is the Laplace feedforward parameter, is the Laplace negative feedback parameter.
[0012] In an alternative embodiment, the constructing the image cutting data set according to the feedback cutting parameter and training by using the random forest algorithm to obtain the image cutting control instruction parameter includes: According to the image cutting data set, perform data cleaning and preprocessing to obtain the image cutting information training set data; Construct a decision tree according to the image cutting information training set data to obtain a decision tree data set; According to the decision tree data set, perform model training by using the random forest algorithm to obtain the image cutting control instruction parameter.
[0013] In an alternative embodiment, the performing model training by using the random forest algorithm according to the decision tree data set to obtain the image cutting control instruction parameter includes: Dividing the decision tree data set into decision tree training set data and decision tree test set data; Performing random sampling according to the decision tree training set data to obtain decision tree sampling set data; Performing root mean square error calculation according to the decision tree sampling set data and the decision tree test set data to obtain the decision tree root mean square error; When the root mean square error of the decision tree is less than a preset error threshold, perform a majority voting operation on the decision tree sample set data to obtain the image cutting control instruction parameters.
[0014] In a second aspect, the present invention provides an automatic adjustment system for an intelligent granulation device based on machine vision, including: A data acquisition module for acquiring an original plastic particle image and a measuring instrument feedback value; An independent image cutting module for performing image preprocessing and image cutting on the original plastic particle image to obtain an independent plastic particle image; An image feature extraction module for extracting image features from the independent plastic particle image to obtain the shape and size of the target plastic particle; An image classification calculation module for classifying according to the shape of the target plastic particle and performing geometric calculations based on the classification result and the size of the target plastic particle to obtain image geometric data; A quality index calculation module for calculating a quality index based on the image geometric data to obtain an image quality index value; A quality index judgment module for judging the quality index according to the image quality index value to obtain an image resolution parameter; A closed-loop parameter calculation module for performing a closed-loop calculation based on the image resolution parameter and the measuring instrument feedback value to obtain a feedback cutting parameter; An image data training module for constructing an image cutting data set according to the feedback cutting parameter and training using a random forest algorithm to obtain image cutting control instruction parameters; A control instruction matching module for matching the image cutting control instruction parameters with the data in a preset plastic particle cutting database to obtain an optimal cutting control instruction, so as to cut the plastic particles according to the optimal cutting control instruction.
[0015] In a third aspect, the present invention further provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the automatic adjustment method of an intelligent granulation device based on machine vision as described in any one of the above.
[0016] In a fourth aspect, the present invention further provides a computer-readable storage medium, which includes a stored computer program. When the computer program runs, it controls the device where the computer-readable storage medium is located to execute the automatic adjustment method of an intelligent granulation device based on machine vision as described in any one of the above.
[0017] Compared with the prior art, the present invention has the following beneficial effects: The present invention discloses an automatic adjustment method for an intelligent granulation device based on machine vision, including obtaining an original plastic particle image and a feedback value of a measuring instrument; performing image preprocessing on the original plastic particle image and performing image cutting to obtain independent plastic particle images; extracting image features according to the independent plastic particle images to obtain the shape and size of target plastic particles; classifying according to the shape of the target plastic particles, and performing geometric calculations according to the classification results and the size of the target plastic particles to obtain image geometric data; calculating quality indicators according to the image geometric data to obtain image quality indicator values; judging the quality indicators according to the image quality indicator values to obtain image resolution parameters; performing closed-loop calculations according to the image resolution parameters and the feedback value of the measuring instrument to obtain feedback cutting parameters; constructing an image cutting data set according to the feedback cutting parameters, and training using a random forest algorithm to obtain image cutting control instruction parameters; matching the image cutting control instruction parameters with the data in a preset plastic particle cutting database to obtain an optimal cutting control instruction, so as to cut plastic particles according to the optimal cutting control instruction. The method obtains an original plastic particle image and a feedback value of a measuring instrument, performs image cutting on the original plastic particle image to obtain independent plastic particle images, and performs feature extraction and classification calculations on the independent plastic particle images to obtain image geometric data, and then calculates image quality indicator values using the image geometric data and judges to obtain image resolution parameters, and then calculates and constructs an image cutting data set according to the image resolution parameters and the feedback value of the measuring instrument, trains using a random forest algorithm to obtain image cutting control instruction parameters, and finally matches the image cutting control instruction parameters with the data in a preset plastic particle cutting database to obtain an optimal cutting control instruction, thereby cutting plastic particles.
[0018] The method can timely optimize cutting parameters according to dynamic changes during the cutting process, and improve the cutting efficiency of plastic particles. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a schematic flowchart of an automatic adjustment method for an intelligent granulation device based on machine vision provided by the first embodiment of the present invention; Figure 2 It is a schematic structural diagram of an automatic adjustment system for an intelligent granulation device based on machine vision provided by the second embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0020] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0021] Referring to Figure 1 , the first embodiment of the present invention provides an automatic adjustment method for an intelligent granulation device based on machine vision, including the following steps: S11, obtaining an original plastic particle image and a measuring instrument feedback value; S12, performing image preprocessing and image cutting on the original plastic particle image to obtain an independent plastic particle image; S13, extracting image features from the independent plastic particle image to obtain a target plastic particle shape and a target plastic particle size; S14, classifying according to the target plastic particle shape, and performing geometric calculations according to the classification result and the target plastic particle size to obtain image geometric data; S15, calculating a quality index according to the image geometric data to obtain an image quality index value; S16, judging the quality index according to the image quality index value to obtain an image resolution parameter; S17, performing a closed-loop calculation according to the image resolution parameter and the measuring instrument feedback value to obtain a feedback cutting parameter; S18, constructing an image cutting data set according to the feedback cutting parameter and training by using a random forest algorithm to obtain an image cutting control instruction parameter; S19, matching the image cutting control instruction parameter with the data in a preset plastic particle cutting database to obtain an optimal cutting control instruction, so as to cut the plastic particles according to the optimal cutting control instruction.
[0022] In step S11, an original plastic particle image and a measuring instrument feedback value are obtained.
[0023] It should be noted that the original plastic particle images are obtained by microscopic scanning method. The microscope can provide high-resolution images, which is important for capturing the microscopic structure and details of plastic particles. For example, when detecting microplastic particles, the high magnification function of the microscope can clearly show the shape, edges and surface texture of the particles. These details are used in subsequent image processing to distinguish different types of plastic particles, and can even identify the degree of wear or contamination of the particles. The automatic focusing function of the microscope further improves the efficiency and quality of image acquisition. Due to the uneven surface of plastic particles, manual focusing is time-consuming and laborious, and it is difficult to ensure the accuracy of each focusing. The automatic focusing function can quickly adjust the focal length to ensure that each particle can be photographed at the best focal length, thus obtaining clear images.
[0024] In one implementation, relying solely on the microscope to capture images of individual particles is less efficient when dealing with large-area samples. To overcome this limitation, a two-axis programmable motion control system is combined. The system consists of multiple components, including a programmable motion controller, a stepper motor driver, a double-linear rail ball screw stage, and a sample carrier moving platform. These components work together to achieve the automatic scanning of the sample. Specifically, the programmable motion controller controls the stepper motor driver according to the preset path and parameters, and the driver drives the double-linear rail ball screw stage to move, thereby achieving the precise movement of the sample carrier moving platform. For example, when detecting a larger plastic particle sample, the sample is placed on the carrier moving platform, and the microscope takes local images at each preset position. These local images can then be processed by image stitching software to form a complete plastic particle image.
[0025] It should be noted that the feedback value of the measuring instrument is obtained by an image measuring instrument. The image measuring instrument is a commonly used measuring device, which captures images and performs precise measurements through a CCD camera and a grating scale. The role of the CCD camera is to convert optical signals into electrical signals, while the grating scale is used to measure the position and size of an object. For example, when measuring the diameter of a plastic particle, the grating scale can provide high-precision size data, and the CCD camera captures the image of the particle for further analysis by software. The data acquisition card is responsible for receiving the electrical signals from the measuring instrument and converting them into digital signals that can be processed by a computer. These digital signals are then transmitted to the computer and processed and analyzed by dedicated software. For example, the software can calculate parameters such as the length, width, area, and shape factor of the plastic particle based on the image captured by the measuring instrument, and output these parameters as feedback values. These feedback values can be used not only for quality assessment but also for adjusting cutting parameters to ensure the cutting accuracy of plastic particles.
[0026] It should be noted that before obtaining the feedback value, calibrating the measuring instrument is an essential step. Calibration can ensure the accuracy of the measurement results and avoid incorrect judgments caused by equipment errors. For example, by using a calibration sample of a standard size, the measurement accuracy of the image measuring instrument can be calibrated. During the calibration process, a standard sample of known size is placed on the measuring instrument, and the measuring instrument measures its size and compares it with the standard size. If there is a deviation, the error of the measuring instrument can be corrected through software or hardware adjustment. In addition, it is also necessary to analyze the uncertainty and error sources of the measurement results. For example, factors such as the resolution, repeatability, and reproducibility of the measuring instrument will affect the accuracy of the measurement results. Resolution determines the minimum size change that the measuring instrument can distinguish; repeatability reflects the consistency of the results when the measuring instrument measures the same object multiple times in a short period; reproducibility indicates the difference in the results when the same measuring instrument measures the same object at different times. By analyzing these factors, the reliability of the measurement results can be evaluated, and adjustments and optimizations can be made if necessary. For example, if it is found that the repeatability of the measuring instrument is poor, it is necessary to check whether the mechanical components of the equipment are worn or need to be recalibrated.
[0027] In step S12, image preprocessing is performed on the original plastic particle image and image cutting is carried out to obtain independent plastic particle images.
[0028] Denoising is performed on the original plastic particle image to obtain a noiseless plastic particle image; Sharpening is performed on the noiseless plastic particle image to obtain a sharpened plastic particle image; Image cutting is carried out on the sharpened plastic particle image to obtain independent plastic particle images.
[0029] It should be noted that preprocessing the original plastic particle image is to remove noise and enhance the image quality, so as to provide a clearer image basis for subsequent image cutting operations. Specifically, first, denoising processing is performed on the original plastic particle image. For example, the median filtering algorithm is adopted. By selecting a 3×3 neighborhood window around each pixel point in the image, calculating the median of all pixel values within this window, and replacing the original pixel point value with this median, random noise in the image can be effectively removed to obtain a noiseless plastic particle image. Taking an original image containing plastic particles as an example, after median filtering, the fine noise originally generated by the interference of the shooting environment light is eliminated, and the overall image becomes smoother and clearer.
[0030] It should be noted that after obtaining the noiseless plastic particle image, further sharpening processing is performed on this image. The sharpening operation is to enhance the edge features of the plastic particles in the image, making its contour more obvious, which is convenient for subsequent image cutting operations. For example, the Laplacian sharpening algorithm is adopted. By constructing a Laplacian operator, such as a 3×3 convolution kernel, the element values of which are Perform a convolution operation on the operator and the noiseless plastic particle image. During the convolution process, the operator will detect areas in the image where the pixel values change significantly, i.e., the edge areas, and enhance the contrast of these areas to highlight the edges. Taking the edge of a plastic particle as an example, after sharpening, the edge of the particle becomes clearer from its original relatively blurred state, and the boundary between the particle and the background becomes more distinct, thus obtaining a sharpened plastic particle image.
[0031] It should be noted that image cutting is performed based on the sharpened plastic particle image to obtain independent plastic particle images, specifically using a threshold segmentation-based method. For example, by analyzing the grayscale histogram of the sharpened plastic particle image, a suitable threshold is determined. Assume that the grayscale value range of the plastic particles mainly concentrates between 150 and 255, while the grayscale value of the background is relatively low, between 0 and 100. Set the threshold to 120, and then perform binarization processing on the sharpened plastic particle image, classifying the pixel points with grayscale values greater than 120 as the foreground (i.e., plastic particles), and the remaining pixel points as the background. Subsequently, using the connected component analysis algorithm, all connected regions corresponding to the plastic particles in the image are identified, and each connected region is cut out to form independent plastic particle images. For example, in a sharpened image containing multiple plastic particles, after the above cutting operation, each plastic particle is completely separated to form an independent image, facilitating subsequent individual analysis and processing of each plastic particle.
[0032] In step S13, image feature extraction is performed based on the independent plastic particle images to obtain the target plastic particle shape and the target plastic particle size.
[0033] It should be noted that when performing shape feature extraction on independent plastic particle images, a contour detection algorithm can be used to determine the external contour of the plastic particles. For example, use the Canny edge detection algorithm to perform edge extraction on the independent plastic particle images. The Canny algorithm can accurately identify the edge contour of the plastic particles by calculating the gradient magnitude and direction of the image and combining non-maximum suppression and double-threshold detection. Taking an irregularly shaped plastic particle image as an example, after Canny edge detection, the complete contour of the particle can be clearly outlined. Subsequently, calculate the geometric features of the contour, such as the aspect ratio and circularity. The aspect ratio can be determined by calculating the aspect ratio of the minimum bounding rectangle of the contour, and the circularity can be calculated by the formula: circularity = 24π×area / perimeter 2 to calculate. For example, for an elliptical plastic particle, its aspect ratio can be calculated to be 1.5 and the circularity to be 0.7.
[0034] It should be noted that after the shape features are extracted, the size features of the independent plastic particle images are further extracted. The size features mainly involve parameters such as the length, width, radius, radius and equivalent diameter of the plastic particles. During specific implementation, the length and width are directly measured. When calculating the area of the plastic particles, the area of the particles is determined by counting the non-zero pixel points in the independent plastic particle images. For example, for an independent plastic particle image, the total number of non-zero pixel points is 1000. Assuming that the resolution of the image is known and the actual area corresponding to each pixel point is 0.01 square millimeters, the actual area of the plastic particle is 10 square millimeters. When calculating the equivalent diameter, the formula: equivalent diameter = (4×area / π) can be used. 0.5 For example, for a plastic particle with an area of 10 square millimeters, its equivalent diameter is 3.57 millimeters.
[0035] In step S14, classify according to the shape of the target plastic particle, and perform geometric calculations based on the classification result and the size of the target plastic particle to obtain image geometric data.
[0036] Classify according to the shape of the target plastic particle to obtain the shape category of the target plastic particle; Perform geometric calculations based on the shape category of the target plastic particle and the size of the target plastic particle to obtain image geometric data; The shape categories of the target plastic particles include triangular plastic particles, rectangular plastic particles, rhombic plastic particles and circular plastic particles; The image geometric data includes image perimeter, image area, image curvature and image centroid.
[0037] It should be noted that classify according to the shape of the target plastic particle to determine the shape category of the target plastic particle. The plastic particles are classified using shape feature parameters (such as aspect ratio, circularity, number of corner points, etc.). For example, for an independent plastic particle image, by calculating its feature parameters such as aspect ratio, circularity and number of corner points, it can be classified into one of the four shape categories: triangular plastic particles, rectangular plastic particles, rhombic plastic particles and circular plastic particles. After the shape classification of the target plastic particles is completed, geometric calculations are performed based on the classification result and the size of the target plastic particles. For plastic particles of different shape categories, their image perimeter, image area, image curvature and image centroid are calculated respectively.
[0038] It should be noted that image curvature is a geometric parameter describing the degree of bending of an image boundary, reflecting the bending change of the boundary in a local area. For a two-dimensional curve, curvature can be defined as the degree of bending at a certain point on the curve. The larger the value, the more obvious the bending at that point. Curvature can be used to describe the complexity of its boundary shape. For example, a high-curvature area represents the sharp or concave part of the particle surface. The image centroid refers to the geometric center of all pixel points in the image, reflecting the center-of-gravity position of the image. For a two-dimensional image, the centroid can be determined by calculating the weighted average of the coordinates of all pixel points. In image processing, the centroid can be used as a feature point of plastic particles for particle positioning and tracking.
[0039] In step S15, the image quality index value is obtained by calculating the quality index according to the image geometric data.
[0040] The image quality index value is calculated by the following formula: In the formula, is the image quality index value, is the image curvature, is the image perimeter, is the image area, is the image centroid, is the base of the natural logarithm.
[0041] It should be noted that this formula uses multi-dimensional data, making the image quality index value able to make the calculation result more accurate. The introduction of the exponential term has a regulatory effect, fully considering the non-linear influence of the associated monitoring parameter on the system state. When the image centroid is relatively large, it indicates that the system is at a relatively high level. At this time, the value of the exponential term will decrease significantly, thereby reducing the value of the image quality index value . This non-linear adjustment mechanism enables the formula to more sensitively capture the changes in the system state.
[0042] Exemplarily, when the image curvature , the image perimeter , the image area , and the image centroid , the calculated image quality index value is .
[0043] In step S16, the image resolution parameter is obtained by judging the quality index according to the image quality index value.
[0044] When the image quality index value is less than the preset index threshold, calculate the deviation value of the image quality index value, and match the deviation value with the data in the preset deviation database to obtain the image resolution parameter; When the image quality index value is greater than the preset index threshold, match the data with the data in the preset image database to obtain the image resolution parameter.
[0045] It should be noted that there are multiple parameters in the preset deviation database and the preset image database, and each value corresponds to a parameter. For example, 0.1 corresponds to parameter A: resolution 1024×1024, edge detection algorithm 1, and 0.2 corresponds to parameter B: resolution 1536×1536, edge detection algorithm 3.
[0046] Exemplarily, the preset index threshold is set to 0.2. When the image quality index value is, its deviation value is 0.996, then the data parameter corresponding to the preset deviation database is: resolution 1536×1536, edge detection algorithm 1. When the image quality index value is, then the data parameter corresponding to the preset image database is: resolution 1024×1024, edge detection algorithm 1.
[0047] In step S17, perform a closed-loop calculation based on the image resolution parameter and the measuring instrument feedback value to obtain the feedback cutting parameter.
[0048] Take the image resolution parameter as the feedforward parameter, and perform a Laplace transform on the feedforward parameter to obtain the Laplace feedforward parameter; Take the measuring instrument feedback value as the negative feedback parameter, and perform a Laplace transform on the negative feedback parameter to obtain the Laplace negative feedback parameter; Perform a closed-loop calculation based on the Laplace feedforward parameter and the Laplace negative feedback parameter to obtain the feedback cutting parameter; Among them, the feedback cutting parameter is calculated by the following formula: In the formula, is the feedback cutting parameter, is the proportionality coefficient, is the Laplace feedforward parameter, is the Laplace negative feedback parameter.
[0049] It should be noted that during the cutting process, a feedforward control and a negative feedback mechanism are introduced. Combining with the Laplace transform, the dynamic adjustment of the image resolution parameters is realized to optimize the cutting effect. The Laplace transform is a mathematical method that transforms a time-domain function into the complex frequency domain (s-domain). The Laplace transform is used to realize the dynamic adjustment of the image resolution parameters. The image resolution parameters in the time domain (feedforward parameters) and the feedback value of the measuring instrument (negative feedback parameters) are transformed into the s-domain to obtain the Laplace feedforward parameters and the Laplace negative feedback parameters. Then, through the inverse Laplace transform, it is transformed back into the time domain to obtain the feedback cutting parameters, which can dynamically adjust the image cutting process to optimize the cutting effect.
[0050] Exemplarily, when the proportionality coefficient is , the Laplace feedforward parameter , and the Laplace negative feedback parameter , then through the Laplace transform, we get . So, the calculated . When is large enough, . Through the inverse Laplace transform, the feedback cutting parameter is obtained.
[0051] In step S18, an image cutting data set is constructed according to the feedback cutting parameters, and the random forest algorithm is used for training to obtain the image cutting control instruction parameters.
[0052] According to the image cutting data set, data cleaning and preprocessing are performed to obtain the training set data of the image cutting information; A decision tree is constructed according to the training set data of the image cutting information to obtain the decision tree data set; According to the decision tree data set, model training is performed using the random forest algorithm to obtain the image cutting control instruction parameters; The decision tree data set is divided into decision tree training set data and decision tree test set data; According to the decision tree training set data, random sampling is performed to obtain the decision tree sampling set data; According to the decision tree sampling set data and the decision tree test set data, the root mean square error is calculated to obtain the decision tree root mean square error; When the decision tree root mean square error is less than the preset error threshold, a majority voting operation is performed on the decision tree sample set data to obtain the image cutting control instruction parameters.
[0053] It should be noted that data cleaning and preprocessing require checking for missing values, outliers, and duplicate values in the dataset and handling them. For example, if a certain value is negative, it is regarded as an outlier and corrected or deleted, and the data is standardized or normalized for subsequent model training. The decision tree algorithm is used to construct a decision tree model based on features and target variables. The decision tree can be split according to different values of features, forming multiple nodes and branches, and finally obtaining a decision tree structure. The constructed decision tree dataset is divided into decision tree training set data and decision tree test set data. The decision tree training set is used to train the random forest model, and the decision tree test set is used to evaluate the performance of the model. Random sampling is performed from the decision tree training set data to obtain decision tree sampling set data. Random sampling is a sampling method with replacement, that is, the same sample will be sampled multiple times, which can provide different training data for each decision tree in the random forest and increase the diversity between trees. When the root mean square error of the decision tree is less than the preset error threshold, it indicates that the model performance meets the requirements. At this time, a majority voting operation is performed on the decision tree sample set data. For example, for each sample, the prediction results of multiple decision trees are counted, and the prediction value that appears most frequently is taken as the final prediction result, which is the image cutting control instruction parameter.
[0054] Among them, the formula for the root mean square error is: In the formula, is the root mean square error, is the number of samples, is the th predicted value data, is the th actual value data.
[0055] Exemplarily, 70% of the decision tree dataset is divided into decision tree training set data, and 30% of the decision tree dataset is divided into decision tree test set data. Random sampling is performed in the decision tree training set data to obtain decision tree sampling set data. The random forest algorithm is used to train the decision tree sampling set data, and then multiple decision trees are constructed and the prediction results are integrated. For example, the integrated decision tree sampling set data results are [1024.8, 1024.8, 1017.5, 1024.8, 1027.5, 1024.8, 1054.7, 1055.8]. Through the majority voting result, the predicted image cutting control instruction parameter result is 1024.8. Calculated by the root mean square error formula, , if the preset error threshold is 15 and the convergence condition is met at this time, then 1024.8 is the final result of the image cutting control instruction parameter.
[0056] In step S19, according to the image cutting control instruction parameters, match the data in the preset plastic particle cutting database to obtain the optimal cutting control instruction, and cut the plastic particles according to the optimal cutting control instruction.
[0057] It should be noted that the preset cutting data range is stored in the plastic particle cutting database. By matching the image cutting control instruction parameters with different cutting data range segments, the cutting control of the plastic particles can be obtained. This instruction is the optimal cutting control instruction, and the plastic particles are cut according to this control instruction.
[0058] Exemplarily, the preset production data ranges are the first cutting data segment, the second cutting data segment, the third cutting data segment, the fourth cutting data segment, and the fifth cutting data segment. The corresponding value ranges are: 0 - 1500, 1500 - 3000, 3000 - 4500, 4500 - 6000, 6000 - 7500. The calculated image cutting control instruction parameter is 1024.8, which belongs to the first cutting data segment. The cutting control instruction for this plastic particle can be obtained as the first cutting instruction.
[0059] In summary, the present invention discloses an automatic adjustment method for an intelligent granulation device based on machine vision, including obtaining an original plastic particle image and a measuring instrument feedback value; performing image preprocessing on the original plastic particle image and performing image cutting to obtain independent plastic particle images; extracting image features based on the independent plastic particle images to obtain the shape and size of target plastic particles; classifying according to the shape of the target plastic particles, and performing geometric calculations based on the classification results and the size of the target plastic particles to obtain image geometric data; calculating quality indicators based on the image geometric data to obtain image quality indicator values; judging the quality indicators according to the image quality indicator values to obtain image resolution parameters; performing closed-loop calculations based on the image resolution parameters and the measuring instrument feedback value to obtain feedback cutting parameters; constructing an image cutting data set based on the feedback cutting parameters and training using a random forest algorithm to obtain image cutting control instruction parameters; matching the image cutting control instruction parameters with the data in a preset plastic particle cutting database to obtain an optimal cutting control instruction, so as to cut the plastic particles according to the optimal cutting control instruction. The method obtains an original plastic particle image and a measuring instrument feedback value, performs image cutting on the original plastic particle image to obtain independent plastic particle images, extracts features and classifies and calculates based on the independent plastic particle images to obtain image geometric data, then calculates image quality indicator values using the image geometric data and judges to obtain image resolution parameters, then calculates and constructs an image cutting data set based on the image resolution parameters and the measuring instrument feedback value, trains using a random forest algorithm to obtain image cutting control instruction parameters, and finally matches the image cutting control instruction parameters with the data in a preset plastic particle cutting database to obtain an optimal cutting control instruction, thereby cutting the plastic particles. The method can optimize the cutting parameters in a timely manner according to the dynamic changes during the cutting process, and improve the cutting efficiency of plastic particles.
[0060] Referring to Figure 2 , the second embodiment of the present invention provides an automatic adjustment system for an intelligent granulation device based on machine vision, including: A data acquisition module for obtaining an original plastic particle image and a measuring instrument feedback value; An independent image cutting module for performing image preprocessing on the original plastic particle image and performing image cutting to obtain independent plastic particle images; An image feature extraction module for extracting image features based on the independent plastic particle images to obtain the shape and size of target plastic particles; An image classification calculation module for classifying according to the shape of the target plastic particles and performing geometric calculations based on the classification results and the size of the target plastic particles to obtain image geometric data; A quality index calculation module, configured to calculate a quality index based on the image geometric data to obtain an image quality index value; A quality index judgment module, configured to judge the quality index according to the image quality index value to obtain an image resolution parameter; A closed-loop parameter calculation module, configured to perform a closed-loop calculation based on the image resolution parameter and the feedback value of the measuring instrument to obtain a feedback cutting parameter; An image data training module, configured to construct an image cutting data set according to the feedback cutting parameter and perform training using a random forest algorithm to obtain an image cutting control instruction parameter; A control instruction matching module, configured to match the image cutting control instruction parameter with the data in a preset plastic particle cutting database to obtain an optimal cutting control instruction, so as to cut the plastic particles according to the optimal cutting control instruction.
[0061] It should be noted that the automatic adjustment system of an intelligent granulation device based on machine vision provided in the embodiment of the present invention is used to execute all the process steps of the automatic adjustment method of an intelligent granulation device based on machine vision in the above embodiment. The working principles and beneficial effects of the two correspond one by one, so they will not be elaborated here.
[0062] The embodiment of the present invention also provides an electronic device. The electronic device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as an automatic adjustment program of an intelligent granulation device based on machine vision. When the processor executes the computer program, it implements the steps in the above embodiments of the automatic adjustment method of an intelligent granulation device based on machine vision, such as Figure 1 Step S11 shown. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in the above device embodiments, such as the data acquisition module.
[0063] Exemplarily, the computer program may be divided into one or more modules / units. The one or more modules / units are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program in the electronic device.
[0064] The electronic device may be a computing device such as a desktop computer, a notebook, a palm computer, and a smart tablet. The electronic device may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the above components are only examples of the electronic device and do not constitute a limitation on the electronic device. It may include more or fewer components than the above, or combine some components, or different components. For example, the electronic device may also include input / output devices, network access devices, a bus, etc.
[0065] The so-called processor may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The processor is the control center of the electronic device and connects various parts of the entire electronic device through various interfaces and lines.
[0066] The memory may be used to store the computer programs and / or modules. The processor realizes various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory. The memory may mainly include a program storage area and a data storage area. Among them, the program storage area may store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area may store data created according to the use of the mobile phone (such as audio data, a phone book, etc.). In addition, the memory may include high-speed random access memory and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0067] Among them, if the modules / units integrated in the electronic device are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above-described embodiment methods of the present invention, it can also be completed by a computer program instructing relevant hardware. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-described various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0068] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the attached drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that they have a communication connection, which can be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0069] The above-described specific embodiments have further elaborated on the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only the specific embodiments of the present invention and is not used to limit the protection scope of the present invention. It is particularly pointed out that for those skilled in the art, any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. An automatic adjustment method for an intelligent pelletizing device based on machine vision, characterized in that: include: Obtaining the original plastic particle image and the measuring instrument feedback value; Performing image preprocessing and image cutting according to the original plastic particle image to obtain an independent plastic particle image; Extracting image features according to the independent plastic particle images to obtain a target plastic particle shape and a target plastic particle size; Classifying the target plastic particles according to their shapes, and performing geometric calculations based on the classification results and the target plastic particle sizes to obtain image geometric data; Calculate the quality index according to the image geometry data to obtain an image quality index value; Performing quality index judgment according to the image quality index value to obtain an image resolution parameter; Perform closed-loop calculation according to the image resolution parameter and the feedback value of the measuring instrument to obtain feedback cutting parameters; An image cutting data set is constructed according to the feedback cutting parameters, and a random forest algorithm is used for training to obtain image cutting control instruction parameters; According to the image cutting control instruction parameters, matching is performed with data in a preset plastic particle cutting database to obtain an optimal cutting control instruction, so as to cut the plastic particles according to the optimal cutting control instruction.
2. The automatic adjustment method of the intelligent pelletizing device based on machine vision according to claim 1 is characterized in that: The step of performing image preprocessing and image cutting according to the original plastic particle image to obtain an independent plastic particle image includes: De-noising the original plastic particle image to obtain a noise-free plastic particle image; Sharpening the noise-free plastic particle image to obtain a sharpened plastic particle image; Image cutting is performed according to the sharpened plastic particle image to obtain an independent plastic particle image.
3. The automatic adjustment method of the intelligent pelletizing device based on machine vision according to claim 1 is characterized in that: The method of classifying the target plastic particles according to their shapes and performing geometric calculations according to the classification results and the target plastic particles' sizes to obtain image geometric data includes: Classify the target plastic particles according to their shapes to obtain target plastic particle shape categories; Performing geometric calculations according to the target plastic particle shape category and the target plastic particle size to obtain image geometric data; The target plastic particle shape categories include triangular plastic particles, rectangular plastic particles, diamond plastic particles and round plastic particles; The image geometric data includes image perimeter, image area, image curvature and image centroid.
4. The automatic adjustment method of the intelligent pelletizing device based on machine vision according to claim 1 is characterized in that: The calculating the quality index according to the image geometry data to obtain the image quality index value includes: The image quality index value is calculated by the following formula: In the formula, is the image quality index value, is the image curvature, is the image perimeter, is the image area, is the image centroid, is the base of natural logarithms.
5. The automatic adjustment method of the intelligent pelletizing device based on machine vision according to claim 1, characterized in that: The step of performing quality index determination according to the image quality index value to obtain an image resolution parameter includes: When the image quality index value is less than a preset index threshold, calculating a deviation value of the image quality index value, and matching the deviation value with data in a preset deviation database to obtain an image resolution parameter; When the image quality index value is greater than a preset index threshold, it is matched with data in a preset image database to obtain an image resolution parameter.
6. The automatic adjustment method of the intelligent pelletizing device based on machine vision according to claim 2, characterized in that: The closed-loop calculation is performed according to the image resolution parameter and the feedback value of the measuring instrument to obtain the feedback cutting parameter, including: Using the image resolution parameter as a feedforward parameter, and performing Laplace transform on the feedforward parameter to obtain a Laplace feedforward parameter; The feedback value of the measuring instrument is used as a negative feedback parameter, and the negative feedback parameter is subjected to Laplace transformation to obtain a Laplace negative feedback parameter; Perform closed-loop calculation according to the Laplace feedforward parameter and the Laplace negative feedback parameter to obtain a feedback cutting parameter; The feedback cutting parameter is calculated by the following formula: In the formula, To feedback the cutting parameters, is the proportionality coefficient, is the Laplace feedforward parameter, is the Laplace negative feedback parameter.
7. The automatic adjustment method of the intelligent pelletizing device based on machine vision according to claim 1, characterized in that: The image cutting data set is constructed according to the feedback cutting parameters, and the random forest algorithm is used for training to obtain the image cutting control instruction parameters, including: According to the image segmentation data set, data cleaning and preprocessing are performed to obtain image segmentation information training set data; Construct a decision tree according to the image cutting information training set data to obtain a decision tree data set; According to the decision tree data set, a random forest algorithm is used to perform model training to obtain image cutting control instruction parameters.
8. The automatic adjustment method of the intelligent pelletizing device based on machine vision according to claim 7, characterized in that: The method of using a random forest algorithm to perform model training based on the decision tree data set to obtain image cutting control instruction parameters includes: Dividing the decision tree data set into decision tree training set data and decision tree test set data; Perform random sampling based on the decision tree training set data to obtain decision tree sampling set data; Calculate the root mean square error of the decision tree based on the decision tree sampling set data and the decision tree test set data to obtain the decision tree root mean square error; When the root mean square error of the decision tree is less than a preset error threshold, a majority voting operation is performed on the decision tree sample set data to obtain image cutting control instruction parameters.
9. An automatic adjustment system for an intelligent pelletizing device based on machine vision, characterized in that: include: A data acquisition module, used to obtain the original plastic particle image and the feedback value of the measuring instrument; An independent image cutting module, used for performing image preprocessing and image cutting according to the original plastic particle image to obtain an independent plastic particle image; An image feature extraction module, used to extract image features according to the independent plastic particle image to obtain a target plastic particle shape and a target plastic particle size; An image classification and calculation module is used to classify the target plastic particles according to their shapes, and to perform geometric calculations based on the classification results and the target plastic particle sizes to obtain image geometric data; A quality index calculation module, used to calculate the quality index according to the image geometry data to obtain an image quality index value; A quality index judgment module, used to perform quality index judgment according to the image quality index value to obtain an image resolution parameter; A closed-loop parameter calculation module, used for performing closed-loop calculation according to the image resolution parameter and the feedback value of the measuring instrument to obtain a feedback cutting parameter; An image data training module is used to construct an image cutting data set according to the feedback cutting parameters, and to train the image cutting data set using a random forest algorithm to obtain image cutting control instruction parameters; The control instruction matching module is used to match the image cutting control instruction parameters with the data in the preset plastic particle cutting database to obtain the optimal cutting control instruction, so as to cut the plastic particles according to the optimal cutting control instruction.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the automatic adjustment method of the intelligent pelletizing device based on machine vision as described in any one of claims 1 to 8.