A threaded automatic detection system and device

CN122900433APending Publication Date: 2026-10-13CHENGDU DIMAIWALKER PHOTOELECTRIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411891836.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2026-10-13

AI Technical Summary

Benefits of technology

[0036]本发明根据螺纹二维图像轮廓的特点,以某一端为起始,逐个以螺纹扣为单位纵向对比,以动态时间规整算法(DTW)为基础保证了检测的准确度。并且前后经过三次判断,即基于DTW算法的判断,对于不合格的轮廓再计算向前差分判断是否为误判,最后对比各项参数进一步校准结果。相比现有技术前述方法获得的测试结果更加准确可靠。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122900433A_ABST
    Figure CN122900433A_ABST
Patent Text Reader

Abstract

The application discloses a kind of thread automatic detection system, comprising the following steps: S1, preset judgment valve area, fluctuation valve area, the profile curve of standard thread is as template curve;S2, the profile curve of the thread to be detected is exported as measured curve and compared with template curve, if the difference is not more than the judgment valve area, it is judged to be qualified;If the difference exceeds the judgment valve area, the forward difference of the measured curve is calculated, if the difference fluctuation exceeds the fluctuation valve area, it is judged to be unqualified, otherwise, it is output as qualified.The application is based on the characteristics of thread two-dimensional image profile, with a certain end as the starting point, compared longitudinally with thread buckle as a unit, and the accuracy of detection is ensured based on dynamic time warping algorithm (DTW).Compared with the test results obtained by the foregoing method of the prior art, the test results are more accurate and reliable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention discloses an automatic thread detection system and device, which relates to the field of automatic thread detection technology. Background Technology

[0002] Various threaded parts require measurement using traditional thread gauges and thread go / no-go gauges. These tools and gauges require regular maintenance and replacement. They also require manual measurement and calibration during use. This process is not only inefficient, but also results in poor accuracy.

[0003] In existing technologies, the Dynamic Time Warping (DTW) algorithm is widely used for identifying and judging various devices and equipment in production lines. For example, patent (CN 115171051B) discloses an online detection method and system for conveyor belt edge tearing, using the DTW algorithm to identify belt edges. However, it has not yet been applied to thread detection. The main reason is that image edge recognition cannot be simply applied to identifying threads, which have complex boundaries and require high accuracy. Thread cross-sections involve a large amount of data and are complex to test; therefore, comparing each thread parameter sequentially with standard values ​​would lead to low efficiency.

[0004] It is worth mentioning that in the existing technology, those skilled in the field often combine machine learning, especially neural network technology, to test threads; for example, a smart detection, identification and statistical system for Oncomelania snails disclosed in patent (CN 109886170A) relies on convolutional neural networks to identify and process images.

[0005] However, while neural networks excel at processing complex images, their core logic, based on probabilistic optimal selection, carries a potential risk of misjudgment in thread inspection applications. This is primarily due to the large amount of data involved in thread cross-sections, the complexity of the testing process, and the fact that thread acceptance criteria can be affected by minute dimensional variations. Furthermore, screw thread inspection requires accurate results, while machine learning can only approximate the true value, not the actual value. Therefore, using neural networks for thread inspection carries the risk of inaccurate results; using fixed judgment criteria to assess threads yields more reliable results.

[0006] Content of this invention

[0007] The purpose of this invention is to provide an automatic thread detection system and device, overcoming the problem that dynamic time warping algorithms in existing technologies are difficult to apply to thread detection.

[0008] To achieve the above-mentioned technical objectives and effects, the invention is implemented through the following technical solution:

[0009] An automatic thread inspection system includes the following steps:

[0010] S1. Preset judgment valve range and fluctuation valve range, and use the profile curve of the standard thread as the template curve;

[0011] S2. Export the profile curve of the thread to be tested as the test curve and compare it with the template curve. If the difference does not exceed the judgment threshold, it is judged as qualified.

[0012] If the difference exceeds the judgment threshold, the forward difference of the curve under test is calculated. If the difference fluctuation exceeds the fluctuation threshold, it is judged as unqualified; otherwise, it is output as qualified.

[0013] Furthermore, the judgment valve domain and fluctuation valve domain are obtained by the user inputting them into the terminal;

[0014] The template curve and the curve to be tested are represented as pixel information in the system. After constructing the correspondence based on the DTW algorithm, the differences are judged point by point to determine whether they meet the judgment threshold requirements.

