Detection method, electronic device and storage medium for conveyor belt deviation in complex scenarios
By using the Sobel operator and morphological operations to filter edges in conveyor belt image processing, the accuracy problem of conveyor belt edge recognition in complex backgrounds is solved, and real-time and accurate detection of conveyor belt deviation is achieved.
Patent Information
- Application Number
- CN202210499089.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-09
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2042-05-09
AI Technical Summary
In complex environments, existing technologies struggle to accurately identify conveyor belt edges, leading to large errors in conveyor belt misalignment detection and impacting production efficiency and safety.
By acquiring images of the conveyor belt, information augmentation is performed using the Sobel operator, and morphological operations and the Candy operator or WatershedAlgorithm are combined to filter out debris, screen edges, and calculate edge scores to achieve accurate positioning of the conveyor belt edges.
It achieves accurate identification of conveyor belt edges in complex environments, has strong anti-interference capabilities, and meets the requirements of real-time industrial detection.
Smart Images

Figure CN114897819B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image processing, and in particular relates to a method for detecting conveyor belt deviation in complex scenes, an electronic device and a storage medium. Background Art
[0002] Modern science and technology are changing with each passing day, and the secondary industry is constantly developing towards automation and intelligence. The emergence of conveyor belts just meets the development trend of modern production intelligence, which not only saves labor costs and improves production efficiency, but also standardizes enterprise production management.
[0003] For coal mine production, conveyor belts are an indispensable main force of transportation. However, due to the complexity of the working environment and the heavy workload of the mine, conveyor belt deviation and other failures will cause serious economic losses to the factory, and even casualties. As the main force of transportation in mining, metallurgy, electricity, construction and other industries, the value of conveyor belts is 15% to 50% of the value of coal mine conveyors, and its importance is self-evident. With the expansion of production scale and the improvement of comprehensive mechanical capacity, the use of belts is also increasing. In coal mine production, the number of failures of coal mine conveyor belts is becoming more and more frequent, especially the failure of conveyor belt deviation, which has a very high incidence rate and is very destructive. Such accidents not only affect the production volume of coal mines, but also affect the progress of work, and even threaten the safety of workers; at the same time, they also bring huge economic losses to enterprises.
[0004] With the vigorous development of information technology, the field of digital images has gradually become richer, which has led to the transition from semi-automatic, hardware-dependent methods such as manual detection and mechanical photoelectric automatic correction methods used by coal mining enterprises to machine vision-based methods. However, there are still many problems. Due to the complexity of real scenes, these traditional edge recognition methods are difficult to achieve a good recognition effect. The reason is usually that the pre-processed images cannot achieve the effect of separating the complex background from the edge of the conveyor belt. Using methods based on deep learning usually cannot accurately locate the edge, resulting in too large an error in edge detection. Therefore, how to accurately identify the edge of the conveyor belt in a complex background is still facing huge challenges. Summary of the invention
[0005] The purpose of the present invention is to provide a method, electronic device and storage medium for detecting conveyor belt deviation in complex scenarios, so as to achieve the purpose of real-time and accurate detection of conveyor belt edges by processing images and sorting edges.
[0006] To achieve the above object, the present invention provides a method for detecting conveyor belt deviation in complex scenarios, comprising the following steps:
[0007] S1, acquiring a conveyor belt image along the conveying direction of the conveyor belt;
[0008] S2, intercept the region of interest in the image, and use the Sobel operator to enhance the information of the region of interest in a specific direction;
[0009] S3, using normalization to perform equalization adjustment on the image pixel values and perform binarization processing;
[0010] S4. Use morphological operations to filter debris on the conveyor belt;
[0011] S5. Use the Candy operator on the filtered image and set a large threshold to find as many edges as possible in the area of interest. If the Candy operator cannot find any edges, use the Watershed Algorithm to segment the image and then find the edges.
[0012] S6. Perform a preliminary screening of the obtained edges according to their trend, length and compactness:
[0013] The left edge of the conveyor belt is a straight line with a monotonically increasing angle between 0° and 90° with the horizontal line, and the right edge is a straight line with a monotonically decreasing angle between 90° and 180° with the horizontal line, so as to filter out the edges with different trends from the conveyor belt edge;
[0014] The length of the edge corresponding to the edge of the conveyor belt is longer, so as to filter out the edges whose length is lower than the first threshold;
[0015] Calculate the ratio of the total number of pixels of each edge to the length of the projection of the edge in the horizontal direction, and filter out edges whose ratio is lower than a second threshold;
[0016] S7. Different weights are given to the remaining edges according to their length, slope and relative position, the score of each edge is calculated, and they are sorted according to the score. The edge with a high score is the edge of the conveyor belt, and then it is determined whether the conveyor belt is deviating.
[0017] Preferably, the region of interest in the image is captured by the physical characteristics of the conveyor belt:
[0018] The conveyor belt runs through the entire image in the vertical direction and is located in the middle or near the middle of the image in the horizontal direction. Therefore, the region of interest can be obtained by cutting a section from the image in the horizontal direction.
[0019] Preferably, the sobel operator is used to enhance the information of the region of interest in the directions of 45° and 135°;
[0020] Among them, the 45° direction enhancement operator is: The 135° direction enhancement operator is:
[0021] Preferably, the normalization formula is as follows:
[0022]
[0023] Where i and j are pixel coordinates, src(i,j) is the input image pixel value, dst(i,j) is the output image pixel value, max and min are the maximum pixel value and the minimum pixel value, respectively.
[0024] Preferably, the debris includes spot-shaped objects and irregular-shaped objects, and the kernel sizes for filtering the spot-shaped objects and the irregular-shaped objects are 7*3 and 9*3 respectively.
[0025] Preferably, the threshold range of the Candy operator is 50 to 200.
[0026] Preferably, the weights of length, slope and relative position are 0.35, 0.15 and 0.5 respectively.
[0027] Preferably, the relative position is the median or average of the x values of all pixels on the edge.
[0028] The present invention also provides an electronic device, comprising one or more processors and a memory; one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the above-mentioned method for detecting conveyor belt deviation in complex scenarios.
[0029] The present invention also provides a computer-readable storage medium, in which program codes are stored, wherein the above-mentioned method for detecting conveyor belt deviation in complex scenarios is executed when the program codes are run.
[0030] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0031] The present invention is suitable for detecting conveyor belt deviation under complex backgrounds. Pseudo-edges are filtered out by processes such as image enhancement, possible edge filtering, and possible edge selection, thereby obtaining the edge of the conveyor belt. The present invention has strong anti-interference ability and good robustness, and can realize accurate recognition of the edge of the conveyor belt in complex environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is a flow chart of the method for detecting conveyor belt deviation in complex scenarios of the present invention;
[0033] Figure 2 It is a binary image after preliminary processing of the present invention;
[0034] Figure 3 is a binary image after filtering of the present invention;
[0035] Figure 4 The edge graphs for all the rankings included in the present invention;
[0036] Figure 5 It is the image of the region of interest after fitting in the present invention;
[0037] Figure 6 It is the effect diagram of the present invention in the original figure. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0039] In view of the serious safety accidents caused by conveyor belt deviation, the present invention proposes a detection method for conveyor belt deviation in complex scenarios. First, decode the video stream information collected by the camera, intercept the area of interest in the image through the physical characteristics of the conveyor belt, and use the sobel operator to enhance the information of the area of interest in a specific direction; secondly, use morphological filtering to filter out the debris on the conveyor belt to further enhance the edge information, and set the Candy operator as large as possible to find as many edges as possible in the area of interest by setting a threshold that conforms to the actual situation. If the Candy operator cannot find any edges, change the edge finding strategy, use the Watershed Algorithm to segment the image and then find the edges; then, consider the trend, length, and slope information of the obtained edges for screening and preliminary filtering; then, give different weights to all the edges found according to the length, slope, and relative position, and calculate the scores, and sort them according to the scores; finally, fit the points with the highest scores and restore them to the original image to determine whether the conveyor belt is deviating to meet industrial requirements.
[0040] The method for detecting conveyor belt deviation in complex scenarios according to the embodiment of the present invention is as follows: Figure 1 As shown, the following steps are included:
[0041] S1. Collect real-time conveyor belt images through the camera deployed at the conveyor belt position.
[0042] S2. The region of interest in the image is intercepted through the physical characteristics of the conveyor belt, and the Sobel operator is used to enhance the information of the region of interest in a specific direction.
[0043] Considering that the conveyor belt must run through the entire image in the vertical direction and is located in the middle or near the middle of the image in the horizontal direction, we can arbitrarily intercept an image of a width in the horizontal direction to obtain the region of interest containing the edge of the conveyor belt. The Sobel operator is used to enhance the specific direction (45° and 135°), and the 45° direction enhancement operator is: Its 135° direction enhancement operator is:
[0044] S3, use normalization to balance the image pixel values and perform binarization processing, the effect is as follows Figure 2 shown.
[0045] Normalization is used to process the image, and the formula is:
[0046]
[0047] Among them, src(i,j) is the input image pixel value, dst(i,j) is the output image pixel value, max and min are the maximum pixel value and the minimum pixel value respectively.
[0048] S4. Use morphological operations to filter out the spots, irregular objects and other debris on the conveyor belt. The kernel sizes of the filters are 7*3 and 9*3 respectively. The results after processing are as follows: Figure 3 shown.
[0049] S5. For the filtered image, use the Candy operator to set a threshold value that is as large as possible and in line with the actual situation to find as many edges as possible in the region of interest. The threshold setting range is 50 at the lowest and 200 at the highest. If the Candy operator cannot find any edges, change the edge finding strategy and use the Watershed Algorithm to segment the image before finding the edges.
[0050] S6. Filter the edges obtained by the Candy operator according to their trend, length, and compactness for preliminary filtering. The results are as follows: Figure 4 shown.
[0051] Obviously, the left edge of the conveyor belt is a straight line with a monotonically increasing angle between 0° and 90° with the horizontal line, and the right edge is a straight line with a monotonically decreasing angle between 90° and 180° with the horizontal line. Based on this feature, the left and right edges of the conveyor belt are filtered out respectively with edges that are different from the conveyor belt trend.
[0052] The length of an edge is the number of 255 pixel values it contains, so as to filter out pseudo edges that are too short.
[0053] Finally, the compactness of the edge is considered. The measurement standard is the ratio of the number of points with a pixel value of 255 on each edge to the projection length of the edge in the x-axis direction, so as to filter out edges with a ratio less than 0.95.
[0054] For all the edges found after filtering, different weights are calculated according to the length, slope and the median x-values of all the points on each edge as the score of the edge, where the weight of the length is 0.35, the weight of the slope is 0.15, and the weight of the x-value of the median of each edge is 0.5.
[0055] S7. Calculate scores for all filtered edges according to length, slope, and relative position with different weights, sort them according to the scores, fit the edges with the highest scores and restore them to the original image, such as Figure 5 and Figure 6 As shown, the real-time value of the edge is output.
[0056] The present invention also provides an electronic device, comprising one or more processors and a memory; one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the above-mentioned method for detecting conveyor belt deviation in complex scenarios.
[0057] The present invention also provides a computer-readable storage medium, in which program codes are stored, wherein the above-mentioned method for detecting conveyor belt deviation in complex scenarios is executed when the program codes are run.
[0058] The present invention can accurately and quickly detect the real-time position of the conveyor belt, meet industrial requirements, and has strong anti-interference ability and good robustness, and can realize real-time and accurate detection of the edge of the conveyor belt in complex environments.
[0059] It should be pointed out that, according to the needs of implementation, the various steps / components described in this application can be split into more steps / components, and two or more steps / components or partial operations of steps / components can be combined into new steps / components to achieve the purpose of the present invention.
[0060] It will be easily understood by those skilled in the art that the above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for detecting conveyor belt deviation in complex scenarios. It is characterized in that The following steps are involved: S1, acquiring a conveyor belt image along the conveying direction of the conveyor belt; S2, intercept the region of interest in the image, and use the Sobel operator to enhance the information of the region of interest in a specific direction; S3, using normalization to perform equalization adjustment on the image pixel values and perform binarization processing; S4. Use morphological operations to filter debris on the conveyor belt; S5. Use the Candy operator on the filtered image and set a large threshold to find as many edges as possible in the area of interest. If the Candy operator cannot find any edges, use the Watershed Algorithm to segment the image and then find the edges. S6. Perform a preliminary screening of the obtained edges according to their trend, length and compactness: The left edge of the conveyor belt is a straight line with a monotonically increasing angle between 0° and 90° with the horizontal line, and the right edge is a straight line with a monotonically decreasing angle between 90° and 180° with the horizontal line, so as to filter out the edges with different trends from the conveyor belt edge; The length of the edge corresponding to the edge of the conveyor belt is longer, so as to filter out the edges whose length is lower than the first threshold; Calculate the ratio of the total number of pixels of each edge to the length of the projection of the edge in the horizontal direction, and filter out edges whose ratio is lower than a second threshold; S7. Different weights are given to the remaining edges according to their length, slope and relative position, the score of each edge is calculated, and they are sorted according to the score. The edge with a high score is the edge of the conveyor belt, and then it is determined whether the conveyor belt is deviating.
2. According to the method for detecting conveyor belt deviation in complex scenarios described in claim 1, It is characterized in that Cut out the region of interest in the image using the physical features of the conveyor belt: The conveyor belt runs through the entire image in the vertical direction and is located in the middle or near the middle of the image in the horizontal direction. Therefore, the region of interest can be obtained by cutting a section from the image in the horizontal direction.
3. According to the method for detecting conveyor belt deviation in complex scenarios as described in claim 1, It is characterized in that The Sobel operator is used to enhance the information of the region of interest in the directions of 45° and 135°; Among them, the 45° direction enhancement operator is: The 135° direction enhancement operator is:
4. According to the method for detecting conveyor belt deviation in complex scenarios as described in claim 1, It is characterized in that The normalization formula is as follows: Where i and j are pixel coordinates, src(i,j) is the input image pixel value, dst(i,j) is the output image pixel value, max and min are the maximum pixel value and the minimum pixel value, respectively.
5. According to the method for detecting conveyor belt deviation in complex scenarios as described in claim 1, It is characterized in that The debris includes spot-like objects and irregular objects. The kernel sizes for filtering spot-like objects and irregular objects are 7*3 and 9*3 respectively.
6. According to the method for detecting conveyor belt deviation in complex scenarios as described in claim 1, It is characterized in that The threshold range for the Candy operator is 50 to 200.
7. The method for detecting conveyor belt deviation in complex scenarios according to claim 1, It is characterized in that The weights of length, slope, and relative position are 0.35, 0.15, and 0.5, respectively.
8. According to the method for detecting conveyor belt deviation in complex scenarios as described in claim 1, It is characterized in that The relative position is the median or average of the x values of all pixels on the edge.
9. An electronic device, It is characterized in that comprising one or more processors and memory; One or more programs are stored in a memory and configured to be executed by one or more processors, and the one or more programs are configured to execute the method for detecting conveyor belt deviation in complex scenarios as described in any one of claims 1 to 8.
10. A computer-readable storage medium, It is characterized in that A computer-readable storage medium stores program code, wherein when the program code is run, the method for detecting conveyor belt deviation in complex scenarios described in any one of claims 1 to 8 is executed.
