A method, system and apparatus for measuring the length of a thread finish

The measurement system, consisting of an industrial camera and a rotary table, automatically identifies the thread profile and nominal interlayer, solving the problems of long measurement time and low accuracy in existing thread end length measurement, and achieving efficient and accurate thread end length measurement.

CN116793223BActive Publication Date: 2026-07-21BEIJING HANGWEI JOINING TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING HANGWEI JOINING TECHNOLOGY CO LTD
Filing Date
2022-03-15
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing methods for measuring short-end thread require extensive manual operation, are time-consuming, and have low measurement accuracy, making them unsuitable for mass production of aerospace fasteners.

Method used

The measurement system, consisting of an industrial camera, light source, rotary table, servo motor and computer, automatically identifies the thread profile and nominal interlayer by acquiring and analyzing the projected image of the thread end, thus realizing the automatic measurement of the thread end length.

Benefits of technology

It improves the efficiency and accuracy of thread end length measurement, making it suitable for mass production of aerospace fasteners.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116793223B_ABST
    Figure CN116793223B_ABST
Patent Text Reader

Abstract

The application provides a thread tail length measurement method, system and device, the method comprising: collecting a thread tail part projection image at an initial position; determining a tracking thread tooth based on the thread tail part projection image at the initial position; collecting a thread tail part projection image during rotation, and obtaining a first tooth profile height of the tracking thread tooth according to the thread tail part projection image during rotation; if it is determined that the tooth profile height is reversed according to the first tooth profile height and a preset tooth profile height, and the absolute value of the difference between the first tooth profile height and the preset tooth profile height is less than or equal to a tolerance value, then a to-be-measured image is obtained; identifying a complete thread tooth closest to a nominal interlayer and an end of the nominal interlayer from the to-be-measured image; and obtaining a thread tail length according to the tooth base of the complete thread tooth closest to the nominal interlayer and the end of the nominal interlayer. The thread tail length measurement method, system and device provided by the embodiment of the application improve the measurement efficiency and measurement accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of aerospace parts measurement technology, specifically to a method, system, and device for measuring the end length of a thread. Background Technology

[0002] Short-tailed threads are a type of structure used in aerospace fasteners and are now widely applied in aircraft structures. Their characteristic is that by shortening the length of the area where the thread meets the polished shank (i.e., the thread tail), the amount of material used in the fastener is reduced, thereby lowering the weight of the component.

[0003] The tail length of short-tailed threads is a crucial factor in determining whether the dimensions of aerospace fasteners meet standards, and it must be measured during the manufacturing and acceptance processes. Due to the inherent characteristics of short-tailed threads, the tail length cannot usually be directly measured using general measuring tools. The common method in existing technology is to use specialized tooling and perform the measurement on a video measuring instrument. This process requires manually rotating the target thread (along the axis) and observing the changes in the thread profile in real time. The rotation angle is then repeatedly adjusted based on a comparison of the actual thread profile with the standard profile to determine the starting position of the complete thread profile before measuring the tail length. This method requires extensive manual operation, is time-consuming, and has low measurement accuracy, making it unsuitable for the mass production of aerospace fasteners. Summary of the Invention

[0004] To address the problems in the prior art, embodiments of the present invention provide a method, system, and apparatus for measuring the thread termination length, which can at least partially solve the problems existing in the prior art.

[0005] On the one hand, this invention proposes a method for measuring the thread termination length, including:

[0006] Acquire a projection image of the thread termination portion at the initial position of the workpiece to be tested; wherein the workpiece to be tested is placed on a rotary table;

[0007] Based on the projection image of the thread end portion at the initial position of the workpiece under test, the tracking thread teeth are determined;

[0008] A projection image of the thread termination portion of the workpiece under test during rotation is acquired, and the first tooth profile height of the tracking thread tooth is obtained based on the projection image of the thread termination portion of the workpiece under test during rotation; wherein, the projection image of the thread termination portion during rotation is acquired when the workpiece under test is rotated under the drive of the rotary table.

[0009] If it is determined that the tooth profile height is reversed based on the first tooth profile height and the preset tooth profile height of the tracking thread, and the absolute value of the difference between the first tooth profile height and the preset tooth profile height of the tracking thread is less than or equal to the tolerance value, then the corresponding projection image of the thread tail section during rotation is obtained as the image to be measured.

[0010] Identify the complete thread closest to the nominal sandwich and the end of the nominal sandwich from the image to be measured;

[0011] The thread termination length of the workpiece under test is obtained based on the root of the complete thread closest to the nominal interlayer and the end of the nominal interlayer.

[0012] On the other hand, the present invention provides a thread termination length measurement system employing the thread termination length measurement method described in any of the above embodiments, comprising an industrial camera, a light source, a rotary table, a servo motor, and a computer, wherein:

[0013] The computer is communicatively connected to the industrial camera and the servo motor respectively. The rotary table is used to place the workpiece to be tested. The servo motor is used to drive the rotary table to rotate. The industrial camera is used to acquire the projected image of the thread end of the workpiece to be tested placed on the rotary table. The light source is used to provide illumination when the industrial camera acquires the projected image of the thread end of the workpiece to be tested.

[0014] The computer is used to measure the thread termination length of the workpiece based on the projected image of the thread termination portion of the workpiece being tested.

[0015] In another aspect, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the thread end length measurement method described in any of the above embodiments.

[0016] In another aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the thread termination length measurement method described in any of the above embodiments.

[0017] The thread termination length measurement method, system, and apparatus provided in this invention can acquire a projection image of the thread termination portion at the initial position of the workpiece to be measured. Based on the projection image of the thread termination portion at the initial position of the workpiece to be measured, a tracking thread tooth is determined. A projection image of the thread termination portion during rotation of the workpiece to be measured is acquired, and the first tooth profile height of the tracking thread tooth is obtained based on the projection image of the thread termination portion during rotation of the workpiece to be measured. If it is known from the first tooth profile height of the tracking thread tooth and the preset tooth profile height that the tooth profile height is reversed, and the absolute value of the difference between the first tooth profile height of the tracking thread tooth and the preset tooth profile height is less than or equal to the tolerance value, then the corresponding projection image of the thread termination portion during rotation is obtained as the image to be measured. The complete thread tooth closest to the nominal interlayer and the end of the nominal interlayer are identified from the image to be measured. Based on the root of the complete thread tooth closest to the nominal interlayer and the end of the nominal interlayer, the thread termination length of the workpiece to be measured is obtained, realizing automatic measurement of the thread termination length of the workpiece to be measured, and improving the measurement efficiency and accuracy of the thread termination length. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:

[0019] Figure 1 This is a schematic diagram of the thread termination part provided in the first embodiment of the present invention.

[0020] Figure 2 This is a schematic diagram of the structure of the thread termination length measurement system provided in the second embodiment of the present invention.

[0021] Figure 3 This is a flowchart illustrating the method for measuring the thread termination length provided in the third embodiment of the present invention.

[0022] Figure 4 This is a flowchart illustrating the method for measuring the thread termination length provided in the fourth embodiment of the present invention.

[0023] Figure 5 This is a schematic diagram of feature point extraction provided in the fifth embodiment of the present invention.

[0024] Figure 6 This is a flowchart illustrating the method for measuring the thread termination length provided in the sixth embodiment of the present invention.

[0025] Figure 7 This is a flowchart illustrating the method for measuring the thread termination length provided in the seventh embodiment of the present invention.

[0026] Figure 8 This is a flowchart illustrating the method for measuring the thread termination length provided in the eighth embodiment of the present invention.