[0015] The forward difference result of the curve under test is obtained based on the numerical calculation of its pixel information.

[0016] Furthermore, the template curve and the curve to be tested are positioned based on a template matching algorithm. After positioning, the curve corresponding to each thread in the threaded contour is individually template matched.

[0017] Starting from any end, the test curve is judged step by step to determine whether it is qualified. After traversing all pixels in the test curve vertically, the result is output.

[0018] Furthermore, in step S101, the Canny edge algorithm is used to obtain the contour to be measured;

[0019] S102. After removing noise from the profile to be measured obtained in S101 and performing a closing operation to connect the breakpoints, a clean thread surface curve is obtained.

[0020] Furthermore, in step S201, the DTW algorithm is used to construct the comparison relationship between the pixels of the contour to be tested and the pixels of the template contour, and the corresponding curves of the threaded threads whose results do not meet the judgment threshold are isolated, while the remaining contours are output as qualified.

[0021] S202. For threaded profiles that do not meet the results, traverse all pixels of the profile and calculate the forward difference result. If there are pixels with fluctuation amplitude greater than the fluctuation threshold, output the result that the screw corresponding to the profile to be tested is unqualified.

[0022] Furthermore, it also includes S3, which obtains user-preset standard thread parameters and differential valve ranges from the terminal;

[0023] Based on the data of each thread of the profile to be tested, the parameters of each thread of the thread to be tested that is qualified are obtained and compared with the parameters of the standard thread. If the parameter difference does not exceed the difference threshold, the output is qualified.

[0024] If the parameter difference exceeds the valve range, the output will indicate that manual inspection is required.

[0025] Furthermore, the parameters that need to be determined include major diameter, minor diameter, pitch, thread angle, and pitch diameter;

[0026] If all parameters are deemed acceptable, the result is considered acceptable. If any parameter is deemed unacceptable, the result will be output indicating that manual inspection is required.

[0027] Furthermore, all contours are two-dimensional longitudinal cross-sectional views of threaded workpieces;

[0028] The cross-sectional view of the thread to be tested is obtained by a thread testing instrument. The obtained cross-sectional view is preprocessed, including distortion correction and burr removal.

[0029] Furthermore, downsample the image to its original size. Figure 4 The template is matched to one-third of the size. After positioning, the position of the remaining threads is searched vertically to obtain the precise position of each thread.

[0030] Another objective of this invention is to disclose an automatic thread detection device, comprising: a profile acquisition module for acquiring two-dimensional cross-sectional views of a standard thread and the thread to be tested;

[0031] The edge contour pixel acquisition module obtains the corresponding computer-readable edge contour curve based on the two-dimensional cross-sectional image obtained by the contour acquisition module, which is specifically represented as a set of pixel values.

[0032] The proofreading module takes each turn of the thread curve as a unit, traverses each pixel of the image vertically, and resets the pixel of the starting point of each thread turn to zero during the traversal.

[0033] Compare the difference between the standard thread and the thread under test across all pixels and calculate the forward difference. If the difference matches the user-preset valve range, it is considered qualified.

[0034] The parameter calibration module calculates and outputs the major diameter, minor diameter, pitch, thread angle, and pitch diameter of each thread corresponding to a qualified thread and compares them with the standard values. If they meet the user's preset range, the thread is considered qualified; otherwise, manual processing is prompted.

[0035] Beneficial effects:

[0036] This invention, based on the characteristics of the two-dimensional image contour of a thread, starts from one end and compares each thread longitudinally as a unit, using the Dynamic Time Warping (DTW) algorithm to ensure detection accuracy. Furthermore, it performs three judgments: based on the DTW algorithm, for unqualified contours, it calculates forward differences to determine if it is a false positive; finally, it compares various parameters to further calibrate the results. Compared with the aforementioned methods in the prior art, the test results obtained are more accurate and reliable.

[0037] Of course, any product implementing this invention does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description

[0038] Figure 1 This is a flowchart (logic) of an automatic thread detection system according to an embodiment of the present invention.

[0039] Figure 2 This is a flowchart (logic) of an automatic thread detection system according to an embodiment of the present invention.

[0040] Figure 3 This is a flowchart (logic) of an automatic thread detection system according to an embodiment of the present invention.

