Method for detecting bolt loosening of magnetic suspension module based on threshold separation hough search

By using a threshold-based Hough search method, and employing the Canny operator and Hough mapping technique to separate the marking line parameters of the bolt top surface and bolt hole, the problem of low accuracy and low efficiency in detecting bolt loosening in maglev modules is solved, achieving high-precision and high-efficiency detection results.

CN116266349BActive Publication Date: 2026-05-22HIWING TECH ACAD OF CASIC
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HIWING TECH ACAD OF CASIC
Filing Date
2021-12-16
Publication Date
2026-05-22

AI Technical Summary

Technical Problem

Existing methods for detecting loose bolts in maglev modules suffer from low accuracy, high cost, and low efficiency. In particular, image-based detection methods are susceptible to environmental interference and require precise positioning information.

Method used

A threshold-based Hough search method is adopted. The bolt image is denoised and smoothed, the edge is extracted using the Canny operator, and the marker line parameters of the bolt top surface and bolt hole are separated by combining Hough mapping and Hough space search to obtain the bolt loosening detection result.

Benefits of technology

This improved the accuracy and efficiency of bolt loosening angle detection, reduced detection complexity, met the high precision and real-time requirements of maglev modules, and avoided the problem of inaccurate detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116266349B_ABST
    Figure CN116266349B_ABST
Patent Text Reader

Abstract

The application discloses a magnetic floating module bolt loosening detection method based on threshold separation Hough search. The method comprises the following steps: acquiring a bolt image; performing noise reduction processing on the bolt image to obtain a denoised image and performing smoothing processing on the denoised image to obtain a smoothed image; performing adaptive threshold separation on the marked line of the smoothed image to obtain a bolt top surface binary image and a bolt hole binary image; using a Canny operator method, extracting the marked line edge of the bolt top surface in the bolt top surface binary image and extracting the marked line edge of the bolt hole in the bolt hole binary image; using edge Hough mapping and Hough space search to search for the marked line and determine the marked line parameters for the marked line edge of the bolt top surface and the marked line edge of the bolt hole respectively, wherein the marked line parameters comprise bolt top surface marked line parameters and bolt hole marked line parameters; and obtaining a bolt loosening detection result according to the bolt top surface marked line parameters and the bolt hole marked line parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of bolt loosening detection technology for maglev modules, and in particular to a bolt loosening detection method for maglev modules based on threshold separation Hough search. Background Technology

[0002] Maglev modules are one of the key components of a maglev transportation system, serving as the primary source of levitation and power for the maglev equipment. Therefore, the normal operating condition of the maglev modules is crucial for the normal operation and safety of the maglev system. Besides the operational status of the internal magnetic field generating equipment, a major cause of maglev module failure is bolt loosening due to module vibration. This loosening can lead to creeping of the module blocks, further affecting the magnetic field distribution and ultimately causing serious operational accidents. Therefore, detecting loose bolts on the modules is also a vital means of ensuring their normal operation.

[0003] Currently, the most direct way to detect bolt loosening in practical applications is to install pressure-sensitive pads in the bolt holes to directly measure the bolt preload. There are also methods that analyze the bolt tightness by analyzing the vibration signals of the components. In recent years, with the development of machine vision and image processing technology, more and more image-based bolt detection methods have been proposed.

[0004] However, while measuring bolt preload by adding pressure-sensitive pads provides a relatively direct way to obtain preload parameters, it increases the complexity of the monitoring system and construction process, raising construction costs. Furthermore, the often cost-effective method of random sampling is prone to missed detections. Analyzing bolt tightness using vibration signals improves accuracy and efficiency, but still requires vibration sensors near each bolt or in a fixed area, resulting in slow detection speed, long detection cycles, high detection costs, increased maintenance costs, and system risks. Current image-based bolt detection methods rely heavily on algorithmic computational logic for accuracy, are susceptible to environmental interference, and have relatively low accuracy. They also require precise location information to accurately determine the bolt's condition. Summary of the Invention

[0005] This invention provides a method for detecting loose bolts in magnetic levitation modules based on threshold separation Hough search, which can solve the technical problems in the prior art.

[0006] This invention provides a method for detecting bolt loosening in magnetic levitation modules based on threshold separation Hough search, wherein the method includes:

[0007] Obtain bolt images;

[0008] The bolt image is denoised to obtain a denoised image, and the denoised image is smoothed to obtain a smoothed image.

[0009] The smoothed image is subjected to marker line adaptive threshold separation to obtain a binary image of the bolt top surface and a binary image of the bolt hole;

[0010] Using the Canny operator method, the edge of the marker line on the top surface of the bolt is extracted from the binary image of the bolt top surface, and the edge of the marker line on the bolt hole is extracted from the binary image of the bolt hole;

[0011] Marker line search and marker line parameter determination are performed on the edge of the marker line on the top surface of the bolt and the edge of the marker line in the bolt hole using edge Hough mapping and Hough space search, respectively. The marker line parameters include the marker line parameters on the top surface of the bolt and the marker line parameters in the bolt hole.

[0012] The bolt loosening detection results are obtained based on the parameters of the bolt top surface marking line and the bolt hole marking line.

[0013] Preferably, the noise reduction process for the bolt image to obtain the noise-reduced image includes:

[0014] S200, convert the bolt image into a grayscale image, with a preset filter window size of w*w and a window sliding step size of s;

[0015] S202, place the preset filtering window at the top left of the grayscale image, align the center element of the preset filtering window with the top left pixel of the grayscale image, sort the pixel values ​​of all pixels in the preset filtering window, if the median grayscale value of the pixels in the preset filtering window is equal to the maximum or minimum pixel value, then increment w by 2 and return to S200; if the median grayscale value of the pixels in the preset filtering window is between the maximum and minimum pixel values, then proceed to S204.

[0016] S204, retain the original pixel value of pixels whose gray value is not equal to the maximum pixel value and the minimum pixel value in the preset filtering window, and set the pixel value of pixels whose gray value is equal to the maximum pixel value or the minimum pixel value to the gray median value in the preset filtering window;

[0017] S206, the preset filtering window slides to the right with the sliding step s. If the center element of the preset filtering window has exceeded the rightmost pixel of the grayscale image, the center element of the preset filtering window is returned to the top left of the grayscale image and slides down with the sliding step s. S202-S206 are repeated until the entire grayscale image is traversed to obtain the denoised image.

[0018] Preferably, smoothing the denoised image to obtain a smoothed image includes:

[0019] The denoised image is then subjected to two-dimensional Gaussian smoothing to obtain a smoothed image.

[0020] Preferably, a two-dimensional Gaussian smoothing filter is used for two-dimensional Gaussian smoothing processing, wherein the two-dimensional Gaussian smoothing filter is:

[0021]

[0022] Where X = [x1, x2] represents the position of the element within the Gaussian filter window, x1 and x2 represent the row coordinate and column coordinate of the element, respectively, μ represents the mean of the two-dimensional Gaussian distribution, and ∑ represents the covariance matrix of the two-dimensional Gaussian distribution.

[0023] Preferably, performing adaptive threshold separation on the smoothed image to obtain a binarized image of the bolt top surface and a binarized image of the bolt hole includes:

[0024] Calculate the mean grayscale value of the smoothed image;

[0025] Calculate the adaptive upper threshold and adaptive lower threshold based on the grayscale mean;

[0026] The grayscale image is binarized using the adaptive upper threshold and the adaptive lower threshold to obtain the binarized image of the bolt top surface and the binarized image of the bolt hole.

[0027] Preferably, the mean grayscale value of the smoothed image is calculated using the following formula:

[0028]

[0029] Wherein, PGA represents the grayscale mean, H and W represent the height and width of the smoothed image, and P(h, w) represents the grayscale value of the element in the h-th row and w-th column of the smoothed image.

[0030] Preferably, the adaptive upper threshold and adaptive lower threshold are calculated based on the grayscale mean using the following formula:

[0031]

[0032]

[0033] Wherein, UCT represents adaptive upper threshold and DCT represents adaptive lower threshold.

[0034] Preferably, extracting the edge of the marker line on the top surface of the bolt in the binary image of the bolt top surface and extracting the edge of the marker line on the bolt hole in the binary image of the bolt hole includes:

[0035] Edge strong gradient search is performed on the binarized image of the bolt top surface and the binarized image of the bolt hole to obtain the strong gradient of all pixels in the binarized image of the bolt top surface and the strong gradient of all pixels in the binarized image of the bolt hole.

[0036] Eliminating boundary errors using the non-maximum suppression method;

[0037] The upper and lower bounds of the first threshold are determined based on the maximum absolute value of the strong gradient among all pixels in the binary image of the bolt top surface. The upper and lower bounds of the second threshold are determined based on the maximum absolute value of the strong gradient among all pixels in the binary image of the bolt hole.

[0038] Based on the absolute values ​​of the strong gradients of all pixels in the binary image of the bolt top surface, as well as the upper and lower bounds of the first threshold, the edge of the marker line of the bolt top surface is extracted in the binary image of the bolt top surface. Based on the absolute values ​​of the strong gradients of all pixels in the binary image of the bolt hole, as well as the upper and lower bounds of the second threshold, the edge of the marker line of the bolt hole is extracted in the binary image of the bolt hole.

