CN112113638A - Water meter function self-checking device and method - Google Patents

Water meter function self-checking device and method Download PDF

Info

Publication number
CN112113638A
CN112113638A CN202010982091.9A CN202010982091A CN112113638A CN 112113638 A CN112113638 A CN 112113638A CN 202010982091 A CN202010982091 A CN 202010982091A CN 112113638 A CN112113638 A CN 112113638A
Authority
CN
China
Prior art keywords
water meter
display area
detection unit
fault code
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010982091.9A
Other languages
Chinese (zh)
Other versions
CN112113638B (en
Inventor
鲍颖慧
何家强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Huiyi Technology Co ltd
Original Assignee
Beijing Huiyi Wulian Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Huiyi Wulian Technology Co ltd filed Critical Beijing Huiyi Wulian Technology Co ltd
Priority to CN202010982091.9A priority Critical patent/CN112113638B/en
Publication of CN112113638A publication Critical patent/CN112113638A/en
Application granted granted Critical
Publication of CN112113638B publication Critical patent/CN112113638B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01FMEASURING VOLUME, VOLUME FLOW, MASS FLOW OR LIQUID LEVEL; METERING BY VOLUME
    • G01F25/00Testing or calibration of apparatus for measuring volume, volume flow or liquid level or for metering by volume
    • G01F25/10Testing or calibration of apparatus for measuring volume, volume flow or liquid level or for metering by volume of flowmeters
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • G06V10/267Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • G06V20/63Scene text, e.g. street names
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A20/00Water conservation; Efficient water supply; Efficient water use

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Fluid Mechanics (AREA)
  • Measuring Volume Flow (AREA)

Abstract

The invention provides a water meter function self-checking device and a method, comprising a self-checking module and a reading module; the self-checking module comprises a detection unit and a fault code output unit; the detection unit comprises a storage detection unit, a module communication detection unit, a valve detection unit, an AD conversion detection unit and an LED display detection unit; the fault code output unit stores a plurality of fault codes, responds to the fault signal of the detection unit, outputs and displays the corresponding fault codes; the reading module includes: the system comprises an image acquisition unit, an image processing unit and a reading unit, wherein the image acquisition unit, the image processing unit and the reading unit are used for extracting and processing data of the fault code display area and the water meter reading display area and acquiring the fault code and the water meter reading.

Description

Water meter function self-checking device and method
Technical Field
The invention relates to a water meter technology, in particular to a water meter function self-checking device and a water meter function self-checking method.
Background
Human life cannot be kept away from water, each household has a water meter to record monthly water consumption of the household, and if the water meter has a problem, recorded data can be inaccurate, so that tap water or user loss is caused, and therefore, a tap water company needs to send a large amount of manpower to the household of a community to overhaul the water meter every month.
Because the working environment of the water meter is very bad, the influence on electronic components is very large, and various faults are easy to occur. Therefore, the safe operation of the water meter and the rapid detection and processing of the fault have great significance to the safe operation of the whole system. The problem that the water gauge often can appear has valve switching trouble, shows trouble etc. and present water gauge trade circuit board production manufacturing link overall technical level is not high, mostly is manual operation, and artifical judgement machinery and electronic apparatus trouble, and maintenance personal can't learn what trouble has appeared in the water gauge before the overhead maintenance, can't the quick trouble of solving of pertinence, lead to solving inefficiency.
Disclosure of Invention
The embodiment of the invention provides a water meter function self-checking device and method, which can enable maintenance personnel to obtain corresponding fault information, carry out targeted maintenance on a water meter according to the corresponding fault information and improve the efficiency of solving the fault of the water meter.
In a first aspect of the embodiments of the present invention, a water meter function self-checking apparatus is provided, including a self-checking module and a reading module;
the self-checking module comprises a detection unit and a fault code output unit;
the detection unit comprises a storage detection unit, a module communication detection unit, a valve detection unit, an AD conversion detection unit and an LED display detection unit; the fault code output unit stores a plurality of fault codes, responds to the fault signal of the detection unit, outputs and displays the corresponding fault codes;
the reading module includes:
the image acquisition unit is used for acquiring an integral display image of an LED display unit of the water meter, and the integral display image comprises a fault code display area and a water meter reading display area;
the image processing unit is used for receiving the integral display image, sequentially carrying out image graying processing, image binarization processing, fault code display area and water meter reading display area positioning and segmentation processing on the integral display image, and obtaining a fault code display area and a water meter reading display area;
and the reading unit is used for carrying out data extraction processing on the fault code display area and the water meter reading display area to obtain the fault code and the water meter reading.
Optionally, in a possible implementation manner of the first aspect, the storage detecting unit is configured to send a dynamic value to be verified to a storage unit, where the storage unit stores the dynamic value to be verified and outputs a read value, and if the dynamic value to be verified is not consistent with the read value, outputs a first fault signal;
the module communication detection unit is used for sending communication data to the module unit, receiving return data of the module unit, and outputting a second fault signal if the return data is inconsistent with a preset value;
the valve detection unit is used for sending an opening signal or a closing signal to the valve, receiving an opening feedback signal or a closing feedback signal of the valve, and outputting a third fault signal if the opening feedback signal or the closing feedback signal indicates that the valve is not opened in place or closed in place;
the AD conversion detection unit is used for acquiring AD conversion data of the battery power, converting the AD conversion data into a voltage value, and outputting a fourth fault signal if the voltage value exceeds a preset range;
the LED display detection unit is used for controlling the LED display unit to be normally on for 10S, and outputting a fifth fault signal if the normally on time of the LED display unit is less than 10S;
the fault code output unit correspondingly outputs and displays a first fault code, a second fault code, a third fault code, a fourth fault code and a fifth fault code according to the first fault signal, the second fault signal, the third fault signal, the fourth fault signal and the fifth fault signal.
Optionally, in a possible implementation manner of the first aspect, the performing image binarization processing on the whole display image includes:
processing the gray-scale processing image according to a second strategy to obtain a binary image, wherein the second strategy is as follows:
Figure BDA0002687906920000021
wherein f (x, y) represents the gray-scale processed image, f (x ', y') represents the binarized image, and T is an optimal threshold segmentation point.
Optionally, in a possible implementation manner of the first aspect, the obtaining the optimal threshold segmentation point includes:
calculating the maximum gray value Tmax and the minimum gray value Tmin of the gray processing image, and acquiring an average gray value Tave according to the maximum gray value Tmax and the minimum gray value Tmin;
using the average gray value Tave as an initial threshold segmentation point To, segmenting the image into two parts by using To, and calculating the respective average gray values of the two parts again;
Figure BDA0002687906920000031
Figure BDA0002687906920000032
wherein f (i, j) is the gray scale value of f (x, y) point of the gray scale image, and N (i, j) is the weight coefficient of f (i, j) point;
determining a new threshold point T1 by Ta and Tb, and replacing T0 by a new threshold segmentation point of T1:
Figure BDA0002687906920000033
repeating the above processes, and performing iteration operation k +1 times until Tk is equal to Tk +1, wherein the iteration tends to converge, and the obtained Tk is the optimal threshold segmentation point T.
Optionally, in a possible implementation manner of the first aspect, a first positioning identifier and a second positioning identifier are respectively disposed on the fault code display area and the water meter reading display area;
the fault code display area and the water meter reading display area are positioned and segmented, and the method comprises the following steps:
acquiring a first positioning coordinate of the first positioning identifier and a second positioning coordinate of the second positioning identifier;
superposing a preset superposition template above the integral display image according to the first positioning coordinate and the second positioning coordinate, and superposing the integral display image to obtain a fault code display area and a water meter reading display area;
the preset superposition template comprises a first area corresponding to the fault code display area, a second area corresponding to the water meter reading display area and a third area, wherein the area of the third area is larger than the water surface area, pixel points of the first area and the second area are in a transparent state, and pixel points of the third area are in an opaque state.
Optionally, in a possible implementation manner of the first aspect, a first mobile identifier and a second mobile identifier are provided on the preset overlay template;
the step of superposing a preset superposition template above the integral display image according to the first positioning coordinate and the second positioning coordinate comprises the following steps:
and overlapping a preset overlapping template above the integral display image by taking the first positioning coordinate as a target point and the second positioning coordinate as a target point, wherein the first mobile identifier is overlapped with the first positioning identifier, and the second mobile identifier is overlapped with the second positioning identifier.
Optionally, in a possible implementation manner of the first aspect, the obtaining first location coordinates of the first location identifier and second location coordinates of the second location identifier includes:
acquiring pixel point coordinates of a plurality of pixel points of the first positioning identification, and performing weighted average processing on the pixel point coordinates according to a first strategy to acquire a first positioning coordinate;
and obtaining pixel point coordinates of a plurality of pixel points of the second positioning identification, and carrying out weighted average processing on the pixel point coordinates according to a second strategy to obtain the second positioning coordinates.
Optionally, in a possible implementation manner of the first aspect, the first policy is as follows:
Figure BDA0002687906920000041
the second strategy is as follows:
Figure BDA0002687906920000042
wherein X1 represents the abscissa of the first positioning coordinate, y1 represents the ordinate of the first positioning coordinate, X1n represents the abscissa of the pixel point of the first positioning coordinate, y1n represents the abscissa of the pixel point of the first positioning coordinate, X2 represents the abscissa of the second positioning coordinate, y2 represents the ordinate of the second positioning coordinate, X2n represents the abscissa of the pixel point of the first positioning coordinate, and y2n represents the abscissa of the pixel point of the first positioning coordinate.
In a second aspect of the embodiments of the present invention, a method for self-checking a function of a water meter is provided, including:
detecting the water meter according to a storage detection unit, a module communication detection unit, a valve detection unit, an AD conversion detection unit and an LED display detection unit, responding to a fault signal of the detection unit, outputting and displaying a corresponding fault code;
collecting an integral display image of an LED display unit of the water meter, wherein the integral display image comprises a fault code display area and a water meter reading display area;
receiving the integral display image, and sequentially carrying out image graying processing, image binarization processing, fault code display area and water meter reading display area positioning and segmentation processing on the integral display image to obtain a fault code display area and a water meter reading display area;
and performing data extraction processing on the fault code display area and the water meter reading display area to obtain the fault code and the water meter reading.
In a third aspect of the embodiments of the present invention, there is provided a water meter function self-checking device, including: memory, a processor and a computer program, the computer program being stored in the memory, the processor running the computer program to perform the method according to the second aspect of the invention.
A fourth aspect of the embodiments of the present invention provides a readable storage medium, in which a computer program is stored, and the computer program is used for implementing the method according to the second aspect of the present invention and various possible references to the second aspect when the computer program is executed by a processor.
The invention provides a water meter function self-checking device and a method, wherein a plurality of fault codes are stored in a fault code output unit through a storage detection unit, a module communication detection unit, a valve detection unit, an AD conversion detection unit, an LED display detection unit and a fault code output unit, and the fault codes are output and displayed in response to a fault signal of the detection unit; the reading module includes: the image acquisition unit is used for acquiring an integral display image of an LED display unit of the water meter, and the integral display image comprises a fault code display area and a water meter reading display area; the image processing unit is used for receiving the integral display image, sequentially carrying out image graying processing, image binarization processing, fault code display area and water meter reading display area positioning and segmentation processing on the integral display image, and obtaining a fault code display area and a water meter reading display area; and the reading unit is used for carrying out data extraction processing on the fault code display area and the water meter reading display area to obtain the fault code and the water meter reading, can remotely realize fault detection on the water meter, then obtain the corresponding fault code and send the fault code to the corresponding maintenance personnel, and the corresponding maintenance personnel can carry the corresponding maintenance tool to directly maintain the door according to the fault code, so that the maintenance efficiency is improved.
In addition, the meter reading personnel need to read the meter by door and by door, the workload is large, and the situation that the user is not at home can be frequently met, so that the meter reading difficulty is caused.
Drawings
Fig. 1 is a schematic structural diagram of a water meter function self-checking apparatus according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a self-checking module according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a read module according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an overall display image provided by an embodiment of the invention;
FIG. 5 is a schematic diagram of a predetermined overlay template provided by an embodiment of the present invention;
FIG. 6 is a schematic diagram of an overlaid display image according to an embodiment of the present invention;
fig. 7 is a schematic flow chart illustrating a water meter function self-checking method according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a water meter function self-checking device according to an embodiment of the present invention.
In the figure, 51, a water meter reading display area; 52. a fault code display area; 53. a first positioning identifier; 54. a second positioning identifier; 61. a first mobile identity; 62. a second mobile identity; 63. a first region; 64. a second region; 65. and a third region.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein.
It should be understood that, in various embodiments of the present invention, the sequence numbers of the processes do not mean the execution sequence, and the execution sequence of the processes should be determined by the functions and the internal logic of the processes, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
It should be understood that in the present application, "comprising" and "having" and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that, in the present invention, "a plurality" means two or more. "and/or" is merely an association describing an associated object, meaning that three relationships may exist, for example, and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "comprises A, B and C" and "comprises A, B, C" means that all three of A, B, C comprise, "comprises A, B or C" means that one of A, B, C comprises, "comprises A, B and/or C" means that any 1 or any 2 or 3 of A, B, C comprises.
It should be understood that in the present invention, "B corresponding to a", "a corresponds to B", or "B corresponds to a" means that B is associated with a, and B can be determined from a. Determining B from a does not mean determining B from a alone, but may be determined from a and/or other information. And the matching of A and B means that the similarity of A and B is greater than or equal to a preset threshold value.
As used herein, "if" may be interpreted as "at … …" or "when … …" or "in response to a determination" or "in response to a detection", depending on the context.
The technical solution of the present invention will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Referring to fig. 1, it is a schematic structural diagram of a water meter function self-checking device provided in an embodiment of the present invention, including a self-checking module and a reading module, and specifically as follows:
the self-checking module:
specifically, as shown in fig. 2, the self-test module includes a detection unit and a fault code output unit, where the detection unit is configured to perform an overhaul operation on each module of the water meter to see whether the module fails, and if the module fails, a corresponding signal may be sent to the fault code output unit, and the fault code output unit may output and display a fault code according to the signal, thereby implementing overhaul of the water meter.
For example, the detection unit may include a storage detection unit, a module communication detection unit, a valve detection unit, an AD conversion detection unit, and an LED display detection unit, and the detection unit may further include other detection modules as needed, which is not limited in the present invention.
Wherein:
the storage detection unit is used for sending a dynamic value to be verified to the storage unit, the storage unit stores the dynamic value to be verified and outputs a read value, and if the dynamic value to be verified is inconsistent with the read value, a first fault signal is output.
It can be understood that, in order to detect whether the storage unit of the water meter is normal, a dynamic value to be verified, which may be, for example, a set of data, such as digital data of 123, may be sent to the storage unit of the water meter, then a read value of the storage unit may be received, whether the dynamic value to be verified is consistent with the read value may be compared, if the consistency indicates that the dynamic value to be verified is normal, if the dynamic value to be verified is not consistent with the read value, a first fault signal may be output.
And the module communication detection unit is used for sending communication data to the module unit, receiving return data of the module unit, and outputting a second fault signal if the return data is inconsistent with a preset value.
It can be understood that, in order to detect whether the module unit of the water meter is normal, the module unit of the water meter may send communication data to the module unit of the water meter, then receive feedback information of the module unit, compare whether returned data is consistent with a preset value, if the returned data is consistent with the preset value, the returned data is normal, and if the returned data is inconsistent with the preset value, a second fault signal is output.
And the valve detection unit is used for sending an opening signal or a closing signal to the valve, receiving an opening feedback signal or a closing feedback signal of the valve, and outputting a third fault signal if the opening feedback signal or the closing feedback signal indicates that the valve is not opened in place or closed in place.
It can be understood that, in order to detect whether the valve of the water meter is normal, an opening signal or a closing signal may be sent to the valve of the water meter to test whether the valve is normally and completely opened or normally and completely closed, and if the opening feedback signal or the closing feedback signal indicates that the valve is not opened in place or closed in place, a third fault signal is output.
And the AD conversion detection unit is used for acquiring AD conversion data of the battery electric quantity, converting the AD conversion data into a voltage value, and outputting a fourth fault signal if the voltage value exceeds a preset range.
It can be understood that, in order to detect whether the AD conversion unit of the water meter is normal, the AD conversion data of the battery power can be acquired and converted into a voltage value, and if the voltage value exceeds a preset range, a fourth fault signal is output.
And the LED display detection unit is used for controlling the LED display unit to be normally on for 10S, and outputting a fifth fault signal if the normally on time of the LED display unit is less than 10S.
It can be understood that, in order to test the display module of the water meter, the display module can be controlled to be normally on, if the normally on time does not reach the preset value, the display module is in a fault state, and a fifth fault signal is output.
In summary, the present embodiment can implement detection of multiple faults of the water meter, and in order to output a detection result, the following steps are specifically performed:
a fault code output unit:
and the fault code output unit stores a plurality of fault codes and outputs and displays the corresponding fault codes in response to the fault signals of the detection unit.
Specifically, the fault code output means may store, for example, a first fault code, a second fault code, a third fault code, a fourth fault code, and a fifth fault code, which may be a set of numbers or other display data, and the display data may be understood by a service person.
Illustratively, a first fault code, a second fault code, a third fault code, a fourth fault code and a fifth fault code are respectively output and displayed according to the first fault signal, the second fault signal, the third fault signal, the fourth fault signal and the fifth fault signal.
It is understood that a water meter reading display area and a fault code display area can be simultaneously arranged on the water meter, and the first fault code, the second fault code, the third fault code, the fourth fault code and the fifth fault code can be displayed in the corresponding fault code display areas 52.
In order to realize the remote reading of the fault code, a reading module is provided so as to send the read fault result to maintenance personnel, as shown in fig. 3, the reading module includes an image acquisition unit, an image processing unit and a reading unit, and specifically, the reading module includes the following components:
an image acquisition unit:
the water meter display device is used for acquiring an integral display image of an LED display unit of the water meter, and the integral display image comprises a fault code display area 52 and a water meter reading display area 51.
Specifically, the LED display unit may be a display dial of the water meter, and includes two display areas, namely a fault code display area 52 and a water meter reading display area 51, so as to display the water meter reading and also display the fault code. Wherein, the image acquisition unit can gather LED display element to gather wanted water gauge reading and fault code.
In practical application, the image acquisition unit can be a camera installed near the water meter, for example, and the shooting surface of the camera is over against the LED display unit of the water meter, so that a desired picture can be shot accurately.
An image processing unit:
and the system is used for receiving the integral display image, sequentially carrying out image graying processing, image binarization processing, fault code display area 52 and water meter reading display area 51 positioning and segmentation processing on the integral display image, and acquiring the fault code display area 52 and the water meter reading display area 51.
Specifically, because the water meter is generally installed in a cabinet or a water meter box, the light is dark, which results in low definition of the picture, and the display unit of the water meter has other display data besides the display of the reading and the fault code, which may affect the reading of the water meter reading and the reading of the fault code.
In this embodiment, the image processing unit is used to perform image graying processing on the acquired whole display image, so that the color of the photo can be removed, the photo is changed into a black-and-white photo to remove the color influence, the image binarization processing can process the pixel points in the photo into black and white, and the recognition efficiency can be increased, thereby facilitating the later extraction of information in the image, performing the positioning and segmentation processing on the fault code display area 52 and the water meter reading display area 51, and removing the interference of other useless information on the reading data.
In practical application, the image is grayed to obtain a grayscale processed image, and the first strategy is as follows:
Gray=0.299R+0.587G+0.114B
and carrying out image binarization processing on the whole display image, wherein the image binarization processing comprises the following steps:
processing the gray-scale processing image according to a second strategy to obtain a binary image, wherein the second strategy is as follows:
Figure BDA0002687906920000101
wherein f (x, y) represents the gray-scale processed image, f (x ', y') represents the binarized image, and T is an optimal threshold segmentation point.
In order to perform the prepared segmentation, an optimal threshold segmentation point needs to be found, and acquiring the optimal threshold segmentation point includes:
calculating the maximum gray value Tmax and the minimum gray value Tmin of the gray processing image, and acquiring an average gray value Tave according to the maximum gray value Tmax and the minimum gray value Tmin;
using the average gray value Tave as an initial threshold segmentation point To, segmenting the image into two parts by using To, and calculating the respective average gray values of the two parts again;
Figure BDA0002687906920000111
Figure BDA0002687906920000112
wherein f (i, j) is the gray scale value of f (x, y) point of the gray scale image, and N (i, j) is the weight coefficient of f (i, j) point;
determining a new threshold point T1 by Ta and Tb, and replacing T0 by a new threshold segmentation point of T1:
Figure BDA0002687906920000113
repeating the above processes, and performing iteration operation k +1 times until Tk is equal to Tk +1, wherein the iteration tends to converge, and the obtained Tk is the optimal threshold segmentation point T.
The positioning and dividing process for the fault code display area 52 and the water meter reading display area 51 is as follows:
as shown in fig. 4 to 6, a first positioning mark 53 and a second positioning mark 54 are respectively disposed on the fault code display area 52 and the water meter reading display area 51, and positioning and dividing processing is performed on the fault code display area 52 and the water meter reading display area 51, including steps S101 to S102, which are specifically as follows:
s101, acquiring a first positioning coordinate of the first positioning identifier 53 and a second positioning coordinate of the second positioning identifier 54.
Specifically, in order to accurately superimpose the preset superimposition template on the entire display image, the first positioning mark 53 and the second positioning mark 54 need to be coordinate-positioned, and then the preset superimposition template is accurately superimposed on the entire display image by using the coordinates.
In practical applications, the first positioning coordinates of the first positioning identifier 53 and the second positioning coordinates of the second positioning identifier 54 are obtained as follows:
obtaining pixel point coordinates of a plurality of pixel points of the first positioning identifier 53, performing weighted average processing on the pixel point coordinates according to a first strategy to obtain the first positioning coordinates, obtaining pixel point coordinates of a plurality of pixel points of the second positioning identifier 54, and performing weighted average processing on the pixel point coordinates according to a second strategy to obtain the second positioning coordinates.
Wherein:
the first strategy is as follows:
Figure BDA0002687906920000121
the second strategy is as follows:
Figure BDA0002687906920000122
wherein X1 represents the abscissa of the first positioning coordinate, y1 represents the ordinate of the first positioning coordinate, X1n represents the abscissa of the pixel point of the first positioning coordinate, y1n represents the abscissa of the pixel point of the first positioning coordinate, X2 represents the abscissa of the second positioning coordinate, y2 represents the ordinate of the second positioning coordinate, X2n represents the abscissa of the pixel point of the first positioning coordinate, and y2n represents the abscissa of the pixel point of the first positioning coordinate.
It can be understood that, in the present embodiment, the first positioning coordinate is obtained according to a plurality of pixel points at the first positioning identifier 53, and the second positioning coordinate is obtained according to a plurality of pixel points at the second positioning identifier 54.
S102, superposing a preset superposition template above the integral display image according to the first positioning coordinate and the second positioning coordinate, and superposing the integral display image to obtain a fault code display area 52 and a water meter reading display area 51; the preset superposition template comprises a first area 63 corresponding to the fault code display area 52, a second area 64 corresponding to the water meter reading display area 51 and a third area, wherein the area of the third area is larger than the water surface area, pixel points of the first area 63 and the second area 64 are in a transparent state, and pixel points of the third area are in an opaque state.
In some embodiments, a first moving identifier 61 and a second moving identifier 62 are provided on the preset overlay template;
the step of superposing a preset superposition template above the integral display image according to the first positioning coordinate and the second positioning coordinate comprises the following steps:
and superposing a preset superposition template above the integral display image by taking the first positioning coordinate as a target point and the second positioning coordinate as a target point, wherein the first mobile identifier 61 is superposed with the first positioning identifier 53, and the second mobile identifier 62 is superposed with the second positioning identifier 54.
Specifically, when the first positioning coordinate and the second positioning coordinate are found, a preset superposition template is superposed above the whole display image by taking the first positioning coordinate and the second positioning coordinate as a reference, then the fault code display area 52 and the water meter reading display area 51 are displayed, the rest areas are set to be in an opaque state, and finally, only the fault code display area 52 and the water meter reading display area 51 are displayed on the image, so that most interference is removed, and the reading accuracy can be improved.
A reading unit:
the data extraction processing module is used for extracting data from the fault code display area 52 and the water meter reading display area 51 to obtain the fault code and the water meter reading.
Specifically, after a series of processing by the image processing unit, much interference is removed, and the data of the fault code display area 52 and the water meter reading display area 51 are extracted.
In practical application, the system can further comprise a sending unit, namely the fault code is sent to maintenance personnel, the maintenance personnel can carry corresponding tools to directly conduct maintenance on the door after receiving the fault code, and the maintenance efficiency is high.
As shown in fig. 7, which is a schematic flow chart of a water meter function self-checking method according to an embodiment of the present invention, an execution main body of the method shown in fig. 7 may be a software and/or hardware device. The execution subject of the present application may include, but is not limited to, at least one of: user equipment, network equipment, etc. The user equipment may include, but is not limited to, a computer, a smart phone, a Personal Digital Assistant (PDA), the above mentioned electronic equipment, and the like. The network device may include, but is not limited to, a single network server, a server group of multiple network servers, or a cloud of numerous computers or network servers based on cloud computing, wherein cloud computing is one type of distributed computing, a super virtual computer consisting of a cluster of loosely coupled computers. The present embodiment does not limit this. The method comprises steps S201 to S204, and specifically comprises the following steps:
s201, detecting the water meter according to the storage detection unit, the module communication detection unit, the valve detection unit, the AD conversion detection unit and the LED display detection unit, and responding to the fault signal output of the detection unit and displaying the corresponding fault code.
S202, collecting an integral display image of an LED display unit of the water meter, wherein the integral display image comprises a fault code display area 52 and a water meter reading display area 51.
S203, receiving the whole display image, sequentially carrying out image graying processing, image binarization processing, fault code display area 52 and water meter reading display area 51 positioning and segmentation processing on the whole display image, and obtaining the fault code display area 52 and the water meter reading display area 51.
And S204, performing data extraction processing on the fault code display area 52 and the water meter reading display area 51 to obtain the fault code and the water meter reading.
Referring to fig. 8, which is a schematic diagram of a hardware structure of a water meter function self-checking device according to an embodiment of the present invention, the water meter function self-checking device 80 includes: a processor 81, a memory 82 and computer programs; wherein
A memory 82 for storing the computer program, which may also be a flash memory (flash). The computer program is, for example, an application program, a functional module, or the like that implements the above method.
A processor 81 for executing the computer program stored in the memory to implement the steps performed by the apparatus in the above method. Reference may be made in particular to the description relating to the preceding method embodiment.
Alternatively, the memory 82 may be separate or integrated with the processor 81.
When the memory 82 is a device independent of the processor 81, the apparatus may further include:
a bus 83 for connecting the memory 82 and the processor 81.
The present invention also provides a readable storage medium, in which a computer program is stored, which, when being executed by a processor, is adapted to implement the methods provided by the various embodiments described above.
The readable storage medium may be a computer storage medium or a communication medium. Communication media includes any medium that facilitates transfer of a computer program from one place to another. Computer storage media may be any available media that can be accessed by a general purpose or special purpose computer. For example, a readable storage medium is coupled to the processor such that the processor can read information from, and write information to, the readable storage medium. Of course, the readable storage medium may also be an integral part of the processor. The processor and the readable storage medium may reside in an Application Specific Integrated Circuits (ASIC). Additionally, the ASIC may reside in user equipment. Of course, the processor and the readable storage medium may also reside as discrete components in a communication device. The readable storage medium may be a read-only memory (ROM), a random-access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
The present invention also provides a program product comprising execution instructions stored in a readable storage medium. The at least one processor of the device may read the execution instructions from the readable storage medium, and the execution of the execution instructions by the at least one processor causes the device to implement the methods provided by the various embodiments described above.
In the above embodiments of the apparatus, it should be understood that the Processor may be a Central Processing Unit (CPU), other general purpose processors, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor, or in a combination of the hardware and software modules within the processor.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (9)

1. A water meter function self-checking device is characterized by comprising a self-checking module and a reading module;
the self-checking module comprises a detection unit and a fault code output unit;
the detection unit comprises a storage detection unit, a module communication detection unit, a valve detection unit, an AD conversion detection unit and an LED display detection unit; the fault code output unit stores a plurality of fault codes, responds to the fault signal of the detection unit, outputs and displays the corresponding fault codes;
the reading module includes:
the image acquisition unit is used for acquiring an integral display image of an LED display unit of the water meter, and the integral display image comprises a fault code display area and a water meter reading display area;
the image processing unit is used for receiving the integral display image, sequentially carrying out image graying processing, image binarization processing, fault code display area and water meter reading display area positioning and segmentation processing on the integral display image, and obtaining a fault code display area and a water meter reading display area;
and the reading unit is used for carrying out data extraction processing on the fault code display area and the water meter reading display area to obtain the fault code and the water meter reading.
2. The apparatus of claim 1,
the storage detection unit is used for sending a dynamic value to be verified to a storage unit, the storage unit stores the dynamic value to be verified and outputs a read value, and if the dynamic value to be verified is inconsistent with the read value, a first fault signal is output;
the module communication detection unit is used for sending communication data to the module unit, receiving return data of the module unit, and outputting a second fault signal if the return data is inconsistent with a preset value;
the valve detection unit is used for sending an opening signal or a closing signal to the valve, receiving an opening feedback signal or a closing feedback signal of the valve, and outputting a third fault signal if the opening feedback signal or the closing feedback signal indicates that the valve is not opened in place or closed in place;
the AD conversion detection unit is used for acquiring AD conversion data of the battery power, converting the AD conversion data into a voltage value, and outputting a fourth fault signal if the voltage value exceeds a preset range;
the LED display detection unit is used for controlling the LED display unit to be normally on for 10S, and outputting a fifth fault signal if the normally on time of the LED display unit is less than 10S;
the fault code output unit correspondingly outputs and displays a first fault code, a second fault code, a third fault code, a fourth fault code and a fifth fault code according to the first fault signal, the second fault signal, the third fault signal, the fourth fault signal and the fifth fault signal.
3. The apparatus according to claim 1 or 2, wherein the image binarization processing for the entire display image includes:
processing the gray-scale processing image according to a second strategy to obtain a binary image, wherein the second strategy is as follows:
Figure RE-FDA0002766061890000021
wherein f (x, y) represents the gray-scale processed image, f (x ', y') represents the binarized image, and T is an optimal threshold segmentation point.
4. The apparatus of claim 3, wherein obtaining the optimal threshold segmentation point comprises:
calculating the maximum gray value Tmax and the minimum gray value Tmin of the gray processing image, and acquiring an average gray value Tave according to the maximum gray value Tmax and the minimum gray value Tmin;
using the average gray value Tave as an initial threshold segmentation point To, segmenting the image into two parts by using To, and calculating the respective average gray values of the two parts again;
Figure RE-FDA0002766061890000022
Figure RE-FDA0002766061890000023
wherein f (i, j) is the gray scale value of f (x, y) point of the gray scale image, and N (i, j) is the weight coefficient of f (i, j) point;
determining a new threshold point T1 by Ta and Tb, and replacing T0 by a new threshold segmentation point of T1:
Figure RE-FDA0002766061890000024
repeating the above processes, and performing iteration operation k +1 times until Tk is equal to Tk +1, wherein the iteration tends to converge, and the obtained Tk is the optimal threshold segmentation point T.
5. The device of claim 1, wherein a first positioning mark and a second positioning mark are respectively arranged on the fault code display area and the water meter reading display area;
the fault code display area and the water meter reading display area are positioned and segmented, and the method comprises the following steps:
acquiring a first positioning coordinate of the first positioning identifier and a second positioning coordinate of the second positioning identifier;
superposing a preset superposition template above the integral display image according to the first positioning coordinate and the second positioning coordinate, and superposing the integral display image to obtain a fault code display area and a water meter reading display area;
the preset superposition template comprises a first area corresponding to the fault code display area, a second area corresponding to the water meter reading display area and a third area, wherein the area of the third area is larger than the water surface area, pixel points of the first area and the second area are in a transparent state, and pixel points of the third area are in an opaque state.
6. The device according to claim 5, wherein the preset overlay template is provided with a first mobile identifier and a second mobile identifier;
the step of superposing a preset superposition template above the integral display image according to the first positioning coordinate and the second positioning coordinate comprises the following steps:
and overlapping a preset overlapping template above the integral display image by taking the first positioning coordinate as a target point and the second positioning coordinate as a target point, wherein the first mobile identifier is overlapped with the first positioning identifier, and the second mobile identifier is overlapped with the second positioning identifier.
7. The apparatus of claim 1, wherein the obtaining the first location coordinates of the first location identifier and the second location coordinates of the second location identifier comprises:
acquiring pixel point coordinates of a plurality of pixel points of the first positioning identification, and performing weighted average processing on the pixel point coordinates according to a first strategy to acquire a first positioning coordinate;
and obtaining pixel point coordinates of a plurality of pixel points of the second positioning identification, and carrying out weighted average processing on the pixel point coordinates according to a second strategy to obtain the second positioning coordinates.
8. The apparatus of claim 7,
the first strategy is as follows:
Figure RE-FDA0002766061890000031
the second strategy is as follows:
Figure RE-FDA0002766061890000041
wherein X1 represents the abscissa of the first positioning coordinate, y1 represents the ordinate of the first positioning coordinate, X1n represents the abscissa of the pixel point of the first positioning coordinate, y1n represents the abscissa of the pixel point of the first positioning coordinate, X2 represents the abscissa of the second positioning coordinate, y2 represents the ordinate of the second positioning coordinate, X2n represents the abscissa of the pixel point of the first positioning coordinate, and y2n represents the abscissa of the pixel point of the first positioning coordinate.
9. A water meter function self-checking method is characterized by comprising the following steps:
detecting the water meter according to a storage detection unit, a module communication detection unit, a valve detection unit, an AD conversion detection unit and an LED display detection unit, responding to a fault signal of the detection unit, outputting and displaying a corresponding fault code;
collecting an integral display image of an LED display unit of the water meter, wherein the integral display image comprises a fault code display area and a water meter reading display area;
receiving the integral display image, and sequentially carrying out image graying processing, image binarization processing, fault code display area and water meter reading display area positioning and segmentation processing on the integral display image to obtain a fault code display area and a water meter reading display area;
and performing data extraction processing on the fault code display area and the water meter reading display area to obtain the fault code and the water meter reading.
CN202010982091.9A 2020-09-17 2020-09-17 Water meter function self-checking device and method Active CN112113638B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010982091.9A CN112113638B (en) 2020-09-17 2020-09-17 Water meter function self-checking device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010982091.9A CN112113638B (en) 2020-09-17 2020-09-17 Water meter function self-checking device and method

Publications (2)

Publication Number Publication Date
CN112113638A true CN112113638A (en) 2020-12-22
CN112113638B CN112113638B (en) 2024-02-02

Family

ID=73800104

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010982091.9A Active CN112113638B (en) 2020-09-17 2020-09-17 Water meter function self-checking device and method

Country Status (1)

Country Link
CN (1) CN112113638B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113532598A (en) * 2021-09-17 2021-10-22 江苏伸辰智能仪器有限公司 Online fault detection and regulation system of intelligent water meter
CN115876288A (en) * 2023-02-27 2023-03-31 泰安奇正电子科技有限公司 Electronic instrument fault analysis method and system based on big data

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102967846A (en) * 2012-12-11 2013-03-13 江苏卡欧万泓电子有限公司 Fault self-checking method for intelligent ammeter
JP2013057583A (en) * 2011-09-08 2013-03-28 Hochiki Corp Water supply usage monitoring system and water supply usage monitoring method
CN103955694A (en) * 2014-04-09 2014-07-30 广州邦讯信息系统有限公司 Image recognition meter reading system and method
CN206312293U (en) * 2016-12-21 2017-07-07 武汉蓝焰自动化应用技术有限责任公司 Modular intelligent domestic diaphragm gas meter
CN107403180A (en) * 2017-06-30 2017-11-28 广州广电物业管理有限公司 A kind of numeric type equipment detection recognition method and system
CN108491844A (en) * 2018-02-07 2018-09-04 西安工程大学 Water meter automatic checkout system based on image procossing and its image processing method
CN110287953A (en) * 2019-05-20 2019-09-27 湖北九感科技有限公司 Water level automatic identifying method and device
CN110490195A (en) * 2019-08-07 2019-11-22 桂林电子科技大学 A kind of water meter dial plate Recognition of Reading method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013057583A (en) * 2011-09-08 2013-03-28 Hochiki Corp Water supply usage monitoring system and water supply usage monitoring method
CN102967846A (en) * 2012-12-11 2013-03-13 江苏卡欧万泓电子有限公司 Fault self-checking method for intelligent ammeter
CN103955694A (en) * 2014-04-09 2014-07-30 广州邦讯信息系统有限公司 Image recognition meter reading system and method
CN206312293U (en) * 2016-12-21 2017-07-07 武汉蓝焰自动化应用技术有限责任公司 Modular intelligent domestic diaphragm gas meter
CN107403180A (en) * 2017-06-30 2017-11-28 广州广电物业管理有限公司 A kind of numeric type equipment detection recognition method and system
CN108491844A (en) * 2018-02-07 2018-09-04 西安工程大学 Water meter automatic checkout system based on image procossing and its image processing method
CN110287953A (en) * 2019-05-20 2019-09-27 湖北九感科技有限公司 Water level automatic identifying method and device
CN110490195A (en) * 2019-08-07 2019-11-22 桂林电子科技大学 A kind of water meter dial plate Recognition of Reading method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
赵书涛: "基于计算机视觉的直读仪表校验方法研究", 工程科技Ⅱ辑, pages 31 - 33 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113532598A (en) * 2021-09-17 2021-10-22 江苏伸辰智能仪器有限公司 Online fault detection and regulation system of intelligent water meter
CN115876288A (en) * 2023-02-27 2023-03-31 泰安奇正电子科技有限公司 Electronic instrument fault analysis method and system based on big data
CN115876288B (en) * 2023-02-27 2023-06-16 泰安奇正电子科技有限公司 Electronic instrument fault analysis method and system based on big data

Also Published As

Publication number Publication date
CN112113638B (en) 2024-02-02

Similar Documents

Publication Publication Date Title
CN107944450B (en) License plate recognition method and device
CN112581463A (en) Image defect detection method and device, electronic equipment, storage medium and product
CN112446919A (en) Object pose estimation method and device, electronic equipment and computer storage medium
CN108596944A (en) A kind of method, apparatus and terminal device of extraction moving target
CN112113638B (en) Water meter function self-checking device and method
CN112507934A (en) Living body detection method, living body detection device, electronic apparatus, and storage medium
CN116168351B (en) Inspection method and device for power equipment
CN113837991A (en) Image processing method, device, equipment and storage medium
CN115311469A (en) Image labeling method, training method, image processing method and electronic equipment
CN112419243B (en) Power distribution room equipment fault identification method based on infrared image analysis
CN112734637B (en) Thermal infrared image processing method and system for monitoring temperature of lead
CN114240924A (en) Power grid equipment quality evaluation method based on digitization technology
CN115374517A (en) Testing method and device for wiring software, electronic equipment and storage medium
CN114418293A (en) Artificial intelligence bid evaluation method, system and equipment based on big data analysis
CN115223157A (en) Power grid equipment nameplate optical character recognition method based on recurrent neural network
CN114612897A (en) Intelligent fruit and vegetable weighing and ticketing method and device, electronic equipment and storage medium
CN111368823B (en) Pointer type instrument reading identification method and device
CN112990213A (en) Digital multimeter character recognition system and method based on deep learning
CN116500335B (en) Smart power grid electricity larceny detection method and system based on one-dimensional features and two-dimensional features
CN111382773A (en) Image matching method based on nine-grid principle for monitoring inside of pipeline
CN116883764B (en) Battery system fault identification method and device
CN117315368B (en) Intelligent operation and maintenance inspection method for large-scale data center
CN113642582B (en) Ammeter reading identification method and device, electronic equipment and storage medium
CN115049836B (en) Image segmentation method, device, equipment and storage medium
CN115147902B (en) Training method, training device and training computer program product for human face living body detection model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20231229

Address after: 101300 Building 1, No.9, niuhui North Fifth Street, Niulanshan Town, Shunyi District, Beijing

Applicant after: BEIJING HUIYI TECHNOLOGY CO.,LTD.

Address before: 101300 Building 1, No.9, niuhui North Fifth Street, Niulanshan Town, Shunyi District, Beijing

Applicant before: Beijing Huiyi Wulian Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant