A bolt pass-stop automatic detection method and system based on industrial vision

By using an industrial vision-based bolt inspection method and digital gauges for non-contact geometric comparison, the problems of low inspection efficiency and data silos in existing technologies have been solved. This enables rapid and flexible inspection and result recording, thereby improving inspection accuracy and production efficiency.

CN122156190APending Publication Date: 2026-06-05NANJING HI-RAIL TRANS TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANJING HI-RAIL TRANS TECH CO LTD
Filing Date
2026-05-06
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing bolt inspection technologies rely on physical gauges, resulting in low inspection efficiency, poor flexibility, inability to achieve data-driven management of inspection data, and difficulty in recording and tracing inspection results.

Method used

An automatic bolt pass/stop detection method based on industrial vision is adopted. By acquiring bolt image recognition specification parameters, calling digital gauge data, performing non-contact geometric comparison, determining the pass/stop status of the bolt, and recording the detection results.

Benefits of technology

It enables rapid, flexible, and automated testing of bolts of different specifications, improves production efficiency, ensures the objectivity and accuracy of test results, solves the "data silo" problem in traditional testing methods, and provides comprehensive traceability of quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122156190A_ABST
    Figure CN122156190A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of industrial automation detection, and discloses a bolt pass-stop automatic detection method and system based on industrial vision, which comprises the following steps: acquiring an overall image of a bolt to be detected, and identifying the specification parameters of the bolt to be detected; calling digitalized gauge data corresponding to the specification parameters; acquiring a thread area image of the bolt to be detected, and extracting an actual geometric contour of the thread; performing spatial geometric comparison between the actual geometric contour of the thread and the digitalized gauge data, and determining the pass-stop state of the thread of the bolt to be detected according to the comparison result; and outputting a pass-stop detection conclusion of the bolt to be detected based on the pass-stop state. Through industrial vision and digitalization technology, the bolt thread pass-stop state is automatically and non-contact detected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial automation inspection technology, and in particular to an automatic bolt go / stop detection method and system based on industrial vision. Background Technology

[0002] As critical mechanical connectors, bolts' thread quality directly impacts the safety and reliability of the entire machine; therefore, go / no-go testing is an indispensable quality control step in production. Currently, thread inspection generally relies on operators using physical go / no-go ring gauges for manual or semi-automatic testing. In this mode, when the production line needs to switch to different bolt specifications, operators must pause the equipment and manually replace the physical gauges and corresponding workpiece fixtures that match the new specifications. This changeover process is time-consuming, and frequent manual intervention can easily introduce installation errors, severely restricting production efficiency and failing to meet the flexible manufacturing needs of multi-variety, small-batch mixed production. More importantly, this physical contact-based inspection method typically only provides a simple "pass" or "fail" signal, failing to obtain specific geometric profile data of the thread. The inspection process and results are difficult to record, store, and trace systematically, creating "data silos" in quality management and failing to provide effective data support for subsequent process analysis and quality improvement. Summary of the Invention

[0003] To address the shortcomings of existing technologies, this invention discloses an automatic bolt go / stop detection method and system based on industrial vision. It aims to solve the technical problems of existing bolt detection technologies relying on physical gauges, resulting in low detection efficiency, poor flexibility, and the inability to achieve data-driven management of detection data.

[0004] The technical solution of the present invention is as follows: In a first aspect, the present invention discloses an automatic bolt pass / fail detection method based on industrial vision, the method comprising: Acquire an overall image of the bolt to be inspected and identify its specifications. Call the digital gauge data corresponding to the specification parameters. The digital gauge data includes the digital go gauge envelope and the digital no-go gauge envelope. Obtain an image of the threaded area of ​​the bolt to be inspected and extract the actual geometric contour of the thread; The actual geometric profile of the thread is compared with the data of the digital gauge in space geometry, and the pass / stop status of the thread of the bolt to be inspected is determined based on the comparison results. The output determines whether the bolt is in motion or not based on its state.

[0005] This technical solution replaces the traditional physical gauge contact inspection with non-contact visual measurement and digital comparison, fundamentally eliminating production interruptions caused by changing physical gauges, realizing rapid, flexible, and automated inspection of bolts of different specifications, and laying the foundation for data-driven management of the inspection process.

[0006] Furthermore, the steps of acquiring an overall image of the bolt to be inspected and identifying its specifications include: A complete image of the bolt to be inspected is obtained using an industrial area array camera; The overall image is preprocessed to extract the geometric features of the bolt to be detected; the geometric features include the length and diameter of the shank and the shape of the head; The geometric features are matched with a pre-stored bolt specification database to determine the model and specification parameters of the bolt to be tested.

[0007] Furthermore, the steps for retrieving the digital gauge data corresponding to the specification parameters include: Based on the specifications, the corresponding standard digital gauge data is retrieved from the pre-stored digital gauge database, and the coefficient of thermal expansion of the corresponding material is retrieved from the preset material property database. Obtain the real-time surface temperature of the bolt to be tested; Based on the temperature difference between the real-time surface temperature and the standard reference temperature, and combined with the coefficient of thermal expansion, the geometric dimensions in the standard digital gauge data are proportionally scaled and compensated to obtain real-time digital gauge data that matches the current thermal environment.

[0008] Furthermore, the steps for acquiring an image of the threaded region of the bolt to be inspected include: Determine the centroid position and axis tilt angle of the bolt to be inspected based on the overall image; Based on the centroid position and axis tilt angle, the image acquisition area of ​​the high-resolution camera is dynamically adjusted to logically compensate for the positional deviation of the bolt to be inspected at the work station and to obtain a centered image of the threaded area.

[0009] Furthermore, the method also includes: Multiple candidate images are continuously acquired for the same threaded region under illumination by light sources at different incident angles; Analyze the brightness changes and positional movement trajectories of locally highlighted areas in multiple candidate images; Based on brightness changes and positional movement trajectories, false edges caused by surface liquids in each candidate image are identified and removed. Then, the effective thread feature information from each candidate image is integrated to obtain a thread region image without false edges.

[0010] Furthermore, the steps for extracting the actual geometric profile of the thread include: Subpixel edge detection is performed on the thread region image to directly obtain a set of subpixel precision coordinate points representing the thread profile; The sub-pixel precision coordinate point set constitutes the actual geometric contour of the thread. The subpixel precision coordinate point set includes coordinate points that define the thread crest, root, and lateral curves.

[0011] Furthermore, after extracting the actual geometric profile of the thread, the method also includes: The geometric center trajectory is located by scanning the symmetry of the thread profile, and the geometric center trajectory is connected to form a first reference line that reflects the physical bending trend of the bolt to be tested.

[0012] Furthermore, the steps of spatially comparing the actual geometric profile of the thread with the data from the digital gauge, and determining the go / no-go status of the bolt thread based on the comparison results, include: Based on the first reference line, the actual geometric profile of the thread is calibrated to eliminate the influence of the physical bending of the bolt under test on the geometric comparison. Calculate the minimum Euclidean distance from points on the actual geometric profile of the thread after attitude calibration to the envelope of the digital gauge. If the minimum Euclidean distance from all points to the envelope of the digital gauge is greater than or equal to zero, then the gauge condition is satisfied. Calculate the minimum Euclidean distance from a point on the actual geometric profile of the thread after attitude calibration to the digital stop gauge envelope. If there is a point whose minimum Euclidean distance to the digital stop gauge envelope is less than zero, then stop gauge interference is determined to have occurred. If the conditions for passing the go-through are met and no interference from the stop-through is observed, the go-through / stop-through status is deemed acceptable. Otherwise, the open / closed state is deemed unqualified.

[0013] Furthermore, the steps for outputting the go / no-go detection conclusion of the bolt under test based on its go / no-go status include: Based on the pass / stop status, generate a test conclusion report that includes the specification parameters of the bolt to be tested, the pass / stop status determination result, the test timestamp, and a unique identifier. The inspection conclusion report is associated and stored with the corresponding comparison map of the thread area image, the actual geometric profile of the thread, and the digital gauge data. According to the preset output strategy, the inspection conclusion report will be output in at least one way, including displaying it on a local human-machine interface, sending it to the manufacturing execution system, and controlling the sorting mechanism to physically sort the bolts to be inspected.

[0014] Secondly, the present invention also discloses an automatic bolt go / no-go detection system based on industrial vision, for performing the method described in any of the foregoing claims, comprising: The specification recognition module is used to acquire an overall image of the bolt to be inspected and to identify the specification parameters of the bolt to be inspected. The data retrieval module is used to retrieve digital gauge data corresponding to the specification parameters. The digital gauge data includes the digital go gauge envelope and the digital no-go gauge envelope. The contour extraction module is used to acquire the image of the threaded area of ​​the bolt to be inspected and extract the actual geometric contour of the thread. The geometric comparison module is used to perform spatial geometric comparison between the actual geometric profile of the thread and the data of the digital gauge, and to determine the pass / stop status of the thread of the bolt to be inspected based on the comparison results. The conclusion output module is used to output the go / no-go test conclusion of the bolt to be tested based on the go / no-go status.

[0015] This technical solution provides a specific system architecture that can realize the above-mentioned detection method, decomposing the complex method process into clear functional modules, and providing clear hardware and software structure guidance for the engineering and productization of this technology.

[0016] In summary, this invention provides an automatic bolt go / stop detection method and system based on industrial vision. The method automatically matches digital gauges through visual recognition, replacing the time-consuming manual replacement of physical gauges. This enables seamless and rapid automated detection of bolts of different specifications on mixed production lines, significantly shortening product changeover time and substantially improving detection efficiency and production flexibility. Secondly, this solution employs non-contact, high-precision visual measurement and comprehensively considers interference from various actual working conditions such as workpiece temperature, surface oil contamination, and bending. Through corresponding compensation and calibration algorithms, the objectivity and accuracy of the detection results are ensured, effectively reducing the misjudgment rate caused by subjective factors or environmental changes and improving detection reliability. Finally, this solution not only determines the go / stop status but also comprehensively records the bolt's specifications, image, geometric contour, and comparison chart, establishing a detailed quality file for each inspected bolt. This completely solves the "data silo" problem of traditional detection methods, achieving comprehensive quality traceability and providing strong data support for subsequent process optimization and intelligent production management. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating an automatic bolt go / stop detection method based on industrial vision, provided in an embodiment of the present invention.

[0018] Figure 2 This is a schematic diagram of an automatic bolt go / stop detection system based on industrial vision, provided as an embodiment of the present invention.

[0019] Labeling Explanation: 210, Specification Identification Module; 220, Data Retrieval Module; 230, Contour Extraction Module; 240, Geometric Comparison Module; 250, Conclusion Output Module. Detailed Implementation

[0020] The technical solutions of this invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are merely some, not all, of the embodiments of this invention. The components of this invention 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 the invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention.

[0021] 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 invention, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0022] In modern industrial production lines, especially in fields with extremely high safety and reliability requirements such as automobile assembly or rail transportation equipment manufacturing, tens of thousands of bolts of different specifications are used every day. A flexible production line may need to assemble bolts of various diameters, lengths, and head types, ranging from M8 to M16, within a short period of time. In traditional quality control processes, each bolt specification corresponds to a set of dedicated physical go / no-go ring gauges. When the production line switches product models, the inspection station must stop, and operators must manually replace these heavy, high-precision physical gauges and recalibrate the inspection equipment. This process is not only time-consuming and labor-intensive, severely impacting the overall operating efficiency of the production line, but the frequent disassembly and manual operation also introduces the risk of inconsistent measurement benchmarks, making it difficult to guarantee the stability and reliability of the inspection results.

