A method for judging bolt looseness based on detecting the minimum bounding box

By using the minimum enclosure frame model to mark and analyze the marking lines when detecting the loose bolts at the bottom of the train, the problems of low detection efficiency, high cost and inaccurate analysis results in the prior art are solved, and more accurate and stable bolt loosening detection is achieved.

CN119417830BActive Publication Date: 2025-04-11CRRC HANGZHOU DIGITAL TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510021260.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-07
Publication Date
2025-04-11
Estimated Expiration
2045-01-07

AI Technical Summary

Technical Problem

The prior art detects that the bolts at the bottom of the train are low efficiency, high cost, high leakage detection rate, and safety risks. At the same time, the deep learning model is accurate and low in the analysis results when dealing with various bolt situations.

Method used

The method based on detecting the minimum enclosure box is adopted, and the bolt item point diagram is obtained through the preset object detection model. The marking lines are marked using the minimum enclosure box model, the categories and number of marking lines are analyzed, the five types of marking lines are distinguished, and the corresponding judgment strategy is selected for marking line offset judgment.

Benefits of technology

Through the careful annotation and analysis of the minimum enclosure frame, bolts in different situations can be more accurately classified and processed, false alarms can be reduced, detection stability can be improved, and missing parts in the marking line can be ignored, providing an integral rectangular frame to facilitate the determination of bolts loose.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119417830B_ABST
    Figure CN119417830B_ABST
Patent Text Reader

Abstract

The present invention provides a method for judging bolt looseness based on detecting a minimum bounding box, comprising a bolt item point map acquisition step, detecting each bolt item point map on a train photographed by a camera according to a preset target detection model; a marking line bounding box marking step, marking each marking line in the bolt item point map with a minimum bounding box according to a preset minimum bounding box model; a marking line category analysis step, judging the number of minimum bounding boxes in the bolt item point map as the number of marking lines, and judging whether the category of each marking line is the same; a marking line selection and judgment step, performing type screening on the bolt item point map according to a marking line category judgment result and the number of marking lines to obtain a marking type, and selecting the minimum bounding box of two marking lines according to a marking type matching corresponding marking line judgment strategy to perform marking line offset judgment; the present invention has the advantage that bolts in different situations can be classified and processed more meticulously, thereby reducing false alarms of bolt looseness caused by viewing angle problems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of bolt loosening detection at the bottom of a train, and more particularly to a method for determining bolt loosening based on detecting a minimum bounding box. Background Art

[0002] With the rapid development of the railway transportation industry, the speed and frequency of trains are constantly increasing, and the requirements for train operation safety and maintenance efficiency are becoming higher and higher. The bottom parts of the train are subjected to complex mechanical loads and environmental influences during the operation of the train, and are prone to loosening, wear and even falling off. Abnormalities in the bolts at the bottom of the train will not only affect the operating performance of the train, but may even lead to serious safety accidents. Therefore, timely and accurate detection of the status of the bolts at the bottom of the train is of great significance to ensure the safe operation of the train.

[0003] Current inspections include traditional manual inspections and train underbody inspections based on machine vision and deep learning.

[0004] Among them, the limitations of traditional detection methods mainly include low efficiency: manual inspection is time-consuming and labor-intensive, especially for trains that require frequent inspections, the efficiency is low; high cost: a large number of professionals are required for manual inspection, resulting in high labor costs; high missed detection rate: manual inspection is limited by the experience and attention of personnel, and is prone to missed detection and false detection; safety risks: during the manual inspection process, maintenance personnel need to enter the bottom of the train to work, which poses certain safety risks.

[0005] Among them, the deep learning-based train bottom component detection mainly relies on comparing the model output template image with the actual image, or analyzing it through item points. However, there are many different situations for the current bolt components, and the number and situation of the corresponding drawn marking lines are different. The existing model matching comparison or item point analysis leads to low accuracy of the analysis results. Summary of the invention

[0006] In view of the shortcomings of the prior art, an object of the present invention is to provide a method for determining whether a bolt is loose based on detecting a minimum bounding box.

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

