A water-soluble fertilizer packaging detection method and system based on image processing

By calculating the comprehensive characteristic values ​​of the depression and filling degree and predicting the probability of abnormal equipment environment, the evaluation curve is constructed, and the problem of large detection errors during the water-soluble fertilizer packaging process is solved, and the detection accuracy is improved.

CN118503829BActive Publication Date: 2024-11-15BAIHE YONGHONG CHEM CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410925127.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-11-15
Estimated Expiration
2044-07-11

AI Technical Summary

Technical Problem

The prior art has large detection errors in the water-soluble fertilizer packaging process, which makes it difficult to match the packaging bag image and large errors.

Method used

By calculating the comprehensive characteristic values ​​of the depression and filling degree, and using the preset timing network model to predict the probability of equipment environment abnormality, an evaluation curve is constructed to evaluate the packaging quality of the packaging bag and generate an alarm signal.

Benefits of technology

It improves the accuracy of packaging quality inspection of packaging bags, reduces errors, and enhances the accuracy of inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118503829B_ABST
    Figure CN118503829B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image recognition technology, and in particular to a water-soluble fertilizer packaging detection method and system based on image processing, including calculating the concavity and filling degree, taking the sum of the concavity and filling degree as a comprehensive characteristic value; using a preset time series network model to predict the probability of equipment environmental abnormality, taking the product of the environmental abnormality probability of the packaging equipment and the comprehensive characteristic value as an evaluation value; constructing an evaluation curve; in response to the predicted evaluation value being greater than a preset threshold, generating an alarm signal representing unqualified packaging quality. The present invention improves the packaging quality detection accuracy of the packaging bag by predicting the packaging quality of the packaging bag at the next moment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image recognition, and in particular to a water-soluble fertilizer packaging detection method and system based on image processing. Background Art

[0002] Water-soluble fertilizer packaging is the process of packaging and encapsulating water-soluble fertilizers according to certain specifications and proportions through packaging equipment. It can effectively isolate the external environment and prevent the water-soluble fertilizers from being affected by moisture and contamination and causing quality changes. In order to ensure the quality of fertilizers and ensure the stability and effectiveness of fertilizers, it is necessary to test the packaging of water-soluble fertilizers.

[0003] A Chinese patent with publication number CN115272341A discloses a method for detecting defective products in a packaging machine based on machine vision. The method obtains a template image and an image to be detected, divides the image into multiple areas, and obtains multiple areas corresponding to the area to be detected, and calculates the overall matching degree between the image to be detected and the template image. When the overall matching degree is lower than a preset threshold, the corresponding packaging bag is a defective product, thereby realizing defect detection of the product.

[0004] However, the above technical solution realizes defect detection of the product by calculating the matching degree between the template image and the image to be detected. However, in the actual production process, since the water-soluble fertilizer is canned into the packaging bag, the packaging bag bulges and deforms, which further causes the patterns, texts and other reference objects on the surface of the packaging bag to be greatly deformed, and the image to be detected becomes distorted. Therefore, it is difficult to match the image to be detected with the template image, resulting in a large detection error. Summary of the invention

[0005] The present invention proposes a water-soluble fertilizer packaging detection method and system based on image processing, which is used to solve the problem of large detection error in the existing water-soluble fertilizer packaging process. To this end, the present invention provides solutions in the following two aspects.

[0006] In a first aspect, the present invention provides a water-soluble fertilizer packaging detection method based on image processing, comprising the following steps:

[0007] Calculate the concavity and filling degree, and take the sum of the concavity and filling degree as the comprehensive characteristic value;

[0008] The preset time series network model is used to predict the probability of equipment environmental abnormality, and the product of the environmental abnormality probability of the packaging equipment and the comprehensive characteristic value is used as the evaluation value;

[0009] Construct the evaluation curve, the expression is:

[0010]

[0011] Where: represents the predicted evaluation value of the next moment, is the first coefficient, is the second coefficient, is the third coefficient, is the fourth coefficient, is the evaluation value of the first moment in the historical moment, is the evaluation value of the second moment in the historical moment, is the evaluation value of the third moment in the historical moment, is the evaluation value at the current moment, is a constant term;

