CN105260709B - Water meter calibration method, apparatus based on image procossing and system - Google Patents

Water meter calibration method, apparatus based on image procossing and system Download PDF

Info

Publication number
CN105260709B
CN105260709B CN201510628689.7A CN201510628689A CN105260709B CN 105260709 B CN105260709 B CN 105260709B CN 201510628689 A CN201510628689 A CN 201510628689A CN 105260709 B CN105260709 B CN 105260709B
Authority
CN
China
Prior art keywords
pointer
image
water meter
dial plate
plate image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201510628689.7A
Other languages
Chinese (zh)
Other versions
CN105260709A (en
Inventor
张宁
李静
田小平
范崇睿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Institute of Petrochemical Technology
Original Assignee
Beijing Institute of Petrochemical Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Institute of Petrochemical Technology filed Critical Beijing Institute of Petrochemical Technology
Priority to CN201510628689.7A priority Critical patent/CN105260709B/en
Publication of CN105260709A publication Critical patent/CN105260709A/en
Application granted granted Critical
Publication of CN105260709B publication Critical patent/CN105260709B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/22Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The present invention discloses a kind of water meter calibration method, apparatus and system based on image procossing, for being detected to water meter registration state.The water meter calibration method includes:Obtain the pointer binary picture for presetting dial plate image;From the pointer binary picture extract image cursor contour line, according to the pointer contour line calculate all profile points to the round heart of pointer distance;It determines the maximum value in the distance and pointer direction is determined according to the maximum value;Registration interpretation is carried out to the default water meter according to the pointer direction, and obtains sentence read result;It calculates the sentence read result and determines the indicating value state of the default water meter.Using the water meter calibration method disclosed by the invention based on image procossing, on the basis of image recognition technology, water meter image is handled so that characteristic area extracts, then interpretation is carried out, finally interpretation accuracy is verified using the multiple image of acquisition.

Description

Water meter calibration method, apparatus based on image procossing and system
Technical field
The present invention relates to instrument detection field, more particularly to a kind of water meter calibration method based on image procossing, dress It sets and system.
Background technology
Cold-water meter verification process is the process of a determining meter reading error size, be may be appropriately used in calibrating Computer identification image reading is detected instead of manual type.At this stage, the correlative study day of pointer-type water meter verification system Become to increasing, the direction of research is set in machine vision and image procossing by numerous domestic and international researchers, that is, acquires pointer Formula water meter image recycles computer disposal image array identification indicator of water gauge position, and then water-meter reading indicating value.Image procossing There is detection technique extremely strong objectivity, the image structure information of different detection objects to differ greatly, and the precision identified The requirements such as speed can also be not quite similar.In recent years, domestic and international image processing specialist was constantly explored in terms of pointer instrument identification, Also certain achievement in research is achieved.
It is one kind in numerous pointer instrument detections about pointer-type water meter, and the pointer instrument based on image procossing The research of table starts to walk more early, the 80s and 90s in last century in foreign countries, and the researchers of American-European many developed countries is just This is gradually explored, is to select manipulator to image of gauge with pointer acquisition process, Jin Erjin in J.P.Jones in 1989 earliest Line pointer Reading determination;1994, Sablatning of Wayne State University of the U.S. et al. was just chatted in oneself article in detail It has stated using the water meter that round dial plate and scale are evenly distributed as identification object, straight line, that is, pointer position is identified based on Hough transform It sets, then seeks pointer and be directed toward reading registration, become Meter recognition field representativeness and break through;2000, Portugal's Lisbon technology The it is proposed of the novelty such as Correa Alegria of university is directed to several dial plate images, combines and subtracts shadow method and Hough transform exists Round dial plate is transformed into the identification for carrying out pointer position after horizontal scale line pattern again;2004, S.L.Pang et al. was proposed It is utilized based on maximum gradient comparing subtraction method and subtracts the realization angle interpretation of pointer-free template image containing pointer image;Occur to inhibit within 2006 For the purpose of halation based on center ring around model;2007, U.S. scientific research personnel utilizes to refer to blocked institute for cyclic annular grating disc Obtained light and shade optical signal carrys out reading pointer registration.
External many scholars push the pointer instrument recognizer theoretical research based on image procossing significantly Realize the development of instrument automatic identification, for the developed countries such as America and Europe, the image procossing used gradually increases, skill The development of art is also just relatively fast, and experience is relatively abundant, application aspect increasingly spread to industry-by-industry for example automobile, pharmacy, food, Beverage and packaging etc..Nonetheless, external image processing system expensive, maintenance difficult due to intellectual property etc., It can not be received at home by users.Therefore, China develops the pointer instrument identification system for having independent intellectual property right System ground necessity is very strong.
Compared with foreign countries, China is later for the research of image of gauge with pointer identification, and research direction is concentrated mainly on figure As in segmentation and feature recognition algorithms.That studied in this respect earliest is the Li Tieqiao professors of Harbin Institute of Technology, he refers to Go out and reading is determined according to the polar angle of the pointer identified in polar coordinate system using the dial plate center of circle as pole;Then king three is military Et al. the water meter image identification system of more sublist disks is studied, mainly using stencil matching;North China electric power is big Then Li Baoshu points out identification pointer scale line according to the error between preset cautious and actually detected point to be measured The method that reading carries out interpretation;Fourth celebrates one's birthday, generation equality people Lee proposes using this 3 points of pointer point, the dial plate center of circle and zero as vertex structure The method read into line pointer at Triangle Model;The Hong Kong Polytechnic University W.L.Chan et al. designs the automatic of a set of pointer meters Verification system;Central projection is combined determining pointer position by the Chen Bin of South China Science & Engineering University with Hough transform;Nanjing aviation boat The Wu Huanhuan of its university, trip have roc etc. that ActiveX control technology is introduced pointer meters monitoring system, and the detecting system of raising is steady It is qualitative;Qu Renjun of Beijing University of Post & Telecommunication etc. quickly identifies that theory is explored to being based on instrument under embedded environment, in conjunction with The improvement of annulus extraction and the edge gradient center of circle search method and carry out interpretation to total indicator reading;Wuhan University Fang Yanjun is to be based on machine The instrument automatic interpretation project of device vision is to rely on deeply to study intensively automatic check device alignment control, Chinese scholar pair Realize that the identification of pointer instrument registration is all constantly being explored always.
Based on the research above to forefathers' pointer instrument recognizer it is seen that these Recognition System of Analog Measuring Instruments Using pointer as the key of identification interpretation, four classes are broadly divided into the method for pointer direction discernment:Step length, the inspection of circumference gray scale Survey, stencil matching, circumference chord length method, to pointer direction carry out interpretation main method be exactly two kinds substantially, i.e., preset angle configuration and away from From method.
Step length cardinal principle is using pointer rotary shaft as the seed origin one party along eight neighborhood directions of surrounding respectively To scanning for, until it is 0 position to search neighborhood gray value, then using this position as origin repeat search process, Search and the farthest position of initial point distance in concussion, this point is maximal end point, i.e. pointer tip position.Then origin position is connected It is that pointer is directed toward, but the method is based on pointer contour line, if the contour line obtained with line formed by tip position There are any crack conditions that concussion search will be made to stop, to cause pointer tip position to extract mistake, and misreading general Rate is very big;The basic thought of circumference gray scale detection method be on the basis of pointer length L is determined using axle center as the center of circle withFor Radius does circle and determines two intersection points with pointer edge, then determines the midpoint of the circular arc between two intersection points, and axle center and midpoint are connected Line, this line are pointer direction, but the method must be in the case where pointer length be determining and has one fixed width just more It is suitable to use, if pointer relatively detailed rules and regulations cause two intersection point hypotelorisms, and the pointer-type water meter of some manufacturers production There is the situation that pointer is relatively thin, is not fine using such method effect;And the method for stencil matching needs are shifted to an earlier date What a sets and fixes masterplate, the image of acquisition compares with masterplate then, determines the direction of pointer, but think in the present embodiment It is hand held image acquisition terminal to want design system, and masterplate is simultaneously not fixed, and thus the method for stencil matching is more not suitable for.
For the limitation of conventional method various aspects, many scholars propose carries out water with circumference chord length detection method The direction discernment of list index, the basic principle of this method be by pointer using axis of rotation as origin by pointer be divided into four as Limit records distance between profile point, has often searched for a line then from origin to two opposite direction search pointer profiles On two profile points just with 1 ° for step-length continue search for clockwise or counterclockwise until rotation 180 ° complete search, this was searched for The i.e. corresponding pointer of the longest profile distance of gained indicates direction in journey.Although such method has in pointer instrument identification field There is very extensive purposes, but if pointer is more sharp, many can be wasted in the case of justifying no smooth excessiveness with rotary indicator Resource, and if pointer occurs the phenomenon that plain in extraction process and pointer direction discernment inaccuracy can be caused even wrong Accidentally.
Therefore, there is also the not high problems of efficiency and accuracy rate for water meter calibration in the prior art.
Invention content
The present invention discloses a kind of water meter calibration method, apparatus and system based on image procossing, for solving the prior art There is also the not high problems of efficiency and accuracy rate for middle water meter calibration.
To achieve the above object, the present invention provides a kind of water meter calibration method based on image procossing, and uses following skill Art scheme:
Water meter calibration method based on image procossing includes:Obtain the pointer binary picture for presetting dial plate image;From described Image cursor contour line is extracted in pointer binary picture, and all profile points are calculated to the round heart of pointer according to the pointer contour line Distance;It determines the maximum value in the distance and pointer direction is determined according to the maximum value;According to the pointer direction pair The default water meter carries out registration interpretation, and obtains sentence read result;It calculates the sentence read result and determines the default water meter Indicating value state.
Further, the maximum value in the determination distance and determine that pointer direction includes according to the maximum value: The distance for defining the profile point to the round heart of the pointer is distance, and the calculation formula of the distance is as follows:
Wherein, pt → x represents the abscissa of the profile point, and pt → y represents the ordinate of the profile point;From it is described away from From middle determining maximum, and the corresponding profile point of the maximum value is pointer needle point position, and the pointer is round Line between heart coordinate and at any time pointer needle point position coordinate is pointer direction.
Further, described to include to the default water meter progress registration interpretation according to the pointer direction:Described in determination The dial plate center location of default water meter and the position of the round heart of the pointer;Justified according to default calculation formula and the dial plate Heart position, the position of the round heart of the pointer, identification the pointer direction calculating described in preset water meter total indicator reading;
The default calculation formula is:
Wherein, the dial plate center location is (x, y), the position of the round heart of pointer according to sequence from left to right according to Secondary is (m1, n1), (m2, n2), (m3, n3), (m4, n4), the position of corresponding needle point be followed successively by (p1, q1), (p2, q2), (p3, q3), (p4, q4), with vectorial (x-m2, y-n2) for null vector, calculate each pointer direction vector (p-m, q-n) with zero to Measure angulation.
Further, it is described registration interpretation is carried out to the default water meter according to the pointer direction before, the water Table calibration method further includes:Judge whether the scalar product of the pointer direction vector and the null vector is zero;In the pointer When the scalar product of direction vector and the null vector is zero, determination the angle ranging from 90 degree or 270 degree;The pointer direction to When amount and the scalar product of the null vector are not zero, then the vector angle θ of the angle is sought using the default calculation formula.
Further, the pointer binary picture for obtaining default dial plate image includes:Ash is carried out to the dial plate image Degreeization processing, obtains the first handling result;Dial plate figure is carried out to the dial plate image on the basis of first handling result Image intensifying obtains second processing result;Denoising is filtered to the dial plate image on the basis of second processing result, Obtain third handling result;Binary conversion treatment is carried out to the dial plate image on the basis of third handling result, is obtained Fourth process result;Characteristic area extraction is carried out to the dial plate image on the basis of fourth process result, obtains the Five handling results;Pointer extracting is carried out to the dial plate image on the basis of five handling result, obtains the 6th processing As a result;Pointer two-value is obtained into line pointer binary conversion treatment to the dial plate image on the basis of six handling result Change figure.
Further, described to carry out gray processing processing to the dial plate image, obtaining the first handling result includes:
Tri- components of R, G, B of each pixel of the dial plate image are multiplied by a weighting coefficient i.e. weights respectively, number It is as follows to learn expression formula:
G (x, y)=(WR*R+WG*G+WB*B)/3
Using following weighting parameters model:
G (x, y)=0.299R+0.587G+0.114B
Each pixel is weighted averagely, the gray-scale map of the dial plate image is obtained.
Further, described that dial plate image progress characteristic area is carried on the basis of the fourth process result It takes, obtaining the 5th handling result includes:Hough change is carried out to the dial plate image on the basis of dial plate image binaryzation Scaling method identifies dial plate, then identifies sublist disk;Red pointer is extracted to the sublist disk characteristic area according to LRCD algorithms.
Further, it is described on the basis of six handling result to the dial plate image at line pointer binaryzation Reason, obtaining pointer binary picture includes:The sublist disk is extracted based on Hough transformation algorithm, and region is carried out to the sublist disk Segmentation;The red pointer in the sublist disk is extracted according to the LRCD aberration transformation model, obtains the pointer two Value figure.
According to another aspect of the present invention, a kind of apparatus for calibrating water meter based on image procossing is provided, and using such as Lower technical solution:
Apparatus for calibrating water meter based on image procossing includes:Acquisition device, the pointer two for obtaining default dial plate image Value figure;Extraction element, for extracting image cursor contour line from the pointer binary picture, according to the pointer contour line Calculate all profile points to the round heart of pointer distance;Determining device, for determining the maximum value in the distance and according to institute It states maximum value and determines pointer direction;Interpretation device, for carrying out registration interpretation to the default water meter according to the pointer direction, And obtain sentence read result;Computing device, the indicating value state for calculating the sentence read result and the determining default water meter.
According to a further aspect of the invention, a kind of water meter calibration based on image procossing is provided, and using as follows Technical solution:
Water meter calibration based on image procossing includes above-mentioned apparatus for calibrating water meter.
The meter reading recognition methods that the present invention improves, has the following technical effect that:
The first, the various methods during pointer-type water meter image preprocessing are analyzed, image preprocessing is especially To relative articulation, the larger dial plate image of high interference does not seem even more important.
The second, the extraction to pointer-type water meter image characteristic region sublist disk and pointer extracting are realized.In pointer Justify interior information extraction not directed to identification sublist disk in dial plate extraction process but uses expansion extraction to ensure pointer needle tip The integrality divided.Extraction process for pointer and it is indirect gray level image is handled, but make full use of image color Information extracts pointer using LRCD colour differential principles.
Third realizes pointer circle complete and accurate calibrating.Pointer shaft i.e. pointer is accurately identified using extraction pointer information Circle center location.
Description of the drawings
Attached drawing is used to provide further understanding of the present invention, and is constituted part of this application, schematic reality of the invention Example and its explanation are applied for explaining the present invention, is not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 shows the flow charts of the water meter calibration method based on image procossing described in the embodiment of the present invention;
Fig. 2 indicates the schematic diagram in the determination pointer direction described in the embodiment of the present invention;
Fig. 3 indicates the another schematic diagram in the determination pointer direction described in the embodiment of the present invention;
Fig. 4 indicate the embodiment of the present invention described in handled based on water meter image after obtained pointer binary picture;
Fig. 5 indicates the determination pointer wheel exterior feature schematic diagram described in the embodiment of the present invention;
Fig. 6 indicates the determination pointer direction schematic diagram described in the embodiment of the present invention;
Fig. 7 indicates the schematic diagram in the determination dial plate center of circle described in the embodiment of the present invention;
Fig. 8 shows the another schematic diagrames in the determination dial plate center of circle described in the embodiment of the present invention;
Fig. 9 indicates the schematic diagram in the determination dial plate center of circle described in the embodiment of the present invention;
Figure 10 indicates the gray-scale map of the water meter image described in the embodiment of the present invention;
Figure 11 indicates the histogram of the gray-scale map described in Figure 10;
Figure 12 indicates that the present invention implements the k nearest neighbor smothing filtering schematic diagram;
Figure 13 indicates that the present invention implements the circular space parameter schematic diagram;
Figure 14 indicates that the image dial plate in the characteristic area extraction described in the embodiment of the present invention identifies schematic diagram;
Figure 15 indicates that the image sublist disk in the characteristic area extraction described in the embodiment of the present invention identifies schematic diagram;
Figure 16 indicates that the original identification sublist disk described in the embodiment of the present invention extracts feature regional;
Figure 17 indicates the sublist disk characteristic area extraction figure after the increasing radius of the circle described in the embodiment of the present invention;
Figure 18 indicates the red channel gray-scale map of the water meter image described in the embodiment of the present invention;
Figure 19 indicates the green channel gray-scale map of the water meter image described in the embodiment of the present invention;
Figure 20 indicates the blue channel gray-scale map of the water meter image described in the embodiment of the present invention;
Figure 21 indicates the red pointer extracting gray-scale map of the water meter image described in the embodiment of the present invention;
Figure 22 indicates the R-G red pointer gray-scale maps described in the embodiment of the present invention;
Figure 23 indicates the R-B red pointer gray-scale maps described in the embodiment of the present invention;
Figure 24 indicates the pointer histogram described in the embodiment of the present invention;
Figure 25 indicates the pointer binaryzation design sketch described in the embodiment of the present invention;
Figure 26 indicates the structural schematic diagram of the apparatus for calibrating water meter based on image procossing described in the embodiment of the present invention.
Specific implementation mode
Before elaborating technical solution of the present invention and technique effect by embodiment, water meter detection is first introduced Correlation step and method.
Include mainly three classes for pointer-type water meter detection project:Appearance and Function detection, leakproofness investigation, the error of indication It calculates.Especially using last error of indication as calibrating key index.
Error of indication calibrating is that water meter be in water temperature and is less than in 30 DEG C of environment water velocity respectively in minimum discharge point Q1, point Boundary flow point Q2, common flow point Q3Relative error at three flow points, is that testing result differentiates the class of accuracy of measuring instrument Fundamental presentation.Flow is the quotient of the practical flow volume and time used flowed through of water meter, certainly in actual experiment, it is impossible to will Flow point is arranged such accurate, so general actual flow is controlled respectively in Q1~1.1Q1、Q2~1.1Q2、0.9Q3~Q3 In range.The relative error E of pointer-type water meter is the important Testing index indicated with percentage, is calculated as follows:
V in formulaiIndicate that water meter indicates volume differences, VaIndicate that standard device actual volume is poor.When being examined and determine, water meter The limits of error are examining and determine low area (Q1≤Q<Q2) it is ± 5%, it is ± 2% to examine and determine high area.
Verification step
1, it looks first at and problem whether there is by the appearance of water gauge, be especially to look into the items such as flow point, water meter flow direction Whether mark is complete, if imperfect directly return factory or eliminate.
2, the dress in the right direction that the standard compliant water meter of appearance is flowed to arrow according to flow direction and water meter is consistent To certificate test platform, opens flowing water Valve and slowly open inlet valve again, whole group water meter and pipeline are exhausted, according to glass The water meter exhaust situation that glass spinner flowmeter is shown determines whether to terminate exhaust, if no bubble emits in glass rotameter Be not turned off inlet valve and flowing water Valve when going out, and be to continue with fluvial processes, it is therefore an objective to regime flow and check water meter whether Water leakage situation occurs.Flow flows through certain right times, and (what the right times in verification process were taken in person is greater than In one minute) inlet valve is closed, start the original state reading of verification process, what is read first is standard ultrasound wave flowmeter Data V0, then read each pointer-type water meter dial plate data V0’。
3, it is again turned on inlet valve and starts water meter calibration.The end condition of calibrating be flow through water meter flow volume it is suitable One minute volume is discharged under water meter calibration flow.It closes testing stand water meter upstream inlet valve and simultaneously closes off downstream outlet valve Door.
4, data V when the calibrating of record standard ultrasonic flowmeter terminates final states1And the calibrating end of each pointer-type water meter State data V1’。
5, it according to error calculation formula, calculates and is detected water meter indication error, analytical error statistical parameter [25], if in most I.e. this provable water meter is qualified water meter within the scope of big allowable error, meets mark accuracy class, could print the quality certification at this time Bright and calibration certificate.
The embodiment of the present invention is described in detail below in conjunction with attached drawing, but the present invention can be defined by the claims Implement with the multitude of different ways of covering.
Fig. 1 shows the flow charts of the water meter calibration method based on image procossing described in the embodiment of the present invention one.
Fig. 2 indicate the embodiment of the present invention described in handled based on water meter image after obtained pointer binary picture.
Shown in Figure 1, the water meter calibration method based on image procossing includes:
S101:Obtain the pointer binary picture for presetting dial plate image;
S103:Image cursor contour line is extracted from the pointer binary picture, and institute is calculated according to the pointer contour line There is distance of the profile point to the round heart of pointer;
S105:It determines the maximum value in the distance and pointer direction is determined according to the maximum value;
S107:Registration interpretation is carried out to the default water meter according to the pointer direction, and obtains sentence read result;
S109:It calculates the sentence read result and determines the indicating value state of the default water meter.
In step S101, dial plate image is preset, realizes that the composition of digital image acquisition apparatus includes mainly industry at present Camera, image pick-up card, transmission device, host computer.Industrial camera is divided into analog- and digital- two class according to image-forming principle at present. The embedded digital industrial camera of the present embodiment device therefor is the cmos image sensor exposed on line by line basis, built-in heartbeat function It diagnostic work state can restore from exception automatically, support a variety of acquisition modes i.e. continuous acquisition and triggering collection.It matches automatically 1394 interface of standby versatility, meets DCAM (discriminating content addressable memory) codes and standards, It is less that resource is occupied during transmitting image information to host, while this equipment also has preferable environmental suitability, very It is suitble to the application scenarios such as Image Acquisition transmission.
During image capture, as possible on the basis of dial plate diameter so that dial plate is as possible close to picture traverse length.It will Image is passed to computer by being needed after image capture device successful acquisition, then proceeds by processing analysis.
In obtaining step S101 after dial plate image, dial plate image is handled, to obtain the pointer of dial plate image Binary picture, referring to Fig. 4.
In step S103, image cursor contour line, shown in Fig. 5, root are extracted from the pointer binary picture According to the pointer contour line calculate all profile points to the round heart of pointer distance.
It just needs to proceed by identification to the direction of pointer after obtaining pointer binary picture, for pointer-type water meter pointer The recognition methods in direction is varied.For prior art defect existing for water meter context of detection, the present embodiment pointer two-value Based on changing figure, the pointer circle in pointer extracting image is identified.
In conjunction with pointer substantive characteristics, since the case where either transitions smooth is justified in pointer tip with pointer or pointer, indicate Part and pointer justify sharp transition, by observation it is seen that the position corresponding to pointer needle point be apart from the round heart of pointer most Big, identify pointer direction from there through pointer circle center location and pointer tip position is determined, for details, reference can be made to Fig. 2 extremely Shown in Fig. 3.
Algorithm is described in detail below:
All profile point pt are calculated to the distance distance of the round heart of pointer, and find out maximum value.
Wherein, pt → x represents the abscissa of the profile point, and pt → y represents the ordinate of the profile point;From it is described away from From middle determining maximum.
In step S105, according to the maximum value in the determination distance and pointer direction is determined according to the maximum value;
Since the corresponding profile point of the maximum value is pointer needle point position, and the pointer justifies central coordinate of circle Line between pointer needle point position coordinate at any time is pointer direction, as shown in Figure 6.
And the recognition effect in pointer direction can be seen that when the more accurate then pointer direction discernment of tip position extraction is more accurate Really.In Fig. 6, the 4th pointer from left to right can lead to pointer side when the case where plain needle point occurs in the pointer of extraction There is error to identification, causes farthest profile point to be a certain needle Angle Position of plain as occurred plain in second pointer in Fig. 6.
Registration interpretation is carried out to the default water meter according to the pointer direction in step s 107, and obtains interpretation knot Fruit;
Need to differentiate total indicator reading behind the direction for obtaining pointer, the method for discrimination of total indicator reading may be used away from From method or preset angle configuration.
Preset angle configuration be when being directed toward zero graduation with hand of dial using the pointer direction that identifies angulation with it is entire The ratio between sublist disk range calculates total indicator reading.The most importantly judgement to pointer angle of this method, can be in unknown scale Indicating value is read in the case of line, and the graduation mark of water meter sublist disk is in a linear relationship with scale value, scale is evenly distributed, therefore The present embodiment uses preset angle configuration.
Observation water meter sublist disk find that the center of circle of each sublist disk is concyclic, the natural round heart of pointer also herein justify on, pointer The round heart becomes the point on this round week.So connecting each center of circle after detecting pointer circle forms six circumference strings, referring to figure 7.Since the perpendicular bisector of daily circumference string must cross the dial plate center of circle, according to the intersection point calculation intersection point mean value of perpendicular bisector two-by-two So that it is determined that going out dial plate center location.It connects the circumference string design sketch in each center of circle and dial plate center location determines, referring to figure 8。
It can generally be utilized according to the pointer direction of determining dial plate center location, pointer circle center location and identification Preset angle configuration carries out the determination of total indicator reading, and the present embodiment is to seek reading based on vector.
It is (x, y) to be located at the dial plate center location that is detected in pointer-type water meter dial plate, and the position of pointer circle is according to from a left side Be followed successively by (m1, n1), (m2, n2), (m3, n3), (m4, n4) to right sequence, the position of corresponding needle point be followed successively by (p1, Q1), (p2, q2), (p3, q3), (p4, q4) calculate each pointer direction vector (p- with vectorial (x-m2, y-n2) for null vector M, q-n) with null vector angulation, schematic diagram is as shown in Figure 9.
Based on formula:
In the position of the dial plate center location and the round heart of the pointer that determine the default water meter;According to default calculating Formula and the dial plate center location, the position of the round heart of the pointer, identification the pointer direction calculating described in preset The total indicator reading of water meter.
In step S109, calculates the sentence read result and determine the indicating value state of the default water meter.
According to required angle, θ, and entire sublist disk is uniformly distributed the i.e. every 36 degree of scales of ten scales and adds one, so angle It is as shown in the table with dial reading relationship:
Although can be in the hope of pointer logarithm according to correspondence, when pointer is in, critical angle of 36 degree of multiples etc. is sensitive to carve It is very big to may result in reading transformation difference for the error of often very little when degree point, especially with the sublist disk as unit of cubic meter × 0.0001, × 0.001 the digit representated by, × 0.01, × 0.1 differentiates that error gradually increases even caused by increasing It is inestimable.
Caused error is calculated in order to eliminate, small one meter can be utilized according to decimal system relationship between each sublist disk Number dial plate into subtabulation disk to carrying out reading correction, and such as minimum sublist disk × 0.0001 is oriented to 9, and × 0.001 is designated as than 2 It is slightly bigger, sentence it as 2 rather than 3.
The present embodiment realizes pointer circle complete and accurate calibrating, profit on the basis of based on pointer two-value watermeter image Pointer shaft i.e. pointer, which is accurately identified, with extraction pointer information justifies center location.And in the conventional method of research pointer direction discernment Basis on use maximum distance method, then in conjunction with improved angle interpretation method, realize the accurate interpretation of pointer.
Preferably, it is described registration interpretation is carried out to the default water meter according to the pointer direction before, the water meter Calibration method further includes:Judge whether the scalar product of the pointer direction vector and the null vector is zero;In the pointer side When scalar product to vector and the null vector is zero, determination the angle ranging from 90 degree or 270 degree;In the pointer direction vector When being not zero with the scalar product of the null vector, then the vector angle θ of the angle is sought using the default calculation formula.
Due to there is a situation where that pointer direction vector is vertical with null vector in calculating process, the above calculation formula needle To calculating in the case of non-perpendicular, so firstly the need of judging that the scalar product of pointer direction vector and null vector is before calculating No is zero, i.e. whether (x-m2) * (p-m)+(y-n2) * (q-n) is zero, the value for judging (x-m2) * (p-m) if zero, if not It is 90 ° less than zero, is otherwise 270 °.If (x-m2) * (p-m)+(y-n2) * (q-n) is not zero vector is sought using formula Then angle theta judges angle generic, due in ranging from [0,180] range of the θ asked, if so (x-m2) * (p-m) More than zero angulation is θ, is otherwise θ=180+ θ.
As preferred embodiment, the present embodiment provides the acquisition modes of pointer binary picture, specifically includes:
Gray processing processing is carried out to the dial plate image, obtains the first handling result;In the base of first handling result Dial plate image enhancement is carried out to the dial plate image on plinth, obtains second processing result;On the basis of the second processing result On denoising is filtered to the dial plate image, obtain third handling result;To institute on the basis of the third handling result It states dial plate image and carries out binary conversion treatment, obtain fourth process result;To the table on the basis of fourth process result Disk image carries out characteristic area extraction, obtains the 5th handling result;To the dial plate on the basis of five handling result Image carries out pointer extracting, obtains the 6th handling result;On the basis of six handling result to the dial plate image into Line pointer binary conversion treatment obtains pointer binary picture.
More specifically, in the dial plate image that above-described embodiment step S101 is got, first time processing is carried out first, is obtained The first handling result is taken, i.e.,:
Tri- components of R, G, B of each pixel of the dial plate image are multiplied by a weighting coefficient i.e. weights respectively, number It is as follows to learn expression formula:
G (x, y)=(WR*R+WG*G+WB*B)/3
Using following weighting parameters model:
G (x, y)=0.299R+0.587G+0.114B
Each pixel is weighted averagely, obtains the gray-scale map of the dial plate image, obtained gray-scale map is For the first handling result.
Dial plate image enhancement is carried out to the dial plate image on the basis of first handling result, obtains second processing As a result, i.e. image enhancement, specific as follows:
Image enhancement is to expand gray scale by a series of images shift means for acquisition gradation of image distribution concentration problem Gray Histogram grade Covering domain enhances contrast difference between target area and background information so that image is converted into one kind It is more suitable for the form of computer analysis and processing.
In order to carry out the research of pointer-type water meter algorithm for image enhancement, need first to the ash after the image gray processing of acquisition Degree histogram is researched and analysed, and referring specifically to Figure 10 to Figure 11, passes through the gray level of the statistic histogram of water meter gray level image Whether distribution takes full advantage of [0,255] gray space.Figure 11 is the histogram of Figure 10.
It is not difficult to find out from the statistic histogram of water meter image, there are grey level distributions excessively to concentrate for the dial plate of intake, distribution Narrow scope, the relatively low disadvantage of contrast.It needs to enhance it to enhance the resolution details such as edge contour.
Tonal range transformation is the main method of dial plate image enhancement, indicates as follows with the mode of mathematic(al) representation:
G (x, y)=T [f (x, y)]
F (x, y) represents in original water gauge image pixel value at the position (x, y), and g (x, y) represents dial plate corresponding position after enhancing Pixel value, T are water meter image transformation functions.According to the difference of greyscale transformation function, below to the common ash of several greyscale transformations Spend transform method analysis and research.
Linear scale gray scale stretching shift theory is to be converted based on linear function to certain section of tonal range of artwork Process, the water meter image that intensity profile is excessively concentrated can map directly to the gray scale space more than this range, for gray scale Grade range is larger but only the quantity statistics of same gray value are more in certain narrow range, and the larger image of distribution probability carries out gray scale Limited crucial gray level can be more than to another appropriate gray shade range that is extended to of a certain threshold value, raising to be known when transformation The brightness of other target achievees the purpose that enhance valid pixel.
Denoising is filtered to the dial plate image on the basis of second processing result, obtains third processing knot Fruit, i.e.,:
Acquisition system obtains a width pointer-type water meter image because being included many noises by the interference of various aspects.In water meter In verification process, original image certainly exists the pixel portion that cannot reflect true picture brought due to external interference, will be more A pixel links together in visible graininess or linear noise, to the identification of water meter useful information cause poor contrast, Edge blurry, cover interference etc., reduce the signal-to-noise ratio of image, are unfavorable for subsequent image processing identification, thus must be to image Noise reduction filtering processing is carried out, noise jamming is effectively reduced, improves the Stability and veracity of meter reading.
To water meter image removal interference method have very much, according to filtering space difference be broadly divided into filter in spatial domain method with Frequency filtering method.
Include a variety of different filtering modes in filter in spatial domain and frequency filtering, space filtering principle is in image It is directly translated in the two-dimensional space of image to be converted to pixel using masterplate when processing.Frequency domain filtering becomes image It is more to change the step of needing to pass through, it is necessary first to the every terms of information of image be transformed into frequency domain using Fourier transform, then root Required algorithm is chosen according to various filtering method features and changes the frequency distribution of image, then Fourier inversion is taken to its frequency spectrum It changes, finally obtains effect after filtering.But not all image can carry out frequency domain filtering, and Fourier transform causes to image Size is limited, and frequency domain filtering step is more, algorithm is complicated, processing has of overall importance, information theory theoretical proof any one Step image procossing can't increase the information content of image, only promote signal noise ratio (snr) of image from certain angle, it is necessary to which few as possible subtracts Few image processing step, in this way could be while eliminating miscellaneous of image, and lifting system operation recognition speed ensures identifying system Real-time.
In piece image, why we can recognize that different goal objects is because there are sides between different things Boundary is that boundary point and noise spot are deposited using the key that can thicken of image boundary after mean filter, gaussian filtering or medium filtering Step evolution in general character, that is, gray scale so just necessarily leads to the process that Gray step is smoothed without judgement The appearance of edge blurry phenomenon.
In order to solve the problems, such as that soft edge, boundary keep class smoothing filter to come into being.Its core concept is It avoids being carried out at the same time smoothing computation to the pixel for belonging to different zones as possible in smoothing process, comparatively typical side It includes k nearest neighbor smothing filtering, symmetrical neighbour's smothing filtering, minimum variance filtering, Sigma filtering etc. that boundary, which keeps class filtering mainly,. Wherein the application of k nearest neighbor smothing filtering is the most universal, is primarily due to symmetrical neighbour's filtering algorithm and needs from the mould being set in advance The symmetric points pair with pending pixel same area are found in version, mean operation then are done to selected point, to filter effect It is not obvious, application is less;It is excessive that minimum variance average filter chooses masterplate number in conversion process, then from excessive masterplate The mean value replacement original pixel for selecting that masterplate of variance minimum is distributed closest mould with original image edge pixel location Version, such method masterplate number is excessive, causes the number of repetition calculated more, so the present embodiment uses KNN smothing filterings.
The cardinal principle of k nearest neighbor smothing filtering is that whether determining pixel is boundary point before being processed.Such as Figure 12 institutes Show, be non-boundary point at above-mentioned image midpoint 1 by taking 3*3 masterplates as an example, is boundary point at point 2, the masterplate where image itself In select M gray values closest with masterplate center pixel gray value and sum up and find out mean value and replace imago in masterplate The value of element, general M is not fixed, and also has the relationship, experience value to be with selected masterplate size
Binary conversion treatment is carried out to the dial plate image on the basis of third handling result, obtains fourth process knot Fruit, i.e.,:
After being filtered for project acquisition pointer-type water meter image, it is carry out two-value in next step, is then based on again Hough transform identifies image sublist disk, extracts colored sublist disk area, realizes segmentation of feature regions, then LRCD aberration is converted Model introduces indicator of water gauge extraction process.
First, it in order to extract the significant region of image, needs into row threshold division, thus binarization is also referred to as Threshold segmentation, it is that pretreated gray level image is determined segmentation threshold according to certain processing rule, then by all pixels Gray value is divided into threshold value comparison more than threshold value and less than two set of threshold value, is converted into only to two aggregate assignments 0 and 1 respectively There are two process of two gray values of black and white to separate background and foreground.Threshold Segmentation Algorithm indicates as follows:
G (x, y) is grey scale pixel value after processing, and grey scale pixel value before f (x, y) is binaryzation, threshold is to select Determine threshold value.
From the point of view of entire binarization, threshold value is the core content of binarization operation, according to threshold value method Difference can be roughly divided into Global thresholding, local thresholding method two types.Global thresholding be for threshold value it is selected be with Entire image is target, and all position pixels are using the gray value after the transformation of the same threshold decision corresponding position, typically Method such as fixed threshold method, Ostu methods etc..Local thresholding method is to calculate masterplate based on selected neighborhood to determine that masterplate threshold value again will Center grey scale pixel value is compared with threshold value, gray value size after determining transformation, typical method such as Bernsen methods, Niblack methods etc..
Characteristic area extraction is carried out to the dial plate image on the basis of fourth process result, obtains the 5th processing As a result;
After completing the pretreatment of pointer-type water meter image a series of images and binaryzation, it is followed by and needs to feature Region extracts.Dial plate, the sublist disk of pointer-type water meter dial plate image are circle, and Hough transform is online, circle, ellipse Identification on have and have great advantage, so the present embodiment combination Hough transform algorithm identifies dial plate, then identify sublist disk, in turn The red pointer of LRCD algorithms extraction is introduced based on sublist disk characteristic area.
Hough transform is that a kind of duality based on point-line has used the mechanism of voting by image complex edge feature Information MAP is the parameter estimation techniques of image shape to be detected, and this mapping is the parameter according to shape to be detected The function of definition, it is this to become parameter peak spy during all pixels for meeting parametric equation of changing commanders are mapped as statistics as parameter space Sign.Hough variations have great advantage in the context of detection such as straight line, circle, ellipse tool, being capable of not discontinuous point shadow in by geometry It rings, robustness is stronger, is widely used in image processing field.
Hough transform is to carry out two different coordinate system data to image to convert, and data in X-y two-dimensional coordinate systems are become It shifts to using parameter as in the multidimensional coordinate system of substrate, the quantity of dimension is exactly by the quantity of free parameter in parametric equation.It is total Body conversion process is that the continuous graphic edge detected is transformed to parameter space first, then by parameter space according in advance The step-length unit discretization of setting forms discrete parameter matrix, brings the effective pixel points in all bianry images into parameter list Up to formula, to check the parameter matrix element position for meeting parameter expression and add up, the accumulated value that position difference obtains is different, But the position where peak point is the maximum probability of the parameter occurrence of original function, so it is parameter value to remove peak point.Hough becomes It changes and is applied to straight-line detection earliest, as long as when pointer instrument is identified for linear pointer such as ammeter, high-precision pressure Table etc., therefore originally application study in this respect is concentrated through and reduces domain transformation raising Hough transform straight line calibrating speed, But the present embodiment is to detect circle with Hough transform, so describing in detail by taking round detection process as an example below.
Two kinds of situations can be divided by being detected to circle based on Hough transform in image procossing, and one is known circles To the circular detection in image in the case of radius, another kind be unknown circle radius in the case of to the circular inspection in image Survey, but circular radius is unknown quantity in general pattern, therefore need during being detected to circle with center location and Radius is the identification that substrate establishes that three-dimensional system of coordinate carries out circle.With (a, b) for the center of circle, it is by the equation of the circle of radius of r:
(x-a)2+(x-b)2=r2
A in equation, b, r are the dimension substrate of mapping space, and any point in image space is mapped to this sky Between be a conical surface, the central coordinate of circle in original image be it is all justify herein on pixel-map conical surface friendship Point, as shown in figure 13.
The above this Hough transform detection is suitable for the upper pixel Location-Unknown of circle, needs to carry with all of entire image Contouring is that transforming object is converted, but if the several points of certain in known image are concyclic, then uses quick Hough more reasonable It is easy.The essential idea of rapid Hough transform is the string that the line of concyclic point is justified thus, and the perpendicular bisector of string must Cross the center of circle, it is known that 4 points of A, B, C, D is concyclic, and by connecting A, B and C, D obtains two circumference strings, then does hanging down for circumference string respectively Straight bisector, intersection point are exactly concyclic center location, that is, E points.
The essence of feature extraction is the garbage deleted in initial data, and selection is maximally efficient most to reflect things essence Feature, and the process that the mode of mathematics is described.It is different for object during being identified, the image of extraction Feature does not have popularity, so particular problem is needed to make a concrete analysis of, concrete condition selects suitable method to carry out feature extraction.
Characteristic area extraction for image is mainly the pointer-type water meter image characteristics extraction water meter sublist according to acquisition Disk area part.In order to accurately extract, it is necessary first to identify water meter dial plate, then identify water meter sublist disk, extraction Dial plate characteristic area.
To image be acquired when, the profile of dial plate is paved with institute's the image collected as possible, then to image into Row Hough transform identifies water meter dial plate, sets round radius R ranges to [width/3, width/2] (wherein when identification Width is the width of image), threshold value setting is less than 100, identifies that dial plate has the limitation of the radius of circle to make in the process really The setting of threshold value is only if it were not for can detected greatly very much.Then according to the structural information of dial plate, the radius of each dial plate is big About 4-6 times of sublist disk, according to the identification sublist disk of identification dial plate radius, using Hough algorithms to sub- dial plate identification process The middle radius r ranges for justifying sublist disk are set as [R/4, R/6], to the identification of image dial plate and sublist disk respectively such as Figure 14 extremely Shown in Figure 15.
In Figure 14 to Figure 15, black thickened portion represents red.
Since embodiment is to be based on LRCD methods to the extraction of red pointer, need to use colouring information, so in order under The pointer extracting of one step needs on the basis of original color image, then region reservation is carried out to the sublist disk of identification, in antithetical phrase The information such as the center location of sublist disk, radius are stored respectively in the array built in advance in dial plate identification process, because This need to only build a width background image when extracting color property region, then pixel in sublist disk area is retained.
In fig.15, it can be seen that the identification of sublist disk is not very precisely, such as from Figure 15 sublist disk recognition effect figures It is incomplete that pixel reservation in circle directly only can be easily lead to the extraction of red pointer needle point by fruit in color property extracted region, There is the case where plain, oblique needle.But the position of needle point for subsequent pointer direction interpretation have absoluteness effect, thus for The red pointer of complete extraction needs the radius for extracting region being set as more slightly larger than detection radius, thus be set as [(R+10)/ 4, (R+10)/6], i.e., ten pixels of increasing radius or so would not be influenced to the extraction of pointer.If Figure 16, Figure 17 are respectively original Begin identification sublist disk extraction feature regional and the sublist disk characteristic area extraction figure after the increasing radius of circle, wherein black pointer Red pointer is represented, because attached drawing there cannot be color.
Pointer extracting is carried out to the dial plate image on the basis of five handling result, obtains the 6th processing knot Fruit;
5th handling result, the as above-mentioned son to after original identification sublist disk extraction characteristic area and round increasing radius Dial plate characteristic area extracts, and in the above results, carries out pointer extracting to dial plate image, the specific method is as follows:
LRCD is a kind of aberration transform method, in order to the red color components of prominent image.LRCD be it is a kind of at The NI Vision Builder for Automated Inspection color model of ripe strawberry fruit picking.China Agricultural University of China shows in strawberry conference in 2012 " picking virgin No.1 " strawberry picking robot be exactly to utilize LRCD recognition methods to the identification of strawberry.It acquires first wherein each Pixel aberration is shown on gray level image using value of chromatism as the image of gray scale, is chosen appropriate threshold value and is carried out binary conversion treatment, completes Image segmentation, then extract image geometry feature.The parameter model of LRCD greyscale transformations is:
G (x, y)=R-Y=0.701R-0.587G-0.114B
G (x, y) is gray scale size after processing in formula, and R, G, B respectively represent the triple channel gray value size of image position, Y is gray value obtained by weighted average method gray processing.But it is needed before using this transformation by three RGB channels of image point It opens, splits into three width images and carry out operation again.It, can be with from the treatment effect of Figure 21 referring specifically to Figure 18, Figure 19, Figure 20, Figure 21 Find out and have been able to come out red pointer extracting, but have multiplying in LRCD models, corresponding each pixel be required for into Row three times add and subtract again by multiplication, expends operation time, therefore in order to improve calculation process speed, using red channel gray scale with Blue or the corresponding gray scale of green channel make the difference, and are shown below:
G (x, y)=R-G or g (x, y)=R-B
Result above in two obtained by subtractive way is substantially similar, and treated design sketch is respectively such as Figure 22, shown in Figure 23.
LRCD red pointer extracting gray-scale maps are compared with improved design sketch, image imitates the extraction of red pointer Fruit is to be sufficiently close to, so can save the multiplying time using improved.
The present embodiment on the basis of red pointer extracting is complete, in order to accurately obtain reading, needing first It converts red pointer extracting gray-scale map to bianry image, then identifies pointer direction.
Pointer two is obtained into line pointer binary conversion treatment to the dial plate image on the basis of six handling result Value figure.
For Binarization methods, by red pointer gray-scale map binaryzation, it is necessary first to the histogram of image is analyzed, The histogram of normal image is for statistical analysis to all gray values of image, but due to the background face of red pointer gray-scale map Color is set as the black that gray value is 0, and pixel quantity is excessive relative to red pointer pixel quantity, if still to all pixels The gray scale of value carries out the histogram that statistics will result in image into column hisgram only prodigious value, other positions at 0 position Substantially the phenomenon that ignoring cannot achieve the statistics to pointer grey level histogram, so ash of the present embodiment to red pointer extracting Degree schemes corresponding histogram statistical analysis since 1, and the histogram of gained is as shown in figure 24.
As can be seen from Figure 24 it is ideal intensity profile image, and there are two in gradation of image statistic histogram Wave crest presss from both sides a trough, and threshold value is done in gray scale choosing in trough position in this way can obtain preferable binaryzation effect, tie Fruit is as shown in figure 25.
In the above-described embodiments, the binaryzation for describing water meter filtered image first is then based on Hough transformation extraction Sublist disk realizes sublist panel regional partition, and LRCD aberration transformation models is recycled to realize the extraction of red pointer, finally will extraction Red pointer image carries out binaryzation.
The above embodiment of the present invention realizes the extraction to pointer-type water meter image characteristic region sublist disk and pointer Extraction.Justify interior information extraction not directed to identification sublist disk in pointer sublist disk extraction process but uses expansion extraction to protect Demonstrate,prove the integrality of pointer tip portion.Extraction process for pointer and it is indirect gray level image is handled, but fully Using image color information, pointer is extracted using LRCD colour differential principles.Realize pointer circle complete and accurate calibrating.Using carrying Pointer information is taken to accurately identify pointer shaft i.e. pointer circle center location.
Figure 26 indicates the structural schematic diagram of the apparatus for calibrating water meter based on image procossing described in the embodiment of the present invention.
Apparatus for calibrating water meter provided by the invention based on image procossing, adopts the following technical scheme that:
Apparatus for calibrating water meter based on image procossing includes:Acquisition device 261, the pointer for obtaining default dial plate image Binary picture;Extraction element 262, for extracting image cursor contour line from the pointer binary picture, according to the pointer Distance of all profile points of profile line computation to the round heart of pointer;Determining device 263, for determining the maximum value in the distance And pointer direction is determined according to the maximum value;Interpretation device 264, for according to the pointer direction to the default water meter into Row registration interpretation, and obtain sentence read result;Computing device 265, for calculating the sentence read result and determining the default water meter Indicating value state.
Water meter calibration provided by the invention based on image procossing includes above-mentioned apparatus for calibrating water meter.
The meter reading recognition methods that the present invention improves, has the following technical effect that:
The first, the various methods during pointer-type water meter image preprocessing are analyzed, image preprocessing is especially To relative articulation, the larger dial plate image of high interference does not seem even more important.
The second, the extraction to pointer-type water meter image characteristic region sublist disk and pointer extracting are realized.In pointer Justify interior information extraction not directed to identification sublist disk in dial plate extraction process but uses expansion extraction to ensure pointer needle tip The integrality divided.Extraction process for pointer and it is indirect gray level image is handled, but make full use of image color Information extracts pointer using LRCD colour differential principles.
Third realizes pointer circle complete and accurate calibrating.Pointer shaft i.e. pointer is accurately identified using extraction pointer information Circle center location.
The above is the preferred embodiment of the present invention, it is noted that for those skilled in the art For, without departing from the principles of the present invention, it can also make several improvements and retouch, these improvements and modifications It should be regarded as protection scope of the present invention.

Claims (7)

1. a kind of water meter calibration method based on image procossing, which is characterized in that including:
Obtain the pointer binary picture for presetting dial plate image;
Image cursor contour line is extracted from the pointer binary picture, calculating all profile points according to the pointer contour line arrives The distance of the round heart of pointer;
It determines the maximum value in the distance and pointer direction is determined according to the maximum value;
Registration interpretation is carried out to the default water meter according to the pointer direction, and obtains sentence read result;
It calculates the sentence read result and determines the indicating value state of the default water meter;
Wherein, the maximum value in the determination distance and determine that pointer direction includes according to the maximum value:
The distance for defining the profile point to the round heart of the pointer is distance, and the calculation formula of the distance is as follows:
Wherein, pt → x represents the abscissa of the profile point, and pt → y represents the ordinate of the profile point;
The determining maximum from the distance, and the corresponding profile point of the maximum value is pointer needle point position, institute It states pointer circle central coordinate of circle and the line between the coordinate of pointer needle point position is pointer direction at any time;Wherein, cvRound (p [0]) is the abscissa of the round heart of pointer, and cvRound (p [1]) is pointer center of circle center of circle ordinate.
2. water meter calibration method as described in claim 1, which is characterized in that described to be preset to described according to the pointer direction Water meter carries out registration interpretation:
Determine the dial plate center location of the default water meter and the position of the round heart of the pointer;
According to default calculation formula and the dial plate center location, the position of the round heart of the pointer, identification the pointer The total indicator reading of water meter is preset described in direction calculating;
The default calculation formula is:
Wherein, the dial plate center location is (x, y), and the position of the round heart of pointer is followed successively by according to sequence from left to right (m1, n1), (m2, n2), (m3, n3), (m4, n4), the position of corresponding needle point be followed successively by (p1, q1), (p2, q2), (p3, Q3), (p4, q4) calculates each pointer direction vector (p-m, q-n) and null vector institute with vectorial (x-m2, y-n2) for null vector At angle.
3. water meter calibration method as claimed in claim 2, which is characterized in that it is described according to the pointer direction to described pre- Before if water meter carries out registration interpretation, the water meter calibration method further includes:
Judge whether the scalar product of the pointer direction vector and the null vector is zero;
When the scalar product of the pointer direction vector and the null vector is zero, determination the angle ranging from 90 degree or 270 degree;
When the scalar product of the pointer direction vector and the null vector is not zero, then sought using the default calculation formula The vector angle θ of the angle.
4. water meter calibration method as described in claim 1, which is characterized in that described to obtain the pointer two-value for presetting dial plate image Change figure includes:
Gray processing processing is carried out to the dial plate image, obtains the first handling result;
Dial plate image enhancement is carried out to the dial plate image on the basis of first handling result, obtains second processing knot Fruit;
Denoising is filtered to the dial plate image on the basis of second processing result, obtains third handling result;
Binary conversion treatment is carried out to the dial plate image on the basis of third handling result, obtains fourth process result;
Characteristic area extraction is carried out to the dial plate image on the basis of fourth process result, obtains the 5th processing knot Fruit;
Pointer extracting is carried out to the dial plate image on the basis of five handling result, obtains the 6th handling result;
Pointer binaryzation is obtained into line pointer binary conversion treatment to the dial plate image on the basis of six handling result Figure.
5. water meter calibration method as claimed in claim 4, which is characterized in that described to be carried out at gray processing to the dial plate image Reason, obtaining the first handling result includes:
Tri- components of R, G, B of each pixel of the dial plate image are multiplied by a weighting coefficient i.e. weights, mathematical table respectively It is as follows up to formula:
G (x, y)=(WR*R+WG*G+WB*B)/3
Using following weighting parameters model:
G (x, y)=0.299R+0.587G+0.114B
Wherein, f (x, y) represents pixel of the original water gauge image at (x, y)
Value, g (x, y) represent the value by transformation water meter image;
Each pixel is weighted averagely, the gray-scale map of the dial plate image is obtained.
6. water meter calibration method as claimed in claim 5, which is characterized in that described on the basis of the fourth process result Characteristic area extraction is carried out to the dial plate image, obtaining the 5th handling result includes:
Hough transformation algorithm is carried out to the dial plate image on the basis of dial plate image binaryzation, identifies dial plate, then know Small pin for the case dial plate;
Red pointer is extracted to the sublist disk characteristic area according to LRCD algorithms.
7. water meter calibration method as claimed in claim 6, which is characterized in that described on the basis of six handling result To the dial plate image into line pointer binary conversion treatment, obtaining pointer binary picture includes:
The sublist disk is extracted based on Hough transformation algorithm, and region segmentation is carried out to the sublist disk;According to the LRCD colors Poor transformation model extracts the red pointer in the sublist disk, obtains the pointer binary picture.
CN201510628689.7A 2015-09-28 2015-09-28 Water meter calibration method, apparatus based on image procossing and system Expired - Fee Related CN105260709B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510628689.7A CN105260709B (en) 2015-09-28 2015-09-28 Water meter calibration method, apparatus based on image procossing and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510628689.7A CN105260709B (en) 2015-09-28 2015-09-28 Water meter calibration method, apparatus based on image procossing and system

Publications (2)

Publication Number Publication Date
CN105260709A CN105260709A (en) 2016-01-20
CN105260709B true CN105260709B (en) 2018-11-02

Family

ID=55100390

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510628689.7A Expired - Fee Related CN105260709B (en) 2015-09-28 2015-09-28 Water meter calibration method, apparatus based on image procossing and system

Country Status (1)

Country Link
CN (1) CN105260709B (en)

Families Citing this family (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105716693A (en) * 2016-01-27 2016-06-29 山东厚德测控技术有限公司 Water meter gear real-time recognition system and method based on high-speed photography
CN107038444A (en) * 2016-02-03 2017-08-11 上海慕荣电气有限公司 A kind of image-recognizing method of pointer dial plate
CN105868762A (en) * 2016-03-28 2016-08-17 国网浙江省电力公司宁波供电公司 Method and system for reading SF<6> meter
CN107506771A (en) * 2017-08-24 2017-12-22 歌尔科技有限公司 The indicators turn angle detecting method and system of pointer dial plate
CN107679535B (en) * 2017-09-16 2021-02-26 西安电子科技大学 Automatic reading identification system and method for pointer type water meter based on template matching
CN107784307A (en) * 2017-09-22 2018-03-09 西安理工大学 Pointer-type water meter recognition methods based on compressed sensing and Hough transformation
CN109977725B (en) * 2017-12-27 2023-10-31 中移物联网有限公司 Water meter reading method and system
CN108256522B (en) * 2018-01-09 2020-05-19 北京航空航天大学 Two-dimensional identification method for SPR (surface plasmon resonance) and waveguide mixed absorption spectrum characteristic position
CN108537150B (en) * 2018-03-27 2019-01-18 长沙英迈智越信息技术有限公司 Reflective processing system based on image recognition
CN108805888B (en) * 2018-04-18 2021-12-28 上海电悦科技有限公司 System for determining position of physical pointer on surface of intelligent watch
CN108764297B (en) * 2018-04-28 2020-10-30 北京猎户星空科技有限公司 Method and device for determining position of movable equipment and electronic equipment
CN108645490A (en) * 2018-05-11 2018-10-12 湘潭大学 Cold-water meter vision detection system based on image processing techniques and detection method
CN110135420B (en) * 2019-05-16 2021-11-16 北京灵汐科技有限公司 Dial plate state identification method and device, readable storage medium and electronic equipment
CN110415183A (en) * 2019-06-18 2019-11-05 平安科技(深圳)有限公司 Picture bearing calibration, device, computer equipment and computer readable storage medium
CN110580480B (en) * 2019-07-21 2023-12-01 天津大学 Meter reading identification method based on image processing
CN110796139B (en) * 2019-10-17 2023-06-23 中国测试技术研究院辐射研究所 Method for positioning and dividing pattern of indication value in test/detection/calibration/verification
US11301712B2 (en) 2019-11-07 2022-04-12 Sap Se Pointer recognition for analog instrument image analysis
CN111401357B (en) * 2020-02-12 2023-09-15 杭州电子科技大学 Pointer type instrument reading method based on text detection
CN111353301B (en) * 2020-02-24 2023-07-21 成都网安科技发展有限公司 Auxiliary secret determination method and device
CN111605915A (en) * 2020-05-28 2020-09-01 浙江冰立方环保科技有限公司 Commercial kitchen garbage classification device
CN111982247A (en) * 2020-08-13 2020-11-24 河南省计量科学研究院 Device and method for realizing water meter detection based on improved Hough transformation algorithm
CN112668578B (en) * 2020-12-31 2023-11-07 中广核研究院有限公司 Pointer type instrument reading method, pointer type instrument reading device, computer equipment and storage medium
CN113689455B (en) * 2021-07-01 2023-10-20 上海交通大学 Thermal fluid image processing method, system, terminal and medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101261682A (en) * 2007-03-05 2008-09-10 株式会社理光 Image processing apparatus, image processing method, and computer program product

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080219561A1 (en) * 2007-03-05 2008-09-11 Ricoh Company, Limited Image processing apparatus, image processing method, and computer program product

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101261682A (en) * 2007-03-05 2008-09-10 株式会社理光 Image processing apparatus, image processing method, and computer program product
CN101261682B (en) * 2007-03-05 2012-03-28 株式会社理光 Image processing apparatus, image processing method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"指针式水表的图像自动读数判读方法的研究";陈燕;《中国优秀硕士学位论文全文数据库 信息科技辑》;20111215(第S1期);论文第52页第5.3.3节,图2.5 *

Also Published As

Publication number Publication date
CN105260709A (en) 2016-01-20

Similar Documents

Publication Publication Date Title
CN105260709B (en) Water meter calibration method, apparatus based on image procossing and system
CN105260710B (en) Water meter calibration method, apparatus based on image procossing and system
CN105300482B (en) Water meter calibration method, apparatus based on image procossing and system
CN112818988B (en) Automatic identification reading method and system for pointer instrument
CN110580480B (en) Meter reading identification method based on image processing
CN109635806B (en) Ammeter value identification method based on residual error network
CN107220645B (en) Water meter identification method based on dynamic image processing
CN101539629B (en) Remote sensing image change detection method based on multi-feature evidence integration and structure similarity
CN109583324A (en) A kind of pointer meters reading automatic identifying method based on the more box detectors of single-point
CN104298994B (en) A kind of readings of pointer type meters recognition methods and device
CN107038447A (en) A kind of pointer instrument recognition methods based on machine vision
CN108121985A (en) A kind of double pointer meters number reading methods based on machine vision
CN108182433A (en) A kind of meter reading recognition methods and system
CN107066998A (en) A kind of pointer-type circular single instrument board real-time identification method of utilization mobile device
CN105574161B (en) A kind of brand logo key element recognition methods, device and system
CN109508709B (en) Single pointer instrument reading method based on machine vision
CN108645490A (en) Cold-water meter vision detection system based on image processing techniques and detection method
CN108960413A (en) A kind of depth convolutional neural networks method applied to screw surface defects detection
Hou et al. A pointer meter reading recognition method based on YOLOX and semantic segmentation technology
CN107561736A (en) LCD defect inspection methods based on Fourier and Hough transform
CN104820992B (en) A kind of remote sensing images Semantic Similarity measure and device based on hypergraph model
CN111222576B (en) High-resolution remote sensing image classification method
CN115661446A (en) Pointer instrument indication automatic reading system and method based on deep learning
CN111091910B (en) Intelligent evaluation system based on painting clock test
CN115471724A (en) Fine-grained fish epidemic disease identification fusion algorithm based on self-adaptive normalization

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20181102

Termination date: 20210928