[0039] Preferably, the mark line search and mark line parameter determination are performed using edge Hough mapping and Hough space search for the mark line edges on the bolt top surface and the bolt hole, respectively, including:

[0040] The edge Hough mapping is used to convert the marking line edges on the top surface of the bolt and the marking line edges of the bolt hole into curves in Hough space.

[0041] Search in Hough space for the intersection point with the most intersecting curves and use it as the boundary point of the marked line;

[0042] The marking line parameters are obtained based on the boundary points of the marking line.

[0043] The above technical solution utilizes an adaptive thresholding method to separate the bolt top surface and bolt hole marker lines in an image. Combined with Canny edge extraction, other edges such as the marker lines, bolt holes, and bolt top surface are obtained. Hough transform is then applied, and the marker line parameters near the bolt top surface and bolt hole are searched in the mapping space. Finally, the bolt loosening detection result (e.g., the degree of bolt loosening) is obtained through the parameters of the two marker lines (e.g., their difference). The adaptive thresholding method effectively separates the bolt top surface and bolt hole location marker lines, improving the accuracy of bolt loosening angle detection. The Canny edge extraction combined with Hough mapping space search accurately reflects the marker line tilt angle parameters, avoiding the inaccurate loosening angle detection caused by identifying the bolt surface and bolt hole, thus improving the accuracy of bolt loosening angle detection. Attached Figure Description

[0044] The accompanying drawings, which form part of this specification, are provided to further illustrate embodiments of the invention and, together with the textual description, explain the principles of the invention. It is obvious that the drawings described below are merely some embodiments of the invention, and those skilled in the art can obtain other drawings based on these drawings without any creative effort.

[0045] Figure 1 A flowchart of a method for detecting loose bolts in a magnetic levitation module based on threshold separation Hough search according to an embodiment of the present invention is shown;

[0046] Figure 2 An example diagram of a bolt and marking line according to an embodiment of the present invention is shown;

[0047] Figure 3 A schematic diagram of a bolt image, a noisy image, and an adaptively filtered image according to an embodiment of the present invention is shown;

[0048] Figure 4 The diagram shows the image before and after Gaussian smoothing and the corresponding edge extraction results according to an embodiment of the present invention;

[0049] Figures 5A-5B The adaptive threshold marker line separation result according to an embodiment of the present invention is shown;

[0050] Figures 6A-6B The edge extraction results of the Canny operator according to an embodiment of the present invention are shown;

[0051] Figures 7A-7D A schematic diagram of the Hough mapping and search results for the marking lines at the top of the bolt and the bolt hole according to an embodiment of the present invention is shown. Detailed Implementation

[0052] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the present invention or its application or use. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0053] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this application. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0054] Unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps set forth in these embodiments do not limit the scope of the invention. It should also be understood that, for ease of description, the dimensions of the various parts shown in the drawings are not drawn to actual scale. Techniques, methods, and devices known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and devices should be considered part of the specification. In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values. It should be noted that similar reference numerals and letters in the following figures denote similar items; therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0055] Figure 1 A flowchart of a method for detecting loose bolts in a magnetic levitation module based on threshold separation Hough search according to an embodiment of the present invention is shown.

[0056] like Figure 1 As shown, this embodiment of the invention provides a method for detecting loose bolts in a magnetic levitation module based on threshold separation Hough search, wherein the method includes:

[0057] S100, acquire bolt image;

[0058] S102, the bolt image is denoised to obtain a denoised image, and the denoised image is smoothed to obtain a smoothed image;

[0059] S104, Perform adaptive threshold separation on the smoothed image to obtain a binary image of the bolt top surface and a binary image of the bolt hole;

[0060] S106, using the Canny operator method, extract the edge of the mark line on the top surface of the bolt in the binary image of the bolt top surface, and extract the edge of the mark line on the bolt hole in the binary image of the bolt hole;

[0061] S108, mark line search and mark line parameter determination are performed on the mark line edge of the bolt top surface and the mark line edge of the bolt hole using edge Hough mapping and Hough space search respectively. The mark line parameters include the bolt top surface mark line parameters and the bolt hole mark line parameters.

[0062] S110, obtain the bolt loosening detection results based on the bolt top surface marking line parameters and bolt hole marking line parameters.

[0063] For example, the parameters of the bolt top surface marking line include the inclination angle of the bolt top surface marking line, and the parameters of the bolt hole marking line include the inclination angle of the bolt hole marking line. After obtaining the marking line parameters, if the inclination angles of the bolt top surface marking line and the bolt hole marking line change, the bolt loosening detection result is determined to be that the bolt is loose; otherwise, the bolt loosening detection result is determined to be that the bolt is not loose (when it is not loose, the bolt top surface marking line and the bolt hole marking line are on the same straight line). Furthermore, the specific loosening angle of the bolt can be determined by the difference between the inclination angles of the bolt top surface marking line and the bolt hole marking line.

[0064] The above technical solution utilizes an adaptive thresholding method to separate the bolt top surface and bolt hole marker lines in an image. Combined with Canny edge extraction, other edges such as the marker lines, bolt holes, and bolt top surface are obtained. Hough transform is then applied, and the marker line parameters near the bolt top surface and bolt hole are searched in the mapping space. Finally, the bolt loosening detection result (e.g., the degree of bolt loosening) is obtained through the parameters of the two marker lines (e.g., their difference). The adaptive thresholding method effectively separates the bolt top surface and bolt hole location marker lines, improving the accuracy of bolt loosening angle detection. The Canny edge extraction combined with Hough mapping space search accurately reflects the marker line tilt angle parameters, avoiding the inaccurate loosening angle detection caused by identifying the bolt surface and bolt hole, thus improving the accuracy of bolt loosening angle detection.

[0065] According to one embodiment of the present invention, the method of denoising the bolt image to obtain a denoised image includes:

[0066] S200, convert the bolt image into a grayscale image, with a preset filter window size of w*w and a window sliding step size of s;

[0067] S202, place the preset filtering window at the top left of the grayscale image, align the center element of the preset filtering window with the top left pixel of the grayscale image, sort the pixel values ​​of all pixels in the preset filtering window, if the median grayscale value of the pixels in the preset filtering window is equal to the maximum or minimum pixel value, then increment w by 2 and return to S200; if the median grayscale value of the pixels in the preset filtering window is between the maximum and minimum pixel values, then proceed to S204.

[0068] S204, retain the original pixel value of pixels whose gray value is not equal to the maximum pixel value and the minimum pixel value in the preset filtering window, and set the pixel value of pixels whose gray value is equal to the maximum pixel value or the minimum pixel value to the gray median value in the preset filtering window;

[0069] S206, the preset filtering window slides to the right with the sliding step s. If the center element of the preset filtering window has exceeded the rightmost pixel of the grayscale image, the center element of the preset filtering window is returned to the top left of the grayscale image and slides down with the sliding step s (s pixels down in total). S202-S206 are repeated until the entire grayscale image is traversed to obtain the denoised image.

[0070] If the center element of the preset filtering window has slid to the bottom right of the image, the filtering process ends.

[0071] In other words, the image denoising in this invention utilizes adaptive median filtering to reduce image distortion caused by salt-and-pepper noise generated during image transmission.

[0072] According to one embodiment of the present invention, smoothing the denoised image to obtain a smoothed image includes:

[0073] The denoised image is then subjected to two-dimensional Gaussian smoothing to obtain a smoothed image.

[0074] Therefore, image smoothing can suppress the false edge problem caused by uneven lighting.

[0075] According to one embodiment of the present invention, a two-dimensional Gaussian smoothing filter is used for two-dimensional Gaussian smoothing processing, wherein the two-dimensional Gaussian smoothing filter is:

[0076]

[0077] Where X = [x1, x2] represents the position of the element within the Gaussian filter window, x1 and x2 represent the row coordinate and column coordinate of the element, respectively, μ represents the mean of the two-dimensional Gaussian distribution, and ∑ represents the covariance matrix of the two-dimensional Gaussian distribution.

[0078] For example, the size of the Gaussian filter window can be the same as the size of the preset filter window in the aforementioned noise reduction process, and the image can be smoothed by Gaussian convolution using an adaptive median filter window sliding method.

[0079] In this invention, the mean μ of the two-dimensional Gaussian distribution can be expressed as: μ = [0, 0], and the covariance matrix ∑ of the two-dimensional Gaussian distribution can be expressed as:

[0080] According to one embodiment of the present invention, performing adaptive threshold separation on the smoothed image to obtain a binary image of the bolt top surface and a binary image of the bolt hole includes:

[0081] Calculate the mean grayscale value of the smoothed image;

[0082] Calculate the adaptive upper threshold and adaptive lower threshold based on the grayscale mean;

[0083] The grayscale image (original grayscale image) is binarized using the adaptive upper threshold and the adaptive lower threshold, respectively, to obtain the binarized image of the bolt top surface and the binarized image of the bolt hole.

[0084] Therefore, the marking lines on the top surface of the bolt and the marking lines in the bolt hole can be initially distinguished.

[0085] According to one embodiment of the present invention, the mean gray value of the smoothed image is calculated by the following formula:

[0086]

[0087] Wherein, PGA represents the grayscale mean, H and W represent the height and width of the smoothed image in pixels, and P(h, w) represents the grayscale value of the element in the h-th row and w-th column of the smoothed image.

[0088] According to one embodiment of the present invention, the adaptive upper threshold and the adaptive lower threshold are calculated based on the grayscale mean using the following formula:

[0089]

[0090]

[0091] Wherein, UCT represents adaptive upper threshold and DCT represents adaptive lower threshold.

[0092] In other words, the mean of grayscale and the mean of 1 and 0 can be taken as the adaptive upper and lower thresholds, respectively.

[0093] According to one embodiment of the present invention, binarization is performed using the adaptive upper threshold by the following formula:

[0094]

[0095] Among them, P U (h, w) represents the thresholding result using an adaptive upper threshold.

[0096] According to one embodiment of the present invention, binarization is performed using the adaptive lower threshold by the following formula:

[0097]

[0098] Among them, P D (h, w) represents the thresholding result using adaptive lower threshold.

[0099] By performing binarization on the image using adaptive upper and lower thresholds, the bolt top surface image and bolt hole image can be separated, thereby achieving adaptive separation of marker lines at different positions.

[0100] According to one embodiment of the present invention, extracting the edge of the marker line on the top surface of the bolt in the binary image of the bolt top surface and extracting the edge of the marker line on the bolt hole in the binary image of the bolt hole includes:

[0101] Edge strong gradient search is performed on the binarized image of the bolt top surface and the binarized image of the bolt hole to obtain the strong gradient of all pixels in the binarized image of the bolt top surface and the strong gradient of all pixels in the binarized image of the bolt hole.

[0102] Eliminating boundary errors using the non-maximum suppression method;

[0103] For example, nonmaximum suppression can include: after obtaining the strong gradient of all pixels in the image, if the strong gradient of a pixel is greater than the strong gradients of the two pixels adjacent to it in the direction of its strong gradient, then the pixel is retained; otherwise, the pixel is set to zero.

[0104] The upper and lower bounds of the first threshold are determined based on the maximum absolute value of the strong gradient among all pixels in the binary image of the bolt top surface. The upper and lower bounds of the second threshold are determined based on the maximum absolute value of the strong gradient among all pixels in the binary image of the bolt hole.

[0105] Based on the absolute values ​​of the strong gradients of all pixels in the binary image of the bolt top surface, as well as the upper and lower bounds of the first threshold, the edge of the marker line of the bolt top surface is extracted in the binary image of the bolt top surface. Based on the absolute values ​​of the strong gradients of all pixels in the binary image of the bolt hole, as well as the upper and lower bounds of the second threshold, the edge of the marker line of the bolt hole is extracted in the binary image of the bolt hole.

[0106] Specifically, pixels with a strong gradient absolute value higher than the upper bound of the corresponding threshold are called strong boundary points and are considered definite boundary points. Pixels with a strong gradient absolute value lower than the lower bound of the corresponding threshold are called non-boundary points, and pixels with a strong gradient between the upper and lower bounds of the corresponding threshold are called weak boundary points. Non-boundary points are set to zero. If a weak boundary point has a strong boundary point among its eight neighboring pixels, then the weak boundary point is also designated as a definite boundary point; otherwise, it is determined as a non-boundary point. The final definite boundary points in the image constitute the edge extraction result of the image; in other words, the edge extraction result of the image is composed of the definite boundary points in the image.

[0107] In image edge extraction, the Canny operator can effectively suppress false boundary detection.

[0108] Specifically, the strong gradients of all pixels in the binarized image (including the binarized image of the bolt top surface and the binarized image of the bolt hole) are obtained by performing edge strong gradient search through the following steps:

[0109]

[0110]

[0111]

[0112]

[0113] SG(h, w) = max([|SG 0° (h, w)|,|SG 90° (h, w)|,|SG 45° (h, w)|,|SG 135° (h, w)|]),

[0114] Among them, SG 0° (h, w) represents the longitudinal gradient, SG 90° (h, w) represents the lateral gradient, SG 45° (h, w) represents the gradient in the 45° direction, SG 125° (h, w) represents the gradient in the 135° direction, and SG(h, w) represents the strong gradient of a pixel.

[0115] In other words, calculate the gradients of all pixels in the entire image in the above four directions, and determine the strong gradient of that pixel as the one with the largest absolute value.