[0027] Figure 9 This is a schematic diagram illustrating the identification of the reference position of the nominal interlayer provided in the ninth embodiment of the present invention.

[0028] Figure 10 This is a flowchart illustrating the method for measuring the thread termination length provided in the tenth embodiment of the present invention.

[0029] Figure 11 This is a schematic diagram of the structure of the thread end length measuring device provided in the eleventh embodiment of the present invention.

[0030] Figure 12 This is a schematic diagram of the physical structure of the electronic device provided in the twelfth embodiment of the present invention. Detailed Implementation

[0031] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Here, the illustrative embodiments and descriptions of the present invention are used to explain the present invention, but are not intended to limit the present invention. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other.

[0032] Figure 1 This is a schematic diagram of the structure of the thread termination part provided in the first embodiment of the present invention, as shown below. Figure 1 As shown, the thread end is located between the nominal interlayer and the last root of the complete thread. The thread end length can be obtained by calculating the distance along the thread axis between the endpoint of the nominal interlayer and the last root of the complete thread.

[0033] Figure 2 This is a schematic diagram of the structure of the thread termination length measurement system provided in the second embodiment of the present invention, as shown below. Figure 2 As shown, the thread end length measurement system provided in this embodiment of the invention includes an industrial camera 1, a light source 2, a rotary table 3, a servo motor 4, and a computer (not shown in the figure), wherein:

[0034] The computer is communicatively connected to the industrial camera 1 and the servo motor 4. The rotary table 3 is used to place the workpiece 6 to be tested, the servo motor 4 is used to drive the rotary table 3 to rotate, the industrial camera 1 is used to acquire the projection image of the thread end of the workpiece 6 placed on the rotary table 3, and the light source 2 is used to provide illumination when the industrial camera 1 acquires the projection image of the thread end of the workpiece.

[0035] The computer is capable of executing the thread termination length measurement method provided in this embodiment of the invention to measure the thread termination length of the workpiece to be measured.

[0036] It is understood that the workpiece to be tested in the embodiments of the present invention is a workpiece for which the thread end length needs to be measured, including but not limited to aerospace fasteners.

[0037] To ensure the accuracy of the measured structure, a high-resolution digital industrial camera can be used, such as the SVCam-hr29050 model, with a resolution of 29 megapixels, a horizontal / vertical resolution of 6576×4384, and a horizontal / vertical pixel size of 5.5×5.5μm. The lens 11 of the industrial camera can be a telecentric lens with a field of view of 36×24mm. 2 The light source can be a telecentric light source of model TC16M036, with a field of view of 36×24mm. 2 The computer and industrial camera 1 can be connected via a Gigabit Ethernet (GigE) network interface. The computer is equipped with image processing software, such as NI vision software, which can be configured according to actual needs; this embodiment of the invention does not impose limitations.

[0038] Specifically, when the industrial camera 1 acquires images of the workpiece under test, the workpiece can be placed in the center of the rotary table 3. The threaded end of the workpiece should be within the effective field of view of the lens of the industrial camera 1.

[0039] Industrial camera 1 can acquire projected images of the threaded end portion of the workpiece when it is stationary on the rotary table 3, serving as the initial position projection image of the threaded end portion of the workpiece. It can also acquire projected images of the threaded end portion when the rotary table 3 rotates the workpiece. Industrial camera 1 sends both the initial and rotating projection images of the threaded end portion to a computer. When industrial camera 1 acquires images, light source 2 is turned on, and the illumination direction of light source 2 is opposite to the lens direction of industrial camera 1. This results in a significant difference between the background and the workpiece in the acquired threaded end portion projection image, facilitating subsequent identification of the workpiece's outline in the image. To ensure measurement accuracy, the vertical runout of any point on the upper surface of the rotary table 3 during rotation needs to be controlled within a preset value, such as 0.02 mm. This preset value can be set according to actual needs, and this embodiment of the invention does not impose limitations.

[0040] The computer can send a start command to the servo motor 4 to make the servo motor 4 start rotating, and at the same time drive the rotary table 3 to rotate; during the rotation of the servo motor 4, the computer can send a reverse rotation command to the servo motor 4. After receiving the reverse rotation command, the servo motor 4 will change its rotation direction, thereby driving the rotary table 3 to change its rotation direction.

[0041] like Figure 2 As shown, based on the above embodiments, the thread end length measurement system provided in this embodiment of the invention further includes a light shield 5. The light shield 5 is used to block external light when the industrial camera 1 acquires the projected image of the thread end part of the workpiece to be measured, so as to avoid the influence of external light on image acquisition and improve the image quality of the acquired projected image of the thread end part.

[0042] The following example, using a computer as the execution subject, illustrates the implementation process of the thread termination length measurement method provided in this embodiment of the invention.

[0043] Figure 3 This is a flowchart illustrating the method for measuring the thread termination length provided in the third embodiment of the present invention, as shown below. Figure 3 As shown, the method for measuring the thread termination length provided in this embodiment of the invention includes:

[0044] S301. Acquire a projection image of the thread termination portion at the initial position of the workpiece to be tested; wherein the workpiece to be tested is placed on a rotary table.

[0045] Specifically, a computer can use an industrial camera to acquire a projected image of the thread termination at the initial position of the workpiece under test. The workpiece is placed on a rotary table, and the lens of the industrial camera is aimed at it, ensuring the thread termination is within the effective field of view. While the workpiece remains stationary on the rotary table, the light source is turned on, and the industrial camera acquires an image. This acquired image is then sent to the computer, which uses the received image as the projected image of the thread termination at the initial position of the workpiece. This projected image of the thread termination includes the nominal interlayer, the thread termination itself, and multiple thread teeth.

[0046] S302. Based on the projection image of the thread end portion at the initial position of the workpiece to be tested, determine the tracking thread teeth;

[0047] Specifically, after obtaining the initial position of the thread termination projection image, the computer performs image recognition on the initial position of the thread termination projection image of the workpiece under test, identifies the thread profile outline in the image, and further identifies complete thread teeth. From the identified complete thread teeth, one complete thread tooth is selected as the tracking thread tooth. The tracking thread tooth can be selected from the side closest to the thread termination.

[0048] S303. Acquire a projection image of the thread termination portion of the workpiece under test during rotation, and obtain the first tooth profile height of the tracking thread based on the projection image of the thread termination portion of the workpiece under test during rotation; wherein, the projection image of the thread termination portion during rotation is acquired when the workpiece under test rotates under the drive of the rotary table.

[0049] Specifically, after obtaining the tracking thread, the computer can acquire a projected image of the thread termination portion of the workpiece under test during rotation using an industrial camera. The computer can send a start command to the servo motor, which drives the rotary table to rotate, causing the workpiece under test placed on the rotary table to rotate accordingly. The industrial camera can continuously acquire images of the workpiece under test and send the acquired images to the computer. The computer will use the received images as the projected images of the thread termination portion of the workpiece under test during rotation. For each projected image of the thread termination portion of the workpiece under test during rotation, the computer can obtain the first tooth profile height of the tracking thread based on the projected image of the thread termination portion of the workpiece under test during rotation.

[0050] The rotation speed of the rotary table is set according to actual needs, and this embodiment of the invention does not limit it. For example, the rotation speed of the rotary table is greater than or equal to 2 r / min and less than or equal to 4 r / min. The sampling interval when acquiring images of the workpiece under test is set according to actual needs, and this embodiment of the invention does not limit it. The rotation direction of the rotary table will cause the projection of the thread teeth of the workpiece under test to "move" towards the end of the thread. That is, if the rotary table is placed horizontally, the threaded side of the workpiece under test is facing down, and it is placed in the center of the rotary table perpendicular to the upper surface of the rotary table, then the rotary table will rotate counterclockwise, causing the workpiece under test to rotate together, and the projection of the thread teeth of the workpiece under test will appear to "move" towards the end of the thread during rotation.