[0041] Figure 4 This is a flowchart (logic) of an automatic thread detection system according to an embodiment of the present invention.

[0042] Figure 5 This is a flowchart (logic) of an automatic thread detection system according to an embodiment of the present invention.

[0043] Figure 6 This is a diagram of a virtual device for automatic thread detection according to an embodiment of the present invention. Detailed Implementation

[0044] The thread go / no-go test is essentially a determination of whether it meets the required standards, such as the traditional go / no-go gauge inspection method based on Taylor's principle. This thread test can meet the minimum inspection requirements. Therefore, in this invention, a standard part is also used as a benchmark, and the screw to be tested (or other threaded workpieces) is compared with it for inspection. It can be understood that the results obtained by using electrical equipment to perform the test in this invention are more accurate.

[0045] The automatic thread detection system disclosed in this invention includes the following steps:

[0046] S1. Preset judgment valve region and fluctuation valve region, and use the profile curve of the standard thread as the template curve.

[0047] The contour curve in this step is obtained through a contour acquisition algorithm, such as obtaining a preliminary contour by performing grayscale processing on the image and then using operations such as gradient descent. There are many existing technologies that can be easily conceived by those skilled in the art. Their fundamental purpose is to process the image to obtain the information or values ​​corresponding to the contour.

[0048] S2. Export the profile curve of the thread to be tested as the test curve and compare it with the template curve. If the difference does not exceed the judgment threshold, it is judged as qualified.

[0049] In practice, the applicant found that even if a certain thread of the curve under test differs significantly from the template curve, outputting it as unqualified could easily lead to misjudgment. Testing revealed that there are many reasons for such discrepancies, such as burrs and manufacturing processes. To reduce misjudgment, this invention isolates a single threaded thread and first calculates the forward difference of each pixel for that thread. If the range of difference fluctuation is too large, it is directly judged as unqualified; otherwise, it is judged as qualified.

[0050] Specifically: if the difference exceeds the judgment threshold, the forward difference of the curve to be tested is calculated; if the difference fluctuation exceeds the fluctuation threshold, it is judged as unqualified; otherwise, the output is qualified.

[0051] The standard thread refers to the thread on a standard part with threads, such as the thread on a standard screw. The standard thread is set according to different workpieces to be tested. As mentioned above, the standard thread is used as a reference, and its judgment standard in this invention is its thread profile.

[0052] For example, a screw can be preset as a standard part in the testing equipment. After obtaining its contour curve, the workpiece to be tested can be inspected. During use, the workpiece to be tested is placed in the testing equipment, and the contour image of each workpiece is obtained in turn. After being converted into a contour curve, it is compared with the standard thread and judged. It is also possible to select points on the coordinate system of the two contour curves for comparison one by one.

[0053] In another scenario, the two curves can be directly fitted; the purpose of both is to determine whether the workpiece under test matches the standard part. If a mismatch exists, it should be indicated as unqualified or defective. This invention also allows for a secondary judgment, that is, displaying or explaining the specific missing parts of the workpiece judged as unqualified.

[0054] Specifically, the secondary judgment aims to obtain detailed information about the missing region. For example, calculating the forward difference can reduce misjudgments, and the missing region can also be determined based on fluctuation results; fitting curves can construct a more accurate comparison. Compared with traditional judgment techniques, the method of this invention can improve the accuracy and precision of the judgment.

[0055] To more clearly illustrate the technical solution of the present invention, the present invention will be described in detail below with reference to embodiments.

[0056] In this embodiment, the judgment threshold and fluctuation threshold are obtained by the user inputting them into the terminal. Specifically, the user can set an appropriate threshold according to their own testing needs and requirements for thread quality. For example, if the user has high requirements for thread quality, a lower threshold is set to ensure that only threads of extremely high quality are tested as qualified. Conversely, if the user's requirements for thread quality are not so strict, a higher threshold may be set to improve testing efficiency. This is a capability possessed by those skilled in the art and will not be described in detail here.

[0057] In this embodiment, the template curve and the curve to be tested are represented in the system as pixel information. Specifically, the system first uses a suitable image capture device, such as a CCD camera, to acquire two-dimensional cross-sectional images of the standard thread and the thread to be tested. Then, the system uses a suitable image processing algorithm, such as the Canny edge detection algorithm, to acquire the edge information of the image and convert this edge information into pixel information. This pixel information constitutes the template curve and the curve to be tested.

