A ladder detection method for ladder room in coal mine ventilation shaft

Through bilateral filtering and emission distance calculation technology, the coal ash and crack characteristics between coal mine wind shaft ladders are distinguished, which solves the problem of coal ash affecting crack identification and achieves the accuracy and accuracy of ladder detection results.

CN117392068BActive Publication Date: 2024-09-20HUAIBEI MINING CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311273515.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-28
Publication Date
2024-09-20
Estimated Expiration
2043-09-28

AI Technical Summary

Technical Problem

The pixel values ​​of the coal ash area and the crack area between the ladders in the coal mine air shaft are close, making it difficult for the image recognition system to accurately identify the cracks on the ladder surface, which affects the maintenance personnel's determination of the degree of damage to the ladder.

Method used

Obtain images of the ladder room through inspection equipment, use bilateral filtering and filter window technology to obtain standard images, calculate the emission distance of pixels to distinguish cracks and coal ash features, and fill in crack features covered by coal ash to ensure detection results accuracy.

Benefits of technology

Effectively distinguishing soot and crack features ensures the accuracy of ladder detection results, reduces the impact of salt and pepper noise on images, and improves the boundary clarity and recognition accuracy of crack features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117392068B
    Figure CN117392068B
Patent Text Reader

Abstract

The invention relates to the field of unmanned detection of coal mine ventilation shafts, and in particular to a method for detecting ladders in ladder rooms in coal mine ventilation shafts. The invention first filters an image shot in the ladder room and has a large amount of salt and pepper noise, thereby achieving a filtering function and ensuring the clarity of image feature boundaries. A close-up image of the ladder surface is then obtained through a filter window, and a binary image is obtained. The emission distance of pixel points in a foreground area in the binary image is then calculated to distinguish between crack features and coal ash features. The pixel points of the coal ash part are then removed, and finally the crack features that are broken due to being covered by coal ash are filled to obtain a complete crack feature size, thereby ensuring the accuracy of the crack features outputted by the detection result, and finally outputting a crack image containing the crack features and the crack width. The invention solves the problem that some coal ash areas in the ladder room of the coal mine ventilation shaft easily affect the system from accurately identifying the crack size through images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of unmanned detection of coal mine ventilation shafts, and in particular to a ladder detection method for a ladder room in a coal mine ventilation shaft. Background Art

[0002] After the coal mine ventilation shaft is officially put into production, it is responsible for the special purpose of total return air for the entire mine, and the environment is extremely harsh. Few people can set foot here on a daily basis, making it impossible to control the safety facilities inside. However, the ladder room in the ventilation shaft is the last evacuation route in case of major safety accidents, and the observation and maintenance of the shaft wall structure and the internal ladder room must be strengthened.

