CN115841666A - Instrument reading identification method and system - Google Patents

Instrument reading identification method and system Download PDF

Info

Publication number
CN115841666A
CN115841666A CN202310127480.7A CN202310127480A CN115841666A CN 115841666 A CN115841666 A CN 115841666A CN 202310127480 A CN202310127480 A CN 202310127480A CN 115841666 A CN115841666 A CN 115841666A
Authority
CN
China
Prior art keywords
instrument
image
meter
determining
template
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310127480.7A
Other languages
Chinese (zh)
Other versions
CN115841666B (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

Abstract

The invention provides a method and a system for recognizing meter reading, 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 ellipse fitting on the contour of the dial area of the instrument; calculating a yaw angle and a pitch angle of a shooting position of the instrument, and determining a front-view projection image of the second instrument image; the reading of the pointer on the instrument is determined, and the instrument reading identification method and the instrument reading identification system provided by the invention can identify the reading on the instrument 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 method and a system for identifying meter reading.
Background
The meter is an instrument or equipment for detecting, measuring, observing, and calculating various physical quantities, material components, physical parameters, and the like. In actual use, the meter is installed in a dangerous environment, that is, the meter is installed on a tall tower, in a narrow space or in a poor angle, and in the above situation, if the reading of the meter is simply manually read, the following problems are easily caused:
1. because the instrument is installed in a severe environment, the installation position of the instrument is difficult to reach by manpower and the reading action of the instrument is carried out;
2. because the installation angle of the instrument is indefinite, large errors are easy to exist when the reading of the instrument is manually read;
3. manual reading of meter readings is inefficient.
Disclosure of Invention
In order to solve the technical problems, the invention provides a method and a system for recognizing meter reading, which are used for solving the technical problems in the prior art.
In a first aspect, the present invention provides the following technical solutions, a method for identifying a meter reading, including:
acquiring a first instrument image of an instrument, and performing characteristic point affine transformation matrix correction on the first instrument image to calculate the integral offset between a first instrument central point in the first instrument image and a first template instrument central 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 the second instrument center point and the outline scale point of the second instrument image by a template matching method;
according to the center point of the second instrument and the contour scale points, carrying out dial area contour ellipse fitting on the instrument to obtain a dial area ellipse equation of the second instrument image;
calculating a yaw angle and a pitch angle of a shooting position of the instrument according to the dial plate area ellipse equation, and determining a front projection image of the second instrument image according to the yaw angle and the pitch angle;
and determining a binaryzation picture and a rectangular scale image of a pointer of the instrument according to the orthographic projection image, and determining the reading of the pointer on the instrument according to the binaryzation picture and the rectangular scale image of the pointer.
Compared with the prior art, the beneficial effects of the application are that: the method comprises the steps of calculating the overall offset between a first instrument center point in a first instrument image and a first template instrument center point in a first template instrument image, adjusting the position of a shooting device according to the overall offset to ensure that the first instrument center point corresponds to the first template instrument center point, so that when a second instrument image amplified by a preset multiple is shot subsequently, the instrument can be ensured to be presented in the second instrument image, subsequently, a second instrument center point and a contour scale point of the second instrument image are determined by a template matching method, and a dial area ellipse equation is obtained, so that various parameters of a dial area of the instrument can be obtained, then, a front view projection image of the second instrument image is determined according to a yaw angle and a pitch angle, and the reading of the instrument can be identified by determining an area of a pointer corresponding scale on the front view projection image.
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 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 located at the center of the first template instrument image.
Preferably, 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 by 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 template outline scale points;
determining that the second instrument image is in a different location than the second template instrument image
Figure SMS_1
The matching correlation score of (a):
Figure SMS_2
in the formula (I), the compound is shown in the specification,
Figure SMS_3
for the second template instrument image, ->
Figure SMS_4
For being in the second meter image>
Figure SMS_5
In the form of a vertex>
Figure SMS_6
Is a long and wide sliding window image 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 central point and a contour scale point according to the sliding window image, wherein the second instrument central point is a second template instrument central point, and the contour scale point is the template contour scale point.
Preferably, the step of performing a 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
And the maximum of said distance is taken as the major axis of the ellipse->
Figure SMS_10
The minimum of said distances being taken as the minor axis of the ellipse->
Figure SMS_11
According to the second instrument central point
Figure SMS_12
The long axis->
Figure SMS_13
The short axis->
Figure SMS_14
Determining an initial ellipse equation:
Figure SMS_15
in the formula (I), the compound is shown in the specification,
Figure SMS_16
is a rotation angle;
and 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.
Preferably, the step of calculating a fitting error of the initial elliptical equation according to the initial elliptical equation and determining a dial area elliptical equation of the second instrument image according to the fitting error includes:
according to the initial ellipse equation, calculating the fitting error of the initial ellipse equation:
Figure SMS_17
in the formula (I), the compound is shown in the specification,
Figure SMS_18
for the number of the contour graduation points, <' > H>
Figure SMS_19
Coordinates of the outline scale points;
sequentially updating the rotation angles
Figure SMS_20
The second meter centre point->
Figure SMS_21
And a major axis end point, a minor axis end point;
judging whether the fitting errors of all the contour scale points exceed an error threshold value or not, and if the fitting errors of the contour scale points exceed the error threshold value, rejecting 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 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 SMS_22
The distance between the first meter and the second meter to determine a dial area ellipse equation of the second meter image.
Preferably, the rotation angles are updated in sequence
Figure SMS_23
The second meter centre point->
Figure SMS_24
And the steps of the long axis end point and the short axis end point comprise:
fixing the second instrument center point
Figure SMS_25
The long axis->
Figure SMS_26
The short axis->
Figure SMS_27
In>
Figure SMS_28
Is selected within the angular range of->
Figure SMS_29
Such that the fitting error is minimized and passes &>
Figure SMS_30
Updating the rotation angle of the ellipse>
Figure SMS_31
Fixing the long shaft
Figure SMS_32
The short axis->
Figure SMS_33
In or on>
Figure SMS_34
Selecting on/off in the center searching range with the center as the radius and the first preset distance as the radius>
Figure SMS_35
Such that the fitting error is minimized and passes @>
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 within a long and short axis search range which takes the long axis endpoint and the short axis endpoint of the initial elliptic equation as the circle center and takes a second preset distance as the radius to minimize the fitting error, 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 the shooting position of the instrument according to the dial area ellipse equation, and determining the front view projection image of the second instrument image according to the yaw angle and the pitch angle includes:
and taking the central point of the dial area elliptic equation as an original point and carrying out rotation transformation matrix calculation:
Figure SMS_38
Figure SMS_39
Figure SMS_40
;/>
Figure SMS_41
in the formula (I), the compound is shown in the specification,
Figure SMS_44
for setting yaw angle>
Figure SMS_47
In a three-dimensional coordinate system, in a transformation matrix of three-dimensional coordinates, in a manner known per se>
Figure SMS_50
For setting the pitch angle>
Figure SMS_43
Is based on the transformation matrix of the three-dimensional coordinates, and->
Figure SMS_46
For setting the roll angle>
Figure SMS_49
Is based on the transformation matrix of the three-dimensional coordinates, and->
Figure SMS_51
For setting the yaw angle, is>
Figure SMS_42
For setting the pitch angle>
Figure SMS_45
For setting the roll angle, and>
Figure SMS_48
is 0;
determining the oval square of the dial areaTwo-dimensional coordinates of long axis end point and short axis end point of range
Figure SMS_52
And based on said two-dimensional coordinates->
Figure SMS_53
Calculating the distance between the long axis endpoint and the short 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
And the distance->
Figure SMS_57
Determining the three-dimensional coordinates of the long axis endpoint and the short 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 are used as the basis of
Figure SMS_60
The step of determining an orthographic projection image of the second meter image comprises:
according to the three-dimensional coordinates
Figure SMS_61
Performing an inverse operation of the rotation transformation matrix, calculating three-dimensional coordinates of a long axis endpoint and a short axis endpoint of the orthographic projection image of the second instrument image->
Figure SMS_62
Figure SMS_63
According to the three-dimensional coordinates
Figure SMS_64
Determining a long axis ≥ of the orthographic projection image>
Figure SMS_65
And the short shaft>
Figure SMS_66
Based on the major axis>
Figure SMS_67
And the short shaft->
Figure SMS_68
Determining a projection score;
determining the set yaw angle according to the dial area elliptic equation
Figure SMS_69
And the set pitch angle->
Figure SMS_70
And selecting an aircraft deviation angle ≥ within the correction search range>
Figure SMS_71
And the pitch angle>
Figure SMS_72
So that the projection score is maximized and is based on the yaw angle->
Figure SMS_73
And the pitch angle>
Figure SMS_74
And determining an orthographic projection image of the second instrument image.
Preferably, the step of determining a binarized picture and a rectangular scale image of the pointer of the meter according to the front-view projection image, and determining the reading of the pointer on the meter according to the binarized picture and the rectangular scale image of the pointer comprises:
determining a binarization picture of an area where a pointer of the instrument is located in the front-view projection image;
performing rectangular expansion on the binary image to obtain a rectangular scale image;
and carrying out binarization identification on the rectangular scale image to determine the reading of the pointer on the instrument.
In a second aspect, the present invention provides the following technical solutions, a meter reading recognition system, including:
the offset determining module is used for acquiring a first instrument image of an instrument, and performing feature point affine transformation matrix correction on the first instrument image to calculate the integral offset between a first instrument central point in the first instrument image and a first template instrument central point in a first template instrument image;
the dial plate parameter determining module is used for correcting the shooting position of the instrument according to the integral offset so as to enable the first instrument central point to correspond to the first template instrument central point, acquiring a second instrument image of the instrument, and determining the second instrument central point and the outline scale point of the second instrument image by a template matching method;
the ellipse fitting module is used for carrying out dial area outline ellipse fitting on the instrument according to the second instrument central point and the outline scale point 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 ellipse equation and determining a front view 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 binary image and a rectangular scale image of the pointer of the instrument according to the front-view projection image and determining the reading of the pointer on the instrument according to the binary image and the rectangular scale image of the pointer.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required to be used in the embodiments or the prior art description will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings may be obtained according to these drawings without inventive labor.
Fig. 1 is a first flowchart of a meter reading identification method according to a first embodiment of the present invention;
fig. 2 is a flowchart of a meter reading identification method according to a first embodiment of the present invention;
fig. 3 is a flow chart three of a meter reading identification method according to an embodiment of the present invention;
fig. 4 is a fourth flowchart of a meter reading identification method according to an embodiment of the present invention;
fig. 5 is a flowchart of a meter reading identification method according to an embodiment of the present invention;
fig. 6 is a sixth flowchart of a meter reading identification method according to an embodiment of the present invention;
fig. 7 is a seventh flowchart of a meter reading identification method according to an embodiment of the present invention;
fig. 8 is a flowchart eight of a meter reading identification method according to an embodiment of the present invention;
fig. 9 is a flowchart of a meter reading identification method according to an embodiment of the present invention;
fig. 10 is a block diagram of a structure of a meter reading recognition system according to a second embodiment of the present invention.
The embodiments of the present invention will be further described with reference to the accompanying drawings.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary and intended to be illustrative of the embodiments of the present 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 are used in the orientations and positional relationships indicated in the drawings only for the convenience of describing the embodiments of the present invention and to simplify the description, and are not intended to indicate or imply that the device or element so referred to must have a particular orientation, be constructed in a particular orientation, and be operated, and thus, are not to be construed as limiting the invention.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of the present invention, "a plurality" means two or more unless specifically limited otherwise.
In the embodiments of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," "fixed," and the like are to be construed broadly, e.g., as being fixedly connected, detachably connected, or integrated; can be mechanically or electrically connected; either directly or indirectly through intervening media, either internally or in any other relationship. Specific meanings of the above terms in the embodiments of the present invention can be understood by those of ordinary skill in the art according to specific situations.
Example one
As shown in fig. 1, in a first embodiment of the present invention, the present invention provides the following technical solutions, a meter reading identification method, including:
s1, obtaining a first instrument image of an instrument, and performing feature 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 shooting device to move to a preset navigation position, and the shooting device is used to shoot an optimal angle picture, namely a first instrument image, and meanwhile, in the shooting process, it is required to ensure that the instrument can be completely presented in the first instrument image.
As shown in fig. 2, wherein 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 and corresponding descriptors of a first instrument image and a first template instrument image are calculated by using an SIFT (Scale invariant feature transform) and a hotspot network model, wherein the key points are specifically various feature points in the first instrument image and the first template instrument image, and the descriptors are specifically feature descriptions of various feature points in the first instrument image and the first template instrument image;
s12, 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;
specifically, after the key points and the corresponding description points are calculated, similarity matching is performed on the key points and the corresponding description points, corresponding matching scores can be calculated according to the matching degrees, the higher the matching score is, the higher the similarity between the first instrument image and the first template instrument image is, and the similarity not only refers to the similarity between various elements in the first instrument image and the first template instrument image, but also includes the similarity of positions of the various elements in the images;
s13, obtaining 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 according to the matching score, wherein the first template instrument center point is located at the center of the first template instrument image;
specifically, after the corresponding matching score is calculated, an affine transformation matrix M is calculated by using a ransac method, so that 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 can be calculated;
it is worth mentioning that the first instrument center point is a position of the instrument in the first instrument image, the first template instrument center point is a position of the instrument in the first template instrument image, the first template instrument image is a template image shot by the robot at a preset navigation position which is the same as the position of shooting the first instrument image, a certain deviation can exist between the first instrument image and the first template instrument image due to a motion error of the robot and a shooting error of the camera, that is, 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 position error between the first instrument image and the first template instrument image needs to be calculated in step S1, and the first template instrument center point is located at a 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 the shooting correction in the subsequent steps can be facilitated.
S2, correcting the shooting position of the instrument according to the integral offset so as to enable the first instrument center point to correspond to the first template instrument center point, acquiring a second instrument image of the instrument, and determining the second instrument center point and the outline scale point of the second instrument image through a template matching method;
specifically, the position and the angle of the shooting device are adjusted through the overall 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, and thus it can be ensured that the instrument can be correctly presented on the second instrument image when the second instrument image amplified by the preset magnification is subsequently shot, if the shooting device is not corrected, only a partial image or an image without the instrument is presented on the finally shot second instrument image, which is inconvenient for subsequent reading identification, and the first instrument image is an initial image shot by the shooting device, and the second instrument image is an amplified image shot by the shooting device by the preset magnification.
As shown in fig. 3, wherein 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 template contour scale points;
specifically, the second template instrument image is similar to the first template instrument image and is an ideal image shot by the shooting device, that is, parameters such as the shooting position and the angle of the shooting device are the same as ideal shooting parameters when the second instrument image is shot, and a center point and a scale point which are manually calibrated, that is, a center point of the second template instrument and a scale point of the template outline are attached to the second template instrument image;
s22, determining that the second instrument image and the second template instrument image are in different positions
Figure SMS_75
The matching correlation score of (a):
Figure SMS_76
in the formula (I), the compound is shown in the specification,
Figure SMS_77
for the second template instrument image, ->
Figure SMS_78
For being in the second meter image>
Figure SMS_79
Is a peak and is based on>
Figure SMS_80
Is a long and wide sliding window image and->
Figure SMS_81
,/>
Figure SMS_82
In particular, the method comprises the following steps of,
Figure SMS_83
is to be ^ based on in the second meter image>
Figure SMS_84
Is a peak and is based on>
Figure SMS_85
Is a long and wide sliding window image which is fixed in size but is positioned according to the vertex->
Figure SMS_86
Wherein the calculated matching correlation score represents the degree of matching of the sliding window image with the second template meter image, and the higher the matching correlation score, the higher the degree of matching of the sliding window image with the second template meter image;
s23, determining a sliding window image when the matching correlation score is maximum, and determining a second instrument central point and a contour scale point according to the sliding window image, wherein the second instrument central point is a second template instrument central point, and the contour scale point is the template contour scale point;
specifically, when the matching correlation score is the maximum, that is, it represents that the sliding window image almost completely corresponds to the second template instrument image, where the instrument is also located at the center position of the sliding window image, 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 from 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, according to the center point of the second instrument and the contour scale points, carrying out dial area contour ellipse fitting on the instrument to obtain a dial area ellipse equation of the second instrument image;
specifically, due to the limitation of the shooting angle and the shooting position, the shot image of the meter area is in an elliptical shape, and the actual area of the meter is in a perfect circle shape, so in the step, the contour ellipse fitting is performed on the dial area, and a corresponding dial area elliptical equation is obtained, so that the dial area is projected into the perfect circle shape in the following step, and reading identification is performed.
As shown in fig. 4, specifically, the step S3 includes:
s31, calculating all the contour scale points and the center point of the second instrument
Figure SMS_87
And taking the maximum of said distance as the major axis of the ellipse>
Figure SMS_88
The minimum of said distances being taken as the minor axis of the ellipse->
Figure SMS_89
Specifically, due to the property of the ellipse, which includes the major axis and the minor axis, in this step, the maximum distance between the outline scale point and the center point of the second meter is taken as the length of the major axis, and the minimum distance between the outline 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 meanwhile, the end point positions of the major axis and the minor axis can also be obtained from the outline scale point, so that the initial ellipse equation can be determined according to the known conditions;
s32, according to the center point of the second instrument
Figure SMS_90
The long axis->
Figure SMS_91
The short axis->
Figure SMS_92
Determining an initial ellipse equation:
Figure SMS_93
in the formula (I), the compound is shown in the specification,
Figure SMS_94
is a rotation angle;
specifically, the rotation angle of the ellipse is an angle between the major axis of the ellipse and the X axis in a two-dimensional coordinate system established according to the center point of the second instrument;
s33, calculating a fitting error of the initial elliptic equation according to the initial elliptic equation, and determining a dial area elliptic equation of the second instrument image according to the fitting error;
specifically, the contour scale point and the second instrument central point are manually calibrated, so that a certain error exists between an initial elliptic equation calculated according to the contour scale point and the second instrument central point and an actual dial area elliptic equation, the initial elliptic equation can be gradually updated through calculating the fitting error of the initial elliptic equation and the error until a stable dial area elliptic equation is obtained.
As shown in fig. 5, wherein the step S33 includes:
s331, calculating a fitting error of the initial ellipse equation according to the initial ellipse equation:
Figure SMS_95
in the formula (I), the compound is shown in the specification,
Figure SMS_96
for the number of the contour graduation points, <' > H>
Figure SMS_97
Coordinates of the outline scale points;
s332, updating the rotation angles in sequence
Figure SMS_98
The second meter centre point->
Figure SMS_99
And a major axis end point, a minor axis end point;
as shown in fig. 6, wherein the S332 includes:
s3321, fixing the center point of the second instrument
Figure SMS_100
The long axis->
Figure SMS_101
The short axis->
Figure SMS_102
In a
Figure SMS_103
Is selected within an angular range of->
Figure SMS_104
Such that the fitting error is minimized and passes @>
Figure SMS_105
Updating the rotation angle of the ellipse->
Figure SMS_106
Specifically, in this step, the rotation angle is varied
Figure SMS_107
Dividing an angle range for the intermediate value and dividing the value in the angle rangeAll values are substituted into the calculation formula of the fitting error and are selected ^ 4>
Figure SMS_108
So that the fitting error is minimal and will finally +>
Figure SMS_109
Substituted into the initial elliptical equation and replaces the initial angle of rotation>
Figure SMS_110
To complete the rotation angle>
Figure SMS_111
Updating of (3);
s3322, fixing the long shaft
Figure SMS_112
The short axis->
Figure SMS_113
In or on>
Figure SMS_114
Selecting on/off in the center searching range with the center as the radius and the first preset distance as the radius>
Figure SMS_115
Such that the fitting error is minimized and passes @>
Figure SMS_116
Updating the second meter centre point->
Figure SMS_117
In particular, after updating the rotation angle
Figure SMS_118
Then, continuing to update the center point of the second instrument, determining a center search range by taking the center point of the second instrument as the center of a circle and the first preset distance as the radius, substituting all points in the center search range into a calculation formula of the fitting errorAnd selecting >>
Figure SMS_119
So that the fitting error is minimized, and finally will be
Figure SMS_120
Substituted into the initial elliptical equation to replace the initial second meter center point +>
Figure SMS_121
To complete the second meter centre point->
Figure SMS_122
Updating of (3);
s3323, selecting a fitting long axis end point and a fitting short axis end point in a long and short axis search range with the long axis end point and the short axis end point of the initial elliptic equation as the circle center and a second preset distance as the radius to minimize the fitting error, and updating the long axis end point and the short axis end point through the fitting long axis end point and the fitting short axis end point;
in particular, after updating the second instrument center point
Figure SMS_123
Then, the major and minor axis updates continue and the second meter center point &'s updated>
Figure SMS_124
Similarly, a major axis search radius and a minor axis search radius are determined respectively by taking a major axis endpoint and a minor axis endpoint as circle centers and a second preset distance as a radius, all points in the major axis and minor axis radius are substituted into a calculation formula of a fitting error, a fitting major axis endpoint and a fitting minor axis endpoint are selected to minimize the fitting error, and finally the fitting major axis endpoint and the fitting minor axis endpoint are substituted into an initial elliptic equation to replace the initial major axis endpoint and the initial minor axis endpoint so as to finish the updating of the major axis and the minor axis.
S333, 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, rejecting the contour scale points with the fitting errors exceeding the error threshold value;
specifically, because the manually calibrated contour scale points have large errors, the contour scale points with the calculated fitting errors exceeding the error threshold value need to be removed to ensure that the initial elliptic equation calculated by the final contour scale points approaches to the final dial area elliptic equation;
s334, taking the contour scale points with the fitting errors not exceeding the error threshold as input values of the next iteration, and returning to execute the calculation of all the contour scale points and the second instrument central point
Figure SMS_125
The distance between the first meter and the second meter to determine a dial area ellipse equation of the second meter image.
Specifically, the contour scale point with the fitting error not exceeding the error threshold is used as an input value of the next iteration, the input value is used as an initial value, the initial elliptic equation is determined continuously, and the process is repeated, so that the initial elliptic equation tends to be stable until a stable dial area ellipse is obtained.
S4, calculating a yaw angle and a pitch angle of the shooting position of the instrument according to the dial plate area ellipse equation, and determining an orthographic projection image of the second instrument image according to the yaw angle and the pitch angle;
specifically, since the angle and position of the shooting device are different, the shot second meter image is not a front view image, and therefore it is necessary to obtain a front view projection image of the second meter image by calculating the yaw angle and pitch angle of the shooting device, that is, the yaw angle and pitch angle of the shooting position of the meter, and performing the inverse operation of the rotation matrix to turn back to the front view angle of the dial.
As shown in fig. 7, wherein 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 formula (I), the compound is shown in the specification,
Figure SMS_131
for setting the yaw angle->
Figure SMS_133
Is based on the transformation matrix of the three-dimensional coordinates, and->
Figure SMS_138
For setting the pitch angle>
Figure SMS_132
In a three-dimensional coordinate system, in a transformation matrix of three-dimensional coordinates, in a manner known per se>
Figure SMS_134
For setting the roll angle>
Figure SMS_136
Is based on the transformation matrix of the three-dimensional coordinates, and->
Figure SMS_139
For setting the yaw angle, is>
Figure SMS_130
For setting the pitch angle>
Figure SMS_135
For setting the roll angle, and>
Figure SMS_137
is 0;
in particular, the reverse rotationTransformed into a transformation matrix of
Figure SMS_140
And because under the initial setting condition of the shooting equipment, the roll angle is set to be 0;
s42, determining two-dimensional coordinates of a major axis endpoint and a minor axis endpoint of the dial area ellipse equation
Figure SMS_141
And based on said two-dimensional coordinates->
Figure SMS_142
Calculating the distance between the long axis endpoint and the short 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
And the distance->
Figure SMS_146
Determining the three-dimensional coordinates of the long axis endpoint and the short axis endpoint of the dial area ellipse equation>
Figure SMS_147
;/>
Specifically, by determining three-dimensional coordinates of a major axis endpoint and a minor axis endpoint of a dial area elliptic equation and performing inverse operation of a rotation matrix on the three-dimensional coordinates, an orthographic projection image converted back to an orthographic view angle can be obtained;
s44, according to the three-dimensional coordinates
Figure SMS_148
Determining an orthographic projection image of the second instrument image;
as shown in fig. 8, wherein the step S44 includes:
s441, according to the three-dimensional coordinates
Figure SMS_149
Performing an inverse operation of a rotation transformation matrix, calculating three-dimensional coordinates of a long axis endpoint and a short axis endpoint of the orthographic projection image of the second instrument image>
Figure SMS_150
Figure SMS_151
Specifically, three-dimensional coordinates of a long axis end point and a short axis end point of the orthographic projection image are calculated
Figure SMS_152
Then, an image similar to a perfect circle is formed between the end point of the long axis and the end point of the short axis, and the image is an initial orthographic projection image;
s442, according to the three-dimensional coordinates
Figure SMS_153
Determining a long axis ≥ of the orthographic projection image>
Figure SMS_154
And the minor axis>
Figure SMS_155
Based on the major axis>
Figure SMS_156
And the short shaft->
Figure SMS_157
The ratio therebetween determines a projection score;
specifically, in the initial orthographic projection image acquired 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 by the projection score, and therefore the projection score is determined according to the major axis
Figure SMS_158
And the short axis>
Figure SMS_159
When said long axis &'s is greater than or equal to>
Figure SMS_160
And the short axis>
Figure SMS_161
When the ratio between the two approaches to 1, the higher the projection score is, namely the initial orthographic projection image approaches to a perfect circle structure, namely approaches to a real orthographic projection image;
s443, determining the set yaw angle according to the dial area elliptic equation
Figure SMS_162
And the set pitch angle->
Figure SMS_163
And selecting an aircraft deviation angle ≥ within the correction search range>
Figure SMS_164
And angle of pitch>
Figure SMS_165
So that the projection score is maximized and is based on the yaw angle->
Figure SMS_166
And the pitch angle->
Figure SMS_167
Determining an orthographic projection image of the second instrument image;
specifically, selecting the yaw angle in the correction search range
Figure SMS_168
And angle of pitch>
Figure SMS_169
The projection score is maximized, so that the obtained orthographic projection image approaches to a perfect circle, namely approaches to an orthographic image of the instrument;
meanwhile, when determining the correction search range, the rotation angle is set
Figure SMS_170
As the set yaw angle->
Figure SMS_171
And the set pitch angle->
Figure SMS_172
And at [ sample _ x, sample _ y ] of]Sample _ x and sample _ y in the sample group satisfy { [ MEANS ]) } respectively>
Figure SMS_173
,/>
Figure SMS_174
Calculates the projection score of each sample group and finds the angle at which the projection score is highest->
Figure SMS_175
And substituting it into three-dimensional coordinates->
Figure SMS_176
And re-determining the front-view projection image to obtain the front-view projection image approaching to a perfect circle.
S5, determining a binary image and a rectangular scale image of a pointer of the instrument according to the front-view projection image, and determining the reading of the pointer on the instrument according to the binary image and the rectangular scale image of the pointer;
as shown in fig. 9, wherein the step S5 includes:
s51, determining a binarization picture of an area where a pointer of the instrument is located in the front-view projection image;
the binary image comprises a pointer and a scale area pointed by the pointer, and other parameter information does not need to be embodied in the binary image;
s52, performing rectangular expansion on the binary image to obtain a rectangular scale image;
specifically, the binary image is an annular image which may not be convenient for reading, and the annular image is subjected to rectangular expansion to obtain a rectangular scale image containing the pointer and scale information pointed by the pointer;
s53, performing binarization identification on the rectangular scale image to determine the reading of the pointer on the instrument;
specifically, binary identification is carried out on the expanded rectangular scale image 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 embodiment has the advantages that: the method comprises the steps of calculating the overall offset between a first instrument center point in a first instrument image and a first template instrument center point in a first template instrument image, adjusting the position of a shooting device according to the overall offset to ensure that the first instrument center point corresponds to the first template instrument center point, so that when a second instrument image amplified by a preset multiple is shot subsequently, the instrument can be ensured to be presented in the second instrument image, subsequently, a second instrument center point and a contour scale point of the second instrument image are determined by a template matching method, and a dial area ellipse equation is obtained, so that various parameters of a dial area of the instrument can be obtained, then, an orthographic projection image of the second instrument image is determined according to a yaw angle and a pitch angle, and the reading of the instrument can be recognized by determining the area of a pointer corresponding scale on the orthographic projection image.
Example two
As shown in fig. 10, in a second embodiment of the present invention, there is provided a meter reading identification system, including:
the offset determining module 10 is configured to obtain a first instrument image of an instrument, and perform feature point affine transformation matrix correction on the first instrument image to calculate an overall 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;
a dial parameter determining module 20, configured to correct a 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 by using a template matching method;
the ellipse fitting module 30 is configured to perform ellipse fitting on the dial area contour of the instrument according to the center point of the second instrument and the contour scale point to obtain a dial area ellipse equation of the second instrument image;
the projection image determining module 40 is used for calculating a yaw angle and a pitch angle of a shooting position of the instrument according to the dial area ellipse equation and determining a front view projection image of the second instrument image according to the yaw angle and the pitch angle;
and the reading identification module 50 is configured to determine a binary image and a rectangular scale image of the pointer of the instrument according to the front-view projection image, and determine a reading of the pointer on the instrument according to the binary image 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 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;
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 submodule is used for obtaining the integral offset between a first instrument central point in the first instrument image and a first template instrument central point in a first template instrument image according to the matching score, wherein the first template instrument central point is positioned in the central position of the first template instrument image.
The dial parameter determination module 20 includes:
the image acquisition submodule is used for acquiring a second instrument image and a second template instrument image, and the second template instrument image comprises a second template instrument center point and template outline scale points;
a first computation submodule for determining that the second instrument image and the second template instrument image are at different locations
Figure SMS_177
The matching correlation score of (a):
Figure SMS_178
in the formula (I), the compound is shown in the specification,
Figure SMS_179
for the second template instrument image, ->
Figure SMS_180
For being in the second meter image>
Figure SMS_181
Is a peak and is based on>
Figure SMS_182
Is a long wide sliding window image and->
Figure SMS_183
,/>
Figure SMS_184
And the parameter determining submodule is used for determining a sliding window image when the matching correlation score is maximum, and determining a second instrument central point and a contour scale point according to the sliding window image, wherein the second instrument central point is a second template instrument central point, and the contour scale point is the template contour scale point.
The ellipse fitting module 30 includes:
a second calculation submodule for calculating all the contour scale points and the second instrument center point
Figure SMS_185
And the maximum of said distance is taken as the major axis of the ellipse->
Figure SMS_186
The minimum value of the distance is taken as the minor axis of the ellipse
Figure SMS_187
An ellipse determination submodule for determining the ellipse from the second instrument center point
Figure SMS_188
The long axis->
Figure SMS_189
The minor axis>
Figure SMS_190
Determining an initial ellipse equation:
Figure SMS_191
in the formula (I), the compound is shown in the specification,
Figure SMS_192
is a rotation angle;
and the fitting error calculation submodule 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 comprises:
a fitting error calculation unit, configured to calculate a fitting error of the initial elliptical equation according to the initial elliptical equation:
Figure SMS_193
;/>
in the formula (I), the compound is shown in the specification,
Figure SMS_194
for the number of the contour graduation points, <' > H>
Figure SMS_195
Coordinates of the outline scale points;
an updating unit for sequentially updating the rotation angles
Figure SMS_196
Said second meter center point>
Figure SMS_197
And a major axis end point, a minor axis end point;
the judging unit is used for judging whether the fitting errors of all the contour scale points exceed an error threshold value or not, and if the fitting errors of the contour scale points exceed the error threshold value, rejecting the contour scale points with the fitting errors exceeding the error threshold value;
an execution unit, configured to use the contour scale points whose fitting errors do not exceed the error threshold as input values of the next iteration, and return to execute the calculation of all the contour scale points and the second meter center point
Figure SMS_198
A step of determining a dial area ellipse equation of the second instrument image;
the update unit includes:
a first updating subunit for fixing the second instrument center point
Figure SMS_199
The long axis->
Figure SMS_200
The short axis->
Figure SMS_201
In>
Figure SMS_202
Is selected within the angular range of->
Figure SMS_203
Such that the fitting error is minimized and passes @>
Figure SMS_204
Updating the rotation angle of the ellipse->
Figure SMS_205
A second update subunit for fixing the long shaft
Figure SMS_206
The short axis->
Figure SMS_207
In or on>
Figure SMS_208
Is selected in a center search range with the center as the circle center and the first preset distance as the radius>
Figure SMS_209
Such that the fitting error is minimized and passes @>
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 within a long and short axis search range which takes the long axis endpoint and the short axis endpoint of the initial elliptic equation as the circle center and takes a second preset distance as the 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 submodule 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 formula (I), the compound is shown in the specification,
Figure SMS_217
for setting the yaw angle->
Figure SMS_220
Is based on the transformation matrix of the three-dimensional coordinates, and->
Figure SMS_224
For setting the pitch angle>
Figure SMS_218
Is based on the transformation matrix of the three-dimensional coordinates, and->
Figure SMS_221
For setting a rolling angle>
Figure SMS_223
Is based on the transformation matrix of the three-dimensional coordinates, and->
Figure SMS_225
For setting the yaw angle, is>
Figure SMS_216
For setting the pitch angle>
Figure SMS_219
For setting the roll angle, and>
Figure SMS_222
is 0;
a distance determination submodule for determining two-dimensional coordinates of the major axis end point and the minor axis end point of the dial area ellipse equation
Figure SMS_226
And based on said two-dimensional coordinates->
Figure SMS_227
Calculating the distance between the long axis endpoint and the short axis endpoint of the elliptic equation of the dial area in the Z-axis direction>
Figure SMS_228
Figure SMS_229
A coordinate determination submodule for determining a coordinate based on the two-dimensional coordinates
Figure SMS_230
And the distance->
Figure SMS_231
Determining the three-dimensional coordinates of the long axis endpoint and the short axis endpoint of the dial area ellipse equation>
Figure SMS_232
A projection image determination submodule for determining a three-dimensional coordinate from the three-dimensional coordinates
Figure SMS_233
Determining the secondAn orthographic projection image of the meter image.
Wherein the projection image determination sub-module comprises:
an inverse operation unit for calculating the three-dimensional coordinates
Figure SMS_234
Performing an inverse operation of the rotation transformation matrix to calculate three-dimensional coordinates of a major axis end point and a minor axis end point of the orthographic projection image of the second meter image
Figure SMS_235
Figure SMS_236
A projection score determining unit for determining a projection score based on the three-dimensional coordinates
Figure SMS_237
Determining a long axis ≥ of the orthographic projection image>
Figure SMS_238
And the short shaft>
Figure SMS_239
Based on the major axis>
Figure SMS_240
And the short shaft->
Figure SMS_241
The ratio therebetween determines a projection score;
a front-view projection image determining unit for determining the set yaw angle according to the dial area ellipse equation
Figure SMS_242
And the set pitch angle->
Figure SMS_243
And selecting an aircraft deviation angle ≥ within the correction search range>
Figure SMS_244
Angle of elevation
Figure SMS_245
So that the projection score is maximized and is based on the yaw angle->
Figure SMS_246
And the pitch angle->
Figure SMS_247
And determining an orthographic projection image of the second instrument image.
The reading recognition module 50 includes:
the picture determining submodule is used for determining a binary picture of an area where a pointer of the instrument is located in the front-view projection image;
the picture expansion submodule is used for carrying out rectangular expansion on the binary picture to obtain a rectangular scale image;
and the reading identification submodule 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 embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method of meter reading identification, the method comprising:
acquiring a first instrument image of an instrument, and performing characteristic point affine transformation matrix correction on the first instrument image to calculate the integral offset between a first instrument central point in the first instrument image and a first template instrument central point in a first template instrument image;
correcting the shooting position of the instrument according to the integral offset so as to enable the first instrument center point to correspond to the first template instrument center point, acquiring a second instrument image of the instrument, and determining the second instrument center point and the outline scale point of the second instrument image by a template matching method;
according to the center point of the second instrument and the contour scale points, carrying out dial area contour ellipse fitting on the instrument to obtain a dial area ellipse equation of the second instrument image;
calculating a yaw angle and a pitch angle of a shooting position of the instrument according to the dial plate area ellipse equation, and determining a front projection image of the second instrument image according to the yaw angle and the pitch angle;
and determining a binaryzation picture and a rectangular scale image of a pointer of the instrument according to the orthographic projection image, and determining the reading of the pointer on the instrument according to the binaryzation picture and the rectangular scale image of the pointer.
2. The meter reading identification method according to claim 1, wherein the step of obtaining a first meter image of the 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 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 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 located at the center of the first template instrument image.
3. The meter reading identification method of claim 1, wherein the step of acquiring a second meter image of the meter and determining a second meter center point and a contour scale point of the second meter image by a template matching method comprises:
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 template outline scale points;
determining that the second instrument image is in a different location than the second template instrument image
Figure QLYQS_1
The matching correlation score of (a):
Figure QLYQS_2
in the formula (I), the compound is shown in the specification,
Figure QLYQS_3
is the second template instrument image and is,
Figure QLYQS_4
in the second meter image
Figure QLYQS_5
Is a vertex,
Figure QLYQS_6
Is a long and wide sliding window image, 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 central point and a contour scale point according to the sliding window image, wherein the second instrument central point is a second template instrument central point, and the contour scale point is the template contour scale point.
4. The meter reading identification method of claim 1, wherein the step of performing a 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 comprises:
calculating all the contour scale points and the second instrument center point
Figure QLYQS_9
And the maximum value of said distance is taken as the major axis of the ellipse
Figure QLYQS_10
The minimum value of the distance is taken as the minor axis of the ellipse
Figure QLYQS_11
According to the second instrument center point
Figure QLYQS_12
The long shaft
Figure QLYQS_13
The short shaft
Figure QLYQS_14
Determining an initial ellipse equation:
Figure QLYQS_15
in the formula (I), the compound is shown in the specification,
Figure QLYQS_16
is a rotation angle;
and 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.
5. The meter reading identification method of claim 4, wherein the step of calculating a fitting error of the initial elliptical equation based on the initial elliptical equation and determining a dial area elliptical equation of the second meter image based on the fitting error comprises:
according to the initial ellipse equation, calculating the fitting error of the initial ellipse equation:
Figure QLYQS_17
in the formula (I), the compound is shown in the specification,
Figure QLYQS_18
as to the number of said contour graduation points,
Figure QLYQS_19
coordinates of the outline scale points;
sequentially updating the rotation angles
Figure QLYQS_20
The second instrument center point
Figure QLYQS_21
And end point of long axis, shortAn axial end point;
judging whether the fitting errors of all the contour scale points exceed an error threshold value or not, and if the fitting errors of the contour scale points exceed the error threshold value, rejecting 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 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
The second meter image to determine a dial area ellipse equation for the second meter image.
6. The meter reading identification method according to claim 5, wherein the sequentially updating the rotation angles
Figure QLYQS_23
The second instrument center point
Figure QLYQS_24
And the steps of the long axis end point and the short axis end point comprise:
fixing the second instrument center point
Figure QLYQS_25
The long shaft
Figure QLYQS_26
The short shaft
Figure QLYQS_27
In a
Figure QLYQS_28
Is selected within the range of angles
Figure QLYQS_29
So that the fitting error is minimized and passes
Figure QLYQS_30
Updating the rotation angle of the ellipse
Figure QLYQS_31
Fixing the long shaft
Figure QLYQS_32
The short shaft
Figure QLYQS_33
In the following
Figure QLYQS_34
Selecting the center as the center of a circle and the first preset distance as the radius
Figure QLYQS_35
So that the fitting error is minimized and passes
Figure QLYQS_36
Updating the second meter center point
Figure QLYQS_37
And selecting a fitting long axis endpoint and a fitting short axis endpoint within a long and short axis search range which takes the long axis endpoint and the short axis endpoint of the initial elliptic equation as the circle center and takes a second preset distance as the radius to minimize the fitting error, and updating the long axis endpoint and the short axis endpoint through the fitting long axis endpoint and the fitting short axis endpoint.
7. The meter reading identification method according to claim 1, wherein the step of calculating a yaw angle and a pitch angle of the photographed position of the meter based on the dial area ellipse equation, and determining the orthographic projection image of the second meter image based on the yaw angle and the pitch angle comprises:
and taking the central point of the dial area elliptic equation as an original point and performing rotation transformation matrix calculation:
Figure QLYQS_38
Figure QLYQS_39
Figure QLYQS_40
Figure QLYQS_41
in the formula (I), the compound is shown in the specification,
Figure QLYQS_44
for setting yaw angle
Figure QLYQS_47
Is determined by the transformation matrix of the three-dimensional coordinates of (a),
Figure QLYQS_50
to set pitch angle
Figure QLYQS_43
Is determined by the transformation matrix of the three-dimensional coordinates of (a),
Figure QLYQS_46
to set the roll angle
Figure QLYQS_49
Is determined by the transformation matrix of the three-dimensional coordinates of (a),
Figure QLYQS_51
in order to set the yaw angle,
Figure QLYQS_42
in order to set the pitch angle,
Figure QLYQS_45
to set the roll angle, and
Figure QLYQS_48
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 plate area elliptic equation in the Z-axis direction
Figure QLYQS_54
Figure QLYQS_55
According to the two-dimensional coordinates
Figure QLYQS_56
And distance
Figure QLYQS_57
Determining the three-dimensional coordinates of the major axis end point and the minor axis end point 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.
8. The meter reading identification of claim 7Method, characterized in that said method is based on said three-dimensional coordinates
Figure QLYQS_60
The step of determining an orthographic projection image of the second meter image comprises:
according to the three-dimensional coordinates
Figure QLYQS_61
Performing an inverse operation of the rotation transformation matrix to calculate three-dimensional coordinates of a major axis end point and a minor axis end point of the orthographic projection image of the second meter image
Figure QLYQS_62
Figure QLYQS_63
According to the three-dimensional coordinates
Figure QLYQS_64
Determining a long axis of the orthographic projection image
Figure QLYQS_65
And short shaft
Figure QLYQS_66
According to the long axis
Figure QLYQS_67
And the short shaft
Figure QLYQS_68
The ratio therebetween determines a projection score;
determining the set yaw angle according to the dial area elliptic equation
Figure QLYQS_69
And the set pitch angle
Figure QLYQS_70
And selecting an aircraft yaw angle in the correction search range
Figure QLYQS_71
Angle of elevation
Figure QLYQS_72
To maximize the projection score, and according to the yaw angle
Figure QLYQS_73
And the pitch angle
Figure QLYQS_74
And determining an orthographic projection image of the second instrument image.
9. The meter reading identification method according to claim 1, wherein the step of determining the binarized picture and rectangular scale image of the pointer of the meter according to the orthographic projection image, and determining the reading of the pointer on the meter according to the binarized picture and rectangular scale image of the pointer comprises:
determining a binarization picture of an area where a pointer of the instrument is located in the front-view projection image;
performing rectangular expansion on the binary image to obtain a rectangular scale image;
and carrying out binarization identification on the rectangular scale image to determine the reading of the pointer on the instrument.
10. A meter reading identification system, the system comprising:
the offset determining module is used for acquiring a first instrument image of an instrument, and performing feature point affine transformation matrix correction on the first instrument image to calculate the integral offset between a first instrument central point in the first instrument image and a first template instrument central point in a first template instrument image;
the dial plate parameter determining module is used for correcting the shooting position of the instrument according to the integral offset so as to enable the first instrument central point to correspond to the first template instrument central point, acquiring a second instrument image of the instrument, and determining the second instrument central point and the outline scale point of the second instrument image by a template matching method;
the ellipse fitting module is used for carrying out dial area outline ellipse fitting on the instrument according to the second instrument central point and the outline scale point 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 ellipse equation and determining a front view 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 binary image and a rectangular scale image of the pointer of the instrument according to the front-view projection image and determining the reading of the pointer on the instrument according to the binary image and the rectangular scale image of the pointer.
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 true CN115841666A (en) 2023-03-24
CN115841666B 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 (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006120133A (en) * 2004-09-27 2006-05-11 Central Res Inst Of Electric Power Ind Automatic reading method, device, and program for analog meter
CN107609557A (en) * 2017-08-24 2018-01-19 华中科技大学 A kind of readings of pointer type meters recognition methods
US20190095739A1 (en) * 2017-09-27 2019-03-28 Harbin Institute Of Technology Adaptive Auto Meter Detection Method based on Character Segmentation and Cascade Classifier
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
CN112508826A (en) * 2020-11-16 2021-03-16 哈尔滨工业大学(深圳) Printed matter defect detection method based on feature registration and gradient shape matching fusion
CN112613429A (en) * 2020-12-28 2021-04-06 上海智能制造系统创新中心有限公司 Machine vision-based reading method suitable for multi-view image pointer instrument
US20210142102A1 (en) * 2019-11-13 2021-05-13 Battelle Energy Alliance, Llc Automated gauge reading and related systems, methods, and devices
CN113378814A (en) * 2021-06-09 2021-09-10 刘胜娃 Method and system for automatically identifying instrument
CN113408519A (en) * 2021-07-09 2021-09-17 深圳市铁越电气有限公司 Method and system for reading pointer instrument based on template rotation matching
CN115512343A (en) * 2022-10-18 2022-12-23 中国人民解放军63796部队 Method for correcting and recognizing reading of circular pointer instrument

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006120133A (en) * 2004-09-27 2006-05-11 Central Res Inst Of Electric Power Ind Automatic reading method, device, and program for analog meter
CN107609557A (en) * 2017-08-24 2018-01-19 华中科技大学 A kind of readings of pointer type meters recognition methods
US20190095739A1 (en) * 2017-09-27 2019-03-28 Harbin Institute Of Technology Adaptive Auto Meter Detection Method based on Character Segmentation and Cascade Classifier
US20210142102A1 (en) * 2019-11-13 2021-05-13 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
CN112508826A (en) * 2020-11-16 2021-03-16 哈尔滨工业大学(深圳) Printed matter defect detection method based on feature registration and gradient shape matching fusion
CN112613429A (en) * 2020-12-28 2021-04-06 上海智能制造系统创新中心有限公司 Machine vision-based reading method suitable for multi-view image pointer instrument
CN113378814A (en) * 2021-06-09 2021-09-10 刘胜娃 Method and system for automatically identifying instrument
CN113408519A (en) * 2021-07-09 2021-09-17 深圳市铁越电气有限公司 Method and system for reading pointer instrument based on template rotation matching
CN115512343A (en) * 2022-10-18 2022-12-23 中国人民解放军63796部队 Method for correcting and recognizing reading of circular pointer instrument

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
SHI J等: "Design of remote meter reading method for pointer type chemical instruments", 《PROCESS AUTOMATION INSTRUMENTATION》 *
全燕鸣;凌泉;: "基于几何对称性的椭圆拟合算法" *
牛晓霞;胡正平;杨苏;: "局部PCA参数约束的Hough多椭圆分层检测算法" *

Also Published As

Publication number Publication date
CN115841666B (en) 2023-05-05

Similar Documents

Publication Publication Date Title
CN107609557B (en) Pointer instrument reading identification method
JP5385105B2 (en) Image search method and system
CN101303768B (en) Method for correcting circle center error of circular index point when translating camera perspective projection
CN108510551B (en) Method and system for calibrating camera parameters under long-distance large-field-of-view condition
CN102622747B (en) Camera parameter optimization method for vision measurement
CN101311963B (en) Round mark point center picture projection point position acquiring method for positioning video camera
CN112667837A (en) Automatic image data labeling method and device
CN105701827A (en) Method and device for jointly calibrating parameters of visible light camera and infrared camera
CN112818988A (en) Automatic reading identification method and system for pointer instrument
CN110223355B (en) Feature mark point matching method based on dual epipolar constraint
US11843865B2 (en) Method and device for generating vehicle panoramic surround view image
CN109376208A (en) A kind of localization method based on intelligent terminal, system, storage medium and equipment
CN112489091A (en) Full strapdown image seeker target tracking method based on direct-aiming template
KR101573289B1 (en) Apparatus and method for recongnizing position using camera
CN115578315A (en) Bridge strain close-range photogrammetry method based on unmanned aerial vehicle image
CN114529615A (en) Radar calibration method, device and storage medium
CN114663505A (en) Target positioning method and related device
CN112508885B (en) Method and system for detecting three-dimensional central axis of bent pipe
CN115841666B (en) Instrument reading identification method and system
CN114511640A (en) Method, device and storage medium for calibrating camera by using map
CN109712200B (en) Binocular positioning method and system based on least square principle and side length reckoning
CN115512343A (en) Method for correcting and recognizing reading of circular pointer instrument
CN113537351B (en) Remote sensing image coordinate matching method for mobile equipment shooting
CN113496505B (en) Image registration method and device, multispectral camera, unmanned equipment and storage medium
CN110992413A (en) High-precision rapid registration method for airborne remote sensing image

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