[0051] S304. If it is determined that the tooth profile height is reversed based on the first tooth profile height and the preset tooth profile height of the tracking thread, and the absolute value of the difference between the first tooth profile height and the preset tooth profile height of the tracking thread is less than or equal to the tolerance value, then the corresponding projection image of the thread tail section during rotation is obtained as the image to be measured.

[0052] Specifically, due to the sampling interval, the first tooth profile height of the tracking thread will change. When the first tooth profile height of the tracking thread changes from greater than a preset tooth profile height to less than or equal to a preset tooth profile height, or changes from less than or equal to a preset tooth profile height to greater than a preset tooth profile height, it indicates a tooth profile height reversal. At this time, the absolute value of the difference between the first tooth profile height of the tracking thread after the tooth profile height reversal and the preset tooth profile height is calculated. This absolute value is compared with a tolerance value. If the absolute value is less than or equal to the tolerance value, then the projection image of the thread termination portion during rotation corresponding to the first tooth profile height corresponding to the absolute value is used as the image to be measured. The image to be measured is used to measure the thread termination length of the workpiece to be measured. The projection image of the thread termination portion during rotation corresponding to the first tooth profile height corresponding to the absolute value is the projection image of the thread termination portion during rotation when the first tooth profile height is obtained. The preset tooth profile height is set according to actual needs, such as according to the standard of the thread to be measured; this embodiment of the invention does not limit this setting. The tolerance value is a positive number and is set according to actual needs; this embodiment of the invention does not limit this setting.

[0053] For example, when determining the tracking thread, the first tooth profile height of the tracking thread will be greater than the preset tooth profile height. When the workpiece under test just starts to rotate, the first tooth profile height of the tracking thread obtained from the projection image of the thread end part during the rotation of the workpiece under test is also greater than the preset tooth profile height. As the rotation continues, due to the existence of the sampling interval, the first tooth profile height of the tracking thread obtained from the projection image of the thread end part during a certain sampling will be less than the preset tooth profile height. At this time, the absolute value 'a' of the difference between the first tooth profile height of the tracking thread obtained in this sampling and the preset tooth profile height is calculated. The absolute value 'a' is compared with the tolerance value 'δ'. If the absolute value 'a' is less than or equal to the tolerance value 'δ', then the projection image of the thread end part during the rotation of the aforementioned sampling is taken as the image to be measured. If the absolute value a is less than or equal to the tolerance value δ, the computer will send a reverse rotation command to the servo motor. The servo motor will drive the rotary table to rotate in the opposite direction, causing the workpiece to be tested to rotate in the opposite direction. The workpiece image acquisition will continue. The first tooth profile height of the tracking thread is obtained by projecting the image of the thread end part of the workpiece during rotation. The tooth profile height reversal judgment will continue until the image to be measured is obtained.

[0054] S305. Identify the complete thread closest to the nominal interlayer and the end of the nominal interlayer from the image to be measured;

[0055] Specifically, the computer can identify complete thread teeth from the image to be measured, and select the complete thread tooth closest to the nominal interlayer as the closest complete thread tooth to the nominal interlayer. The computer can identify the reference line of the nominal interlayer from the image to be measured, and then obtain the end of the nominal interlayer through the root of the complete thread tooth closest to the nominal interlayer and the reference line of the nominal interlayer. The specific identification process of the complete thread tooth closest to the nominal interlayer and the end of the nominal interlayer is detailed below and will not be repeated here.

[0056] S306. Obtain the thread termination length of the workpiece to be tested based on the root of the complete thread closest to the nominal interlayer and the end of the nominal interlayer.

[0057] Specifically, the computer calculates the pixel distance along the thread axis between the root of the complete thread closest to the nominal interlayer and the end of the nominal interlayer, and then converts the obtained pixel distance into an actual distance, which is used as the thread end length of the workpiece to be tested.

[0058] The thread termination length measurement method provided in this invention can acquire a projection image of the thread termination portion at the initial position of the workpiece to be measured. Based on the projection image of the thread termination portion at the initial position of the workpiece to be measured, a tracking thread tooth is determined. A projection image of the thread termination portion during the rotation of the workpiece to be measured is acquired, and the first tooth profile height of the tracking thread tooth is obtained based on the projection image of the thread termination portion during the rotation of the workpiece to be measured. If it is known from the first tooth profile height of the tracking thread tooth and the preset tooth profile height that the tooth profile height is reversed, and the absolute value of the difference between the first tooth profile height of the tracking thread tooth and the preset tooth profile height is less than or equal to the tolerance value, then the corresponding projection image of the thread termination portion during rotation is obtained as the image to be measured. The complete thread tooth closest to the nominal interlayer and the end of the nominal interlayer are identified from the image to be measured. Based on the root of the complete thread tooth closest to the nominal interlayer and the end of the nominal interlayer, the thread termination length of the workpiece to be measured is obtained, realizing automatic measurement of the thread termination length of the workpiece to be measured, improving measurement efficiency and measurement accuracy.

[0059] Figure 4 This is a flowchart illustrating the method for measuring the thread termination length provided in the fourth embodiment of the present invention, as shown below. Figure 4 As shown, based on the above embodiments, further, determining the tracking thread teeth based on the projected image of the thread termination portion at the initial position of the workpiece to be tested includes:

[0060] S401. Extract the first thread profile from the projection image of the thread termination portion at the initial position;

[0061] Specifically, the computer can extract the first thread profile contour from the projected image of the thread termination portion at the initial position using edge detection technology. In the projected image of the thread termination portion at the initial position, the first thread profile contour is a set of connected edge pixels. Because illumination is provided by a light source when acquiring the projected image of the thread termination portion at the initial position, the background of the projected image of the thread termination portion at the initial position differs significantly from the first thread profile contour in the image. The edge detection algorithm is used to measure grayscale changes in the image and extract discontinuous grayscale features. The grayscale values ​​of the pixels on the first thread profile contour are discontinuous with those of the adjacent background pixels.

[0062] For example, NI Vision software can be used with edge detection technology to extract the first thread profile from the projected image of the thread termination at the initial position. NI Vision software is a built-in vision development toolkit in LabVIEW, providing various subroutines needed to develop machine vision systems on the LabVIEW platform, such as image acquisition, system calibration, image processing, and geometric measurement.

[0063] S402. Extract feature points from the search area corresponding to the first thread profile to obtain multiple first edge points;

[0064] Specifically, after obtaining the first thread profile contour, the computer divides the image region including the first thread profile contour from the projected image of the thread termination portion at the initial position as the search region corresponding to the first thread profile contour. Feature point extraction is performed on the search region corresponding to the first thread profile contour; that is, in the direction perpendicular to the thread centerline, pixels with pixel values ​​greater than the grayscale difference threshold are searched as first edge points, and multiple first edge points can be obtained. The search region corresponding to the first thread profile contour is selected according to actual needs, and this embodiment of the invention does not impose any limitations. The grayscale difference threshold is set according to actual needs, and this embodiment of the invention does not impose any limitations.

[0065] For example, feature points can be extracted using the rectangular rake tool in NI vision software. Figure 5 As shown, the workpiece to be tested is black in the image, and the background is white, making the workpiece clearly distinguishable from the background. The search area corresponding to the first thread profile is... Figure 5 Within the rectangular region, the grayscale values ​​of pixels are searched along multiple lines perpendicular to the center line. Pixels with grayscale values ​​greater than the grayscale difference threshold are selected as the first edge points. Figure 5 Within the rectangular region, there are multiple rectangular rakes. The search step size of each rake determines the thickness of the first edge point. The search step is set based on practical experience, and this embodiment of the invention does not impose any limitations. For example, the search step size can be set to 1 pixel.