[0058] During the comparison, the system uses the Dynamic Time Warping (DTW) algorithm to construct the correspondence between the template curve and the curve under test. Specifically, the DTW algorithm calculates the Euclidean distance between each pair of corresponding pixels on the template curve and the curve under test, and finds a path that minimizes the sum of the Euclidean distances of all corresponding pixels. Then, the system checks point by point whether the Euclidean distances of these corresponding pixels meet the user-defined threshold requirements. If the Euclidean distances of all corresponding pixels meet the threshold requirements, the thread under test is judged to be qualified.

[0059] It should be noted that the object of analysis in this embodiment is a thread, whose profile is regular, continuous, and has a fixed pattern, including pitch and thread angle. This differs from the Dynamic Time Warping (DTW) algorithm used in other industrial methods. For example, the online detection of conveyor belt edge tearing in patent (CN 109886170A) targets the edge of the conveyor belt, which may be discontinuous and irregular, and may need to address issues such as tearing and wear.

[0060] Compared to applying network prediction or near-optimal results, the Dynamic Time Warping (DTW) algorithm divides the edge contour of the part under test into several independent values, retrieves the contour of the standard workpiece, and obtains accurate comparison results by matching them one by one based on the algorithm.

[0061] Specifically, all the curves to be tested are obtained by converting images such as photographs or screenshots. For example, clear photographs of various cross-sections of the thread are acquired using a thread inspection instrument. Distortion correction and smoothing are then performed based on the images. For a single thread inspection, the higher the frequency of data acquisition, the more accurate the detection results, but the detection speed will be slower. After processing, the contour is converted into pixel information that can be processed by a computer.

[0062] The forward difference result of the curve under test is obtained based on the numerical calculation of its pixel information. Specifically, the brightness value of each pixel of the curve under test can be used as the value of that pixel. Then, the difference between the brightness values ​​of two adjacent pixels is calculated, and this difference is the result of the forward difference. The fluctuation range of the forward difference result is used as a criterion. If it exceeds a preset fluctuation threshold, the threaded thread is judged to be unqualified. Of course, in some other cases, other difference results can also be used as a reference, which are all conventional alternative methods in this field.

[0063] As mentioned earlier, performing a secondary assessment on threads that initially failed the test based on the forward differential result can reduce the probability of misjudgment. Forward differential can accurately reflect minute changes in the thread. For each thread, if the overall curve is smooth and meets the conditions, then there is actually no error, meaning that the product judged as unqualified in the previous test was actually an incorrect result.

[0064] In one specific embodiment, the template curve and the curve to be tested are located based on a template matching algorithm. After positioning, the curve corresponding to each thread in the threaded contour is individually template matched. In this embodiment, the Dynamic Time Warping (DTW) algorithm is used to determine the similarity between two discrete curves.

[0065] The DTW algorithm is characterized by its ability to flexibly match two curves along the time axis, thereby obtaining the optimal matching path between the two curves. This allows it to effectively handle local shape changes in the curves, resulting in more accurate matching results. Therefore, dividing the curves into individual segments for individual mapping of local contours is more suitable for the algorithm's characteristics and offers higher accuracy compared to the overall mapping approach.

[0066] Furthermore, if a certain element of the contour to be tested is completely lost, the missing element may be overlooked compared to the overall comparison of the curve contour. The method in this embodiment is less likely to encounter the aforementioned error because it uses each element as a comparison benchmark.

[0067] During operation, the process starts from any endpoint and proceeds step-by-step to determine the pass / fail status of the curve under test. After vertically traversing all pixels of the curve, the result is output. Specifically, an endpoint is first selected as the starting point, and then the process moves step-by-step towards other endpoints. For each endpoint, a template matching algorithm and a DTW algorithm are used for matching, and the pass / fail status of that endpoint is determined. If all endpoints are passable, the curve under test is considered passable. If any endpoint is failable, the curve under test is considered failable. After traversing all endpoints, the detection result is output.

[0068] In a preferred embodiment, S1 specifically includes: S101, obtaining the contour to be measured using the Canny edge algorithm.

[0069] S102. After removing noise and performing a closing operation to connect breakpoints on the contour to be measured obtained in S101, a clean thread surface curve is obtained. Noise removal is to eliminate random noise in the image, while the closing operation to connect breakpoints is to repair gaps in the contour, thereby obtaining a complete and continuous contour curve.

[0070] In a preferred embodiment, S2 specifically involves: S201, using the DTW algorithm to construct the comparison relationship between the pixels of the contour to be tested and the pixels of the template contour, isolating the threaded thread corresponding curves whose results do not meet the judgment threshold limit, and outputting the remaining contours as qualified.

[0071] In practice, the DTW (Dynamic Time Warping) algorithm constructs a comparison relationship between the pixels of the contour to be tested and the pixels of the template contour. The DTW algorithm can achieve non-linear elastic matching during the comparison process of the time series, thus ensuring a good matching effect even when the contour shape fluctuates slightly. In this preferred embodiment, the isolation curve is actually used to isolate unqualified threaded threads. The contour to be tested is decomposed into threaded contours corresponding to each thread, and then DTW matching is performed on these threaded contours one by one. If the matching result of a certain thread does not meet the judgment threshold limit, then the threaded contour corresponding to that thread will be isolated and identified as unqualified. For the remaining threaded contours, if their matching results are within the threshold range, then they will be output as qualified.

[0072] S202. For threaded profiles that do not meet the results, traverse all pixels of the profile and calculate the forward difference result. If there are pixels with fluctuation amplitude greater than the fluctuation threshold, output the result that the screw corresponding to the profile under test is unqualified. The specific implementation is basically the same as the above, and will not be repeated here.

[0073] In another specific embodiment, after the second comparison, a third comparison is also included, S3, where the terminal obtains the user-preset standard thread parameters and difference threshold.

[0074] As mentioned above, the result obtained by the test method is obtained after the second comparison and screening to reduce misjudgments. In some cases, the result obtained in the initial judgment may be correct, while in the secondary judgment, the incomplete thread tooth or incomplete thread buckle is accidentally considered as a qualified part due to unexpected flatness. To further improve the accuracy of the judgment result, this embodiment constructs a third comparison.

[0075] During operation, according to the data of each buckle of the contour to be tested, the parameter of each buckle of the to-be-tested thread output as qualified is obtained and compared with the standard thread parameter, and if the parameter difference does not exceed the difference threshold, it is output as qualified. Specifically, the difference between the parameter of each buckle (for example, the depth, width, angle, etc. of the buckle) and the standard thread parameter will be calculated.

[0076] If this difference does not exceed the user-set threshold, this buckle is output as qualified. This is because if the difference between the parameter of a contour to be tested and the standard thread parameter is within the threshold, the contour to be tested can be considered sufficiently close to the standard thread, and thus should be judged as qualified.

[0077] However, if the parameter difference exceeds the threshold, this buckle is output as requiring manual inspection. This is because if the difference between the parameter of a contour to be tested and the standard thread parameter exceeds the threshold, it contradicts the judgment results of the two times in the foregoing embodiment, which means that the judgment can no longer rely on the computer.

[0078] Different from S2, S3 is used for result calibration, that is, after S2 effectively reduces the probability of misjudgment, missed judgment may occur, that is, a screw that originally has a defect is output as qualified. This embodiment is actually summarized by the applicant and his team after measuring tens of thousands of different parts in a year. The detection items affecting thread go / no-go are sorted by importance as follows: major diameter, minor diameter, pitch, thread angle, and pitch diameter.

[0079] Therefore, comparing the foregoing values can calibrate the result. Specifically, the parameters to be judged include major diameter, minor diameter, pitch, thread angle, and pitch diameter;

[0080] A judgment result of all qualified indicates qualification, and if any type of parameter is unqualified, the result requiring manual inspection is output. The specific implementation process is relatively conventional, and will not be repeated here.

[0081] In a preferred embodiment, all the two-dimensional longitudinal section views of the threads to be tested are matched with the individual thread buckles of the preset two-dimensional longitudinal section view of the standard thread in sequence, taking a single thread buckle as a unit.

[0082] As Figure 2As shown, a thread inspection instrument can capture clear photographs of each cross-section of the thread. Combined with the contour acquisition method described in S1 above, the corresponding contour is obtained, which will not be elaborated further here.

[0083] In the aforementioned embodiment, the matching direction starts from the first thread at one end and sequentially searches for the positions of the remaining threads longitudinally. A thread is what is commonly known as a turn of a screw. As mentioned above, the threads are arranged in a regular pattern, and comparing them one by one can improve the comparison accuracy.

