A positioning method for inspection robot of belt conveyor
Through image processing and edge fitting technology, the problems of large amount of data and noise interference in the positioning method of belt conveyors are solved, and high-precision positioning and robustness are achieved, which are suitable for field environments.
Patent Information
- Application Number
- CN202111674489.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2041-12-31
AI Technical Summary
The existing belt conveyor positioning methods have huge data volumes, are susceptible to noise interference, are not accurate enough, and are not suitable for outdoor environments.
Image processing technology is used to scan row by row and column to remove invalid pixel points to form a secondary processing image, use the B-spline curve to fit the initial contour curve, and extract edge digital information through the Snake algorithm for positioning and judgment.
It reduces interference information in the image, improves positioning accuracy and robustness, and is suitable for long-term applications in harsh environments.
Smart Images

Figure CN114359378B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of inspection robot positioning systems, and in particular to a belt conveyor inspection robot positioning method. Background Art
[0002] At present, belt conveyors are widely used in the fields of electricity, steel, coal, water conservancy, chemical industry, metallurgy, building materials, etc. At the same time, the belt conveyor system is developing towards large-scale directions with high belt speed, high power, large capacity and long distance.
[0003] In recent years, as various equipment in belt conveyors have become more complex, the requirements for real-time monitoring and inspection have also increased. At present, manual inspection is mainly adopted. However, since the equipment may be in a harsh working environment, manual inspection is dangerous, and there is a possibility of human error in manual monitoring. At the same time, the labor cost continues to rise, making it increasingly necessary for machines to replace manual inspections. The positioning system, as an indispensable key system in the inspection robot, is crucial to the accuracy of the inspection. Currently, the commonly used positioning methods include digital matching, QR code recognition, and step accumulation. Among them, the amount of data required for digital matching is huge, and it is easy to cause misidentification due to noise interference; the QR code method is easily damaged or detached in the field environment for a long time, and the life is short; the step accumulation method is prone to large cumulative errors after long-term operation, affecting the recognition accuracy. Summary of the invention
[0004] The present invention aims to solve at least one of the technical problems in the prior art that the existing positioning methods involve a huge amount of data, which affects the calculation and processing efficiency; are easily interfered by noise and cause misidentification, are not suitable for field environments, have inaccurate positioning, and have large errors.
[0005] The present invention provides a belt conveyor inspection robot positioning method, comprising the following steps:
[0006] S1, read the image taken by the inspection robot, scan the image row by row and column by column, remove the rows and columns that do not contain the target pixel points, and obtain a processed image;
[0007] S2, filter out invalid pixels in the first-processed image, obtain the number and position of valid pixels, and place the valid pixels at corresponding positions in the target image template using the position information of the valid pixels to form a second-processed image;
[0008] S3, obtaining the number of rows and columns of the secondary processed image, and comparing them with the reference values of the number of rows and columns of the target image. If the deviation between the number of rows and columns of the secondary processed image and the reference values of the target image is within the allowable error range, proceed to the next step, otherwise, return to S1;
[0009] S4, using a B-spline curve method to fit the pixel points in the secondary processed image to obtain an initial contour curve of the secondary processed image;
[0010] S5. Using the Snake algorithm, the initial contour curve is extracted as edge digital information, and the obtained edge digital information is compared with the edge digital information of the object to be detected to determine the positioning position.
[0011] Furthermore, the method for obtaining a processed image in S1 includes:
[0012] Scan the image from the edge of one side of the image toward the other side. After scanning the target pixel point, terminate the scanning in that direction. Segment the image at the row or column where the target pixel point is located. Keep the row or column and the unscanned part of the image. Repeat the above scanning and segmentation process for the unscanned part of the image in the remaining directions until the image processing in all directions is completed to obtain a processed image.
[0013] Furthermore, in S2, the processed image obtained by S1 is scanned row by row and column by column, the position and number of target pixels in each row and column are recorded, and any two adjacent rows or columns are extracted to compare the position and number of target pixels. If there are target pixels adjacent to any target pixel in at least one direction around it, then the pixel is a valid pixel, otherwise, it is an invalid pixel.
[0014] Furthermore, the arithmetic mean of the number of rows or columns of pixels of the target image in at least two images is used as a reference value of the number of rows or columns, and the error of the secondary processed image compared with the reference value is less than 3%-5%.
[0015] Furthermore, the target image template used in S2 is equal to the target image region for obtaining the reference value.
[0016] Furthermore, the B-spline curve function is as follows:
[0017]
[0018] in, Represents the coordinate vector of the point on the curve, n is the control point quantity, is the coordinate of the control point (i starts from 0), B i,d (t) is the polynomial coefficient of the control point coordinates affecting the weight, i represents the index of the coordinates, n represents the highest power of the polynomial, d is the number of times the B-spline curve is affected; t represents the value of the time function when drawing the curve.
[0019] Furthermore, a cubic spline curve among B-spline curves is selected as the initial contour, that is, the value of d is 3.
[0020] Furthermore, extracting the initial contour curve into digital information using the Snake algorithm includes the following steps:
[0021] S51, reading in the initial contour curve after B-spline fitting;
[0022] S52, setting input parameters, wherein the input parameters include internal energy coefficient, iterative calculation times and filtering parameters;
[0023] S53, performing Gaussian filtering on the initial contour curve;
[0024] S54, using an iterative calculation method to solve the Snake algorithm function and obtain digital information;
[0025] S55. Output digital information.
[0026] Furthermore, the Snake algorithm function is defined as follows:
[0027]
[0028] Among them, c(s) is the final result curve obtained in S4, that is, the initial contour curve, which is given by Transformation yields (s∈[0,1]); α, β are positive real parameters, i.e., internal energy coefficients, used to adjust the continuity and smoothness of the curve; c s (s), c ss (s) are the first and second derivatives of the initial contour curve respectively; is the gradient of the image I(x(s),y(s)).
[0029] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0030] Through two image processings, the target image is obtained, unnecessary information in the image is removed, interference information in the image is reduced, and misidentification caused by noise is avoided;
[0031] The pixel points are fitted into the initial contour curve using the B-spline curve method, and the minimum value of the energy function is solved by the Snake algorithm. Driven by the minimum value of the energy function, the initial contour curve gradually approaches the edge of the object to be detected, and finally the digital information of the target edge is extracted. The edge digital information is compared with the edge digital information of the object to be detected to achieve positioning judgment. There is no need to process the center data of the target image, and only the edge data needs to be compared, which overcomes the problems of low calculation efficiency and high calculation difficulty caused by massive data.
[0032] The robot's positioning accuracy is improved, and its robustness is good, making it suitable for long-term application in harsh environments such as the field where belt conveyors are located.
[0033] Additional aspects and advantages of the present invention will become apparent from the following description or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0035] Figure 1 is a flow chart of a belt conveyor inspection robot positioning method according to an embodiment of the present invention;
[0036] Figure 2 The present invention is a flowchart of a belt conveyor inspection robot positioning method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0037] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0038] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0039] Refer to the following Figure 1 to Figure 2 A belt conveyor inspection robot positioning method provided according to some embodiments of the present invention is described.
[0040] A belt conveyor inspection robot positioning method comprises the following steps:
[0041] S1, read the image taken by the inspection robot, scan the image row by row and column by column, remove the rows and columns that do not contain the target pixel points, and obtain a processed image;
[0042] The method for obtaining a processed image is as follows: starting from the edge of one side of the image and scanning the image toward the other side, terminating the scanning in this direction after scanning the target pixel point, performing image segmentation at the row or column where the target pixel point is located, retaining the row or column and the unscanned portion of the image, repeating the above scanning and segmentation process for the unscanned portion of the image in the remaining directions until the image processing in all directions is completed to obtain a processed image;
[0043] Further, the following steps are included:
[0044] S11, scanning the image line by line from top to bottom, and when the target pixel is scanned, stopping scanning, recording the row number of the row where the pixel is located and the positions and numbers of all the pixels in the row, and using this row as the image segmentation position, retaining this row and the unscanned part, and removing the rows that do not contain the target pixel in the scanned part;
[0045] S12, scanning the image retained in S11 line by line from bottom to top, and when the target pixel is scanned, stopping scanning, recording the row number of the row where the pixel is located and the positions and numbers of all the pixels in the row, and using this row as the image segmentation position, retaining this row and the unscanned part, and removing the row that does not contain the target pixel in the scanned part;
[0046] S13, scanning the image retained in S12 column by column from left to right, and when the target pixel is scanned, stopping scanning, recording the column number of the column where the pixel is located and the positions and numbers of all the pixels in the column, and using this column as the image segmentation position, retaining this column and the unscanned part, and removing the column that does not contain the target pixel in the scanned part;
[0047] S14, scanning the image retained in S13 from right to left column by column, and when the target pixel is scanned, stopping scanning, recording the column number of the column where the pixel is located and the positions and numbers of all the pixels in the column, and using this column as the image segmentation position, retaining this column and the unscanned part, and removing the column that does not contain the target pixel in the scanned part;
[0048] It should be noted that the order of the above steps S11-S14 can be arbitrarily changed, or they can be performed simultaneously to obtain a processed image. In this specification, the target pixel point should be understood as a pixel point that matches the target image, wherein the target image can be set to an easily recognizable pattern or color to improve positioning accuracy.
[0049] S2, filter out invalid pixels in the first-processed image, obtain the number and position of valid pixels, and place the valid pixels at corresponding positions in the target image template using the position information of the valid pixels to form a second-processed image;
[0050] In S2, the once processed image obtained by S1 is scanned row by row and column by column, the position and number of target pixels in each row and column are recorded, and any two adjacent rows or columns are extracted to compare the position and number of target pixels; if there are adjacent target pixels in at least one direction around any target pixel, that is, there are pixels connected to the target pixel in at least one direction within a pixel range around the target pixel, then the point is a valid pixel, otherwise, it is an invalid pixel, and the valid pixel is copied to the corresponding position in the target image template to form a secondary processed image, wherein the target image template is a template framework pre-set according to the graphic data of the target image.
[0051] S3, obtaining the number of rows and columns of the secondary processed image, and comparing them with the reference values of the number of rows and columns of the target image. If the deviation between the number of rows and columns of the secondary processed image and the reference values of the target image is within the allowable error range, proceed to the next step, otherwise, return to S1;
[0052] Scan the secondary processed image, record the number of rows and columns of pixels in the secondary processed image, take the number of rows or columns of pixels in the target image in 5-7 images at the same position, and calculate the arithmetic mean of the number of rows or columns, and use the calculated average number of rows or columns as the reference value of the number of rows or columns. If the error between the number of rows and columns of the secondary processed image and the reference value is within the allowable range, it means that the taken pixel is accurate, otherwise it means that the taken pixel is wrong, and return to S1 to re-scan the image; wherein, the allowable range of the error between the number of rows and columns of the secondary processed image and the reference value is less than 3%-5%.
[0053] The target image template used in S2 is equal to the target image region for obtaining the reference value.
[0054] S4, using a B-spline curve method to fit the pixel points in the secondary processed image to obtain an initial contour curve of the secondary processed image;
[0055] The B-spline curve function is as follows:
[0056]
[0057] in, Represents the coordinate vector of the point on the curve, n is the control point quantity, is the coordinate of the control point (i starts from 0), B i,d (t) is the polynomial coefficient of the control point coordinates affecting the weight, i represents the index of the coordinates, n represents the highest power of the polynomial, d is the number of times the B-spline curve is affected; t represents the value of the time function when drawing the curve.
[0058] B i,d (t) is the spline curve basis function, and the recursive formula is as follows:
[0059]
[0060] The order of the B-spline curve has a great influence on the performance of the trajectory. The lower the order, the worse the smoothness, while the higher the order, the more likely it is to cause oscillation. Therefore, taking both smoothness and avoiding oscillation into consideration, a cubic spline curve is preferably selected, that is, a cubic spline curve in the B-spline curve is selected as the initial contour, that is, the value of d is 3.
[0061] S5. Using the Snake algorithm, the initial contour curve is extracted as edge digital information, and the obtained edge digital information is compared with the edge digital information of the object to be detected to determine the positioning position.
[0062] The process of extracting the initial contour curve into digital information using the Snake algorithm includes the following steps:
[0063] S51, reading in the initial contour curve after B-spline fitting;
[0064] S52, setting input parameters, wherein the input parameters include internal energy coefficient, iterative calculation times and filtering parameters;
[0065] S53, performing Gaussian filtering on the initial contour curve;
[0066] S54, using an iterative calculation method to solve the Snake algorithm function and obtain digital information;
[0067] S55. Output digital information.
[0068] The Snake algorithm function in S54 is defined as follows:
[0069]
[0070] Among them, c(s) is the final result curve obtained in S4, that is, the initial contour curve, which is given by Transformation yields (s∈[0,1]); α, β are positive real parameters, i.e., internal energy coefficients, used to adjust the continuity and smoothness of the curve; c s (s), c ss (s) are the first and second derivatives of the initial contour curve respectively; is the gradient of the image I(x(s),y(s)).
[0071] The pixel points are fitted into the initial contour curve using the B-spline curve method, and the minimum value of the energy function is solved by the Snake algorithm. Driven by the minimum value of the energy function, the initial contour curve gradually approaches the edge of the object to be detected, and finally the digital information of the target edge is extracted. The edge digital information is compared with the edge digital information of the object to be detected through software code to realize positioning judgment, and it is associated with the control system to realize positioning control.
[0072] like Figure 2As shown, the specific operation flow in one embodiment of the method is as follows: after acquiring the image, scan the image pixels row by row to determine whether there is a target pixel in the row. If it is a target pixel, stop scanning, record the row number of the row and the position and number of the pixels in the row, otherwise continue scanning until all rows are scanned; perform image pre-segmentation at the row position where scanning is stopped, and remove the rows that do not contain the target pixel in the scanned image; on this basis, scan the image pixels column by column to determine whether there is a target pixel in the column. If it is a target pixel, stop scanning, record the column number of the column and the position and number of the pixels in the column, otherwise continue scanning until all columns are scanned; perform image pre-segmentation at the column position where scanning is stopped, and remove the columns that do not contain the target pixel in the scanned image; obtain a processed image, scan the processed image obtained after pre-segmentation row by row and column by column, record the position and number of the target pixel in the row or column with the corresponding row number or column number, compare the target pixels in two adjacent rows, and if any target pixel is surrounded by If there is at least one target pixel point connected to a pixel point, the point is copied as a valid pixel point to the corresponding position in the target image template, otherwise it is not copied as an invalid pixel point. The above steps are repeated until the scanning and comparison of all target pixel points in the primary processing image are completed, and the set of target pixel points copied in the target image template is used as the secondary processing image; the number of rows and columns of the secondary processing image is scanned and compared with the reference values of the number of rows and columns. If the error between the two is within the allowable range, the set of target pixel points in the secondary processing image is fitted as an initial contour curve using a B-spline curve, and the minimum value of the energy function is solved for the initial contour curve by the Snake algorithm. Driven by the minimum value of the energy function, the initial contour curve gradually approaches the edge of the object to be detected, and finally the digital information of the target edge is extracted. If the error between the two exceeds the allowable range, the image is scanned again, and the software is used to identify whether the extracted target edge digital information is consistent with the digital information of the target image edge in the database, and the positioning judgment is completed.
[0073] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A belt conveyor inspection robot positioning method, characterized in that: The following steps are involved: S1. Read the image captured by the inspection robot, scan the image row by row and column by column, remove the rows and columns that do not contain the target pixel points, and obtain a processed image; wherein the method for obtaining the processed image once includes: starting from the edge of one side of the image and scanning the image toward the other side, terminating the scanning in this direction after scanning the target pixel point, performing image segmentation at the row or column where the target pixel point is located, retaining the row or column and the unscanned portion of the image, repeating the above scanning and segmentation process for the unscanned portion of the image in the remaining directions, until the image processing in all directions is completed, and a processed image is obtained; S2, filter out invalid pixels in the primary processed image, obtain the number and position of valid pixels, and use the position information of valid pixels to place the valid pixels at corresponding positions in the target image template to form a secondary processed image; wherein, the primary processed image obtained in S1 is scanned row by row and column by column, and the position and number of target pixels in each row and column are recorded, and any two adjacent rows or columns are extracted to compare the position and number of target pixels. If there are target pixels adjacent to any target pixel in at least one direction around it, then the pixel is a valid pixel, otherwise, it is an invalid pixel; S3, obtaining the number of rows and columns of the secondary processed image, and comparing them with the reference values of the number of rows and columns of the target image. If the deviation between the number of rows and columns of the secondary processed image and the reference values of the target image is within the allowable error range, proceed to the next step, otherwise, return to S1; S4. Fitting the pixel points in the secondary processed image using a B-spline curve method to obtain an initial contour curve of the secondary processed image; wherein the B-spline curve function is as follows: where t min ≤t≤t max ,2≤d≤n in, Represents the coordinate vector of the point on the curve, n is the control point quantity, is the coordinate of the control point, i starts from 0, B i,d (t) is the polynomial coefficient of the control point coordinates affecting the weight, i represents the index of the coordinates, n represents the highest power of the polynomial, and d is the number of times the B-spline curve is affected; t represents the value of the time function when drawing the curve; B i,d The recursive formula of (t) is as follows: S5. Using the Snake algorithm to extract the initial contour curve as edge digital information, comparing the acquired edge digital information with the edge digital information of the object to be detected, and determining the positioning position; wherein, using the Snake algorithm to extract the initial contour curve as digital information includes the following steps: S51, reading in the initial contour curve after B-spline fitting; S52, setting input parameters, wherein the input parameters include internal energy coefficient, iterative calculation times and filtering parameters; S53, performing Gaussian filtering on the initial contour curve; S54, using an iterative calculation method to solve the Snake algorithm function and obtain digital information; S55. Output digital information.
2. A belt conveyor inspection robot positioning method according to claim 1, characterized in that: The arithmetic mean of the number of rows or columns of target image pixels in at least two images is used as a reference value for the number of rows or columns, and the allowable error of the secondary processed image compared with the reference value is less than 3%-5%.
3. A belt conveyor inspection robot positioning method according to claim 1, characterized in that: The target image template used in S2 is equal to the target image size used to obtain the reference value.
4. A belt conveyor inspection robot positioning method according to claim 1, characterized in that: The cubic spline curve in the B-spline curve is selected as the initial contour, that is, the value of d is 3.
5. A belt conveyor inspection robot positioning method according to claim 1, characterized in that: The Snake algorithm function described in S54 is defined as follows: Among them, c(s) is the final result curve obtained in S4, that is, the initial contour curve, which is given by The transformation results in s∈[0,1]; α, β are positive real parameters, namely internal energy coefficients, which are used to adjust the continuity and smoothness of the curve; c s (s), c ss (s) are the first and second derivatives of the initial contour curve respectively; is the gradient of the image I(x(s),y(s)).