[0012] In response to the predicted evaluation value being greater than a preset threshold, an alarm signal representing that the packaging quality is unqualified is generated.

[0013] The comprehensive characteristic value is calculated by the concavity and filling degree, the evaluation value is calculated by using the comprehensive characteristic value and the probability of environmental abnormality, and the packaging quality of the packaging bag at the next moment is predicted by using the evaluation curve, thereby improving the detection accuracy of the packaging bag packaging quality.

[0014] In one embodiment, the concavity is calculated as follows:

[0015] Acquire a packaging bag image, perform binarization processing on the packaging bag image, and obtain a binary image;

[0016] Perform edge detection on the binary image and extract the contour of the packaging bag area;

[0017] Extract the left edge line and the right edge line based on the contour of the packaging bag area;

[0018] The number of inflection points of the left edge line and the right edge line are calculated respectively, and the average of the number of inflection points of the left edge line and the right edge line is taken as the concavity.

[0019] By extracting the contour line of the packaging bag area, then calculating the inflection points of the contour line, and taking the number of inflection points as the concavity, the concavity can be calculated more accurately, thereby improving the accuracy of the concavity.

[0020] In one embodiment, the concavity is calculated as follows:

[0021] The calculation method of the concavity is:

[0022] Acquire a packaging bag image, perform binarization processing on the packaging bag image, and obtain a binary image;

[0023] Perform edge detection on the binary image and extract the contour of the packaging bag area;

[0024] Extracting a left edge line and a right edge line based on the contour of the packaging bag area;

[0025] The average value of the curvature radius of the left edge line and the curvature radius of the right edge line is taken as the concavity.

[0026] In one embodiment, extracting the left edge line and the right edge line includes the following steps:

[0027] Determine the edge point with the largest x-coordinate value and the edge point with the smallest x-coordinate value on the contour of the packaging bag area;

[0028] Take the edge point with the smallest x-coordinate value as the starting point, along the edge of the contour of the packaging bag area, one side of the starting point is the first direction, and the other side of the starting point is the second direction;

[0029] Obtaining adjacent edge points of the starting point along the first direction, calculating the gradient direction of the starting point and the adjacent edge points, and in response to the gradient direction being greater than a preset threshold, the adjacent edge point is the end point in the first direction, otherwise, the adjacent edge point is used as the starting point and the calculation is repeated;

[0030] Similarly, find the end point in the second direction, and the contour line between the end point in the first direction and the end point in the second direction is the left edge line;

[0031] Take the edge point with the largest x-coordinate value as the starting point, and similarly, get the right edge line.

[0032] In one embodiment, the step of calculating the number of inflection points of the left edge line and the right edge line comprises the following steps:

[0033] Input the left edge line into the Douglas-Peucker algorithm to obtain multiple endpoints, and connect the multiple endpoints in sequence to obtain multiple line segments;

[0034] Calculate the angle between two adjacent line segments, and take the number of angles greater than a preset threshold as the number of inflection points of the left edge line;

[0035] Similarly, the right edge line is input into the Douglas-Peucker algorithm to obtain the number of inflection points of the right edge line.

[0036] The Douglas-Peucker algorithm is used to discard data without reference value and retain data with reference value, thereby improving the accuracy of the number of inflection points.

[0037] In one embodiment, the filling degree is calculated as follows:

[0038] Acquire a packaging bag image, perform binarization processing on the packaging bag image, and obtain a binary image;

[0039] Multiplying the binary image with the packaging bag image to obtain a packaging bag region image, segmenting the packaging bag region image to obtain a particle region and a cavity region of the packaging bag;

[0040] The absolute value of the height difference between the particle region and the cavity region is taken as the filling degree.

[0041] By calculating the filling degree, the amount of water-soluble fertilizer in the packaging bag can be visually observed.

[0042] In one embodiment, the method for predicting the probability of abnormality of the equipment environment using the preset time series network model is:

[0043] Obtaining a training set, wherein the training set includes multiple sets of environmental data at historical moments, each set of environmental data is set with a corresponding label;

[0044] Input the training set into the pre-built temporal network model for training;

