CN114693705B - Pointer instrument measured value reading method, device and system - Google Patents

Pointer instrument measured value reading method, device and system Download PDF

Info

Publication number
CN114693705B
CN114693705B CN202210366137.3A CN202210366137A CN114693705B CN 114693705 B CN114693705 B CN 114693705B CN 202210366137 A CN202210366137 A CN 202210366137A CN 114693705 B CN114693705 B CN 114693705B
Authority
CN
China
Prior art keywords
image
centroid
instrument
pointer
connected domain
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
CN202210366137.3A
Other languages
Chinese (zh)
Other versions
CN114693705A (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.)
Anhui Agricultural University AHAU
Original Assignee
Anhui Agricultural University AHAU
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 Anhui Agricultural University AHAU filed Critical Anhui Agricultural University AHAU
Priority to CN202210366137.3A priority Critical patent/CN114693705B/en
Publication of CN114693705A publication Critical patent/CN114693705A/en
Application granted granted Critical
Publication of CN114693705B publication Critical patent/CN114693705B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/66Analysis of geometric attributes of image moments or centre of gravity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • G06T2207/20032Median filtering

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Geometry (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The invention discloses a method, a device and a system for reading a measured value of a pointer instrument, wherein the method comprises the following steps: calculating the central position of the instrument by using a geometric method; calculating a first centroid; creating a first mask image on the pixel region with the first centroid as a center of circle; obtaining a difference image after the difference between the optical image and the image with the filled gray level; acquiring a hole filling image of the difference image, and performing AND operation on the hole filling image and the first mask image to obtain a disc image of the instrument optical image; acquiring the pointer length corresponding to the pointer region according to the distribution characteristics of the pixel points in the pointer region; performing AND operation on the second mask image and the disc image to obtain a target image; and acquiring a second centroid of each connected domain area in the target image, and identifying a measured value of the instrument according to an included angle between a connecting line of the first centroid and each second centroid. Compared with manual reading, the invention does not need to carry out a naked eye distinguishing process, and has higher speed.

Description

Pointer instrument measured value reading method, device and system
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method, an apparatus, and a system for reading a measurement value of a pointer instrument.
Background
The pointer instrument has the advantages of simple structure and low cost and is widely applied to the fields of petrochemical industry, ventilation and heating equipment, power plants and the like. However, since pointer meters are mostly used in environments with complex environments, especially in chemical production, there are a lot of monitoring parameters such as pressure, temperature, humidity, fluid velocity, etc. in the chemical production process. If the reading is completely performed manually, on the one hand, the reading speed is low, errors are easy to occur, and the data is easy to forge.
Therefore, how to realize the rapid reading of the measured value of the pointer instrument through technical means is a technical problem to be solved.
Disclosure of Invention
The invention aims to solve the technical problem of providing a method and a device for reading the measured value of a pointer instrument so as to realize the rapid reading of the measured value of the pointer instrument.
The invention solves the technical problems through the following technical scheme:
the invention provides a pointer instrument measured value reading method, which comprises the following steps:
Acquiring an optical image of an instrument indication area, and sequentially performing median filtering, gray filling and Hough transformation on the optical image to obtain edge information of an instrument, wherein the instrument comprises one or a combination of a bimetal instrument and a magnetoelectric instrument;
calculating the central position of the instrument by using a geometric method according to the edge information;
Extracting a pixel region corresponding to the instrument according to the central position and the shape of the instrument, performing binarization processing on the pixel region, and calculating a first centroid corresponding to the pixel region according to a binarization image;
Creating a first mask image on the pixel region with the first centroid as a center of circle; obtaining a difference image after the difference between the optical image and the image with the filled gray level; performing hole filling processing on the difference image to obtain a hole filling image, and performing AND operation on the hole filling image and the first mask image to obtain a disc image of the instrument optical image;
Acquiring a pointer region in the disc image by using a connected domain algorithm, and acquiring the pointer length corresponding to the pointer region according to the distribution characteristics of the pixel points in the pointer region;
Creating a second mask image by taking the first centroid as the center of a circle and the pointer length as the radius, and performing AND operation on the second mask image and the disc image to obtain a target image; and acquiring a second centroid of each connected domain area in the target image, and identifying a measured value of the instrument according to an included angle between a connecting line of the first centroid and each second centroid.
Optionally, the acquiring the optical image of the meter indication area includes:
and placing the indication area of the instrument in the center of a picture of the camera, and acquiring an optical image of the indication area of the instrument by using the camera.
Optionally, the calculating the first centroid corresponding to the pixel area according to the binarized image includes:
By means of the formula (i), A first centroid corresponding to the pixel region is calculated, wherein,
X 2 is the first centroid abscissa; a is the number of pixel points in the image corresponding to the binarized image; m is the abscissa of the pixel point in the corresponding image of the binarized image; sigma is a sum function; g is a binarized image corresponding to the image; n is the ordinate of the pixel point in the corresponding image of the binarized image; y 2 is the first centroid ordinate.
Optionally, the obtaining a difference image after the difference between the optical image and the image after gray filling includes:
And obtaining a difference image by using a formula I 3(x,y)=I2(x,y)-I1 (x, y) and performing difference between the optical image and the image filled with gray scale, wherein,
I 3 (x, y) is a difference image; i 2 (x, y) is the gray-scale filled image; i 1 (x, y) is an optical image.
Optionally, the obtaining the pointer length corresponding to the pointer region according to the distribution characteristics of the pixel points in the pointer region Z (u, v) includes:
using the formula according to the pointer region Z (u, v), The pointer length corresponding to the pointer region is obtained, wherein,
R 2 is the pointer length; x 3 is the abscissa of the point in the pointer region Z (u, v) furthest from the first centroid (x 2,y2); y 3 is the ordinate of the point in the pointer region Z (u, v) furthest from the first centroid (x 2,y2); x 2 is the first centroid abscissa; y 2 is the first centroid ordinate.
Optionally, an included angle between a line connecting the first centroid and each second centroid includes:
By means of the formula (i), Calculating an included angle between the connection lines of the first centroid and each of the second centroids, wherein,
A direction vector of a first straight line L 1 between a second centroid of the connected domain corresponding to the initial scale and the first centroid (x 2,y2); a is the abscissa of the second centroid of the connected domain corresponding to the starting scale in the target image F (p, q); b is the ordinate of the second centroid of the connected domain in the target image F (p, q) corresponding to the starting scale; c is the abscissa of the second centroid of the connected domain corresponding to the measurement scale in the target image F (p, q); d is the ordinate of the second centroid of the connected domain in the target image F (p, q) corresponding to the measurement scale; Is the direction vector of the central axis of the pointer area Z (u, v); a direction vector of a second straight line L 2 between a second centroid of the connected domain corresponding to the measurement scale and the first centroid (x 2,y2); arccos is an inverse cosine function; alpha is the included angle between the pointer and the first straight line L 1; beta is the angle between the pointer and the second straight line L 2.
Optionally, the identifying the measured value of the meter according to the included angle between the connecting lines of the first centroid and the second centroids includes:
According to the included angle between the connecting lines of the first centroid and each second centroid, using a formula, The measured value of the meter is identified, wherein,
T is the measured value of the instrument; s is the measuring range of the instrument.
The invention also provides a pointer instrument measured value reading device, which comprises:
The acquisition module is used for acquiring an optical image of the instrument indication area, and sequentially carrying out median filtering, gray filling and Hough conversion on the optical image to obtain edge information of the instrument, wherein the instrument comprises one or a combination of a bimetal instrument and a magnetoelectric instrument;
The calculating module is used for calculating the central position of the instrument by using a geometric method according to the edge information;
The processing module is used for extracting a pixel area corresponding to the instrument according to the central position and the shape of the instrument, performing binarization processing on the pixel area, and calculating a first centroid corresponding to the pixel area according to a binarized image;
The difference module is used for creating a first mask image on the pixel area by taking the first centroid as a circle center; obtaining a difference image after the difference between the optical image and the image with the filled gray level; performing hole filling processing on the difference image to obtain a hole filling image, and performing AND operation on the hole filling image and the first mask image to obtain a disc image of the instrument optical image;
The communication module is used for acquiring a pointer region in the disc image by using a communication domain algorithm and acquiring the pointer length corresponding to the pointer region according to the distribution characteristics of the pixel points in the pointer region;
The identification module is used for creating a second mask image by taking the first centroid as the center of a circle and the pointer length as the radius, and performing AND operation on the second mask image and the disc image to obtain a target image; and acquiring a second centroid of each connected domain area in the target image, and identifying a measured value of the instrument according to an included angle between a connecting line of the first centroid and each second centroid.
The invention also provides a pointer instrument measured value reading system, which comprises: a camera, a computer, wherein,
The camera is used for shooting an optical image of the instrument indication area and sending the optical image to the computer;
the computer is configured to perform the method of any of the above.
Optionally, the system further comprises: communication equipment, storage equipment and man-machine interaction equipment, wherein,
The communication device is used for sending the optical image and the measured value of the instrument to the storage device;
the storage device is used for storing the optical image and the measured value of the instrument;
The man-machine interaction device is used for receiving a query instruction of a user and acquiring a corresponding optical image and a meter measured value from the storage device according to the query instruction.
Compared with the prior art, the invention has the following advantages:
By using the invention, the measured value of the pointer of the instrument is read by using the image recognition calculation based on the camera, and the measured value can be obtained by photographing, compared with manual reading, the invention does not need to carry out a naked eye distinguishing process, and has higher speed.
Moreover, the invention provides a method for identifying the measured value, which is completely different from the prior art, not only can identify the measured value, but also can avoid errors caused by manual reading.
Drawings
Fig. 1 is a flow chart of a method for reading a measured value of a pointer instrument according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a method for reading measured values of a pointer instrument according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a system for reading measurement values of a pointer instrument according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a process of extracting the edge of a disk and roughly locating the center of a circle of a metal thermometer in an embodiment of the invention;
FIG. 5 is a schematic diagram of a process for precisely locating a center of a circle in an embodiment of the invention;
FIG. 6 is a schematic diagram of a thermometer dial extraction process in an embodiment of the invention;
FIG. 7 is a schematic diagram of a process for marking thermometer pointers in an embodiment of the invention;
fig. 8 is a schematic diagram of another process of extracting a thermometer dial in an embodiment of the present invention.
Detailed Description
The following describes in detail the examples of the present invention, which are implemented on the premise of the technical solution of the present invention, and detailed embodiments and specific operation procedures are given, but the scope of protection of the present invention is not limited to the following examples.
Example 1
Fig. 1 is a flow chart of a method for reading a measured value of a pointer instrument according to an embodiment of the present invention; fig. 2 is a schematic diagram of a method for reading measured values of a pointer instrument according to an embodiment of the present invention; FIG. 3 is a schematic diagram of a system for reading measurement values of a pointer instrument according to an embodiment of the present invention; as shown in fig. 1 to 3, a bimetal thermometer is exemplified in example 1 of the present invention. The bimetal thermometer indicates temperature by driving the deflection angle change of the pointer by two metals with different expansion coefficients. When the temperature changes, the pointer deflection on the driving shaft generates angle change due to the difference of the thermal expansion coefficients of the two metals, and the corresponding temperature is indicated on the dial. The bimetal thermometer has the advantages of small volume, good linearity, high response speed and good stability.
S101: and acquiring an optical image of an instrument indication area by using a camera, such as an industrial camera, and sequentially performing median filtering, gray filling and Hough conversion on the optical image to obtain edge information of the instrument, wherein the instrument comprises one or a combination of a bimetal instrument and a magnetoelectric instrument.
The method comprises the steps of building a bimetal thermometer temperature real-time reading system, comprising a bimetal thermometer, a camera and a computer, wherein the optical axis of the camera is perpendicular to a dial plate of the bimetal thermometer, and ensuring that the bimetal thermometer is in the visual field range of the camera; in practical application, the indication area of the instrument can be placed in the center of the picture of the camera, and the camera is used for acquiring an optical image of the indication area of the instrument.
The camera captures an original optical image I 1 (x, y) of the bimetal thermometer and transmits the optical image I 1 (x, y) to the computer.
Fig. 4 is a schematic diagram of a process of extracting a disc edge and roughly locating a center of a circle of a metal thermometer in the embodiment of the present invention, as shown in fig. 4, performing median filtering processing on an optical image I 1 (x, y) to obtain a (a) image in fig. 4, and performing gray filling on the filtered image to obtain a (b) image I 2 (x, y) in fig. 4; then, the disk edge C (x, y) of the bimetal thermometer was extracted using the Hough transform detection method, as shown in fig. 4 (C). The basic principle of the disc radius R 1 is that a parameter plane which is the same as an image plane is taken, each non-zero point on the image is taken as a circle center, a circle is drawn on the parameter plane by a known radius, and finally, the peak value on the parameter plane is found out, so that the peak value corresponds to the circle center in the original image.
In practical applications, when the central axis of the camera is not completely perpendicular to the dial of the instrument, a certain optical distortion may exist in the photographed picture, and therefore, an affine transformation method may be used to transform the image into an optical image for front view.
S102: and calculating the central position of the instrument by using a geometric method according to the edge information.
The circle center of the fitted disk is (x 1,y1) with the disk edge C (x, y) as the circumference and the disk radius R 1 as the radius.
S103: and extracting a pixel region corresponding to the instrument according to the central position and the shape of the instrument, performing binarization processing on the pixel region by using a maximum inter-class algorithm, and calculating a first centroid corresponding to the pixel region according to a binarized image.
A rectangular ROI image is extracted from the (c) image in fig. 4 centering on the center (x 1,y1) as the (b) image J 1 (m, n) in fig. 5, and the length of the rectangular ROI image J 1 (m, n) is larger than the disk diameter, that is, 2R 1, and the height of the rectangular ROI image J 1 (m, n) is also larger than the disk diameter. In practical applications, a circular ROI image J 1 (m, n) may also be extracted, it being understood that the diameter of the circular ROI image J 1 (m, n) should be slightly larger than the disk diameter.
Fig. 5 is a schematic diagram of a process of precisely locating a circle center in the embodiment of the present invention, as shown in fig. 5, a binarized image obtained by performing binarization processing on an ROI image J 1 (m, n) is a (c) image J 2 (m, n) in fig. 5, and then a first centroid (x 2,y2) is obtained according to the coordinate distribution characteristics of pixel points in the binarized image J 2 (m, n) as shown in a (d) image in fig. 5, where the centroid is a precisely located circle center (x 2,y2), and the circle center (x 2,y2) corresponds to a circle center of a pointer dial in a (e) image in fig. 5. In practice, the average of the coordinates of the pixels in the binarized image J 2 (m, n) may be used as the first centroid, for example, a formula may be used,A first centroid corresponding to the pixel region is calculated, wherein,
X 2 is the first centroid abscissa; a is the number of pixel points in the image corresponding to the binarized image; m is the abscissa of the pixel point in the corresponding image of the binarized image; sigma is a sum function; g is a binarized image corresponding to the image; n is the ordinate of the pixel point in the corresponding image of the binarized image; y 2 is the first centroid ordinate. It is emphasized that when the binarized image is a rectangular ROI image J 1 (m, n), G is a region surrounded by the disk edge C (x, y) inside the rectangular ROI image J 1 (m, n).
S104: a first mask image M 1 (x, y) is created over the pixel area with the first centroid (x 2,y2) as the center of circle and R 1 as the radius.
Fig. 6 is a schematic diagram of a process of extracting a thermometer dial in an embodiment of the present invention, as shown in fig. 6, using a formula I 3(x,y)=I2(x,y)-I1 (x, y), to obtain a difference image by differentiating the optical image and the image after gray filling, where,
I 3 (x, y) is a difference image, as in (c) of fig. 6; i 2 (x, y) is a gray-scale filled image, as in (b) of fig. 6; i 1 (x, y) is an optical image, as shown in fig. 6 (a).
Hole filling processing is carried out on the difference image I 3 (x, y) to obtain a hole filling image I 4 (x, y), and the hole filling image I 4 (x, y) and the first mask image M 1 (x, y) are subjected to AND operation to obtain a disc image I 5 (x, y) of the instrument optical image.
S105: and acquiring a pointer region Z (u, v) in the disc image I 5 (x, y) by using a connected domain algorithm, and acquiring the pointer length corresponding to the pointer region according to the distribution characteristics of the pixel points in the pointer region Z (u, v).
The identification of the pointer region can be implemented by using the existing connected domain algorithm, fig. 7 is a schematic diagram of a process of identifying a thermometer pointer in the embodiment of the present invention, as shown in fig. 7, a disc image I 5 (x, y) is a (a) diagram in fig. 7; fig. 7 (c) shows the pointer region Z (u, v).
The distances between all points in the pointer region Z (u, v) and the first centroid (x 2,y2) are calculated according to the triangular relationship, wherein the farthest distance corresponding point is denoted as (x 3,y3), and the distance from the farthest distance corresponding point to the first centroid (x 2,y2) is denoted as R 2, namely the pointer length.
In particular, the formula may be utilized according to the pointer region Z (u, v),The pointer length corresponding to the pointer region is obtained, wherein,
R 2 is the pointer length; x 3 is the abscissa of the point in the pointer region Z (u, v) furthest from the first centroid (x 2,y2); y 3 is the ordinate of the point in the pointer region Z (u, v) furthest from the first centroid (x 2,y2); x 2 is the first centroid abscissa; y 2 is the first centroid ordinate.
S106: a second mask image M 2 (x, y) is created with the first centroid (x 2,y2) as the center of the circle and the pointer length R 2 as the radius.
FIG. 8 is a schematic diagram of another process of extracting a thermometer dial in an embodiment of the present invention, as shown in FIG. 8, and FIG. 8 (a) is a disk image I 5 (x, y); the image (b) in fig. 8 is a second mask image M 2 (x, y); the image (c) in fig. 8 is a second mask image M 2 (x, y); two straight lines other than the pointer in the image (d) in fig. 8 are a first straight line L 1 and a second straight line L 2, respectively.
Performing an AND operation on the second mask image M 2 (x, y) and the disc image I 5 (x, y) to obtain a target image F (p, q); acquiring a second centroid (a, b) of each connected domain region in the target image F (p, q), wherein the second centroid (a, b) is the centroid of the initial graduation mark in the image F (p, q), and the second centroid (c, d) is the centroid of the final graduation mark in the image F (p, q);
Connecting the second centroid (a, b) with the first centroid (x 2,y2), the second centroid (c, d) with the center of a circle (x 2,y2) results in a first straight line L 1 and a second straight line L 2, respectively.
Then, using the formula,Calculating an included angle between the connection lines of the first centroid and each of the second centroids, wherein,
A direction vector of a first straight line L 1 between a second centroid of the connected domain corresponding to the initial scale and the first centroid (x 2,y2); a is the abscissa of the second centroid of the connected domain corresponding to the starting scale in the target image F (p, q); b is the ordinate of the second centroid of the connected domain in the target image F (p, q) corresponding to the starting scale; c is the abscissa of the second centroid of the connected domain corresponding to the measurement scale in the target image F (p, q); d is the ordinate of the second centroid of the connected domain in the target image F (p, q) corresponding to the measurement scale; Is the direction vector of the central axis of the pointer area Z (u, v); a direction vector of a second straight line L 2 between a second centroid of the connected domain corresponding to the measurement scale and the first centroid (x 2,y2); arccos is an inverse cosine function; alpha is the included angle between the pointer and the first straight line L 1; beta is the angle between the pointer and the second straight line L 2.
Then according to the included angle between the connecting lines of the first mass center and each second mass center, using a formula,The measured value of the meter is identified, wherein,
T is the measured value of the instrument; s is the measuring range of the instrument.
By using the invention, the measured value of the pointer of the instrument is read by using the image recognition calculation based on the camera, and the measured value can be obtained by photographing, compared with manual reading, the invention does not need to carry out a naked eye distinguishing process, and has higher speed.
Moreover, the invention provides a method for identifying the measured value, which is completely different from the prior art, not only can identify the measured value, but also can avoid errors caused by manual reading.
Furthermore, in the technical scheme of the invention, a measurer can stand at a longer distance, and the high resolution of the camera is utilized to read a long-distance measured value, so that the measurer does not need to walk near the thermometer to read, and the personal safety of the measurer is further ensured.
Meanwhile, in a region where the meters are dense or a data monitoring panel for arranging a large number of meters, a camera can be used for shooting two or more meters into one image, and meanwhile, measured values of the two or more meters are identified, and compared with manual reading, the reading speed can be improved. ,
Finally, the image processing algorithm adopted by the embodiment of the invention has simple principle, less calculated amount, higher operation efficiency and low requirement on hardware parameters of the equipment.
Example 2
Embodiment 2 of the present invention provides a pointer instrument measurement value reading device, which includes:
The acquisition module is used for acquiring an optical image of the instrument indication area, and sequentially carrying out median filtering, gray filling and Hough conversion on the optical image to obtain edge information of the instrument, wherein the instrument comprises one or a combination of a bimetal instrument and a magnetoelectric instrument;
The calculating module is used for calculating the central position of the instrument by using a geometric method according to the edge information;
The processing module is used for extracting a pixel area corresponding to the instrument according to the central position and the shape of the instrument, performing binarization processing on the pixel area, and calculating a first centroid corresponding to the pixel area according to a binarized image;
The difference module is used for creating a first mask image on the pixel area by taking the first centroid as a circle center; obtaining a difference image after the difference between the optical image and the image with the filled gray level; performing hole filling processing on the difference image to obtain a hole filling image, and performing AND operation on the hole filling image and the first mask image to obtain a disc image of the instrument optical image;
The communication module is used for acquiring a pointer region in the disc image by using a communication domain algorithm and acquiring the pointer length corresponding to the pointer region according to the distribution characteristics of the pixel points in the pointer region;
The identification module is used for creating a second mask image by taking the first centroid as the center of a circle and the pointer length as the radius, and performing AND operation on the second mask image and the disc image to obtain a target image; and acquiring a second centroid of each connected domain area in the target image, and identifying a measured value of the instrument according to an included angle between a connecting line of the first centroid and each second centroid.
Example 3
Embodiment 3 of the present invention provides a pointer instrument measurement value reading system, which includes: a camera, a computer, wherein,
The camera is used for shooting an optical image of the instrument indication area and sending the optical image to the computer;
the computer is configured to perform the method of any one of embodiments 1 or 2.
Optionally, the system further comprises: communication equipment, storage equipment and man-machine interaction equipment, wherein,
The communication device is used for sending the optical image and the measured value of the instrument to the storage device;
the storage device is used for storing the optical image and the measured value of the instrument;
The man-machine interaction device is used for receiving a query instruction of a user and acquiring a corresponding optical image and a meter measured value from the storage device according to the query instruction.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the invention.

Claims (9)

1. A method for reading a measurement value of a pointer instrument, the method comprising:
Acquiring an optical image of an instrument indication area, and sequentially performing median filtering, gray filling and Hough transformation on the optical image to obtain edge information of an instrument, wherein the instrument comprises one or a combination of a bimetal instrument and a magnetoelectric instrument;
calculating the central position of the instrument by using a geometric method according to the edge information;
Extracting a pixel region corresponding to the instrument according to the central position and the shape of the instrument, performing binarization processing on the pixel region, and calculating a first centroid corresponding to the pixel region according to a binarization image;
Creating a first mask image on the pixel region with the first centroid as a center of circle; obtaining a difference image after the difference between the optical image and the image with the filled gray level; performing hole filling processing on the difference image to obtain a hole filling image, and performing AND operation on the hole filling image and the first mask image to obtain a disc image of the instrument optical image;
Acquiring a pointer region in the disc image by using a connected domain algorithm, and acquiring the pointer length corresponding to the pointer region according to the distribution characteristics of the pixel points in the pointer region;
Creating a second mask image by taking the first centroid as the center of a circle and the pointer length as the radius, and performing AND operation on the second mask image and the disc image to obtain a target image; acquiring a second centroid of each connected domain area in the target image, and identifying a measured value of the instrument according to an included angle between a connecting line of the first centroid and each second centroid;
An angle between lines of the first centroid and each second centroid, comprising:
By means of the formula (i), Calculating an included angle between the connection lines of the first centroid and each of the second centroids, wherein,
A direction vector of a first straight line L 1 between a second centroid of the connected domain corresponding to the initial scale and the first centroid (x 2,y2); a is the abscissa of the second centroid of the connected domain corresponding to the starting scale in the target image F (p, q); b is the ordinate of the second centroid of the connected domain in the target image F (p, q) corresponding to the starting scale; c is the abscissa of the second centroid of the connected domain corresponding to the measurement scale in the target image F (p, q); d is the ordinate of the second centroid of the connected domain in the target image F (p, q) corresponding to the measurement scale; Is the direction vector of the central axis of the pointer area Z (u, v); a direction vector of a second straight line L 2 between a second centroid of the connected domain corresponding to the measurement scale and the first centroid (x 2,y2); arccos is an inverse cosine function; alpha is the included angle between the pointer and the first straight line L 1; beta is the angle between the pointer and the second straight line L 2.
2. The method for reading a measurement value of a pointer instrument according to claim 1, wherein the step of obtaining an optical image of an indication area of the instrument comprises:
and placing the indication area of the instrument in the center of a picture of the camera, and acquiring an optical image of the indication area of the instrument by using the camera.
3. The method for reading a measurement value of a pointer instrument according to claim 1, wherein the calculating a first centroid corresponding to a pixel area from a binarized image includes:
By means of the formula (i), A first centroid corresponding to the pixel region is calculated, wherein,
X 2 is the first centroid abscissa; a is the number of pixel points in the image corresponding to the binarized image; m is the abscissa of the pixel point in the corresponding image of the binarized image; sigma is a sum function; g is a binarized image corresponding to the image; n is the ordinate of the pixel point in the corresponding image of the binarized image; y 2 is the first centroid ordinate.
4. The method for reading a measurement value of a pointer instrument according to claim 1, wherein the step of obtaining a difference image by differentiating the optical image and the gray-scale-filled image comprises:
And obtaining a difference image by using a formula I 3(x,y)=I2(x,y)-I1 (x, y) and performing difference between the optical image and the image filled with gray scale, wherein,
I 3 (x, y) is a difference image; i 2 (x, y) is the gray-scale filled image; i 1 (x, y) is an optical image.
5. The method for reading a measurement value of a pointer instrument according to claim 1, wherein the step of obtaining the pointer length corresponding to the pointer region according to the distribution characteristics of the pixels in the pointer region comprises:
using the formula according to the pointer region Z (u, v), The pointer length corresponding to the pointer region is obtained, wherein,
R 2 is the pointer length; x 3 is the abscissa of the point in the pointer region Z (u, v) furthest from the first centroid (x 2,y2); y 3 is the ordinate of the point in the pointer region Z (u, v) furthest from the first centroid (x 2,y2); x 2 is the first centroid abscissa; y 2 is the first centroid ordinate.
6. The method of claim 1, wherein identifying the meter measurement based on the angle between the first centroid and the line connecting the respective second centroids, comprises:
According to the included angle between the connecting lines of the first centroid and each second centroid, using a formula, The measured value of the meter is identified, wherein,
T is the measured value of the instrument; s is the measuring range of the instrument.
7. A pointer instrument measurement reading apparatus, the apparatus comprising:
The acquisition module is used for acquiring an optical image of the instrument indication area, and sequentially carrying out median filtering, gray filling and Hough conversion on the optical image to obtain edge information of the instrument, wherein the instrument comprises one or a combination of a bimetal instrument and a magnetoelectric instrument;
The calculating module is used for calculating the central position of the instrument by using a geometric method according to the edge information;
The processing module is used for extracting a pixel area corresponding to the instrument according to the central position and the shape of the instrument, performing binarization processing on the pixel area, and calculating a first centroid corresponding to the pixel area according to a binarized image;
The difference module is used for creating a first mask image on the pixel area by taking the first centroid as a circle center; obtaining a difference image after the difference between the optical image and the image with the filled gray level; performing hole filling processing on the difference image to obtain a hole filling image, and performing AND operation on the hole filling image and the first mask image to obtain a disc image of the instrument optical image;
The communication module is used for acquiring a pointer region in the disc image by using a communication domain algorithm and acquiring the pointer length corresponding to the pointer region according to the distribution characteristics of the pixel points in the pointer region;
the identification module is used for creating a second mask image by taking the first centroid as the center of a circle and the pointer length as the radius, and performing AND operation on the second mask image and the disc image to obtain a target image; acquiring a second centroid of each connected domain area in the target image, and identifying a measured value of the instrument according to an included angle between a connecting line of the first centroid and each second centroid;
The identification module is further configured to:
By means of the formula (i), Calculating an included angle between the connection lines of the first centroid and each of the second centroids, wherein,
A direction vector of a first straight line L 1 between a second centroid of the connected domain corresponding to the initial scale and the first centroid (x 2,y2); a is the abscissa of the second centroid of the connected domain corresponding to the starting scale in the target image F (p, q); b is the ordinate of the second centroid of the connected domain in the target image F (p, q) corresponding to the starting scale; c is the abscissa of the second centroid of the connected domain corresponding to the measurement scale in the target image F (p, q); d is the ordinate of the second centroid of the connected domain in the target image F (p, q) corresponding to the measurement scale; Is the direction vector of the central axis of the pointer area Z (u, v); a direction vector of a second straight line L 2 between a second centroid of the connected domain corresponding to the measurement scale and the first centroid (x 2,y2); arccos is an inverse cosine function; alpha is the included angle between the pointer and the first straight line L 1; beta is the angle between the pointer and the second straight line L 2.
8. A pointer meter measurement reading system, the system comprising: a camera, a computer, wherein,
The camera is used for shooting an optical image of the instrument indication area and sending the optical image to the computer;
The computer being adapted to perform the method of any one of claims 1-6.
9. The pointer-type meter measurement reading system of claim 8 wherein said system further comprises: communication equipment, storage equipment and man-machine interaction equipment, wherein,
The communication device is used for sending the optical image and the measured value of the instrument to the storage device;
the storage device is used for storing the optical image and the measured value of the instrument;
The man-machine interaction device is used for receiving a query instruction of a user and acquiring a corresponding optical image and a meter measured value from the storage device according to the query instruction.
CN202210366137.3A 2022-04-08 2022-04-08 Pointer instrument measured value reading method, device and system Active CN114693705B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210366137.3A CN114693705B (en) 2022-04-08 2022-04-08 Pointer instrument measured value reading method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210366137.3A CN114693705B (en) 2022-04-08 2022-04-08 Pointer instrument measured value reading method, device and system

Publications (2)

Publication Number Publication Date
CN114693705A CN114693705A (en) 2022-07-01
CN114693705B true CN114693705B (en) 2024-08-27

Family

ID=82142613

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210366137.3A Active CN114693705B (en) 2022-04-08 2022-04-08 Pointer instrument measured value reading method, device and system

Country Status (1)

Country Link
CN (1) CN114693705B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116092088A (en) * 2022-12-05 2023-05-09 山西科达自控股份有限公司 Meter pointer reading identification method
CN117058390B (en) * 2023-08-28 2024-05-14 北京航空航天大学 High-robustness circular pointer type dial plate image state segmentation method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108256524A (en) * 2018-01-24 2018-07-06 国家电网公司 A kind of automatic reading method of multilist index formula instrument
CN111476246A (en) * 2020-04-07 2020-07-31 杭州国彪超声设备有限公司 Robust and efficient intelligent reading method for pointer instrument applied to complex environment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112097686B (en) * 2020-08-10 2022-03-11 安徽农业大学 Camouflage object detection method based on binary fringe projection
CN112149667B (en) * 2020-09-15 2024-05-28 浙江师范大学 Automatic reading method of pointer instrument based on deep learning

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108256524A (en) * 2018-01-24 2018-07-06 国家电网公司 A kind of automatic reading method of multilist index formula instrument
CN111476246A (en) * 2020-04-07 2020-07-31 杭州国彪超声设备有限公司 Robust and efficient intelligent reading method for pointer instrument applied to complex environment

Also Published As

Publication number Publication date
CN114693705A (en) 2022-07-01

Similar Documents

Publication Publication Date Title
CN114693705B (en) Pointer instrument measured value reading method, device and system
CN110580480B (en) Meter reading identification method based on image processing
CN110659636B (en) Pointer instrument reading identification method based on deep learning
CN112906694B (en) Reading correction system and method for transformer substation inclined pointer instrument image
CN107167169B (en) Readings of pointer type meters based on NI Vision Builder for Automated Inspection identifies measurement method
CN112257676B (en) Pointer type instrument reading method and system and inspection robot
CN110245654B (en) Pointer reading identification method and device, computer device and readable storage medium
CN111368906B (en) Pointer type oil level meter reading identification method based on deep learning
CN105894002B (en) A kind of instrument registration recognition methods based on machine vision
CN104657711B (en) A kind of readings of pointer type meters automatic identifying method of robust
CN104392206A (en) Image processing method for automatic pointer-type instrument reading recognition
CN103927507A (en) Improved multi-instrument reading identification method of transformer station inspection robot
CN103955694A (en) Image recognition meter reading system and method
CN109508709B (en) Single pointer instrument reading method based on machine vision
CN112215060B (en) Hough transform-based high-precision mechanical instrument reading identification method
CN110852954B (en) Image inclination correction method and system for pointer instrument
CN105426809A (en) Method for automatically identifying instrument pointer
CN113269193A (en) Pointer type meter reading method, device and storage medium
WO2024093287A1 (en) Instrument identification method based on improved u2 network
CN112036409A (en) Reading identification method and device of liquid level meter
CN116844147A (en) Pointer instrument identification and abnormal alarm method based on deep learning
CN105423975A (en) Calibration system and method of large-size workpiece
CN112464986A (en) Reading method and device for pointer type disc instrument
CN114782852A (en) Reading method, reading device and reading system of pointer type industrial instrument
CN115239952A (en) Method for reading industrial table based on YOLOV5 and U2-Net framework assistance

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