[0084] In a preferred embodiment, the system also has a counting function. If the standard thread has 11 threads, the cross-sectional view of the workpiece to be tested is compared with it sequentially during operation. If only 10 comparisons are identified at the end of a single cycle, then a certain thread is completely missing. Alternatively, the stored standard threaded parts also have pitch parameters, i.e., the result is obtained by comparing the pitch.

[0085] In another preferred embodiment, the longitudinal section two-dimensional diagrams of all the threads to be tested are matched sequentially with the individual threads of the longitudinal section two-dimensional diagrams of the preset standard threads, with the matching direction starting from the first thread at one end and sequentially searching for the positions of the remaining threads longitudinally.

[0086] like Figure 3 As shown, the system first retrieves the standard thread cross-sectional profile data from the data unit. This data is coordinate data in a coordinate system; in this embodiment, the standard thread's axis of symmetry is the Y-axis, and the bottom end (i.e., the bottom surface) is the X-axis. The steps performed synchronously or with a delay after retrieving the standard thread cross-sectional profile data are: acquiring the thread profile data of the part to be measured and constructing a reference coordinate system; comparing the data sequentially from bottom to top along the Y-axis and recording the differences. During processing, the starting position of each threaded thread can be reset to 0, and then traversal can be performed using each threaded thread as a unit.

[0087] In some specific embodiments, the cross-sectional view of the thread to be tested is obtained by a thread inspection instrument, and the obtained cross-sectional view is preprocessed, including distortion correction and burr removal; or other conventional methods of image processing that can be performed by those skilled in the art.

[0088] In a preferred embodiment, the judgment criteria are adjusted according to different workpieces, and each feature of the thread is judged one by one.

[0089] The aforementioned judgment is based on feature comparison using the Dynamic Time Warping (DTW) algorithm. Specifically, the surface curve of each thread is extracted and compared with the surface curve of a standard thread. A secondary comparison is then performed after obtaining the comparison result. The specific method will not be elaborated further.

[0090] Specifically, in order to accurately locate the position of each thread in this embodiment, and to save code execution time, the image is downsampled to its original size. Figure 4 The template is matched to one-third of the size. After positioning, the position of the remaining threads is searched vertically to obtain the precise position of each thread.

[0091] In one embodiment, an automatic thread detection device includes the following modules: a profile acquisition module for acquiring two-dimensional cross-sectional views of a standard thread and the thread to be tested;

[0092] The edge contour pixel acquisition module obtains the corresponding computer-readable edge contour curve based on the two-dimensional cross-sectional image obtained by the contour acquisition module, which is specifically represented as a set of pixel values.

[0093] The proofreading module takes each turn of the thread curve as a unit, traverses each pixel of the image vertically, and resets the pixel of the starting point of each thread turn to zero during the traversal.

[0094] Compare the difference between the standard thread and the thread under test across all pixels and calculate the forward difference. If the difference matches the user-preset valve range, it is considered qualified.

[0095] The parameter calibration module calculates and outputs the major diameter, minor diameter, pitch, thread angle, and pitch diameter of each thread corresponding to a qualified thread and compares them with the standard values. If they meet the user's preset range, the thread is considered qualified; otherwise, manual processing is prompted.

[0096] During operation, the contour acquisition module acquires two-dimensional cross-sectional images of the standard thread and the thread under test, and then passes these images to the edge contour pixel acquisition module. The edge contour pixel acquisition module converts the images into digital information that a computer can process and passes it to the calibration module. The calibration module performs an initial thread conformity check and passes the result to the parameter calibration module. Finally, the parameter calibration module performs a second thread conformity check and outputs the final test result.

[0097] This modular design allows the various parts of the automatic thread inspection device to work independently while also coordinating to complete the entire inspection process, thereby improving inspection efficiency and accuracy. Implementation can be based on various control hardware or computer software; typically, the aforementioned program should be implemented using conventional PLC control, microcontroller control, or similar methods.

[0098] The above are merely some of the embodiments of this application and are not intended to limit the application in any way. Any simple modifications, equivalent changes, and alterations made to the above embodiments shall still fall within the scope of protection of the technical solution of this application.

Claims