[0066] S403. Obtain the peaks and troughs of the first thread profile based on the plurality of first edge points;

[0067] Specifically, the computer can detect multiple peaks and troughs from the plurality of first edge detection points, which serve as the peaks and troughs of the first thread profile. A peak is considered the crest of the thread, and a trough is considered the root of the thread.

[0068] For example, the Peak-Valley detection tool in NI vision software can be used to calculate the second derivative of each first edge point, obtaining the second derivative of the first edge point. If the second derivative of the first edge point is positive and... Figure 5 The middle edge is obtained by searching from bottom to top (from black at the bottom to white at the top), then the first edge point is a trough; if the second derivative of the first edge point is negative, and... Figure 5 The middle point is obtained by searching from top to bottom (from white at the top to black at the bottom), so the second edge point is the peak.

[0069] S404. Obtain multiple second profile heights based on adjacent peaks and troughs of the first thread profile.

[0070] Specifically, the computer calculates the pixel distance between each adjacent peak and trough of the first thread profile in a direction perpendicular to the thread centerline on the image, and then converts the pixel distance into actual distance to obtain multiple second thread profile heights. Each second thread profile height corresponds to the pixel distance between adjacent peaks and troughs in a direction perpendicular to the thread centerline.

[0071] S405. Obtain the thread tooth corresponding to the peak of a second tooth profile height that is greater than the preset tooth profile height, and use it as the tracking thread tooth.

[0072] Specifically, the computer compares each second tooth profile height with a preset tooth profile height to obtain a second tooth profile height greater than the preset tooth profile height. From the peaks corresponding to the second tooth profile heights greater than the preset tooth profile height, a thread tooth corresponding to a peak is selected as the tracking thread tooth. Here, the thread tooth corresponding to the peak refers to the thread tooth in the projection image of the thread termination portion at the initial position. Thread teeth with second tooth profile heights greater than the preset tooth profile height are complete thread teeth.

[0073] Figure 6 This is a flowchart illustrating the method for measuring the thread termination length provided in the sixth embodiment of the present invention, as shown below. Figure 6 As shown, based on the above embodiments, further, obtaining the first tooth profile height of the tracking thread tooth based on the projection image of the thread termination portion during the rotation of the workpiece to be tested includes:

[0074] S601. Extract the second thread profile from the projection image of the thread end portion during rotation.

[0075] Specifically, the computer can extract the second thread profile contour from the projected image of the thread termination portion during rotation using edge detection technology. The specific extraction process of the second thread profile contour is similar to the extraction process of the first thread profile contour in step S401, and will not be described in detail here.

[0076] S602. Extract feature points from the search area corresponding to the second thread profile to obtain multiple second edge points;

[0077] Specifically, after obtaining the second thread profile contour, the computer divides the image region including the second thread profile contour from the projected image of the thread tail portion during rotation as the search region corresponding to the second thread profile contour. Feature point extraction is performed on the search region corresponding to the second thread profile contour to obtain multiple second edge points. The search region corresponding to the second thread profile contour is selected according to actual needs, and this embodiment of the invention does not impose any limitations. The grayscale difference threshold is set according to actual needs, and this embodiment of the invention does not impose any limitations. The specific process of obtaining the second edge points is similar to the process of obtaining the first edge points in step S402, and will not be described in detail here.

[0078] S603. Obtain the peaks and troughs of the second thread profile based on the plurality of second edge points;

[0079] Specifically, the computer can detect multiple peaks and troughs from the plurality of first edge detection points, which serve as the peaks and troughs of the first thread profile. The specific process for obtaining the peaks and troughs of the second thread profile is similar to the process for obtaining the peaks and troughs of the first thread profile in step S403, and will not be described in detail here.

[0080] S604. Based on the peaks and troughs of the tracking thread tooth and the second thread profile, obtain the peaks and troughs corresponding to the tracking thread tooth;

[0081] Specifically, since the projection image of the thread tail portion at the initial position and the projection image of the thread tail portion during rotation use the same resolution, the position of the tracking thread tooth in the projection image of the thread tail portion at the initial position can be determined in the projection image of the thread tail portion during rotation by the position of the tracking thread tooth in the projection image of the thread tail portion during rotation. Based on the position of the thread tooth in the projection image of the thread tail portion during rotation, a peak and a trough of the second thread profile can be obtained as the peak and trough corresponding to the tracking thread tooth.

[0082] S605. Obtain the first tooth profile height of the tracking thread tooth based on the peaks and troughs corresponding to the tracking thread tooth.

[0083] Specifically, the computer calculates the pixel distance between the peaks and troughs corresponding to the tracking thread tooth in the image, in a direction perpendicular to the thread centerline, and then converts the pixel distance into the actual distance to obtain the first tooth profile height of the tracking thread tooth.

[0084] Figure 7 This is a flowchart illustrating the method for measuring the thread termination length provided in the seventh embodiment of the present invention, as shown below. Figure 7 As shown, based on the above embodiments, further identifying the complete thread closest to the nominal interlayer from the image to be measured includes:

[0085] S701. Extract the third thread profile from the image to be measured;

[0086] Specifically, the computer can extract the third thread profile contour from the image to be measured using edge detection technology. The specific extraction process of the third thread profile contour is similar to the extraction process of the first thread profile contour in step S401, and will not be described in detail here.

[0087] S702. Extract feature points from the search area corresponding to the third thread profile to obtain multiple third edge points;

[0088] Specifically, after obtaining the third thread profile contour, the computer divides the image region including the third thread profile contour from the image to be measured as the search region corresponding to the third thread profile contour. Feature point extraction is performed on the search region corresponding to the third thread profile contour to obtain multiple third edge points. The search region corresponding to the third thread profile contour is selected according to actual needs, and this embodiment of the invention does not impose any limitations. The grayscale difference threshold is set according to actual needs, and this embodiment of the invention does not impose any limitations. The specific process of obtaining the third edge points is similar to the process of obtaining the first edge points in step S402, and will not be described in detail here.

[0089] S703. Obtain the peaks and troughs of the third thread profile based on the plurality of third edge points;

[0090] Specifically, the computer can detect multiple peaks and troughs from the plurality of third edge detection points, which serve as the peaks and troughs of the third thread profile. The specific process of obtaining the peaks and troughs of the third thread profile is similar to the process of obtaining the peaks and troughs of the first thread profile in step S403, and will not be described in detail here.

[0091] S704. Based on the adjacent peaks and troughs of the third thread profile, obtain multiple third thread profile heights;

[0092] Specifically, the computer calculates the pixel distance between each adjacent peak and trough of the third thread profile in a direction perpendicular to the thread centerline on the image, and then converts the pixel distance into actual distance to obtain multiple third thread profile heights. Each third thread profile height corresponds to the pixel distance between adjacent peaks and troughs in a direction perpendicular to the thread centerline.

[0093] S705. Obtain the thread tooth corresponding to the peak of the third tooth profile height that is greater than the preset tooth profile height and is closest to the nominal interlayer, and use it as the complete thread tooth closest to the nominal interlayer.

[0094] Specifically, the computer compares each third tooth profile height with the preset tooth profile height to obtain a third tooth profile height that is greater than the preset tooth profile height. From the peaks corresponding to the third tooth profile heights that are greater than the preset tooth profile height, the computer selects the thread tooth corresponding to the peak closest to the nominal interlayer side as the complete thread tooth closest to the nominal interlayer.