[0116] According to one embodiment of the present invention, taking a first threshold as an example, the upper bound and the lower bound of the first threshold are determined by the following formula:

[0117] EDC U=0.75×max(SG(h,w)), h=1,2,...,H; w=1,2,...,W,

[0118] EDC D =0.25×max(SG(h,w)), h=1,2,...,H; w=1,2,...,W,

[0119] Among them, EDC U EDC is the upper bound of the first threshold. D This is the lower bound of the first threshold.

[0120] The first threshold is similar to the second threshold, and for the sake of simplicity and to avoid confusing the present invention, it will not be described in detail here.

[0121] According to one embodiment of the present invention, the marking line search and marking line parameter determination are performed using edge Hough mapping and Hough space search for the marking line edge on the top surface of the bolt and the marking line edge of the bolt hole, respectively, including:

[0122] The edge Hough mapping is used to convert the marking line edges on the top surface of the bolt and the marking line edges of the bolt hole into curves in Hough space.

[0123] Search in Hough space for the intersection point with the most intersecting curves and use it as the boundary point of the marked line;

[0124] The marking line parameters are obtained based on the boundary points of the marking line.

[0125] That is, after obtaining the edge extraction results of the bolt top surface and bolt hole images respectively, the edge points in the image are mapped to the Hough space using the Hough transform method, and the parameters of the marker line are searched in the space.

[0126] For example, the edge points (defining boundary points) in an image can be mapped to the Hough space using the Hough transform method as follows:

[0127] ρ=wcosθ+hsinθ,

[0128] Where ρ represents the distance between the line defining the boundary point (w, h) in the image and the image origin, with the image origin set as the pixel at position (W, H / 2) in the image, and θ is the angle between the line in the image and the positive x-axis (the tilt angle of the marker line). Using Hough mapping, the coordinates of all defined boundary points in the image can be converted into curves in Hough space, denoted by (θ, ρ). At this point, the curves corresponding to defined boundary points on the same line in Hough space will all intersect at a single point.

[0129] The intersection point with the most intersecting curves is searched in Hough space. The corresponding boundary point in the image is the boundary point of the marker line. The (θ, ρ) of the intersection point is taken out in Hough space as the straight line parameter (marker line parameter) of the marker line in the image.

[0130] After obtaining the straight line parameters of the marking line on the top surface of the bolt and the marking line at the bolt hole, the bolt loosening detection result can be obtained by comparing the θ parameter in the parameters.

[0131] The bolt loosening detection method of the present invention will be described below with reference to examples.

[0132] Taking the magnetic levitation module of a certain magnetic levitation test platform as an example, the bolt position image and marker line setting method are as follows: Figure 2 As shown in the figure. The solid line segments in the figure represent two examples of setting the marking lines. Their relative position to the bolt does not need to be fixed. It is only necessary to ensure that the marking lines on the bolt and at the bolt holes of the module are on the same straight line, and that the two endpoints of the marking line segments on the bolt fall on any pair of sides of the hexagon on the top surface of the bolt, as shown by the dashed lines in the figure.

[0133] Taking a bolt diagram as an example, salt-and-pepper noise of varying intensities is added to the image to simulate image distortion. The result after adaptive median filtering according to this invention is shown in the figure below. Figure 3 As shown. In Figure 3 In the image, a is the original image, b is the noisy image (salt-and-pepper noise density 0.05), c is the noisy image (salt-and-pepper noise density 0.1), d is the noisy image (salt-and-pepper noise density 0.5), e is the grayscale image, and fh is the image after adaptive median filtering.

[0134] Depend on Figure 3 As can be seen, the noise effect in the image is significantly reduced after adaptive median filtering, which is beneficial to the subsequent edge extraction process. The denoised image is then smoothed using the Gaussian smoothing method described in this invention to remove false boundaries. The image before and after smoothing, and the corresponding edge extraction results are shown below. Figure 4 As shown. In Figure 4 In the image, a and b represent the image before Gaussian smoothing and the edge extraction result, respectively, while c and d represent the image after Gaussian smoothing and the edge extraction result, respectively.

[0135] Depend on Figure 4 As can be seen, the image before Gaussian smoothing has many messy false boundaries after edge extraction, which affects the detection results. However, the false boundaries in the edge extraction results of the image after Gaussian smoothing are significantly reduced.

[0136] Adaptive thresholding is applied to the Gaussian-smoothed image to distinguish the marking lines at the bolts and bolt holes, ensuring the accuracy of subsequent marking line detection. The result of using the adaptive thresholding marking line separation method described in this invention is shown in Figure 5. In Figure 5, Figure 5A The result of separating the marking line on the top of the bolt. Figure 5B The result of separating the bolt hole marking lines.