[0003] Since almost no one steps into the ladder room of the coal mine ventilation shaft all year round, it is easy for black dust particles from the coal mine or rock wall to adhere to the surface of the ladder, thus forming a black coal ash area on the ladder surface (such as Figure 1 When the image is recognized later to determine whether there are cracks on the ladder surface, the crack features are generally extracted through pixel values. However, since the pixel value of coal ash is extremely close to the pixel value of cracks, when the cracks on the ladder surface are recognized through images, the black area composed of coal ash is easily mistaken for the cracks on the ladder surface. Or when the black area happens to be attached to the crack surface, it is easy to affect the recognition of the crack size, causing maintenance personnel to misjudge the degree of damage to the ladder. Summary of the invention

[0004] In view of the deficiencies of the prior art, the present invention provides a ladder detection method for ladder rooms in coal mine ventilation shafts, which solves the problem in the prior art that some coal ash areas in ladder rooms in coal mine ventilation shafts easily affect the system's accurate identification of crack size through images.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] A method for detecting a ladder in a ladder room in a coal mine ventilation shaft, comprising:

[0007] S1. Obtain the current status image of the ladder in the ladder room through the inspection equipment, establish the filtering window of each pixel point to be filtered in turn according to the gradient of the pixel value between the pixel points, and use the pixel median of the filtering window as the pixel value of the pixel point to be filtered to perform bilateral filtering to obtain a filtered image;

[0008] S2, setting a filter window according to the shooting distance of the inspection equipment's shooting lens, intercepting image features within the filter window in the filtered image to obtain a standard image;

[0009] S3, judging whether there are crack features in the standard image;

[0010] If yes, proceed to step S4;

[0011] If not, output a prompt message that there are no cracks on the ladder surface;

[0012] S4, performing binary processing on the standard image to obtain a binary image, calculating the emission distance of each pixel point on the foreground area of ​​the binary image along its normal vector to the plane where the background area is located, and obtaining a crack image according to the emission distance;

[0013] S5, determining a crack boundary and a crack skeleton of the crack feature in the crack image, and calculating a crack width of the crack feature along the crack skeleton;

[0014] S6, selecting a crack image with several crack features, calculating a filling skeleton between the crack skeletons of the several crack features, and obtaining a filling boundary corresponding to the filling skeleton according to the crack width;

[0015] S7. Outputting a crack image with only one crack feature and the actual position coordinates of the crack feature as a ladder detection result.

[0016] Preferably, in step S1, the following steps are specifically included:

[0017] S11, select any pixel point to be filtered on the current image as a window point, calculate the gradient between the pixel values ​​of each pixel point around the window point, and select several pixel points with the lowest gradient to establish a filtering window;

[0018] S12, obtaining pixel values ​​of all pixels in the filter window, and selecting a pixel median from all pixel values;

[0019] S13, taking the pixel median of the pixel to be filtered as the pixel value of the pixel to be filtered, and performing bilateral filtering on the pixel to be filtered; the formula for performing bilateral filtering on the pixel to be filtered is:

[0020]

[0021] in,

[0022]

[0023] In the above formula, g(i) is the pixel value of point i after filtering, μ(i) is the correlation value, i and j represent the positions of two pixels in the image, where point j belongs to a pixel in the filtering window Q, D(i, j) represents the Euclidean distance between pixel i and pixel j, and M i is the pixel median of the pixel values ​​of each pixel in the filter window Q containing pixel i, X j represents the pixel value of pixel j, Δ(M i , X j ) represents the pixel median M of point ii and the pixel value X of pixel j j The grayscale difference between them, A and B are two constants used to measure the amount of image filtering, and e is a natural constant;

[0024] S14, repeating steps S11 to S13 to sequentially complete the filtering process of each pixel to be filtered on the current image to obtain a filtered image;

[0025] Preferably, in step S2, the following steps are specifically included:

[0026] S21, setting the filtering radius width of the inspection equipment shooting lens filtering window;

[0027] S22, calculating the actual distance between the actual position corresponding to each pixel point on the filtered image and the camera of the inspection device;

[0028] S23, eliminating the pixel points whose actual distance is greater than the filtering radius threshold to obtain a standard image.

[0029] Preferably, in step S4, the following steps are specifically included:

[0030] S41, performing binarization processing on the standard image, dividing the binarized image into a plurality of binary images containing only a foreground area, and obtaining coordinates of a plurality of pixel points in the background area on the binary image;

[0031] S42, fitting a reference plane with the plurality of points as references, arbitrarily selecting two perpendicular straight lines on the reference plane to respectively establish an X-axis and a Y-axis, and establishing a Z-axis perpendicular to the reference plane and facing the end of the camera to intersect the X-axis and the Y-axis, so as to obtain a binary coordinate system;

[0032] S43, establishing a foreground three-dimensional model according to the binary coordinate system and the pixel coordinates of the foreground area on the binary image;

[0033] S44, calculating the emission distance of each pixel point on the foreground three-dimensional model along the normal vector of the point to the reference plane;

[0034] S45, setting a transmission distance threshold range, and selecting pixel points in the foreground area of ​​the binary image whose transmission distances are within the transmission distance threshold range to obtain a crack image.

[0035] Preferably, in step S44, the following steps are specifically included:

[0036] S441, selecting any pixel point on the foreground three-dimensional model as a sampling point, obtaining a number of pixel points adjacent to the sampling point as base points, and obtaining the coordinates of the several base points according to a binary coordinate system;

[0037] S442, fitting the coordinates of several base points to obtain a vertical plane;

[0038] S443, vertically projecting the sampling point onto the vertical plane to obtain a projection point, and obtaining a normal vector of the sampling point;

[0039] S444, calculating the vertical distance from the sampling point to the reference plane;

[0040] S445, calculating the emission distance from the sampling point along the normal vector of the point to the reference plane; the calculation formula of the emission distance is:

[0041]

[0042] In the above formula, D represents the emission distance from the sampling point along the normal vector of the point to the reference plane, d represents the vertical distance from the sampling point to the reference plane, |P| is the modulus of the normal vector of the sampling point, O z -O' z Indicates the height difference between the sampling point and the projection point;

[0043] S446. Repeat steps S441 to S445 to sequentially calculate the emission distance of each pixel point on the foreground three-dimensional model.

[0044] Preferably, in step S5, the following steps are specifically included:

[0045] S51, obtaining a crack boundary and a crack skeleton of crack features in a crack image;

[0046] S52, sequentially obtaining the coordinates of any pixel point on the crack skeleton, and obtaining two adjacent pixel points on both sides of the pixel point from the crack skeleton, so as to obtain a vertical plane passing through the pixel point and perpendicular to the line connecting the two adjacent pixel points;

[0047] S53, obtaining a plurality of intersection points between the vertical plane and the crack skeleton;

[0048] S54, respectively calculating the distance and vector from the pixel point to each intersection point;

[0049] S55, selecting two intersection points with opposite vectors and the smallest sum of distances from the pixel point, and the width of the crack at the pixel point is the sum of the distances;

[0050] Preferably, in step S6, the following steps are specifically included:

[0051] S61, selecting crack images containing a number of crack features, establishing a plane coordinate system with the plane where the crack skeleton is located, calculating the distances between the endpoints of the crack skeletons of the several crack features, and selecting two crack skeletons with the smallest endpoint distances by comparison method;

[0052] S62, taking the unit length of the pixel point as the step distance, sequentially obtaining the Y coordinates of the pixel points on the crack skeleton, and establishing two data sequences of the crack skeleton respectively along the X-axis direction;

[0053] S63, obtaining a first trajectory curve by fitting the data sequences of the two crack skeletons, calculating corresponding Y values ​​according to the first trajectory curve and the X-axis coordinate values ​​in the data sequence, and arranging the Y values ​​in sequence to obtain a prediction sequence;

[0054] S64, sequentially differencing the prediction sequence and the data sequence, and sequentially arranging the difference values ​​to obtain a difference sequence;

[0055] S65, selecting the maximum value and the minimum value in the difference sequence according to the comparison method, subtracting the minimum value from the maximum value to obtain the difference interval, and dividing the difference interval into a plurality of state intervals;

[0056] S66. Establish a difference probability transfer matrix according to the state interval and the difference sequence; the expression of the difference probability transfer matrix is:

[0057]

[0058] In the above formula, P represents the difference probability transfer matrix, P mn It represents the probability that the difference value transfers from the mth state interval to the nth state interval;

[0059] S67, calculating the pixel coordinates between the two crack skeletons according to the first trajectory curve, the difference probability transfer matrix and the state interval to obtain a filled skeleton; the calculation formula of the pixel coordinates between the two crack skeletons is:

[0060]

[0061] In the above formula, Y represents the Y-axis coordinate value calculated according to the X-axis coordinate value of the pixel point between the two crack skeletons, f1 represents the first trajectory curve, and P τR represents the probability of the residual data transferring from the τth state interval to the Rth state interval, Represents the average value of the upper and lower limits of the Rth state interval;

[0062] S68, repeating steps S61 to S68 until only one crack feature exists on the crack image;

[0063] S69, calculating the average crack width on each crack image, and obtaining the corresponding filling boundary according to the filling skeleton.

[0064] S7. Output a crack image with crack features and a crack width corresponding to the crack features.

[0065] Compared with the prior art, the present invention provides a ladder detection method for ladder rooms in coal mine ventilation shafts, which has the following beneficial effects:

[0066] 1. The present invention first filters the image taken between ladders and has a large amount of salt and pepper noise, then obtains a close-up image of the ladder surface through a filter window, and selects the close-up image containing crack features as a standard image, then converts the standard image into a binary image, and then calculates the emission distance of the pixel points in the foreground area of ​​the binary image to achieve the distinction between the crack features and the coal ash features, then removes the pixel points of the coal ash part, and finally fills the crack features that are broken due to being covered by coal ash to obtain the complete crack feature size, thereby ensuring the accuracy of the crack features output by the detection result.

[0067] 2. The present invention selects a filter window according to the gradient between pixel vectors, and further performs bilateral filtering by replacing the pixel value of the pixel to be filtered with the pixel median of the filter window. On the one hand, it solves the defect that the existing bilateral filtering cannot filter salt and pepper noise during filtering. At the same time, by obtaining the filter window through the gradient, it can also ensure the clarity of the image feature boundary and ensure that the image feature boundary will not change after filtering.

[0068] 3. The present invention introduces the concept of emission distance. When the height difference between the crack feature and the coal ash feature in the image is extremely small, due to the huge difference in the normal vectors of the pixel points on the two images, the distance from the point along the normal vector to the reference plane is calculated, thereby further expanding the difference between the crack feature and the coal ash feature, thereby realizing the separation of the crack feature and the coal ash feature.

[0069] 4. The present invention places multiple crack skeletons whose crack features are divided by coal ash features on a plane coordinate system in the form of a function curve, and statistically calculates the curve law of the crack skeleton based on the discrete form of pixel points on the crack skeleton, thereby realizing the function of restoring the crack skeleton and restoring the crack features based on the crack width. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0071] Figure 1 Schematic diagram of fly ash characteristics and crack characteristics on the ladder surface;

[0072] Figure 2 is a flow chart of a ladder detection method of the present invention;

[0073] Figure 3A flowchart of a method for calculating the emission distance from a pixel point along a normal vector to a reference plane according to the present invention;

[0074] Figure 4 A flow chart of a method for calculating a filling boundary according to a crack width and a filling skeleton according to the present invention;

[0075] Figure 5 It is a schematic diagram of the emission distance of pixels on cracks and coal ash of the present invention. DETAILED DESCRIPTION

[0076] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific implementation methods, so that the implementation process of how the present application uses technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly.

[0077] Those skilled in the art can understand that all or part of the steps in the following embodiments can be completed by instructing the relevant hardware through a program, so the present application can be in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0078] The ladders in the coal mine air shaft are generally made of fiberglass, which is light and brittle. They are fixed to each other by rivets or bolts. After long-term use in the coal mine air shaft, the ladders will crack due to their brittleness. Due to the complex environment in the air shaft, environmental factors such as noise, water, dust, vortex wind flow, and huge temperature difference in the coal mine air shaft will cause a large amount of salt and pepper noise on the captured images, affecting the clarity of the image. At the same time, coal dust attached to the surface of the ladder will also interfere with the system's accurate identification of cracks, and it is easy to misjudge the area where coal dust is attached as a crack, or when coal dust is attached to the crack, it is easy to affect the identification of the length and width of the crack.

[0079] Figure 1-Figure 5 In one embodiment of the present invention, in order to reduce the interference of various complex factors in the coal mine ventilation shaft on the ladder image recognition, accurately identify the cracks on the ladder, and reduce the interference of coal mine dust on crack recognition, this embodiment provides a ladder detection method between ladders in the coal mine ventilation shaft, the method comprising:

[0080] S1. Obtain the current status image of the ladder in the ladder room through the inspection equipment, establish the filtering window of each pixel to be filtered in turn according to the gradient of the pixel values ​​between the pixel points, and use the pixel median of the filtering window as the pixel value of the pixel to be filtered to perform bilateral filtering to obtain a filtered image; the inspection equipment can be a drone or other mobile device installed on a fixed track and equipped with a shooting device.

[0081] Since the images taken in the mine contain a lot of salt and pepper noise, in order to prevent the salt and pepper noise from being exactly the point to be filtered and causing the bilateral filtering to be invalid, it is necessary to select a certain window area from the surrounding according to the position of the salt and pepper noise, and use the pixel median of the window area to replace the original pixel value of the point to be filtered for filtering to ensure the effect of bilateral filtering. In step S1, the following steps are specifically included:

[0082] S11, select any pixel point to be filtered on the current image as a window point, calculate the gradient between the pixel values ​​of each pixel point around the window point, and select several pixel points with the lowest gradient to establish a filtering window;

[0083] When the pixel to be filtered is exactly at the feature boundary, in order to avoid the selected filtering window containing the pixel to be filtered exactly crossing the feature boundary, resulting in blurred boundary or boundary change after filtering, in step S11, the following steps are specifically included:

[0084] S111, obtaining any pixel point to be filtered on the current image as a window point, and obtaining the pixel value of the window point;

[0085] S112, taking the window point as the starting point, traverse all the adjacent pixel points around as nodes, and obtain the pixel values ​​of the nodes;

[0086] S113, establishing pixel vectors of each pixel point respectively based on the pixel values ​​of the window point and each node;

[0087] M x,y =[R x,y ,G x,y ,B x,y ,G x,y -R x,y ,B x,y -R x,y ,G x,y -B x,y ]

[0088] M x',y' =[R x',y' ,G x',y' ,B x',y' ,G x',y' -R x',y' ,B x',y' -R x',y' ,Gx',y' -B x',y' ]

[0089] In the above formula, M(x,y) and M(x',y') represent the pixel vectors at the window point (x,y) and node (x',y') on the current image, respectively. x,y , G x,y and B x,y Respectively represent the red, green, and blue pixel values ​​at the window point (x, y) on the current image, (x', y') is the coordinate of the pixel points adjacent to the window point coordinate (x, y), therefore, there are generally 8 adjacent pixel points, i.e., nodes, around each window point located at the non-edge position of the current image, there are generally 5 adjacent nodes around the window point located at the edge of the current image, and there are generally 3 adjacent nodes around the window point located on the current image;

[0090] S114, respectively calculating the gradient between the pixel vector of the window point and the pixel vector of each node adjacent to it; the calculation formula of the gradient is:

[0091]

[0092] In the above formula, f[(x,y),(x',y')] represents the gradient value of the pixel vector at the window point (x,y) and its adjacent node (x',y') on the current image, D 2 (●) means calculating the square of the difference between the two elements in the brackets. and Represents the pixel vector M x,y and M x',y' The value of the i-th element in ; the higher the gradient, the greater the color difference between the two pixels, and it is not suitable as the sample data for selecting the pixel median.

[0093] S115, using a comparison method to select a node with the smallest gradient with the window point, and adding the node to the window point;

[0094] S116, repeating steps S112 to S115 to obtain a number of connected window points, and using the window points as the filtering windows of the initial window points.

[0095] By this method, the pixel medians of several pixel points with the lowest gradient around the pixel point to be filtered are obtained in turn, and the pixel value of the pixel point to be filtered is replaced by the pixel median. When the pixel point to be filtered is located on the feature boundary, if the pixel point to be filtered is not a salt and pepper noise point, the pixel median can perfectly replace the pixel value of the pixel point to be filtered. If the pixel point to be filtered is a salt and pepper noise point, the pixel value of the pixel point to be filtered is randomly replaced by the pixel median of the pixels on both sides of the feature boundary. In practice, it is difficult to determine which side of the feature boundary the pixel point to be filtered belongs to. However, by this method, the boundary of the pixel points adjacent to the feature boundary can be well guaranteed. In addition, for the case where there are several salt and pepper noise points adjacent to each other, the salt and pepper noise can be eliminated by taking the filtering window multiple times, while ensuring the accuracy of the pixel value after filtering the salt and pepper noise point, which is a function that traditional bilateral filtering cannot achieve.

[0096] S12, obtaining pixel values ​​of all pixel points in the filter window, and selecting a pixel median from all pixel values; a median function may be used to obtain the pixel median from a series of pixel data;

[0097] S13, taking the pixel median of the pixel to be filtered as the pixel value of the pixel to be filtered, and performing bilateral filtering on the pixel to be filtered;

[0098] The formula for bilateral filtering of the pixels to be filtered is:

[0099]

[0100] in,

[0101]

[0102] In the above formula, g(i) is the pixel value of point i after filtering, μ(i) is the correlation value, i and j represent the positions of two pixels in the image, where point j belongs to a pixel in the filtering window Q, D(i, j) represents the Euclidean distance between pixel i and pixel j, and M i is the pixel median of the pixel values ​​of each pixel in the filter window Q containing pixel i, X j Represents the pixel value of pixel j, Δ(M i , X j ) represents the pixel median M of point i i and the pixel value X of pixel j j The grayscale difference between them, A and B are two constants used to measure the amount of image filtering, and e is a natural constant.

[0103] In this way, when pixel i happens to be a noise point, the pixel median M of pixel i is obtained in the filter window Q. iTo replace the original pixel value X at pixel i i , so as to ensure the filtering effect at pixel i, which can not only smooth the noise well, but also protect the feature edges in the image.

[0104] S14, repeating steps S11 to S13 to sequentially complete filtering processing on each pixel to be filtered on the current image to obtain a filtered image.

[0105] S2, setting a filter window according to the shooting distance of the inspection equipment's shooting lens, intercepting image features within the filter window in the filtered image to obtain a standard image;

[0106] In order to reduce the interference of the complex background image in the ladder room, avoid misjudgment in the feature recognition in the image in the later stage, and improve the accuracy of identifying the features in the image, in step S2, the following steps are specifically included:

[0107] S21, setting the filtering radius width of the inspection equipment shooting lens filtering window;

[0108] S22, calculating the actual distance between the actual position corresponding to each pixel point on the filtered image and the camera of the inspection device, and the calculation formula of the actual distance is:

[0109] S i =fD(n,m)

[0110] In the above formula, S i is the distance between the actual position corresponding to the i-th pixel and the inspection device camera, f is the focal length of the inspection device camera when shooting the image containing the actual position represented by pixel i, n and m are the two moments when the inspection device camera shoots the actual position represented by pixel i, and D(n, m) represents the distance moved by the inspection device camera between moments n and m.

[0111] S23, eliminating the pixel points whose actual distance is greater than the filtering radius threshold to obtain a standard image.

[0112] By only setting the inspection track of the inspection equipment, it can be ensured that the image taken by the inspection equipment is an image of the ladder that is close to it, reducing background interference, thereby reducing post-processing of the image and reducing misjudgment of the image, so as to better obtain the characteristic information of the ladder surface.

[0113] S3. Determine whether there are crack features in the standard image. The standard image can be identified by a convolutional neural network or an algorithm such as OSTU, and whether there are crack features in the standard image can be determined based on the difference between the pixel value of the crack feature and other feature pixel values.

[0114] If yes, proceed to step S4;

[0115] If not, then output a prompt message that there are no cracks on the ladder surface;

[0116] However, since the pixel values ​​of coal ash and cracks are close, when retaining the standard image containing crack features, the image may also contain coal ash features. Therefore, it is necessary to enter step S4 and further remove the coal ash features through other methods to obtain complete crack features.

[0117] S4, performing binary processing on the standard image to obtain a binary image, calculating the emission distance of each pixel point on the foreground area of ​​the binary image along its normal vector to the plane where the background area is located, and obtaining a crack image according to the emission distance;

[0118] Since the ladder room is not entered for a long time, a large amount of dust or coal dust will fall on the surface, which will clump on the ladder surface. The pixel values ​​of these dust and coal dust are very close to the pixel values ​​of the ladder cracks, so they will interfere with the identification of the cracks. It is necessary to accurately remove the dust and coal dust blocks to obtain the crack image. In step S4, the following steps are specifically included:

[0119] S41, binarizing the standard image, dividing the binarized image into a plurality of binary images containing only a foreground area, and obtaining the coordinates of a plurality of pixel points in the background area of ​​the binary image; each foreground area is a coal dust block, or a crack feature, or a feature of a coal dust block and a crack feature fused together, and the foreground area or other features in the image can be marked and extracted by software such as MATLAB or LabelImg;

[0120] S42, fitting a reference plane with the plurality of points as references, arbitrarily selecting two perpendicular straight lines on the reference plane to respectively establish an X-axis and a Y-axis, and establishing a Z-axis perpendicular to the reference plane and facing the end of the camera to intersect the X-axis and the Y-axis, so as to obtain a binary coordinate system;

[0121] S43, establishing a foreground three-dimensional model according to the binary coordinate system and the pixel coordinates of the foreground area on the binary image;

[0122] S44, calculating the emission distance of each pixel point on the foreground three-dimensional model along the normal vector of the point to the reference plane;

[0123] The difference between a crack and a coal dust block is that one is convex and the other is concave, but the change in pixel coordinates is not obvious, the distance from the reference plane is small, and the XY plane of the binary coordinate system is difficult to be exactly on the plane of a normal ladder. Therefore, it is difficult to simply judge whether the pixel is in a convex or concave state by the height of the Z axis of the pixel, and the flatness of the ladder surface is relatively poor, so the XY plane of the established binary coordinate system is difficult to be completely flush with the ladder surface, which makes it even more difficult to judge whether the pixel is on the convex coal ash or in a concave crack by the Z value of the pixel coordinate.

[0124] After careful study of the characteristics of coal ash blocks and cracks, it is found that the normal vector of the pixel point on the crack is nearly parallel to the XY plane, while the normal vector of the pixel point on the coal dust block image is nearly perpendicular to the XY plane. Therefore, the concept of emission distance is introduced, and the pixel points on the coal dust block image and the crack image are obtained. The distance from the pixel point along the normal vector of the point to the reference plane is calculated as the emission distance. The emission distance of the pixel point on the crack image will be much larger than the emission distance of the pixel point on the coal dust block image, thereby distinguishing the coal dust block image from the crack image. In step S44, the following steps are specifically included:

[0125] S441, selecting any pixel point on the foreground three-dimensional model as a sampling point, obtaining a number of pixel points adjacent to the sampling point as base points, and obtaining the coordinates of the several base points according to a binary coordinate system;

[0126] S442, fitting the coordinates of several base points to obtain a vertical plane; the purpose of fitting several base points into a vertical plane can be achieved by software such as MATLAB or algorithms such as RANSAC.

[0127] S443, vertically project the sampling point onto the vertical plane to obtain the projection point, and obtain the normal vector of the sampling point; the expression of the normal vector of the sampling point is:

[0128] P=[O x -O' x , O y -O' y , O z -O' z ]

[0129] In the above formula, P is the normal vector of the sampling point, O x , O y and O z are the X, Y and Z coordinates of the sampling point respectively, O' x , O' y and O' z are the X, Y and Z axis coordinates of the projection point respectively;

[0130] S444, calculating the vertical distance from the sampling point to the reference plane; the sampling point may be projected onto the reference plane first, and then the distance between the sampling point and the projection point may be calculated to obtain the vertical distance from the sampling point to the reference plane. The calculation formula for the vertical distance is:

[0131] S=D(O z ,O' z )

[0132] In the above formula, S represents the vertical distance from the sampling point to the reference plane, O z represents the sampling point, O' z represents the projection point of the sampling point on the reference plane, and D(●) represents the Euclidean distance of the elements in the brackets.

[0133] S445, calculating the emission distance from the sampling point along the normal vector of the point to the reference plane; the calculation formula of the emission distance is:

[0134]

[0135] In the above formula, D represents the emission distance from the sampling point along the normal vector of the point to the reference plane, d represents the vertical distance from the sampling point to the reference plane, |P| is the modulus of the normal vector of the sampling point, O z -O' z Indicates the height difference between the sampling point and the projection point;

[0136] S446. Repeat steps S441 to S445 to sequentially calculate the emission distance of each pixel point on the foreground three-dimensional model.

[0137] S45, setting the emission distance threshold range, and selecting the pixel points in the foreground area of ​​the binary image whose emission distance is within the emission distance threshold range to obtain a crack image; the expression of the emission distance threshold range is:

[0138] D 0 =[-∞, D1]∪[D2,+∞]

[0139] In the above formula, D 0 It represents the wide range of transmission distance, D1 and D2 are two constants, the value of D1 is generally not greater than -2, and the value of D2 is generally not less than 2.

[0140] S5, obtaining a crack boundary and a crack skeleton of a crack feature in the crack image, and calculating a crack width of the crack feature along the crack skeleton;

[0141] In order to more accurately calculate the width of the crack skeleton, a slope approximation method is used to obtain the tangent of a point on the crack skeleton, and obtain the perpendicular line of the tangent, obtain the intersection of the perpendicular line and the crack boundaries on both sides of the crack skeleton, and calculate the two intersection points to obtain the width of the crack at the point on the crack skeleton. In step S5, the following steps are specifically included:

[0142] S51, obtaining the crack boundary and crack skeleton of the crack feature in the crack image; the boundary of the crack feature can be quickly extracted by using the crack maltab;

[0143] S52, sequentially obtain the coordinates of any pixel point from the crack skeleton, and obtain two adjacent pixel points from the crack skeleton on both sides of the pixel point to obtain a vertical plane passing through the pixel point and perpendicular to the line connecting the two adjacent pixel points; the point set expression of the vertical plane is as follows:

[0144] T={t|K(t,z i )×K(z i +1, z i -1)=-1,z i ∈X i}

[0145] In the above formula, T is the point set of the vertical plane passing through the pixel and perpendicular to the line connecting two adjacent pixel points, z i is any pixel point in the crack skeleton, z i +1 and z i -1 are the pixels on the crack skeleton and z i Two adjacent pixels with a distance of 1 pixel, K(●) represents the slope of the element in the bracket, and t is any pixel in the crack image;

[0146] S53, obtaining several intersection points of the vertical plane and the crack skeleton; the lines and planes in the image are composed of pixel points, and the intersection coordinates can be obtained by respectively obtaining the pixel point sets constituting the vertical plane and the crack skeleton, and obtaining the intersection of the two sets.

[0147] S54, respectively calculating the distance and vector from the pixel point to each intersection point; the distance is the Euclidean distance between the two intersection points, which can be obtained by calculating the sum of the squares of the coordinate differences corresponding to the two intersection points and then taking the square root of the sum of the squares.

[0148] The calculation formula for the distance from the pixel to the intersection point is:

[0149]

[0150] The expression of the vector from the pixel to the intersection point is:

[0151] F=[x i -x j ,yi -y j ,z i -z j ]

[0152] In the above formula, D represents the distance from the pixel to the intersection, F represents the vector from the pixel to the intersection, and x i ,y i and z i Respectively represent the X, Y, and Z coordinates of pixel i, x j ,y j and z j Respectively represent the X, Y, and Z axis coordinates of the intersection point j.

[0153] S55, selecting two intersection points with opposite vectors and the smallest sum of distances from the pixel point, and the width of the crack at the pixel point is the sum of the distances;

[0154] S6, selecting a crack image with several crack features, calculating a filling skeleton between the crack skeletons of the several crack features, and obtaining a filling boundary corresponding to the filling skeleton according to the crack width;

[0155] Originally, there is only one foreground area on a binary image. However, after the pixels of the coal dust block image in the foreground area are screened out, if the coal dust block just covers one section of the crack feature, the crack image after removing the coal dust block will become two ends. At this time, it is necessary to connect them into one section to restore their original shape, so that the maintenance personnel can accurately judge the use of the ladder. In step S6, the following steps are specifically included:

[0156] S61, selecting crack images containing a number of crack features, establishing a plane coordinate system with the plane where the crack skeleton is located, calculating the distances between the endpoints of the crack skeletons of the several crack features, and selecting two crack skeletons with the smallest endpoint distances by comparison method;

[0157] S62, taking the unit length of the pixel point as the step distance, sequentially obtaining the Y coordinates of the pixel points on the crack skeleton, and establishing two data sequences of the crack skeleton respectively along the X-axis direction; the expression of the data sequence can be expressed as:

[0158] C={Y i ,Y i+1 ,Y i+2 ,...,Y i+n}

[0159] In the above formula, C represents the data sequence of the crack skeleton, Y i represents the Y-axis coordinate value of the crack skeleton pixel at the X-axis coordinate value i;

[0160] S63, obtaining a first trajectory curve by fitting the data sequences of the two crack skeletons, calculating corresponding Y values ​​according to the first trajectory curve and the X-axis coordinate values ​​in the data sequence, and arranging the Y values ​​in sequence to obtain a prediction sequence;

[0161] S64, sequentially differencing the prediction sequence and the data sequence, and sequentially arranging the difference values ​​to obtain a difference sequence;

[0162] S65, selecting the maximum value and the minimum value in the difference sequence according to the comparison method, subtracting the minimum value from the maximum value to obtain the difference interval, and dividing the difference interval into a plurality of state intervals;

[0163] S66. Establish a difference probability transfer matrix according to the state interval and the difference sequence; the expression of the difference probability transfer matrix is:

[0164]

[0165] In the above formula, P represents the difference probability transfer matrix, P mn It represents the probability of the difference transferring from the mth state interval to the nth state interval, and the following relationship exists:

[0166]

[0167] In the above formula: P τR represents the probability of the residual data transferring from the τth state interval to the Rth state interval, It represents the total probability that the residual data is transferred from the τth state interval to a total of R state intervals, and the total probability is 1.

[0168] S67, calculating the pixel coordinates between the two crack skeletons according to the first trajectory curve, the difference probability transfer matrix and the state interval to obtain a filled skeleton; the calculation formula for the pixel coordinates on the filled skeleton is:

[0169]

[0170] In the above formula, Y represents the Y-axis coordinate value calculated according to the X-axis coordinate value of the pixel point between the two crack skeletons, f1 represents the first trajectory curve, and P τR represents the probability of the residual data transferring from the τth state interval to the Rth state interval, Represents the average value of the upper and lower limits of the Rth state interval;

[0171] S68, repeating steps S61 to S68 until only one crack feature exists on the crack image;

[0172] S69. Calculate the average crack width on each crack image, and obtain the corresponding filling boundary based on the filling skeleton. With the filling skeleton as the center, reverse the calculation method of the crack width to obtain the filling boundary corresponding to the filling skeleton. Since the crack width of the fiberglass ladder is relatively average, the approximate substitution method is used to obtain the crack width, which is convenient for deducing the filling boundary and does not affect the judgment of the crack on the surface condition of the ladder.

[0173] S7. Output a crack image with crack features and a crack width corresponding to the crack features.

[0174] For the image processed by steps S4 to S6, when the initially selected standard image only contains coal ash that is considered as a crack feature, the coal ash pixels on the standard image will be removed by the emission distance in step S4, so that there will be no suspected crack features on the processed crack image. Finally, the crack image that does not contain crack features can be eliminated by re-identifying the standard image through a convolutional neural network or an algorithm such as OSTU. When the initially selected standard image contains both coal ash and cracks, the pixels on the coal ash will be removed first, and then it will be detected whether the crack is broken. If it is broken, the crack will be approximately restored through steps S5 and S6, and the width of the crack will be obtained at the same time. When the initially selected standard image only contains cracks, the image will not change after steps S4 to S6, but the width of the crack will be calculated.

[0175] Through the above method, in order to ensure the accuracy of crack feature extraction, the salt and pepper noise is first filtered through an improved bilateral filtering algorithm. In the filtering process, in order to further ensure the clarity of the crack feature boundary, the concept of gradient is designed to select several pixels with similar colors as the filtering window, and the pixel median of the filtering window is used to replace the pixel to be filtered for bilateral filtering. Then, the background in the image is removed by the concept of the filtering window to obtain a close-up image of the ladder surface to reduce the interference of the complex background between the ladders. Then, the concept of the emission distance is designed to realize the separation of the coal mine dust image and the crack feature image. Finally, the crack features divided into several parts by the coal mine dust are filled to restore the crack features to their original state as much as possible, so as to facilitate outsiders to accurately judge the status of the ladder.

[0176] The above implementation methods have been described in detail. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for detecting ladders in ladder rooms in coal mine ventilation shafts, characterized in that: include: S1. Obtain the current status image of the ladder in the ladder room through the inspection equipment, establish the filtering window of each pixel point to be filtered in turn according to the gradient of the pixel value between the pixel points, and use the pixel median of the filtering window as the pixel value of the pixel point to be filtered to perform bilateral filtering to obtain a filtered image; S2, setting a filter window according to the shooting distance of the inspection equipment's shooting lens, intercepting image features within the filter window in the filtered image to obtain a standard image; S3, judging whether there are crack features in the standard image; If yes, proceed to step S4; If not, output a prompt message that there are no cracks on the ladder surface; S4, performing binary processing on the standard image to obtain a binary image, calculating the emission distance of each pixel point on the foreground area of ​​the binary image along its normal vector to the plane where the background area is located, and obtaining a crack image according to the emission distance; In step S4, the following steps are specifically included: S41, performing binarization processing on the standard image, dividing the binarized image into a plurality of binary images containing only a foreground area, and obtaining coordinates of a plurality of pixel points in the background area on the binary image; S42, fitting a reference plane with the plurality of points as references, arbitrarily selecting two perpendicular straight lines on the reference plane to respectively establish an X-axis and a Y-axis, and establishing a Z-axis perpendicular to the reference plane and facing the end of the camera to intersect the X-axis and the Y-axis, so as to obtain a binary coordinate system; S43, establishing a foreground three-dimensional model according to the binary coordinate system and the pixel coordinates of the foreground area on the binary image; S44, calculating the emission distance of each pixel point on the foreground three-dimensional model along the normal vector of the point to the reference plane; S45, setting a transmission distance threshold range, and selecting pixel points in the foreground area of ​​the binary image whose transmission distances are within the transmission distance threshold range to obtain a crack image; S5, determining a crack boundary and a crack skeleton of the crack feature in the crack image, and calculating a crack width of the crack feature along the crack skeleton; S6, selecting a crack image with several crack features, calculating a filling skeleton between the crack skeletons of the several crack features, and obtaining a filling boundary corresponding to the filling skeleton according to the crack width; In step S6, the following steps are specifically included: S61, selecting crack images containing a number of crack features, establishing a plane coordinate system with the plane where the crack skeleton is located, calculating the distances between the endpoints of the crack skeletons of the several crack features, and selecting two crack skeletons with the smallest endpoint distances by comparison method; S62, taking the unit length of the pixel point as the step distance, sequentially obtaining the Y coordinates of the pixel points on the crack skeleton, and establishing two data sequences of the crack skeleton respectively along the X-axis direction; S63, obtaining a first trajectory curve by fitting the data sequences of the two crack skeletons, calculating corresponding Y values ​​according to the first trajectory curve and the X-axis coordinate values ​​in the data sequence, and arranging the Y values ​​in sequence to obtain a prediction sequence; S64, sequentially differencing the prediction sequence and the data sequence, and sequentially arranging the difference values ​​to obtain a difference sequence; S65, selecting the maximum value and the minimum value in the difference sequence according to the comparison method, subtracting the minimum value from the maximum value to obtain the difference interval, and dividing the difference interval into a plurality of state intervals; S66. Establish a difference probability transfer matrix according to the state interval and the difference sequence; the expression of the difference probability transfer matrix is: In the above formula, P represents the difference probability transfer matrix, P mn Represents the probability that the difference is transferred from the mth state interval to the nth state interval; S67, calculating the pixel coordinates between the two crack skeletons according to the first trajectory curve, the difference probability transfer matrix and the state interval to obtain a filled skeleton; the calculation formula of the pixel coordinates between the two crack skeletons is: In the above formula, Y represents the Y-axis coordinate value calculated according to the X-axis coordinate value of the pixel point between the two crack skeletons, f1 represents the first trajectory curve, and P τR represents the probability of the residual data transferring from the τth state interval to the Rth state interval, Represents the average value of the upper and lower limits of the Rth state interval; S68, repeating steps S61 to S68 until only one crack feature exists on the crack image; S69, calculating the average width of the cracks on each crack image, and obtaining the corresponding filling boundary according to the filling skeleton; S7. Output a crack image with crack features and a crack width corresponding to the crack features.

2. A ladder detection method according to claim 1, characterized in that: In step S1, the following steps are specifically included: S11, select any pixel point to be filtered on the current image as a window point, calculate the gradient between the pixel values ​​of each pixel point around the window point, and select several pixel points with the lowest gradient to establish a filtering window; S12, obtaining pixel values ​​of all pixels in the filter window, and selecting a pixel median from all pixel values; S13, taking the pixel median of the pixel to be filtered as the pixel value of the pixel to be filtered, and performing bilateral filtering on the pixel to be filtered; the formula for performing bilateral filtering on the pixel to be filtered is: in, In the above formula, g(i) is the pixel value of point i after filtering, μ(i) is the correlation value, i and j represent the positions of two pixels in the image, where point j belongs to a pixel in the filtering window Q, D(i, j) represents the Euclidean distance between pixel i and pixel j, and M i is the pixel median of the pixel values ​​of each pixel in the filter window Q containing pixel i, X j represents the pixel value of pixel j, Δ(M i , X j ) represents the pixel median M of point i i and the pixel value X of pixel j j The grayscale difference between them, A and B are two constants used to measure the amount of image filtering, and e is a natural constant; S14, repeating steps S11 to S13 to sequentially complete filtering processing on each pixel to be filtered on the current image to obtain a filtered image.

3. A ladder detection method according to claim 1, characterized in that: In step S2, the following steps are specifically included: S21, setting the filtering radius width of the inspection equipment shooting lens filtering window; S22, calculating the actual distance between the actual position corresponding to each pixel point on the filtered image and the camera of the inspection device; S23, eliminating the pixel points whose actual distance is greater than the filtering radius threshold to obtain a standard image.

4. A ladder detection method according to claim 1, characterized in that: In step S44, the following steps are specifically included: S441, selecting any pixel point on the foreground three-dimensional model as a sampling point, obtaining a number of pixel points adjacent to the sampling point as base points, and obtaining the coordinates of the several base points according to a binary coordinate system; S442, fitting the coordinates of several base points to obtain a vertical plane; S443, vertically projecting the sampling point onto the vertical plane to obtain a projection point, and obtaining a normal vector of the sampling point; S444, calculating the vertical distance from the sampling point to the reference plane; S445, calculating the emission distance from the sampling point along the normal vector of the point to the reference plane; the calculation formula of the emission distance is: In the above formula, D represents the emission distance from the sampling point along the normal vector of the point to the reference plane, d represents the vertical distance from the sampling point to the reference plane, |P| is the modulus of the normal vector of the sampling point, O z -O' z Indicates the height difference between the sampling point and the projection point; S446. Repeat steps S441 to S445 to sequentially calculate the emission distance of each pixel point on the foreground three-dimensional model.

5. A ladder detection method according to claim 1, characterized in that: In step S5, the following steps are specifically included: S51, determining a crack boundary and a crack skeleton of a crack feature in a crack image; S52, sequentially obtaining the coordinates of any pixel point on the crack skeleton, and obtaining two adjacent pixel points on both sides of the pixel point from the crack skeleton, so as to obtain a vertical plane passing through the pixel point and perpendicular to the line connecting the two adjacent pixel points; S53, obtaining a plurality of intersection points between the vertical plane and the crack skeleton; S54, respectively calculating the distance and vector from the pixel point to each intersection point; S55. Select two intersection points with opposite vectors and the smallest sum of distances from the pixel point, and the width of the crack at the pixel point is the sum of the distances.