A contactless data collection method for instruments by an Internet of Things gateway

Through the Internet of Things gateway, the RGB image of the transformer temperature controller is color separated and skeletonized, and combined with the character feature pattern recognition data of the digital tube, the problem of the lack of communication interface of the existing temperature controller is solved, and the data of the transformer temperature controller is realized. Contactless collection improves the convenience and accuracy of monitoring.

CN113449639BActive Publication Date: 2024-09-06SHENZHEN HIETECH ENERGY TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110724823.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-29
Publication Date
2024-09-06
Estimated Expiration
2041-06-29

AI Technical Summary

Technical Problem

The existing transformer temperature controller lacks a communication interface, making it difficult to implement cloud monitoring of IoT devices. In addition, the cost of replacing new temperature controllers is high and the construction is dangerous, which limits the deployment of cloud monitoring of transformer equipment data.

Method used

The non-contact data collection method of the Internet of Things gateway is used to obtain the RGB image of the transformer temperature controller, perform color separation, binarization, segmentation and skeletonization based on the RGB color space, and identify the current data based on the character characteristics of the digital tube.

Benefits of technology

It realizes contactless collection of transformer temperature controller data, improves the convenience, safety and reliability of monitoring, and reduces the accuracy and cost of data collection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113449639B
    Figure CN113449639B
Patent Text Reader

Abstract

The embodiment of the present invention discloses a contactless data collection method for an instrument by an Internet of Things gateway. The method includes: obtaining an RGB image of a transformer temperature controller; performing color separation and binarization on the RGB image based on the RGB color space to obtain a binary image that can distinguish the data area and the background area in the RGB image; segmenting the binary image based on the characters in the data area to obtain each character binary image; skeletonizing each character binary image to obtain a skeleton diagram corresponding to each character binary image; respectively counting the number of white pixels in each row and column in each skeleton diagram, and identifying the current display data of the transformer temperature controller in combination with the character feature rules of the digital tube in the transformer temperature controller. Thus, contactless collection of transformer temperature controller data is achieved, so that the data of the transformer temperature controller can be monitored more conveniently, safely and reliably.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of data collection, and in particular to a contactless data collection method for an Internet of Things gateway to an instrument. Background Art

[0002] In the power distribution system, transformer temperature controllers are often used to monitor the temperature of the three-phase wire package of the transformer, so as to automatically control the start and stop of the cooling fan, over-temperature alarm and even over-temperature tripping according to the temperature rise to ensure the safe operation of the power transformer.

[0003] Since the old-fashioned temperature controllers in the past basically have no communication interface or the communication interface cannot be connected, it is not convenient for collecting equipment cloud monitoring data under the general trend of the Internet of Things. If the new temperature controller with a communication interface is replaced, the cost is too high, and the second is that it is not convenient to shut down the power and the operation is dangerous and there are safety hazards, which greatly limits the deployment and implementation of equipment data cloud monitoring of transformers. Summary of the invention

[0004] The embodiment of the present invention provides a contactless data collection method for an instrument by an Internet of Things gateway, so as to realize contactless collection of transformer temperature controller data, thereby conveniently, safely and reliably monitoring the data of the transformer temperature controller.

[0005] In a first aspect, an embodiment of the present invention provides a contactless data collection method for an instrument by an Internet of Things gateway, the method comprising:

[0006] Get the RGB image of the transformer temperature controller;

[0007] Performing color separation and binarization on the RGB image based on the RGB color space to obtain a binary image capable of distinguishing a data area and a background area in the RGB image;

[0008] Segmenting the binary image based on the characters in the data area to obtain binary images of each character;

[0009] Skeletonizing each of the binary character images to obtain a skeleton graph corresponding to each of the binary character images;

[0010] The number of white pixels in each row and column in each skeleton diagram is counted respectively, and the current display data of the transformer temperature controller is identified in combination with the character feature rules of the digital tube in the transformer temperature controller.

[0011] In a second aspect, an embodiment of the present invention further provides a contactless data collection device for an instrument by an Internet of Things gateway, the device comprising:

[0012] An image acquisition module is used to acquire the RGB image of the transformer temperature controller;

[0013] A color separation module, used for performing color separation and binarization on the RGB image based on the RGB color space to obtain a binary image capable of distinguishing a data area and a background area in the RGB image;

[0014] An image segmentation module, used for segmenting the binary image based on the characters in the data area to obtain binary images of each character;

[0015] A skeletonization module, used for skeletonizing each of the binary character images to obtain a skeleton image corresponding to each of the binary character images;

[0016] The data recognition module is used to count the number of white pixels in each row and column in each skeleton diagram, and recognize the current display data of the transformer temperature controller in combination with the character feature rules of the digital tube in the transformer temperature controller.

[0017] In a third aspect, an embodiment of the present invention further provides a computer device, the computer device comprising:

[0018] one or more processors;

