CN-121982689-A - Automatic identification method and device for pointer multimeter
Abstract
The invention has studied a pointer multimeter's indication automatic identification method and system device, this device is through including electronic clamping jaw, guide rail and automatic platform of the rotary mechanism, realize automatic fixation and gear switching of the multimeter, and cooperate with the industrial camera to gather the multimeter image, utilize YOLOv goal detection network to position the dial plate area fast; and carrying out pixel level segmentation on the dial and the gear disc by adopting a deep learning model based on U2-Net to generate a pointer, a scale and a gear mask. The circle center of the dial is determined by geometric calculation of the binary mask pixels. The conversion from sector distribution to linear one-dimensional data is realized through polar coordinate expansion. Finally, combining the scale peak quadratic fit optimization and the piecewise nonlinear interpolation technology to output an indication value. Meanwhile, the circle center of the gear disc and the center of mass of the pointer determined by combining the K-Means clustering are combined, and gear information acquisition and indication integration are completed. The invention is effectively suitable for different types of multimeters and complex backgrounds, and the efficiency and the accuracy are obviously improved.
Inventors
- ZHENG SHUYI
- SUN BIN
- ZHAO YUXIAO
Assignees
- 中国计量大学
Dates
- Publication Date
- 20260505
- Application Date
- 20251203
Claims (8)
- 1. An automatic identification method and device for a pointer multimeter is characterized by comprising the following steps: Step 1, detecting and classifying the multimeter dial in the image to be identified based on YOLOv target detection network model, positioning the multimeter dial in the classified image, cutting the frame of the dial, and shooting the image of the gear of the lower half part of the multimeter for subsequent use. And 2, performing image preprocessing and pixel level segmentation on the dial by adopting a U2-Net neural network model to generate a pointer mask and a scale mask, and performing the same processing on the gear to generate the pointer mask and the gear mask. And 3, extracting all pixel coordinates belonging to the scale part from the binary mask, and fitting the circle center so as to accurately calculate the circle center of the dial. And extracting pixel coordinates of the gear part, and fitting the circle center of the gear disc. Step 4, taking the calculated circle center of the dial as a pole, performing polar coordinate expansion on the pointer mask and the scale mask, and converting the sector distribution into linear one-dimensional data; and 5, based on the one-dimensional data, combining the secondary fitting optimization of the scale peak value to calculate the coordinates of the pointer scale, performing linear interpolation on the uniform scale, performing piecewise nonlinear interpolation on the non-uniform scale based on the correction ratio, and finally outputting an indication value. And 6, obtaining current gear information according to the circle center of the gear disc and the center of mass of the pointer, and integrating the gear information and the indication information to finish identification.
- 2. The automatic identification method and apparatus for a pointer multimeter according to claim 1, wherein in the step 2, a plurality of sets of semantic segmentation models are respectively pre-trained according to different measurement modes to obtain an optimized segmentation mask for a specific mode. And selecting a scale mask and a pointer mask generated by using the semantic segmentation model of the corresponding mode according to the gear determined in the step 6 for subsequent geometric positioning and reading calculation.
- 3. The automatic identification method and device for the pointer multimeter according to claim 1, wherein in the step 3, the circle center is determined by fitting a high-density pixel point set by a least square method, the circle center is determined by a gear disc circle center, the number of clusters k=1 is set by a K-Means clustering algorithm, and the unique cluster center obtained by clustering is determined as the circle center of the gear disc.
- 4. The automatic identification method and device for a pointer multimeter according to claim 1, wherein before the polar coordinates are expanded in the step 4, the method comprises the steps of carrying out peak detection on a scale one-dimensional array, and carrying out quadratic function fitting on the detected scale peak value to realize sub-pixel level optimization of the scale position.
- 5. The automatic identification method and apparatus for a pointer multimeter according to claim 1, wherein the reading calculation and output in the step 5 uses a linear interpolation method to map the pointer position to a scale value if the current is a uniform scale pattern (voltage, current), and uses a piecewise nonlinear interpolation method based on a correction ratio to map the pointer position to a scale value if the current is a non-uniform scale pattern (resistance).
- 6. The automatic identification method and device for a pointer multimeter according to claim 1, wherein the step 6 of obtaining the gear information is to determine a gear mark with the smallest Y coordinate on a gear disc as a reference (OFF) scale, and sequentially number 1-21 for 22 gears clockwise, and connect the center of a circle of the gear disc as a starting point with the center of mass of the pointer and extend to intersect with a gear area, thereby determining the current gear.
- 7. The automatic identification method and device for the pointer multimeter according to claim 1, wherein the object detection model and the semantic segmentation model are trained by taking a plurality of pointer multimeter images of different categories as data sets, and the finally obtained network model can finish the identification of the multimeter of different types.
- 8. The automatic identification method and device for the pointer multimeter according to claim 1 are characterized in that the device comprises a frame (1), an electric clamping jaw and a connecting piece (2), a guide rail (4), a rotary electric clamping jaw and the connecting piece (5), a first camera (6) and a second camera (7), wherein the image acquisition steps in the method are carried out cooperatively through the device, specifically comprise the steps of setting a gear value to be calibrated, controlling the electric clamping jaw and the connecting piece (2) to clamp the multimeter (3) to be fixed, controlling the guide rail (4) to drive the rotary electric clamping jaw and the connecting piece (5) to descend, enabling the rotary electric clamping jaw and the connecting piece (5) to be connected with a knob of the multimeter (3) and controlling the rotary electric clamping jaw and the connecting piece to rotate to stir the knob to the set gear, then controlling the guide rail (4) to ascend and reset, controlling the second camera (7) to shoot an image of a multimeter gear disc, and taking the image of the first camera (6) as the image to be identified for subsequent processing.
Description
Automatic identification method and device for pointer multimeter Technical Field The invention belongs to the technical field of deep learning and instrument detection, and particularly relates to an automatic identification method and device for a pointer multimeter based on a deep learning and image processing technology, which are used for automatically and accurately reading and identifying indication value and gear information of the pointer multimeter. Background The pointer multimeter is one portable electricity meter with several functions including current, voltage, resistance measurement, etc. The core of the device converts an electric signal to be measured into micro current for driving a gauge head coil through different functional gears and built-in circuits (such as a current divider and a voltage divider), and then drives a pointer to deflect on an annular dial to indicate a measured value through a magneto-electric system measuring mechanism. Unlike a single function meter, a pointer multimeter has the following significant features and challenges: 1. Multiple scale marks are often overlapped on the dial plate of the universal meter to be used for measuring different physical quantities. Wherein the voltage and current scales are typically uniformly distributed, while the resistance scales are non-uniform, non-linear. Such a multi-mode, non-uniform scale distribution greatly increases the complexity of the identification. 2. Gear information coupling-the final measured indication must be combined with the gear information currently selected by the knob to be determined. Thus, automated identification must accurately read both pointer position and gear information. In industrial production and metrological verification, the reading of pointer multimeters traditionally relies on manual operations, with the following inherent technical bottlenecks: 1. The high-precision reading is difficult and has large error, and because the scale marks on the dial are dense, especially in uneven ohm gears, operators are easily influenced by visual angle deviation, scale resolution limitation and subjective judgment of operators when in visual reading, so that the reading fluctuation is large and the error is difficult to control. 2. The efficiency is low, and aiming at the complex verification process of various measurement modes, the time and the labor are consumed by manually recording point by point, so that the requirements of modern industry on automation and high efficiency of multi-instrument and high-frequency data acquisition can not be met. The traditional automatic meter reading identification algorithm is based on a classical image processing technology and mainly depends on methods such as edge detection, hough transformation or template matching. However, these methods have inherent defects in a complex industrial scene of a multimeter, which cannot effectively solve the problems of uneven illumination, complex background interference, variety of multimeter models, image blurring, scale variation and the like, and have poor robustness. The traditional algorithm is difficult to deal with the accurate interpolation of the special non-uniform scales of the universal meter, and the identification of gear information cannot be effectively integrated. In recent years, deep learning technology, particularly a model based on Convolutional Neural Network (CNN), realizes nonlinear feature mapping by constructing a multi-layer network, and has a great potential in the field of computer vision. The invention is based on deep learning combined with polar coordinate expansion and sub-pixel level optimization, so as to overcome the technical challenges of insufficient dial precision, pointer sub-pixel level positioning difficulty, inaccurate non-uniform scale interpolation and the like in the prior art, and provide a reliable solution for high-precision automatic reading of a universal meter. Disclosure of Invention The invention aims to provide a high-robustness, high-precision and automatic pointer type universal meter automatic identification method and device, which solve the technical problems of low manual reading efficiency, large error and poor coupling identification adaptability of the traditional automatic algorithm to complex multi-scale (including non-uniform scale) and gear information. An automatic identification method and device for a pointer multimeter comprises the following steps: Step 1, training YOLOv a neural network to realize detection and classification of a pointer multimeter to be identified; Step 2, training pointers, scales and gear information of a U2-Net neural network segmentation multimeter; step 3, fitting a circle center according to the information of the pointer and the gear; Step 4, performing polar coordinate expansion on the obtained information by segmentation by taking the circle center as a pole; step 5, linear interpolation is used for the uniform scale, piecewis