[0045] Calculate the cross entropy loss function between the output device environment abnormality probability and the actual device environment abnormality probability at the next moment;

[0046] Use gradient descent to adjust model parameters to minimize the error between predicted and actual values;

[0047] Iteratively adjust the parameters of the time series network model until the cross entropy loss function is less than the set value or reaches the preset number of iterations to obtain a trained time series network model;

[0048] The real-time environmental data is input into the timing network model to obtain the probability of equipment environmental abnormality at the next moment.

[0049] In one embodiment, the environmental data includes tensile strength data, cutter pressure data, cutter edge temperature data, and slippage data, wherein the slippage data is calculated as follows:

[0050] Obtaining the rotational angular velocity of the driving shaft and the rotational angular velocity of the film drawing shaft within a preset time period;

[0051] The linear velocity of the particle on the surface of the drive shaft is calculated according to the rotational angular velocity of the drive shaft, and the arc length of the rotation of the particle on the surface of the drive shaft is obtained by integrating the linear velocity and the rotation time;

[0052] The linear velocity of the particle on the surface of the film-drawing axis is calculated according to the rotation angular velocity of the film-drawing axis, and the arc length of the rotation of the particle on the surface of the film-drawing axis is obtained by integrating the linear velocity and the rotation time;

[0053] The absolute value of the difference in arc length between the rotation of the particle point on the driving shaft surface and the particle point on the film drawing shaft surface is taken as the degree of slippage.

[0054] By calculating the degree of slippage, the packaging quality of the packaging bag can be intuitively understood, which improves the accuracy of predicting the probability of equipment environment abnormality.

[0055] In a second aspect, a water-soluble fertilizer packaging detection system based on image processing comprises:

[0056] processor;

[0057] The memory stores computer instructions for water-soluble fertilizer packaging detection based on image processing. When the computer instructions are executed by the processor, the system executes a water-soluble fertilizer packaging detection method based on image processing.

[0058] Based on the above scheme, by collecting tensile strength, cutter pressure, cutter edge temperature, and slippage degree and inputting them into the timing network model, the abnormal probability of the equipment environment for the next action is predicted; at the same time, the packaging bag image is collected, the comprehensive feature value of the packaging bag image is calculated, and then the evaluation value is calculated based on the comprehensive feature value combined with the abnormal probability value. Finally, the evaluation curve is obtained to predict whether the packaging quality of the packaging bag at the next moment is qualified, thereby improving the detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0060] Figure 1 A flowchart schematically shows a method for detecting water-soluble fertilizer packaging based on image processing according to the present invention;

[0061] Figure 2 A schematic diagram of a packaging machine in a water-soluble fertilizer packaging detection method based on image processing of the present invention is schematically shown;

[0062] Figure 3 The structural block diagram of a water-soluble fertilizer packaging detection system based on image processing of the present invention is schematically shown. DETAILED DESCRIPTION

[0063] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation methods, structures, features and effects of the technical solutions proposed by the present invention are described in detail below in conjunction with the accompanying drawings and preferred embodiments. In the following description, different embodiments or another embodiment do not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics of one or more embodiments may be combined in any suitable form.

[0064] like Figure 2As shown, in the actual process of packaging water-soluble fertilizer, the water-soluble fertilizer is packaged by a packaging machine, and a feeding roller 13, a driving shaft 10 and a filling port 12 are provided on the packaging machine. A film-drawing shaft 11 is provided at the filling port 12, and a packaging bag film is wound on the surface of the feeding roller 13. The feeding roller 13 can release the packaging bag film by rotating. The driving shaft 10 is used to drive the packaging bag film to move toward the filling port 12. The packaging bag film is sewn into a packaging bag at the filling port 12, and then the filling port 12 can fill the water-soluble fertilizer into the packaging bag, and then the opening is sewn, and finally the packaging bag is cut off by a cutter. During the canning process, the film-drawing shaft 11 drives the packaging bag film to move downward, so that the packaging bag film remains in a tensioned state.

[0065] In actual production, the packaging machine seals one packaging bag and the equipment performs one action.

[0066] like Figure 1 As shown, a water-soluble fertilizer packaging detection method based on image processing of the present invention comprises the following steps:

[0067] S1. Collect environmental data of packaging bags in real time, including tensile strength data, cutter pressure data, cutter edge temperature data, and slippage degree data.

[0068] In this embodiment, a tensile test is performed on the packaging bag to measure the tensile strength of the packaging bag; a pressure sensor is installed at the cutter of the packaging machine to collect the cutter pressure, and a temperature sensor is installed at the cutter to collect the cutter edge temperature. Each time the packaging machine performs a packaging action, the pressure sensor and the temperature sensor collect data once.

[0069] The method for calculating the slip degree data is as follows: obtaining the rotational angular velocity of the drive shaft 10 and the rotational angular velocity of the film-pulling shaft 11 within a preset time period; calculating the linear velocity of the particles on the surface of the drive shaft 10 according to the rotational angular velocity of the drive shaft 10, and integrating the linear velocity with the rotation time to obtain the arc length of the particles on the surface of the drive shaft 10; calculating the linear velocity of the particles on the surface of the film-pulling shaft 11 according to the rotational angular velocity of the film-pulling shaft 11, and integrating the linear velocity with the rotation time to obtain the arc length of the particles on the surface of the film-pulling shaft 11; and taking the absolute value of the difference between the arc lengths of the particles on the surface of the drive shaft 10 and the particles on the surface of the film-pulling shaft 11 as the slip degree.

[0070] It should be noted that the surface particle is a reference point located on the circumferential surface of the corresponding drive shaft 10 or the film-drawing shaft 11. During the canning of water-soluble fertilizers, the drive shaft 10 and the film-drawing shaft 11 are in contact with the packaging bag film to drive the packaging bag film to move. It can be seen that under ideal conditions, the arc length of the rotation of the circumferential surface particles of the drive shaft 10 within a preset time period is the same as the distance moved by the packaging bag film. Similarly, the arc length of the rotation of the circumferential surface particles of the film-drawing shaft 11 within a preset time period is the same as the distance moved by the packaging bag film. Therefore, under ideal conditions, the arc length of the rotation of the circumferential surface particles of the drive shaft 10 within a preset time period is the same as the arc length of the rotation of the circumferential surface particles of the film-drawing shaft 11. If the arc lengths of the two are different, it means that the packaging machine has slipped during the process of packaging water-soluble fertilizers.

[0071] If the slippage data exceeds the set threshold, it means that the driving shaft 10 and the film-drawing shaft 11 are not working synchronously, which may easily lead to the packaging bag being too large or too small, resulting in unqualified packaging quality.

[0072] If the tensile strength of the packaging bag is too low, the packaging bag may easily break; if the cutter pressure is too low, it may easily cause adhesion between two adjacent packaging bags, resulting in incomplete cutting and affecting the packaging quality; if the temperature of the cutter edge is too high, it means that the packaging machine and cutter are abnormal, which may easily lead to unqualified packaging quality.

[0073] Therefore, tensile strength data, cutter pressure data, cutter edge temperature data, and slippage degree data have a great influence on packaging quality.

[0074] S2. Use the preset timing network model to predict the probability of equipment environment abnormality.

[0075] A time series network model is constructed and trained. The training process of the time series network model is as follows: a training set is obtained, wherein the training set includes multiple groups of environmental data at historical moments, and each group of environmental data is provided with corresponding labels; the training set is input into a pre-constructed time series network model for training; a cross entropy loss function between the output device environment abnormality probability and the device environment abnormality probability at the next moment is calculated; the model parameters are adjusted by a gradient descent method to minimize the error between the predicted value and the actual value; the parameters of the time series network model are iteratively adjusted until the cross entropy loss function is less than a set value or a preset number of iterations is reached, thereby obtaining a trained time series network model; in the present embodiment, the time series network model is a BP (backpropagation) neural network model; the collected real-time environmental data is input into the trained BP neural network model, and the BP neural network model outputs the device environment abnormality probability at the next moment.

[0076] Exemplarily, the probability of device environment abnormality is a decimal between 0 and 1, and the larger the value is, the greater the probability that the environment in which the device is located is abnormal.

[0077] S3. Collect packaging bag images in real time, and obtain the degree of concavity and the degree of filling based on the packaging bag images.

[0078] In one embodiment, the concavity is calculated as follows:

[0079] S31, acquiring a packaging bag image, and performing binarization processing on the packaging bag image to obtain a binarized image.

[0080] Turn on the array light source on the back of the packaging bag to collect the packaging bag image in real time; convert the packaging bag image into a packaging bag grayscale image, use the maximum between-class variance to binarize the packaging bag image, segment the packaging bag area, and the segmented packaging bag area is the binary image.

[0081] S32, performing edge detection on the binary image to extract the contour of the packaging bag area.

[0082] The Canny operator is used to perform edge detection on the binary image to obtain the contour of the packaging bag area.

[0083] S33: extracting a left edge line and a right edge line based on the contour of the packaging bag region.

[0084] Determine the edge point with the largest x-coordinate value and the edge point with the smallest x-coordinate value on the contour of the packaging bag area; take the edge point with the smallest x-coordinate value as the starting point, along the edge of the contour of the packaging bag area, one side of the starting point is the first direction, and the other side of the starting point is the second direction; obtain the adjacent edge points of the starting point along the first direction, calculate the gradient direction of the starting point and the adjacent edge points, in response to the gradient direction being greater than a preset threshold, the adjacent edge point is the end point in the first direction, otherwise, take the adjacent edge point as the starting point and repeat the calculation; similarly, find the end point in the second direction, and the contour line between the end point in the first direction and the end point in the second direction is the left edge line; take the edge point with the largest x-coordinate value as the starting point, and similarly, obtain the right edge line.

[0085] S34, respectively calculating the number of inflection points of the left edge line and the right edge line, and taking the average of the number of inflection points of the left edge line and the right edge line as the concavity.

[0086] The left edge line is input into the Douglas-Peucker algorithm to obtain multiple endpoints, and the multiple endpoints are connected in sequence to obtain multiple line segments; the angle between two adjacent line segments is calculated, and the number of angles greater than a preset threshold is used as the number of inflection points of the left edge line; similarly, the right edge line is input into the Douglas-Peucker algorithm to obtain the number of inflection points of the right edge line.

[0087] In other embodiments, the concavity is calculated as follows:

[0088] The average value of the curvature radius of the left edge line and the curvature radius of the right edge line is taken as the concavity.

[0089] In one embodiment, the filling degree is calculated as follows:

[0090] S35, multiplying the binary image and the packaging bag image to obtain a packaging bag region image, and segmenting the packaging bag region image to obtain a particle region and a cavity region of the packaging bag;

[0091] The binarized image is multiplied with the packaging bag image to obtain the packaging bag area image, the purpose of which is to remove the background part of the packaging bag grayscale image and retain the packaging bag area part to facilitate segmentation of the packaging bag area image, and the absolute value of the height difference between the particle area and the cavity area is used as the filling degree.

[0092] The Canny edge detection algorithm is used to obtain the edge of the particle area and the edge of the cavity area of ​​the packaging bag area image, and the minimum circumscribed rectangle of the particle area edge and the minimum circumscribed rectangle of the cavity area are calculated. The minimum circumscribed rectangle of the particle area is used as the first rectangle, and the height value of the first rectangle is further obtained. The minimum circumscribed rectangle of the cavity area is used as the second rectangle, and the height value of the second rectangle is further obtained. The absolute value of the difference between the height of the first rectangle and the second rectangle is used as the filling degree. If the filling degree value is too large or too small, it means that the content of water-soluble fertilizer in the packaging bag is abnormal.

[0093] S4. The sum of the concavity and the filling degree is taken as a comprehensive characteristic value, and the probability of equipment environmental abnormality is predicted using a preset timing network model. The product of the environmental abnormality probability of the packaging equipment and the comprehensive characteristic value is taken as an evaluation value.

[0094] The concavity and filling degree are normalized, and then the normalized concavity and filling degree are added to obtain the comprehensive characteristic value; the abnormal probability of the equipment environment output in the BP neural network model in the current action is multiplied by the comprehensive characteristic value to obtain the evaluation value. The expression of the evaluation value is:

[0095] , where is the evaluation value; is the comprehensive characteristic value; is the probability value of device environment abnormality.