[0019] A memory for storing one or more programs;

[0020] When the one or more programs are executed by the one or more processors, the one or more processors implement the contactless data collection method for the instrument by the Internet of Things gateway provided in any embodiment of the present invention.

[0021] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the contactless data collection method for an instrument by an Internet of Things gateway provided in any embodiment of the present invention.

[0022] The embodiment of the present invention provides a contactless data collection method for an instrument by an Internet of Things gateway. First, an RGB image of a transformer temperature controller is obtained. Then, the RGB image is color-separated and binarized based on the RGB color space to obtain a binary image that can distinguish the data area and the background area. Then, the binary image is segmented based on the characters in the data area to obtain each character binary image. Then, each character binary image is skeletonized to obtain a corresponding skeleton image. By counting the number of white pixels in each row and column in the skeleton image, and combining the character feature rules of the digital tube, the current display data of the transformer temperature controller can be identified. The contactless data collection method for the instrument by the Internet of Things gateway provided by the embodiment of the present invention realizes the contactless collection of the transformer temperature controller data by adopting the image recognition method, so that the data of the transformer temperature controller can be monitored more conveniently, safely and reliably. At the same time, by first performing color separation on the RGB image of the transformer temperature controller based on the color space, the data area and the background area are well distinguished, thereby improving the accuracy of subsequent data recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 A flow chart of a contactless data collection method for an instrument by an Internet of Things gateway provided in Embodiment 1 of the present invention;

[0024] Figure 2 A schematic diagram of the structure of a digital tube provided in the first embodiment of the present invention;

[0025] Figure 3 A schematic diagram of exemplary skeleton image black and white pixel matrix data provided in Embodiment 1 of the present invention;

[0026] Figure 4 A schematic diagram of an exemplary character feature rule provided in the first embodiment of the present invention;

[0027] Figure 5 A schematic diagram of the structure of a contactless data collection device for an instrument using an Internet of Things gateway provided in the second embodiment of the present invention;

[0028] Figure 6 This is a schematic diagram of the structure of a computer device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0029] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0030] It should be mentioned before discussing the exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the steps as sequential processes, many of the steps therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the steps can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0031] Embodiment 1

[0032] Figure 1 This is a flow chart of the method for contactless data collection of instruments by the Internet of Things gateway provided in the first embodiment of the present invention. This embodiment is applicable to the case of contactless data collection of transformer temperature controllers. The method can be performed by the device for contactless data collection of instruments by the Internet of Things gateway provided in the embodiment of the present invention. The device can be implemented by hardware and / or software, and can generally be integrated into a computer device. The computer device can be, but is not limited to, an on-site Internet of Things data collection gateway in the power distribution room where the transformer temperature controller is located. Figure 1 As shown, the specific steps include:

[0033] S11. Obtain an RGB image of the transformer temperature controller.

[0034] Specifically, an RGB image of a transformer temperature controller can be read through the RTSP streaming media server of the distribution room monitoring camera. The RGB image can include the appearance of the complete transformer temperature controller and the complete data area for subsequent reading recognition. The method provided in this embodiment can be implemented by the on-site IoT data acquisition gateway in the distribution room. If the application image is transmitted to the cloud for recognition by the cloud, the time delay is too large and the traffic bandwidth and server computing resources are consumed. The present embodiment can realize distributed rapid data recognition through the existing distribution room monitoring camera and the edge computing function of the on-site IoT data acquisition gateway itself, so there is no need to add additional devices and cameras, and there is no need for cloud recognition to occupy server resources. It has the characteristics of fast data acquisition, high recognition rate and high economic benefits. Optionally, after obtaining the RGB image, the display area can be determined first, and the RGB image can be cropped according to the display area to reduce the interference of the surrounding background on the subsequent data processing process. Among them, the display area can be a rectangular area, and can be as small as possible on the basis of including all displayed characters.

[0035] S12. Performing color separation and binarization on the RGB image based on the RGB color space to obtain a binary image capable of distinguishing a data area and a background area in the RGB image.

[0036] Specifically, the traditional direct binarization method has a poor separation effect between the data and the background, which will make the final data unrecognizable. Therefore, this embodiment can first perform color separation on the acquired RGB image based on the RGB color space, and then perform binarization after color separation, so that the data area and the background area can be well distinguished, thereby greatly improving the recognition rate. After obtaining the binary image, the binary image can be further processed by Gaussian filtering and Canny edge detection, etc., so as to perform skeletonization later.

