Deep learning-based pointer type micrometer number identification method and system
Through deep learning-based methods, combined with YOLOv9 convolutional neural network, angle method and distance method, the problem of low accuracy and accuracy of pointer dial meters recognition is solved, and more efficient and accurate digital representation recognition is achieved.
Patent Information
- Application Number
- CN202510109510.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-07-01
AI Technical Summary
The existing pointer-type dial meter recognition method cannot distinguish the rotation direction, and the recognition accuracy and calculation results are low, especially when there is an angle between the camera and the dial.
Using a deep learning-based method, the camera and the router are connected through a network video recorder, the input image of the pointer dial is obtained and pre-processed. The YOLOv9 convolutional neural network is used to detect target key points, and the rotation angle and distance of the pointer are calculated by combining the angle method and the distance method, and then the thousandths representing number is calculated.
The accuracy of pointer angle and distance recognition of pointer dial meters is improved, labor costs are reduced, calculation results are enhanced, and the requirements for shooting angle are reduced.
Smart Images

Figure CN120236176A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of instrument recognition, and particularly to a pointer micrometer reading recognition method and system based on deep learning. Background Art
[0002] As a length measurement tool widely used in the mechanical precision machining and manufacturing industries and engineering and technical units, compared with digital micrometers, the advantages of pointer micrometers are as follows: Pointer micrometers do not require power supply and are suitable for use or long-term operation in power-free and special complex environments. Due to the absence of electronic components, pointer micrometers are usually more robust and durable and suitable for use in harsh environments. Although digital displays can provide digital precision, for experienced operators, the scale dial of pointer micrometers can provide more intuitive trend analysis. Especially when monitoring dynamic changes, the movement trend of the pointer can be seen. At the same time, manufacturers and metrology inspection departments need to carry out periodic metrology inspection work on micrometers, and professional technicians are required to perform it during use. Manual reading for inspection has low efficiency and a large workload. Manual verification is affected by the observation angle and distance in the indication reading, with low verification accuracy. Moreover, after long-term use of the eyes, the verifier is prone to visual fatigue, which has a more serious impact on the verification accuracy.
[0003] Currently, pointer micrometer recognition algorithms are mostly based on traditional image processing technologies, using techniques such as edge detection, morphological processing, and Hough transform to detect the pointer contour and position, thereby calculating the angle of the pointer. However, when the dial of the pointer micrometer is tilted at a certain angle relative to the camera, the reading result will be inaccurate, resulting in an untrustworthy verification result. For example, calculating the deflection angle of the pointer relative to the zero scale through trigonometric function formulas to calculate the instrument reading. This calculation principle cannot distinguish the rotation direction of the pointer and is only applicable to dials with a rotation angle not exceeding 180 degrees; for example, calculating the angle and direction through the vector method, this calculation principle has low accuracy when there is an angle between the dial and the camera; for example, mapping the arc-shaped dial to a flat horizontal scale through the distance method, this calculation principle is more cumbersome and the calculation result has a large error, and has high requirements for the camera shooting angle.
[0004] Therefore, there is an urgent need for a pointer micrometer reading recognition method and system that can perform timed and directional shooting, improve the recognition accuracy, and enhance the accuracy of the calculation result. Summary of the Invention
[0005] The purpose of the present invention is to provide a pointer micrometer reading recognition method and system based on deep learning to at least solve the problems that the existing pointer micrometer reading recognition methods cannot distinguish the rotation direction and have low recognition accuracy and calculation result accuracy.
[0006] To achieve the above purpose, the technical solution adopted by the present invention is as follows:
[0007] A method for recognizing the reading of a dial micrometer based on deep learning, the steps of the method are as follows:
[0008] Connect the camera and the router through a network video recorder. The camera acquires the input image of the dial micrometer and performs preprocessing to obtain an output image;
[0009] Perform batch deep learning on the output image, and use a convolutional neural network to detect the target key points to obtain the position data of the target key points;
[0010] According to the position data of the target key points, calculate the reading of the dial micrometer through the calculation correction method.
[0011] Further, the connection between the camera and the router through the network video recorder, and the camera acquires the input image of the dial micrometer and performs preprocessing to obtain an output image, including:
[0012] Connect the camera to the network video recorder, and the network video recorder is connected to the computer terminal and the router;
[0013] The camera takes pictures of the dial micrometer at a preset time and direction to obtain an input image;
[0014] Upload the input image to the computer terminal and adjust its size to a fixed format.
[0015] Further, the target key points include the range zero scale point, the center of the dial, the dial micrometer pointer point, and the scale endpoints of the long scale mark interval where the dial micrometer pointer is located.
[0016] Further, the use of a convolutional neural network to detect the target key points to obtain the position data of the target key points, including:
[0017] Use the YOLOv9 convolutional neural network to identify the type of the dial micrometer instrument and calculate the detection confidence score of the target key points;
[0018] Use non-maximum suppression screening to retain the position data of the target key points with a detection confidence score higher than the confidence level.
[0019] Further, the calculation of the reading of the dial micrometer through the calculation correction method according to the position data of the target key points, including:
[0020] According to the position data of the range zero scale point, the center of the dial and the dial micrometer pointer point, calculate whether the pointer is on the left or right side of the zero scale line through the vector cross product;
[0021] Calculate the clockwise rotation angle θ of the pointer relative to the zero scale through the angle method;
[0022] According to the position data of the pointer point of the dial indicator and the scale end points of the long scale mark interval where the pointer of the dial indicator is located, the reading L of the dial indicator is calculated by the distance method.
[0023] Furthermore, the calculation formula of the angle method is:
[0024]
[0025] Wherein,
[0026] α is the included angle between the vector and the vector ,
[0027] The point O(x0, y0) is the center of the dial,
[0028] The point A(x A , y A ) is the zero scale point,
[0029] The point B(x B , y B ) is the pointer point,
[0030] is the base vector and is the unit vector in the Z direction of the three-dimensional coordinate system.
[0031] Furthermore, the calculation formula of the distance method is:
[0032]
[0033] Wherein,
[0034] M is the total range value of the long scale mark interval,
[0035] 10 is the range value of one interval of the long scale mark,
[0036] The points C and D are respectively the scale end points of the long scale mark interval where the pointer is located in the clockwise direction.
[0037] The pointer-type dial indicator reading recognition system based on deep learning includes:
[0038] An image acquisition module, which is used to connect the camera and the router through a network video recorder. The camera acquires the input image of the pointer-type dial indicator and performs preprocessing to obtain the output image;
[0039] A target detection module, which is used to perform batch deep learning on the output image, and uses a convolutional neural network to detect the position data of the target key points;
[0040] The instrument reading calculation module is used to calculate and obtain the reading of the dial indicator according to the position data of the target key points through the calculation correction method.
[0041] A pointer type dial indicator reading recognition device based on deep learning, comprising:
[0042] A memory: used to store executable instructions; and
[0043] A processor: used to be connected to the memory to execute the executable instructions so as to complete the steps of the above-mentioned pointer type dial indicator reading recognition method based on deep learning.
[0044] A computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the steps of the above-mentioned pointer type dial indicator reading recognition method based on deep learning.
[0045] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0046] 1. The present invention provides a pointer type dial indicator reading recognition method and system based on deep learning. By collecting and processing the pointer type dial indicator image, and based on deep learning, using the YOLOv9 convolutional neural network to accurately recognize the target key points, the recognition and calculation of the pointer angle and distance of the dial indicator are realized; by connecting the camera and the router through a network video recorder, it is possible to achieve timed and directional shooting, reducing labor costs; by using deep learning, the computer recognition accuracy can be improved, thereby improving work efficiency; by combining the angle method and the distance method, the error caused by the shooting angle can be eliminated, thereby reducing the strict requirements for the placement position of the pointer type dial indicator and improving the accuracy of the calculation result.
[0047] 2. The present invention can realize the efficient and accurate recognition of the readings of a batch of dial indicator images through the computer terminal, making the entire recognition and calculation process more convenient. Description of the Drawings
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0049] Figure 1 It is a schematic diagram of the steps of Embodiment 1 of the present invention;
[0050] Figure 2 It is a schematic flowchart of Embodiment 1 of the present invention;
[0051] Figure 3It is a schematic structural diagram of the dial indicator of the present invention;
[0052] Figure 4 It is a schematic diagram for calculating the pointer rotation angle and distance of the dial indicator in Embodiment 1 of the present invention;
[0053] Figure 5 It is a schematic diagram of the physical structure of the electronic device in Embodiment 3 of the present invention. Detailed implementation manners
[0054] To facilitate the understanding of the present invention, the present invention will be described more comprehensively below with reference to the relevant drawings. The preferred embodiments of the present invention are shown in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, these embodiments are provided to make the disclosure of the present invention more thorough and comprehensive.
[0055] It should be noted that similar reference numerals and letters indicate similar items. Therefore, once an item is defined in one embodiment, it does not need to be further defined and explained in subsequent embodiments. In addition, the terms "including" and the like and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily limit to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0056] It should also be noted that although the order of steps is involved in the method description, in some cases, it can be executed in a different order from here and should not be construed as a limitation on the order of steps.
[0057] The present invention provides a method for identifying the reading of a dial indicator based on deep learning, and the steps are as follows:
[0058] S1: Connect the camera to the router through the network video recorder. The camera acquires the input image of the dial indicator and performs preprocessing to obtain the output image;
[0059] S101: Connect the camera to the network video recorder, and connect the network video recorder to the computer terminal and the router;
[0060] S102: The camera takes a picture of the dial indicator at a preset time and direction to obtain the input image;
[0061] S103: Upload the input image to the computer terminal and adjust its size to a fixed format.
[0062] S2: Batch deep learn the output image, and use a convolutional neural network to perform target key point detection to obtain the position data of the target key points;
[0063] S201: Use the YOLOv9 convolutional neural network to identify the instrument type of the dial indicator, and calculate the detection confidence score of the target key points.
[0064] The target key points include the zero scale point of the measuring range, the center of the dial, the pointer point of the dial indicator, and the scale endpoints of the long scale mark interval where the dial indicator pointer is located.
[0065] S202: Use non-maximum suppression screening to retain the position data of the target key points with a detection confidence score higher than the confidence level.
[0066] S3: According to the position data of the target key points, calculate the reading of the dial indicator by the calculation and correction method.
[0067] S301: According to the position data of the zero scale point of the measuring range, the center of the dial, and the pointer point of the dial indicator, calculate whether the pointer is on the left or right side of the zero scale line through the cross product of vectors.
[0068] S302: Calculate the clockwise rotation angle θ of the pointer relative to the zero scale by the angle method.
[0069] S303: According to the position data of the pointer point of the dial indicator and the scale endpoints of the long scale mark interval where the dial indicator pointer is located, calculate the reading L of the dial indicator by the distance method.
[0070] Embodiment 1:
[0071] As Figures 1-4 shown, this embodiment provides a method for identifying the reading of a dial indicator based on deep learning, and the steps are as follows:
[0072] S1: Connect the camera to the router through a network video recorder. The camera acquires the input image of the dial indicator and performs preprocessing to obtain the output image.
[0073] S101: Connect the camera to the network video recorder, and connect the network video recorder to the computer terminal and the router.
[0074] S102: The camera takes a picture of the dial indicator at a preset time and direction to obtain the input image.
[0075] The accuracy of the dial indicator is 0.001 mm. The dial indicator is placed in the environment to be tested, such as displacement detection in bridge structure tests, dimension detection in precision machining of machinery, etc. The camera supports POE (Power Over Ethernet, POE power supply), and can achieve long-distance and timed and directional shooting of the dial indicator, avoiding the situation where the power supply distance in the use site is insufficient.
[0076] S103: Upload the input image to the computer terminal and adjust its size to a fixed format.
[0077] S2: Batch deep learn the output images, and use a convolutional neural network to detect the target key points to obtain the position data of the target key points.
[0078] The convolutional neural network is the YOLOv9 convolutional neural network.
[0079] The target key points include the range zero scale point, the center of the dial, the dial indicator pointer point, and the scale endpoints of the long scale mark interval where the dial indicator pointer is located.
[0080] Through labeling the output images in deep learning, the recognition accuracy will gradually improve with the labels.
[0081] S201: Use the YOLOv9 convolutional neural network to identify the type of the dial indicator, and calculate the detection confidence score of the target key points.
[0082] S202: Adopt non-maximum suppression screening to retain the position data of the target key points with a detection confidence score higher than the confidence level.
[0083] S3: According to the position data of the target key points, calculate the reading of the dial indicator by the calculation correction method.
[0084] The calculation correction method includes the angle method and the distance method.
[0085] S301: According to the position data of the range zero scale point, the center of the dial, and the dial indicator pointer point, calculate whether the pointer is on the left or right side of the zero scale line through the vector cross product.
[0086] S302: Calculate the clockwise rotation angle θ of the pointer relative to the zero scale by the angle method.
[0087] The formula of the angle method is:
[0088]
[0089] Among them,
[0090] α is the included angle between the vector and the vector ,
[0091] The point O(x0, y0) is the center of the dial,
[0092] The point A(x A , y A ) is the zero scale point,
[0093] The point B(x B , y B ) is the pointer point,
[0094] is the base vector, and is the unit vector in the Z direction of the three-dimensional coordinate system.
[0095] S303: According to the position data of the pointer point of the dial indicator and the scale endpoints of the long scale mark interval where the pointer of the dial indicator is located, calculate the reading L of the dial indicator by the distance method.
[0096] Calculation by the angle method and correction by the distance method.
[0097] The calculation formula of the distance method is:
[0098]
[0099] Among them,
[0100] M is the total range value of the long scale mark interval,
[0101] 10 is the range value of one interval of the long scale mark,
[0102] Points C and D are respectively the scale endpoints of the long scale mark interval where the pointer is located in the clockwise direction.
[0103] Embodiment 2:
[0104] This embodiment provides a pointer-type dial indicator reading recognition system based on deep learning, including:
[0105] An image acquisition module, used to connect the camera and the router through a network video recorder, and the camera acquires the input image of the pointer-type dial indicator and performs preprocessing to obtain the output image;
[0106] A target detection module, used to perform batch deep learning on the output image, and perform target key point detection using a convolutional neural network to obtain the position data of the target key points;
[0107] An instrument reading calculation module, used to calculate and obtain the reading of the pointer-type dial indicator by the calculation correction method according to the position data of the target key points.
[0108] Embodiment 3:
[0109] This embodiment provides a pointer-type dial indicator reading recognition device based on deep learning, Figure 5Schematic diagram of the physical structure of the electronic device provided in this embodiment. The electronic device may include: a processor 101, a communications interface 102, a memory 103, and a bus 104. Among them, the processor 101, the communications interface 102, and the memory 103 complete mutual communication through the bus 104. The processor 101 may call a computer program stored on the memory 103 and executable on the processor 101 to execute the pointer type micrometer reading recognition method based on deep learning provided in the above-mentioned Embodiment 1. For example, it includes: connecting the camera and the router through a network video recorder at the vertical end. The camera acquires the input image of the pointer type micrometer and performs preprocessing to obtain an output image; batch deep learning the output image, and using the YOLOv9 convolutional neural network to perform target key point detection to obtain the position data of the target key points; according to the position data of the target key points, calculating the pointer type micrometer reading through the angle method and the distance method.
[0110] In addition, when the logical instructions in the above-mentioned memory 103 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present invention, in essence, or the part that contributes to the prior art, or a part of this 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 for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0111] The above description is only a preferred embodiment of the present disclosure and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solution formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosure concept. For example, the technical solutions formed by mutually replacing the above features with the (but not limited to) technical features with similar functions disclosed in the present disclosure.
[0112] The above uses specific examples to elaborate on the present invention, which is only used to help understand the present invention and is not intended to limit the present invention. For those skilled in the art to which the present invention pertains, based on the idea of the present invention, several simple deductions, deformations or substitutions can also be made.
Claims
1. A pointer-type thousandths indication number recognition method based on deep learning, characterized in that: The method steps are as follows: The camera is connected to the router through a network video recorder, and the camera obtains an input image of the pointer micrometer and performs preprocessing to obtain an output image; The output images are batch-learned and a convolutional neural network is used to detect target key points to obtain position data of the target key points; According to the position data of the target key point, the pointer-type thousandths indication number is calculated by a calculation correction method.
2. The method for identifying pointer-type per thousand indication numbers based on deep learning according to claim 1, characterized in that: The method of connecting the camera to the router through a network video recorder, wherein the camera obtains an input image of a pointer micrometer and performs preprocessing to obtain an output image, includes: The camera is connected to a network video recorder, and the network video recorder is connected to a computer and a router; The camera shoots the pointer micrometer at a preset time and direction to obtain an input image; The input image is uploaded to a computer and its size is adjusted to a fixed format.
3. The method for identifying pointer-type per thousand indication numbers based on deep learning according to claim 1, characterized in that: The target key points include the zero scale point of the measuring range, the center of the dial, the micrometer pointer point, and the scale endpoints of the long scale mark interval where the micrometer pointer is located.
4. The method for identifying pointer-type per thousand indication numbers based on deep learning according to claim 1, characterized in that: The method of using a convolutional neural network to detect target key points and obtain position data of the target key points includes: The YOLOv9 convolutional neural network is used to identify the type of pointer dial gauge and calculate the detection confidence score of the target key points; Extreme value suppression screening is adopted to retain the target key point position data whose detection confidence score is higher than the confidence level.
5. The method for identifying pointer-type per-thousandths numbers based on deep learning according to claim 3, characterized in that: The method of calculating the pointer-type thousandths indication number by a calculation correction method according to the position data of the target key point includes: According to the position data of the zero scale point of the range, the center of the dial circle and the pointer point of the micrometer, the pointer is calculated to the left or right of the zero scale line through the vector cross product; Calculate the clockwise rotation angle θ of the pointer relative to the zero scale by the angle method; According to the position data of the micrometer pointer point and the end point of the scale mark interval of the long ruler where the micrometer pointer is located, the micrometer indication number L is calculated by the distance method.
6. The method for identifying pointer-type per thousand indication numbers based on deep learning according to claim 5, characterized in that: The calculation formula of the angle method is: in, α is a vector With vector The angle of Point O (x0, y0) is the center of the dial. Point A(x A ,y A ) is the zero scale point, Point B(x B ,y B ) is the pointer point, is the basis vector, which is the unit vector in the Z direction of the three-dimensional coordinate system.
7. The method for identifying pointer-type per-thousandths numbers based on deep learning according to claim 5, characterized in that: The calculation formula of the distance method is: in, M is the total interval range value marked by the long scale, 10 is a long ruler marking an interval range value. Point C and point D are the endpoints of the interval scale marked on the long ruler where the pointer is located in the clockwise direction.
8. A pointer-type thousandths indication recognition system based on deep learning, characterized in that: include: An image acquisition module is used to realize the connection between the camera and the router through a network video recorder, and the camera acquires the input image of the pointer micrometer and performs preprocessing to obtain the output image; A target detection module is used to perform deep learning on the output images in batches, and use a convolutional neural network to detect target key points to obtain position data of the target key points; The instrument indication number calculation module is used to calculate the pointer-type thousandth indication number through a calculation correction method according to the position data of the target key point.
9. A pointer-type per-thousandth indication number recognition device based on deep learning, characterized in that: include: Memory: used to store executable instructions; and Processor: used to connect to the memory to execute the executable instructions to complete the steps of the pointer-type per thousand indication number recognition method based on deep learning as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer program is executed by a processor to implement the steps of the pointer-type per thousand indication numeral recognition method based on deep learning as described in any one of claims 1 to 7.