1. An automatic thread inspection system, using a standard thread as the judgment criterion, characterized in that, Includes the following steps: S1. Preset judgment valve range and fluctuation valve range, and use the profile curve of the standard thread as the template curve; S2. Export the profile curve of the thread to be tested as the test curve and compare it with the template curve. If the difference does not exceed the judgment threshold, it is judged as qualified. If the difference exceeds the judgment threshold, the forward difference of the curve under test is calculated. If the difference fluctuation exceeds the fluctuation threshold, it is judged as unqualified; otherwise, it is output as qualified.

2. The automatic thread detection system according to claim 1, characterized in that: The judgment valve domain and fluctuation valve domain are obtained by the user inputting them into the terminal. The template curve and the curve to be tested are represented as pixel information in the system. After constructing the correspondence based on the DTW algorithm, the differences are judged point by point to determine whether they meet the judgment threshold requirements. The forward difference result of the curve under test is obtained based on the numerical calculation of its pixel information.

3. The automatic thread detection system according to claim 1 or 2, characterized in that: The template curve and the curve to be tested are located based on a template matching algorithm. After positioning, the curve corresponding to each thread in the threaded contour is individually template matched. Starting from any end, the test curve is judged step by step to determine whether it is qualified. After traversing all pixels in the test curve vertically, the result is output.

4. The automatic thread detection system according to claim 2, characterized in that, Specifically, S1 is: S101. Use the Canny edge algorithm to obtain the contour to be measured; S102. After removing noise from the profile to be measured obtained in S101 and performing a closing operation to connect the breakpoints, a clean thread surface curve is obtained.

5. The automatic thread detection system according to claim 2, characterized in that: Specifically, S2 is: S201. Use the DTW algorithm to construct the comparison relationship between the pixels of the contour to be tested and the pixels of the template contour, isolate the corresponding curve of the threaded thread whose result does not meet the judgment valve domain limit, and output the remaining contour as qualified. S202. For threaded profiles that do not meet the results, traverse all pixels of the profile and calculate the forward difference result. If there are pixels with fluctuation amplitude greater than the fluctuation threshold, output the result that the screw corresponding to the profile to be tested is unqualified.

6. The automatic thread detection system according to claim 1, characterized in that: It also includes S3, which obtains user-preset standard thread parameters and differential valve ranges from the terminal; Based on the data of each thread of the profile to be tested, the parameters of each thread of the thread to be tested that is qualified are obtained and compared with the parameters of the standard thread. If the parameter difference does not exceed the difference threshold, the output is qualified. If the parameter difference exceeds the valve range, the output will indicate that manual inspection is required.

7. The automatic thread detection system according to claim 6, characterized in that: The parameters that need to be determined include major diameter, minor diameter, pitch, thread angle, and pitch diameter; If all parameters are deemed acceptable, the result is considered acceptable. If any parameter is deemed unacceptable, the result will be output indicating that manual inspection is required.

8. The automatic thread detection system according to claim 1, characterized in that: All profiles are two-dimensional longitudinal cross-sectional views of threaded workpieces; The cross-sectional view of the thread to be tested is obtained by a thread testing instrument. The obtained cross-sectional view is preprocessed, including distortion correction and burr removal.

9. The automatic thread detection system according to claim 1, characterized in that: The image is downsampled to one-quarter the size of the original image for template matching. After positioning, the position of the remaining threads is searched vertically to obtain the precise position of each thread.

10. An automatic thread detection device, characterized in that, include: The profile acquisition module is used to acquire two-dimensional cross-sectional views of the standard thread and the thread to be tested; The edge contour pixel acquisition module obtains the corresponding computer-readable edge contour curve based on the two-dimensional cross-sectional image obtained by the contour acquisition module, which is specifically represented as a set of pixel values. The proofreading module takes each turn of the thread curve as a unit, traverses each pixel of the image vertically, and resets the pixel of the starting point of each thread turn to zero during the traversal. Compare the difference between the standard thread and the thread under test across all pixels and calculate the forward difference. If the difference matches the user-preset valve range, it is considered qualified. The parameter calibration module calculates and outputs the major diameter, minor diameter, pitch, thread angle, and pitch diameter of each thread corresponding to a qualified thread and compares them with the standard values. If they meet the user's preset range, the thread is considered qualified; otherwise, manual processing is prompted.

Citation Information

Patent Citations

  • An intelligent oncomelania detection, recognition and statistics system

    CN109886170A

  • An online detection method and system for edge tearing of conveyor belts

    CN115171051B