CN114863415B - 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 PDF

Info

Publication number
CN114863415B
CN114863415B CN202210791242.1A CN202210791242A CN114863415B CN 114863415 B CN114863415 B CN 114863415B CN 202210791242 A CN202210791242 A CN 202210791242A CN 114863415 B CN114863415 B CN 114863415B
Authority
CN
China
Prior art keywords
image
gas meter
character wheel
last character
scanning line
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.)
Active
Application number
CN202210791242.1A
Other languages
Chinese (zh)
Other versions
CN114863415A (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.)
GUANGZHOU ENERGY DETECTION RESEARCH INSTITUTE
Original Assignee
GUANGZHOU ENERGY DETECTION RESEARCH INSTITUTE
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 GUANGZHOU ENERGY DETECTION RESEARCH INSTITUTE filed Critical GUANGZHOU ENERGY DETECTION RESEARCH INSTITUTE
Priority to CN202210791242.1A priority Critical patent/CN114863415B/en
Publication of CN114863415A publication Critical patent/CN114863415A/en
Application granted granted Critical
Publication of CN114863415B publication Critical patent/CN114863415B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/66Analysis of geometric attributes of image moments or centre of gravity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/30Noise filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/50Extraction 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/507Summing image-intensity values; Histogram projection analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q9/00Arrangements 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30172Centreline of tubular or elongated structure
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/02Recognising information on displays, dials, clocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q2209/00Arrangements in telecontrol or telemetry systems
    • H04Q2209/60Arrangements 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 or not; detecting the horizontal center line of the last character wheel by using a machine vision algorithm, and adjusting the camera device; acquiring a last character wheel image by using the adjusted camera device; performing 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

Diaphragm gas meter reading identification method and device based on projection segmentation method
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 character wheel of the gas meter counter, a photoelectric sampler is arranged to irradiate the last character wheel and sense the paillette, so that the automatic collection of the accumulated volume of the detected meter is completed, namely, the paillette rotates along with the rotation of the last character wheel, the photoelectric sampler senses the paillette once when the character 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 character 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: (1) shooting an image of a last character wheel of the counter before verification and establishing a template, shooting an image of the rotating last character wheel at a high speed during verification and matching the image with the template to judge whether the images are consistent, automatically judging whether the images are consistent with the template image when the last character wheel rotates for one circle, and sending out 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. (2) When the calibration is started, the character wheel image of the counter is shot and recognized to be converted into an initial accumulated volume value, when the ventilation volume or the calibration time of the calibration device reaches a preset value, the character wheel image of the counter is shot again and recognized to be converted into an end accumulated volume value, 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 which is measured by a standard device and passes through the gas meter, so that the error of the indicating value can be calculated, and the automatic calibration is realized. Because the counter character wheel rotates ceaselessly in the verification process, the number of the shot character wheel can be 2 adjacent half characters instead of a complete character (the numbers of the upper part and the lower part of a dial jump table gap are not complete), and the shot character wheel is difficult to be matched with a character library, so that greater difficulty is brought to image recognition, the recognition accuracy rate can 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 success rate of the image recognition can be influenced by external interference such as uneven brightness and the like existing in the image shooting process.
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 an intelligent identification function, where a command sending module sends a meter reading instruction for 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 reading 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 or not;
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;
performing 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 a character passes through is detected according to the difference of pixel projection values, a 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 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.
Preferably, the specific method for calculating the accumulated flow indication value of the gas meter comprises the following steps:
Figure 100002_DEST_PATH_IMAGE002
wherein the content of the first and second substances,
Figure 100002_DEST_PATH_IMAGE004
providing a value of the ventilation accumulated flow for the detected meter;
Figure 100002_DEST_PATH_IMAGE006
the volume value of one circle of last character wheel of the mechanical counter is rotated;
Figure 100002_DEST_PATH_IMAGE008
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 the 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, and the camera shooting quality is improved through the light supplementing lamp.
The beneficial effects of the invention are: 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 flow chart of a reading identification method according to an embodiment of the 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 should 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 acquiring an initial reading image of the gas meter, it is determined whether a scanning line of a camera device is aligned with a horizontal center line of a last character wheel, a horizontal center 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 center 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 center 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, wherein the positioning method of the horizontal center line of the invention comprises the following steps: 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 noise points and scale marks with narrow width on the right side of the last character wheel caused by shooting are smoothed by the image mean filtering; through image expansion processing, lines of characters become thicker, and image recognition is easier; the collected three-channel image is simplified into a single-channel image through image graying processing; 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 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.
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:
Figure DEST_PATH_IMAGE002A
wherein the content of the first and second substances,
Figure 422405DEST_PATH_IMAGE004
indicating the ventilation accumulated flow for the detected meter;
Figure 870704DEST_PATH_IMAGE006
the volume value of one circle of last character wheel of the mechanical counter is rotated;
Figure 56966DEST_PATH_IMAGE008
to accumulate the number of pulses. When the pulse accumulation count reaches 10, the last digit wheel of the gas meter is identified by 0-9 circles, the last digit 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 the photosensitive film for identifying the last character wheel and the rotation turns of the same character for identifying the last character wheel, is that a pulse is sent every time the last character wheel rotates for one turn; the reading method and the reading device adopt a mode of identifying the number of the characters in the last character wheel which are rotated to count the pulses (because the last character wheel contains 10 characters, 10 pulses can be sent every time the character wheel rotates 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 anti-interference performance is higher, and the accuracy is improved.
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 end character wheel images and initial reading images, the camera is connected with the image processing module and an upper computer respectively, the image processing module carries out image processing on the end character wheel images and sends pulse signals to the pulse counter, and the pulse counter counts according to the received pulse signals and transmits counting results 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 host computer sets up in workstation 1, be provided with the gas table microscope carrier 5 that is used for installing the gas table on the workstation, the one end and the workstation fixed connection of gas table microscope carrier, the other end and the gas table 4 of gas table microscope carrier are connected, gas table microscope carrier includes storage rack and lifter, it can stretch out and draw back to go up and down, it is close to or keep away from the installation axle to drive the storage rack, the storage rack is used for depositing the gas table, set up the installation axle 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 aims 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 8 is connected with the gas circuit air inlet and is made things convenient for the gas circulation of gas table.
After a diaphragm gas meter to be detected is installed by a detector, detection 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 in the horizontal center line of the last word wheel 9 of the counter, the camera is required to shoot the image of the gas meter due to the fact that the detection precision is high and the fault tolerance is between 1 and 2mm, a position signal is fed back to a control system in real time, if the position has a deviation, a first adjusting button and a second adjusting button can be adjusted until the scanning line of the camera is overlapped with the horizontal center line of the last word 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 installation 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.
The image recognition method and the image recognition device have the advantages that the projection segmentation technology of machine vision is adopted, when the character wheel rotates, the pixel value collected by the camera at the horizontal center line position changes alternately, after the image processing of a software system, when a character is detected, white pixel points appear in a scanning line (it needs to be explained that a photosensitive paillette is arranged on the last character wheel of the gas meter and generally covers the whole character, such as the character number of 6', the effect of the image recognition method and the device is not influenced because the paillette is white as the color of other characters after the image preprocessing), when the gap of the character is detected, no white pixel points exist in the scanning line, and whether the character is detected or not can be distinguished by utilizing the 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, the communication module is additionally arranged on the basis of the reading device and comprises a GPRS module, a battery box and a light supplement lamp, and remote meter reading can be realized by mounting the communication module on a gas meter without a remote transmission function, namely, the method and the device for automatically remotely transmitting the reading of the diaphragm gas meter based on the 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 wirelessly and remotely through the communication module and transmitted to a background server system of a gas company and a user mobile terminal. 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 positioning module of the 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 varistor and a power supply module, wherein the base is provided with an opening, the base is mounted on a mounting shaft, the rubber block is fixedly arranged at the opening of the base, the rubber block is provided with a through hole for a 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 connected with the rubber block in a sliding manner, 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 inner wall of the base, 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 the second electronic switch, one end of the 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, the third spring is connected with the third electronic switch, the third electronic switch is connected with the varistor, the electrically controlled on and on/off of the varistor according to an instruction of the electronic switch, and on the varistor, and on the electronic switch.
Through to first spring circular telegram for first spring shrink, the resistance acting of block rubber is overcome to elasticity, make the block rubber take place deformation, nevertheless can not produce too big deformation, drive the camera and move to the left, and in a similar way, through moving the second spring right through driving the camera, carry out the electric current circular telegram of predetermineeing to the third spring, make the third spring carry out preshrinking, make the third spring further shrink or extend through increaseing or reducing the electric current, realize 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 (7)

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;
performing image preprocessing on the last character wheel image;
counting the preprocessed last character wheel image by adopting a projection segmentation method;
calculating the accumulated flow indicating value of the gas meter according to the counting result;
the projection segmentation method includes: after image preprocessing, the character is white, other areas are black, the camera device fixedly scans the horizontal central line of the last character wheel to obtain the pixel values of all points on the horizontal 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 a character gap passes through the horizontal central line, the black pixel points are obtained from the scanning line by the camera device, 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.
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 for identifying readings of a diaphragm gas meter based on projection segmentation method according to claim 1 or 2, wherein,
the specific method for calculating the indication value of the accumulated flow of the gas meter comprises the following steps:
Figure DEST_PATH_IMAGE002
wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE004
providing a value of the ventilation accumulated flow for the detected meter;
Figure DEST_PATH_IMAGE006
the volume value of the last character wheel of the mechanical counter is rotated for one circle;
Figure DEST_PATH_IMAGE008
to accumulate the number of pulses.
4. 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 3, 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.
5. A diaphragm gas meter reading identification device based on projection segmentation in accordance with claim 4,
the visual detection module comprises a camera device, an image processing module and a pulse counter, the camera device is installed above the gas meter through an installation shaft and used for shooting a last character wheel image and an initial reading image, the camera device is respectively connected with the image processing module and an upper computer, the image processing module carries out image processing on the last 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.
6. A diaphragm gas meter reading identification device based on projection segmentation in accordance with claim 5,
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 device and used for adjusting the camera device to move left and right, and the second adjusting button is installed on the installation shaft of the camera device and used for adjusting the vertical distance between the installation shaft and the gas meter.
7. The diaphragm gas meter reading identification device based on the projection segmentation method according to claim 4, wherein the diaphragm gas meter reading identification device is a diaphragm gas meter reading identification device,
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.
CN202210791242.1A 2022-07-07 2022-07-07 Diaphragm gas meter reading identification method and device based on projection segmentation method Active CN114863415B (en)

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 CN114863415A (en) 2022-08-05
CN114863415B true 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)

Citations (4)

* Cited by examiner, † Cited by third party
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
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

Also Published As

Publication number Publication date
CN114863415A (en) 2022-08-05

Similar Documents

Publication Publication Date Title
WO2021179679A1 (en) Automobile dashboard testing system and testing method based on machine vision
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
CN107507174A (en) Power plant's instrument equipment drawing based on hand-held intelligent inspection is as recognition methods and system
CN105930837A (en) Transformer station instrument equipment image recognition method based on autonomous routing inspection robot
CN109974582A (en) A kind of the conductor diameters non-contact vision detection device and method of automotive wire bundle
CN108647677A (en) The ammeter appearance and performance intelligent detecting method and device that view-based access control model calculates
CN107702898A (en) A kind of car headlamp detection method and device
CN112505663B (en) Calibration method for multi-line laser radar and camera combined calibration
CN112157642A (en) A unmanned robot that patrols and examines for electricity distribution room
CN112903053B (en) Diaphragm gas meter reading method and device based on machine vision and laser sensing
CN114863415B (en) Diaphragm gas meter reading identification method and device based on projection segmentation method
CN202284949U (en) On-line detection system of minitype sound film concentricity based on machine vision
CN211856402U (en) Automobile instrument panel detection system based on machine vision
CN113850257A (en) Intelligent water meter identification method and device based on deep neural network
CN205607423U (en) Automatic identification equipment of automobile instrument pointer indicated value
CN116486212A (en) Water gauge identification method, system and storage medium based on computer vision
CN110702936A (en) Device and method for measuring rotating speed of air preheater based on laser image recognition
CN113503972B (en) Local dynamic target temperature measurement system based on low-pixel infrared camera
CN212463306U (en) Real-time recognition device for character wheel of camera type gas meter
CN111031222A (en) Real-time recognition device and method for character wheel of camera type gas meter
CN112101350A (en) Empty box air pressure representation value image acquisition system, identification system and working method thereof
CN114926841B (en) Electronic water meter reading image identification method and device based on improved threading method
Zhang et al. Projection Segmentation Method of Image Recognition for Automatic Reading Of Gas Meter
CN201293673Y (en) Dynamic multipath synchronization detection device for metering device

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