A bolt magnetic particle inspection method and system
Patent Information
- Application Number
- CN202610883741.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-18
- Publication Date
- 2026-09-25
AI Technical Summary
[0004]为了解决现有技术的不足,本申请提供一种螺栓磁粉探伤检测方法及系统,能够解决现有技术中螺栓磁粉探伤依赖人工目视判断,导致主观性强、易疲劳、易漏检误判,且结果难以数字化追溯的技术问题
缺陷判定模块,用于提取表面图像中检测介质聚集区域的形态特征,将形态特征与螺纹结构特征进行比对,以判断待检测螺栓表面是否存在缺陷;
Smart Images

Figure CN122814728A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of nondestructive testing technology, and more specifically, to a method and system for magnetic particle testing of bolts. Background Technology
[0002] Magnetic particle testing is a core non-destructive testing method for ensuring the quality of critical ferromagnetic fasteners (such as high-strength bolts) in fields like high-speed rail and aerospace. In these applications with extremely high safety requirements, bolts often need to undergo 100% inspection to eliminate any surface or near-surface defects that could lead to catastrophic accidents. Currently, inspection methods in industrial production are gradually evolving from traditional manual operation to automated inspection lines. However, whether it's manual or semi-automatic inspection, the core defect identification process still largely relies on operators visually observing and subjectively judging under ultraviolet light.
[0003] This inspection method, relying on manual visual inspection, suffers from inherent and insurmountable technical bottlenecks. First, the accuracy of the inspection results is highly dependent on the skill level, experience, and sense of responsibility of the inspectors, making it subjective and lacking unified objective standards. Second, prolonged, high-intensity, repetitive observation in a darkroom environment easily leads to visual fatigue among inspectors, resulting in missed detection of minute defects. More problematic is the fact that the complex thread structure of bolts itself can mechanically trap magnetic powder, creating false defects that resemble the appearance of genuine defects, making manual identification extremely difficult and resulting in a high misjudgment rate. Furthermore, inspection results are usually recorded in paper form, making it difficult to correlate them one-to-one with specific bolts and hindering the creation of effective digital quality archives, thus posing a significant obstacle to product lifecycle quality traceability. Therefore, existing technologies urgently need improvement to address these issues. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this application provides a bolt magnetic particle testing method and system, which can solve the technical problems of bolt magnetic particle testing relying on manual visual judgment, resulting in strong subjectivity, fatigue, easy omissions and misjudgments, and difficulty in digital traceability of results.
[0005] Firstly, this application provides a method for magnetic particle testing of bolts, including: The identification information of the bolt to be tested is obtained and the surface of the bolt to be tested is pretreated. Multi-directional magnetization is performed on the pretreated bolt to be tested, and a detection medium is applied to its surface at the same time. Acquire surface images of the bolt to be inspected, and identify the thread structure features of the bolt from the surface images; The morphological features of the detection medium accumulation area are extracted from the surface image, and the morphological features are compared with the thread structure features to determine whether there are defects on the surface of the bolt to be inspected. If a defect is determined to exist on the surface of the bolt to be inspected, the spatial coordinates of the defect are obtained and defect marking is performed. The defect information and the marking information are then associated and stored.
[0006] This technical solution automates the association between bolt identification information, defect detection process and results. It replaces traditional manual visual observation and subjective judgment with image processing and feature comparison, fundamentally solving the problems of missed detection and misjudgment caused by subjective factors such as personnel skills and fatigue. It significantly improves the accuracy and reliability of detection and realizes digital traceability management of detection results.
[0007] Secondly, this application also discloses a bolt magnetic particle testing system for performing the bolt magnetic particle testing method as described in any of the preceding claims, the system comprising: The pre-processing and magnetization module is used to acquire the identification information of the bolt to be tested and to perform surface pre-processing on the bolt to be tested, to perform multi-directional magnetization on the pre-processed bolt to be tested, and to apply a detection medium to its surface at the same time. The feature recognition module is used to acquire surface images of the bolt to be inspected and to identify the thread structure features of the bolt from the surface images. The defect determination module is used to extract the morphological features of the detection medium accumulation area in the surface image, and compare the morphological features with the thread structure features to determine whether there are defects on the surface of the bolt to be inspected. The marking processing module is used to obtain the spatial coordinates of the defects and perform defect marking processing if it is determined that there are defects on the surface of the bolt to be inspected, and to associate and store the defect information with the marking information.
[0008] This application provides a bolt magnetic particle inspection method and system, which, compared with existing technologies, has the following advantages: First, this application acquires surface images of the bolt to be inspected and automatically identifies the thread structure features and the morphological features of the detection medium accumulation area using image processing technology. Then, it uses algorithms to compare these features to determine defects, completely replacing the traditional inspection method that relies on manual visual observation. This automated and intelligent judgment mechanism fundamentally eliminates the uncertainty caused by factors such as the skill level, experience differences, subjective judgment, and physiological fatigue of the inspectors, making the inspection results highly objective and repeatable, significantly improving the detection rate of minute defects and reducing the false judgment rate. Second, this application can effectively distinguish between real defects and common non-defective magnetic particle mechanical retention in thread grooves. By logically comparing the morphology, size, and extension direction of the magnetic particle accumulation area with the identified thread structure features, it can accurately identify real defect indicators that are inconsistent with the thread direction or have abnormal shapes, solving the technical pain point in existing technologies where the two are easily confused. Finally, this application associates and stores the detected defect information with the unique identification information of the bolt, and can automatically perform defect marking, thus constructing a complete one-item-one-file digital quality traceability system. This not only facilitates the precise management and disposal of non-conforming products, but also provides reliable data support for subsequent quality analysis and process improvement, comprehensively enhancing the automation level and quality control capabilities of the high-requirement bolt production process. Attached Figure Description
[0009] Figure 1 This is a flowchart illustrating a bolt magnetic particle testing method provided in an embodiment of this application.
[0010] Figure 2 This is a schematic diagram of the structure of a bolt magnetic particle inspection system provided in an embodiment of this application.
[0011] Labeling Explanation: 210, Preprocessing and Magnetization Module; 220, Feature Recognition Module; 230, Defect Judgment Module; 240, Marking Processing Module. Detailed Implementation
[0012] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments. The components of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0013] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, the terms "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0014] In engineering fields with extremely high requirements for structural safety, such as high-speed railways, aerospace, and large bridges, high-strength bolts are critical connecting fasteners, and their reliability directly affects the safety of the entire structural system. Therefore, 100% non-destructive testing of these bolts has become an indispensable process in production and maintenance. Magnetic particle testing, as a mature testing method, is widely used to detect defects such as micro-cracks on the bolt surface. However, a long-standing problem in automated production lines is that the thread structure on the bolt surface, due to its uneven geometry, easily causes mechanical retention of magnetic particles in the magnetic suspension within the thread grooves. The magnetic traces formed by this retention are very similar in image to those produced by actual crack defects, leading to numerous false alarms (misjudgments) in automated image recognition systems. This high misjudgment rate not only severely impacts testing efficiency but also requires significant manual verification, contradicting the original purpose of automated testing and becoming a technical bottleneck for improving testing reliability and efficiency.
[0015] Regarding this issue, firstly, see... Figure 1 This application provides a method for magnetic particle testing of bolts, the method comprising: S1. Obtain the identification information of the bolt to be tested and perform surface pretreatment on the bolt to be tested. Perform multi-directional magnetization treatment on the pretreated bolt to be tested and apply the detection medium to its surface at the same time. S2. Acquire a surface image of the bolt to be inspected, and identify the thread structure features of the bolt from the surface image; It should be noted that thread structure features refer to a set of parameters extracted from bolt surface images using image processing technology, which can digitally describe the thread geometry. These parameters are not merely simple lines or contours, but contain information that uniquely characterizes the macroscopic and microscopic geometric features of the thread. For example, the periodic arrangement of thread grooves, specifically reflected in the pitch; the geometric contour of the thread grooves, which can be described as the radius of curvature at the root and the inclination angle of the flanks; and the helical direction of the thread, i.e., left-hand or right-hand, and its precise helix angle. These features collectively constitute the geometric benchmark for subsequent intelligent judgment.
[0016] S3. Extract the morphological features of the detection medium accumulation area in the surface image, and compare the morphological features with the thread structure features to determine whether there are defects on the surface of the bolt to be inspected. It should be noted that the morphological characteristics of the detected medium aggregation region refer to a series of quantitative indicators extracted from the analysis of high-brightness areas formed by magnetic powder aggregation in the surface image, which can describe the shape, size, and spatial orientation of the region. These include the region's area, perimeter, aspect ratio (used to determine whether it is a long strip or a mass), and the direction of the region's principal axis. These morphological characteristics provide an objective digital description of the magnetic traces, replacing the subjective perception of traditional human visual inspection.
[0017] S4. If it is determined that there is a defect on the surface of the bolt to be inspected, obtain the spatial coordinates of the defect and perform defect marking processing, and store the defect information and the marking information together.
[0018] In a specific implementation scenario, this method was applied to a fully automated production line for inspecting high-strength hexagonal head bolts. The goal of this production line is to achieve fully automated magnetic particle testing of every M20 bolt, ensuring the accuracy and traceability of the test results.
[0019] First, in the initial stage of the inspection process, the bolts to be inspected need to obtain their unique identification information and undergo surface pretreatment. In a basic implementation, the bolts are placed in trays on a conveyor belt, each tray bearing a barcode containing a batch number and serial number. When the tray reaches the designated station, the operator scans the barcode using a handheld barcode scanner and manually enters the information into the Manufacturing Execution System (MES), thus associating the batch of bolts with a unique identification information. Subsequently, the bolts are picked up by a robotic arm and placed in a general-purpose cleaning tank filled with industrial cleaning agent. Through simple soaking and rinsing, most of the oil and impurities on the bolt surface are removed. After cleaning, the bolts are placed on a rack to air dry naturally. The purpose of this process is to provide a relatively clean surface for subsequent magnetization and magnetic powder application, preventing contaminants such as oil from affecting the adhesion and flow of the magnetic suspension.
[0020] Next, the pre-treated bolts are subjected to multi-directional magnetization while a detection medium is simultaneously applied to their surface. In one implementation, the bolt is fixed to a clamp located within a magnetization device consisting of two sets of electromagnetic coils. The first set of coils is a solenoid surrounding the bolt; when a direct current is applied, it generates a longitudinal magnetic field distributed along the bolt's axis within the bolt. This magnetic field is primarily used to detect transverse defects perpendicular to the bolt's axis. The second set of coils consists of two electrodes, contacting the head and tail of the bolt respectively. A high current is directly passed through the bolt body via a high-current generator. According to Ampere's law, this generates a circumferential magnetic field around the bolt's axis within the bolt. This magnetic field is primarily used to detect longitudinal defects parallel to the bolt's axis. To achieve multi-directional magnetization, the control system can first activate the longitudinal magnetization coil for several seconds, then deactivate it, and then activate the circumferential magnetization current for several seconds. During this magnetization process, a spray system located above the bolt evenly sprays a pre-prepared magnetic suspension onto the bolt surface. This magnetic suspension is a liquid containing micron-sized fluorescent magnetic powder that emits a bright yellow-green fluorescence under ultraviolet light. When defects such as cracks exist on or near the surface of a bolt, magnetic lines of force leak as they pass through the defects, creating leakage magnetic fields with opposite polarities on either side of the defect. This leakage magnetic field acts like a tiny magnet, attracting and accumulating the magnetic powder flowing through it, thus forming a visible magnetic trace at the defect location.
[0021] After magnetization and dielectric application are completed, the image acquisition and analysis phase begins. The bolt is conveyed to a fully enclosed darkroom. In this darkroom, multiple ultraviolet light sources (e.g., LEDs with a center wavelength of 365 nm) illuminate the bolt surface from different angles to fully excite the fluorescent magnetic powder attached to the bolt surface. One or more high-resolution industrial cameras (e.g., 5-megapixel CCD cameras), equipped with specialized macro lenses and filters (to filter out ambient stray light and allow only specific wavelengths of fluorescence to pass through), capture images of the bolt surface from different orientations. To obtain surface information throughout the entire circumference of the bolt, the bolt can be rotated for continuous camera shooting, or multiple cameras can be used to simultaneously capture images around the bolt. The acquired images are then stitched together to form a complete two-dimensional unfolded image of the bolt surface.
[0022] The system then identifies the thread structure features of the bolt from this surface image. Image processing algorithms, such as frequency domain analysis methods based on Fourier transform or line detection methods based on Hough transform, are used to identify the bright and dark stripes at the crest and root of the thread with obvious periodicity. By measuring and statistically analyzing the spacing of these stripes, the bolt pitch can be accurately calculated. By analyzing the inclination angle of the thread, the helical direction and helix angle can be determined. This information together constitutes a digital model of the thread structure features.
[0023] Simultaneously, the algorithm processes the same surface image to extract morphological features of the detected medium aggregation regions. First, using image thresholding techniques (such as the Otsu method), pixels with brightness exceeding a certain threshold are identified; these pixels correspond to regions of magnetic powder aggregation. The regions formed by these high-brightness pixels are separated, creating a binary image. Then, connected component analysis is performed on the binary image, aggregating interconnected pixels into independent regions, each representing a magnetic powder aggregation region. For each aggregation region, the system calculates a series of morphological parameters, such as area, perimeter, the size of the minimum bounding rectangle, and the principal axis angle representing its extension direction.
[0024] The most crucial step is to compare the extracted morphological features with the thread structure features to determine the authenticity of the defect. The comparison logic rule base is pre-defined in the system. For example, one rule states: if a magnetic powder accumulation area is elongated and its extension direction is basically consistent with the helical direction of the thread at that location (e.g., an angle difference of less than 5 degrees), and its overall outline is completely confined within the boundary of a single thread groove, then the system will determine that this accumulation area is caused by the mechanical retention of magnetic powder within the thread groove, and is a non-defective pseudo-magnetic indication. Conversely, another rule states: if a magnetic powder accumulation area presents an irregular clumping or star-shaped form, or its shape spans multiple thread crests, or its extension direction has a significant angular deviation from the helical direction of the thread (e.g., greater than 20 degrees), then the system will determine that this is a magnetic indication caused by the leakage magnetic field of a real defect (such as a crack or inclusion), that is, it will determine that a real defect exists on the surface of the bolt being inspected.
[0025] Once a genuine defect is identified, the system records the pixel coordinates of the defect in the unfolded 2D image and performs defect marking. For example, the system adds a non-conforming mark to a database entry associated with bolt identification information, and stores the defect's coordinates, morphological characteristics, and other information. This completes the inspection of the bolt and generates a traceable digital inspection record.
[0026] By using the above method, machine vision and intelligent algorithms are used to replace manual visual judgment, transforming the identification of magnetic marks from subjective experience judgment to objective logical comparison based on geometric and morphological features. This enables accurate differentiation between real defects and pseudo-defects in thread grooves, greatly improving the accuracy and automation level of detection, and solving the problems of high misjudgment rate and reliance on manual review in existing technologies.
[0027] Based on the above implementation method, in order to further improve the automation and reliability of the inspection process, the steps of obtaining the identification information of the bolt to be inspected and performing surface pretreatment on the bolt to be inspected include: When the bolts to be inspected enter the cleaning station, identification information is obtained through optical recognition or radio frequency identification. The bolts to be inspected are subjected to high-pressure spray cleaning, ultrasonic cleaning, and hot air drying.
[0028] Specifically, in this improved implementation, each bolt is assigned a unique identifier during the manufacturing process. One method involves laser-engraving a QR code on the bolt's head. When the bolt enters the cleaning station via a conveyor belt, a fixed industrial barcode reader automatically scans and reads the QR code, acquiring the identification information without any manual intervention. A more advanced method involves embedding a tiny RFID (Radio Frequency Identification) chip inside the bolt or in its head. An RFID reader is placed at the cleaning station entrance; as the bolt passes by, the electromagnetic waves emitted by the reader activate the chip, which then sends its stored unique ID number back to the reader. Both methods achieve fully automated, one-to-one identification of the bolt, avoiding errors that may occur with manual data entry and providing a solid guarantee for accurate data traceability.
[0029] In the cleaning process, a more refined and efficient multi-stage cleaning procedure was adopted, replacing the previous simple soaking and rinsing. First, the bolts enter a high-pressure spray cleaning chamber, where multiple nozzles spray high-pressure water containing cleaning agent from different angles, powerfully washing the bolt surface and quickly removing floating oil and particulate impurities. Next, the bolts are transported to an ultrasonic cleaning tank, where high-frequency transducers generate tens of thousands of hertz of ultrasonic waves, forming countless tiny bubbles in the liquid. These bubbles continuously generate and burst on the bolt surface, especially in hard-to-clean corners such as the root of the threads, producing powerful micro-impact forces that peel off firmly adhered micro-dirt. Finally, the bolts pass through a hot air drying channel, where high-temperature, clean air quickly dries all moisture from the bolt surface, ensuring they are completely clean and dry before entering the magnetic particle testing stage. This refined cleaning and drying process minimizes the interference of surface contaminants on subsequent magnetic particle testing, ensuring the stability and consistency of the testing conditions.
[0030] In addition, to ensure the sensitivity and stability of the entire detection system during long-term operation, before performing multi-directional magnetization on the pre-treated bolt to be inspected and simultaneously applying the detection medium to its surface, the following steps are included: A multi-directional magnetization process is performed on a reference part with standard defects, and a detection medium is applied. Obtain the brightness characteristics of the detection medium on the surface of the reference piece. If the brightness characteristics do not meet the preset standard range, adjust the magnetization current intensity of the magnetization device or the concentration of the detection medium.
[0031] In one specific implementation, the inspection line has one or more special reference pieces. These reference pieces have the exact same material and specifications as the bolts to be inspected, but at specific locations on their surfaces, one or more standard artificial defects of precisely known size and depth are created using precision processes such as electrical discharge machining (EDM). For example, a tiny groove 10 micrometers wide and 0.5 millimeters deep. Before each batch of products begins inspection, or after the system has run continuously for a certain period (e.g., 4 hours), the control system automatically instructs a robotic arm to pick up a reference piece from the reference piece library and send it into the inspection process. The reference piece is magnetized and sprayed with magnetic suspension fluid using the same process as normal bolts. Subsequently, the image acquisition system captures images of the standard defect locations on the reference piece. Image analysis software precisely measures the average brightness value of the magnetic traces formed at those locations. The system presets a standard brightness range; for example, in a 256-level grayscale image, the acceptable brightness range is 180 to 220. If the measured brightness value is below 180, it indicates that the magnetic indication is not clear enough and the sensitivity is too low. The control system will automatically send a command to the magnetizing power supply to appropriately increase the intensity of the magnetizing current (e.g., from 800 amperes to 850 amperes) to generate a stronger leakage magnetic field. If the measured brightness value is above 220, it may mean that the background fluorescence is too strong. This is usually caused by excessive magnetic powder concentration in the magnetic suspension or aging of the carrier liquid. The system will send an alarm to the central control console, prompting the operator to check and adjust the state of the magnetic suspension. Through this closed-loop automatic calibration mechanism, the detection system is ensured to always operate within the optimal sensitivity range, effectively avoiding fluctuations in detection quality caused by equipment parameter drift or changes in consumable performance.
[0032] To more effectively detect defects in any direction that may exist on a bolt, the steps of performing multi-directional magnetization on the pre-treated bolt and applying a detection medium to its surface include: The bolt to be tested is driven to rotate at a preset angular velocity, and magnetization coils in different directions are triggered by the magnetization device to work with a preset magnetization current intensity, so as to achieve full circumferential magnetization coverage of the bolt. A magnetic suspension containing fluorescent magnetic powder is sprayed onto the surface of the bolt to be tested during its rotational motion.
[0033] In this more optimized magnetization method, the bolt is held by a chuck driven by a precision servo motor and rotates smoothly at a constant angular velocity (e.g., 20 revolutions per minute). The magnetization device is no longer a simple sequential excitation of longitudinal and circumferential coils, but rather a composite magnetic field. For example, while the bolt rotates, both the longitudinal magnetization coil and the circumferential magnetization current are simultaneously switched on. Thus, at any point inside the bolt, the magnetic field is a helical magnetic field composed of longitudinal and circumferential components. As the bolt rotates, any defect on its surface, regardless of its orientation, will cut almost perpendicularly to this helical magnetic field line at a certain angle during rotation, generating the maximum leakage magnetic field. This rotating vector magnetic field method, compared to step-by-step magnetization in a static state, can more reliably excite magnetic traces of defects in all directions, especially oblique cracks at approximately 45 degrees to the bolt axis, thus achieving truly omnidirectional, blind-spot-free detection. During the bolt rotation process, multiple nozzles continuously spray magnetic suspension liquid onto its surface, ensuring that the bolt surface is always covered with fresh detection medium throughout the entire magnetization period.
[0034] A new problem may arise during the process of spraying magnetic suspension fluid while rotating the bolt: due to the surface tension of the liquid, the magnetic suspension fluid tends to accumulate at the bottom of the thread grooves, forming an excessively thick liquid film. This excessively thick liquid film can hinder the migration of magnetic powder towards the leakage magnetic field at the defect site, like a blanket covering it, potentially masking minute defect signals. To solve this problem, the method also includes the following during the rotational motion: The distribution of magnetic suspension fluid on the surface of the bolt to be tested is detected to obtain information on the thickness of the liquid film in different areas; If the liquid film thickness exceeds the preset critical value, an oscillation pulse signal is sent to the magnetization device to generate disturbance pressure on the magnetic suspension through an alternating magnetic field, so as to make the magnetic suspension adhere to the surface of the bolt to be tested.
[0035] Specifically, a non-contact sensor, such as a laser triangulation sensor, is mounted above the bolt to measure the distance from the rotating bolt surface to the sensor in real time. Since the bolt's geometry is known, the thickness of the surface liquid film can be calculated from the change in distance. When the system detects that the liquid film thickness in a certain area (especially at the bottom of the thread groove) exceeds a preset threshold (e.g., 0.3 mm), the control system immediately adjusts the current mode supplied to the magnetizing coil, superimposing a low-frequency (e.g., 15 Hz) AC pulse signal onto the original DC magnetizing current. This rapidly changing current generates an alternating magnetic field, which exerts an oscillating magnetic force on the ferromagnetic powder in the magnetic suspension. This microscopic vibration is transmitted throughout the liquid, effectively disrupting the surface tension, acting as a dispersing and leveling mechanism, causing excess accumulated magnetic suspension to flow away from the grooves, ultimately forming a uniform and thin liquid film across the entire bolt surface. This ideal liquid film ensures a sufficient supply of magnetic powder without hindering the free movement and aggregation of the magnetic powder under the influence of the leakage magnetic field. This ensures that even the smallest defect signal can be clearly displayed, greatly improving the detection limit sensitivity.
[0036] To establish a benchmark for comparison from the acquired complex images, it is first necessary to accurately identify the thread structure features of the bolt itself. Therefore, the steps for identifying the thread structure features of the bolt to be inspected from the surface image include: The periodic arrangement of the thread crests and roots of the bolt under test is identified from the surface image, and the thread structure features, including the geometric contour of the thread grooves and the helical direction, are obtained.
[0037] In practice, this step is performed after obtaining a two-dimensional unfolded image of the bolt surface. This image can be viewed as a grayscale image containing a large amount of texture information.
[0038] First, to obtain the periodic arrangement of the threads, i.e., the pitch, the system can employ frequency domain analysis. For example, a one-dimensional Fast Fourier Transform (FFT) can be performed on the image along the bolt axis (i.e., the longitudinal direction of the unfolded image). Due to the obvious periodicity of the threads, they will exhibit a significant frequency peak in the spectrum. The reciprocal of the spatial frequency corresponding to this peak is the thread pitch. In this way, the pixel size of the pitch can be calculated very accurately and robustly.
[0039] Secondly, to obtain the geometric contour of the thread groove, after determining the thread region, the system applies edge detection algorithms (such as the Canny operator or the Sobel operator) to extract the precise edge contours of the thread crest and root. Then, by performing curve fitting or feature point extraction on these contours, geometric parameters such as the tooth profile angle and the radius of the tooth root arc can be quantified, thereby constructing a precise geometric model of the thread groove.
[0040] Finally, to obtain the helix direction, the system analyzes the overall tilt trend of the thread edge contour lines on the two-dimensional unfolded diagram. For example, it detects the direction of the dominant straight lines in the image using Hough transform. If these lines tilt from the lower left to the upper right, it can be determined as a right-hand thread; otherwise, it is a left-hand thread. The tilt angle of this line also directly corresponds to the helix angle of the thread. Through the above processing, the system possesses a complete, digital geometric model of the thread of the bolt under test, namely the thread structural features, which provides an indispensable reference system for subsequent intelligent comparison.
[0041] After establishing the geometric datum for the thread, the next step is to accurately identify all potential candidate regions for defects from the same image and parameterize them. Therefore, the steps for extracting morphological features of detected media accumulation regions from surface images include: The surface image is preprocessed, and histogram equalization and threshold segmentation are performed on the preprocessed surface image to separate the detection medium aggregation region in the surface image from the background and generate a binarized image. Connectivity analysis is performed on the binarized image to identify regions of aggregation of the detection medium; For each detection medium accumulation area, its morphological features are extracted. The morphological features include the shape and size of the detection medium accumulation area and the extension direction of the detection medium accumulation area relative to the center line of the thread groove.
[0042] In practice, the initial image preprocessing typically involves applying a Gaussian filter to slightly smooth the original image, removing random noise introduced by the camera sensor. Following this, histogram equalization is performed. This step aims to enhance the global contrast of the image, making the boundary between bright areas formed by fluorescent magnetic powder aggregation and the surrounding darker background more distinct, thus providing better conditions for subsequent segmentation.
[0043] Next, the system employs an adaptive thresholding algorithm, such as the Otsu method, to convert the image into a binary image. This algorithm automatically calculates an optimal grayscale threshold, setting all pixels with brightness above the threshold to white (representing magnetic powder aggregation) and pixels with brightness below the threshold to black (representing the background).
[0044] On the generated binarized image, the system performs connected component analysis. This algorithm scans the entire image, grouping all adjacent white pixels into a set and assigning a unique label to each set. In this way, all discrete magnetic powder aggregates in the image are identified as independent objects.
[0045] Finally, for each identified connected region (i.e., the detection medium aggregation region), the system calculates a series of parameters to describe its geometry and morphology. For example, principal component analysis (PCA) can be used to calculate the principal axis direction of the pixel distribution in the region, or an equivalent ellipse can be fitted and its major axis angle can be obtained. This angle represents the macroscopic extension direction of the magnetic powder aggregation region.
[0046] Through this series of operations, the originally blurry visual image information is transformed into sets of precise, structured data that can be used by computers for logical operations.
[0047] After obtaining the baseline features of the thread and the morphological features of the candidate region, the core intelligent judgment stage begins. The steps of comparing the morphological features with the thread structural features to determine whether there are defects on the surface of the bolt to be inspected include: If the shape and size of the morphological features match the geometric contour of the thread groove, and the extension direction is consistent with the helical direction of the thread groove, then the area where the detection medium accumulates is determined to be non-defective magnetic powder mechanical retention within the thread groove. If the shape of the morphological feature spans the thread groove or extends irregularly, or if the direction of extension deviates from the helical direction of the thread groove by more than a preset angle, then it is determined that there is a real defect in the area where the detection medium accumulates.
[0048] This is a rule-based expert system judgment process. The system iterates through each extracted detection medium cluster area and performs the following logical comparison: The system analyzes a cluster region designated A. Its morphological characteristics show it to be elongated with an aspect ratio greater than 10; its extension angle is 14.5 degrees. The system queries the thread structure characteristics of this region and finds that the helical angle of the thread is 15.0 degrees. The angle difference is only 0.5 degrees, far less than the system's preset deviation threshold (e.g., 5 degrees). Simultaneously, the system overlays and compares the contour of this region with the geometric contour of the thread groove in its location, finding that the region is completely contained within the boundary of a single thread groove and does not cross the tooth crest. Based on this information, the system determines that the characteristics of region A highly match the structure of the thread groove itself, indicating a typical accumulation of magnetic powder at the bottom of the groove due to gravity or fluid flow. This is a non-defective mechanical retention of magnetic powder, i.e., a pseudo-defect.
[0049] The system then analyzed the cluster region designated B. Its morphological characteristics showed an irregular, near-star shape; the angle of its main axis extension direction was 88 degrees. However, the angle of the thread helix direction was still 15.0 degrees, a deviation of 73 degrees, significantly exceeding the preset threshold. Furthermore, during contour comparison, the system found that this region covered two adjacent thread crests and one thread groove. Based on these strong anomalous signals, the system determined that the shape and orientation of region B were completely inconsistent with the thread structure, and its formation could not be due to mechanical retention; it must have been caused by a strong leakage magnetic field generated by a transverse crack, thus classifying it as a genuine defect.
[0050] Through this rigorous set of logical criteria, the system can accurately identify real defects from a large number of false defect backgrounds, just like an experienced inspection expert.
[0051] After confirming the existence of the actual defect, in order to achieve subsequent automated processing and quality traceability, it is necessary to map the location of the defect in the image to the physical entity of the bolt. Therefore, the steps of obtaining the spatial coordinates of the actual defect on the surface of the bolt to be inspected and performing defect marking processing include: The preset geometric parameters of the bolt to be tested are obtained based on the identification information. The preset geometric parameters include pitch, thread angle, thread height and helix lead. Based on preset geometric parameters, the pixel coordinates of the detection medium accumulation area, which is determined to be a real defect, in the surface image are converted into the three-dimensional spatial coordinates of the bolt to be detected. The motion parameters of the robotic arm that performs defect marking processing are calculated based on three-dimensional spatial coordinates. The robotic arm is driven to carry the marking component to the position corresponding to the three-dimensional spatial coordinates to perform spray marking or laser marking.
[0052] Specifically, once the system determines that an area is a real defect, it records the pixel coordinates (u, v) of the center point of that area in the two-dimensional unfolded image. At this point, the system calls the database associated with the unique identifier of the bolt and reads the detailed three-dimensional model parameters of that bolt model, such as the total length of the bolt and the diameter of the threaded part.
[0053] The coordinate transformation process is as follows: The pixel coordinate v corresponds to the axial position of the bolt. The pixel ordinate can be converted to the z value in the bolt coordinate system using a simple linear scaling relationship z=(v / Image_Height)*Bolt_Length.
[0054] The pixel coordinate u corresponds to the circumferential position of the bolt. Similarly, the pixel's horizontal coordinate can be converted into an angle of circumferential expansion using the linear relationship θ=(u / Image_Width)*360°.
[0055] By combining the known bolt radius r and the converted angle θ, the Cartesian coordinates of the defect point on the plane perpendicular to the bolt axis can be calculated: x=r*cos(θ), y=r*sin(θ).
[0056] At this point, the system has obtained the precise coordinates (x, y, z) of the defect in a three-dimensional spatial coordinate system with the bolt center as the origin.
[0057] This three-dimensional coordinate is then sent to the control system of a six-axis industrial robotic arm. The robotic arm's controller performs inverse kinematics calculations based on its own kinematic model to determine the angles that need to be rotated to drive each joint, so that its end effector can be precisely moved to the physical space position corresponding to the target coordinates (x, y, z).
[0058] The end effector of the robotic arm can be a miniature spray gun or a fiber laser head. Once it reaches the designated position, the controller triggers a marking action. The spray gun sprays a tiny, brightly colored dot of paint; or the laser head emits a short laser pulse, ablating a permanent tiny mark onto the metal surface next to the defect. This marking allows defective products to be easily identified and rejected in subsequent processes, achieving a complete automated closed loop from intelligent detection to physical handling.
[0059] Secondly, see Figure 2 This application also provides a bolt magnetic particle inspection system for performing any of the aforementioned bolt magnetic particle inspection methods, the system comprising: The pre-processing and magnetization module 210 is used to acquire the identification information of the bolt to be tested and to perform surface pre-processing on the bolt to be tested, to perform multi-directional magnetization on the pre-processed bolt to be tested, and to apply a detection medium to its surface at the same time. The feature recognition module 220 is used to acquire a surface image of the bolt to be inspected and to identify the thread structure features of the bolt to be inspected from the surface image. The defect determination module 230 is used to extract the morphological features of the detection medium accumulation area in the surface image, and compare the morphological features with the thread structure features to determine whether there are defects on the surface of the bolt to be inspected. The marking processing module 240 is used to obtain the spatial coordinates of the defect and perform defect marking processing if it is determined that there is a defect on the surface of the bolt to be inspected, and to associate and store the defect information with the marking information. The magnetization adjustment module is used before the step of performing multi-directional magnetization on the pre-treated bolt to be inspected, while simultaneously applying a detection medium to its surface. A multi-directional magnetization process is performed on a reference part with standard defects, and a detection medium is applied. Obtain the brightness characteristics of the detection medium on the surface of the reference piece. If the brightness characteristics do not meet the preset standard range, adjust the magnetization current intensity of the magnetization device or the concentration of the detection medium.
[0060] This technical solution provides a physical device capable of performing the aforementioned automated testing methods, integrating functions such as preprocessing, magnetization, imaging, analysis, and marking, thus providing a hardware foundation for achieving efficient, reliable, and automated production of bolt magnetic particle testing.
[0061] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for magnetic particle inspection of bolts, characterized in that, The method includes: The identification information of the bolt to be tested is obtained and the surface of the bolt to be tested is pre-treated. Multi-directional magnetization is performed on the pre-treated bolt to be tested, and a detection medium is applied to its surface. Acquire a surface image of the bolt to be inspected, and identify the thread structure features of the bolt from the surface image; The morphological features of the detection medium accumulation area in the surface image are extracted, and the morphological features are compared with the thread structure features to determine whether there are defects on the surface of the bolt to be detected. If it is determined that there is a defect on the surface of the bolt to be inspected, the spatial coordinates of the defect are obtained and defect marking processing is performed. The defect information is then associated with and stored with the marking information.
2. The bolt magnetic particle inspection method according to claim 1, characterized in that, The steps of obtaining the identification information of the bolt to be inspected and performing surface pretreatment on the bolt to be inspected include: When the bolt to be inspected enters the cleaning station, the identification information is obtained through optical recognition or radio frequency identification. The bolts to be tested are subjected to high-pressure spray cleaning, ultrasonic cleaning, and hot air drying.
3. The bolt magnetic particle inspection method according to claim 1, characterized in that, Prior to the step of performing multi-directional magnetization on the pretreated bolt to be inspected and simultaneously applying a detection medium to its surface, the procedure includes: Multi-directional magnetization is performed on the reference part with standard defects, and a detection medium is applied; The brightness characteristics of the detection medium on the surface of the reference piece are obtained. If the brightness characteristics do not meet the preset standard range, the magnetization current intensity of the magnetization device or the concentration of the detection medium is adjusted.
4. The bolt magnetic particle inspection method according to claim 1, characterized in that, The step of performing multi-directional magnetization on the pretreated bolt to be tested, while simultaneously applying a detection medium to its surface, includes: The bolt to be tested is driven to rotate at a preset angular velocity, and magnetization coils in different directions are triggered by the magnetization device to work with a preset magnetization current intensity, so as to achieve full circumferential magnetization coverage of the bolt. During the rotation of the bolt to be tested, a magnetic suspension liquid containing fluorescent magnetic powder is sprayed onto its surface.
5. The bolt magnetic particle inspection method according to claim 4, characterized in that, During the rotational motion, the method further includes: The distribution of magnetic suspension fluid on the surface of the bolt to be tested is detected to obtain information on the thickness of the liquid film in different areas; If the liquid film thickness exceeds a preset critical value, an oscillation pulse signal is sent to the magnetization device to generate disturbance pressure on the magnetic suspension through an alternating magnetic field, so as to cause the magnetic suspension to adhere to the surface of the bolt to be tested.
6. The bolt magnetic particle inspection method according to claim 1, characterized in that, The step of identifying the thread structure features of the bolt to be detected from the surface image includes: The periodic arrangement of the thread crests and roots of the bolt to be tested is identified from the surface image, and the thread structure features, including the geometric contour of the thread grooves and the helical direction, are obtained.
7. The bolt magnetic particle inspection method according to claim 6, characterized in that, The step of extracting the morphological features of the detected medium aggregation region in the surface image includes: The surface image is preprocessed, and histogram equalization and threshold segmentation are performed on the preprocessed surface image to separate the detection medium aggregation region in the surface image from the background and generate a binarized image. Connectivity analysis is performed on the binarized image to identify the regions where the detection medium is clustered. For each of the detection medium accumulation regions, its morphological features are extracted, including the shape and size of the detection medium accumulation region and the extension direction of the detection medium accumulation region relative to the center line of the thread groove.
8. The bolt magnetic particle inspection method according to claim 7, characterized in that, The step of comparing the morphological features with the thread structure features to determine whether there are defects on the surface of the bolt to be inspected includes: If the shape and size of the morphological feature match the geometric contour of the thread groove, and the extension direction is consistent with the helical direction of the thread groove, then the detection medium accumulation area is determined to be non-defective magnetic powder mechanical retention in the thread groove. If the shape of the morphological feature extends across the threaded groove or extends irregularly, or if the direction of extension deviates from the helical direction of the threaded groove by more than a preset angle, then it is determined that there is a real defect in the detection medium accumulation area.
9. A bolt magnetic particle inspection method according to claim 8, characterized in that, The steps of obtaining the spatial coordinates of the actual defects on the surface of the bolt to be inspected and performing defect marking processing include: The preset geometric parameters of the bolt to be tested are obtained based on the identification information. The preset geometric parameters include pitch, thread angle, thread height and helix lead. Based on the preset geometric parameters, the pixel coordinates of the detection medium accumulation area determined to be a real defect in the surface image are converted into the three-dimensional spatial coordinates of the bolt to be detected. The motion parameters of the robotic arm performing defect marking processing are calculated based on the three-dimensional spatial coordinates. The robotic arm is driven to carry the marking component and move to the position corresponding to the three-dimensional spatial coordinates to perform spray marking or laser marking.
10. A bolt magnetic particle inspection system for performing the bolt magnetic particle inspection method as described in any one of claims 1 to 9, characterized in that, The system includes: The preprocessing and magnetization module is used to acquire the identification information of the bolt to be tested and perform surface preprocessing on the bolt to be tested, perform multi-directional magnetization on the preprocessed bolt to be tested, and apply a detection medium to its surface at the same time. The feature recognition module is used to acquire a surface image of the bolt to be inspected and to identify the thread structure features of the bolt to be inspected from the surface image; The defect determination module is used to extract the morphological features of the detection medium accumulation area in the surface image, and compare the morphological features with the thread structure features to determine whether there are defects on the surface of the bolt to be inspected. The marking processing module is used to obtain the spatial coordinates of the defect and perform defect marking processing if it is determined that there is a defect on the surface of the bolt to be inspected, and to associate and store the defect information with the marking information.