[0137] As shown in Figure 5, the marking lines of the bolt and bolt hole are clearly distinguished in the two images, facilitating subsequent parameter detection of the marking lines. The edges of the separated bolt and bolt hole marking lines are extracted using the Canny operator, and the result is shown in Figure 6. In Figure 6, Figure 6A Extracting the result from the edge of the marking line at the top of the bolt. Figure 6B The result is the extraction of the edge of the bolt hole marking line.

[0138] The extraction results for the bolt top and bolt hole edge were subjected to marker line search and parameter determination according to the Hough mapping and Hough space search methods in this invention, and the results are shown in Figure 7. In Figure 7, Figure 7A and 7B These are the mapping of the bolt top marking line and the search results. Figure 7C and 7D These are the bolt hole marking line mappings and search results.

[0139] As shown in Figure 7, the marking lines at the top of the bolt and the bolt hole can be accurately detected in the original image using the Hough mapping and spatial search method described in this invention. The parameters of the marking lines at the bolt and bolt hole can be obtained from the Hough space search results. The θ of the bolt top marking line is -2°, and the θ of the bolt hole marking line is 7°, resulting in a 9° difference between the two marking lines. Under the initial alignment of the two marking lines, the detection result indicates a bolt loosening angle of 9°. Therefore, this example verifies the effectiveness of the bolt loosening detection method for magnetic levitation modules in this invention, meeting the actual bolt loosening detection requirements.

[0140] As can be seen from the above embodiments, separating the bolt and bolt hole marking lines using the adaptive threshold method improves the accuracy of marking line extraction and bolt loosening angle determination. Simultaneously, a marking line parameter detection method based on edge extraction, Hough mapping, and Hough space search is constructed, enabling accurate determination of the marking line parameters for bolt and bolt hole positions. Finally, by comparing the marking line parameters and referencing the initial marking line conditions, accurate bolt loosening detection is achieved. Using the detection method described in this invention, while ensuring accurate bolt loosening detection results, the timeliness of detection is improved. Compared with existing bolt loosening detection methods based on pressure sensors and image recognition, it effectively improves detection efficiency, reduces the complexity of the detection method, and limits the delay of detection results, meeting the high precision and high real-time requirements for bolt loosening detection in maglev modules.

[0141] In the description of this invention, it should be understood that the orientation or positional relationship indicated by directional terms such as "front, back, up, down, left, right", "horizontal, vertical, horizontal" and "top, bottom" is generally based on the orientation or positional relationship shown in the accompanying drawings, and is only for the convenience of describing this invention and simplifying the description. Unless otherwise stated, these directional terms do not indicate or imply that the device or element referred to must have a specific orientation or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on the scope of protection of this invention; the directional terms "inner" and "outer" refer to the inner and outer contours relative to the outline of each component itself.

[0142] For ease of description, spatial relative terms such as "above," "on top of," "on the upper surface of," "above," etc., are used herein to describe the spatial positional relationship of a device or feature as shown in the figures to other devices or features. It should be understood that spatial relative terms are intended to encompass different orientations in use or operation beyond the orientation of the device as described in the figures. For example, if the device in the figures were inverted, a device described as "above" or "on top of" other devices or structures would subsequently be positioned as "below" or "under" other devices or structures. Thus, the exemplary term "above" can include both "above" and "below." The device may also be positioned in other different ways (rotated 90 degrees or in other orientations), and the spatial relative descriptions used herein will be interpreted accordingly.

[0143] Furthermore, it should be noted that the use of terms such as "first" and "second" to define components is merely for the purpose of distinguishing the corresponding components. Unless otherwise stated, the above terms have no special meaning and therefore should not be construed as limiting the scope of protection of this invention.

[0144] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for detecting bolt loosening in a magnetic levitation module based on threshold separation Hough search, characterized in that, The method includes: Obtain bolt images; The bolt image is denoised to obtain a denoised image, and the denoised image is smoothed to obtain a smoothed image. The smoothed image is subjected to marker line adaptive threshold separation to obtain a binary image of the bolt top surface and a binary image of the bolt hole; Using the Canny operator method, the edge of the marker line on the top surface of the bolt is extracted from the binary image of the bolt top surface, and the edge of the marker line on the bolt hole is extracted from the binary image of the bolt hole; Marker line search and marker line parameter determination are performed on the edge of the marker line on the top surface of the bolt and the edge of the marker line in the bolt hole using edge Hough mapping and Hough space search, respectively. The marker line parameters include the marker line parameters on the top surface of the bolt and the marker line parameters in the bolt hole. The bolt loosening detection results are obtained based on the bolt top surface marking line parameters and the bolt hole marking line parameters. Performing adaptive threshold separation on the smoothed image to obtain a binary image of the bolt top surface and a binary image of the bolt hole includes: Calculate the mean grayscale value of the smoothed image; Calculate the adaptive upper threshold and adaptive lower threshold based on the grayscale mean; The grayscale image is binarized using the adaptive upper threshold and the adaptive lower threshold to obtain the binarized image of the bolt top surface and the binarized image of the bolt hole.

