Method, device and system for reading measured values ​​of pointer-type instrument

Through image processing technology, including median filtering, grayscale filling and Hough transformation, the measurement values ​​​​of pointer instruments are identified, which solves the problems of slow reading speed and error-prone in the existing technology, and realizes the automation of fast and accurate instrument measurement values. Identify.

CN114693705BActive Publication Date: 2024-08-27ANHUI AGRICULTURAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210366137.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-08
Publication Date
2024-08-27
Estimated Expiration
2042-04-08

AI Technical Summary

Technical Problem

It is difficult to quickly and accurately read the measurement values ​​of pointer instruments with the existing technology, especially in chemical production, where the reading speed is slow and error-prone problems exist.

Method used

By obtaining the optical image of the instrument indication area, perform median filtering, grayscale filling and Hough transformation to obtain edge information, calculate the center position, extract the pixel area, perform binarization processing, create a mask image, find the difference image, and use connected domains The algorithm identifies the pointer area and the measured value.

Benefits of technology

It achieves rapid reading of pointer meter measurement values, avoids errors in manual readings, improves reading speed and accuracy, and is suitable for automated monitoring in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114693705B
    Figure CN114693705B
Patent Text Reader

Abstract

The present invention discloses a method, device and system for reading the measured value of a pointer-type instrument. The method includes: calculating the center position of the instrument by a geometric method; calculating the first centroid; creating a first mask image on the pixel area with the first centroid as the center of the circle; obtaining a difference image by subtracting the optical image from the grayscale-filled image; obtaining a hole-filled image of the difference image, performing an AND operation on the hole-filled image and the first mask image to obtain a disk image of the instrument optical image; obtaining the pointer length corresponding to the pointer area according to the distribution characteristics of the pixel points in the pointer area; performing an AND operation on the second mask image and the disk image to obtain a target image; obtaining the second centroid of each connected domain area in the target image, and identifying the measured value of the instrument according to the angle between the first centroid and each second centroid. The application of the present invention is faster than manual reading, and there is no need to perform the naked eye identification process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and more specifically to a method, device and system for reading measurement values ​​of a pointer-type instrument. Background Art

[0002] Pointer instruments are widely used in various fields such as petrochemical industry, heating equipment, power plants, etc. due to their simple structure and low price. However, pointer instruments are mostly used in complex environments, especially in chemical production, where a large number of parameters such as pressure, temperature, humidity, fluid velocity, etc. need to be monitored. If they are completely dependent on manual reading, there are problems such as low reading speed, easy errors, and easy data falsification.

[0003] Therefore, how to achieve rapid reading of the measured values ​​of pointer instruments through technical means is a technical problem that needs to be solved urgently. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a method and a device for reading the measured value of a pointer-type instrument, so as to realize the rapid reading of the measured value of the pointer-type instrument.

[0005] The present invention solves the above technical problems through the following technical solutions:

[0006] The present invention provides a method for reading a measured value of a pointer-type instrument, the method comprising:

[0007] Acquire an optical image of the instrument indication area, and sequentially perform median filtering, grayscale filling, and Hough transformation on the optical image to obtain edge information of the instrument, wherein the instrument includes one or a combination of a bimetallic instrument and a magnetoelectric instrument;

[0008] According to the edge information, the center position of the instrument is calculated by using a geometric method;

[0009] Extracting a pixel area corresponding to the instrument according to the center position and the shape of the instrument, performing binarization processing on the pixel area, and calculating a first centroid corresponding to the pixel area according to the binarized image;

[0010] A first mask image is created on the pixel area with the first centroid as the center of the circle; a difference image is obtained by subtracting the optical image from the grayscale filled image; a hole filling process is performed on the difference image to obtain a hole filling image, and the hole filling image is ANDed with the first mask image to obtain a disk image of the instrument optical image;

[0011] A connected domain algorithm is used to obtain a pointer region in the disk image, and a pointer length corresponding to the pointer region is obtained according to distribution characteristics of pixel points in the pointer region;