[0037] Optionally, the color separation and binarization of the RGB image based on the RGB color space includes: extracting the RGB value of each pixel in the RGB image; comparing the R value and / or G value in each RGB value with a preset threshold value, and if the R value and / or G value is greater than the preset threshold value, the corresponding pixel point is modified to white, otherwise the corresponding pixel point is modified to black. Specifically, RGB is the most important and common color model, which is established in the Cartesian coordinate system, based on the three basic colors of red, green and blue, and produces rich and extensive colors through different degrees of superposition. Since the digital tube in the transformer temperature controller is generally red or green and is luminous relative to the background, the brightness is higher than the background, so the illuminated segment in the digital tube usually presents a characteristic, that is, the R value or G value in the RGB value of the illuminated pixel point is relatively large, generally exceeding 240 or even reaching more than 250, so by setting a preset threshold to perform color separation preprocessing on the RGB image, a very ideal effect diagram of separating the data area (i.e., the illuminated part) from the background area can be obtained. Specifically, the RGB value of each pixel in the RGB image can be extracted, and then the R value and / or G value in each RGB value can be compared with the preset threshold value. If the R value and / or G value is greater than the preset threshold value, the corresponding pixel point can be determined as a pixel point in the data area and modified to white (RGB (255, 255, 255)), otherwise the corresponding pixel point can be determined as a pixel point in the background area and modified to black (RGB (0, 0, 0)), thereby obtaining a binary image that can distinguish between the data area and the background area. Among them, the size of the preset threshold can be dynamically modified according to the scene or the near and far mode, and can also be obtained by statistical pixel distribution calculation. In this embodiment, no specific limitation is made. Exemplarily, the preset threshold value can be 240. This method has better results than the traditional direct binarization method, and solves the problem that the traditional method cannot clearly separate the data and the background for some scenes, resulting in unrecognizable or inaccurate recognition.

[0038] S13, segmenting the binary image based on the characters in the data area to obtain binary images of each character.

[0039] Specifically, in order to facilitate the recognition of each character, after obtaining the binary image, the binary image can be segmented based on the characters to obtain the character binary image corresponding to each character. Specifically, the segmentation can be performed using the method of the minimum circumscribed rectangle of the outer contour, that is, first determine the outer contour of each character in the binary image, then determine the minimum circumscribed rectangle of each outer contour, and then the corresponding binary images of each character can be segmented according to each minimum circumscribed rectangle. Among them, the characters in the data area of ​​the transformer temperature controller can include (A, b, C, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9), where (A, b, C) represents three phases, and (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) are used to represent specific temperature values.

[0040] S14, skeletonizing each of the binary character images to obtain a skeleton graph corresponding to each of the binary character images.

[0041] Specifically, after obtaining each character binary image, each character binary image can be thinned to extract skeleton information for more effective analysis. Image Thinning, that is, the skeletonization of the character binary image, can thin it without changing the shape characteristics of the original image. Through the algorithm, some points are removed from the original image layer by layer, but the original shape is maintained until the skeleton of the image is obtained (which can be understood as the central axis of the image). After image thinning, the connectivity of the lines and the basic shape of the original image can be guaranteed, and the distortion at the intersection of the strokes can be reduced. The line strokes of the characters in the obtained skeleton image will become single pixels, which is convenient for subsequent data recognition according to the character feature rules of the digital tube.

[0042] S15, respectively counting the number of white pixels in each row and column in each skeleton diagram, and identifying the current display data of the transformer temperature controller in combination with the character feature rules of the digital tube in the transformer temperature controller.

[0043] Specifically, after obtaining the skeleton image corresponding to each character binary image, the specific character can be identified by counting the number of white pixels in each row and column in the skeleton image and comparing it with the character feature rules of the digital tube. After all characters are identified, all characters can be combined in the display order to obtain the current display data of the transformer temperature controller. For example, Figure 2As shown, the display of the digital tube includes seven segments (A, B, C, D, E, F, G), and the corresponding illuminated segment combination of each character is different. At the same time, if N segments among the A, G, and D segments are illuminated, the number of white pixels in all columns of the corresponding skeleton image will mostly be N. If N segments among the F and B segments are illuminated, the number of white pixels in the first half of the corresponding skeleton image will mostly be N. If N segments among the E and C segments are illuminated, the number of white pixels in the second half of the corresponding skeleton image will mostly be N. Therefore, the characters can be recognized according to the above-mentioned character feature rules.

[0044] Optionally, the number of white pixels in each row and column of each skeleton diagram is counted respectively, and the current display data of the transformer temperature controller is identified in combination with the character feature pattern of the digital tube in the transformer temperature controller, including: taking the value with the largest number of occurrences in the number of white pixels in each row in the first half of the rows of the skeleton diagram as the first eigenvalue; taking the value with the largest number of occurrences in the number of white pixels in each row in the second half of the rows of the skeleton diagram as the second eigenvalue; taking the value with the largest number of occurrences in the number of white pixels in each column of the skeleton diagram as the third eigenvalue; identifying the current display data according to the first eigenvalue, the second eigenvalue, the third eigenvalue and the character feature pattern.

[0045] Specifically, data recognition can be performed according to the above exemplary character feature rules. First, the value with the largest number of white pixels in each row of the first half of the skeleton image, each row of the second half of the skeleton image, and each column can be counted, and the first eigenvalue, the second eigenvalue, and the third eigenvalue can be obtained respectively. Then, the first eigenvalue, the second eigenvalue, and the third eigenvalue can be compared with the character feature rules to identify the data. For example, the black and white pixel matrix data in a skeleton image is as follows: Figure 3 As shown, 0 represents black pixels and 1 represents white pixels. Taking the image size of 32*24 pixels as an example, the number of white pixels in each row of the first half are (0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, where the value that appears most often is 2, that is, the first eigenvalue is 2. The number of white pixels in each row of the second half are (17,1,1,1,1,1,1,1,1,1,1,1,1,1,0), where the value that appears most often is 1, that is, the second eigenvalue is 1. The number of white pixels in each column of all columns are (0,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,27,0,0), where the value that appears most often is 1, that is, the third eigenvalue is 1. At the same time, the character feature rules are as follows Figure 4As shown, the character in the skeleton diagram can be identified as the number 4 based on the first eigenvalue 2, the second eigenvalue 1 and the third eigenvalue 1.

[0046] Optionally, after respectively counting the number of white pixels in each row and column of the skeleton diagram and identifying the current display data of the transformer temperature controller in combination with the character feature rules of the digital tube in the transformer temperature controller, it also includes: if the current display data is not successfully identified, further identifying the current display data using the template minimum matrix distance method; correspondingly, after segmenting the binary image based on the characters in the data area to obtain each character binary image, it also includes: adjusting the size of the character binary image according to the size of the preset template image used by the template minimum matrix distance method to obtain a standard character binary image.

[0047] Specifically, for some characters, such as Figure 4 As shown, if the eigenvalues ​​between 0 and A, or 2, 3 and 5 are the same, further identification is required. In addition, there may be a situation where the corresponding features are not counted, which also requires further identification. Then the template minimum matrix distance method can be used for further identification. The minimum matrix distance represents the best match or the highest credibility. Correspondingly, in order to facilitate the use of the template minimum matrix distance method, it is necessary to first adjust the character binary image and the preset template image used for comparison to the same size. Among them, the preset template image can be sampled and produced according to various scenes, and a universal or one character can be used to apply multiple different templates to solve the problem of character shooting deformation to adapt to various different scenes. Exemplarily, in this embodiment, a preset template image of 32*24 pixels with a total of 13 characters "A, b, C, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9" can be produced according to the characteristics of the transformer temperature controller. The pixel size can take into account the calculation complexity and recognition rate. In practical applications, it can also be adjusted according to needs. The larger the size, the greater the amount of calculation, and the distance calculation will be more accurate and delicate. Then the size of each character binary image is also adjusted to 32*24 pixels, so as to obtain each standard character binary image.

[0048] Further optionally, the template minimum matrix distance method is used to further identify the current display data, including: for each of the standard character binary images, traversing each white pixel on the standard character binary image, and determining the matrix distance between each white pixel on the standard character binary image and each white pixel on the target preset template image, and then accumulating the minimum matrix distance corresponding to each white pixel on the standard character binary image as the first distance; traversing each white pixel on the target preset template image, and determining the matrix distance between each white pixel on the target preset template image and each white pixel on the standard character binary image, and then accumulating the minimum matrix distance corresponding to each white pixel on the target preset template image as the second distance; determining half of the sum of the first distance and the second distance as the target distance between the standard character binary image and the target preset template image; wherein the preset template image includes multiple target preset template images, and the corresponding target distance is obtained for each target preset template image; and determining the target preset template image corresponding to the minimum target distance as the recognition result.

[0049] Specifically, the calculation formula of matrix distance is:

[0050]

[0051] Among them, x1 and x2 represent the row coordinates of the first white pixel in the standard character binary image and the row coordinates of the second white pixel in the target preset template image, respectively, y1 and y2 represent the column coordinates of the first white pixel and the column coordinates of the second white pixel, respectively. The matrix distance between any two white pixels in the standard character binary image and the target preset template image can be calculated by this formula. First, a standard character binary image and a target preset template image can be selected, and the matrix distance between a certain white pixel on the standard character binary image and each white pixel on the target preset template image can be calculated respectively, and the minimum matrix distance can be recorded. In the same way, the minimum matrix distance corresponding to each white pixel on the standard character binary image can be recorded and accumulated to obtain the first distance. Then, the matrix distance between a certain white pixel on the target preset template image and each white pixel on the standard character binary image can be calculated respectively, and the minimum matrix distance can be recorded. In the same way, the minimum matrix distance corresponding to each white pixel on the target preset template image can be recorded and accumulated to obtain the second distance. Then, half of the sum of the first distance and the second distance can be determined as the target distance between the standard character binary image and the target preset template image. Then, the same method can be used to determine the target distance between the standard character binary image and each target preset template image, and then the target preset template image corresponding to the smallest target distance can be determined as the recognition result of the standard character binary image. Furthermore, the determined minimum target distance can be compared with the preset distance threshold, and only when the minimum target distance is within the preset distance threshold, the corresponding target preset template image can be determined as the recognition result, wherein the preset distance threshold can be 70, and the credibility of the recognition result can be improved by setting the preset distance threshold. The above method can be used to determine the recognition result of each standard character binary image, specifically, each standard character binary image that has not been successfully recognized, thereby completing the recognition of the current display data of the transformer temperature controller.

[0052] After the current display data is identified, the current temperature value of the transformer temperature controller can be determined. For example, if N characters are segmented and displayed in the order of "a1, a2, ..., aN", it means that the current temperature is a1 (A, B or C) phase temperature, and the temperature value is a2*10 N-3 +a3*10 N-4 +…+aN*10 -1 .

[0053] On the basis of the above technical solution, optionally, before the binary image is segmented based on the characters in the data area to obtain the binary images of each character, it also includes: traversing the connected areas of white pixels in the binary image and determining the size of each connected area; comparing the size of each connected area with the preset area size threshold, if there is a target connected area whose size is smaller than the preset area size threshold, then the pixels in the target connected area are inverted to black. Specifically, before segmenting the binary image, the small connected areas of white pixels in the binary image can be removed first. Due to the influence of the residual light of the digital tube, the binary image obtained may have some small white areas or points around the light-emitting segment, thereby affecting the subsequent character recognition. By removing the small connected areas, the white pixels in the binary image other than the characters can be removed, thereby improving the accuracy of the recognition result. Specifically, the connected areas of all white pixels in the binary image can be found by traversing the binary image, and the size of each connected area can be calculated. If there is a target connected area whose size is smaller than the preset area size threshold, then the pixels in the target connected area are inverted to black.

[0054] Based on the above technical solution, optionally, after respectively counting the number of white pixel points in each row and each column of each of the skeleton diagrams, and identifying the current display data of the transformer temperature controller by combining the character feature rules of the digital tube in the transformer temperature controller, it further includes: continuously identifying the current display data for a preset number of times. If the differences between the current display data for the preset number of consecutive times are all less than a preset difference threshold, and the current display data for the preset number of consecutive times are all within a preset temperature range, then an identification result is output. Specifically, when the identification process of the current display data is completed, the corresponding current temperature value can be obtained. Before outputting the current temperature value, a fault tolerance measure can be taken first to reduce the probability of misidentification. Since the temperature rise of the transformer temperature controller is not instantaneous but requires a time process, and the acquisition and identification processing speed of the Internet of Things gateway is very fast, the temperature values obtained within a certain time range will not change significantly. Specifically, sampling can be performed continuously for a certain number of times (i.e., the preset number of times) to obtain the corresponding current display data, and the difference between every two current display data can be calculated. If all the differences are less than the preset difference threshold, and each current display data is within the preset temperature range (including the minimum temperature and the maximum temperature), then it can be determined that the data is valid output data; otherwise, it is invalid output data, and the identification result can be discarded and the next sampling process can be restarted. Exemplarily, assuming that the preset number of times is 3, the preset difference threshold is 5, and the temperature values identified three times are T1, T2, and T3 respectively, then the identification result will be output only when max(abs(T1 - T2), abs(T1 - T3), abs(T2 - T3)) < 5 and Tmin < T1 < Tmax and Tmin < T2 < Tmax and Tmin < T3 < Tmax are satisfied at the same time, where max represents finding the maximum value and abs represents finding the absolute value.

[0055] The technical solution provided by the embodiments of the present invention first obtains the RGB image of the transformer temperature controller, then performs color separation and binarization on the RGB image based on the RGB color space to obtain a binary image that can distinguish the data area and the background area therein, then segments the binary image based on the characters in the data area to obtain each character binary image, and then skeletonizes each obtained character binary image to obtain the corresponding skeleton diagram. By counting the number of white pixel points in each row and each column of the skeleton diagram and combining the character feature rules of the digital tube, the current display data of the transformer temperature controller can be identified. By adopting the method of image recognition, non-contact acquisition of the data of the transformer temperature controller is realized, so that the data of the transformer temperature controller can be monitored more conveniently, safely and reliably. At the same time, by first performing color separation on the RGB image of the transformer temperature controller based on the color space, the data area and the background area are well distinguished, thereby improving the accuracy of subsequent data recognition.

[0056] Embodiment 2

[0057] Figure 5 This is a schematic diagram of the structure of the non-contact data collection device for the Internet of Things gateway to the instrument provided in the second embodiment of the present invention. The device can be implemented by hardware and / or software, and can generally be integrated into a computer device. The computer device can be, but is not limited to, an on-site Internet of Things data collection gateway in the power distribution room where the transformer temperature controller is located. The device is used to execute the multi-source spatiotemporal data fusion method provided in any embodiment of the present invention. Figure 5 As shown, the device comprises:

[0058] An image acquisition module 51 is used to acquire an RGB image of a transformer temperature controller;

[0059] A color separation module 52, used for performing color separation and binarization on the RGB image based on the RGB color space to obtain a binary image capable of distinguishing a data area and a background area in the RGB image;

[0060] An image segmentation module 53, used to segment the binary image based on the characters in the data area to obtain binary images of each character;

[0061] A skeletonization module 54, used for skeletonizing each of the binary character images to obtain a skeleton image corresponding to each of the binary character images;

[0062] The data identification module 55 is used to count the number of white pixels in each row and column in each skeleton diagram, and identify the current display data of the transformer temperature controller in combination with the character feature rules of the digital tube in the transformer temperature controller.

[0063] The technical solution provided by the embodiment of the present invention first obtains the RGB image of the transformer temperature controller, then performs color separation and binarization on the RGB image based on the RGB color space to obtain a binary image that can distinguish the data area and the background area, and then segments the binary image based on the characters in the data area to obtain each character binary image, and then skeletonizes each character binary image to obtain a corresponding skeleton diagram, and the current display data of the transformer temperature controller can be identified by counting the number of white pixels in each row and column in the skeleton diagram and combining the character feature rules of the digital tube. By adopting the image recognition method, the contactless collection of the transformer temperature controller data is realized, so that the data of the transformer temperature controller can be monitored more conveniently, safely and reliably. At the same time, by first performing color separation on the RGB image of the transformer temperature controller based on the color space, the data area and the background area are well distinguished, thereby improving the accuracy of subsequent data recognition.

[0064] On the basis of the above technical solution, optionally, the color separation module 52 includes:

[0065] An RGB value extraction unit, used to extract the RGB value of each pixel in the RGB image;

[0066] The RGB value comparison unit is used to compare the R value and / or G value in each RGB value with a preset threshold value respectively. If the R value and / or G value is greater than the preset threshold value, the corresponding pixel point is modified to white, otherwise the corresponding pixel point is modified to black.

[0067] On the basis of the above technical solution, optionally, the data identification module 55 includes:

[0068] A first eigenvalue determining unit, configured to take the value having the largest number of occurrences of the number of white pixels in each row in the first half of the skeleton image as the first eigenvalue;

[0069] A second eigenvalue determining unit, configured to take the value with the largest number of occurrences of the number of white pixels appearing in each row in the second half of the skeleton image as the second eigenvalue;

[0070] A third eigenvalue determining unit, configured to take the value with the largest number of occurrences of the number of white pixels appearing in each column of the skeleton image as the third eigenvalue;

[0071] A data identification unit is used to identify the current display data according to the first characteristic value, the second characteristic value, the third characteristic value and the character characteristic rule.

[0072] On the basis of the above technical solution, optionally, the non-contact data collection device of the IoT gateway for the instrument further includes:

[0073] A re-identification module, for further identifying the current display data by using a template minimum matrix distance method if the current display data is not successfully identified after counting the number of white pixels in each row and column of each skeleton image and identifying the current display data of the transformer temperature controller in combination with the character feature rule of the digital tube in the transformer temperature controller;

[0074] Accordingly, the non-contact data collection device for the instrument of the Internet of Things gateway also includes:

[0075] A standardization module is used to adjust the size of the character binary image according to the size of the preset template image used by the template minimum matrix distance method after segmenting the binary image based on the characters in the data area to obtain each character binary image, so as to obtain a standard character binary image.

[0076] Based on the above technical solution, the optional re-identification module includes:

[0077] A first distance determination unit is used for traversing each white pixel on the standard character binary image for each of the standard character binary images, and respectively determining the matrix distance between each white pixel on the standard character binary image and each white pixel on the target preset template image, and then accumulating the minimum matrix distance corresponding to each white pixel on the standard character binary image as the first distance;

[0078] A second distance determination unit is used to traverse each white pixel on the target preset template image, and respectively determine the matrix distance between each white pixel on the target preset template image and each white pixel on the standard character binary image, and then accumulate the minimum matrix distance corresponding to each white pixel on the target preset template image as the second distance;

[0079] A target distance determination unit, used for determining half of the sum of the first distance and the second distance as the target distance between the standard character binary image and the target preset template image; wherein the preset template image includes a plurality of the target preset template images, and the corresponding target distance is obtained for each of the target preset template images;

[0080] The recognition result determination unit is used to determine the target preset template image corresponding to the minimum target distance as the recognition result.

[0081] On the basis of the above technical solution, optionally, the non-contact data collection device of the IoT gateway for the instrument further includes:

[0082] A connected region determination module, used for traversing the connected regions of white pixels in the binary image and determining the size of each connected region before segmenting the binary image based on the characters in the data region to obtain each character binary image;

[0083] The pixel inversion module is used to compare the size of each of the connected areas with a preset area size threshold. If the size of a target connected area is smaller than the preset area size threshold, the pixels in the target connected area are inverted to black.

[0084] On the basis of the above technical solution, optionally, the non-contact data collection device of the IoT gateway for the instrument further includes:

[0085] A fault-tolerant module is used to count the number of white pixels in each row and column in each skeleton diagram, and identify the current display data of the transformer temperature controller in combination with the character feature rules of the digital tube in the transformer temperature controller, and then continuously identify the current display data for a preset number of times. If the difference between each of the current display data for the preset number of consecutive times is less than a preset difference threshold, and the current display data for the preset number of consecutive times is within a preset temperature range, then the recognition result is output.

[0086] The contactless data collection device for an instrument by an Internet of Things gateway provided in an embodiment of the present invention can execute the contactless data collection method for an instrument by an Internet of Things gateway provided in any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.

[0087] It is worth noting that in the above-mentioned embodiment of the contactless data acquisition device for the instrument by the Internet of Things gateway, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0088] Embodiment 3

[0089] Figure 6 The schematic diagram of the structure of the computer device provided for the third embodiment of the present invention shows a block diagram of an exemplary computer device suitable for implementing the implementation mode of the present invention. Figure 6 The computer device shown is only an example and should not limit the functions and scope of use of the embodiments of the present invention. Figure 6 As shown, the computer device includes a processor 61, a memory 62, an input device 63 and an output device 64; the number of processors 61 in the computer device can be one or more. Figure 6 Taking a processor 61 as an example, the processor 61, memory 62, input device 63 and output device 64 in the computer device can be connected through a bus or other means. Figure 6 The example of connecting through bus is taken in the following.

[0090] The memory 62, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as the program instructions / modules corresponding to the contactless data collection method for the IoT gateway to the instrument in the embodiment of the present invention (for example, the image acquisition module 51, the color separation module 52, the image segmentation module 53, the skeletonization module 54 and the data recognition module 55 in the contactless data collection device for the IoT gateway to the instrument). The processor 61 executes various functional applications and data processing of the computer device by running the software programs, instructions and modules stored in the memory 62, that is, realizes the contactless data collection method for the IoT gateway to the instrument.

[0091] The memory 62 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 62 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 62 may further include a memory remotely arranged relative to the processor 61, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0092] The input device 63 can be used to obtain the RGB image of the transformer temperature controller, and generate key signal input related to user settings and function control of the computer device, etc. The output device 64 can be used to upload the current display data of the transformer temperature controller to the server, etc.

[0093] Embodiment 4

[0094] Embodiment 4 of the present invention further provides a storage medium containing computer executable instructions, which, when executed by a computer processor, is used to execute a method for contactless data collection of an instrument by an Internet of Things gateway, the method comprising:

[0095] Get the RGB image of the transformer temperature controller;

[0096] Performing color separation and binarization on the RGB image based on the RGB color space to obtain a binary image capable of distinguishing a data area and a background area in the RGB image;

[0097] Segmenting the binary image based on the characters in the data area to obtain binary images of each character;

[0098] Skeletonizing each of the binary character images to obtain a skeleton graph corresponding to each of the binary character images;

[0099] The number of white pixels in each row and column in each skeleton diagram is counted respectively, and the current display data of the transformer temperature controller is identified in combination with the character feature rules of the digital tube in the transformer temperature controller.

[0100] The storage medium may be any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media, such as CD-ROM, floppy disk or tape device; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the computer system in which the program is executed, or may be located in a different second computer system, which is connected to the computer system via a network (such as the Internet). The second computer system may provide program instructions to the computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations (e.g., in different computer systems connected via a network). The storage medium may store program instructions (e.g., embodied as a computer program) that may be executed by one or more processors.

[0101] Of course, the storage medium containing computer executable instructions provided in an embodiment of the present invention is not limited to the method operations described above, and can also execute related operations in the contactless data collection method for instruments by the Internet of Things gateway provided in any embodiment of the present invention.

[0102] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0103] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0104] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0105] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A contactless data collection method for an instrument by an Internet of Things gateway, characterized in that: include: Get the RGB image of the transformer temperature controller; Performing color separation and binarization on the RGB image based on the RGB color space to obtain a binary image capable of distinguishing a data area and a background area in the RGB image; Segmenting the binary image based on the characters in the data area to obtain binary images of each character; Skeletonizing each of the binary character images to obtain a skeleton graph corresponding to each of the binary character images; Counting the number of white pixels in each row and column of each skeleton diagram respectively, and identifying the current display data of the transformer temperature controller in combination with the character feature rules of the digital tube in the transformer temperature controller; The method of counting the number of white pixels in each row and column in each skeleton diagram and identifying the current display data of the transformer temperature controller in combination with the character feature rules of the digital tube in the transformer temperature controller includes: The value with the largest number of white pixels in each row in the first half of the skeleton image is taken as the first eigenvalue; The value with the largest number of white pixels in each row in the second half of the skeleton image is used as the second eigenvalue; The value with the largest number of white pixels in each column of the skeleton image is used as the third eigenvalue; The current display data is identified according to the first feature value, the second feature value, the third feature value and the character feature rule.

2. The method for contactless data collection of an instrument by an Internet of Things gateway according to claim 1 is characterized in that: The color separation and binarization of the RGB image based on the RGB color space includes: Extracting the RGB value of each pixel in the RGB image; The R value and / or G value in each of the RGB values ​​are compared with the preset thresholds respectively. If the R value and / or G value is greater than the preset threshold, the corresponding pixel point is modified to white, otherwise the corresponding pixel point is modified to black.

