Pointer-type instrument reading method, device, equipment and medium integrating annotation information
By preset the grid code on the dial of the pointer meter, and use the location information of these square codes for transformation correction, the high -precision readings of the pointer icon are realized, and the accuracy of the readings in the existing technology is The problem of not high stability.
Patent Information
- Application Number
- CN202111383377.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-19
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2041-11-19
AI Technical Summary
The reading method of existing pointer instruments has problems such as poor reading accuracy and low algorithm stability in substation scenarios, especially in complex backgrounds, image offsets, lighting changes and harsh environments.
By preset the grid code on the dial of the pointer meter, the location information of the square code is used to match the standard instrument picture, calculate the radiation transformation matrix, and transform and corrected the pointer area of the pointer area of the test pointer. Implement pointer recognition and reading.
It improves the accuracy and speed of the intelligent reading of the pointer instrument in the substation scene, solve the problem of inaccurate reading, and improve the accuracy of the number of meters.
Smart Images

Figure CN114187460B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of instruments and meters, and in particular to a method, device, equipment and medium for reading pointer-type instruments integrating annotation information. Background Art
[0002] Pointer meters are widely used in power systems, such as sulfur hexafluoride pressure gauges, pressure gauges, and lightning arrester instruments in substations. If manual monitoring is used to identify and detect such instruments, a lot of manpower and material resources will be consumed, and there will be large deviations in data reading. With the rapid development of electronic information technology, all walks of life are moving towards digitalization and intelligence. In the substation scenario, intelligent inspection systems have also been gradually introduced. For example, image acquisition equipment is installed on the inspection robot, and the image acquisition equipment is used to collect the dial image of the lightning arrester instrument, and the reading is carried out in conjunction with some identification methods.
[0003] Although the specific implementation steps of existing meter recognition methods are different, the overall ideas and technical routes are similar. For example, the application numbers are 202110698635.3, 202110637798.0, 202110822252.2 and 201711484281.2, which are basically completed by digital image processing technology. Since the images to be detected have complex backgrounds, and the images may be offset or the lighting changes, coupled with the harsh outdoor environment and the various shapes of the meter needles, there may be great interference in the image processing process, resulting in poor meter reading accuracy and low algorithm stability.
[0004] For example, the patent "Pointer Meter Physical Information Reading Method Based on Coding Mark Information" with application number CN202110655821.9 adopts coding marks, but has the following problems and defects: the coding marks are manually pasted, which has a large workload and the pasting position is prone to deviation, and cannot be effectively applied in actual substation scenarios; the positions of the coding marks and scales are not fixed, and the scale recognition in the standard instrument image needs to be completed through image processing; this technical solution only performs feature calibration of two grid codes, so only homography transformation can be achieved when converting the standard instrument image and the image to be tested. Summary of the invention
[0005] In order to solve the above technical problems, the present invention proposes a pointer meter reading method integrating annotation information. In order to achieve the above purpose, the technical solution of the present invention is as follows:
[0006] The method for reading a pointer-type instrument integrating annotation information comprises the following steps:
[0007] Get the picture of the pointer instrument to be tested;
[0008] Obtaining a pointer area image based on the grid code in the image of the pointer instrument to be detected;
[0009] Matching the position information of the grid code in the pointer area picture of the pointer instrument to be detected with the position information of the grid code in the standard instrument picture, and calculating the radiation transformation matrix from the pointer area picture of the pointer instrument to be detected to the standard instrument picture;
[0010] The image of the pointer area of the pointer instrument to be inspected is transformed and corrected by using the radiation transformation matrix;
[0011] Performing pointer recognition on the transformed pointer area image;
[0012] The position information of the endpoints of the two scale lines closest to the pointer is obtained according to the relative position relationship between the grid code, the scale lines and the pointer, and the pointer reading is calculated based on the position information of the two endpoints.
[0013] Preferably, the grid code is set at a specific position of the dial during the production stage of the pointer meter based on the manufacturing process.
[0014] Preferably, the specific positions of the dial are the three corners including the scale lines, the pointer and the effective identification area of the pointer reading.
[0015] Preferably, the effective identification area is rectangular.
[0016] Preferably, the step of matching the position information of the grid code in the pointer area picture of the pointer instrument to be detected with the position information of the grid code in the standard instrument picture and calculating the radiation transformation matrix from the pointer area picture of the pointer instrument to be detected to the standard picture specifically includes the following steps:
[0017] Obtain the pixel coordinates of each grid code in the pointer area image of the pointer instrument to be detected and the standard instrument image, and obtain the pixel coordinate pairs of the four vertices in each grid code;
[0018] Based on the pixel coordinate pairs and the affine transformation relationship, a radial transformation matrix from the pointer area image of the pointer instrument to be detected to the standard image is calculated.
[0019] Preferably, the needle recognition method includes straight line detection and image segmentation.
[0020] Preferably, the calculation formula of the pointer reading y is as follows:
[0021]
[0022] Among them, l1 and l2 are the straight-line distances between the endpoints of the two scale lines closest to the pointer and the pointer, and l1 represents the straight-line distance between the endpoint of the two scale lines closer to the 0 scale line and the pointer, and i represents the corresponding reading value of the two scale lines closer to the 0 scale line.
[0023] The pointer-type instrument reading device integrating annotation information comprises: an acquisition module, an image extraction module, a generation module, a transformation correction module, a pointer extraction module and a reading module, wherein:
[0024] The acquisition module is used to acquire the picture of the pointer instrument to be detected;
[0025] The image extraction module is used to obtain a pointer area image based on the grid code in the pointer instrument image to be detected;
[0026] The generating module is used to match the position information of the grid code in the pointer area picture of the pointer instrument to be detected with the position information of the grid code in the standard instrument picture, and calculate the radiation transformation matrix from the pointer area picture of the pointer instrument to be detected to the standard instrument picture;
[0027] The transformation correction module is used to transform and correct the pointer area image of the pointer instrument to be detected by using the radiation transformation matrix;
[0028] The pointer extraction module is used to perform pointer recognition on the transformed pointer area image;
[0029] The reading module is used to obtain the position information of the two scale points closest to the pointer in the scale line according to the relative position relationship between the grid code, the scale line and the pointer, and calculate the pointer reading based on the position information of the two endpoints.
[0030] A computer device comprises: a memory for storing a computer program; and a processor for implementing any of the above-mentioned pointer-type instrument reading methods integrating annotation information when executing the computer program.
[0031] A readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for reading a pointer-type instrument integrating any of the above-mentioned annotation information is implemented.
[0032] Based on the above technical solution, the beneficial effect of the present invention is that the present invention can be widely used in pointer-type instrument equipment in substation scenarios. With minimal cost increase, the use of the pre-placed meter grid code can effectively ensure the accuracy and speed of the intelligent reading of the pointer-type instrument equipment. Compared with the traditional method of simply relying on image processing software for meter reading, it effectively solves the problem of inaccurate meter readings in the intelligent patrol system in the substation scenario, improves the accuracy of meter readings in this scenario by one level, and provides a better solution for pointer-type meter readings in the intelligent substation patrol scenario. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 is a flow chart of a method for reading a pointer-type instrument that incorporates annotation information in an embodiment;
[0034] Figure 2 This is the structure diagram of a standard QR code;
[0035] Figure 3 The present invention is a dial diagram after adding a grid code in a pointer-type instrument reading method integrating annotation information in an embodiment;
[0036] Figure 4 right Figure 3 Diagram of the dial with the middle endpoints highlighted;
[0037] Figure 5 is a picture of a pointer-type instrument to be detected collected in a method for reading a pointer-type instrument incorporating annotation information in an embodiment;
[0038] Figure 6 yes Figure 5 Middle pointer area picture;
[0039] Figure 7 It is a schematic diagram of matching the position information of the grid code in the pointer area picture of the pointer-type instrument to be detected with the position information of the grid code in the standard instrument picture in the pointer-type instrument reading method integrating the annotation information in an embodiment;
[0040] Figure 8 It is the pointer area image after transformation and correction using the affine transformation matrix;
[0041] Fig. 9 The present invention is a schematic diagram of a pointer in a method for reading a pointer-type instrument integrating annotation information in an embodiment;
[0042] Fig.10 The diagram is a schematic diagram of the relationship between a pointer, a grid code and a scale line in a pointer-type instrument reading method integrating annotation information in an embodiment;
[0043] Fig.11The diagram is a schematic diagram of the straight-line distance between two endpoints a and b closest to the pointer in a pointer-type instrument reading method integrating annotation information in an embodiment;
[0044] Fig.12 The diagram is an application environment diagram of a pointer-type instrument reading method integrating annotation information in an embodiment. DETAILED DESCRIPTION
[0045] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0046] The pointer meter reading method integrating annotation information provided by the embodiment of the present invention particularly relates to the pointer meter reading scenario in the substation scenario. By presetting the grid code at a fixed position on the marking dial and cooperating with the algorithm using these feature points later, the pointer meter reading can be realized more accurately and quickly. The main technical solution includes hardware and software parts, which are described in detail as follows:
[0047] Hardware part: Three grid codes with significant features are preset at the boundaries of the effective area of the pointer of the traditional pointer meter. This solution is mainly inspired by QR codes, such as Figure 2 The following is a diagram showing the structure of a standard QR code. Figure 2 The three blocks located at the upper left, upper right, and lower left of the QR code are called Position Detection Patterns, which are used to quickly locate the QR code image. The present invention draws on the positioning pattern in the QR code, and also presets a grid code at the boundary position of the pointer effective area of the pointer meter to facilitate subsequent algorithm recognition and calculation. The shape and position of the grid code are arranged to imitate the position detection pattern in the QR code. Figure 3 As shown in the figure, with this hardware specifically enhanced for algorithm recognition, the accompanying software system can quickly and accurately identify meter readings with minimal impact on the complexity of the production process.
[0048] Software part: Specific processing flow is as follows Figure 1 As shown, including but not limited to meter identification / extraction / correction, pointer identification, and meter reading, it is possible to quickly and accurately read the pointer meters in the substation.
[0049] In order to more specifically illustrate the algorithm steps of the software process, the specific effects of each step in the algorithm are exemplified in the accompanying drawings, and the specific steps include:
[0050] Step 1: For a pointer-type meter with preset grid code position information, the relative position of the grid code position and the end point of the scale line on the dial is fixed, such as Figure 4 , 10As shown in the figure, the endpoints are emphasized in the figure. There are no emphasized endpoints in the real dial. It is only used for illustration here. The grid code is set in the production process of pointer instruments based on the manufacturing process. Not only is the workload minimal, but it can also effectively ensure that the position of the coded information on the dial is relatively fixed.
[0051] Step 2: Use inspection equipment to sample the pointer-type meter with grid code information in the substation, and obtain the image of the pointer-type meter to be inspected. Figure 5 As shown;
[0052] Step 3: The actual area of the meter can be quickly located through the preset grid code, and the valid content is extracted to obtain the pointer area image as shown in the figure. Figure 6 As shown;
[0053] Step 4, use the location information of the grid code and match it with the grid code of the standard instrument image, such as Figure 7 As shown; calculate the radiation transformation matrix from the actual scene photo to the standard photo. Compared with other feature matching methods, the method based on the preset grid code involved in the present invention has higher accuracy and faster speed because it eliminates the interference of other features;
[0054] Step 5, such as Figure 8 As shown in the figure, the picture of the pointer instrument to be detected in the actual scene is corrected by using the affine transformation matrix; and the subsequent reading operation is performed on this basis;
[0055] Step 6, firstly, the pointer is identified on the image 8. The methods used in this step include but are not limited to line detection, image segmentation and other technologies, which can extract the pointer from the image. Only the result of the pointer is shown. Fig. 9 As shown;
[0056] Step 7, as described in step 1, the relative position of the grid code and the scale line is fixed, and according to the previous step, the relative position relationship between the identification pointer and the preset grid code can be calculated. By combining the position relationship between them, the specific meter reading is calculated, such as Fig.10 As shown;
[0057] Step 8, obtain the nearest two endpoints a and b through the straight-line distance between the endpoint of each scale line in the preset scale and the identification pointer, where endpoint a is closer to the 0 scale line; Fig.11 The figure shows the straight-line distance between the two endpoints a and b closest to the pointer. The calculation formula for the specific reading pointed by the pointer is as follows:
[0058]
[0059] Where i represents the reading value corresponding to the smaller of the two endpoints; l1 and l2 are the straight-line distances between the endpoints a and b of the scale line and the pointer respectively.
[0060] In one embodiment, a pointer-type instrument reading device integrating annotation information includes: an acquisition module, an image extraction module, a generation module, a transformation correction module, a pointer extraction module and a reading module, wherein:
[0061] The acquisition module is used to acquire the picture of the pointer instrument to be detected;
[0062] The image extraction module is used to obtain a pointer area image based on the grid code in the pointer instrument image to be detected;
[0063] The generating module is used to match the position information of the grid code in the pointer area picture of the pointer instrument to be detected with the position information of the grid code in the standard instrument picture, and calculate the radiation transformation matrix from the pointer area picture of the pointer instrument to be detected to the standard instrument picture;
[0064] The transformation correction module is used to transform and correct the pointer area image of the pointer instrument to be detected by using the radiation transformation matrix;
[0065] The pointer extraction module is used to perform pointer recognition on the transformed pointer area image;
[0066] The reading module is used to obtain the position information of the two scale points closest to the pointer in the scale line according to the relative position relationship between the grid code, the scale line and the pointer, and calculate the pointer reading based on the position information of the two endpoints.
[0067] The devices and modules described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0068] In one embodiment, the pointer meter reading method integrating annotation information can be applied to Fig.12 In the application environment shown. Fig.12As shown, the application environment includes a computer device 110. The computer device 110 can obtain a picture of a pointer-type instrument to be detected; the computer device 110 can obtain a picture of a pointer region based on a grid code in the picture of the pointer-type instrument to be detected; the computer device 110 can match the position information of the grid code in the picture of the pointer-type instrument to be detected with the position information of the grid code in the picture of the standard instrument, and calculate a radiation transformation matrix from the picture of the pointer region of the pointer-type instrument to be detected to the picture of the standard instrument; the computer device 110 can transform and correct the picture of the pointer region of the pointer-type instrument to be detected using the radiation transformation matrix; the computer device 110 can perform pointer recognition on the transformed picture of the pointer region; the computer device 110 can obtain the position information of the endpoints of the two scale lines closest to the pointer based on the relative position relationship between the grid code, the scale line and the pointer, and calculate the pointer reading based on the position information of the two endpoints, wherein the computer device 110 can be, but not limited to, various personal computers, laptops, robots, tablet computers, etc.
[0069] In one embodiment, a readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the pointer meter reading method integrating annotation information as described above is implemented.
[0070] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0071] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0072] Each embodiment in the embodiments of this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
Claims
1. A pointer instrument reading method integrating annotation information, characterized in that: The steps include: Get the picture of the pointer instrument to be tested; Obtaining a pointer area image based on a grid code in the pointer instrument image to be detected, wherein the grid code is set at a specific position of the dial based on the manufacturing process during the production stage of the pointer meter, and the specific position of the dial is the three corners of the effective identification area including the scale line, the pointer, and the pointer reading; Matching the position information of the grid code in the pointer area picture of the pointer instrument to be detected with the position information of the grid code in the standard instrument picture, and calculating the affine transformation matrix from the pointer area picture of the pointer instrument to be detected to the standard instrument picture, specifically including the following steps: obtaining the pixel coordinates of each grid code in the pointer area picture of the pointer instrument to be detected and the standard instrument picture, respectively, to obtain the pixel coordinate pairs of the four vertices in each grid code; Based on the pixel coordinate pairs and the affine transformation relationship, calculating the affine transformation matrix from the pointer area image of the pointer instrument to be detected to the standard image; The pointer area image of the pointer instrument to be inspected is transformed and corrected using an affine transformation matrix; Performing pointer recognition on the transformed pointer area image; According to the relative position relationship between the grid code, scale line and pointer, the position information of the endpoints of the two scale lines closest to the pointer is obtained, and the pointer reading y is calculated based on the position information of the two endpoints. The calculation formula is as follows: Among them, l1 and l2 are the straight-line distances between the endpoints of the two scale lines closest to the pointer and the pointer, and l1 represents the straight-line distance between the endpoint of the two scale lines closer to the 0 scale line and the pointer, and i represents the corresponding reading value of the two scale lines closer to the 0 scale line.
2. The method for reading a pointer meter integrating annotation information according to claim 1, characterized in that: The effective recognition area is rectangular.
3. The method for reading a pointer-type instrument integrating annotation information according to claim 1, characterized in that: The pointer recognition method includes straight line detection and image segmentation.
4. A pointer-type instrument reading device integrating annotation information, characterized in that: include: Acquisition module, image extraction module, generation module, transformation correction module, pointer extraction module and reading module, wherein: The acquisition module is used to acquire the image of the pointer instrument to be detected; The image extraction module is used to obtain a pointer area image based on a grid code in the pointer instrument image to be detected, wherein the grid code is set at a specific position of the dial based on the manufacturing process during the production stage of the pointer meter, and the specific position of the dial is the three corners of the effective identification area including the scale line, the pointer and the pointer reading; The generation module is used to match the position information of the grid code in the pointer area picture of the pointer instrument to be detected with the position information of the grid code in the standard instrument picture, and calculate the affine transformation matrix from the pointer area picture of the pointer instrument to be detected to the standard instrument picture, which specifically includes the following steps: obtaining the pixel coordinates of each grid code in the pointer area picture of the pointer instrument to be detected and the standard instrument picture, respectively, to obtain the pixel coordinate pairs of the four vertices in each grid code; based on each of the pixel coordinate pairs and the affine transformation relationship, calculating the affine transformation matrix from the pointer area picture of the pointer instrument to be detected to the standard picture; The transformation correction module is used to transform and correct the pointer area image of the pointer instrument to be detected by using an affine transformation matrix; The pointer extraction module is used to perform pointer recognition on the transformed pointer area image; The reading module is used to obtain the position information of the two scale points closest to the pointer in the scale line according to the relative position relationship between the grid code, the scale line and the pointer, and calculate the pointer reading y based on the position information of the two endpoints. The calculation formula is as follows: Among them, l1 and l2 are the straight-line distances between the endpoints of the two scale lines closest to the pointer and the pointer, and l1 represents the straight-line distance between the endpoint of the two scale lines closer to the 0 scale line and the pointer, and i represents the corresponding reading value of the two scale lines closer to the 0 scale line.
5. A computer device, characterized in that: include: Memory for storing computer programs; A processor is used to implement the pointer instrument reading method integrating annotation information as described in any one of claims 1 to 3 when executing the computer program.
6. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the pointer-type instrument reading method integrating annotation information as claimed in any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
A method and system for identifying meter readings
CN108182433B
Pointer type meter reading method and device and storage medium
CN113269193A
A method for reading liquid level gauges based on deep convolutional neural networks.
CN113283429B
Lightning arrester instrument real-time identification method and system
CN113435300A
Pointer type meter physical information reading method based on coded mark information
CN113450384A