[0008] A method for determining whether a bolt is loose based on detecting a minimum bounding box comprises the following steps:

[0009] The bolt point map acquisition step detects the bolt point map on the train captured by the camera according to the preset target detection model;

[0010] The marking line bounding box marking step is to mark each marking line in the bolt point diagram with a minimum bounding box according to a preset minimum bounding box model;

[0011] a marking line category analysis step, determining the number of minimum bounding boxes in the bolt item point diagram as the number of marking lines, and determining whether the category of each marking line is the same;

[0012] The marking line selection and judgment step is to screen the bolt item point diagram according to the marking line category judgment result and the number of marking lines to obtain the marking type, and select the minimum enclosing box of the two marking lines according to the marking type matching corresponding marking line judgment strategy to perform marking line offset judgment.

[0013] Furthermore, the marking line selection and judgment step includes a type screening strategy, which includes counting the number of marking lines of different categories as valid marking lines, and then obtaining the marking types in order of quantity according to the number of valid marking lines. The marking types include three marking line types, two marking line types and one marking line type.

[0014] Furthermore, the marking line judgment strategy includes a line selection judgment sub-strategy, a direct judgment sub-strategy, and an ignore judgment sub-strategy. The line selection judgment sub-strategy corresponds to a marking type of three marking lines, and the line selection judgment sub-strategy includes selecting two adjacent and valid marking lines for offset judgment. The direct judgment sub-strategy corresponds to a marking type of two marking lines, and the direct judgment sub-strategy includes performing an offset judgment on the only two valid marking lines. The ignore judgment sub-strategy corresponds to a marking type of one marking line, and the ignore judgment sub-strategy includes ignoring the offset judgment on the only one marking line.

[0015] Furthermore, the minimum bounding box output by the minimum bounding box model matches a marking line category, and the marking line category includes a bottom marking line of a bolt fixing location, a nut marking line, and a screw marking line.

[0016] Furthermore, the line selection judgment sub-strategy includes judging whether there is a screw-type marking line among the three valid marking lines. If so, the screw-type marking line and the nut-type marking line are selected for offset judgment. If not, the nut-type marking line and the bottom-type marking line of the bolt fixing point are selected for offset judgment.

[0017] Furthermore, it also includes a step of calculating the marking line connection coefficient.

[0018] The step of calculating the marker line connection coefficient obtains the minimum enclosing frame corresponding to the two marker lines drawn in the initial image as the first frame group, and obtains the minimum enclosing frame corresponding to the same two marker lines selected in the initial image as the second frame group in the actual detection image, and then calculates the parallelism of the long sides on the same side and the distance between the adjacent short sides of the two minimum enclosing frames in the first frame group and the second frame group respectively, and calculates the connection coefficient of the two marker lines in the actual detection image through a connection algorithm, and outputs whether the marker lines are offset according to the connection coefficient.

[0019] Furthermore, the connection algorithm is configured as follows:

[0020] ,

[0021] ,

[0022] ,

[0023] ,

[0024] in, is the angle between the long sides of the two bounding boxes on the same side in the initial image, is the distance between the adjacent short sides of two bounding boxes in the initial image, To actually detect the angle between the long sides of the two bounding boxes on the same side of the image, To actually detect the distance between the adjacent short sides of two bounding boxes in the image, is the connection coefficient, ranging from 0 to 1.

[0025] Furthermore, it also includes a marking line connection verification step,

[0026] In the step of verifying the connection of the marking lines, the minimum bounding boxes in the first frame group and the second frame group are subjected to image processing to delete the area outside the type in the minimum bounding box to obtain the corresponding marking line area, and the areas of the two marking lines in the first frame group are compared to obtain a first ratio, and then the areas of the two marking lines in the second frame group are compared to obtain a second ratio, the difference between the first ratio and the second ratio is compared with a preset threshold, and a verification correctness or verification error is output according to the comparison result.

[0027] Furthermore, the verification algorithm is configured as follows:

[0028] ,

[0029] ,

[0030] in, is the first ratio, is the second ratio.

[0031] Furthermore, a long side of the minimum enclosing frame is parallel to the marking line, and the minimum enclosing frame encloses an entire marking line.

[0032] The beneficial effects of the present invention are as follows: by marking the marking lines in the form of a minimum bounding box in the bolt item point diagram, and then analyzing the categories and quantities of the marking lines, five types of marking lines are distinguished, so that bolts in different situations can be classified and processed more meticulously, reducing the false alarms caused by the previous loosening of bolts due to the problem of viewing angle. In addition, the corresponding marking line judgment strategy is selected to perform marking line judgment, which is more stable than the traditional instance segmentation scheme. Usually, the marking lines will be scratched or partially missing during use. The segmentation scheme will distinguish the missing parts, resulting in the generation of irregular marking line areas, which increases the difficulty for the subsequent algorithm to determine whether it is loose. The target detection scheme can ignore the missing parts in the marking line and can give a rectangular frame of the entire marking line, which is convenient for algorithm judgment. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 It is the overall flow chart of the present invention;

[0034] Figure 2 This is a diagram of the first situation in which the marking type is three marking lines in the present invention;

[0035] Figure 3 This is a diagram of the second situation in which the marking type is three marking lines in the present invention;

[0036] Figure 4 This is a third situation diagram of the marking type of the present invention with three marking lines;

[0037] Figure 5 This is a fourth situation diagram of the marking type of the present invention being three marking lines;

[0038] Figure 6 This is a diagram of the first situation in which the marking type is two marking lines in the present invention;

[0039] Figure 7 This is a diagram of the second situation in which the marking type is two marking lines in the present invention;

[0040] Figure 8 This is a diagram of the third situation in which the marking type in the present invention is two marking lines;

[0041] Fig. 9 This is a fourth situation diagram of the marking type of the present invention being two marking lines;

[0042] Fig.10 This is a diagram showing a situation where the marking type in the present invention is a marking line;

[0043] Fig.11 It is a schematic diagram of the second judgment logic in the present invention. DETAILED DESCRIPTION

[0044] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. The same parts are represented by the same reference numerals. It should be noted that the words "front", "rear", "left", "right", "upper" and "lower" used in the following description refer to directions in the accompanying drawings, and the words "bottom surface" and "top surface", "inner" and "outer" refer to directions toward or away from the geometric center of a specific component, respectively.

[0045] Since the existing deep learning train bottom component detection mainly relies on comparing the model output template image with the actual image, or analyzing through item points, but there are many different situations of the current bolt components, the number and situation of the corresponding drawn marking lines are different, and the existing model matching comparison or item point analysis leads to low accuracy of the analysis results. Therefore, the present invention designs this method for judging bolt looseness based on detecting the minimum bounding box, which includes the following steps:

[0046] Steps for making bolt thumbnails: Initially, loose bolt marking lines are drawn on the bottom of the train and on the tightened bolts on the train. Images of the bottom and sides of the train are collected from multiple shooting angles under different lighting conditions by using a collection robot or a train passing through the collection area to ensure that the images include bolts of various shapes and specifications. All bolts on the subway are detected using the pre-trained YOLOV11 target detection method, and then thumbnails of the bolt parts are captured for subsequent production of the bolt marking line dataset.

[0047] Steps for making a minimum bounding box dataset: Use the X-AnyLabeling software to label each marking line on the bolt. Use the minimum bounding box (OBB box) to label the bolt marking line, so that each rectangular box encloses a whole bolt marking line with the smallest area, so that the rectangular box can better adapt to the shape of the marking line. The OBB box does not need to be parallel to any coordinate axis in the coordinates, and the long side of the OBB box is parallel to the bolt marking line. According to the different marking positions of the marking lines, they are divided into 5 categories: ① marking lines on bolts and nuts; ② marking lines on the side of bolts and nuts; ③ marking lines on the side of screws; ④ marking lines on the side of nuts; ⑤ marking lines on the base where the bolts are fixed;