3. The method for contactless data collection of an instrument by an Internet of Things gateway according to claim 1, characterized in that: After counting the number of white pixels in each row and column in each skeleton diagram and identifying the current display data of the transformer temperature controller in combination with the character feature rule of the digital tube in the transformer temperature controller, the method further includes: If the current display data is not successfully identified, further identifying the current display data using a template minimum matrix distance method; Correspondingly, after segmenting the binary image based on the characters in the data area to obtain each character binary image, the method further includes: Adjusting the size of the character binary image according to the size of the preset template image used by the template minimum matrix distance method to obtain a standard character binary image; The further identifying of the current display data by using the template minimum matrix distance method includes: For each of the standard character binary images, traverse each white pixel on the standard character binary image, and respectively determine the matrix distance between each white pixel on the standard character binary image and each white pixel on the target preset template image, and then accumulate the minimum matrix distances corresponding to each white pixel on the standard character binary image as the first distance; Traversing each white pixel on the target preset template image, and respectively determining the matrix distance between each white pixel on the target preset template image and each white pixel on the standard character binary image, and then accumulating the minimum matrix distance corresponding to each white pixel on the target preset template image as the second distance; Determine half of the sum of the first distance and the second distance as the target distance between the standard character binary image and the target preset template image; wherein the preset template image includes a plurality of the target preset template images, and obtain the corresponding target distance for each of the target preset template images; The target preset template image corresponding to the minimum target distance is determined as the recognition result.

4. The method for contactless data collection of an instrument by an Internet of Things gateway according to claim 1, characterized in that: Before segmenting the binary image based on the characters in the data area to obtain each character binary image, the method further includes: Traversing the connected areas of white pixels in the binary image, and determining the size of each of the connected areas; The size of each of the connected regions is compared with a preset region size threshold. If there is a target connected region whose size is smaller than the preset region size threshold, the pixels in the target connected region are inverted to black.

5. The method for contactless data collection of an instrument by an Internet of Things gateway according to claim 1, characterized in that: After counting the number of white pixels in each row and column in each skeleton diagram and identifying the current display data of the transformer temperature controller in combination with the character feature rule of the digital tube in the transformer temperature controller, the method further includes: The current display data is continuously identified for a preset number of times, and if the difference between each of the current display data for the preset number of times is less than a preset difference threshold, and the current display data for the preset number of times is within a preset temperature range, then an identification result is output.

6. A contactless data collection device for an Internet of Things gateway to an instrument, characterized in that: include: An image acquisition module is used to acquire the RGB image of the transformer temperature controller; A color separation module, used for performing color separation and binarization on the RGB image based on the RGB color space to obtain a binary image capable of distinguishing a data area and a background area in the RGB image; An image segmentation module, used for segmenting the binary image based on the characters in the data area to obtain binary images of each character; A skeletonization module, used for skeletonizing each of the binary character images to obtain a skeleton image corresponding to each of the binary character images; A data recognition module, used to count the number of white pixels in each row and column in each skeleton diagram, and recognize the current display data of the transformer temperature controller in combination with the character feature rules of the digital tube in the transformer temperature controller; The data identification module comprises: A first eigenvalue determining unit, configured to take the value having the largest number of occurrences of the number of white pixels in each row in the first half of the skeleton image as the first eigenvalue; A second eigenvalue determining unit, configured to take the value with the largest number of occurrences of the number of white pixels appearing in each row in the second half of the skeleton image as the second eigenvalue; A third eigenvalue determining unit, configured to take the value with the largest number of occurrences of the number of white pixels appearing in each column of the skeleton image as the third eigenvalue; A data identification unit is used to identify the current display data according to the first characteristic value, the second characteristic value, the third characteristic value and the character characteristic rule.

7. A computer device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the contactless data collection method for the instrument by the Internet of Things gateway as described in any one of claims 1-5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the contactless data collection method for an instrument by an Internet of Things gateway as described in any one of claims 1 to 5 is implemented.