[0096] S5. Construct an evaluation curve, wherein the expression of the evaluation curve is:

[0097]

[0098] Where: represents the predicted evaluation value of the next moment, is the first coefficient, is the second coefficient, is the third coefficient, is the fourth coefficient, is the evaluation value of the first moment in the historical moment, is the evaluation value of the second moment in the historical moment, is the evaluation value of the third moment in the historical moment, is the evaluation value at the current moment, is a constant term. The smaller the value, the better the packaging quality of the next packaging bag. The larger the value, the worse the packaging quality of the next bag will be.

[0099] S6. In response to the predicted evaluation value being greater than a preset threshold, an alarm signal representing that the packaging quality is unqualified is generated.

[0100] The evaluation value of the next action is predicted according to the evaluation curve expression. By setting the evaluation value threshold, it is determined whether the predicted evaluation value of the next action is greater than the threshold, thereby determining whether the packaging quality of the packaging bag corresponding to the evaluation value of the next action is qualified. If the predicted evaluation value of the next action is less than the threshold, it means that the packaging quality of the packaging bag is qualified, and production continues. If the predicted evaluation value of the next action is greater than the threshold, the packaging quality of the packaging bag is unqualified, and an alarm signal representing unqualified packaging quality is generated. Exemplarily, the threshold is set according to actual experience, and the threshold is 0.7.

[0101] By collecting tensile strength, cutter pressure, cutter edge temperature, and slippage degree and inputting them into the BP neural network model, the abnormal probability of the equipment environment for the next action is predicted. By using multiple factors to predict the equipment environment, the accuracy of the prediction results is improved. At the same time, images are collected and the comprehensive feature values ​​of the images are calculated. Then, the evaluation values ​​are calculated based on the comprehensive feature values ​​combined with the abnormal probability values. The evaluation curve is obtained based on the evaluation values, and then whether the packaging quality of the packaging bag at the next moment is qualified is predicted, thereby improving the detection accuracy.

[0102] Figure 3 The structural block diagram of a water-soluble fertilizer packaging detection system based on image processing in this embodiment is schematically shown.

[0103] The present invention also provides a water-soluble fertilizer packaging detection system based on image processing. Figure 3 As shown, the water-soluble fertilizer packaging detection system includes a processor and a memory, and the memory stores computer program instructions. When the computer program instructions are executed by the processor, the water-soluble fertilizer packaging detection method based on image processing according to the present invention is implemented.

[0104] The safety warning system also includes other components familiar to those skilled in the art, such as a communication bus and a communication interface, whose settings and functions are known in the art and will not be described in detail here.

[0105] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus or device. For example, a computer-readable storage medium may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of a device or accessible or connectable to a device. Any application or module described in the present invention may be implemented using computer-readable / executable instructions that may be stored or otherwise maintained by such a computer-readable medium.

[0106] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.

Claims

1. A water-soluble fertilizer packaging detection method based on image processing, characterized in that: include: Calculate the concavity and filling degree, and take the sum of the concavity and filling degree as the comprehensive characteristic value; Concavity calculation: obtain the packaging bag image, perform binarization on the packaging bag image to obtain a binary image; perform edge detection on the binary image to extract the contour of the packaging bag area; Extract the left edge line and the right edge line based on the contour of the packaging bag area; calculate the number of inflection points of the left edge line and the right edge line respectively, and take the average number of inflection points of the left edge line and the right edge line as the concavity; Filling degree calculation: obtain the packaging bag image, perform binarization processing on the packaging bag image to obtain a binary image; multiply the binary image with the packaging bag image to obtain a packaging bag area image, segment the packaging bag area image to obtain the particle area and cavity area of ​​the packaging bag; The absolute value of the height difference between the particle area and the cavity area is taken as the filling degree; Predicting the probability of equipment environment abnormality using a preset time series network model includes: obtaining a training set, the training set including multiple groups of environmental data at historical moments, each group of environmental data is set with a corresponding label; Input the training set into the pre-built temporal network model for training; Calculate the cross entropy loss function between the output device environment abnormality probability and the device environment abnormality probability at the next moment; Use gradient descent to adjust model parameters to minimize the error between predicted and actual values; Iteratively adjust the parameters of the time series network model until the cross entropy loss function is less than the set value or reaches the preset number of iterations to obtain a trained time series network model; The real-time environmental data is input into the time series network model to obtain the probability of equipment environmental abnormality at the next moment, and the product of the environmental abnormality probability of the packaged equipment and the comprehensive characteristic value is used as the evaluation value; Environmental data include tensile strength data, cutter pressure data, cutter edge temperature data, and slippage degree data; Construct the evaluation curve, the expression is: Where: represents the predicted evaluation value of the next moment, is the first coefficient, is the second coefficient, is the third coefficient, is the fourth coefficient, is the evaluation value of the first moment in the historical moment, is the evaluation value of the second moment in the historical moment, is the evaluation value of the third moment in the historical moment, is the current moment evaluation value, is a constant term; In response to the predicted evaluation value being greater than a preset threshold, an alarm signal representing that the packaging quality is unqualified is generated.