2. The method according to claim 1, characterized in that, The noise reduction process performed on the bolt image yields the following denoised image: S200, convert the bolt image into a grayscale image, with a preset filter window size of w*w and a window sliding step size of s; S202, place the preset filtering window at the top left of the grayscale image, align the center element of the preset filtering window with the top left pixel of the grayscale image, sort the pixel values ​​of all pixels in the preset filtering window, if the median grayscale value of the pixels in the preset filtering window is equal to the maximum or minimum pixel value, then increment w by 2 and return to S200; if the median grayscale value of the pixels in the preset filtering window is between the maximum and minimum pixel values, then proceed to S204. S204, retain the original pixel value of pixels whose gray value is not equal to the maximum pixel value and the minimum pixel value in the preset filtering window, and set the pixel value of pixels whose gray value is equal to the maximum pixel value or the minimum pixel value to the gray median value in the preset filtering window; S206, the preset filtering window slides to the right with the sliding step s. If the center element of the preset filtering window has exceeded the rightmost pixel of the grayscale image, the center element of the preset filtering window is returned to the top left of the grayscale image and slides down with the sliding step s. S202-S206 are repeated until the entire grayscale image is traversed to obtain the denoised image.

3. The method according to claim 2, characterized in that, The smoothed image is obtained by smoothing the denoised image, including: The denoised image is then subjected to two-dimensional Gaussian smoothing to obtain a smoothed image.

4. The method according to claim 3, characterized in that, Two-dimensional Gaussian smoothing is performed using a two-dimensional Gaussian smoothing filter, which is: , in, This indicates the position of the element within the Gaussian filter window. and These represent the row and column coordinates of the element, respectively. This represents the mean of a two-dimensional Gaussian distribution. This represents the covariance matrix of a two-dimensional Gaussian distribution.

5. The method according to claim 4, characterized in that, The mean gray level of the smoothed image is calculated using the following formula: , Where PGA represents the grayscale mean. and This represents the height and width of the smoothed image. Indicates the first element in the smoothed image OK The grayscale value of the column element.

6. The method according to claim 5, characterized in that, The adaptive upper threshold and adaptive lower threshold are calculated based on the grayscale mean using the following formula: , , Wherein, UCT represents adaptive upper threshold and DCT represents adaptive lower threshold.

7. The method according to claim 6, characterized in that, Extracting the edge of the marker line on the top surface of the bolt in the binarized image of the bolt top surface and extracting the edge of the marker line on the bolt hole in the binarized image of the bolt hole include: Edge strong gradient search is performed on the binarized image of the bolt top surface and the binarized image of the bolt hole to obtain the strong gradient of all pixels in the binarized image of the bolt top surface and the strong gradient of all pixels in the binarized image of the bolt hole. Eliminating boundary errors using the non-maximum suppression method; The upper and lower bounds of the first threshold are determined based on the maximum absolute value of the strong gradient among all pixels in the binary image of the bolt top surface. The upper and lower bounds of the second threshold are determined based on the maximum absolute value of the strong gradient among all pixels in the binary image of the bolt hole. Based on the absolute values ​​of the strong gradients of all pixels in the binary image of the bolt top surface, as well as the upper and lower bounds of the first threshold, the edge of the marker line of the bolt top surface is extracted in the binary image of the bolt top surface. Based on the absolute values ​​of the strong gradients of all pixels in the binary image of the bolt hole, as well as the upper and lower bounds of the second threshold, the edge of the marker line of the bolt hole is extracted in the binary image of the bolt hole.

8. The method according to claim 7, characterized in that, Marker line search and parameter determination are performed using edge Hough mapping and Hough space search, respectively, targeting the marking line edges on the bolt top surface and the bolt hole. The edge Hough mapping is used to convert the marking line edges on the top surface of the bolt and the marking line edges of the bolt hole into curves in Hough space. Search in Hough space for the intersection point with the most intersecting curves and use it as the boundary point of the marked line; The marking line parameters are obtained based on the boundary points of the marking line.