[0023] Firstly, please see Figure 1 This invention provides an automatic bolt go / no-go detection method based on industrial vision, the method comprising: S1. Obtain an overall image of the bolt to be inspected and identify its specifications. S2. Call the digital gauge data corresponding to the specification parameters. The digital gauge data includes the digital go gauge envelope and the digital no-go gauge envelope. S3. Obtain the image of the threaded area of ​​the bolt to be inspected and extract the actual geometric contour of the thread; S4. Compare the actual geometric profile of the thread with the data of the digital gauge in space, and determine the pass / stop status of the thread of the bolt to be inspected based on the comparison results. S5. Output the go / no-go detection conclusion of the bolt to be tested based on the go / no-go status.

[0024] Specifically, digital gauge data refers to the conversion of the geometric definitions of traditional physical go and no-go gauges into a series of digital information stored in a computer, using computer-aided design software or according to the thread tolerance zone parameters specified in national standards (such as GB / T197-2018). It is no longer a physical entity, but a virtual, ideal geometric model defined by mathematical equations or a set of coordinate points.

[0025] The digital go-go envelope, a part of the digital gauge data, defines a boundary in two- or three-dimensional space. A geometrically acceptable thread profile should, in theory, be able to pass through the area defined by this boundary without any interference. It corresponds to the GO gauge in traditional go-no-go gauges and is used to check whether the thread's effective pitch diameter and thread angle exceed the maximum material boundary, ensuring that the thread is not too large.

[0026] The digital no-go gauge envelope, also part of the digital gauge data, defines another spatial boundary. A geometrically acceptable thread profile should theoretically not completely pass through the area defined by this boundary; that is, it would geometrically interfere with it. It corresponds to the no-go gauge in traditional go / no-go gauges, used to check whether the single pitch diameter of the thread is less than the minimum material size, ensuring that the thread is not too small.

[0027] The actual geometric profile of a thread refers to a set of high-precision coordinate points that are collected by an industrial vision system and extracted by a sub-pixel edge detection algorithm. It accurately reflects the thread profile of the bolt being tested and contains complete geometric information of the thread crest, root, and side curves. It can accurately characterize the actual machining dimensions, thread profile, and surface morphology of the thread and is the core basis for spatial geometric comparison with digital gauge data.

[0028] The "go / no-go" status refers to the conformity judgment result derived from the spatial positional relationship between the actual geometric profile of the thread and the envelopes of the digital go gauge and the digital no-go gauge. If the actual geometric profile of the thread is completely within the area defined by the digital go gauge envelope and does not geometrically interfere with the digital no-go gauge envelope, the go gauge is judged to be qualified, the no-go gauge does not interfere, and the thread's go / no-go status is qualified. If the actual geometric profile of the thread exceeds the range of the digital go gauge envelope, or causes penetrating interference with the digital no-go gauge envelope, the go gauge is judged to be unqualified or the no-go gauge interferes, and the thread's go / no-go status is unqualified. This go / no-go status directly corresponds to the engagement test result of traditional physical go / no-go gauges, realizing a non-contact, digital equivalent judgment.

[0029] In a specific implementation scenario, the execution process of the above-mentioned automatic bolt go / no-go detection method based on industrial vision is as follows.

[0030] First, when a bolt to be inspected enters the inspection station via a conveyor belt, a trigger sensor, such as a photoelectric sensor, detects that the bolt has reached its position and sends a trigger signal to the industrial control computer. Upon receiving the signal, the industrial control computer controls a vision system to begin operation.

[0031] The first step is to acquire a complete image of the bolt to be inspected and identify its specifications. The purpose of this step is to automatically determine the type of bolt without manual intervention. A camera in the vision system, typically an industrial area-array camera with a large field of view responsible for global observation, takes a picture of the bolt located at the inspection station, obtaining a complete image containing the bolt's outline. Image processing software analyzes this image, extracting key geometric information about the bolt, such as its total length, shank diameter, and whether the head is a hexagonal head or a countersunk head with 19 mm opposite sides. Subsequently, the software compares this extracted geometric information with a bolt specification library pre-stored locally. Through a match, the system can determine the specific specifications of the bolt, such as "M12×1.75-80-10.9," which means a nominal diameter of 12 mm, a pitch of 1.75 mm, a length of 80 mm, and a performance grade of 10.9.

[0032] The second step is to retrieve the digital gauge data corresponding to the specification parameters. Once the system recognizes the bolt specification as "M12×1.75-80-10.9", it will search the pre-stored digital gauge database based on this specification parameter, find and retrieve the digital gauge data file that corresponds exactly to it. This data file precisely defines the digital go-go and digital no-go gauge envelopes that the M12×1.75 thread should follow. These envelopes are stored in the form of a series of two-dimensional coordinate points, which delineate the contour boundaries of the ideal go-go and no-go gauges in a virtual coordinate system.