2. A water-soluble fertilizer packaging detection method based on image processing according to claim 1, characterized in that: Or the calculation method of the concavity is: Acquire a packaging bag image, perform binarization processing on the packaging bag image, and obtain a binary image; Perform edge detection on the binary image and extract the contour of the packaging bag area; Extracting a left edge line and a right edge line based on the contour of the packaging bag area; The average value of the curvature radius of the left edge line and the curvature radius of the right edge line is taken as the concavity.

3. A water-soluble fertilizer packaging detection method based on image processing according to claim 1 or 2, characterized in that, Extracting the left edge line and the right edge line includes the following steps: Determine the edge point with the largest x-coordinate value and the edge point with the smallest x-coordinate value on the contour of the packaging bag area; Take the edge point with the smallest x-coordinate value as the starting point, along the edge of the contour of the packaging bag area, one side of the starting point is the first direction, and the other side of the starting point is the second direction; Obtaining adjacent edge points of the starting point along the first direction, calculating the gradient direction of the starting point and the adjacent edge points, and in response to the gradient direction being greater than a preset threshold, the adjacent edge point is the end point in the first direction, otherwise, the adjacent edge point is used as the starting point and the calculation is repeated; Similarly, find the end point in the second direction, and the contour line between the end point in the first direction and the end point in the second direction is the left edge line; Take the edge point with the largest x-coordinate value as the starting point, and similarly, get the right edge line.

4. A water-soluble fertilizer packaging detection method based on image processing according to claim 1, characterized in that, The method of calculating the number of inflection points of the left edge line and the right edge line comprises the following steps: Input the left edge line into the Douglas-Peucker algorithm to obtain multiple endpoints, and connect the multiple endpoints in sequence to obtain multiple line segments; Calculate the angle between two adjacent line segments, and take the number of angles greater than a preset threshold as the number of inflection points of the left edge line; Similarly, the right edge line is input into the Douglas-Peucker algorithm to obtain the number of inflection points of the right edge line.

5. A water-soluble fertilizer packaging detection method based on image processing according to claim 1, characterized in that: The calculation method of the slip degree data is: Obtaining the rotational angular velocity of the driving shaft and the rotational angular velocity of the film drawing shaft within a preset time period; The linear velocity of the particle on the surface of the drive shaft is calculated according to the rotational angular velocity of the drive shaft, and the arc length of the rotation of the particle on the surface of the drive shaft is obtained by integrating the linear velocity and the rotation time; The linear velocity of the particle on the surface of the film-drawing axis is calculated according to the rotation angular velocity of the film-drawing axis, and the arc length of the rotation of the particle on the surface of the film-drawing axis is obtained by integrating the linear velocity and the rotation time; The absolute value of the difference in arc length between the rotation of the particle point on the driving shaft surface and the particle point on the film drawing shaft surface is taken as the degree of slippage.

6. A water-soluble fertilizer packaging detection system based on image processing, characterized in that: include: processor; A memory storing computer instructions for water-soluble fertilizer packaging detection based on image processing, wherein when the computer instructions are executed by the processor, the system executes a water-soluble fertilizer packaging detection method based on image processing according to any one of claims 1 to 5.