[0048] The marking requirements are as follows: at the same bolt position, that is, two adjacent marking lines of the same category, should be the same marking line, but if there is an interruption, the two separated marking lines should be marked as the same bounding box (rotating box); the marking lines at different bolt positions are connected, and the marking lines in different parts should be marked separately according to the category; all marking lines in the bolt image need to be marked with bounding boxes (rotating boxes).

[0049] After the marking is completed, each bolt image corresponds to a json file with the same name, which contains the information of each bolt marking line. The json file needs to be converted into the YOLOv11 rotation box txt format. The data format includes the category of the bolt marking line and the four corner points of the rotation box, corresponding to the order of top right, bottom right, bottom left, and top left.

[0050] The labeled images and corresponding txt files were made into training set, validation set and test set respectively, and distributed in the ratio of 7:1.5:1.5 for model training and evaluation.

[0051] Steps for building the minimum bounding box model: The minimum bounding box dataset is trained through the YOLOV11-OBB neural network. Through model training, the minimum bounding box of each marking line in the bolt image is used to detect the minimum bounding box. Different from the traditional target detection method, the detection result of the YOLOV11-OBB method is a rotated detection box. Each detection box has the coordinates of four corner points and the rotation angle of the rotation box and the positive direction of the image X-axis, which is used as a basis for subsequent judgment on whether the marking line is loose.

[0052] like Figure 1 As shown, it also includes a bolt item point map acquisition step, detecting each bolt item point map on the train actually photographed by the camera according to a preset target detection model;

[0053] The marking line bounding box labeling step is to label each marking line in the bolt point diagram with a minimum bounding box according to the minimum bounding box model constructed above to obtain the bounding box (rotation box) corresponding to each marking line. The minimum bounding box output by the minimum bounding box model matches the marking line category, and the marking line category includes the bottom marking line of the bolt fixing part, the nut marking line and the screw marking line;

[0054] Marking line category analysis step: determine the number of minimum bounding boxes in the bolt item point diagram as the number of marking lines, and determine whether the categories of each marking line are the same. The categories here are different from the five categories in the minimum bounding box data set preparation step. The categories here only consider the component category where the marking line is located, that is, the marking line categories include the bottom category marking line of the bolt fixing part, the nut category marking line, and the screw category marking line;

[0055] Marking line selection judgment step, according to the marking line category judgment result and the number of marking lines, the bolt item point diagram is analyzed by type screening strategy to obtain the marking type, wherein the type screening strategy includes counting the number of marking lines of different categories as valid marking lines, and then obtaining the marking type in sequence according to the number of valid marking lines. The marking types include three marking line types, two marking line types and one marking line type, such as Figure 2 , Figure 3 , Figure 4 as well as Figure 5 As shown in the figure, a bolt point diagram includes three marking lines, and the marking type is three marking line types, such as Figure 6 , Figure 7 , Figure 8 as well as Fig. 9 As shown in the figure, a bolt point diagram includes two marking lines, but Figure 8 and Fig. 9 The categories of the two marked lines in are the same, so Figure 6 and Figure 7 The marking type is two marking lines. Figure 8 , Fig. 9 as well as Fig.10 The marking type is a line marking class;

[0056] According to the marking type matching corresponding marking line judgment strategy, the minimum bounding box of the two marking lines is selected for marking line offset judgment, wherein the marking line judgment strategy includes line selection judgment sub-strategy, direct judgment sub-strategy, and ignore judgment sub-strategy. The line selection judgment sub-strategy corresponds to the marking type of three marking lines. The line selection judgment sub-strategy includes selecting two adjacent and valid marking lines for offset judgment. Specifically, it is judged whether there is a screw marking line among the three valid marking lines. If so, the screw marking line and the nut marking line are selected for offset judgment. If not, the nut marking line and the bottom marking line of the bolt fixing place are selected for offset judgment. The direct judgment sub-strategy corresponds to the marking type of two marking lines. The direct judgment sub-strategy includes offset judgment for the only two valid marking lines. The ignore judgment sub-strategy corresponds to the marking type of one marking line. The ignore judgment sub-strategy includes ignoring the offset judgment for the only one marking line.

