CN114863415A - Diaphragm gas meter reading identification method and device based on projection segmentation method - Google Patents
Diaphragm gas meter reading identification method and device based on projection segmentation method Download PDFInfo
- Publication number
- CN114863415A CN114863415A CN202210791242.1A CN202210791242A CN114863415A CN 114863415 A CN114863415 A CN 114863415A CN 202210791242 A CN202210791242 A CN 202210791242A CN 114863415 A CN114863415 A CN 114863415A
- Authority
- CN
- China
- Prior art keywords
- image
- gas meter
- character wheel
- scanning line
- camera
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 61
- 230000011218 segmentation Effects 0.000 title claims abstract description 33
- 238000001514 detection method Methods 0.000 claims abstract description 46
- 238000007781 pre-processing Methods 0.000 claims abstract description 15
- 238000012545 processing Methods 0.000 claims description 20
- 238000009434 installation Methods 0.000 claims description 19
- 230000000007 visual effect Effects 0.000 claims description 14
- 238000004891 communication Methods 0.000 claims description 8
- 238000009423 ventilation Methods 0.000 claims description 8
- 238000001914 filtration Methods 0.000 claims description 5
- 238000012795 verification Methods 0.000 abstract description 25
- 238000004458 analytical method Methods 0.000 abstract description 3
- 238000005070 sampling Methods 0.000 description 4
- 238000009825 accumulation Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000001502 supplementing effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000003708 edge detection Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/60—Type of objects
- G06V20/62—Text, e.g. of license plates, overlay texts or captions on TV images
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
- G06T7/66—Analysis of geometric attributes of image moments or centre of gravity
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/28—Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/30—Noise filtering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/50—Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis
- G06V10/507—Summing image-intensity values; Histogram projection analysis
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04Q—SELECTING
- H04Q9/00—Arrangements in telecontrol or telemetry systems for selectively calling a substation from a main station, in which substation desired apparatus is selected for applying a control signal thereto or for obtaining measured values therefrom
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30172—Centreline of tubular or elongated structure
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V2201/00—Indexing scheme relating to image or video recognition or understanding
- G06V2201/02—Recognising information on displays, dials, clocks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04Q—SELECTING
- H04Q2209/00—Arrangements in telecontrol or telemetry systems
- H04Q2209/60—Arrangements in telecontrol or telemetry systems for transmitting utility meters data, i.e. transmission of data from the reader of the utility meter
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Computer Networks & Wireless Communication (AREA)
- Geometry (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Arrangements For Transmission Of Measured Signals (AREA)
Abstract
The invention discloses a diaphragm gas meter reading identification method and device based on a projection segmentation method, and the method comprises the following steps: acquiring an initial reading image of the gas meter, and judging whether a scanning line of a camera device is aligned with a horizontal central line of a last character wheel; detecting a horizontal central line of the last digit wheel by using a machine vision algorithm, and adjusting the camera device; acquiring a last character wheel image by using the adjusted camera device; carrying out image preprocessing on the last character wheel image; counting the preprocessed last character wheel image by adopting a projection segmentation method; the method adopts a projection characteristic analysis method for detection, can accurately count the number of characters rotated by the last digit wheel of the counter when the gas meter operates, does not need to identify specific characters, and saves the time of image identification; compared with the traditional gas meter reading detection method that 10 pulses can be sent after the last character wheel rotates one circle, the invention has the advantages that the recognition precision is greatly improved and the verification result is more accurate.
Description
Technical Field
The invention relates to the technical field of metering, in particular to a diaphragm gas meter reading identification method and device based on a projection segmentation method.
Background
The gas meter for gas trade settlement is a compulsory verification measuring instrument, and the accuracy of the value of the gas meter is directly related to the interests of both consumers and gas companies. The verification work of the gas meter is a basic means for checking whether the metering accuracy of the gas meter is qualified, and comprises 5 verification items, namely appearance, tightness, pressure loss, indicating error and additional device function detection.
At present, most gas meter manufacturers and legal metering and calibrating mechanisms calibrate the gas meters in a manual operation or semi-automatic mode, and the gas meter readings are manually recorded, so that the workload is large; the subjective error of the calibrating personnel is difficult to control, so that the metering accuracy is not high. In the accumulated flow reading link of the gas indication value error verification item, the automatic detection mode is not ideal; the existing automatic detection mode mainly carries out photoelectric sampling on a last character wheel of a counter to be detected and carries out image recognition on characters of the character wheel of the counter.
The principle of the photoelectric sampling mode of the last digit wheel of the counter is as follows: a photosensitive paillette is pasted on the last digit wheel of a gas meter counter, a photoelectric sampler is arranged to irradiate the last digit wheel and sense the paillette, so that the automatic collection of the accumulated volume of a detected meter is completed, namely, the paillette also rotates along with the rotation of the last digit wheel, the photoelectric sampler senses the paillette once when the digit wheel rotates for one circle, and samples are collected once or a pulse (representing the fixed volume value corresponding to one circle of rotation of the last digit wheel of the gas meter, such as 10L) is output until the accumulation of the volume number of the detected meter is completed, so that the automatic detection is realized. The automatic detection mode has the defects that irradiation sampling must be carried out when the detection is started until the photosensitive sheet of the last character wheel is turned to the front surface of the dial plate, and the detection can be started only when the photosensitive sheet just turns away from the front surface, the photosensitive sheet needs to spend more idle time to wait for the photosensitive sheet to return to the front position, especially, a lot of time can be wasted at a small-flow detection point, and the detection efficiency is greatly reduced.
The counter character wheel image identification automatic detection has two modes: shooting an image of a last character wheel of a counter before verification and establishing a template, shooting an image of the last character wheel rotating at a high speed during verification and matching the image with the template to judge whether the image is consistent, automatically judging whether the image is consistent with the template image when the last character wheel rotates for one circle, and sending a pulse in real time; and (4) continuously carrying out verification, wherein the last character wheel sends a pulse once rotating for one circle until the character wheel completes the rotation of an integral number of circles and the ventilation volume or verification time of the to-be-detected meter reaches a preset number, and the whole process realizes automatic verification. The method has high requirements on the accuracy of image identification and sampling intervals, and because one pulse represents the volume value (fixed value, such as 10L) of the last character wheel rotating for one circle, once one pulse is lost in the verification process, the recorded accumulated volume of the detected table is greatly different from the actual value, and the verification result is directly wrong. When the calibration is started, shooting the character wheel image of the counter and identifying and converting the character wheel image into an initial accumulated volume value, when the ventilation volume or the calibration time of the calibration device reaches a preset number, shooting the character wheel image of the counter again, identifying and converting the character wheel image into an end accumulated volume value, wherein the difference between the initial accumulated volume value and the end accumulated volume value is a volume indicating value to be detected, and the volume indicating value is compared with an actual gas quantity value of the gas meter measured by a standard device, so that an indicating value error can be calculated, and automatic calibration is realized. Because the counter character wheel rotates ceaselessly in the verification process, the number of the shot character wheel may be 2 adjacent half characters instead of a complete character (the numbers are incomplete up and down in the dial jump table gap), and the character matching with the character library is difficult to carry out, so that great difficulty is brought to image recognition, the recognition accuracy rate may be reduced, the existing half character detection and recognition algorithm is complex, the overall efficiency and the success rate are not high, and in addition, the external interference such as uneven brightness and the like in the image shooting can influence the success rate of the image recognition.
In summary, the existing automatic calibration device for the gas meter has shortcomings, the calibration quality and efficiency need to be improved, and a calibration method and a device with higher accuracy, stronger anti-interference capability and higher automation degree need to be developed urgently to realize efficient and accurate calibration of the gas meter.
For example, chinese patent CN201711279556.9 discloses a remote gas meter reading system and method with intelligent identification function, in which a command sending module sends a meter reading instruction to a regional gas meter, and an application server and a relay device send the reading instruction to a signal transceiver, so that the signal transceiver reads the reading of the gas meter corresponding to an identification mark, thereby achieving the purpose of remote meter reading.
Disclosure of Invention
The invention mainly solves the problem of low reading identification accuracy of the gas meter in the prior art; the method and the device for recognizing the readings of the diaphragm gas meter based on the projection segmentation method are provided, the rotated characters are recognized by utilizing the color difference between the character part and the rest parts of the gas meter, so that the accumulated volume reading of the gas meter is calculated, and the accuracy is high.
The technical problem of the invention is mainly solved by the following technical scheme: the diaphragm gas meter reading identification method based on the projection segmentation method comprises the following steps:
acquiring an initial reading image of the gas meter, and judging whether a scanning line of a camera device is aligned with a horizontal central line of a last character wheel;
detecting a horizontal central line of the last digit wheel by using a machine vision algorithm, and adjusting the camera device;
acquiring a last character wheel image by using the adjusted camera device;
carrying out image preprocessing on the last character wheel image;
counting the preprocessed last character wheel image by adopting a projection segmentation method;
and calculating the accumulated flow indicating value of the gas meter according to the counting result. The method has the advantages that the last character wheel character counting is carried out by utilizing a projection segmentation method, whether characters pass through is detected according to different pixel projection values, one pulse is output when one character is detected, the accumulated volume indicating value of the gas meter can be calculated according to the accumulated pulse number, and compared with the traditional image detection and photoelectric detection, the method has better accuracy and reduces reading errors.
Preferably, the image preprocessing comprises image mean filtering, image expansion, image graying and binarization. After image mean filtering processing, some noise points caused by shooting reasons and scale marks with narrow width at the right side of the last character wheel are smoothed; through image expansion processing, lines of characters become thicker, and image recognition is easier; through image graying processing, the acquired three-channel image is simplified into a single-channel image; after image binarization processing, the characters become white, and the rest parts of the character wheel chassis become black, so that subsequent character recognition is facilitated.
Preferably, the projection segmentation method includes: after image preprocessing, the character is white, other areas are black, the camera device fixedly scans the central line of the last character wheel to obtain the pixel values of all points on the central line when the last character wheel rotates, when the character passes through the horizontal central line, the camera device obtains white pixel points from a scanning line, the pixel values are 255, when the character passes through the horizontal central line, the camera device obtains black pixel points from the scanning line, and the pixel values are 0; judging whether a character passes through according to the pixel vertical projection value, and when the previous scanning line is a black pixel value and the current scanning line has a white pixel value, namely the previous scanning line pixel vertical projection value is 0 and the current scanning line pixel vertical projection value is 255, judging the current scanning line as an upper character boundary; when the white pixel value appears on the previous scanning line and the black pixel value appears on the current scanning line, namely the vertical projection value of the pixels on the previous scanning line appears 255 and the vertical projection value of the pixels on the current scanning line is 0, the previous scanning line is judged as the lower boundary of the character, and pulse counting is carried out according to the detected lower boundary of the character. Scanning is carried out along the horizontal central line (the x direction in a two-dimensional coordinate system) of the last character wheel through a camera, the statistical histogram of pixel values of the acquired image after preprocessing is in a wave crest shape, namely the pixel value of a character is 255, the pixel point of a gap is converted into 0 through binarization, when the pixel values detected along the central line of the character wheel are all 0, the character gap can be judged, and when the pixel value detected on the central line is 255, the character can be judged. The method comprises the steps that a gas meter runs at a certain speed, the calibration is started after the flow is stabilized at a calibration flow point, a camera starts to identify a horizontal central line on the front face of a last-position character wheel, when characters exist in a scanning line of a previous frame and no character exists in a current scanning line, the lower boundary of the characters of the previous scanning line is judged to be set to be high level, a counting pulse is sent to a pulse counter through a signal line, and otherwise, no pulse is sent; the pulse number is continuously accumulated in the verification process until the verification is finished, character segmentation and recognition are carried out through a projection segmentation method, the last character wheel does not need to rotate for one circle to count, but rotates for one time to count, the error is reduced, and the accuracy of reading is improved.
Preferably, the specific method for calculating the indication value of the accumulated flow of the gas meter comprises the following steps:
wherein,indicating the ventilation accumulated flow for the detected meter;the volume value of the last character wheel of the mechanical counter is rotated for one circle;to accumulate the number of pulses.
The invention also provides a diaphragm gas meter reading identification device based on the projection segmentation method, which comprises the following steps: the visual detection module is used for acquiring a last character wheel image, completing character recognition and pulse counting, and is connected with an upper computer; the positioning module is used for adjusting the position of the visual detection module and is connected with an upper computer; and the upper computer is used for acquiring the last character wheel image of the visual detection module, comparing the last character wheel image of each frame with the initial reading image, controlling the positioning module to work, and outputting the accumulated flow indicating value of the gas meter according to the pulse counting result. A positioning module is arranged to adjust the visual detection module in the horizontal direction and the vertical direction, and if the scanning line of the camera deviates from the horizontal central line of the last character wheel in the vertical direction, the vertical position of the camera is adjusted by rotating a position adjusting knob in the vertical direction; if the scanning line of the camera deviates from the horizontal central line of the last character wheel in the horizontal direction, the left and right positions of the camera are adjusted by rotating the horizontal position adjusting knob, so that errors in the detection process are reduced, and the accuracy is improved.
Preferably, the visual detection module comprises a camera, an image processing module and a pulse counter, the camera is installed above the gas meter through an installation shaft, the camera is used for shooting a final character wheel image and an initial reading image, the camera is respectively connected with the image processing module and the upper computer, the image processing module carries out image processing on the final character wheel image and sends a pulse signal to the pulse counter, and the pulse counter counts according to the received pulse signal and transmits a counting result to the upper computer.
Preferably, the positioning module comprises a first adjusting button and a second adjusting button, the first adjusting button is installed on one side of the camera and used for adjusting the camera to move left and right, and the second adjusting button is installed on an installation shaft of the camera and used for adjusting the vertical distance between the installation shaft and the gas meter.
As preferred, still include communication module, communication module includes GPRS module, battery cell and light filling lamp, the vision detection module passes through the GPRS module and is connected with remote terminal, the battery cell supplies power for vision detection module, GPRS module and light filling lamp, the light filling lamp is connected with the GPRS module. The GPRS module is configured for remote wireless communication, detection results are remotely transmitted, the remote meter reading function is achieved, the system is more convenient, and the camera shooting quality is improved through the light supplementing lamp.
The invention has the beneficial effects that: the method has the advantages that through the segmentation principle of projection characteristic analysis, the mode of detecting and counting characters rotated by the last character wheel of the gas meter counter is innovatively provided, the detection is carried out by adopting a projection characteristic analysis method according to the obvious color difference between the characters and gaps in the last character wheel of the gas meter, the number of the characters rotated by the last character wheel of the counter during the operation of the gas meter can be accurately counted, the specific character type does not need to be identified, and the time of image identification is saved; compared with the traditional gas meter reading detection method that 10 pulses can be sent after the last digit wheel rotates one circle, the invention has the advantages that the identification precision is greatly improved, the verification error is greatly reduced, and the verification result is more accurate.
Drawings
Fig. 1 is a flowchart of a reading identification method according to an embodiment of the present invention.
Fig. 2 is a schematic structural diagram of a reading identification device according to an embodiment of the present invention.
In the figure, the device comprises a workbench 1, a camera 2, a camera 3, an installation shaft 4, a gas meter 5, a gas meter carrying platform 6, a first adjusting button 7, a second adjusting button 8, a gas meter vent hole 9 and a gas meter end position character wheel.
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict.
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions in the embodiments of the present invention are further described in detail by the following embodiments in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
The first embodiment is as follows: as shown in fig. 1, before detection, a position of a camera needs to be positioned, and by obtaining an initial reading image of the gas meter, it is determined whether a scanning line of a camera device is aligned with a horizontal central line of a last character wheel, a horizontal central line of the last character wheel is detected by using a machine vision algorithm, if the scanning line of the camera device is aligned with the horizontal central line of the last character wheel, subsequent reading identification detection is started, and if the scanning line of the camera device is not aligned with the horizontal central line of the last character wheel, the camera is adjusted in an up-down direction, a left-right direction or a right-left direction, and then subsequent reading identification detection is started, and the positioning method of the horizontal central line of the invention is as follows: after image preprocessing, firstly utilizing findContours function to carry out edge detection, then utilizing boundingRef function to search an external rectangle of the character wheel outline, then carrying out screening according to the area and the length-width ratio, finally utilizing rectangle function to draw a rectangle meeting the conditions, and utilizing line function to draw a horizontal central line of the character wheel according to the geometric information of the rectangle. And acquiring a horizontal central line of the last character wheel before the scanning and counting of the camera device, and then adjusting the distance between the camera device and the gas meter according to the horizontal central line to ensure that the scanning line is superposed with the horizontal central line.
The reading identification step specifically comprises the following steps:
s1: acquiring a last character wheel image by using the adjusted camera device; when the gas meter starts to operate by ventilation, the character wheel of the mechanical counter rotates to count, the characters and the scale marks on the last character wheel are white, other parts are red, the characters can be divided from the character wheel according to color difference and the number of the rotated characters can be identified, the last character wheel rotates for a circle to count 10 characters, and the acquired image information only needs to identify the color difference and does not need to identify the shape of the characters.
S2: carrying out image preprocessing on the last character wheel image; the image preprocessing comprises image mean filtering, image expansion, image graying and binaryzation, and through the image mean filtering, noise points caused by shooting and scale marks with narrow width on the right side of the last character wheel are smoothed; through image expansion processing, lines of characters become thicker, and image recognition is easier; through image graying processing, the acquired three-channel image is simplified into a single-channel image; after image binarization processing, the characters become white, and the rest parts of the character wheel chassis become black, so that subsequent character recognition is facilitated.
S3: counting the preprocessed last character wheel image by adopting a projection segmentation method; the projection segmentation method includes: after image preprocessing, the character is white, other areas are black, the camera device fixedly scans the central line of the last character wheel to obtain the pixel values of all points on the central line when the last character wheel rotates, when the character passes through the horizontal central line, the camera device obtains white pixel points from a scanning line, the pixel values are 255, when the character passes through the horizontal central line, the camera device obtains black pixel points from the scanning line, and the pixel values are 0; judging whether a character passes through according to the pixel vertical projection value, and when the previous scanning line is a black pixel value and the current scanning line has a white pixel value, namely the previous scanning line pixel vertical projection value is 0 and the current scanning line pixel vertical projection value is 255, judging the current scanning line as an upper character boundary; when the white pixel value appears on the previous scanning line and the black pixel values appear on the current scanning line, namely the vertical projection value of the pixels of the previous scanning line appears 255 and the vertical projection values of the pixels of the current scanning line are all 0, the previous scanning line is judged as a character lower boundary, and pulse counting is carried out according to the detected character lower boundary; scanning is carried out along the horizontal central line (the x direction in a two-dimensional coordinate system) of the last character wheel through a camera, the statistical histogram of pixel values of the acquired image after preprocessing is in a wave crest shape, namely the pixel values of the characters are converted into 255 through binarization, and the gap pixel points are converted into 0 through binarization, when the pixel values detected along the central line of the character wheel are all 0, the character gap can be judged, and when a point pixel value detected on the central line is 255, the character can be judged. The gas meter runs at a certain speed, the calibration is started after the flow is stabilized at a calibration flow point, the camera starts to identify the horizontal central line on the front surface of the last character wheel, when the character exists in the scanning line of the previous frame and the character does not exist in the current scanning line, the lower boundary of the character of the previous scanning line is judged and set as a high level, a counting pulse is sent to the pulse counter through a signal line, otherwise, the pulse is not sent; the pulse number is continuously accumulated in the verification process until the verification is finished, character segmentation and recognition are carried out through a projection segmentation method, the last character wheel does not need to rotate for one circle to count, but rotates for one time to count, the error is reduced, and the accuracy of reading is improved.
For example, when the last character wheel has numbers 0-9, when scanning number 0, and the scanning line passes through the vertex of number 0, the pixel value of a point detected on the central line is 255, the scanning is continued, the pixel values of two points appear to be 255, when the lower boundary of the number is reached, the pixel value of a point returned to is 255, and the pixel value of the next scanning line is zero, at this time, it can be determined that the detection of one character is finished, and a pulse is sent, and similarly, the same detection is performed on numbers 1-9, and only the character needs to be detected without specifically identifying the numbers.
S4: calculating the accumulated flow indication value of the gas meter according to the counting result; the specific method for calculating the indication value of the accumulated flow of the gas meter comprises the following steps:
wherein,indicating the ventilation accumulated flow for the detected meter;the volume value of the last character wheel of the mechanical counter is rotated for one circle;to accumulate the number of pulses. When the pulse accumulation count reaches 10, the gas meter is finishedThe last character wheel is identified by 0-9 circles of numbers, the last character wheel completes one circle of rotation, and the ventilation volume indication value of the detected meter is accumulated by a fixed value (such as 10L). The existing automatic detection mode, such as photosensitive film for identifying the last character wheel and rotation turns of the same character for identifying the last character wheel, is that a pulse is sent only when the last character wheel rotates one turn; the reading method and the reading device adopt a mode of identifying the number of the rotated characters in the last character wheel to count the pulses (because the last character wheel contains 10 characters, 10 pulses can be sent every time the character wheel rotates for one circle), the identification precision is higher, the error is smaller, and the result is more accurate. The pulse number obtained in the verification process is collected and sent to an upper computer, and the accumulated flow indication value V of the to-be-detected meter is calculated through the calculation formula, so that the method has stronger anti-interference performance and improves the accuracy.
The invention also provides a diaphragm gas meter reading identification device based on a projection segmentation method, which comprises a visual detection module for acquiring a last digit wheel image, completing character identification and counting pulses, and a positioning module for adjusting the position of the visual detection module, wherein the visual detection module and the positioning module are both connected with an upper computer; the upper computer is used for obtaining a last digit wheel image of the visual detection module, comparing the last digit wheel image of each frame with the initial reading image, controlling the positioning module to work, and outputting an accumulated flow indicating value of the gas meter according to a pulse counting result.
The visual detection module comprises a camera 2, an image processing module and a pulse counter, the camera is installed above the gas meter through an installation shaft and used for shooting a final character wheel image and an initial reading image, the camera is respectively connected with the image processing module and an upper computer, the image processing module carries out image processing on the final character wheel image and sends a pulse signal to the pulse counter, and the pulse counter counts according to the received pulse signal and transmits a counting result to the upper computer.
The positioning module comprises a first adjusting button 6 and a second adjusting button 7, the first adjusting button is installed on one side of the camera and used for adjusting the camera to move left and right, and the second adjusting button is installed on the installation shaft of the camera and used for adjusting the vertical distance between the installation shaft and the gas meter.
The upper computer is arranged in the workbench 1, a gas meter carrying platform 5 for installing a gas meter is arranged on the workbench, one end of the gas meter carrying platform is fixedly connected with the workbench, the other end of the gas meter carrying platform is connected with the gas meter 4, the gas meter carrying platform comprises a storage rack and a lifting rod, the lifting can be extended and contracted to drive the storage rack to be close to or far away from the installation shaft, the storage rack is used for storing the gas meter, the installation axle is set up in the top of gas table, installation axle slidable mounting is on the workstation, the camera is installed on installation axle 3, the installation axle finely tunes from top to bottom through second adjustment button, ensure that the camera is aimed at the horizontal central line of gas table last position character wheel 9, gas table microscope carrier is provided with a plurality ofly, the camera can a plurality ofly set up on the installation axle, every camera corresponds a gas table, the lower extreme of installation axle is provided with the gas circuit air inlet, gas table air vent 8 is connected with the gas circuit air inlet and makes things convenient for the gas circulation of gas table.
After a diaphragm gas meter to be verified is installed by a verifier, verification is started by an upper computer, after a driving signal is received, an installation shaft is lowered, a gas meter carrying platform drives a detected meter to rise to a detection area, a camera vertically irradiates the front of the detected gas meter, the camera shoots an image of the detected gas meter and confirms whether a scanning line is on the horizontal central line of a last character wheel 9 of a counter, the camera is required to shoot the image of the gas meter due to the fact that the detection precision requirement is high, the fault tolerance rate is 1-2 mm, a position signal is fed back to a control system in real time, if the position is deviated, a first adjusting button and a second adjusting button can be adjusted until the scanning line of the camera is superposed with the horizontal central line of the last character wheel of the counter, the detection precision requirement is met, and high-precision positioning regulation and control are achieved.
When the ventilation volume or the verification time of the detected gas meter reaches a set number, completing verification of a corresponding flow point; after the verification of the small flow, the medium flow and the large flow is finished, the verification is finished, the mounting shaft is controlled to ascend, and the reading device is retracted, so that a checker can conveniently detach the meter.
When the gas meter is ventilated and operated, the character wheel of the mechanical counter rotates to count, and when the last character wheel character passes through the geometric horizontal central line on the front side, at least one white pixel point exists on the line segment; when the character gap passes, no white pixel point exists, whether characters are rotated or not is judged according to the difference of the vertical projection values of the pixels, and the accumulated volume indicating value of the gas meter can be calculated by counting the number of the rotated characters. The invention uses the camera to shoot the line segment of the front horizontal center line of the last digit character wheel of the detected meter and carries out image preprocessing, when the character is transferred to the horizontal center line, the camera acquires the white pixel value on the line segment, when the line gap of the character is transferred to the horizontal center line, the camera does not acquire the white pixel value, then whether the character passes through can be detected according to the difference of the pixel projection values, a pulse is output when every character is detected, and the accumulated volume indicating value of the gas meter can be calculated according to the accumulated number of the pulses.
By adopting a projection segmentation technology of machine vision, when a character wheel rotates, pixel values acquired by a camera at the position of a horizontal central line are changed alternately, and after image processing of a software system, when characters are detected, white pixel points appear in a scanning line (it needs to be explained that a photosensitive paillette is arranged on a character wheel at the end of a gas meter and usually covers the whole character, such as the number of the character is '6'. The method does not influence the effect of the image identification method and the device because the paillette is white as the color of other characters after image preprocessing), when gaps of the characters are detected, no white pixel points exist in the scanning line, and whether the characters are detected or not can be distinguished by utilizing a color segmentation principle. The gas meter runs at a certain speed, the calibration is started after the flow rate is stabilized at a calibration flow rate point, the control system sends an instruction to the camera and the pulse counter, the camera starts to recognize the horizontal central line on the front surface of the last character wheel at a high speed, when the characters exist in the scanning line of the last frame and the characters do not exist in the current scanning line, the lower boundary of the characters of the last scanning line is judged to be set to be at a high level, a counting pulse is sent to the pulse counter through a signal line, otherwise, the pulse is not sent (the calibration can also be started and the counting pulse is sent when the upper boundary of the first character is detected, and the pulse is sent once when the upper boundary of the character is recognized in the calibration process until the calibration is completed).
The reading identification device has the characteristics of convenience in installation and easiness in operation, a communication module is additionally arranged on the basis of a reading device, the communication module comprises a GPRS module, a battery box and a light supplementing lamp, and the reading identification device is arranged on a gas meter without a remote transmission function and can realize remote meter reading, namely, a diaphragm gas meter reading automatic remote transmission method and device based on a projection segmentation technology of machine vision. Before the gas meter is installed and used, a camera shoots a picture and transmits the picture to a remote upper computer, image recognition or manual recognition of a character wheel of a mechanical counter is carried out, the recognized and converted flow value is an initial value, when gas fee settlement is carried out at the end of a charging period, according to the number of pulses accumulated by a pulse counter in the charging period, the converted accumulated flow value is the gas consumption of the user in the period, and the sum of the initial value and the gas consumption in the period is the initial value of the gas consumption in the next period. All images and data are transmitted to a background server system of a gas company and a user mobile terminal in a wireless remote mode through a communication module. The gas consumption value of the gas meter can be obtained regularly without entering a user, a remote meter reading function is realized, a gas company can conveniently master the gas consumption of the user and scientifically and intelligently manage the gas consumption condition, and the problems of difficult meter reading and large workload of entering the user are solved. The user can also check the gas consumption condition of the user through the mobile terminal at any time and any place.
The second embodiment is different from the first embodiment in that the positioning module of the present embodiment includes a base, a rubber block, a first spring, a second spring, a third spring, a first electronic switch, a second electronic switch, a third electronic switch, an electrically controlled rheostat and a power supply module, the base is provided with an opening, the base is mounted on the mounting shaft, the rubber block is fixedly disposed at the opening of the base, the rubber block is provided with a through hole for the camera to pass through, when the camera is mounted in the base, the head of the camera passes through the rubber block and is exposed outside the base, the head of the camera is slidably connected with the rubber block, one end of the first spring is connected with the left side of the camera, the other end of the first spring is connected with the inner wall of the base, the first spring is connected with the power supply module through the first electronic switch, one end of the second spring is connected with the right side of the camera, the other end of the second spring is connected with the inner wall of the base, the second spring is connected with the power supply module through a second electronic switch, one end of a third spring is connected with the upper side of the camera, the other end of the third spring is connected with the inner wall of the base body, the third spring is connected with a third electronic switch, the third electronic switch is connected with the power supply module through an electric control rheostat, and the control ends of the first electronic switch, the second electronic switch, the third electronic switch and the electric control rheostat are all connected with an upper computer and are opened and closed according to instructions of the upper computer.
Through to first spring circular telegram for first spring shrink, the resistance acting of block rubber is overcome to elasticity, makes the block rubber take place deformation, nevertheless can not produce too big deformation, drives the camera and moves to the left, and on the same hand, through moving the second spring right through driving the camera, carries out the electric current circular telegram of predetermineeing to the third spring, makes the third spring carry out the preshrinking, makes the third spring further shrink or extension through increaseing or reducing the electric current, realizes the upper and lower regulation of camera.
The positioning module of the embodiment is different from the positioning module of the first embodiment, and automatic control positioning output by an upper computer instruction is adopted instead of manual adjustment of the first embodiment, so that the remote controllability of the device is improved.
In the third embodiment, on the basis of the first embodiment, a first motor and a second motor are added, control ends of the first motor and the second motor are connected with an upper computer, the first motor drives a first adjusting button to rotate, and the second motor drives a second adjusting button to rotate, so that the manual positioning adjustment of the first embodiment is changed into automatic adjustment and remote adjustment controlled by the upper computer.
The above-described embodiments are only preferred embodiments of the present invention, and are not intended to limit the present invention in any way, and other variations and modifications may be made without departing from the spirit of the invention as set forth in the claims.
Claims (8)
1. The diaphragm gas meter reading identification method based on the projection segmentation method is characterized by comprising the following steps:
acquiring an initial reading image of the gas meter, and judging whether a scanning line of a camera device is aligned with a horizontal central line of a last character wheel;
detecting a horizontal central line of the last digit wheel by using a machine vision algorithm, and adjusting the camera device;
acquiring a last character wheel image by using the adjusted camera device;
carrying out image preprocessing on the last character wheel image;
counting the preprocessed last character wheel image by adopting a projection segmentation method;
and calculating the accumulated flow indicating value of the gas meter according to the counting result.
2. The method of identifying readings of a diaphragm gas meter based on projection segmentation as set forth in claim 1,
the image preprocessing comprises image mean filtering, image expansion, image graying and binaryzation.
3. The method of identifying readings of a diaphragm gas meter based on projection segmentation as set forth in claim 1,
the projection segmentation method includes: after image preprocessing, the character is white, other areas are black, the camera device fixedly scans the central line of the last character wheel to obtain the pixel values of all points on the central line when the last character wheel rotates, when the character passes through the horizontal central line, the camera device obtains white pixel points from a scanning line, the pixel values are 255, when the character passes through the horizontal central line, the camera device obtains black pixel points from the scanning line, and the pixel values are 0; judging whether a character passes through according to the pixel vertical projection value, and when the previous scanning line is a black pixel value and the current scanning line has a white pixel value, namely the previous scanning line pixel vertical projection value is 0 and the current scanning line pixel vertical projection value is 255, judging the current scanning line as an upper character boundary; when the white pixel value appears on the previous scanning line and the black pixel value appears on the current scanning line, namely the vertical projection value of the pixels on the previous scanning line appears 255 and the vertical projection value of the pixels on the current scanning line is 0, the previous scanning line is judged as the lower boundary of the character, and pulse counting is carried out according to the detected lower boundary of the character.
4. The method for identifying readings of a diaphragm gas meter based on projection segmentation method according to claim 1, 2 or 3,
the specific method for calculating the indication value of the accumulated flow of the gas meter comprises the following steps:
5. A diaphragm gas meter reading recognition apparatus based on a projection segmentation method using the diaphragm gas meter reading recognition method based on the projection segmentation method according to any one of claims 1 to 4, comprising:
the visual detection module is used for acquiring a last character wheel image, completing character recognition and pulse counting, and is connected with an upper computer;
the positioning module is used for adjusting the position of the visual detection module and is connected with an upper computer;
and the upper computer is used for acquiring the last character wheel image of the visual detection module, comparing the last character wheel image of each frame with the initial reading image, controlling the positioning module to work, and outputting the accumulated flow indicating value of the gas meter according to the pulse counting result.
6. A diaphragm gas meter reading identification device based on projection segmentation in accordance with claim 5,
the visual detection module comprises a camera, an image processing module and a pulse counter, the camera is installed above the gas meter through an installation shaft and used for shooting a final character wheel image and an initial reading image, the camera is respectively connected with the image processing module and an upper computer, the image processing module carries out image processing on the final character wheel image and sends a pulse signal to the pulse counter, and the pulse counter counts according to the received pulse signal and transmits a counting result to the upper computer.
7. A diaphragm gas meter reading identification device based on projection segmentation in accordance with claim 6,
the positioning module comprises a first adjusting button and a second adjusting button, the first adjusting button is installed on one side of the camera and used for adjusting the camera to move left and right, and the second adjusting button is installed on the installation shaft of the camera and used for adjusting the vertical distance between the installation shaft and the gas meter.
8. A diaphragm gas meter reading identification device based on projection segmentation method according to claim 5 or 6, characterized in that,
still include communication module, communication module includes GPRS module, battery cell and light filling lamp, the vision detection module passes through the GPRS module and is connected with remote terminal, the battery cell supplies power for vision detection module, GPRS module and light filling lamp, the light filling lamp is connected with the GPRS module.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210791242.1A CN114863415B (en) | 2022-07-07 | 2022-07-07 | Diaphragm gas meter reading identification method and device based on projection segmentation method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210791242.1A CN114863415B (en) | 2022-07-07 | 2022-07-07 | Diaphragm gas meter reading identification method and device based on projection segmentation method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114863415A true CN114863415A (en) | 2022-08-05 |
CN114863415B CN114863415B (en) | 2022-10-28 |
Family
ID=82626668
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210791242.1A Active CN114863415B (en) | 2022-07-07 | 2022-07-07 | Diaphragm gas meter reading identification method and device based on projection segmentation method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114863415B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118351171A (en) * | 2024-05-06 | 2024-07-16 | 江苏康珞生物医药科技有限公司 | Intelligent area analysis system for diaphragm gas meter |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011060067A (en) * | 2009-09-11 | 2011-03-24 | Denkosha:Kk | Automatic meter reading system |
CN112903053A (en) * | 2021-01-14 | 2021-06-04 | 广州能源检测研究院 | Diaphragm gas meter reading method and device based on machine vision and laser sensing |
CN112985547A (en) * | 2021-02-25 | 2021-06-18 | 广州能源检测研究院 | Automatic diaphragm gas meter verification system based on color code sensor |
CN214471200U (en) * | 2021-02-25 | 2021-10-22 | 广州金燃智能系统有限公司 | Diaphragm type gas table calibrating installation |
-
2022
- 2022-07-07 CN CN202210791242.1A patent/CN114863415B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011060067A (en) * | 2009-09-11 | 2011-03-24 | Denkosha:Kk | Automatic meter reading system |
CN112903053A (en) * | 2021-01-14 | 2021-06-04 | 广州能源检测研究院 | Diaphragm gas meter reading method and device based on machine vision and laser sensing |
CN112985547A (en) * | 2021-02-25 | 2021-06-18 | 广州能源检测研究院 | Automatic diaphragm gas meter verification system based on color code sensor |
CN214471200U (en) * | 2021-02-25 | 2021-10-22 | 广州金燃智能系统有限公司 | Diaphragm type gas table calibrating installation |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118351171A (en) * | 2024-05-06 | 2024-07-16 | 江苏康珞生物医药科技有限公司 | Intelligent area analysis system for diaphragm gas meter |
Also Published As
Publication number | Publication date |
---|---|
CN114863415B (en) | 2022-10-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021179679A1 (en) | Automobile dashboard testing system and testing method based on machine vision | |
CN107229930B (en) | Intelligent identification method for numerical value of pointer instrument | |
CN105674880B (en) | Contact net geometric parameter measurement method and system based on binocular principle | |
CN107393270B (en) | A kind of mobile vision inspection device and method for electric meter detection | |
CN103487104B (en) | A kind of image acquisition identification system and method for capillary pipe liquid level type data | |
CN114863415B (en) | Diaphragm gas meter reading identification method and device based on projection segmentation method | |
CN109974582A (en) | A kind of the conductor diameters non-contact vision detection device and method of automotive wire bundle | |
CN107507174A (en) | Power plant's instrument equipment drawing based on hand-held intelligent inspection is as recognition methods and system | |
CN112505663B (en) | Calibration method for multi-line laser radar and camera combined calibration | |
CN107702898A (en) | A kind of car headlamp detection method and device | |
CN110966956A (en) | Binocular vision-based three-dimensional detection device and method | |
CN112157642B (en) | A unmanned robot that patrols and examines for electricity distribution room | |
CN106153158A (en) | The detection method of diaphragm gas meter of based on image acquisition gyration period and device | |
CN118011309B (en) | Automatic ammeter device of electric energy meter verification assembly line capable of avoiding position deviation | |
CN112903053B (en) | Diaphragm gas meter reading method and device based on machine vision and laser sensing | |
JP2024508331A (en) | Detection method using machine vision, its detection device, and its detection system | |
CN207215432U (en) | A kind of automobile headlight detecting device | |
CN211856402U (en) | Automobile instrument panel detection system based on machine vision | |
CN114926841B (en) | Electronic water meter reading image identification method and device based on improved threading method | |
CN116486212A (en) | Water gauge identification method, system and storage medium based on computer vision | |
CN205607423U (en) | Automatic identification equipment of automobile instrument pointer indicated value | |
CN114104894B (en) | Multi-parameter detection method for quality of elevator guide rail | |
CN113503972B (en) | Local dynamic target temperature measurement system based on low-pixel infrared camera | |
CN109410210A (en) | Bar code printing quality detection method based on machine vision | |
CN210571299U (en) | System for measuring optical parameters of small-field projection module |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |