CN115841666B - Instrument reading identification method and system - Google Patents

Instrument reading identification method and system Download PDF

Info

Publication number
CN115841666B
CN115841666B CN202310127480.7A CN202310127480A CN115841666B CN 115841666 B CN115841666 B CN 115841666B CN 202310127480 A CN202310127480 A CN 202310127480A CN 115841666 B CN115841666 B CN 115841666B
Authority
CN
China
Prior art keywords
instrument
image
meter
template
determining
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
CN202310127480.7A
Other languages
Chinese (zh)
Other versions
CN115841666A (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.)
Ganzhou Power Supply Branch State Grid Jiangxi Electric Power Co ltd
Jiangxi Xiaoma Robot Co ltd
Original Assignee
Ganzhou Power Supply Branch State Grid Jiangxi Electric Power Co ltd
Jiangxi Xiaoma Robot Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ganzhou Power Supply Branch State Grid Jiangxi Electric Power Co ltd, Jiangxi Xiaoma Robot Co ltd filed Critical Ganzhou Power Supply Branch State Grid Jiangxi Electric Power Co ltd
Priority to CN202310127480.7A priority Critical patent/CN115841666B/en
Publication of CN115841666A publication Critical patent/CN115841666A/en
Application granted granted Critical
Publication of CN115841666B publication Critical patent/CN115841666B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The invention provides a meter reading identification method and a system, wherein the method comprises the following steps: determining an overall offset between a first meter center point in the first meter image and a first template meter center point in a first template meter image; determining a second instrument center point and a contour scale point of the second instrument image by a template matching method; carrying out dial area contour ellipse fitting on the instrument; calculating a yaw angle and a pitch angle of a shooting position of the instrument, and determining a front projection image of the second instrument image; the method and the system for identifying the meter reading can identify the reading on the meter in a severe environment, and are accurate in reading and small in error.

Description

Instrument reading identification method and system
Technical Field
The invention belongs to the technical field of data identification, and particularly relates to a meter reading identification method and system.
Background
The instrument is an instrument or device for detecting, measuring, observing, and calculating various physical quantities, substance components, physical properties, and the like. In practical use, there are cases where the meter is installed in a dangerous environment, that is, the meter is installed on a higher tower, in a narrow space or in a poor angle, and in the above cases, the meter is easy to read by manpower alone, which causes the following problems:
1. Because the instrument is installed in a severe environment, the installation position of the instrument is difficult to reach manually and the action of reading the instrument is performed;
2. because the installation angle of the instrument is not fixed, large errors are easy to exist when the instrument is read manually;
3. the efficiency of manually reading the meter is relatively low.
Disclosure of Invention
In order to solve the technical problems, the invention provides a meter reading identification method and a system, which are used for solving the technical problems in the prior art.
In a first aspect, the present invention provides the following technical solutions, and a meter reading identification method, where the method includes:
acquiring a first instrument image of an instrument, and carrying out characteristic point affine transformation matrix correction on the first instrument image to calculate the integral offset between a first instrument center point in the first instrument image and a first template instrument center point in a first template instrument image;
correcting the shooting position of the instrument according to the integral offset, so that the first instrument center point corresponds to the first template instrument center point, acquiring a second instrument image of the instrument, and determining a second instrument center point and a contour scale point of the second instrument image through a template matching method;
According to the second instrument center point and the contour scale points, carrying out dial area contour ellipse fitting on the instrument so as to obtain a dial area ellipse equation of the second instrument image;
according to the dial area elliptic equation, a yaw angle and a pitch angle of a shooting position of the instrument are calculated, and a front projection image of the second instrument image is determined according to the yaw angle and the pitch angle;
and determining a binarization picture and a rectangular scale image of a pointer of the instrument according to the front projection image, and determining the reading of the pointer on the instrument according to the binarization picture and the rectangular scale image of the pointer.
Compared with the prior art, the beneficial effects of this application are: according to the method, the integral offset between the first instrument center point in the first instrument image and the first template instrument center point in the first template instrument image is calculated, the position of the shooting device is adjusted according to the integral offset, so that the first instrument center point corresponds to the first template instrument center point, the instrument can be ensured to be displayed in the second instrument image when the second instrument image after the preset multiple is shot in a follow-up mode, the second instrument center point and the outline scale point of the second instrument image are determined through a template matching method in the follow-up mode, an oval equation of a dial area is obtained, various parameters of the dial area of the instrument can be obtained, then the front-view projection image of the second instrument image is determined according to the yaw angle and the pitch angle, the reading of the instrument can be identified through determining the area of the pointer corresponding to the scale on the front-view projection image, the influence of the environment on the reading of the instrument can be overcome, meanwhile, the reading of the instrument is only needed to be shot through the shooting device, the instrument is not needed to be manually or mechanically assisted, the reading of the instrument is identified, the reading process is simpler and convenient, the reading process is accurate, and the reading is smaller.
Preferably, the step of obtaining a first meter image of a meter, and performing feature point affine transformation matrix correction on the first meter image to calculate an overall offset between a first meter center point in the first meter image and a first template meter center point in a first template meter image includes:
acquiring a first instrument image of the instrument, and respectively calculating key points of the first instrument image and the first template instrument image and descriptors corresponding to the key points of the first instrument image and the first template instrument image;
determining a matching score of the first instrument image and the first template instrument image according to the matching degree between the key points of the first instrument image and the key points of the first template instrument image;
and obtaining the overall offset between the first instrument center point in the first instrument image and the first template instrument center point in the first template instrument image according to the matching score, wherein the first template instrument center point is positioned at the center position of the first template instrument image.
Preferably, the step of obtaining a second meter image of the meter and determining a second meter center point and a contour scale point of the second meter image through a template matching method includes:
Acquiring a second instrument image and a second template instrument image, wherein the second template instrument image comprises a second template instrument center point and a template contour scale point;
determining that the second meter image is in a different position from the second template meter image
Figure SMS_1
Matching correlation score at:
Figure SMS_2
in the method, in the process of the invention,
Figure SMS_3
for the second template instrument image, < >>
Figure SMS_4
For being +.>
Figure SMS_5
Vertex (vertex) and (head) of the patient>
Figure SMS_6
Is a sliding window image with length and width, and +.>
Figure SMS_7
,/>
Figure SMS_8
And determining a sliding window image when the matching correlation score is maximum, and determining a second instrument center point and a contour scale point according to the sliding window image, wherein the second instrument center point is a second template instrument center point, and the contour scale point is the template contour scale point.
Preferably, the step of performing dial area contour ellipse fitting on the meter according to the second meter center point and the contour scale point to obtain a dial area ellipse equation of the second meter image includes:
calculating all the contour scale points and the second instrument center point
Figure SMS_9
The distance between them, and the maximum value of said distance is taken as the major axis of the ellipse +.>
Figure SMS_10
The minimum value of said distance is taken as the minor axis of the ellipse +. >
Figure SMS_11
According to the second meter center point
Figure SMS_12
Said major axis->
Figure SMS_13
Said minor axis->
Figure SMS_14
Determining an initial elliptic equation:
Figure SMS_15
;/>
in the method, in the process of the invention,
Figure SMS_16
is the rotation angle;
and calculating fitting errors of the initial elliptic equations according to the initial elliptic equations, and determining dial area elliptic equations of the second instrument image according to the fitting errors.
Preferably, the step of calculating a fitting error of the initial elliptic equation according to the initial elliptic equation, and determining the dial region elliptic equation of the second meter image according to the fitting error includes:
calculating fitting errors of the initial elliptic equation according to the initial elliptic equation:
Figure SMS_17
in the method, in the process of the invention,
Figure SMS_18
for the number of contour graduation points, +.>
Figure SMS_19
Coordinates of the contour scale points;
sequentially updating the rotation angle
Figure SMS_20
Said second meter centre point +.>
Figure SMS_21
A major axis endpoint and a minor axis endpoint;
judging whether the fitting errors of all the contour scale points exceed an error threshold value, and if the fitting errors of the contour scale points exceed the error threshold value, eliminating the contour scale points with the fitting errors exceeding the error threshold value;
taking the contour scale points with fitting errors not exceeding the error threshold value as input values of the next iteration, and returning to execute the calculation of all the contour scale points With the second meter center point
Figure SMS_22
And a step of determining a dial area ellipse equation of the second meter image.
Preferably, the rotation angle is updated sequentially
Figure SMS_23
Said second meter centre point +.>
Figure SMS_24
The steps of the major axis endpoint and the minor axis endpoint comprise:
fixing the second instrument center point
Figure SMS_25
Said major axis->
Figure SMS_26
Said minor axis->
Figure SMS_27
In the following
Figure SMS_28
Is selected within the angle range of +.>
Figure SMS_29
So that the fitting error is minimized and by +.>
Figure SMS_30
Updating the rotation angle of said ellipse +.>
Figure SMS_31
Fixing the long shaft
Figure SMS_32
Said minor axis->
Figure SMS_33
In->
Figure SMS_34
Selecting +.f. in the center search range with the center and the first preset distance as radius>
Figure SMS_35
So that the fitting error is minimized and by +.>
Figure SMS_36
Updating the second meter centre point +.>
Figure SMS_37
And selecting a fitting long axis endpoint and a fitting short axis endpoint in a long and short axis searching range with a long axis endpoint and a short axis endpoint of the initial elliptic equation as circle centers and a second preset distance as radius, so that the fitting error is minimum, and updating the long axis endpoint and the short axis endpoint through the fitting long axis endpoint and the fitting short axis endpoint.
Preferably, the step of calculating a yaw angle and a pitch angle of a shooting position of the meter according to the dial area elliptic equation, and determining the front projection image of the second meter image according to the yaw angle and the pitch angle includes:
Taking the central point of the dial area elliptic equation as an origin and performing rotation transformation matrix calculation:
Figure SMS_38
;/>
Figure SMS_39
Figure SMS_40
Figure SMS_41
in the method, in the process of the invention,
Figure SMS_44
to set the deflection angle +.>
Figure SMS_47
Is a transformation matrix of three-dimensional coordinates of>
Figure SMS_50
To set pitch angle->
Figure SMS_43
Is a transformation matrix of three-dimensional coordinates of>
Figure SMS_46
To set the roll angle +.>
Figure SMS_49
Is a transformation matrix of three-dimensional coordinates of>
Figure SMS_51
To set the deflection angle +.>
Figure SMS_42
To set pitch angle->
Figure SMS_45
To set the roll angle, and ∈>
Figure SMS_48
Is 0;
determining two-dimensional coordinates of a major axis endpoint and a minor axis endpoint of the dial area ellipse equation
Figure SMS_52
And according to said two-dimensional coordinates +.>
Figure SMS_53
Calculating the distance ++between the major axis endpoint and the minor axis endpoint of the dial area ellipse equation in the Z-axis direction>
Figure SMS_54
Figure SMS_55
According to the two-dimensional coordinates
Figure SMS_56
Distance->
Figure SMS_57
Determining three-dimensional coordinates of a major axis endpoint and a minor axis endpoint of the dial area ellipse equation>
Figure SMS_58
According to the three-dimensional coordinates
Figure SMS_59
An orthographic projection image of the second meter image is determined.
Preferably, the three-dimensional coordinates
Figure SMS_60
The step of determining a front projection image of the second meter image comprises:
according to the three-dimensional coordinates
Figure SMS_61
Performing inverse operation of the rotation transformation matrix, and calculating three-dimensional coordinates of a major axis endpoint and a minor axis endpoint of the front projection image of the second instrument image >
Figure SMS_62
Figure SMS_63
According to the three-dimensional coordinates
Figure SMS_64
Determining the major axis +.>
Figure SMS_65
And short axis->
Figure SMS_66
And according to said long axis +.>
Figure SMS_67
Is +.>
Figure SMS_68
The ratio between them determines the projection score;
determining the set navigation deflection angle according to the dial area elliptic equation
Figure SMS_69
Is +_with the set pitch angle>
Figure SMS_70
And selecting the deviation angle in the correction search range>
Figure SMS_71
Is>
Figure SMS_72
Maximizing the projection score and according to the angle of deviation +.>
Figure SMS_73
Is>
Figure SMS_74
A front projection image of the second meter image is determined.
Preferably, the step of determining the binary image and the rectangular scale image of the pointer of the meter according to the front projection image, and determining the reading of the pointer on the meter according to the binary image and the rectangular scale image of the pointer includes:
determining a binarized picture of the area where the pointer of the instrument is located in the front projection image;
rectangular unfolding is carried out on the binarized picture so as to obtain a rectangular scale image;
and carrying out binarization recognition on the rectangular scale image to determine the reading of the pointer on the instrument.
In a second aspect, the present invention provides a meter reading identification system, the system comprising:
The offset determining module is used for acquiring a first instrument image of an instrument, carrying out characteristic point affine transformation matrix correction on the first instrument image, and calculating the integral offset between a first instrument center point in the first instrument image and a first template instrument center point in a first template instrument image;
the dial parameter determining module is used for correcting the shooting position of the instrument according to the integral offset, so that the first instrument center point corresponds to the first template instrument center point, a second instrument image of the instrument is obtained, and a second instrument center point and a contour scale point of the second instrument image are determined through a template matching method;
the ellipse fitting module is used for performing dial area contour ellipse fitting on the instrument according to the second instrument center point and the contour scale points so as to obtain a dial area ellipse equation of the second instrument image;
the projection image determining module is used for calculating a yaw angle and a pitch angle of a shooting position of the instrument according to the dial area elliptic equation and determining a front projection image of the second instrument image according to the yaw angle and the pitch angle;
And the reading identification module is used for determining a binarization picture and a rectangular scale image of the pointer of the instrument according to the front projection image and determining the reading of the pointer on the instrument according to the binarization picture and the rectangular scale image of the pointer.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for identifying meter readings according to a first embodiment of the present invention;
FIG. 2 is a flowchart II of a meter reading identification method according to a first embodiment of the present invention;
FIG. 3 is a flowchart III of a meter reading identification method according to an embodiment of the present invention;
FIG. 4 is a flowchart of a method for identifying meter readings according to a first embodiment of the present invention;
FIG. 5 is a flowchart fifth method for identifying meter readings according to an embodiment of the present invention;
FIG. 6 is a flowchart sixth of a meter reading identification method according to the first embodiment of the present invention;
FIG. 7 is a flowchart seventh of a meter reading identification method according to an embodiment of the invention;
FIG. 8 is a flowchart eighth of a meter reading identification method according to a first embodiment of the present invention;
FIG. 9 is a flowchart of a meter reading identification method according to an embodiment of the invention;
fig. 10 is a block diagram of a meter reading identification system according to a second embodiment of the present invention.
Embodiments of the present invention will be further described below with reference to the accompanying drawings.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are exemplary and intended to illustrate embodiments of the invention and should not be construed as limiting the invention.
In the description of the embodiments of the present invention, it should be understood that the terms "length," "width," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," and the like indicate orientations or positional relationships based on the orientation or positional relationships shown in the drawings, merely to facilitate description of the embodiments of the present invention and simplify description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present invention.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the embodiments of the present invention, the meaning of "plurality" is two or more, unless explicitly defined otherwise.
In the embodiments of the present invention, unless explicitly specified and limited otherwise, the terms "mounted," "connected," "secured" and the like are to be construed broadly and include, for example, either permanently connected, removably connected, or integrally formed; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communicated with the inside of two elements or the interaction relationship of the two elements. The specific meaning of the above terms in the embodiments of the present invention will be understood by those of ordinary skill in the art according to specific circumstances.
Example 1
In a first embodiment of the present invention, as shown in fig. 1, the present invention provides a method for identifying meter readings, the method comprising:
S1, acquiring a first instrument image of an instrument, and carrying out characteristic point affine transformation matrix correction on the first instrument image to calculate the integral offset between a first instrument center point in the first instrument image and a first template instrument center point in a first template instrument image;
specifically, in this step, the robot carries the photographing device to move to a preset navigation position, and photographs an optimal angle picture, that is, a first meter image, by using the photographing device, and meanwhile, in photographing, it is required to ensure that the meter can be completely presented in the first meter image.
As shown in fig. 2, the step S1 includes:
s11, acquiring a first instrument image of an instrument, and respectively calculating key points of the first instrument image and the first template instrument image and descriptors corresponding to the key points of the first instrument image and the first template instrument image;
specifically, key points of the first instrument image and the first template instrument image and corresponding descriptors are calculated by using SIFT and superpoint network models, the key points are specifically the first instrument image and various characteristic points in the first template instrument image, and the descriptors are specifically the characteristic descriptions of the first instrument image and various characteristic points in the first template instrument image;
S12, determining the matching score of the first instrument image and the first template instrument image according to the matching degree between the key points of the first instrument image and the key points of the first template instrument image;
specifically, after the key points and the corresponding description points are calculated, the key points and the corresponding description points are subjected to similarity degree matching, corresponding matching scores can be calculated according to the matching degrees, the higher the matching scores are, the higher the similarity degree between the first instrument image and the first template instrument image is, the similarity degree not only refers to the similarity degree of each element in the first instrument image and the first template instrument image, but also includes the similarity degree of the positions of each element in the images;
s13, according to the matching score, obtaining the integral offset between a first instrument center point in the first instrument image and a first template instrument center point in the first template instrument image, wherein the first template instrument center point is positioned at the center position of the first template instrument image;
specifically, after the corresponding matching score is calculated, calculating an affine transformation matrix M by using a ransac method, so that the integral offset between the first instrument center point in the first instrument image and the first template instrument center point in the first template instrument image can be calculated;
It is worth mentioning that the first instrument center point is the position of the instrument in the first instrument image, the first template instrument center point is the position of the instrument in the first template instrument image, the first template instrument image is the template image shot by the robot at the same preset navigation position as the first instrument image, due to the motion error of the robot and the shooting error of the camera, a certain deviation exists between the first instrument image and the first template instrument image, namely, the position of the instrument in the first template instrument image is different from the position of the instrument in the first instrument image, so that the error of the position between the two needs to be calculated in the step S1, and the first template instrument center point is positioned at the center position of the first template instrument image, and only the offset of the first instrument center point from the center of the first instrument image needs to be calculated, so that shooting correction in the subsequent step can be facilitated.
S2, correcting the shooting position of the instrument according to the integral offset, so that the first instrument center point corresponds to the first template instrument center point, acquiring a second instrument image of the instrument, and determining a second instrument center point and a contour scale point of the second instrument image through a template matching method;
Specifically, the position and the angle of the photographing device are adjusted through the integral offset calculated in the above steps, so that the position of the first instrument center point in the first instrument image is the same as the position of the first template instrument center point in the first template instrument image, so that when the second instrument image after the preset magnification is photographed later, the second instrument image can be ensured to be correctly displayed, if the photographing device is not corrected, only part of the image of the instrument or the image without the instrument can be displayed on the second instrument image finally photographed, the subsequent reading identification is inconvenient, the first instrument image is the initial image photographed by the photographing device, and the second instrument image is the magnified image photographed by the photographing device with the preset magnification.
As shown in fig. 3, the step S2 includes:
s21, acquiring a second instrument image and a second template instrument image, wherein the second template instrument image comprises a second template instrument center point and a template contour scale point;
specifically, the second template instrument image is similar to the first template instrument image, and is an ideal image shot by the shooting equipment, namely, parameters such as shooting position, angle and the like of the shooting equipment are the same as ideal shooting parameters when the second instrument image is shot, and the second template instrument image is attached with manually calibrated center points and scale points, namely, the second template instrument center points and template contour scale points, and meanwhile, certain errors exist in the actual shooting process of the shooting equipment, so that an area image with an instrument in the second instrument image is matched with the second instrument image through a template matching method, and the second instrument center points and the contour scale points on the second instrument image can be directly acquired on the second template instrument image;
S22, determining that the second instrument image and the second template instrument image are at different positions
Figure SMS_75
Matching correlation score at:
Figure SMS_76
in the method, in the process of the invention,
Figure SMS_77
for the second template instrument image, < >>
Figure SMS_78
For being +.>
Figure SMS_79
Vertex (vertex) and (head) of the patient>
Figure SMS_80
Is a sliding window image with length and width, and +.>
Figure SMS_81
,/>
Figure SMS_82
In particular, the method comprises the steps of,
Figure SMS_83
for being +.>
Figure SMS_84
Is a vertex,
Figure SMS_85
Is a long and wide sliding window image, the size of the sliding window image is fixed, but the position of the sliding window image is according to the vertex
Figure SMS_86
Wherein the calculated matching correlation score represents a degree of matching of the sliding window image and the second template meter image, the higher the matching correlation score, the higher the degree of matching of the two;
s23, determining a sliding window image when the matching correlation score is maximum, and determining a second instrument center point and a contour scale point according to the sliding window image, wherein the second instrument center point is a second template instrument center point, and the contour scale point is the template contour scale point;
specifically, when the matching correlation score is the largest, that is, the sliding window image is almost completely corresponding to the second template instrument image, where the instrument is also in the center position of the sliding window image, so that the sliding window image of the second instrument image can be equivalent to the second template instrument image, and therefore, the second instrument center point and the contour scale point in the second instrument image can be directly obtained in the second template instrument image, that is, the second instrument center point is the second template instrument center point, and the contour scale point is the template contour scale point.
S3, performing dial area contour ellipse fitting on the instrument according to the second instrument center point and the contour scale points to obtain a dial area ellipse equation of the second instrument image;
specifically, because of the limitation of the shooting angle and the shooting position, the shot image of the instrument area is in an oval shape, and the actual area of the instrument is in a perfect circle shape, in this step, the outline oval fitting is performed on the dial area, and a corresponding dial area oval equation is obtained, so that the dial area oval equation can be projected into the perfect circle shape later, and reading identification is performed.
As shown in fig. 4, specifically, the step S3 includes:
s31, calculating all the contour scale points and the second instrument center point
Figure SMS_87
The distance between them, and the maximum value of said distance is taken as the major axis of the ellipse +.>
Figure SMS_88
The minimum value of said distance is taken as the minor axis of the ellipse +.>
Figure SMS_89
Specifically, because the ellipse has a major axis and a minor axis, in this step, the maximum distance between the profile scale point and the center point of the second meter is taken as the length of the major axis, the minimum distance between the profile scale point and the center point of the second meter is taken as the length of the minor axis, and in the process of establishing the ellipse equation, the center, the major axis and the minor axis of the ellipse are known, and the end positions of the major axis and the minor axis can be obtained in the profile scale point, so that the initial ellipse equation can be determined according to the above known conditions;
S32, according to the second instrument center point
Figure SMS_90
Said major axis->
Figure SMS_91
Said minor axis->
Figure SMS_92
Determining an initial elliptic equation:
Figure SMS_93
in the method, in the process of the invention,
Figure SMS_94
is the rotation angle;
specifically, the rotation angle of the ellipse is specifically an angle between the major axis of the ellipse and the X axis in the two-dimensional coordinate system established according to the center point of the second instrument;
s33, calculating fitting errors of the initial elliptic equations according to the initial elliptic equations, and determining dial area elliptic equations of the second instrument image according to the fitting errors;
specifically, because the contour scale point and the second instrument center point are manually calibrated, a certain error exists between an initial elliptic equation calculated according to the contour scale point and the second instrument center point and an actual dial area elliptic equation, and therefore the initial elliptic equation can be gradually updated through calculating the fitting error of the initial elliptic equation and through the error until a stable dial area elliptic equation is obtained.
As shown in fig. 5, the step S33 includes:
s331, according to the initial elliptic equation, calculating a fitting error of the initial elliptic equation:
Figure SMS_95
in the method, in the process of the invention,
Figure SMS_96
for the number of contour graduation points, +. >
Figure SMS_97
Coordinates of the contour scale points;
s332, sequentially updating the rotation angles
Figure SMS_98
Said second meter centre point +.>
Figure SMS_99
A major axis endpoint and a minor axis endpoint;
as shown in fig. 6, wherein the S332 includes:
s3321 fixing the center point of the second instrument
Figure SMS_100
Said major axis->
Figure SMS_101
Said minor axis->
Figure SMS_102
In the following
Figure SMS_103
Is selected within the angle range of +.>
Figure SMS_104
So that the fitting error is minimized and by +.>
Figure SMS_105
Updating the rotation angle of said ellipse +.>
Figure SMS_106
Specifically, in this step, the rotation angle is used
Figure SMS_107
Dividing an angle range for the intermediate value, substituting all values in the angle range into a calculation formula of fitting errors, and selecting +.>
Figure SMS_108
So that the fitting error is minimized, finally +.>
Figure SMS_109
Substituted into the initial elliptic equationReplace the original rotation angle +.>
Figure SMS_110
To complete the rotation angle +.>
Figure SMS_111
Is updated according to the update of (a);
s3322 fixing the long shaft
Figure SMS_112
Said minor axis->
Figure SMS_113
In->
Figure SMS_114
Selecting +.f. in the center search range with the center and the first preset distance as radius>
Figure SMS_115
So that the fitting error is minimized and by +.>
Figure SMS_116
Updating the second meter centre point +.>
Figure SMS_117
Specifically, after the rotation angle is updated
Figure SMS_118
Then, continuously updating the center point of the second instrument, determining a center search range by taking the center point of the second instrument as the center and the first preset distance as the radius, substituting all points in the center search range into a calculation formula of fitting errors, and selecting >
Figure SMS_119
Minimizing the fitting error, and finally
Figure SMS_120
Substituting into initial elliptic equation to replace initial second instrument center point/>
Figure SMS_121
To complete the second meter centre point +.>
Figure SMS_122
Is updated according to the update of (a);
s3323, selecting a fitting long-axis endpoint and a fitting short-axis endpoint in a long-axis and short-axis searching range with a long-axis endpoint and a short-axis endpoint of the initial elliptic equation as circle centers and a second preset distance as radius, so that the fitting error is minimized, and updating the long-axis endpoint and the short-axis endpoint through the fitting long-axis endpoint and the fitting short-axis endpoint;
specifically, after updating the second meter center point
Figure SMS_123
Then, proceed with the updating of the major axis and the minor axis and update the second meter center point +.>
Figure SMS_124
Similarly, a long axis endpoint and a short axis endpoint are used as circle centers, a short axis searching radius is determined by taking a second preset distance as a radius, all points in the short axis radius are substituted into a calculation formula of fitting errors, the fitting long axis endpoint and the fitting short axis endpoint are selected to minimize the fitting errors, and finally the fitting long axis endpoint and the fitting short axis endpoint are substituted into an initial elliptic equation to replace the initial long axis endpoint and the initial short axis endpoint so as to finish updating of the long axis and the short axis.
S333, judging whether fitting errors of all the contour scale points exceed an error threshold value, and if the fitting errors of the contour scale points exceed the error threshold value, eliminating the contour scale points of which the fitting errors exceed the error threshold value;
specifically, because the manually calibrated contour scale points have larger errors, contour scale points with the calculated fitting errors exceeding an error threshold value are removed, so that the initial elliptic equation calculated by the final contour scale points is ensured to approach to the final dial area elliptic equation;
s334, taking the contour scale points with the fitting errors not exceeding the error threshold value as the input value of the next iteration, and returning to execute the calculation of all the contour scale points and the second instrument center point
Figure SMS_125
And a step of determining a dial area ellipse equation of the second meter image.
Specifically, the contour scale points with fitting errors not exceeding the error threshold value are used as input values of the next iteration, the input values are used as initial values, the determination of the initial elliptic equation is continued, and the above processes are repeated, so that the initial elliptic equation tends to be stable until a stable dial region ellipse is obtained.
S4, calculating a yaw angle and a pitch angle of a shooting position of the instrument according to the dial area elliptic equation, and determining a front projection image of the second instrument image according to the yaw angle and the pitch angle;
specifically, since the angle and the position of the photographing apparatus are different, the photographed second meter image is not an elevation image, and thus it is necessary to obtain an elevation projection image of the second meter image by calculating a yaw angle and a pitch angle of the photographing apparatus, that is, a yaw angle and a pitch angle of the photographing position of the meter, and performing an inverse operation of the rotation matrix to turn back to the elevation angle of the dial.
As shown in fig. 7, the step S4 includes:
s41, taking the central point of the dial area elliptic equation as an origin and performing rotation transformation matrix calculation:
Figure SMS_126
Figure SMS_127
;/>
Figure SMS_128
Figure SMS_129
in the method, in the process of the invention,
Figure SMS_131
to set the deflection angle +.>
Figure SMS_133
Is a transformation matrix of three-dimensional coordinates of>
Figure SMS_138
To set pitch angle->
Figure SMS_132
Is a transformation matrix of three-dimensional coordinates of>
Figure SMS_134
To set the roll angle +.>
Figure SMS_136
Is a transformation matrix of three-dimensional coordinates of>
Figure SMS_139
To set the deflection angle +.>
Figure SMS_130
To set pitch angle->
Figure SMS_135
To set the roll angle, and ∈>
Figure SMS_137
Is 0;
specifically, the inverse rotated transformation matrix is
Figure SMS_140
And the initial setting condition of the photographing apparatus sets the roll angle to 0;
S42, determining the major axis end point and the major axis end point of the dial area elliptic equationTwo-dimensional coordinates of short axis endpoints
Figure SMS_141
And according to said two-dimensional coordinates +.>
Figure SMS_142
Calculating the distance ++between the major axis endpoint and the minor axis endpoint of the dial area ellipse equation in the Z-axis direction>
Figure SMS_143
Figure SMS_144
S43, according to the two-dimensional coordinates
Figure SMS_145
Distance->
Figure SMS_146
Determining three-dimensional coordinates of a major axis endpoint and a minor axis endpoint of the dial area ellipse equation>
Figure SMS_147
Specifically, by determining the three-dimensional coordinates of the major axis end point and the minor axis end point of the dial area elliptic equation and performing inverse operation of a rotation matrix on the three-dimensional coordinates, an orthographic projection image converted back to a positive viewing angle can be obtained;
s44, according to the three-dimensional coordinates
Figure SMS_148
Determining a front projection image of the second meter image;
as shown in fig. 8, the step S44 includes:
s441, according to the three-dimensional coordinates
Figure SMS_149
Performing inverse operation of the rotation transformation matrix, and calculating long axis end points and short axis end points of the front projection image of the second instrument imageThree-dimensional coordinates of the axial end points +.>
Figure SMS_150
Figure SMS_151
Specifically, three-dimensional coordinates of a major axis endpoint and a minor axis endpoint of the front projection image are calculated
Figure SMS_152
Then, an image similar to a perfect circle is formed between the long axis end point and the short axis end point, and the image is an initial orthographic projection image;
S442, according to the three-dimensional coordinates
Figure SMS_153
Determining the major axis +.>
Figure SMS_154
And short axis->
Figure SMS_155
And according to said long axis +.>
Figure SMS_156
Is +.>
Figure SMS_157
The ratio between them determines the projection score;
specifically, in the initial orthographic projection image obtained in the previous step, since the actual orthographic projection image is a perfect circle, it is necessary to determine whether the initial orthographic projection image is a perfect circle or not by the projection score, and the projection score is based on the long axis
Figure SMS_158
Is +.>
Figure SMS_159
The ratio between the two is determined when the long axis +.>
Figure SMS_160
Is +.>
Figure SMS_161
When the ratio between the two is approaching to 1, the projection score is higher, namely the initial orthographic projection image approaches to a perfect circle structure, namely the actual orthographic projection image is approached;
s443, determining the set navigation deflection angle according to the dial area elliptic equation
Figure SMS_162
Is +_with the set pitch angle>
Figure SMS_163
And selecting the deviation angle in the correction search range>
Figure SMS_164
Is>
Figure SMS_165
Maximizing the projection score and according to the angle of deviation +.>
Figure SMS_166
Is>
Figure SMS_167
Determining a front projection image of the second meter image;
specifically, the declination is selected in the correction search range
Figure SMS_168
Is >
Figure SMS_169
The projection score is maximized, so that the obtained front projection image approaches to a perfect circle, namely approaches to the front image of the instrument;
meanwhile, when determining the correction search range, the rotation angle is adjusted
Figure SMS_170
As said set angle of deviation +.>
Figure SMS_171
Is +_with the set pitch angle>
Figure SMS_172
And at [ sample_x, sample_y ]]In the sampling group, sample_x and sample_y satisfy +.>
Figure SMS_173
,/>
Figure SMS_174
Calculating the projection score of each sampling group and finding the angle with the highest projection score +.>
Figure SMS_175
And substitutes it into three-dimensional coordinates
Figure SMS_176
And re-determining the orthographic projection image to obtain an orthographic projection image approaching the perfect circle.
S5, determining a binarization picture and a rectangular scale image of a pointer of the instrument according to the front projection image, and determining the reading of the pointer on the instrument according to the binarization picture and the rectangular scale image of the pointer;
as shown in fig. 9, the step S5 includes:
s51, determining a binarization picture of an area where a pointer of the instrument is located in the front projection image;
the binarization picture comprises a pointer and a scale area pointed by the pointer, and other parameter information is not required to be embodied in the binarization picture;
S52, performing rectangular expansion on the binarized picture to obtain a rectangular scale image;
specifically, the binarized picture is an annular image, the annular image may not be convenient for reading, and the annular image is subjected to rectangular expansion to obtain a rectangular scale image containing a pointer and scale information pointed by the pointer;
s53, carrying out binarization recognition on the rectangular scale image to determine the reading of the pointer on the instrument;
specifically, the expanded rectangular scale image is subjected to binarization recognition to obtain a specific reading of the pointer on the rectangular scale image, so that an actual reading of the pointer on the instrument can be obtained.
The first advantage of this embodiment is: the method and the device can overcome the influence of the environment on the meter reading, simultaneously only need to shoot the image of the meter through the shooting device, without manually climbing or mechanically assisting in recognizing the meter reading, the process of recognizing the meter reading is simpler and more convenient, and the reading is more accurate and has smaller error.
Example two
As shown in fig. 10, in a second embodiment of the present invention, there is provided a meter reading identification system comprising:
the offset determining module 10 is configured to obtain a first meter image of a meter, and perform feature point affine transformation matrix correction on the first meter image to calculate an overall offset between a first meter center point in the first meter image and a first template meter center point in a first template meter image;
the dial parameter determining module 20 is configured to correct the shooting position of the instrument according to the overall offset, so that the first instrument center point corresponds to the first template instrument center point, obtain a second instrument image of the instrument, and determine a second instrument center point and a contour scale point of the second instrument image through a template matching method;
an ellipse fitting module 30, configured to perform a dial area contour ellipse fitting on the meter according to the second meter center point and the contour scale point, so as to obtain a dial area ellipse equation of the second meter image;
a projection image determining module 40, configured to calculate a yaw angle and a pitch angle of a shooting position of the meter according to the dial area elliptic equation, and determine a front projection image of the second meter image according to the yaw angle and the pitch angle;
The reading identification module 50 is configured to determine a binarized picture and a rectangular scale image of the pointer of the meter according to the front projection image, and determine a reading of the pointer on the meter according to the binarized picture and the rectangular scale image of the pointer.
In this embodiment, the offset determining module 10 includes:
the key point calculation sub-module is used for acquiring a first instrument image of the instrument, and calculating key points of the first instrument image and the first template instrument image and descriptors corresponding to the key points of the first instrument image and the first template instrument image respectively;
the matching score determining sub-module is used for determining the matching score of the first instrument image and the first template instrument image according to the matching degree between the key points of the first instrument image and the key points of the first template instrument image;
and the offset determining sub-module is used for obtaining the integral offset between the first instrument center point in the first instrument image and the first template instrument center point in the first template instrument image according to the matching score, wherein the first template instrument center point is positioned at the center position of the first template instrument image.
The dial parameter determination module 20 includes:
the image acquisition sub-module is used for acquiring the second instrument image and a second template instrument image, wherein the second template instrument image comprises a second template instrument center point and a template contour scale point;
a first computing sub-module for determining that the second meter image and the second template meter image are at different positions
Figure SMS_177
Matching correlation score at:
Figure SMS_178
in the method, in the process of the invention,
Figure SMS_179
for the second template instrument image, < >>
Figure SMS_180
For being +.>
Figure SMS_181
Vertex (vertex) and (head) of the patient>
Figure SMS_182
Is a sliding window image with length and width, and +.>
Figure SMS_183
,/>
Figure SMS_184
The parameter determination submodule is used for determining a sliding window image when the matching correlation score is maximum, and determining a second instrument center point and a contour scale point according to the sliding window image, wherein the second instrument center point is a second template instrument center point, and the contour scale point is the template contour scale point.
The ellipse fitting module 30 includes:
a second calculation sub-module for calculating all the contour scale points and the second instrument center point
Figure SMS_185
The distance between them, and the maximum value of said distance is taken as the major axis of the ellipse +.>
Figure SMS_186
The minimum value of said distance is taken as the minor axis of the ellipse +. >
Figure SMS_187
An ellipse determination sub-module for determining a center point of the second meter
Figure SMS_188
Said major axis->
Figure SMS_189
Said stub shaft
Figure SMS_190
Determining an initial elliptic equation:
Figure SMS_191
in the method, in the process of the invention,
Figure SMS_192
is the rotation angle;
and the fitting error calculation sub-module is used for calculating the fitting error of the initial elliptic equation according to the initial elliptic equation and determining the dial area elliptic equation of the second instrument image according to the fitting error.
Wherein, the fitting error calculation submodule includes:
a fitting error calculating unit, configured to calculate a fitting error of the initial ellipse equation according to the initial ellipse equation:
Figure SMS_193
in the method, in the process of the invention,
Figure SMS_194
for the number of contour graduation points, +.>
Figure SMS_195
Coordinates of the contour scale points;
an updating unit for sequentially updating the rotation angles
Figure SMS_196
Said second meter centre point +.>
Figure SMS_197
A major axis endpoint and a minor axis endpoint;
the judging unit is used for judging whether fitting errors of all the contour scale points exceed an error threshold value, and if the fitting errors of the contour scale points exceed the error threshold value, eliminating the contour scale points with the fitting errors exceeding the error threshold value;
an execution unit for taking the contour scale points with fitting errors not exceeding the error threshold value as the input values of the next iteration, and returning to execute the calculation of all the contour scale points and the second instrument center point
Figure SMS_198
A step of determining a dial area ellipse equation of the second meter image;
the updating unit includes:
a first updating subunit for fixing the second meter center point
Figure SMS_199
Said major axis->
Figure SMS_200
Said stub shaft
Figure SMS_201
In->
Figure SMS_202
Is selected within the angle range of +.>
Figure SMS_203
So that the fitting error is minimized and by +.>
Figure SMS_204
Updating the rotation angle of said ellipse +.>
Figure SMS_205
A second updating subunit for fixing the long axis
Figure SMS_206
Said minor axis->
Figure SMS_207
In->
Figure SMS_208
Selecting +.f. in the center search range with the center and the first preset distance as radius>
Figure SMS_209
Minimizing the fitting error and by
Figure SMS_210
Updating the second meter centre point +.>
Figure SMS_211
And the third updating subunit is used for selecting a fitting long-axis endpoint and a fitting short-axis endpoint in a long-axis and short-axis searching range with the long-axis endpoint and the short-axis endpoint of the initial elliptic equation as circle centers and the second preset distance as radius, so that the fitting error is minimum, and updating the long-axis endpoint and the short-axis endpoint through the fitting long-axis endpoint and the fitting short-axis endpoint.
The projection image determination module 40 includes:
the matrix calculation sub-module is used for taking the central point of the dial area elliptic equation as an origin and performing rotation transformation matrix calculation:
Figure SMS_212
Figure SMS_213
Figure SMS_214
Figure SMS_215
In the method, in the process of the invention,
Figure SMS_217
to set the deflection angle +.>
Figure SMS_220
Is a transformation matrix of three-dimensional coordinates of>
Figure SMS_224
To set pitch angle->
Figure SMS_218
Is a transformation matrix of three-dimensional coordinates of>
Figure SMS_221
To set the roll angle +.>
Figure SMS_223
Is a transformation matrix of three-dimensional coordinates of>
Figure SMS_225
To set the deflection angle +.>
Figure SMS_216
To set pitch angle->
Figure SMS_219
To set the roll angle, and ∈>
Figure SMS_222
Is 0;
a distance determination submodule for determining two-dimensional coordinates of a major axis endpoint and a minor axis endpoint of the dial region ellipse equation
Figure SMS_226
And according to said two-dimensional coordinates +.>
Figure SMS_227
Calculating the distance ++between the major axis endpoint and the minor axis endpoint of the dial area ellipse equation in the Z-axis direction>
Figure SMS_228
:/>
Figure SMS_229
A coordinate determination sub-module for determining the two-dimensional coordinates
Figure SMS_230
Distance->
Figure SMS_231
Determining three-dimensional coordinates of a major axis endpoint and a minor axis endpoint of the dial area ellipse equation>
Figure SMS_232
A projection image determining sub-module for determining the three-dimensional coordinates
Figure SMS_233
An orthographic projection image of the second meter image is determined.
Wherein the projection image determination submodule includes:
an inverse operation unit for calculating the three-dimensional coordinates
Figure SMS_234
Performing inverse operation of the rotation transformation matrix, and calculating three-dimensional coordinates of a major axis endpoint and a minor axis endpoint of the orthographic projection image of the second instrument image
Figure SMS_235
Figure SMS_236
A projection score determining unit for determining the three-dimensional coordinates
Figure SMS_237
Determining the major axis +.>
Figure SMS_238
And short axis->
Figure SMS_239
And according to said long axis +.>
Figure SMS_240
Is +.>
Figure SMS_241
The ratio between them determines the projection score;
a front projection image determining unit for determining the set navigation deflection angle according to the dial area elliptic equation
Figure SMS_242
Is +_with the set pitch angle>
Figure SMS_243
And selecting the deviation angle in the correction search range>
Figure SMS_244
Is>
Figure SMS_245
Maximizing the projection score and according to the angle of deviation +.>
Figure SMS_246
Is>
Figure SMS_247
A front projection image of the second meter image is determined.
The reading identification module 50 includes:
the picture determining submodule is used for determining a binarized picture of the area where the pointer of the instrument is located in the front projection image;
the picture expansion sub-module is used for carrying out rectangular expansion on the binarized picture so as to obtain a rectangular scale image;
and the reading identification sub-module is used for carrying out binarization identification on the rectangular scale image so as to determine the reading of the pointer on the instrument.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (9)

1. A meter reading identification method, the method comprising:
acquiring a first instrument image of an instrument, and carrying out characteristic point affine transformation matrix correction on the first instrument image to calculate the integral offset between a first instrument center point in the first instrument image and a first template instrument center point in a first template instrument image;
correcting the shooting position of the instrument according to the integral offset, so that the first instrument center point corresponds to the first template instrument center point, acquiring a second instrument image of the instrument, and determining a second instrument center point and a contour scale point of the second instrument image through a template matching method;
According to the second instrument center point and the contour scale points, carrying out dial area contour ellipse fitting on the instrument so as to obtain a dial area ellipse equation of the second instrument image;
according to the dial area elliptic equation, a yaw angle and a pitch angle of a shooting position of the instrument are calculated, and a front projection image of the second instrument image is determined according to the yaw angle and the pitch angle;
determining a binarization picture and a rectangular scale image of a pointer of the instrument according to the front projection image, and determining the reading of the pointer on the instrument according to the binarization picture and the rectangular scale image of the pointer;
the step of acquiring a second instrument image of the instrument and determining a second instrument center point and a contour scale point of the second instrument image through a template matching method comprises the following steps:
acquiring a second instrument image and a second template instrument image, wherein the second template instrument image comprises a second template instrument center point and a template contour scale point;
determining that the second meter image is in a different position from the second template meter image
Figure QLYQS_1
Matching correlation score at:
Figure QLYQS_2
In the method, in the process of the invention,
Figure QLYQS_3
for the second template instrument image, < >>
Figure QLYQS_4
For being +.>
Figure QLYQS_5
Vertex (vertex) and (head) of the patient>
Figure QLYQS_6
Is a sliding window image with length and width, and +.>
Figure QLYQS_7
,/>
Figure QLYQS_8
And determining a sliding window image when the matching correlation score is maximum, and determining a second instrument center point and a contour scale point according to the sliding window image, wherein the second instrument center point is a second template instrument center point, and the contour scale point is the template contour scale point.
2. The meter reading identification method of claim 1, wherein the step of obtaining a first meter image of a meter, performing feature point affine transformation matrix correction on the first meter image to calculate an overall offset between a first meter center point in the first meter image and a first template meter center point in a first template meter image comprises:
acquiring a first instrument image of the instrument, and respectively calculating key points of the first instrument image and the first template instrument image and descriptors corresponding to the key points of the first instrument image and the first template instrument image;
determining a matching score of the first instrument image and the first template instrument image according to the matching degree between the key points of the first instrument image and the key points of the first template instrument image;
And obtaining the overall offset between the first instrument center point in the first instrument image and the first template instrument center point in the first template instrument image according to the matching score, wherein the first template instrument center point is positioned at the center position of the first template instrument image.
3. The meter reading identification method of claim 1, wherein the step of performing a dial area contour ellipse fitting to the meter based on the second meter center point and the contour scale points to obtain a dial area ellipse equation of the second meter image comprises:
calculating all the contour scale points and the second instrument center point
Figure QLYQS_9
The distance between them, and the maximum value of said distance is taken as the major axis of the ellipse +.>
Figure QLYQS_10
The minimum value of said distance is taken as the minor axis of the ellipse +.>
Figure QLYQS_11
According to the second meter center point
Figure QLYQS_12
Said major axis->
Figure QLYQS_13
Said minor axis->
Figure QLYQS_14
Determining an initial elliptic equation:
Figure QLYQS_15
in the method, in the process of the invention,
Figure QLYQS_16
is the rotation angle;
and calculating fitting errors of the initial elliptic equations according to the initial elliptic equations, and determining dial area elliptic equations of the second instrument image according to the fitting errors.
4. The meter reading identification method of claim 3 wherein the steps of calculating a fitting error of the initial elliptical equation from the initial elliptical equation and determining a dial region elliptical equation of the second meter image from the fitting error comprise:
calculating fitting errors of the initial elliptic equation according to the initial elliptic equation:
Figure QLYQS_17
in the method, in the process of the invention,
Figure QLYQS_18
for the number of contour graduation points, +.>
Figure QLYQS_19
Coordinates of the contour scale points;
sequentially updating the rotation angle
Figure QLYQS_20
Said second meter centre point +.>
Figure QLYQS_21
A major axis endpoint and a minor axis endpoint;
judging whether the fitting errors of all the contour scale points exceed an error threshold value, and if the fitting errors of the contour scale points exceed the error threshold value, eliminating the contour scale points with the fitting errors exceeding the error threshold value;
taking the contour scale points with fitting errors not exceeding the error threshold value as input values of the next iteration, and returning to execute the calculation of all the contour scale points and the second instrument center point
Figure QLYQS_22
And a step of determining a dial area ellipse equation of the second meter image.
5. The meter reading identification method of claim 4 wherein the sequentially updating the rotation angle
Figure QLYQS_23
Said second meter centre point +.>
Figure QLYQS_24
The steps of the major axis endpoint and the minor axis endpoint comprise:
fixing the second instrument center point
Figure QLYQS_25
Said major axis->
Figure QLYQS_26
Said minor axis->
Figure QLYQS_27
In->
Figure QLYQS_28
Is selected within the angle range of +.>
Figure QLYQS_29
So that the fitting error is minimized and by +.>
Figure QLYQS_30
Updating the rotation angle of said ellipse +.>
Figure QLYQS_31
Fixing the long shaft
Figure QLYQS_32
Said minor axis->
Figure QLYQS_33
In->
Figure QLYQS_34
Selecting +.f. in the center search range with the center and the first preset distance as radius>
Figure QLYQS_35
So that the fitting error is minimized and by +.>
Figure QLYQS_36
Updating the second meter centre point +.>
Figure QLYQS_37
;/>
And selecting a fitting long axis endpoint and a fitting short axis endpoint in a long and short axis searching range with a long axis endpoint and a short axis endpoint of the initial elliptic equation as circle centers and a second preset distance as radius, so that the fitting error is minimum, and updating the long axis endpoint and the short axis endpoint through the fitting long axis endpoint and the fitting short axis endpoint.
6. The meter reading identification method according to claim 1, wherein the step of calculating a yaw angle and a pitch angle of a photographing position of the meter according to the dial area ellipse equation, and determining an orthographic projection image of the second meter image according to the yaw angle and the pitch angle comprises:
Taking the central point of the dial area elliptic equation as an origin and performing rotation transformation matrix calculation:
Figure QLYQS_38
Figure QLYQS_39
Figure QLYQS_40
Figure QLYQS_41
in the method, in the process of the invention,
Figure QLYQS_44
to set the deflection angle +.>
Figure QLYQS_45
Is a transformation matrix of three-dimensional coordinates of>
Figure QLYQS_48
To set pitch angle->
Figure QLYQS_42
Is a transformation matrix of three-dimensional coordinates of>
Figure QLYQS_46
To set the roll angle +.>
Figure QLYQS_49
Is a transformation matrix of three-dimensional coordinates of>
Figure QLYQS_51
To set the deflection angle +.>
Figure QLYQS_43
To set pitch angle->
Figure QLYQS_47
To set the roll angle, and ∈>
Figure QLYQS_50
Is 0;
determining two-dimensional coordinates of a major axis endpoint and a minor axis endpoint of the dial area ellipse equation
Figure QLYQS_52
And according to said two-dimensional coordinates +.>
Figure QLYQS_53
Calculating the distance ++between the major axis endpoint and the minor axis endpoint of the dial area ellipse equation in the Z-axis direction>
Figure QLYQS_54
Figure QLYQS_55
According to the two-dimensional coordinates
Figure QLYQS_56
Distance->
Figure QLYQS_57
Determining three-dimensional coordinates of a major axis endpoint and a minor axis endpoint of the dial area ellipse equation>
Figure QLYQS_58
According to the three-dimensional coordinates
Figure QLYQS_59
An orthographic projection image of the second meter image is determined.
7. According to the weightsThe meter reading identification method of claim 6 wherein said reference to said three-dimensional coordinates
Figure QLYQS_60
The step of determining a front projection image of the second meter image comprises:
according to the three-dimensional coordinates
Figure QLYQS_61
Performing inverse operation of the rotation transformation matrix, and calculating three-dimensional coordinates of a major axis endpoint and a minor axis endpoint of the front projection image of the second instrument image >
Figure QLYQS_62
Figure QLYQS_63
According to the three-dimensional coordinates
Figure QLYQS_64
Determining the major axis +.>
Figure QLYQS_65
And short axis->
Figure QLYQS_66
And according to said long axis +.>
Figure QLYQS_67
Is +.>
Figure QLYQS_68
The ratio between them determines the projection score;
determining the set navigation deflection angle according to the dial area elliptic equation
Figure QLYQS_69
Is +_with the set pitch angle>
Figure QLYQS_70
And selecting the deviation angle in the correction search range>
Figure QLYQS_71
Is>
Figure QLYQS_72
Maximizing the projection score and according to the angle of deviation +.>
Figure QLYQS_73
Is>
Figure QLYQS_74
A front projection image of the second meter image is determined.
8. The meter reading identification method of claim 1, wherein the step of determining a binary image of a pointer of the meter and a rectangular scale image from the front projection image, and determining a reading of the pointer on the meter from the binary image of the pointer and the rectangular scale image comprises:
determining a binarized picture of the area where the pointer of the instrument is located in the front projection image;
rectangular unfolding is carried out on the binarized picture so as to obtain a rectangular scale image;
and carrying out binarization recognition on the rectangular scale image to determine the reading of the pointer on the instrument.
9. A meter reading identification system, the system comprising:
the offset determining module is used for acquiring a first instrument image of an instrument, carrying out characteristic point affine transformation matrix correction on the first instrument image, and calculating the integral offset between a first instrument center point in the first instrument image and a first template instrument center point in a first template instrument image;
the dial parameter determining module is used for correcting the shooting position of the instrument according to the integral offset, so that the first instrument center point corresponds to the first template instrument center point, a second instrument image of the instrument is obtained, and a second instrument center point and a contour scale point of the second instrument image are determined through a template matching method;
the ellipse fitting module is used for performing dial area contour ellipse fitting on the instrument according to the second instrument center point and the contour scale points so as to obtain a dial area ellipse equation of the second instrument image;
the projection image determining module is used for calculating a yaw angle and a pitch angle of a shooting position of the instrument according to the dial area elliptic equation and determining a front projection image of the second instrument image according to the yaw angle and the pitch angle;
The reading identification module is used for determining a binarization picture and a rectangular scale image of a pointer of the instrument according to the front projection image and determining the reading of the pointer on the instrument according to the binarization picture and the rectangular scale image of the pointer;
wherein, dial plate parameter confirms the module and includes:
the image acquisition sub-module is used for acquiring the second instrument image and a second template instrument image, wherein the second template instrument image comprises a second template instrument center point and a template contour scale point;
a first computing sub-module for determining that the second meter image and the second template meter image are at different positions
Figure QLYQS_75
Matching correlation score at: />
Figure QLYQS_76
In the method, in the process of the invention,
Figure QLYQS_77
for the second template instrument image, < >>
Figure QLYQS_78
For being +.>
Figure QLYQS_79
Vertex (vertex) and (head) of the patient>
Figure QLYQS_80
Is a sliding window image with length and width, and +.>
Figure QLYQS_81
,/>
Figure QLYQS_82
The parameter determination submodule is used for determining a sliding window image when the matching correlation score is maximum, and determining a second instrument center point and a contour scale point according to the sliding window image, wherein the second instrument center point is a second template instrument center point, and the contour scale point is the template contour scale point.
CN202310127480.7A 2023-02-17 2023-02-17 Instrument reading identification method and system Active CN115841666B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310127480.7A CN115841666B (en) 2023-02-17 2023-02-17 Instrument reading identification method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310127480.7A CN115841666B (en) 2023-02-17 2023-02-17 Instrument reading identification method and system

Publications (2)

Publication Number Publication Date
CN115841666A CN115841666A (en) 2023-03-24
CN115841666B true CN115841666B (en) 2023-05-05

Family

ID=85579804

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310127480.7A Active CN115841666B (en) 2023-02-17 2023-02-17 Instrument reading identification method and system

Country Status (1)

Country Link
CN (1) CN115841666B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112613429A (en) * 2020-12-28 2021-04-06 上海智能制造系统创新中心有限公司 Machine vision-based reading method suitable for multi-view image pointer instrument
CN115512343A (en) * 2022-10-18 2022-12-23 中国人民解放军63796部队 Method for correcting and recognizing reading of circular pointer instrument

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4787584B2 (en) * 2004-09-27 2011-10-05 財団法人電力中央研究所 Analog meter automatic reading method, apparatus and program
CN107609557B (en) * 2017-08-24 2020-09-08 华中科技大学 Pointer instrument reading identification method
CN107590498B (en) * 2017-09-27 2020-09-01 哈尔滨工业大学 Self-adaptive automobile instrument detection method based on character segmentation cascade two classifiers
US11544916B2 (en) * 2019-11-13 2023-01-03 Battelle Energy Alliance, Llc Automated gauge reading and related systems, methods, and devices
CN111160256A (en) * 2019-12-30 2020-05-15 武汉科技大学 Automatic identification method and system for transformer substation pointer instrument
CN111814919A (en) * 2020-08-31 2020-10-23 江西小马机器人有限公司 Instrument positioning and identifying system based on deep learning
CN112508826B (en) * 2020-11-16 2022-03-01 哈尔滨工业大学(深圳) Printed matter defect detection method
CN113378814A (en) * 2021-06-09 2021-09-10 刘胜娃 Method and system for automatically identifying instrument
CN113408519B (en) * 2021-07-09 2023-07-18 深圳市铁越电气有限公司 Method and system for pointer instrument reading based on template rotation matching

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112613429A (en) * 2020-12-28 2021-04-06 上海智能制造系统创新中心有限公司 Machine vision-based reading method suitable for multi-view image pointer instrument
CN115512343A (en) * 2022-10-18 2022-12-23 中国人民解放军63796部队 Method for correcting and recognizing reading of circular pointer instrument

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Design of remote meter reading method for pointer type chemical instruments;SHI J等;《Process Automation Instrumentation》;全文 *

Also Published As

Publication number Publication date
CN115841666A (en) 2023-03-24

Similar Documents

Publication Publication Date Title
CN107609557B (en) Pointer instrument reading identification method
CN107767422B (en) Fisheye lens correction method and device and portable terminal
CN102810205B (en) The scaling method of a kind of shooting or photographic means
CN106408609B (en) A kind of parallel institution end movement position and posture detection method based on binocular vision
CN109816733A (en) Camera parameter initial method and device, camera parameter scaling method and equipment, image capturing system
CN105701827A (en) Method and device for jointly calibrating parameters of visible light camera and infrared camera
US11843865B2 (en) Method and device for generating vehicle panoramic surround view image
CN102622747B (en) Camera parameter optimization method for vision measurement
CN106529587A (en) Visual course identification method based on target point identification
CN112132908B (en) Camera external parameter calibration method and device based on intelligent detection technology
CN113190120B (en) Pose acquisition method and device, electronic equipment and storage medium
US20230379422A1 (en) Method for vehicle hinge point calibration and corresponding calibration apparatus, computer device, and storage medium
CN115841666B (en) Instrument reading identification method and system
CN114663505A (en) Target positioning method and related device
CN117557649A (en) Camera calibration method based on plane wire frame characteristics of tobacco retail terminal
CN111191596B (en) Closed area drawing method, device and storage medium
CN113781581B (en) Depth of field distortion model calibration method based on target loose attitude constraint
CN115307865A (en) Model deformation measurement method for high-temperature hypersonic flow field
CN115880171A (en) Method, medium and system for correcting full-fundus laser scanning image
CN115512343A (en) Method for correcting and recognizing reading of circular pointer instrument
CN115290008A (en) Angle calibration algorithm of image measurement collimator
JP3452188B2 (en) Tracking method of feature points in 2D video
CN113610086A (en) Reading correction method and device for vertical-scale pointer instrument and terminal equipment
CN102110292B (en) Zoom lens calibration method and device in virtual sports
CN116801100B (en) Calibration focal length verification method and device for binocular camera module in automatic driving system

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