[0033] The third step is to acquire an image of the threaded area of ​​the bolt to be inspected and extract the actual geometric contour of the thread. In this step, the system activates another high-resolution camera (high resolution here refers to a higher resolution than industrial area-array cameras; it's a relative concept). This camera has a smaller field of view and is specifically designed for detailed imaging of the bolt's threaded portion. The system controls this camera to be aimed at the threaded area of ​​the bolt and capture a high-resolution local image. Subsequently, image processing algorithms, such as edge detection algorithms, process this threaded area image to accurately identify the edges of the thread from the complex image background and lighting. The algorithm's output is a series of contour points that describe the shape of the thread crest, root, and flank; these points together constitute the actual geometric contour of the bolt's thread.

[0034] The fourth step is to perform a spatial geometric comparison between the actual thread geometry and the digital gauge data. This is a purely digital operation performed within the computer. The system superimposes and aligns the actual thread geometry extracted in the previous step with the digital go-go and no-go gauge envelopes retrieved in the second step in the same virtual two-dimensional coordinate space. The comparison algorithm calculates the spatial relationship between each point on the actual geometry and the go-go and no-go gauge envelopes. The basic logic for the determination is: if the entire area of ​​the actual thread geometry is within the "passage" area defined by the digital go-go gauge envelope, then the go-go condition is met; simultaneously, if at least a portion of the actual thread geometry interferes with or overlaps with the digital no-go gauge envelope, then the no-go condition is met.

[0035] The fifth step is to output the go / no-go test result of the bolt under inspection based on its go / no-go status. Based on the comparison results from the previous step, the system makes a final judgment. If a bolt's thread meets both the go gauge and no-go gauge conditions (i.e., it can pass through the go gauge but not the no-go gauge), the system determines the bolt's thread go / no-go status as "qualified." Conversely, if the thread cannot pass through the go gauge (thread too large) or can pass through the no-go gauge (thread too small), the system determines it as "unqualified." This conclusion will be immediately displayed on the human-machine interface screen next to the inspection station. Simultaneously, the system can control subsequent sorting mechanisms, such as a pneumatic pusher, according to preset logic, to send qualified products to the next process and push unqualified products into the scrap bin.

[0036] By adopting the above method, the entire inspection process is fully automated, requiring no manual replacement of any physical inspection tools, enabling rapid and continuous inspection of bolts of different specifications, and greatly improving the flexibility and efficiency of the production line.

[0037] In a preferred embodiment, the steps of acquiring an overall image of the bolt to be inspected and identifying the specification parameters of the bolt to be inspected include: A complete image of the bolt to be inspected is obtained using an industrial area array camera; The overall image is preprocessed to extract the geometric features of the bolt to be detected; the geometric features include the length and diameter of the shank and the shape of the head; The geometric features are matched with a pre-stored bolt specification database to determine the model and specification parameters of the bolt to be tested.

[0038] Specifically, once the bolt enters the inspection station, a 5-megapixel CMOS industrial area scan camera mounted directly above the station is triggered to capture a top-down view as the overall image. This raw image may have issues such as uneven lighting or cluttered backgrounds. Therefore, the image processing software first preprocesses the image. Preprocessing may include: first, grayscale conversion, converting the color image into a single-channel grayscale image to simplify calculations; second, Gaussian filtering, smoothing the image to remove random pixel noise; and third, binarization, setting a grayscale threshold to convert the image into a black and white image, making the bolt's outline stand out from the background.

[0039] After preprocessing, the software employs a contour discovery algorithm, such as the Suzuki algorithm, to find a closed contour representing the bolt's shape in the binary image. Based on this contour, the system begins extracting geometric features. For extracting the length of the bolt, the software identifies the approximately rectangular portion of the bolt body within the contour and calculates its maximum length along the principal axis. For extracting the diameter, the software performs multiple width measurements within this rectangular region along a direction perpendicular to the principal axis and takes the average value. For recognizing the head shape, the software segments the head contour and determines the head type by analyzing the number of corner points (e.g., 6 corner points correspond to a hexagonal head) or by matching it with pre-stored head shape templates (e.g., internal hexagon, cross-shaped slot, slotted head, etc.).

[0040] Finally, the system extracts a set of geometric feature vectors, such as {length: 79.8mm, diameter: 11.95mm, head type: hexagonal}, and matches them with a pre-stored bolt specification database. This database is a structured table, where each row represents a bolt specification, containing its nominal geometric features and corresponding model name. A matching algorithm, such as the nearest neighbor algorithm, searches the database for the record closest to the currently measured feature vector. Once the best match is found with an error within a preset threshold, the system determines the bolt's model and specification parameters, such as "M12×1.75-80".

[0041] In another optimized implementation, the step of calling the digitized gauge data corresponding to the specification parameters includes: Based on the specifications, the corresponding standard digital gauge data is retrieved from the pre-stored digital gauge database, and the coefficient of thermal expansion of the corresponding material is retrieved from the preset material property database. Obtain the real-time surface temperature of the bolt to be tested; Based on the temperature difference between the real-time surface temperature and the standard reference temperature, and combined with the coefficient of thermal expansion, the geometric dimensions in the standard digital gauge data are proportionally scaled and compensated to obtain real-time digital gauge data that matches the current thermal environment.

[0042] This step is necessary because in some production scenarios, the bolts to be inspected may have just undergone heat treatment or hot forging, at temperatures far exceeding ambient temperatures, such as 80 degrees Celsius. Metals have the physical property of thermal expansion and contraction; the actual dimensions of a bolt at high temperatures will be larger than at the standard reference temperature (typically 20 degrees Celsius). If the temperature effect is ignored and standard digital gauges are used directly for comparison, a bolt whose dimensions are acceptable after cooling may be mistakenly judged as defective.

[0043] To achieve temperature compensation, a non-contact temperature sensor, such as an infrared thermometer, is integrated into the inspection system. The thermometer's probe is positioned at the inspection station along with the vision system, its measurement focus precisely aligned with the threaded surface of the bolt under test. While acquiring an image of the bolt, the thermometer simultaneously measures and reads the bolt's real-time surface temperature, for example, 85 degrees Celsius.

[0044] While calling up standard digital gauge data according to the specification parameter "M12×1.75-80-10.9", the system will also retrieve the coefficient of thermal expansion corresponding to the bolt material of this specification (e.g., 10.9 grade alloy steel) from the material property database, such as 1.2×10^-5 / °C.

[0045] The compensation algorithm then begins to work. It iterates through all key geometric dimensions in the standard digital gauge data, such as the major and pitch diameters of the go gauge and the pitch diameter of the no-go gauge. For each dimension, the algorithm applies the thermal expansion formula: Compensated dimension = Standard dimension × (1 + Coefficient of thermal expansion × (Real-time temperature - Standard reference temperature)). For example, for a dimension with a standard pitch diameter of 10.863 mm, the calculated compensated dimension is 10.863 × (1 + 1.2 × 10^-5 × (85 - 20)) ≈ 10.871 mm. The system uses these newly calculated compensated geometric dimensions to regenerate a temporary set of real-time digital gauge data that matches the current thermal environment. Subsequent geometric comparisons will use this compensated data, thus eliminating measurement errors caused by temperature.

[0046] In another embodiment, the step of acquiring an image of the threaded region of the bolt to be inspected includes: Determine the centroid position and axis tilt angle of the bolt to be inspected based on the overall image; Based on the centroid position and axis tilt angle, the image acquisition area of ​​the high-resolution camera is dynamically adjusted to logically compensate for the positional deviation of the bolt to be inspected at the work station and to obtain a centered image of the threaded area.

[0047] This step addresses the issue of inaccurate bolt positioning on conveyor belts or simple pallets. Even with mechanical positioning devices, slight deviations in the bolt's position and orientation can occur, such as a few millimeters of translation or a few degrees of rotation. If the high-resolution camera used to photograph the threads has a fixed field of view, such deviations can cause parts of the threaded area to shift out of the field of view, or cause image distortion due to tilt, affecting measurement accuracy.

[0048] To address this, the present invention proposes using the overall image information obtained from the first global shot to guide the second, more detailed shot. After the system extracts geometric features from the overall image, the image processing software further calculates the coordinates (Xc, Yc) of the geometric centroid of the bolt profile in the image coordinate system, as well as the angle θ between its principal axis and the horizontal direction of the image. These two parameters accurately describe the actual position and orientation of the bolt at the workstation.

[0049] The high-resolution camera in the system typically has a photosensitive chip much larger than the threaded area. However, to improve frame rate and processing speed, it only reads and outputs a specific small window on the photosensitive chip during operation—the Region of Interest (ROI). The core of this solution lies in the fact that the position of this ROI is not fixed but can be dynamically set by software. The industrial control computer, based on the calculated centroid coordinates (Xc, Yc) and tilt angle θ, uses mathematical transformations to calculate the precise position of the threaded area on the entire high-resolution camera's photosensitive chip. Subsequently, the controller sends a command to the high-resolution camera to center its next ROI window at this calculated position. Furthermore, if the camera supports it, the ROI can be rotated accordingly to keep it parallel to the bolt axis. In this way, regardless of how the bolt is offset at the workstation, the system can always ensure that the high-resolution camera accurately and centrally captures a clear image of the threaded area, greatly enhancing the system's adaptability and robustness to changes in the incoming material's position.

[0050] One specific implementation method for extracting the actual geometric profile of the thread includes: Subpixel edge detection is performed on the thread region image to directly obtain a set of subpixel precision coordinate points representing the thread profile; The sub-pixel precision coordinate point set constitutes the actual geometric contour of the thread. The subpixel precision coordinate point set includes coordinate points that define the thread crest, root, and lateral curves.

[0051] Traditional edge detection algorithms output edge point coordinates as integers, meaning the edge is located on a specific pixel. However, a physical edge rarely falls exactly on the center line of a pixel grid. It usually crosses the boundary between two pixels. For high-precision measurement objects like threads, the size of a pixel may correspond to several micrometers or even tens of micrometers. Using only integer pixel coordinates introduces significant quantization errors, failing to meet accuracy requirements.

[0052] Subpixel edge detection technology is designed to solve this problem. When a high-resolution camera acquires an image of a spiral region, the system doesn't simply binarize it and then find the edges. Instead, it first uses gradient operators (such as the Sobel operator) to calculate the magnitude and direction of the gradient for each pixel in the image. In areas with large gradient values—potential edge regions—the algorithm analyzes further. It observes the grayscale value changes of several adjacent pixels along the gradient direction. This curve approximates the transition of light intensity from bright to dark (or from dark to bright). The algorithm mathematically fits this grayscale curve, for example, using a Gaussian or parabolic function, and then calculates the peak or inflection point of the fitted function. This calculated position is a floating-point coordinate, with an accuracy of one-tenth or even less than the pixel size—this is subpixel precision.

[0053] By densely performing this sub-pixel localization across the entire thread profile, the system ultimately obtains a point set consisting of tens of thousands of floating-point coordinates (x, y). This sub-pixel precision coordinate point set is no longer a coarse, pixel-level stepped profile, but rather a very smooth and accurate reproduction of the thread's true physical profile. The data density and precision of this point set are sufficient to clearly define every detail of the thread, including the arc at the crest, the fillet at the root, and the straight or minute curved sections on the flank, providing a high-quality data foundation for subsequent accurate and reliable spatial geometric comparisons.

[0054] In the above embodiments, although an image of the threaded area of ​​the bolt under test can be obtained, the bolt surface is often not clean and dry in real industrial production environments. For example, in machining workshops, the bolt surface is often coated with cutting fluid or rust-preventive oil. When illuminated using unidirectional coaxial light or ring light, these transparent or translucent liquids will form localized bright reflective spots on the curved surface of the bolt. These reflective spots are extremely bright and appear as white areas in the image. Their edges are easily misidentified as the physical edges of the bolt by conventional edge detection algorithms, resulting in serious deviations and distortions in the extracted thread profile, ultimately leading to incorrect detection results.

[0055] To overcome the interference caused by liquid reflection, the present invention further provides an improved method, which further includes: Multiple candidate images were continuously acquired for the same spiral pattern region under illumination from light sources at different incident angles. Analyze the brightness changes and positional movement trajectories of locally highlighted areas in multiple candidate images; Based on brightness changes and positional movement trajectories, false edges caused by surface liquids in each candidate image are identified and removed. Then, the effective thread feature information from each candidate image is integrated to obtain a thread region image without false edges.

[0056] In practice, the lighting system at the inspection station is no longer a single light source, but rather consists of multiple independently controllable light source arrays. For example, a ring light source consisting of four sectors, or multiple strip light sources arranged at different locations around the bolt. When the high-resolution camera is aimed at the threaded area of ​​the bolt, the control system quickly and sequentially illuminates these light sources at different locations, simultaneously acquiring a series of images. For example, it first illuminates only the left light source and captures the first candidate image, then turns off the left light source, illuminates the top light source, and captures the second candidate image, and so on, acquiring a set (e.g., four) of candidate images illuminated from different angles within a very short time (e.g., tens of milliseconds).

[0057] Subsequently, image processing software analyzes this set of candidate images. The software detects bright areas in the images whose brightness values ​​exceed a certain threshold. For a real physical edge, its position in the image is fixed; regardless of the angle from which the light shines, it should appear in approximately the same location. However, the bright spots formed by liquid reflection are essentially specular reflections of the light source on a curved surface, and their position is closely related to the geometric relationship between the light source, the surface normal of the object, and the camera. Therefore, when the incident angle of the light source changes, the position of the bright reflective spot on the image will change significantly or shift.

[0058] The algorithm analyzes a series of candidate images to track bright areas whose positions change drastically, marking them as false edges or interference areas caused by liquid. After identifying these interference areas, the system can employ several strategies to generate a clean image. One strategy is to compare the brightness values ​​of each pixel in the image across multiple candidate images and select a non-extreme (e.g., not the brightest) brightness value as the final composite brightness for that pixel, thus suppressing bright reflections. Another more precise strategy is to first "mask" the identified interference areas in each candidate image (i.e., mark them as invalid areas), and then fuse the valid thread feature information from all candidate images that were not marked as invalid, stitching them together to form a complete image of the thread area without false edges. In this way, the interference of surface liquids such as oil stains and water stains on contour extraction is effectively eliminated, ensuring the accuracy of subsequent measurements.

[0059] Furthermore, after extracting the accurate thread profile, another challenge arises. In actual production, especially for bolts with a large length-to-diameter ratio, the bolt shank may exhibit minute, imperceptible bends due to heat treatment stress, transportation, or clamping. If this bent bolt profile is directly compared to an ideal, perfectly straight digital gauge, the bend itself will cause deviations between the profile and the standard envelope, potentially misjudging a bolt with a valid thread size as a defective product.

[0060] To separate the bending deformation of the bolt itself from the dimensional error of the thread, after extracting the actual geometric profile of the thread, the method further includes: The geometric center trajectory is located by scanning the symmetry of the thread profile, and the geometric center trajectory is connected to form a first reference line that reflects the physical bending trend of the bolt to be tested.

[0061] The principle behind this step is based on the geometric symmetry of the thread itself. Regardless of how the bolt is bent, the thread profile is always symmetrical on any cross-section perpendicular to its local axis. Therefore, the actual trajectory of the bolt axis can be determined by finding this symmetry.

[0062] In its implementation, the algorithm operates on the already acquired actual geometric profile of the thread. It "scans" from one end of the bolt to the other. At each position along the scan path, the algorithm identifies pairs of symmetrical feature points on the upper and lower profiles; for example, a tooth crest vertex on the upper profile and its corresponding tooth crest vertex on the lower profile. For each pair of such symmetrical points (P_upper, P_lower), the algorithm calculates their midpoint M = (P_upper + P_lower) / 2. By performing the same midpoint calculation on a large number of symmetrical point pairs along the entire thread length, the system can obtain a series of discrete center point coordinates.

[0063] Connecting the calculated center point coordinates sequentially forms a trajectory. To obtain a smooth curve that represents the overall bending trend, the system typically uses mathematical fitting methods, such as the least squares method, to fit these discrete center points into a continuous curve (e.g., a quadratic or cubic polynomial curve). This final smooth curve is called the "first reference line." It accurately depicts the actual bending shape of the physical axis of the bolt under test, providing a crucial benchmark for subsequent elimination of bending effects and accurate geometric comparison.

[0064] After obtaining the initial reference line reflecting the bolt's bending trend, a more precise spatial geometric comparison can be performed. The specific steps involved in comparing the actual thread geometry with digital gauge data and determining the go / no-go status of the bolt thread based on the comparison results include: Based on the first reference line, the actual geometric profile of the thread is calibrated to eliminate the influence of the physical bending of the bolt under test on the geometric comparison. Calculate the minimum Euclidean distance from points on the actual geometric profile of the thread after attitude calibration to the envelope of the digital gauge. If the minimum Euclidean distance from all points to the envelope of the digital gauge is greater than or equal to zero, then the gauge condition is satisfied. Calculate the minimum Euclidean distance from a point on the actual geometric profile of the thread after attitude calibration to the digital stop gauge envelope. If there is a point whose minimum Euclidean distance to the digital stop gauge envelope is less than zero, then stop gauge interference is determined to have occurred. If the conditions for passing the go-through are met and no interference from the stop-through is observed, the go-through / stop-through status is deemed acceptable. Otherwise, the open / closed state is deemed unqualified.

[0065] The first step is attitude calibration. This is a coordinate transformation process performed internally by the computer. Using a first reference line as a baseline, the algorithm mathematically "straightens" the extracted, curved actual geometric profile of the thread. For each point on the profile, the algorithm calculates its position relative to a local reference line and then remaps it to a straight coordinate system. This process yields an "attitude-calibrated actual geometric profile of the thread" that eliminates the effects of macroscopic curvature and reflects only the thread's own dimensional and shape deviations.

[0066] Next, this calibrated profile is used to determine whether a path is open or closed.

[0067] To determine the GO gauge conditions, the algorithm iterates through all points on the calibrated profile. For each point, it calculates the shortest straight-line distance (i.e., the minimum Euclidean distance) to the digital GO gauge envelope. Here, distances outside the envelope are considered positive, and those inside are considered negative. If the calculation finds that the distances from all points on the profile to the GO gauge envelope are greater than or equal to zero, it means that the entire thread profile is perfectly "fitted" into the virtual space of the GO gauge without any interference. Therefore, the GO gauge conditions are deemed met.

[0068] The logic for determining the no-go gauge condition is the opposite. The algorithm also calculates the minimum Euclidean distance from all points on the calibrated profile to the digital no-go gauge envelope. The purpose of the no-go gauge is to check if the thread is too small. A qualified thread should not be able to completely pass through the no-go gauge. In digital comparison, this means that the thread profile should not completely "fall into" the inside of the no-go gauge envelope. If the algorithm finds any profile point with a calculated distance less than zero during the traversal, that is, the point has entered the inside of the no-go gauge envelope, this means that the actual size of the thread has been smaller than the minimum limit size, and the so-called "no-go gauge interference" has occurred.

[0069] Ultimately, the system makes a comprehensive judgment based on these two conditions: only when a bolt simultaneously "meets the go gauge condition" (thread size not greater than the upper limit) and "does not interfere with the no-go gauge" (thread size not less than the lower limit) is it ultimately judged as "passable in the go / no-go state". If either condition is not met, it will be judged as "unqualified".

[0070] Finally, in order to achieve closed-loop management and comprehensive traceability of quality data, the specific steps for outputting the go / no-go test conclusion of the bolt under test based on its go / no-go status include: Based on the pass / stop status, generate a test conclusion report that includes the specification parameters of the bolt to be tested, the pass / stop status determination result, the test timestamp, and a unique identifier. The inspection conclusion report is associated and stored with the corresponding comparison map of the thread area image, the actual geometric profile of the thread, and the digital gauge data. According to the preset output strategy, the inspection conclusion report will be output in at least one way, including displaying it on a local human-machine interface, sending it to the manufacturing execution system, and controlling the sorting mechanism to physically sort the bolts to be inspected.

[0071] Once the test is complete, the system does more than just output a simple "OK" or "NG" signal. It immediately generates a detailed, structured test result report. This report is a data package that includes specification parameters such as "M12×1.75-80", a clear "pass" or "fail" judgment result, a test timestamp accurate to milliseconds, and an ID number to uniquely identify this test event.

[0072] More importantly, the system links and stores this conclusion report along with all the "physical evidence" used to arrive at that conclusion. This evidence includes: original high-resolution images of the threaded area, a set of sub-pixel precision geometric contour data points extracted by the algorithm, and a visual comparison chart. This chart is typically a color image clearly showing the calibrated actual contour, the standard digital go / no-go gauge envelope, and the no-go gauge envelope, allowing operators or quality engineers to clearly see the bolt deviations. All this information is stored in a linked quality database, ensuring that every inspection result is traceable and completely transparent.

[0073] At the output level, the system distributes the results in multiple ways according to pre-set strategies. On the human-machine interface (HMI) touchscreen next to the inspection station, a comparison chart and a prominent "pass / fail" indicator are immediately displayed. Simultaneously, this structured inspection report is sent to the factory's manufacturing execution system (MES) via industrial Ethernet using protocols such as OPC UA or MQTT for higher-level production statistics, quality monitoring, and SPC (Statistical Process Control) analysis. Finally, the system sends a simple switching signal to the programmable logic controller (PLC) to drive the physical sorting mechanism (such as a cylinder or flapper) to perform actions, guiding qualified products into the next process's feeder and sorting unqualified products into designated recycling bins. This series of operations achieves a complete automated closed loop from inspection, judgment, recording to execution.

[0074] Secondly, see Figure 2 The present invention also provides an automatic bolt go / no-go detection system based on industrial vision for performing any of the foregoing methods, the system comprising: The specification recognition module 210 is used to acquire an overall image of the bolt to be inspected and to identify the specification parameters of the bolt to be inspected. The data retrieval module 220 is used to retrieve digital gauge data corresponding to the specification parameters. The digital gauge data includes the digital go gauge envelope and the digital no-go gauge envelope. The contour extraction module 230 is used to acquire the thread area image of the bolt to be inspected and extract the actual geometric contour of the thread. The geometric comparison module 240 is used to perform spatial geometric comparison between the actual geometric profile of the thread and the digital gauge data, and to determine the pass / stop status of the thread of the bolt to be inspected based on the comparison results. The conclusion output module 250 is used to output the go / no-go test conclusion of the bolt to be tested based on the go / no-go status.

[0075] In a specific hardware implementation, the system can be built within a standalone testing workstation.

[0076] The specification recognition module 210 can have an industrial computer as its core hardware, such as an industrial PC equipped with an Intel Core i7 processor, and an industrial area scan camera connected to the industrial PC via a gigabit Ethernet interface, such as the 5-megapixel Ace series camera from Basler, Germany. The software part is an image processing program running on the industrial PC, which integrates the aforementioned image preprocessing, geometric feature extraction, and database matching algorithms.

[0077] The data retrieval module 220 is responsible for maintaining a digital gauge database stored on the industrial control computer's hard drive or network server. This database can be an SQL database or a simple folder structure, storing digital gauge data files conforming to national or enterprise standards for different bolt specifications. Upon receiving the bolt model from the specification identification module 210, this module performs file retrieval and reading operations and loads the data into memory. If the system is configured with temperature compensation, this module will also integrate a communication interface with an infrared thermometer (e.g., RS-485 or Ethernet) to obtain real-time temperature data and perform thermal expansion compensation calculations.

[0078] The core hardware of the contour extraction module 230 is a high-resolution industrial camera, such as a 21-megapixel high-precision camera from Keyence Corporation of Japan, equipped with a telecentric lens to eliminate perspective errors. This camera is also connected to an industrial control computer. In addition, the module includes a sophisticated structured light illumination system, such as a ring or dome light source composed of multiple independently controllable LED light sources. The software consists of sub-pixel edge detection algorithms and multi-angle illumination fusion algorithms running on the industrial control computer, used to process the images acquired by the high-resolution camera and output an accurate set of thread contour points.

[0079] The geometric comparison module 240 runs entirely on the processor of an industrial computer. It receives the actual contour data output by the contour extraction module 230 and the digital gauge data loaded by the data call module 220. Internally, this module performs a series of complex geometric operations, such as the aforementioned extraction of the bending reference line, contour attitude calibration, and Euclidean distance calculation with the go / no-go gauge envelope, and finally outputs a Boolean go / no-go state determination result.

[0080] The software portion of the output module 250 is responsible for generating structured inspection reports and storing them in a local database or sending them to the MES system via a network. The hardware portion includes a human-machine interface (HMI touchscreen) connected to the industrial control computer, and a digital output card. This output card converts the logic signals inside the industrial control computer into 24V switching signals, which are used to directly drive external PLCs or solenoid valves to control the physical movements of the sorting mechanism.

[0081] These modules work together through the internal software architecture of the industrial control computer and external hardware connections to form a complete system capable of automatically performing bolt go / stop detection tasks.

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

Claims

1. An automatic bolt go / no-go detection method based on industrial vision, characterized in that, The method includes: Acquire an overall image of the bolt to be inspected and identify the specifications of the bolt; The digital gauge data corresponding to the specification parameters is invoked, and the digital gauge data includes the digital go-go envelope and the digital no-go envelope; Obtain an image of the threaded area of ​​the bolt to be inspected, and extract the actual geometric contour of the thread; The actual geometric profile of the thread is compared spatially with the digital gauge data, and the pass / stop status of the thread of the bolt to be tested is determined based on the comparison results. Based on the stated pass / stop status, the pass / stop test result of the bolt to be tested is output.

2. The automatic bolt go / no-go detection method based on industrial vision according to claim 1, characterized in that, The steps of acquiring an overall image of the bolt to be inspected and identifying the specification parameters of the bolt to be inspected include: The overall image of the bolt to be inspected is obtained using an industrial area array camera; The overall image is preprocessed to extract the geometric features of the bolt to be detected; the geometric features include the length and diameter of the shank and the shape of the head; The geometric features are matched with a pre-stored bolt specification database to determine the model and specification parameters of the bolt to be tested.

3. The automatic bolt pass / fail detection method based on industrial vision according to claim 1, characterized in that, The step of calling the digital gauge data corresponding to the specification parameters includes: Based on the specified parameters, the corresponding standard digital gauge data is retrieved from the pre-stored digital gauge database, and the coefficient of thermal expansion of the corresponding material is retrieved from the preset material property database. Obtain the real-time surface temperature of the bolt to be tested; Based on the temperature difference between the real-time surface temperature and the standard reference temperature, and in conjunction with the coefficient of thermal expansion, the geometric dimensions in the standard digital gauge data are proportionally scaled and compensated to obtain real-time digital gauge data that matches the current thermal environment.

4. The automatic bolt pass / fail detection method based on industrial vision according to claim 1, characterized in that, The step of acquiring the threaded region image of the bolt to be detected includes: The centroid position and axis tilt angle of the bolt to be inspected are determined based on the overall image. Based on the centroid position and the axis tilt angle, the image acquisition area of ​​the high-resolution camera is dynamically adjusted to logically compensate for the positional deviation of the bolt to be detected at the work station, and to obtain a centered image of the threaded area.

5. The automatic bolt pass / fail detection method based on industrial vision according to claim 4, characterized in that, The method also includes: Multiple candidate images are continuously acquired for the same threaded region under illumination by light sources at different incident angles; Analyze the brightness changes and positional movement trajectories of locally highlighted areas in the multiple candidate images; Based on the brightness change and the position movement trajectory, false edges caused by surface liquid in each candidate image are identified and eliminated, and the effective thread feature information in each candidate image is integrated to obtain a thread region image without false edges.

6. The automatic bolt pass / fail detection method based on industrial vision according to claim 1, characterized in that, The step of extracting the actual geometric profile of the thread includes: Subpixel edge detection is performed on the threaded region image to directly obtain a set of subpixel precision coordinate points representing the thread profile; The sub-pixel precision coordinate point set constitutes the actual geometric contour of the thread. The subpixel precision coordinate point set includes coordinate points that define the thread crest, root, and lateral curves.

7. The automatic bolt pass / fail detection method based on industrial vision according to claim 1, characterized in that, After extracting the actual geometric profile of the thread, the method further includes: The geometric center trajectory is located by scanning the symmetry of the thread profile, and the geometric center trajectory is connected to form a first reference line that reflects the physical bending trend of the bolt to be tested.

8. The automatic bolt go / no-go detection method based on industrial vision according to claim 7, characterized in that, The step of performing a spatial geometric comparison between the actual geometric profile of the thread and the digital gauge data, and determining the go / no-go state of the thread of the bolt to be inspected based on the comparison result includes: Based on the first reference line, the actual geometric profile of the thread is calibrated to eliminate the influence of the physical bending of the bolt under test on the geometric comparison. Calculate the minimum Euclidean distance from a point on the actual geometric profile of the thread after attitude calibration to the envelope of the digital gauge. If the minimum Euclidean distance from all points to the envelope of the digital gauge is greater than or equal to zero, then the gauge condition is satisfied. Calculate the minimum Euclidean distance from a point on the actual geometric profile of the thread after attitude calibration to the digital stop gauge envelope. If there is a point whose minimum Euclidean distance to the digital stop gauge envelope is less than zero, then stop gauge interference is determined to have occurred. If the conditions for passing the go-through are met and no interference from the stop-through is observed, the go-through / stop-through status is deemed acceptable. Otherwise, the open / closed state is deemed unqualified.

9. The automatic bolt pass / fail detection method based on industrial vision according to claim 7, characterized in that, The step of outputting the pass / fail detection conclusion of the bolt to be tested based on the pass / fail status includes: Based on the open / closed state, a test conclusion report is generated, which includes the specification parameters of the bolt to be tested, the open / closed state determination result, the test timestamp, and a unique identifier. The detection conclusion report is associated and stored with the corresponding comparison map of the threaded area image, the actual geometric contour of the thread, and the digital gauge data; According to the preset output strategy, the test result report is output in at least one way, including displaying it on a local human-machine interface, sending it to the manufacturing execution system, and controlling the sorting mechanism to physically sort the bolts to be tested.

10. An automatic bolt go / no-go detection system based on industrial vision, used to perform the method according to any one of claims 1 to 9, characterized in that, include: The specification recognition module is used to acquire an overall image of the bolt to be inspected and to identify the specification parameters of the bolt to be inspected. The data retrieval module is used to retrieve the digital gauge data corresponding to the specification parameters. The digital gauge data includes the digital go gauge envelope and the digital no-go gauge envelope. The contour extraction module is used to acquire the thread area image of the bolt to be detected and extract the actual geometric contour of the thread. The geometric comparison module is used to perform spatial geometric comparison between the actual geometric contour of the thread and the digital gauge data, and to determine the pass / stop status of the thread of the bolt to be tested based on the comparison result. The conclusion output module is used to output the go / go test conclusion of the bolt to be tested based on the go / go state.