[0095] Figure 8 This is a flowchart illustrating the method for measuring the thread termination length provided in the eighth embodiment of the present invention, as shown below. Figure 8 As shown, based on the above embodiments, further identifying the end of the nominal interlayer from the image to be measured includes:

[0096] S801. Identify the reference position of the nominal interlayer from the nominal interlayer reference position detection area in the image to be measured;

[0097] Specifically, a reference position for the nominal interlayer exists in the image to be measured, and a reference position detection area for the nominal interlayer can be pre-set in the image. The computer can identify the reference position of the nominal interlayer from the reference position detection area in the image to be measured. The entire image to be measured can be used as the reference position detection area; however, to improve detection efficiency, the position of the reference position of the nominal interlayer in the image to be measured can be estimated, and a portion of the image including the reference position of the nominal interlayer can be selected as the reference position detection area.

[0098] For example, such as Figure 9 As shown in the figure, the rectangular area is the nominal sandwich reference position detection area. The rectangular rake tool of NI vision software can be used to search for the edge points of the rectangular area from left to right. The least squares method is used to fit the edge points obtained by the search to the line segments. The location of the first line segment with a length greater than the preset length is the reference position of the nominal sandwich. The location of the line segment in the rectangular area is the reference position of the identified nominal sandwich.

[0099] S802. Starting from the root of the complete thread closest to the nominal interlayer, search for edge points in the direction of the reference position of the nominal interlayer;

[0100] Specifically, the thread pitch is known, and the horizontal distance between the crest and root of the thread is half the pitch. After obtaining the complete thread closest to the nominal interlayer, the computer determines the root of the complete thread closest to the nominal interlayer by using the crest (i.e., the tooth crest) of the complete thread closest to the nominal interlayer and the horizontal distance between the tooth crest and root. Starting from the root of the complete thread closest to the nominal interlayer, an edge point is searched towards the reference position of the nominal interlayer, and the pixel distance between the searched edge point and the reference position of the nominal interlayer along the thread axis is calculated and converted into an actual distance, which is used as the distance between the edge point and the reference position of the nominal interlayer.

[0101] For example, the rectangle rake tool in NI vision software can be used to search for edge points.

[0102] S803. If it is determined that the distance between the edge point and the reference position of the nominal interlayer matches the length of the nominal interlayer, then the edge point is taken as the end of the nominal interlayer.

[0103] Specifically, after the computer searches for each edge point and obtains the actual distance between the edge point and the reference position of the nominal interlayer, it determines whether the distance between the edge point and the reference position of the nominal interlayer matches the length of the nominal interlayer. If the absolute value of the difference between the distance between the edge point and the reference position of the nominal interlayer and the length of the nominal interlayer is less than a set value, then the distance between the edge point and the reference position of the nominal interlayer matches the length of the nominal interlayer, and the edge point can be used as the end of the nominal interlayer. The length of the nominal interlayer is preset. The set value is set according to actual needs, and this embodiment of the invention does not impose limitations.

[0104] Based on the above embodiments, the step of determining the tooth profile height reversal based on the first tooth profile height and the preset tooth profile height of the tracking thread includes:

[0105] If it is determined that the current first tooth profile height of the tracking thread is less than or equal to the preset tooth profile height, and the previous first tooth profile height of the tracking thread is greater than the preset tooth profile height, then the tooth profile height is reversed; or

[0106] If it is determined that the current first tooth profile height of the tracking thread is greater than the preset tooth profile height, and the previous first tooth profile height of the tracking thread is less than or equal to the preset tooth profile height, then the tooth profile height is reversed.

[0107] Specifically, the computer obtains the first tooth profile height of the tracking thread tooth based on the projected image of the thread termination portion during the rotation of the workpiece under test. Since the projected images of the thread termination portion during rotation are continuously acquired, the corresponding first tooth profile height of the tracking thread tooth is obtained for each acquired image. Each time the computer obtains the first tooth profile height of a tracking thread tooth, it compares the first tooth profile height with the preset tooth profile height and records the comparison result. There are two possible comparison results: the first tooth profile height is less than the preset tooth profile height, or the first tooth profile height is greater than or equal to the preset tooth profile height.

[0108] The computer currently obtains the first tooth profile height of the tracking thread as the current first tooth profile height of the tracking thread, and the previously obtained first tooth profile height of the tracking thread is the previous first tooth profile height of the tracking thread. If the current first tooth profile height of the tracking thread is less than the preset tooth profile height, and the previous first tooth profile height of the tracking thread is greater than or equal to the preset tooth profile height, it indicates that the first tooth profile height has changed from less than the preset tooth profile height to greater than or equal to the preset tooth profile height, and therefore, a tooth profile height reversal is determined. If the current first tooth profile height of the tracking thread is greater than or equal to the preset tooth profile height, and the previous first tooth profile height of the tracking thread is less than the preset tooth profile height, it indicates that the first tooth profile height has changed from greater than or equal to the preset tooth profile height to less than the preset tooth profile height, and therefore, a tooth profile height reversal is determined.

[0109] Based on the above embodiments, the method for measuring the thread termination length provided in this embodiment of the invention further includes:

[0110] If it is determined from the first tooth profile height and the preset tooth profile height of the tracking thread that the tooth profile height is reversed, and the absolute value of the difference between the first tooth profile height and the preset tooth profile height of the tracking thread is greater than the tolerance value, then a reverse rotation command is sent to cause the rotary table to drive the workpiece to be tested to rotate in the reverse direction.

[0111] Specifically, if the computer determines that the tooth profile height has reversed based on the first tooth profile height and the preset tooth profile height of the tracking thread, then it calculates the absolute value of the difference between the first tooth profile height and the preset tooth profile height of the tracking thread after the tooth profile height has reversed, compares the absolute value with the tolerance value, and if the absolute value is greater than the tolerance value, then the computer sends a reverse rotation command to the servo motor, and the servo motor drives the rotary table to rotate in the reverse direction, thereby causing the workpiece to be tested to rotate in the reverse direction.

[0112] Based on the above embodiments, the method for measuring the thread termination length provided in this embodiment of the invention further includes:

[0113] Each time the rotating worktable drives the workpiece to be tested to rotate in the opposite direction, the speed of the reverse rotation decreases to 1 / n of the speed of the previous rotation; where n is a positive number greater than 1.

[0114] Specifically, the rotary table drives the workpiece under test to rotate in the opposite direction in order to obtain a projected image of the thread termination point during rotation when the absolute value of the difference between the first tooth profile height and the preset tooth profile height is less than or equal to the tolerance value, which serves as the image to be measured. When the rotary table drives the workpiece under test to rotate in the opposite direction, the reverse rotation speed can be reduced to obtain the image to be measured. Each time the rotary table drives the workpiece under test to rotate in the opposite direction, the reverse rotation speed can be reduced to 1 / n of the previous rotation speed. n is set according to actual needs, and this embodiment of the invention does not limit it.

[0115] For example, if n is set to 2, each time the rotation is reversed, the speed of the reverse rotation decreases to 1 / 2 of the speed of the previous rotation.

[0116] The following example, using the thread termination length measurement system provided in this embodiment of the invention to measure the thread termination length of a short-terminal type thread of an aerospace fastener, illustrates the specific implementation process of the thread termination length measurement method provided in this embodiment of the invention.

[0117] Before measurement, place the aerospace fastener in the center of the rotary table 3. Turn on the light source 2 and pull up the light shield 5.