[0012] With the first centroid as the center of the circle and the pointer length as the radius, a second mask image is created, and the second mask image is ANDed with the disk image to obtain a target image; the second centroid of each connected domain area in the target image is obtained, and the measurement value of the instrument is identified according to the angle between the first centroid and the connecting line of each second centroid.

[0013] Optionally, acquiring an optical image of the instrument indication area includes:

[0014] The indication area of ​​the instrument is placed at the center of the camera's screen, and the camera is used to obtain an optical image of the indication area of ​​the instrument.

[0015] Optionally, calculating the first centroid corresponding to the pixel area according to the binary image includes:

[0016] Using the formula, Calculate the first centroid corresponding to the pixel area, where

[0017] x2 is the horizontal coordinate of the first centroid; A is the number of pixels in the image corresponding to the binary image; m is the horizontal coordinate of the pixel in the image corresponding to the binary image; ∑ is the summation function; G is the image corresponding to the binary image; n is the vertical coordinate of the pixel in the image corresponding to the binary image; y2 is the vertical coordinate of the first centroid.

[0018] Optionally, obtaining a difference image by subtracting the optical image from the grayscale filled image includes:

[0019] Using the formula, I3(x,y)=I2(x,y)-I1(x,y), the difference image is obtained by subtracting the optical image from the grayscale filled image, where:

[0020] I3(x,y) is the difference image; I2(x,y) is the image after grayscale filling; I1(x,y) is the optical image.

[0021] Optionally, acquiring the pointer length corresponding to the pointer area Z(u, v) according to the distribution characteristics of the pixels in the pointer area Z(u, v) includes:

[0022] According to the pointer area Z(u,v) using the formula, Get the pointer length corresponding to the pointer area, where:

[0023] R2 is the pointer length; x3 is the horizontal coordinate of the farthest point from the first centroid (x2, y2) in the pointer area Z(u, v); y3 is the vertical coordinate of the farthest point from the first centroid (x2, y2) in the pointer area Z(u, v); x2 is the horizontal coordinate of the first centroid; y2 is the vertical coordinate of the first centroid.

[0024] Optionally, the angle between the first mass center and the connecting lines of each second mass center includes:

[0025] Using the formula, Calculate the angle between the first centroid and the line connecting each second centroid, where

[0026] is the direction vector of the first straight line L1 between the second centroid of the connected domain corresponding to the starting scale and the first centroid (x2, y2); a is the abscissa of the second centroid of the connected domain corresponding to the starting scale in the target image F(p, q); b is the ordinate of the second centroid of the connected domain corresponding to the starting scale in the target image F(p, q); c is the abscissa of the second centroid of the connected domain corresponding to the measurement value scale in the target image F(p, q); d is the ordinate of the second centroid of the connected domain corresponding to the measurement value scale in the target image F(p, q); is the direction vector of the axis of the pointer area Z(u,v); is the direction vector of the second straight line L2 between the second centroid and the first centroid (x2, y2) of the connected domain corresponding to the measurement value scale; arccos is the inverse cosine function; α is the angle between the pointer and the first straight line L1; β is the angle between the pointer and the second straight line L2.

[0027] Optionally, identifying the measurement value of the instrument according to the angle between the lines connecting the first mass center and each second mass center includes:

[0028] According to the angle between the first centroid and the connecting line of each second centroid, using the formula, Identify the measurement value of the instrument, where

[0029] T is the measured value of the instrument; S is the range of the instrument.

[0030] The present invention also provides a pointer-type instrument measurement value reading device, the device comprising:

[0031] An acquisition module, used for acquiring an optical image of an instrument indication area, and sequentially performing median filtering, grayscale filling and Hough transformation on the optical image to obtain edge information of the instrument, wherein the instrument includes one or a combination of a bimetallic instrument and a magnetoelectric instrument;

[0032] A calculation module, used to calculate the center position of the instrument using a geometric method according to the edge information;

[0033] A processing module, used for extracting a pixel area corresponding to the instrument according to the center position and the shape of the instrument, performing a binarization process on the pixel area, and calculating a first centroid corresponding to the pixel area according to the binarized image;

[0034] A difference module is used to create a first mask image on the pixel area with the first centroid as the center of the circle; obtain a difference image by subtracting the optical image from the grayscale filled image; perform hole filling processing on the difference image to obtain a hole filling image, and perform an AND operation on the hole filling image and the first mask image to obtain a disk image of the instrument optical image;

[0035] A connectivity module, used for obtaining a pointer region in the disk image by using a connectivity domain algorithm, and obtaining a pointer length corresponding to the pointer region according to distribution characteristics of pixel points in the pointer region;

[0036] The recognition module is used to create a second mask image with the first centroid as the center of the circle and the pointer length as the radius, and perform an AND operation on the second mask image and the disk image to obtain a target image; obtain the second centroid of each connected domain area in the target image, and identify the measurement value of the instrument according to the angle between the first centroid and the connecting line of each second centroid.

[0037] The present invention also provides a pointer-type instrument measurement value reading system, the system comprising: a camera, a computer, wherein:

[0038] The camera is used to capture an optical image of the instrument indication area and send the optical image to a computer;

[0039] The computer is used to execute any one of the above methods.

[0040] Optionally, the system further includes: a communication device, a storage device and a human-computer interaction device, wherein:

[0041] The communication device is used to send the optical image and the instrument measurement value to the storage device;

[0042] The storage device is used to store the optical image and the instrument measurement value;

[0043] The human-computer interaction device is used to receive a user's query instruction and obtain the corresponding optical image and instrument measurement value from the storage device according to the query instruction.

[0044] Compared with the prior art, the present invention has the following advantages:

[0045] By applying the present invention, the measurement value of the instrument pointer is read using camera-based image recognition calculation, and the measurement value can be obtained by taking a photo. Compared with manual reading, it does not require the naked eye identification process and is faster.

[0046] Furthermore, the present invention provides a measurement value identification method which is completely different from the prior art, which can not only identify the measurement value but also avoid errors caused by manual reading. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 A schematic diagram of a flow chart of a method for reading a measurement value of a pointer-type instrument provided in an embodiment of the present invention;

[0048] Figure 2 A schematic diagram of the principle of a method for reading measured values ​​of a pointer-type instrument provided in an embodiment of the present invention;

[0049] Figure 3 A schematic diagram of the structure of a pointer-type instrument measurement value reading system provided by an embodiment of the present invention;

[0050] Figure 4 It is a schematic diagram of the process of extracting the edge of a disk of a metal thermometer and roughly locating the center of the disk in an embodiment of the present invention;

[0051] Figure 5 A schematic diagram of a process for accurately locating the center of a circle in an embodiment of the present invention;

[0052] Figure 6 A schematic diagram of the process of extracting the thermometer dial in an embodiment of the present invention;

[0053] Figure 7 A schematic diagram of a process for calibrating a thermometer pointer in an embodiment of the present invention;

[0054] Figure 8 Schematic diagram of another process of thermometer dial extraction in an embodiment of the present invention. DETAILED DESCRIPTION

[0055] The following is a detailed description of an embodiment of the present invention. This embodiment is implemented on the premise of the technical solution of the present invention, and a detailed implementation method and a specific operation process are given, but the protection scope of the present invention is not limited to the following embodiment.

[0056] Example 1

[0057] Figure 1 A schematic diagram of a flow chart of a method for reading a measurement value of a pointer-type instrument provided in an embodiment of the present invention; Figure 2 A schematic diagram of the principle of a method for reading measured values ​​of a pointer-type instrument provided in an embodiment of the present invention; Figure 3 A schematic diagram of the structure of a pointer instrument measurement value reading system provided by an embodiment of the present invention; Figure 1-3 As shown, in Example 1 of the present invention, a bimetallic thermometer is used as an example for explanation. The bimetallic thermometer indicates the temperature by driving the pointer deflection angle change through two metals with different expansion coefficients. When the temperature changes, due to the different thermal expansion coefficients of the two metals, the pointer on the axis will be deflected to produce an angle change, indicating the corresponding temperature on the dial. The bimetallic thermometer has the advantages of small size, good linearity, fast response speed and good stability.

[0058] S101: Using a camera, such as an industrial camera, to obtain an optical image of an instrument indication area, and sequentially performing median filtering, grayscale filling, and Hough transformation on the optical image to obtain edge information of the instrument, wherein the instrument includes one or a combination of a bimetallic instrument and a magnetoelectric instrument.

[0059] A real-time temperature reading system for a bimetallic thermometer is constructed, including a bimetallic thermometer, a camera and a computer, wherein the optical axis of the camera is perpendicular to the dial of the bimetallic thermometer, and the bimetallic thermometer is ensured to be within the field of view of the camera; in practical applications, the indication area of ​​the instrument can be placed at the center of the camera's screen, and the camera can be used to obtain an optical image of the indication area of ​​the instrument.

[0060] The camera collects the original optical image I1(x,y) of the bimetallic thermometer and transmits the optical image I1(x,y) to the computer.

[0061] Figure 4 FIG. 1 is a schematic diagram of the process of extracting the edge of a metal thermometer disk and roughly locating the center of the disk in an embodiment of the present invention. Figure 4 As shown, the optical image I1(x, y) is processed by median filtering to obtain Figure 4 Figure (a) in the figure, and then fill the filtered image with grayscale to get the filled image Figure 4 (b) Image I2(x,y) in Fig. 1; then, the Hough transform detection method is used to extract the disk edge C(x,y) of the bimetallic thermometer, as shown in Figure 4 As shown in Figure (c) in the figure. The radius of the disk is R1. The basic principle of the Hough transform detection method is to take a parameter plane that is the same as the image plane, take each non-zero point on the image as the center of the circle, draw a circle on the parameter plane with a known radius, and finally find the peak value on the parameter plane, which corresponds to the center of the circle in the original image.

[0062] In practical applications, when the central axis of the camera is not completely perpendicular to the instrument panel, the captured image may have certain optical distortion. Therefore, the affine transformation method can be used to transform the image into a normal optical image.

[0063] S102: Calculate the center position of the instrument using a geometric method based on the edge information.

[0064] Take the disk edge C(x,y) as the circumference and the disk radius R1 as the radius to draw a circle, and the center of the fitted disk is (x1,y1).

[0065] S103: extracting a pixel region corresponding to the instrument according to the center position and the shape of the instrument, binarizing the pixel region using a maximum between-class algorithm, and calculating a first centroid corresponding to the pixel region according to the binarized image.

[0066] Take the center (x1, y1) as the center and Figure 4 A rectangular ROI image is extracted from Figure (c) as Figure 5 In (b) J1(m,n), the length of the rectangular ROI image J1(m,n) is greater than the diameter of the disk, that is, 2R1, and the height of the rectangular ROI image J1(m,n) is also greater than the diameter of the disk. In practical applications, a circular ROI image J1(m,n) can also be extracted. It can be understood that the diameter of the circular ROI image J1(m,n) should be slightly greater than the diameter of the disk.

[0067] Figure 5 FIG. 1 is a schematic diagram of a process for accurately locating the center of a circle in an embodiment of the present invention. Figure 5 As shown, the binary image obtained by binarizing the ROI image J1(m,n) is Figure 5 (c) Figure J2(m,n) in the figure, and then find its first centroid (x2, y2) according to the coordinate distribution characteristics of the pixels in the binary image J2(m,n) as follows: Figure 5 As shown in Figure (d), the center of mass is the precisely located center of the circle (x2, y2), and the center of the circle (x2, y2) corresponds to Figure 5 In practical applications, the average value of the pixel coordinates in the binary image J2(m,n) can be used as the first centroid. For example, the formula can be used: Calculate the first centroid corresponding to the pixel area, where

[0068] x2 is the horizontal coordinate of the first centroid; A is the number of pixels in the binary image corresponding to the image; m is the horizontal coordinate of the pixel in the binary image corresponding to the image; ∑ is the summation function; G is the image corresponding to the binary image; n is the vertical coordinate of the pixel in the binary image corresponding to the image; y2 is the vertical coordinate of the first centroid. It should be emphasized that when the binary image is a rectangular ROI image J1(m,n), G is the area encircled by the edge C(x,y) of the disk in the rectangular ROI image J1(m,n).

[0069] S104: Create a first mask image M1 (x, y) on the pixel area with the first centroid (x2, y2) as the center and R1 as the radius.

[0070] Figure 6 Schematic diagram of the process of thermometer dial extraction in an embodiment of the present invention, Figure 6 As shown, using the formula, I3(x,y)=I2(x,y)-I1(x,y), the difference image is obtained by subtracting the optical image from the grayscale filled image, where:

[0071] I3(x,y) is the difference image, such as Figure 6 (c) in Figure 1; I2(x,y) is the image after grayscale filling, as shown in Figure 6 (b) in Figure 1; I1(x,y) is the optical image, such as Figure 6 Figure (a) in .

[0072] The difference image I3(x, y) is subjected to hole filling processing to obtain a hole filling image I4(x, y), and the hole filling image I4(x, y) is ANDed with the first mask image M1(x, y) to obtain a disk image I5(x, y) of the instrument optical image.

[0073] S105: using a connected domain algorithm to obtain a pointer region Z(u,v) in the disk image I5(x,y), and obtaining a pointer length corresponding to the pointer region according to distribution characteristics of pixels in the pointer region Z(u,v).

[0074] The existing connected domain algorithm can be used to identify the pointer area. Figure 7 FIG. 1 is a schematic diagram of a process for calibrating a thermometer pointer in an embodiment of the present invention. Figure 7 As shown, the disk image I5(x,y) is Figure 7 Figure (a) in the figure; Figure 7 Figure (c) shows the pointer area Z(u,v).

[0075] According to the trigonometric relationship, the distance between all points in the pointer area Z(u,v) and the first centroid (x2,y2) is calculated. The farthest corresponding point is recorded as (x3,y3), and its distance to the first centroid (x2,y2) is the maximum distance recorded as R2, which is the pointer length.

[0076] Specifically, we can use the formula according to the pointer area Z(u,v), Get the pointer length corresponding to the pointer area, where:

[0077] R2 is the pointer length; x3 is the horizontal coordinate of the farthest point from the first centroid (x2, y2) in the pointer area Z(u, v); y3 is the vertical coordinate of the farthest point from the first centroid (x2, y2) in the pointer area Z(u, v); x2 is the horizontal coordinate of the first centroid; y2 is the vertical coordinate of the first centroid.

[0078] S106: Create a second mask image M2 (x, y) with the first centroid (x2, y2) as the center of the circle and the pointer length R2 as the radius.

[0079] Figure 8 FIG. 2 is another schematic diagram of a process of extracting a thermometer dial in an embodiment of the present invention. Figure 8 As shown, Figure 8 Figure (a) is the disk image I5(x,y); Figure 8The image (b) is the second mask image M2(x,y); Figure 8 The image (c) is the second mask image M2(x,y); Figure 8 In the image (d), the two straight lines other than the pointer are the first straight line L1 and the second straight line L2.

[0080] Performing an AND operation on the second mask image M2(x, y) and the disk image I5(x, y) to obtain a target image F(p, q); obtaining the second centroid (a, b) of each connected domain area in the target image F(p, q), wherein the second centroid (a, b) is the centroid of the starting scale line in the image F(p, q), and the second centroid (c, d) is the centroid of the ending scale line in the image F(p, q);

[0081] Connect the second centroid (a, b) with the first centroid (x2, y2), and the second centroid (c, d) with the center of the circle (x2, y2) to obtain the first straight line L1 and the second straight line L2 respectively.

[0082] Then, using the formula, Calculate the angle between the first centroid and the line connecting each second centroid, where

[0083] is the direction vector of the first straight line L1 between the second centroid of the connected domain corresponding to the starting scale and the first centroid (x2, y2); a is the abscissa of the second centroid of the connected domain corresponding to the starting scale in the target image F(p, q); b is the ordinate of the second centroid of the connected domain corresponding to the starting scale in the target image F(p, q); c is the abscissa of the second centroid of the connected domain corresponding to the measurement value scale in the target image F(p, q); d is the ordinate of the second centroid of the connected domain corresponding to the measurement value scale in the target image F(p, q); is the direction vector of the axis of the pointer area Z(u,v); is the direction vector of the second straight line L2 between the second centroid and the first centroid (x2, y2) of the connected domain corresponding to the measurement value scale; arccos is the inverse cosine function; α is the angle between the pointer and the first straight line L1; β is the angle between the pointer and the second straight line L2.

[0084] Then, according to the angle between the first centroid and the connecting line of each second centroid, use the formula: Identify the measurement value of the instrument, where

[0085] T is the measured value of the instrument; S is the range of the instrument.

[0086] By applying the present invention, the measurement value of the instrument pointer is read using camera-based image recognition calculation, and the measurement value can be obtained by taking a photo. Compared with manual reading, it does not require the naked eye identification process and is faster.

[0087] Furthermore, the present invention provides a measurement value identification method which is completely different from the prior art, which can not only identify the measurement value but also avoid errors caused by manual reading.

[0088] Furthermore, in the technical solution of the present invention, the measurement personnel can stand at a farther distance and use the high resolution of the camera to read the measurement values ​​at a long distance. There is no need for the measurement personnel to approach the thermometer to read the values, thereby ensuring the personal safety of the measurement personnel.

[0089] At the same time, in areas with dense instruments, or on data monitoring panels for placing a large number of instruments, a camera can be used to capture two or more instruments into one image, and the measurement values ​​of two or more instruments can be identified at the same time, which can improve the reading speed compared to manual reading one by one.

[0090] Finally, the image processing algorithm adopted in the embodiment of the present invention has a simple principle, less calculation amount, higher operation efficiency, and does not require high hardware parameters of the device.

[0091] Example 2

[0092] Embodiment 2 of the present invention provides a device for reading a measured value of a pointer-type instrument, the device comprising:

[0093] An acquisition module, used for acquiring an optical image of an instrument indication area, and sequentially performing median filtering, grayscale filling and Hough transformation on the optical image to obtain edge information of the instrument, wherein the instrument includes one or a combination of a bimetallic instrument and a magnetoelectric instrument;

[0094] A calculation module, used to calculate the center position of the instrument using a geometric method according to the edge information;

[0095] A processing module, used for extracting a pixel area corresponding to the instrument according to the center position and the shape of the instrument, performing a binarization process on the pixel area, and calculating a first centroid corresponding to the pixel area according to the binarized image;

[0096] A difference module is used to create a first mask image on the pixel area with the first centroid as the center of the circle; obtain a difference image by subtracting the optical image from the grayscale filled image; perform hole filling processing on the difference image to obtain a hole filling image, and perform an AND operation on the hole filling image and the first mask image to obtain a disk image of the instrument optical image;

[0097] A connectivity module, used for obtaining a pointer region in the disk image by using a connectivity domain algorithm, and obtaining a pointer length corresponding to the pointer region according to distribution characteristics of pixel points in the pointer region;

[0098] The recognition module is used to create a second mask image with the first centroid as the center of the circle and the pointer length as the radius, and perform an AND operation on the second mask image and the disk image to obtain a target image; obtain the second centroid of each connected domain area in the target image, and identify the measurement value of the instrument according to the angle between the first centroid and the connecting line of each second centroid.

[0099] Example 3

[0100] Embodiment 3 of the present invention provides a pointer-type instrument measurement value reading system, the system comprising: a camera, a computer, wherein:

[0101] The camera is used to capture an optical image of the instrument indication area and send the optical image to a computer;

[0102] The computer is used to execute the method described in any one of Embodiments 1 or 2.

