A belt conveyor edge detection method in complex environment
By applying image processing technology in belt conveyors, including normalized processing and edge detection algorithms, the accuracy and real-time problems of edge detection in complex environments are solved, and efficient edge detection and deviation correction effects are achieved, suitable for complex Belt conveyor in the background.
Patent Information
- Application Number
- CN202111179616.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-11
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2041-10-11
AI Technical Summary
The prior art is difficult to realize real-time accurate detection and deviation correction of belt conveyor edges in complex environments, and the equipment costs are high or the accuracy is poor.
By obtaining the original image of the belt conveyor, using normalization processing, Sobel edge detection operator, morphological expansion operation, eight-connection domain algorithm and other methods, the edge lines of the conveyor belt are extracted and marked to determine whether the conveyor belt is off and according to different Environmental conditions adjust parameters to improve detection accuracy and anti-interference ability.
Real-time detection of the edge of belt conveyor in complex environments is achieved, which improves the accuracy and robustness of detection, reduces equipment costs, and enhances the deviation correction effect.
Smart Images

Figure CN113971681B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image processing, and in particular to a belt conveyor edge detection method under complex environment. Background Art
[0002] Belt conveyors are a type of continuous transport machinery widely used in industries such as coal, construction, metallurgy, and electricity. Deviation of the conveyor belt is one of the most common faults of belt conveyors. Deviation not only increases the number of accidents of the conveyor and affects production, but also causes material spillage, reducing the economic efficiency of the transportation system. Edge detection of the conveyor belt can effectively detect whether the conveyor belt has deviated, so that the position of the conveyor belt can be adjusted through the terminal.
[0003] At present, the correction measures for conveyor belt deviation can be mainly divided into manual algorithms, mechanical and photoelectric automatic correction algorithms, etc. The equipment cost of mechanical correction algorithms is low, but the accuracy is poor; while the photoelectric automatic correction algorithm has high accuracy and good correction effect, but the equipment manufacturing cost is high. With the continuous development of science and technology, accurate and efficient detection of conveyor belt deviation through computer vision and image processing technology can not only reduce the labor intensity of manual detection and improve the automation level of enterprises, but also detect potential faults of conveyor belts early and improve the efficiency and accuracy of fault detection.
[0004] In addition, since the conveyor belt visual monitoring system needs to be operated online, the amount of image data information is very large. In order to realize the online operation of the system, a simple and efficient image processing algorithm needs to be adopted. If the conveyor belt image is processed by software, the complexity of the processing algorithm needs to be considered to avoid affecting the real-time performance of the system. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a belt conveyor edge detection method in a complex environment in response to the defects in the prior art. By detecting the edge position of the conveyor belt, it is determined whether the conveyor belt is deviating, so as to achieve the purpose of real-time and accurate detection and real-time correction of the conveyor belt position.
[0006] The technical solution adopted by the present invention to solve its technical problem is:
[0007] The present invention provides a belt conveyor edge detection method under complex environment, the method comprising the following steps:
[0008] Step 1: Obtain the original image of the belt conveyor in the natural environment;
[0009] Step 2: In the original image of the belt conveyor, select the conveyor belt ROI area using the specified coordinate points;
[0010] Step 3: Use the normalization processing method to adjust the image contrast of the ROI area, and design two different normalization parameters according to the problem of difference in conveyor belt edge recognition when there are materials on the conveyor belt and when there are no materials on the conveyor belt;
[0011] Step 4: Use the Sobel edge detection operator to enhance the image in the vertical direction, thereby strengthening the edge line and extracting the white line in the vertical direction, i.e., the edge line;
[0012] Step 5: Use morphological dilation to enhance the extracted vertical white lines, dilate the white points to increase the connected area of the edge lines, and perform binarization on the processed image;
[0013] Step 6: The processed image is further subjected to the eight-connected domain algorithm to delete the large white spots in the middle area of the conveyor belt;
[0014] Step 7. Find the two head points and two tail points of the edge line in the extracted image, connect the four points in pairs, and finally mark the straight line in the original image to obtain the edge detection result of the belt conveyor.
[0015] Furthermore, the specific method of step 1 of the present invention is:
[0016] Fix the camera above the belt conveyor, shoot the belt conveyor through the fixed camera position, and obtain the image of the belt conveyor in the natural environment.
[0017] Furthermore, the specific method of step 2 of the present invention is:
[0018] Use the specified coordinate values to select the area containing the edge of the conveyor belt and separate it from the background image.
[0019] Furthermore, the specific method of step three of the present invention is:
[0020] The normalization formula is:
[0021]
[0022] Among them, A k Represents the array that needs to be normalized, A i represents the original array, P represents the array obtained after normalization operation; A K Does not belong to {max(A i ),min(A i )}, when A K Equal to max(A i ) when p=1, when A K Equal to min(A i) when p=0, the normalization algorithm is used to make A k The values of the array are translated or scaled to a specified range.
[0023] Furthermore, the specific method of step 4 of the present invention is:
[0024] For the normalized image, Sobel edge detection is performed in the vertical direction to enhance the vertical lines;
[0025] According to the characteristics of the conveyor belt image, a vertical edge detection template is proposed; according to the characteristics that the straight line is horizontal and the pixel value between the straight lines is larger than the pixel value on the straight line, an enlarged difference method is proposed to detect the vertical edge; the vertical edge detection template is as follows:
[0026]
[0027] Among them, Gy represents the result value after sobel edge detection in the vertical direction, and A represents the image pixel matrix that needs to be edge detected; the template size is 3x3, and the template is convolved with the image to enhance the points in the vertical direction of the image and weaken the points in the horizontal direction to a certain extent to reduce interference.
[0028] Furthermore, the specific method of step five of the present invention is:
[0029] Use a fixed threshold to perform a binarization operation on the image, set the grayscale value of the pixel on the image to 0 or 255, set a threshold T, and use T to divide the image data into two parts: a pixel group greater than T and a pixel group less than T; that is, the part greater than the threshold is set to 255, and the part less than T is set to 0. The expression is:
[0030]
[0031] Among them, dst(x,y) represents the output image threshold, maxval represents the maximum grayscale value, src(x,y) represents the grayscale value of the original image, and thresh represents the set threshold T. According to the influence of the image under lighting, different binarization thresholds are set for conveyor belts in different scenes. In scenes with weak contrast, the left value of the threshold is reduced to enhance the edge of the conveyor belt. In scenes with strong contrast, the left value of the threshold is increased to reduce the influence of other noise points.
[0032] Furthermore, the specific method of step six of the present invention is:
[0033] The extracted binary image is processed in eight-way communication domain. For each pixel, the number of grayscale values of the surrounding pixels is counted as 0 or 255. According to the binary processing, if a pixel is part of the interference factor, then the grayscale value of this pixel in the binary result must be 255, that is, white; if a pixel is the background, then its grayscale value should be 0, that is, black.
[0034] So for a noise point, the pixels around it should all be a black background, that is, a noise pixel is white and the 8 adjacent pixels are all black; if the image resolution is high enough, a noise point may actually be composed of many pixels, that is, a pixel is white and the 8 adjacent pixels are black, which is greater than a fixed value, then this pixel is a noise point; for conveyor belts in different environments, the threshold of this fixed value is fixed.
[0035] Furthermore, the specific method of step seven of the present invention is:
[0036] According to the processed image, find the two head points and two tail points of the edge line in the extracted image, connect the four points in pairs, and finally mark the straight line in the original image to mark the edge of the conveyor belt; judge whether the position of the conveyor belt edge is within the set range according to the standard. If the detected position of the conveyor belt edge is within the set range, the conveyor belt is judged to be not deviated, otherwise it is deviated.
[0037] The beneficial effects of the present invention are as follows: the present invention is applicable to edge detection of belt conveyors under complex backgrounds, and the edge of the conveyor belt is accurately obtained by image enhancement, gradient edge extraction, and eight-link domain, so as to determine whether the belt conveyor is deviating according to the position of the conveyor belt edge. The present invention has strong anti-interference ability and good robustness, and can realize real-time edge detection of belt conveyors under complex environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:
[0039] Figure 1 It is a flow chart of an edge detection algorithm for a belt conveyor of the present invention;
[0040] Figure 2 is a normalized graph of the conveyor belt extracted by the present invention;
[0041] Figure 3 It is the conveyor belt sobel enhanced vertical line graph extracted by the present invention;
[0042] Figure 4 The present invention is a binary image of the extracted conveyor belt;
[0043] Figure 5 The present invention performs eight-link domain noise removal on the extracted conveyor belt;
[0044] Figure 6 It is a marking diagram of the extracted conveyor belt edge result of the present invention. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution 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 used to limit the present invention.
[0046] The flowchart of the belt conveyor edge detection method under complex environment of the embodiment of the present invention is as follows Figure 1 As shown, proceed as follows:
[0047] Step 1: Obtain the image of the belt conveyor in the natural environment through a fixed camera;
[0048] Step 2: In order to uniformly process the belt conveyor in the future and to avoid background interference, it is necessary to extract the ROI area of the belt conveyor before detection. The coordinates of four points are selected in the form of fixed coordinates, and the four points are connected in sequence to frame the ROI area. Then, the part outside the frame is masked and covered with black.
[0049] Step 3: In order to obtain better boundary extraction effect, the image is normalized before edge detection to improve the boundary contrast. In the case of material, the parameters in the normalization function are set to smaller values to reduce the contrast; in the case of no material, the parameters in the normalization function are set to larger values to increase the contrast. Normalization is to summarize the statistical distribution of the unified sample, and to limit the data to be processed within a certain range after processing. The formula is as follows:
[0050]
[0051] Among them, A K It does not belong to {max(Ai),min(Ai)}, when A K When it is equal to max(Ai), p=1, and when it is equal to min(Ai), p=0. The normalization algorithm is used to translate or scale the values of the array to a specified range. When using normalization processing, for images with low contrast, the right value should be increased, and for images with high contrast, the left value should be increased, so that the edge information can be better displayed, such as Figure 2 shown.
[0052] Step 4: After normalization, perform Sobel edge detection in the vertical direction to enhance the vertical lines. Inspired by the traditional edge detection algorithm, this paper proposes a vertical edge detection template based on the characteristics of the conveyor belt image. From the conveyor belt image, it can be analyzed that the interference lines on the middle part of the conveyor belt and the noise generated when transporting coal on the conveyor belt become more blurred after normalization, so the noise will not be enhanced when enhancing in the vertical direction. The traditional edge detection algorithm has a poor effect. According to the characteristics that the straight line is horizontal and the pixel value between the straight lines is larger than the pixel value on the straight line, an enlarged difference method is proposed to detect the vertical edge. The template is shown in the following formula.
[0053]
[0054] The template size is 3x3. The template is convolved with the image to enhance the points in the vertical direction of the image and weaken the points in the horizontal direction to a certain extent to reduce interference. Figure 3 shown.
[0055] Step 5: Use a fixed threshold to perform a binarization operation on the image, and set the grayscale value of the pixel on the image to 0 or 255, that is, the entire image presents a clear visual effect of only black and white. To directly extract the target object from a multi-valued digital image, a common method is to set a threshold T and use T to divide the image data into two parts: a group of pixels greater than T and a group of pixels less than T. Use the CV_THRESH_BINARY type to limit the binarization function. The purpose of the CV_THRESH_BINARY type is to set the part greater than the threshold to 255 and the part less than the threshold to 0. Its expression is:
[0056]
[0057] Among them, maxval represents the maximum grayscale value of 255. If the image is greater than the set maximum threshold thresh, it is replaced by maxval; otherwise, it is replaced by 0.
[0058] According to the influence of the image under lighting, different binarization thresholds are set for conveyor belts in different scenes. In scenes with weak contrast, the left value of the threshold is reduced to enhance the edge of the conveyor belt. In scenes with strong contrast, the left value of the threshold is increased to reduce the influence of other noise points.
[0059] Step 6: Perform eight-link domain processing on the extracted binary image. This method is similar to mean filtering, but for each pixel, instead of taking the grayscale average of the surrounding pixels, the number of grayscale values of the surrounding pixels is counted, which is 0 or 255. From the previous binarization process, we know that if a pixel is part of the interference factor, then the grayscale value of this pixel in the binarization result must be 255, that is, white; if a pixel is the background, its grayscale value should be 0, which is black. Therefore, for isolated noise points, the surroundings should be black, or most of the points are black pixels.
[0060] So for a noise point, the pixels around it should all be a black background. To be precise, a noise pixel is white and the 8 adjacent pixels are all black. Of course, if the image resolution is high enough, a noise point may actually be composed of many pixels, so the judgment condition should be relaxed at this time, that is, if a pixel is white and the 8 adjacent pixels are black and greater than a fixed value, then this pixel is a noise point. For conveyor belts in different environments, this threshold is fixed, so you can set the size here, try several times, and find the best threshold. After testing, the 8-connected domain denoising method is very effective for removing small noise points, and the calculation amount is not large. Comparison Figure 4 and Figure 5 , it can be clearly seen Figure 5 Reduced some white noise.
[0061] Step 7: The edge of the conveyor belt is located inside the image. Based on the straight line obtained in step 6, we can find the four starting points of the two straight lines, and then determine a straight line between the two points. Connect the four points in pairs to calibrate the edge of the conveyor belt. According to the standard, determine whether the position of the conveyor belt edge is within the set range and give the detection result.
[0062] It should be understood that those skilled in the art can make improvements or changes based on the above description, and all these improvements and changes should fall within the scope of protection of the appended claims of the present invention.
Claims
1. A belt conveyor edge detection method in a complex environment, characterized in that: The method comprises the following steps: Step 1: Obtain the original image of the belt conveyor in the natural environment; Step 2: In the original image of the belt conveyor, select the conveyor belt ROI area using the specified coordinate points; Step 3: Use the normalization processing method to adjust the image contrast of the ROI area, and set two different normalization parameters according to the problem of difference in conveyor belt edge recognition when there are materials on the conveyor belt and when there are no materials on the conveyor belt; Step 4: Use the Sobel edge detection operator to enhance the image in the vertical direction, thereby strengthening the edge line and extracting the white line in the vertical direction, i.e., the edge line; Step 5: Use morphological dilation to enhance the extracted vertical white lines, dilate the white points to increase the connected area of the edge lines, and perform binarization on the processed image; Step 6: The processed image is further subjected to the eight-connected domain algorithm to delete the large white spots in the middle area of the conveyor belt; Step 7: Find the two head points and two tail points of the edge line in the extracted image, connect the four points in pairs, and finally mark the straight line in the original image to obtain the edge detection result of the belt conveyor; The specific method of step 4 is: For the normalized image, Sobel edge detection is performed in the vertical direction to enhance the vertical lines; According to the characteristics of the conveyor belt image, a vertical edge detection template is proposed; according to the characteristics that the straight line is horizontal and the pixel value between the straight lines is larger than the pixel value on the straight line, an enlarged difference method is proposed to detect the vertical edge; the vertical edge detection template is as follows: Where Gy represents the result value after the vertical sobel edge detection, and A represents the image pixel matrix that needs to be edge detected; the template size is 3x3, and the template is convolved with the image to enhance the points in the vertical direction of the image and weaken the points in the horizontal direction to a certain extent to reduce interference; The specific method of step six is: The extracted binary image is processed in the eight-way domain. For each pixel, the number of grayscale values of the surrounding pixels is counted as 0 or 255. According to the binary processing, if a pixel is part of the interference factor, then the grayscale value of this pixel in the binary result must be 255, that is, white; if a pixel is the background, then its grayscale value is 0, that is, black. So for a noise point, the pixels around it should all be a black background, that is, a noise pixel is white and the 8 adjacent pixels are all black; if the image resolution is high enough, a noise point may actually be composed of many pixels, that is, a pixel is white and the 8 adjacent pixels are black, which is greater than a fixed value, then this pixel is a noise point; for conveyor belts in different environments, the threshold of this fixed value is fixed.
2. The belt conveyor edge detection method under complex environment according to claim 1 is characterized in that: The specific method of step one is: Fix the camera above the belt conveyor, shoot the belt conveyor through the fixed camera position, and obtain the image of the belt conveyor in the natural environment.
3. The belt conveyor edge detection method under complex environment according to claim 1 is characterized in that: The specific method of step 2 is: Use the specified coordinate values to select the area containing the edge of the conveyor belt and separate it from the background image.
4. The belt conveyor edge detection method under complex environment according to claim 1 is characterized in that: The specific method of step three is: The normalization formula is: Among them, A k Represents the array that needs to be normalized, A i represents the original array, P represents the array obtained after normalization operation; A K Does not belong to {max(A i ),min(A i )}, when A K Equal to max(A i ) when p=1, when A K Equal to min(A i ) when p=0, the normalization algorithm is used to make A k The values of the array are translated or scaled to a specified range.
5. The belt conveyor edge detection method under complex environment according to claim 1 is characterized in that: The specific method of step five is: Use a fixed threshold to perform a binarization operation on the image, set the grayscale value of the pixel on the image to 0 or 255, set a threshold T, and use T to divide the image data into two parts: a pixel group greater than T and a pixel group less than T; that is, the part greater than the threshold is set to 255, and the part less than T is set to 0. The expression is: Among them, dst(x,y) represents the output image threshold, maxval represents the maximum grayscale value, src(x,y) represents the grayscale value of the original image, and thresh represents the set threshold T. According to the influence of the image under lighting, different binarization thresholds are set for conveyor belts in different scenes. In scenes with weak contrast, the left value of the threshold is reduced to enhance the edge of the conveyor belt. In scenes with strong contrast, the left value of the threshold is increased to reduce the influence of other noise points.
6. The belt conveyor edge detection method under complex environment according to claim 1 is characterized in that: The specific method of step seven is: According to the processed image, find the two head points and two tail points of the edge line in the extracted image, connect the four points in pairs, and finally mark the straight line in the original image to mark the edge of the conveyor belt; According to the standard, it is judged whether the position of the edge of the conveyor belt is within the set range. If the position of the edge of the conveyor belt detected is within the set range, the conveyor belt is judged to be not deviated, otherwise it is deviated.