[0118] Figure 10 This is a flowchart illustrating the method for measuring the thread termination length provided in the tenth embodiment of the present invention, as shown below. Figure 10 As shown, the measurement procedure for the thread termination length of aerospace fasteners is as follows:

[0119] Step 1: Acquire the projected image of the thread termination at the initial position. With the rotary table 3 stationary, the industrial camera 1 acquires an image of the aerospace fastener, obtaining a projected image of the thread termination at the initial position of the aerospace fastener, and then sends this projected image to the computer.

[0120] The second step is to determine the tracking thread. The computer determines the tracking thread based on the projected image of the thread termination at the initial position of the aerospace fastener.

[0121] The third step is to control the rotation of the rotary table. The computer sends a start command to the servo motor 4, causing the servo motor 4 to drive the rotary table 3 to rotate at a preset speed and in a preset direction. The aerospace fastener rotates together with the rotary table 3. The preset rotation speed and preset rotation direction are set according to actual needs, and this embodiment of the invention does not limit them. For example, the preset rotation speed is 3 r / min, and the preset rotation direction is counterclockwise.

[0122] Step 4: Acquire projection images of the threaded end portion during rotation. Industrial camera 1 acquires images of the aerospace fastener at preset time intervals, obtaining projection images of the threaded end portion during rotation, and then sends these projection images to the computer.

[0123] Step 5: Obtain the first tooth profile height. The computer can obtain the first tooth profile height of the tracked thread based on the projected image of the thread termination point during the rotation of the aerospace fastener.

[0124] Step 6: Determine if the tooth profile height is reversed. For each tracked thread tooth whose first tooth profile height is obtained, the computer will determine if the tooth profile height is reversed. If it is determined that the tooth profile height is reversed, proceed to Step 7; otherwise, return to Step 5 and continue to obtain the first tooth profile height of the tracked thread tooth based on the projection image of the thread termination point during the rotation of the aerospace fastener. Specifically, the first tooth profile height of the corresponding tracked thread tooth will be obtained according to the chronological order of the acquisition of the projection images of the thread termination point during the rotation of the empty fastener.

[0125] Step 7: Determine if the tolerance value is met. The computer tracks the absolute value of the difference between the first tooth profile height and the preset tooth profile height of the thread, and then compares the absolute value with the tolerance value. If the absolute value is less than or equal to the tolerance value, it means that the absolute value meets the tolerance value, and proceeds to Step 9. At this time, a stop command can be sent to servo motor 4 to stop servo motor 4 from rotating; if the absolute value is greater than the tolerance value, it means that the absolute value does not meet the tolerance value, and proceeds to Step 8.

[0126] Step 8: Control the rotary table to rotate in the opposite direction. The computer sends a reverse rotation command to servo motor 4, causing servo motor 4 to drive the rotary table 3 to rotate in the opposite direction. At this time, the reverse rotation speed is half of the previous rotation speed. The aerospace fastener will rotate in the opposite direction along with the rotary table 3.

[0127] Step 9: Obtain the image to be measured. Calculate the projection image of the thread termination portion of the aerospace fastener during rotation, corresponding to the first tooth profile height of the tracking thread tooth, which is less than or equal to the tolerance value. This image is used as the image to be measured. The aerospace fastener in the image to be measured is in a boundary projection state, meaning that when the image to be measured is acquired, the first tooth profile height of the tracking thread tooth matches the preset tooth profile height (the absolute value of the difference between the first tooth profile height of the tracking thread tooth and the preset tooth profile height is less than or equal to the tolerance value).

[0128] Step 10: Measure the thread termination length. The computer identifies the complete thread closest to the nominal interlayer and the end of the nominal interlayer from the image to be measured. Then, based on the root of the complete thread closest to the nominal interlayer and the end of the nominal interlayer, the thread termination length of the aerospace fastener can be obtained.

[0129] The thread termination length measurement method provided in this invention achieves a high degree of automation, improving measurement efficiency. The workpiece to be measured is stably positioned and rotated within the thread termination length measurement system. By using a high-precision industrial camera and servo motor, the offset and error generated during the measurement process are minimized, thus improving the measurement accuracy of the thread termination length.

[0130] The thread end length measurement system provided in this invention has a simple structure, is easy to assemble and debug. All components of the thread end length measurement system are commonly used products in mechanical automation, with high technical maturity and a wide range of matching models to choose from.

[0131] Figure 11 This is a schematic diagram of the structure of the thread termination length measuring device provided in the eleventh embodiment of the present invention, as shown below. Figure 11 As shown, the thread end length measuring device provided in this embodiment of the invention includes a data acquisition module 1101, a determination module 1102, a first acquisition module 1103, a judgment module 1104, an identification module 1105, and a second acquisition module 1106, wherein:

[0132] The acquisition module 1101 is used to acquire a projection image of the thread termination portion at the initial position of the workpiece under test; wherein, the workpiece under test is placed on a rotary table; the determination module 1102 is used to determine the tracking thread tooth based on the projection image of the thread termination portion at the initial position of the workpiece under test; the first acquisition module 1103 is used to acquire a projection image of the thread termination portion when the workpiece under test is rotating, and obtain the first tooth profile height of the tracking thread tooth based on the projection image of the thread termination portion when the workpiece under test is rotating; wherein, the projection image of the thread termination portion when rotating is acquired when the workpiece under test is rotated under the drive of the rotary table; The judgment module 1104 is used to determine, based on the first tooth profile height and the preset tooth profile height of the tracking thread, that the tooth profile height is reversed, and the absolute value of the difference between the first tooth profile height and the preset tooth profile height of the tracking thread is less than or equal to the tolerance value, then obtain the corresponding projection image of the thread tail portion during rotation as the image to be measured; the identification module 1105 is used to identify the complete thread closest to the nominal interlayer and the end of the nominal interlayer from the image to be measured; the second obtaining module 1106 is used to obtain the thread tail length of the workpiece to be measured based on the tooth root of the complete thread closest to the nominal interlayer and the end of the nominal interlayer.

[0133] Specifically, the acquisition module 1101 can acquire a projected image of the thread termination portion at the initial position of the workpiece under test using an industrial camera. The workpiece is placed on a rotary table, and the lens of the industrial camera is aimed at the workpiece, ensuring that the thread termination portion is within the effective field of view of the lens. When the workpiece is stationary on the rotary table, the light source is turned on, the industrial camera acquires an image, and sends the acquired image to the acquisition module 1101. The acquisition module 1101 uses the received image as the projected image of the thread termination portion at the initial position of the workpiece under test. This projected image of the thread termination portion includes the nominal interlayer, the thread termination, and multiple thread teeth.

[0134] After obtaining the initial position projection image of the thread termination portion, the determining module 1102 performs image recognition on the initial position projection image of the thread termination portion of the workpiece under test, identifies the thread profile outline in the image, and further identifies complete thread teeth. From the identified complete thread teeth, one complete thread tooth is selected as the tracking thread tooth. The tracking thread tooth can be selected from the side closest to the thread termination.

[0135] After obtaining the tracking thread, the first acquisition module 1103 can acquire a projected image of the thread termination portion of the workpiece under test during rotation using an industrial camera. The first acquisition module 1103 can send a start command to a servo motor, which drives the rotary table to rotate, causing the workpiece under test placed on the rotary table to rotate accordingly. The industrial camera can continuously acquire images of the workpiece under test and send the acquired images to the computer. The first acquisition module 1103 will use the received images as projected images of the thread termination portion of the workpiece under test during rotation. For each projected image of the thread termination portion of the workpiece under test during rotation, the first acquisition module 1103 can obtain the first tooth profile height of the tracking thread based on the projected image.

[0136] Due to the sampling interval, the first tooth profile height of the tracking thread will change. When the first tooth profile height of the tracking thread changes from greater than a preset tooth profile height to less than or equal to a preset tooth profile height, or changes from less than or equal to a preset tooth profile height to greater than a preset tooth profile height, it indicates a tooth profile height reversal. At this time, the judgment module 1104 calculates the absolute value of the difference between the first tooth profile height of the tracking thread after the tooth profile height reversal and the preset tooth profile height, and compares the absolute value with a tolerance value. If the absolute value is less than or equal to the tolerance value, then the projection image of the thread termination portion during rotation corresponding to the first tooth profile height corresponding to the absolute value is used as the image to be measured. The image to be measured is used to measure the thread termination length of the workpiece to be measured. The projection image of the thread termination portion during rotation corresponding to the first tooth profile height corresponding to the absolute value is the projection image of the thread termination portion during rotation when the first tooth profile height is obtained. The preset tooth profile height is set according to actual needs, such as according to the standard of the thread to be measured; this embodiment of the invention does not limit this. The tolerance value is a positive number and is set according to actual needs; this embodiment of the invention does not limit this.

[0137] The identification module 1105 can identify complete thread teeth from the image to be measured, and select the complete thread tooth closest to the nominal interlayer as the closest complete thread tooth to the nominal interlayer. The computer can identify the reference line of the nominal interlayer from the image to be measured, and then obtain the end of the nominal interlayer through the root of the complete thread tooth closest to the nominal interlayer and the reference line of the nominal interlayer. The specific identification process of the complete thread tooth closest to the nominal interlayer and the end of the nominal interlayer is detailed below and will not be repeated here.

[0138] The second obtaining module 1106 calculates the pixel distance along the thread axis between the root of the complete thread tooth closest to the nominal interlayer and the end of the nominal interlayer, and then converts the obtained pixel distance into an actual distance, which is used as the thread end length of the workpiece to be tested.

[0139] The thread termination length measuring device provided in this embodiment of the invention can acquire a projection image of the thread termination portion at the initial position of the workpiece to be measured. Based on the projection image of the thread termination portion at the initial position of the workpiece to be measured, the tracking thread tooth is determined. The device acquires a projection image of the thread termination portion when the workpiece to be measured rotates, and obtains the first tooth profile height of the tracking thread tooth based on the projection image of the thread termination portion when the workpiece to be measured rotates. If it is known from the first tooth profile height of the tracking thread tooth and the preset tooth profile height that the tooth profile height is reversed, and the absolute value of the difference between the first tooth profile height of the tracking thread tooth and the preset tooth profile height is less than or equal to the tolerance value, then the corresponding projection image of the thread termination portion when rotating is obtained as the image to be measured. The device identifies the complete thread tooth closest to the nominal interlayer and the end of the nominal interlayer from the image to be measured. Based on the tooth root of the complete thread tooth closest to the nominal interlayer and the end of the nominal interlayer, the thread termination length of the workpiece to be measured is obtained, thereby realizing the automatic measurement of the thread termination length of the workpiece to be measured and improving the measurement efficiency and measurement accuracy.

[0140] The embodiments of the device provided in this invention can be used to execute the processing flow of the above-described method embodiments. Its functions will not be repeated here, but can be referred to the detailed description of the above-described method embodiments.

[0141] Figure 12 This is a schematic diagram of the physical structure of the electronic device provided in the twelfth embodiment of the present invention, as shown below. Figure 12As shown, the electronic device may include: a processor 1201, a communication interface 1202, a memory 1203, and a communication bus 1204, wherein the processor 1201, the communication interface 1202, and the memory 1203 communicate with each other through the communication bus 1204. The processor 1201 can call logical instructions in the memory 1203 to execute the following methods: acquiring a projection image of the thread termination portion at the initial position of the workpiece under test; wherein the workpiece under test is placed on a rotary table; determining the tracking thread tooth based on the projection image of the thread termination portion at the initial position of the workpiece under test; acquiring a projection image of the thread termination portion at the rotation of the workpiece under test, and obtaining the first tooth profile height of the tracking thread tooth based on the projection image of the thread termination portion at the rotation of the workpiece under test; wherein the projection image of the thread termination portion at the rotation is the first tooth profile height of the tracking thread tooth at the initial position of the workpiece under test. The image is collected when the rotary table rotates. If the tooth profile height is determined to be reversed based on the first tooth profile height and the preset tooth profile height of the tracking thread, and the absolute value of the difference between the first tooth profile height and the preset tooth profile height of the tracking thread is less than or equal to the tolerance value, then the corresponding projection image of the thread tail section during rotation is obtained as the image to be measured. The complete thread closest to the nominal interlayer and the end of the nominal interlayer are identified from the image to be measured. The thread tail length of the workpiece to be measured is obtained based on the tooth root of the complete thread closest to the nominal interlayer and the end of the nominal interlayer.

[0142] Furthermore, the logical instructions in the aforementioned memory 1203 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0143] This embodiment discloses a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, and when the program instructions are executed by the computer, the computer can perform the methods provided in the above-described method embodiments, such as: acquiring a projection image of the thread termination portion at the initial position of the workpiece to be tested; wherein the workpiece to be tested is placed on a rotary table; determining the tracking thread tooth based on the projection image of the thread termination portion at the initial position of the workpiece to be tested; acquiring a projection image of the thread termination portion during rotation of the workpiece to be tested, and obtaining the tracking thread tooth based on the projection image of the thread termination portion during rotation of the workpiece to be tested. The first tooth profile height; wherein, the projection image of the thread termination portion during rotation is acquired when the workpiece under test rotates under the drive of the rotary table; if it is determined that the tooth profile height is reversed based on the first tooth profile height of the tracking thread and the preset tooth profile height, and the absolute value of the difference between the first tooth profile height of the tracking thread and the preset tooth profile height is less than or equal to the tolerance value, then the corresponding projection image of the thread termination portion during rotation is obtained as the image to be measured; the complete thread closest to the nominal interlayer and the end of the nominal interlayer are identified from the image to be measured; the thread termination length of the workpiece under test is obtained based on the tooth root of the complete thread closest to the nominal interlayer and the end of the nominal interlayer.

[0144] This embodiment provides a computer-readable storage medium storing a computer program that causes a computer to execute the methods provided in the above-described method embodiments. For example, the program includes: acquiring a projection image of the thread termination portion at the initial position of a workpiece to be tested; wherein the workpiece to be tested is placed on a rotary table; determining a tracking thread tooth based on the projection image of the thread termination portion at the initial position of the workpiece to be tested; acquiring a projection image of the thread termination portion at the rotational position of the workpiece to be tested, and obtaining a first tooth profile height of the tracking thread tooth based on the projection image of the thread termination portion at the rotational position of the workpiece to be tested; wherein the first tooth profile height of the tracking thread tooth is determined based on the projection image of the thread termination portion at the rotational position of the workpiece to be tested. The projection image of the thread termination is acquired when the workpiece under test rotates under the drive of the rotary table. If it is determined that the thread profile height is reversed based on the first thread profile height and the preset thread profile height of the tracking thread, and the absolute value of the difference between the first thread profile height and the preset thread profile height of the tracking thread is less than or equal to the tolerance value, then the corresponding projection image of the thread termination during rotation is obtained as the image to be measured. The complete thread closest to the nominal interlayer and the end of the nominal interlayer are identified from the image to be measured. The thread termination length of the workpiece under test is obtained based on the root of the complete thread closest to the nominal interlayer and the end of the nominal interlayer.