[0103] Optionally, the system further includes: a communication device, a storage device and a human-computer interaction device, wherein:

[0104] The communication device is used to send the optical image and the instrument measurement value to the storage device;

[0105] The storage device is used to store the optical image and the instrument measurement value;

[0106] The human-computer interaction device is used to receive a user's query instruction and obtain the corresponding optical image and instrument measurement value from the storage device according to the query instruction.

[0107] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for reading the measured value of a pointer instrument, characterized in that: The method comprises: Acquire an optical image of the instrument indication area, and sequentially perform median filtering, grayscale filling, and Hough transformation on the optical image to obtain edge information of the instrument, wherein the instrument includes one or a combination of a bimetallic instrument and a magnetoelectric instrument; According to the edge information, the center position of the instrument is calculated by using a geometric method; Extracting a pixel area corresponding to the instrument according to the center position and the shape of the instrument, performing binarization processing on the pixel area, and calculating a first centroid corresponding to the pixel area according to the binarized image; A first mask image is created on the pixel area with the first centroid as the center of the circle; a difference image is obtained by subtracting the optical image from the grayscale filled image; a hole filling process is performed on the difference image to obtain a hole filling image, and the hole filling image is ANDed with the first mask image to obtain a disk image of the instrument optical image; A connected domain algorithm is used to obtain a pointer region in the disk image, and a pointer length corresponding to the pointer region is obtained according to distribution characteristics of pixel points in the pointer region; Taking the first centroid as the center of the circle and the pointer length as the radius, a second mask image is created, and the second mask image is ANDed with the disk image to obtain a target image; obtaining the second centroid of each connected domain area in the target image, and identifying the measurement value of the instrument according to the angle between the first centroid and the connecting line of each second centroid; The angle between the first mass center and the connecting line of each second mass center includes: Using the formula, Calculate the angle between the first centroid and the line connecting each second centroid, where is the direction vector of the first straight line L1 between the second centroid of the connected domain corresponding to the starting scale and the first centroid (x2, y2); a is the abscissa of the second centroid of the connected domain corresponding to the starting scale in the target image F(p, q); b is the ordinate of the second centroid of the connected domain corresponding to the starting scale in the target image F(p, q); c is the abscissa of the second centroid of the connected domain corresponding to the measurement value scale in the target image F(p, q); d is the ordinate of the second centroid of the connected domain corresponding to the measurement value scale in the target image F(p, q); is the direction vector of the axis of the pointer area Z(u,v); is the direction vector of the second straight line L2 between the second centroid and the first centroid (x2, y2) of the connected domain corresponding to the measurement value scale; arccos is the inverse cosine function; α is the angle between the pointer and the first straight line L1; β is the angle between the pointer and the second straight line L2.

2. A method for reading measured values ​​of a pointer instrument according to claim 1, characterized in that: The step of acquiring an optical image of the instrument indication area comprises: The indication area of ​​the instrument is placed at the center of the camera's screen, and the camera is used to obtain an optical image of the indication area of ​​the instrument.

3. A method for reading measured values ​​of a pointer instrument according to claim 1, characterized in that: The step of calculating the first centroid corresponding to the pixel area according to the binary image includes: Using the formula, Calculate the first centroid corresponding to the pixel area, where x2 is the horizontal coordinate of the first centroid; A is the number of pixels in the image corresponding to the binary image; m is the horizontal coordinate of the pixel in the image corresponding to the binary image; ∑ is the summation function; G is the image corresponding to the binary image; n is the vertical coordinate of the pixel in the image corresponding to the binary image; y2 is the vertical coordinate of the first centroid.

4. A method for reading measured values ​​of a pointer instrument according to claim 1, characterized in that: The difference image is obtained by subtracting the optical image from the grayscale filled image. include: Using the formula, I3(x,y)=I2(x,y)-I1(x,y), the difference image is obtained by subtracting the optical image from the grayscale filled image, where: I3(x,y) is the difference image; I2(x,y) is the image after grayscale filling; I1(x,y) is the optical image.

5. A method for reading measured values ​​of a pointer instrument according to claim 1, characterized in that: The acquiring the pointer length corresponding to the pointer area according to the distribution characteristics of the pixels in the pointer area includes: According to the pointer area Z(u,v) using the formula, Get the pointer length corresponding to the pointer area, where: R2 is the pointer length; x3 is the horizontal coordinate of the farthest point from the first centroid (x2, y2) in the pointer area Z(u, v); y3 is the vertical coordinate of the farthest point from the first centroid (x2, y2) in the pointer area Z(u, v); x2 is the horizontal coordinate of the first centroid; y2 is the vertical coordinate of the first centroid.

6. A method for reading measured values ​​of a pointer instrument according to claim 1, characterized in that: The step of identifying the measurement value of the instrument according to the angle between the lines connecting the first mass center and each second mass center includes: According to the angle between the first centroid and the connecting line of each second centroid, using the formula, Identify the measurement value of the instrument, where T is the measured value of the instrument; S is the range of the instrument.

7. A pointer-type instrument measurement value reading device, characterized in that: The device comprises: An acquisition module, used for acquiring an optical image of an instrument indication area, and sequentially performing median filtering, grayscale filling and Hough transformation on the optical image to obtain edge information of the instrument, wherein the instrument includes one or a combination of a bimetallic instrument and a magnetoelectric instrument; A calculation module, used to calculate the center position of the instrument using a geometric method according to the edge information; A processing module, used for extracting a pixel area corresponding to the instrument according to the center position and the shape of the instrument, performing a binarization process on the pixel area, and calculating a first centroid corresponding to the pixel area according to the binarized image; A difference module is used to create a first mask image on the pixel area with the first centroid as the center of the circle; obtain a difference image by subtracting the optical image from the grayscale filled image; perform hole filling processing on the difference image to obtain a hole filling image, and perform an AND operation on the hole filling image and the first mask image to obtain a disk image of the instrument optical image; A connectivity module, used for obtaining a pointer region in the disk image by using a connectivity domain algorithm, and obtaining a pointer length corresponding to the pointer region according to distribution characteristics of pixel points in the pointer region; The recognition module is used to create a second mask image with the first centroid as the center of the circle and the pointer length as the radius, and perform an AND operation on the second mask image and the disk image to obtain a target image; obtain the second centroid of each connected domain area in the target image, and identify the measurement value of the instrument according to the angle between the first centroid and the connecting line of each second centroid; The identification module is further used for: Using the formula, Calculate the angle between the first centroid and the line connecting each second centroid, where is the direction vector of the first straight line L1 between the second centroid of the connected domain corresponding to the starting scale and the first centroid (x2, y2); a is the abscissa of the second centroid of the connected domain corresponding to the starting scale in the target image F(p, q); b is the ordinate of the second centroid of the connected domain corresponding to the starting scale in the target image F(p, q); c is the abscissa of the second centroid of the connected domain corresponding to the measurement value scale in the target image F(p, q); d is the ordinate of the second centroid of the connected domain corresponding to the measurement value scale in the target image F(p, q); is the direction vector of the axis of the pointer area Z(u,v); is the direction vector of the second straight line L2 between the second centroid and the first centroid (x2, y2) of the connected domain corresponding to the measurement value scale; arccos is the inverse cosine function; α is the angle between the pointer and the first straight line L1; β is the angle between the pointer and the second straight line L2.

8. A pointer instrument measurement value reading system, characterized in that: The system comprises: a camera and a computer, wherein: The camera is used to capture an optical image of the instrument indication area and send the optical image to a computer; The computer is used to execute the method according to any one of claims 1 to 6.

9. A pointer instrument measurement value reading system according to claim 8, characterized in that: The system also includes: a communication device, a storage device and a human-computer interaction device, wherein: The communication device is used to send the optical image and the instrument measurement value to the storage device; The storage device is used to store the optical image and the instrument measurement value; The human-computer interaction device is used to receive a user's query instruction and obtain the corresponding optical image and instrument measurement value from the storage device according to the query instruction.