[0057] In addition, according to Figure 2-Figure 10 As shown, the five categories in the data set preparation step according to the minimum bounding box are specifically divided into the following situations:

[0058] If there is no bolt marking line or only one marking line in the image, it is marked as the bolt marking line is not drawn in a standardized way or the bolt is missing or the bolt loose range is too large, and it is necessary to re-register and fill in the line later; when there are two marking lines of different categories, and they are not categories ① and ②, it is necessary to determine whether the OBB frames of these two marking lines are offset (because the relative positions of the marking lines of categories ①② and categories ②④ are fixed, and will not shift as the bolts loosen, and cannot be used as a basis for loosening judgment, and in the case of the same bolt item, categories ⓪②, category ⓪③, category ①②, and category ①③ will not exist at the same time. Except for the above six situations, it is impossible to judge whether the marking line is shifted in other situations); when there are three marking lines and For the above marking lines, there are usually at most three marking lines for bolts, except when the marking lines are worn, there will be more than three marking lines. According to the result of target detection, only the marking wireframe with the highest confidence in each category can be taken. Because the bolt conditions under the vehicle are relatively uniform, there are only the following situations: A: Categories ⓪, ① and ④ exist at the same time. When categories ⓪ and ① exist at the same time, the relative positions of categories ⓪ and ① are fixed, so only categories ① and ④ need to be considered whether they are offset; B: Categories ②, ③ and ④ exist at the same time. When categories ② and ③ exist at the same time, category ④ does not need to be considered, because the relative positions of categories ② and ④ are fixed, so only categories ② and ③ need to be considered whether they are offset. There are two ways to determine whether the marker line is offset. One of them is as follows: including a marker line connection coefficient calculation step. When constructing the minimum bounding box model of the train, the initial images of each bolt have been obtained for recording and training. Therefore, the minimum bounding box corresponding to the two marker lines drawn in the initial image is obtained as the first frame group, and the minimum bounding box corresponding to the same two marker lines selected in the initial image in the actual detection image is obtained as the second frame group. Then, the parallelism of the same side long sides (the angle between the same side long sides) and the distance between adjacent short sides of the two minimum bounding boxes in the first frame group and the second frame group are calculated respectively, and the connection coefficient of the two marker lines in the actual detection image is calculated by the connection algorithm. According to the connection coefficient, whether the marker line is offset is output. The connection algorithm is configured as follows:

[0059] ,

[0060] ,

[0061] ,

[0062] ,

[0063] in, is the angle between the long sides of the two bounding boxes on the same side in the initial image, is the distance between the adjacent short sides of two bounding boxes in the initial image, To actually detect the angle between the long sides of the two bounding boxes on the same side of the image, To actually detect the distance between the adjacent short sides of two bounding boxes in the image, is the connection coefficient, ranging from 0 to 1. To calculate the cosine similarity between the initial angle and the actual angle, To normalize the initial short edge distance, To calculate the exponential decay value based on the actual short edge distance, Take 0, Take 0.1. When K is equal to 1, it means that the bolt is not loose or offset. When K is equal to 0, it means that the bolt is completely loose or offset. When K is between 0 and 1, the larger the value, the smaller the offset.

[0064] like Figure 4 and Figure 5 As shown in the figure, due to the thin screw, under the conditions of shooting angle and bolt looseness, part of the marking line on the screw may not be displayed in the image, that is, the bounding box (rotation box) does not completely surround the entire marking line. If the width of the marking line is too large, there is still a possibility of bolt offset. Therefore, a marking line connection verification step is also included. The minimum bounding box in the first frame group and the second frame group is processed to delete the area outside the minimum bounding box to obtain the corresponding marking line area. The image preprocessing includes noise removal: applying filters (such as mean filters, median filters, Gaussian filters, etc.) to remove noise in the image Sound, then image enhancement: use contrast enhancement, histogram equalization and other technologies to improve the visual effect of the image, then edge detection: apply edge detection algorithms (such as Canny edge detector, Sobel operator, Prewitt operator, etc.) to identify the image of the marking line in the image, and finally through image segmentation: divide the marking line area detected by edge into multiple areas to facilitate the calculation of the area of ​​each area separately, and finally accumulate to obtain the marking line area; and compare the areas of the two marking lines in the first frame group to obtain the first ratio, and then compare the areas of the two marking lines in the second frame group to obtain the second ratio. Assume that Figure 5 As shown, the first frame group and the second frame group need to be compared with categories ② (marked lines on the nut) and ③ (marked lines on the screw), then the areas of categories ② and ③ in the first frame group are calculated to obtain a first ratio, and then the areas of categories ② and ③ in the second frame group are calculated to obtain a second ratio, and the difference between the first ratio and the second ratio is compared with the preset threshold, and the verification is correct or wrong according to the comparison result. The verification algorithm is configured as follows:

[0065] ,

[0066] ,

[0067] in, is the first ratio, is the second ratio.

[0068] The second judgment logic includes:

[0069] Calculate the length of each marker line in the image and the rotation angle of the marker line. Each detection result after YOLOV11-OBB target detection will have the coordinates of the four corner points of the rotation box and the angle of rotation of the rotation box along the positive direction of the image X-axis. The angle can be positive or negative. A positive number indicates that the rotation box is clockwise along the positive direction of the X-axis when it is parallel to the coordinate axis, and a negative number indicates counterclockwise rotation. The purpose of the OBB box is to detect the minimum bounding box of the marker line. Therefore, the long side of the detection box is the length of the marker line, and the width of the detection box is the width of the marker line. When the marker line is drawn, it will be extended along the direction of the mark. Therefore, the long side direction of the rotation box defaults to the extension direction of the marker line. Through the coordinates of the four corner points of the rotation box, the long and short sides of the box can be calculated, and the rotation angle of the extension direction of the marker line in the image can be calculated. If the angle between the long side of the rotation box and the X-axis is smaller than the angle between the long side and the Y-axis, the rotation angle of the rotation box in the image coordinate system is the angle output by the target detection. If the angle between the long side of the rotating box and the X-axis is greater than the angle between the long side and the Y-axis, and if the angle output by the target detection is greater than 0, the rotation angle of the rotating box in the image coordinate system is the angle output by the target detection plus 90 degrees, otherwise minus 90 degrees.

[0070] There are two cases to judge whether two marking lines are offset. The first case is that the two marking lines are adjacent to each other. After the marking lines are offset, a certain angle is formed between them, or the marking lines are separated and become parallel, such as category ①④, category ②③, category ③④; the second case is that the two marking lines are not adjacent to each other but are parallel in the image. After the marking lines are offset, a certain angle is formed between them. For example, category ⓪④.

[0071] as follows Fig.11 As shown, for the first case: the two rotating boxes extend along the long side, and the extension length is 30% of the length of the rotating box. It is judged whether the two rotating boxes will intersect. If the marking lines intersect at this time, the marking lines are not offset. If no intersection occurs after extension, a second confirmation is required. The rotation angle of the marking line is obtained, and the angle difference is used to determine whether the marking line is offset by threshold screening. For the second case: only the rotation angle of the two marking lines is required, and the threshold screening method is used to determine whether the marking line is offset.

[0072] The above are only preferred embodiments of the present invention. The protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A method for determining bolt looseness based on detecting a minimum bounding box, characterized in that: The steps include: The bolt point map acquisition step detects the bolt point map on the train captured by the camera according to the preset target detection model; a marking line bounding box labeling step, in which each marking line in the bolt item point diagram is labeled with a minimum bounding box according to a preset minimum bounding box model, wherein the minimum bounding box output by the minimum bounding box model matches a marking line category, and the marking line category includes a bottom-type marking line at a bolt fixing location, a nut-type marking line, and a screw-type marking line; a marking line category analysis step, determining the number of minimum bounding boxes in the bolt item point diagram as the number of marking lines, and determining whether the category of each marking line is the same; The marking line selection and judgment step is to screen the bolt item point diagram according to the marking line category judgment result and the number of marking lines to obtain the marking type, wherein the marking type includes three marking line types, two marking line types and one marking line types, and the minimum enclosing box of the two marking lines is selected according to the marking type matching corresponding marking line judgment strategy to perform marking line offset judgment; It also includes the calculation steps of the marking line connection coefficient. The step of calculating the marker line connection coefficient is as follows: obtaining the minimum bounding box corresponding to the two marker lines selected and drawn in the initial image as the first frame group, and obtaining the minimum bounding box corresponding to the same two marker lines selected in the initial image in the actual detection image as the second frame group, and then respectively calculating the parallelism of the same-side long sides and the distance between the adjacent short sides of the two minimum bounding boxes in the first frame group and the second frame group, and calculating the connection coefficient of the two marker lines in the actual detection image through a connection algorithm, and outputting whether the marker lines are offset according to the connection coefficient; The connection algorithm is configured as follows: , , , , in, is the angle between the long sides of the two bounding boxes on the same side in the initial image, is the distance between the adjacent short sides of two bounding boxes in the initial image, To actually detect the angle between the long sides of the two bounding boxes on the same side of the image, To actually detect the distance between the adjacent short sides of two bounding boxes in the image, is the connection coefficient, ranging from 0 to 1.

2. According to claim 1, a method for determining bolt looseness based on detecting a minimum bounding box, characterized in that: The marking line selection and judgment step includes a type screening strategy, which includes counting the number of marking lines of different categories as valid marking lines, and then obtaining the marking types in order of quantity according to the number of valid marking lines.

3. According to claim 2, a method for determining bolt looseness based on detecting a minimum bounding box is characterized in that: The marking line judgment strategy includes a line selection judgment sub-strategy, a direct judgment sub-strategy, and an ignore judgment sub-strategy. The line selection judgment sub-strategy corresponds to a marking type of three marking lines. The line selection judgment sub-strategy includes selecting two adjacent and valid marking lines for offset judgment. The direct judgment sub-strategy corresponds to a marking type of two marking lines. The direct judgment sub-strategy includes performing an offset judgment on the only two valid marking lines. The ignore judgment sub-strategy corresponds to a marking type of one marking line. The ignore judgment sub-strategy includes ignoring the offset judgment on the only one marking line.

4. According to claim 3, a method for determining bolt looseness based on detecting a minimum bounding box is characterized in that: The line selection judgment sub-strategy includes judging whether there is a screw-type marking line among the three valid marking lines. If so, the screw-type marking line and the nut-type marking line are selected for offset judgment. If not, the nut-type marking line and the bottom-type marking line of the bolt fixing place are selected for offset judgment.

5. According to claim 1, a method for determining bolt looseness based on detecting a minimum bounding box, characterized in that: It also includes the marking line connection verification step, In the step of verifying the connection of the marking lines, the minimum bounding boxes in the first frame group and the second frame group are subjected to image processing to delete the area outside the type in the minimum bounding box to obtain the corresponding marking line area, and the areas of the two marking lines in the first frame group are compared to obtain a first ratio, and then the areas of the two marking lines in the second frame group are compared to obtain a second ratio, the difference between the first ratio and the second ratio is compared with a preset threshold, and a verification correctness or verification error is output according to the comparison result.

6. The method for determining bolt looseness based on detecting the minimum bounding box according to claim 5, characterized in that: The marking line connection verification step is configured as follows: , , in, is the first ratio, is the second ratio.

7. The method for determining bolt looseness based on detecting a minimum bounding box according to claim 1, characterized in that: The long side of the minimum bounding box is parallel to the marking line, and the minimum bounding box surrounds an entire marking line.

Citation Information

Patent Citations

  • Bolt detection method and device based on machine vision

    CN117333696A