[0145] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0146] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0147] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0148] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0149] In the description of this specification, the references to terms such as "an embodiment," "a specific embodiment," "some embodiments," "for example," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0150] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for measuring the end length of a thread, characterized in that, include: Acquire a projection image of the thread termination portion at the initial position of the workpiece to be tested; wherein the workpiece to be tested is placed on a rotary table; Based on the projection image of the thread end portion at the initial position of the workpiece under test, the tracking thread teeth are determined; A projection image of the thread termination portion of the workpiece under test during rotation is acquired, and the first tooth profile height of the tracking thread tooth is obtained based on the projection image of the thread termination portion of the workpiece under test during rotation; wherein, the projection image of the thread termination portion during rotation is acquired when the workpiece under test is rotated under the drive of the rotary table. If it is determined that the thread profile height is reversed based on the first thread profile height and the preset thread profile height of the tracking thread, and the absolute value of the difference between the first thread profile height and the preset thread profile height is less than or equal to the tolerance value, then the corresponding projection image of the thread tail section during rotation is obtained as the image to be measured; if it is determined that the thread profile height is reversed based on the first thread profile height and the preset thread profile height of the tracking thread, and the absolute value of the difference between the first thread profile height and the preset thread profile height of the tracking thread is greater than the tolerance value, then a reverse rotation command is sent to cause the rotary table to drive the workpiece to be measured to rotate in the opposite direction; Identify the complete thread closest to the nominal sandwich and the end of the nominal sandwich from the image to be measured; The thread termination length of the workpiece under test is obtained based on the root of the complete thread closest to the nominal interlayer and the end of the nominal interlayer. The determination of the tracking thread teeth based on the projected image of the thread termination portion at the initial position of the workpiece to be tested includes: Extract the first thread profile from the projection image of the thread termination portion at the initial position; Feature points are extracted from the search area corresponding to the first thread profile to obtain multiple first edge points; The peaks and troughs of the first thread profile are obtained based on the plurality of first edge points; Multiple second profile heights are obtained based on adjacent peaks and troughs of the first thread profile. Obtain the thread tooth corresponding to the peak of a second tooth profile height that is greater than the preset tooth profile height, and use it as the tracking thread tooth.

2. The method according to claim 1, characterized in that, The step of obtaining the first tooth profile height of the tracking thread tooth based on the projection image of the thread termination portion during the rotation of the workpiece to be tested includes: Extract the second thread profile from the projection image of the thread tail section during rotation; Feature points are extracted from the search area corresponding to the second thread profile to obtain multiple second edge points; The peaks and troughs of the second thread profile are obtained based on the plurality of second edge points; Based on the peaks and troughs of the tracking thread tooth and the second thread profile, the peaks and troughs corresponding to the tracking thread tooth are obtained. The first tooth profile height of the tracking thread is obtained based on the peaks and troughs corresponding to the tracking thread teeth.

3. The method according to claim 1, characterized in that, The complete thread teeth closest to the nominal interlayer identified from the image to be measured include: Extract the third thread profile from the image to be measured; Based on the third thread profile and the background of the image to be measured, multiple third edge points are obtained; The peaks and troughs of the third thread profile are obtained based on the plurality of third edge points; Multiple third thread profile heights are obtained based on adjacent peaks and troughs of the third thread profile. The thread tooth corresponding to the peak of the third tooth profile with a height greater than the preset tooth profile height and closest to the nominal interlayer is obtained as the complete thread tooth closest to the nominal interlayer.

4. The method according to claim 1, characterized in that, Identifying the end of the nominal interlayer from the image to be measured includes: The reference position of the nominal interlayer is identified from the nominal interlayer reference position detection area in the image to be measured; Starting from the root of the complete thread closest to the nominal interlayer, search for edge points in the direction of the reference position of the nominal interlayer; If it is determined that the distance between the edge point and the reference position of the nominal interlayer matches the length of the nominal interlayer, then the edge point is taken as the end of the nominal interlayer.

5. The method according to claim 1, characterized in that, The step of determining whether the tooth profile height is reversed based on the first tooth profile height and the preset tooth profile height of the tracking thread includes: If it is determined that the current first tooth profile height of the tracking thread is less than or equal to the preset tooth profile height, and the previous first tooth profile height of the tracking thread is greater than the preset tooth profile height, then the tooth profile height is reversed; or If it is determined that the current first tooth profile height of the tracking thread is greater than the preset tooth profile height, and the previous first tooth profile height of the tracking thread is less than or equal to the preset tooth profile height, then the tooth profile height is reversed.

6. The method according to claim 1, characterized in that, Also includes: Each time the rotating worktable drives the workpiece to be tested to rotate in the opposite direction, the speed of the reverse rotation decreases to 1 / n of the speed of the previous rotation; where n is a positive number greater than 1.

7. A system for measuring the thread termination length using the thread termination length measurement method according to any one of claims 1 to 6, characterized in that, This includes industrial cameras, light sources, rotary tables, servo motors, and computers, among which: The computer is communicatively connected to the industrial camera and the servo motor respectively. The rotary table is used to place the workpiece to be tested. The servo motor is used to drive the rotary table to rotate. The industrial camera is used to acquire the projected image of the thread end of the workpiece to be tested placed on the rotary table. The light source is used to provide illumination when the industrial camera acquires the projected image of the thread end of the workpiece to be tested. The computer is used to measure the thread termination length of the workpiece based on the projected image of the thread termination portion of the workpiece being tested.

8. The thread termination length measurement system according to claim 7, characterized in that, It also includes a light shield, which is used to block external light when the industrial camera acquires a projected image of the threaded end of the workpiece under test.

9. A device for measuring the end length of a thread, characterized in that, include: The acquisition module is used to acquire a projected image of the thread termination portion at the initial position of the workpiece to be tested; wherein the workpiece to be tested is placed on a rotary table. The determination module is used to determine the tracking thread teeth based on the projected image of the thread termination portion at the initial position of the workpiece under test; The first acquisition module is used to acquire a projection image of the thread end portion of the workpiece under test during rotation, and to obtain the first tooth profile height of the tracking thread based on the projection image of the thread end portion of the workpiece under test during rotation; wherein, the projection image of the thread end portion during rotation is acquired when the workpiece under test is rotated under the drive of the rotary table. The judgment module is configured to: if it is determined, based on the first tooth profile height and the preset tooth profile height of the tracking thread, that the tooth profile height is reversed, and the absolute value of the difference between the first tooth profile height and the preset tooth profile height is less than or equal to the tolerance value, then obtain the corresponding projection image of the thread tail section during rotation as the image to be measured; if it is determined, based on the first tooth profile height and the preset tooth profile height of the tracking thread, that the tooth profile height is reversed, and the absolute value of the difference between the first tooth profile height and the preset tooth profile height of the tracking thread is greater than the tolerance value, then send a reverse rotation command to cause the rotary table to drive the workpiece to be measured to rotate in the opposite direction. The identification module is used to identify the complete thread closest to the nominal sandwich and the end of the nominal sandwich from the image to be measured; The second obtaining module is used to obtain the thread termination length of the workpiece to be tested based on the root of the complete thread tooth closest to the nominal interlayer and the end of the nominal interlayer. Specifically, the determining module is used to extract the first thread profile from the projected image of the thread termination portion at the initial position; extract feature points from the search area corresponding to the first thread profile to obtain multiple first edge points; obtain the peaks and troughs of the first thread profile based on the multiple first edge points; obtain multiple second thread profile heights based on adjacent peaks and troughs of the first thread profile; and obtain the thread tooth corresponding to a peak whose second thread profile height is greater than a preset thread profile height as the tracking thread tooth.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.