CN110807458A - Automatic reading method for pointer instrument - Google Patents

Automatic reading method for pointer instrument Download PDF

Info

Publication number
CN110807458A
CN110807458A CN201911020869.1A CN201911020869A CN110807458A CN 110807458 A CN110807458 A CN 110807458A CN 201911020869 A CN201911020869 A CN 201911020869A CN 110807458 A CN110807458 A CN 110807458A
Authority
CN
China
Prior art keywords
pointer
straight lines
pressure
threshold
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911020869.1A
Other languages
Chinese (zh)
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.)
Shenzhen Jiafan Technology Co Ltd
Original Assignee
Shenzhen Jiafan Technology 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 Shenzhen Jiafan Technology Co Ltd filed Critical Shenzhen Jiafan Technology Co Ltd
Priority to CN201911020869.1A priority Critical patent/CN110807458A/en
Publication of CN110807458A publication Critical patent/CN110807458A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/02Recognising information on displays, dials, clocks

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Geometry (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Arrangements For Transmission Of Measured Signals (AREA)
  • Image Processing (AREA)

Abstract

The invention relates to an automatic reading method for a pointer instrument, which comprises the steps of initializing dial information, preprocessing an image, carrying out Hough ellipse detection to obtain a region to be detected, obtaining the relative positions of a current pressure pointer, a low-pressure threshold pointer and a high-pressure threshold pointer through the steps of edge detection by using a Canny operator, Hough straight line detection algorithm and the like, and automatically reading the reading of the current pressure pointer. Compared with the prior art, the technical scheme of the invention not only can identify the low-pressure threshold pointer and the high-pressure threshold pointer and read the reading indicated by the pressure pointer, but also can be further used for low-pressure and high-pressure alarm based on the reading, thereby improving the use efficiency of the pointer instrument.

Description

Automatic reading method for pointer instrument
Technical Field
The invention relates to the technical field of pointer instruments, in particular to an automatic reading method of a pointer instrument.
Background
The pointer type instrument is used in the respective air pressure detection field, the air pressure of the existing pointer type instrument is usually identified by manual work, when the pressure is low, manual pressurization is carried out, when the pressure is high, manual decompression is carried out, human factors are indispensable, and a specially-assigned person is required to be arranged to monitor the pressure so as to adjust the pressure.
Chinese patent CN107145890A discloses an automatic reading method for pointer type instrument panel under remote multi-view environment, which comprises the steps of dial area determination, segmentation processing, pointer extraction fitting and reading estimation. Firstly, determining a dial area in an image by matching an image to be recognized and key points of a template dial, then distributing a binary dial according to a histogram, obtaining dial internal information by performing morphological processing on the binary image, then summing and merging straight lines obtained by probability Hough transform fitting to obtain a pointer angle, and finally calculating a pointer reading according to a prior pointer. The technology designs matrix transformation, the calculation is slightly complicated, and low-voltage pointers and high-voltage pointers cannot be identified. Based on the problems of this technology, the present invention has been developed.
Disclosure of Invention
The invention aims at the technical problem and provides an automatic reading method for a pointer instrument.
In order to achieve the purpose, the specific technical scheme of the invention is as follows:
an automatic reading method for a pointer instrument comprises the following steps:
a. initializing meter dial information to obtain value v expressed by dial unit angle, and low-voltage and high-voltage alarm threshold values are respectively T1、T2As prior information;
b. inputting a dial plate image to be read, and performing noise reduction pretreatment on the image;
c. carrying out Hough ellipse detection on the preprocessed image, and positioning a dial target area; then, perspective transformation is carried out according to the ellipse to obtain a circular top view of the dial and the circle center (x) of the dial0,y0) And radius R0
d. Obtaining a region to be detected according to the circular region of the changed dial plate, wherein the region to be detected is R0-Tr<(x-x0)2+(y-y0)2<R0Wherein T isrIs a settable radius threshold;
e. carrying out edge detection on the area to be detected by using a Canny operator to obtain an edge image of the area to be detected;
f. performing linear detection on the edge image of the area to be detected by using a Hough linear detection algorithm, and filtering line segments with the length smaller than a preset length threshold;
g. merging straight lines with approximate intercept and slope;
h. deleting a straight line which is too far away from the circle center; let the equation of a straight line be y ═ ax + b, if | ax0+b-y0|>ToThen delete the line, where ToIs a distance threshold;
i. sorting all the remaining straight lines according to length, selecting three straight lines with the longest length as candidate pointer fitting straight lines, sorting according to length, and recording the lengths as L1, L2 and L3 respectively, wherein L1 is more than L2 is more than L3;
if L3 is less than L2/3, the pointer of the current pressure gauge is overlapped with the pointer of the upper threshold value and the lower threshold value, the straight line is deleted, and an alarm is output;
if L3 is more than or equal to L2/3, judging that the three lines are all fitting straight lines, calculating included angles between every two of the three straight lines, and if the included angle theta between the two straight lines is equal to | T ≧ T2-T1If yes, judging that the two straight lines are fitting straight lines of the two threshold pointers, and the rest straight lines are fitting straight lines of the pressure pointers;
j. respectively calculating the included angle between the fitting straight line of the pressure pointer and the fitting straight lines of the two threshold pointers, and setting the included angle between the fitting straight lines of the pressure pointer and the fitting straight lines of the two threshold pointers as theta1And the included angle between the high-voltage pointer and the high-voltage pointer is theta2Then, the calculation formula of the current pressure is as follows:
P=(T2+T11*v+θ2*v)/2。
preferably, in the step b, the noise reduction preprocessing performed on the image includes noise reduction processing and histogram equalization, first, bilateral filtering is used to remove noise in the original image, and then histogram equalization is used to enhance the contrast of the image.
Preferably, in step f, the preset length threshold is 2/3 indicating the length of the pointer of the current pressure.
Preferably, in step g, the judgment basis for merging the straight lines with approximate intercepts and slopes is as follows:
let two linear equations be y ═ a respectively1x+b1、y=a2x+b2(ii) a If a1-a2< Ta and | b1-b2|<TbThen, the two straight lines are merged, and the merged straight line equation is that y ═ a1+a2)/2*x+(b1+b2) 2; wherein T isaAnd TbRespectively, the threshold values of slope and intercept.
Preferably, the automatic reading method further comprises a step k of alarming:
k. judging the current pressure P and the threshold value T1、T2Judging whether to output an alarm or not according to the magnitude relation; when P < T1When the pressure is higher than the preset value, a low-pressure alarm is sent out, and when P is more than T2When it is in high voltage, when T1<P<T2Only the pressure result is output and no alarm is sent.
Preferably, in said step d, TrIn relation to the size of the screw cap for holding the pointer in the centre of the meter, e.g. TrThe radius of the nut can be set to be 1-N times (N is a positive integer, and the radius of the nut N times is less than R0)。
Compared with CN107145890A and other prior arts, the invention can identify the low pressure threshold pointer and the high pressure threshold pointer and read the reading indicated by the pressure pointer, and can be used for low pressure and high pressure alarm based on the reading, thereby improving the use efficiency of the pointer instrument.
Detailed Description
In order that those skilled in the art will be able to understand and practice the present invention, further description will be given below of embodiments of the present invention.
The invention provides an automatic reading method of a pointer instrument, which comprises the following specific processes:
an automatic reading method for a pointer instrument comprises the following steps:
1. initializing the dial information of the instrument, and obtaining the value v, low voltage, voltage and angle of the dial,The high-voltage alarm threshold is T1、T2As prior information;
2. inputting a dial plate image to be read, and performing noise reduction pretreatment on the image; the image noise reduction preprocessing comprises noise reduction processing and histogram equalization; firstly, removing noise in an original image by utilizing bilateral filtering, and then enhancing the contrast of the image by utilizing histogram equalization;
3. carrying out Hough ellipse detection on the preprocessed image, and positioning a dial target area; then, perspective transformation is carried out according to the ellipse to obtain a circular top view of the dial and the circle center (x) of the dial0,y0) And radius R0
4. The electric contact pressure gauge is provided with an upper limit threshold pointer, a lower limit threshold pointer and a pressure indicator, wherein the three pointers are used for acquiring a to-be-detected area according to a circular area of the changed dial plate, and the to-be-detected area is R0-Tr<(x-x0)2+(y-y0)2<R0Wherein T isrIs a settable radius threshold; t isrIn relation to the size of the screw cap for holding the pointer in the centre of the meter, e.g. TrThe radius of the nut can be set to be 1-N times (N is a positive integer, and the radius of the nut N times is less than R0)。
5. Carrying out edge detection on the area to be detected by using a Canny operator to obtain an edge image of the area to be detected;
6. performing linear detection on an edge image of a region to be detected by using a Hough linear detection algorithm, and filtering line segments with too small lengths, specifically, setting a preset length threshold as 2/3 of the length of a pointer indicating the current pressure, and filtering line segments with lengths smaller than the preset length threshold;
7. merging straight lines with approximate intercept and slope; the judgment basis for merging the straight lines with approximate intercept and slope is as follows:
let two linear equations be y ═ a respectively1x+b1、y=a2x+b2(ii) a If a1-a2|<TaAnd | b1-b2|<TbThen proceed to two straight linesMerging, and the merged linear equation is that y is equal to (a)1+a2)/2*x+(b1+b2) 2; wherein T isaAnd TbRespectively, the threshold values of slope and intercept.
8. Deleting a straight line which is too far away from the circle center; let the equation of a straight line be y ═ ax + b, if | ax0+b-y0|>ToThen delete the line, where ToIs a distance threshold;
9. sorting all the remaining straight lines according to length, selecting three straight lines with the longest length as candidate pointer fitting straight lines, sorting according to length, and recording the lengths as L1, L2 and L3 respectively, wherein L1 is more than L2 is more than L3;
if L3 is less than L2/3, the pointer of the current pressure gauge is overlapped with the pointer of the upper threshold value and the lower threshold value, the straight line is deleted, and an alarm is output;
if L3 is more than or equal to L2/3, judging that the three lines are all fitting straight lines, calculating included angles between every two of the three straight lines, and if the included angle theta between the two straight lines is equal to | T ≧ T2-T1If yes, judging that the two straight lines are fitting straight lines of the two threshold pointers, and the rest straight lines are fitting straight lines of the pressure pointers;
10. respectively calculating the included angle between the fitting straight line of the pressure pointer and the fitting straight lines of the two threshold pointers, and setting the included angle between the fitting straight lines of the pressure pointer and the fitting straight lines of the two threshold pointers as theta1And the included angle between the high-voltage pointer and the high-voltage pointer is theta2Then, the calculation formula of the current pressure is as follows:
P=(T2+T11*v+θ2*v)/2。
as a preferred embodiment of the present invention, the automatic reading method further comprises the step of alarming:
11. judging the current pressure P and the threshold value T1、T2Judging whether to output an alarm or not according to the magnitude relation; when P < T1When the pressure is higher than the preset value, a low-pressure alarm is sent out, and when P is more than T2When it is in high voltage, when T1<P<T2Only the pressure result is output and no alarm is sent.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (6)

1. An automatic reading method for a pointer instrument is characterized by comprising the following steps:
a. initializing meter dial information to obtain value v expressed by dial unit angle, and low-voltage and high-voltage alarm threshold values are respectively T1、T2As prior information;
b. inputting a dial plate image to be read, and performing noise reduction pretreatment on the image;
c. carrying out Hough ellipse detection on the preprocessed image, and positioning a dial target area; then, perspective transformation is carried out according to the ellipse to obtain a circular top view of the dial and the circle center (x) of the dial0,y0) And radius R0
d. Obtaining a region to be detected according to the circular region of the changed dial plate, wherein the region to be detected is R0-Tr<(x-x0)2+(y-y0)2<R0Wherein T isrIs a settable radius threshold;
e. carrying out edge detection on the area to be detected by using a Canny operator to obtain an edge image of the area to be detected;
f. performing linear detection on the edge image of the area to be detected by using a Hough linear detection algorithm, and filtering line segments with the length smaller than a preset length threshold;
g. merging straight lines with approximate intercept and slope;
h. deleting a straight line which is too far away from the circle center; let the equation of a straight line be y ═ ax + b, if | ax0+b-y0|>ToThen delete the line, where ToIs a distance threshold;
i. sorting all the remaining straight lines according to length, selecting three straight lines with the longest length as candidate pointer fitting straight lines, sorting according to length, and recording the lengths as L1, L2 and L3 respectively, wherein L1 is more than L2 is more than L3;
if L3 is less than L2/3, the pointer of the current pressure gauge is overlapped with the pointer of the upper threshold value and the lower threshold value, the straight line is deleted, and an alarm is output;
if L3 is more than or equal to L2/3, judging that the three lines are all fitting straight lines, calculating included angles between every two of the three straight lines, and if the included angle theta between the two straight lines is equal to | T ≧ T2-T1If yes, judging that the two straight lines are fitting straight lines of the two threshold pointers, and the rest straight lines are fitting straight lines of the pressure pointers;
j. respectively calculating the included angle between the fitting straight line of the pressure pointer and the fitting straight lines of the two threshold pointers, and setting the included angle between the fitting straight lines of the pressure pointer and the fitting straight lines of the two threshold pointers as theta1And the included angle between the high-voltage pointer and the high-voltage pointer is theta2Then, the calculation formula of the current pressure is as follows:
P=(T2+T11*v+θ2*v)/2。
2. the pointer instrument automatic reading method as claimed in claim 1, wherein in the step b, the image is subjected to noise reduction preprocessing including noise reduction processing and histogram equalization, firstly bilateral filtering is used to eliminate noise in the original image, and then histogram equalization is used to enhance the contrast of the image.
3. According to claim 1Or 2The method for automatically reading the pointer instrument is characterized in that in the step f, the preset length threshold is 2/3 of the length of the pointer indicating the current pressure.
4. According to claim 1Or 2The automatic reading method of the pointer instrument is characterized in that in the step g, the judgment basis for merging straight lines with approximate intercept and slope is as follows:
let two linear equations be y ═ a respectively1x+b1、y=a2x+b2
If a1-a2|<TaAnd | b1-b2|<TbThen, the two straight lines are merged, and the equation of the merged straight line is:
y=(a1+a2)/2*x+(b1+b2)/2;
wherein T isaAnd TbRespectively, the threshold values of slope and intercept.
5. The pointer instrument automatic reading method according to claim 1 or 2, characterized in that the automatic reading method further comprises a step k of alarming:
k. judging the relation between the current pressure P and the threshold values T1 and T2, and judging whether to output an alarm or not according to the size relation; when P < T1, a low pressure alarm is issued, when P > T2, a high pressure alarm is issued, when T1 < P < T2, only the pressure result is output, and no alarm is issued.
6. The pointer instrument automatic reading method as claimed in claim 1 or 2, characterized in that in the step d, T isrEqual to the radius of the size of the nut holding the pointer in the center of the meter.
CN201911020869.1A 2019-10-24 2019-10-24 Automatic reading method for pointer instrument Pending CN110807458A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911020869.1A CN110807458A (en) 2019-10-24 2019-10-24 Automatic reading method for pointer instrument

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911020869.1A CN110807458A (en) 2019-10-24 2019-10-24 Automatic reading method for pointer instrument

Publications (1)

Publication Number Publication Date
CN110807458A true CN110807458A (en) 2020-02-18

Family

ID=69489200

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911020869.1A Pending CN110807458A (en) 2019-10-24 2019-10-24 Automatic reading method for pointer instrument

Country Status (1)

Country Link
CN (1) CN110807458A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111797909A (en) * 2020-06-22 2020-10-20 上海工程技术大学 Pointer instrument reading method based on machine vision
CN112036391A (en) * 2020-07-22 2020-12-04 四川长宁天然气开发有限责任公司 Electronic inspection method and system based on shale gas field production station
CN112036390A (en) * 2020-07-22 2020-12-04 四川长宁天然气开发有限责任公司 Identification method for reading of three-pin instrument based on shale gas field production
CN115655576A (en) * 2022-12-13 2023-01-31 成都千嘉科技股份有限公司 Automatic sensing method for displacement abnormity of pointer type pressure gauge

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107766836A (en) * 2017-11-07 2018-03-06 国网黑龙江省电力有限公司检修公司 A kind of circular deflection readings of pointer type meters antidote
CN108256524A (en) * 2018-01-24 2018-07-06 国家电网公司 A kind of automatic reading method of multilist index formula instrument
CN108460327A (en) * 2018-01-12 2018-08-28 河南大学 A kind of readings of pointer type meters automatic identifying method based on image procossing
CN108921176A (en) * 2018-06-22 2018-11-30 河海大学常州校区 A kind of pointer instrument positioning and recognition methods based on machine vision

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107766836A (en) * 2017-11-07 2018-03-06 国网黑龙江省电力有限公司检修公司 A kind of circular deflection readings of pointer type meters antidote
CN108460327A (en) * 2018-01-12 2018-08-28 河南大学 A kind of readings of pointer type meters automatic identifying method based on image procossing
CN108256524A (en) * 2018-01-24 2018-07-06 国家电网公司 A kind of automatic reading method of multilist index formula instrument
CN108921176A (en) * 2018-06-22 2018-11-30 河海大学常州校区 A kind of pointer instrument positioning and recognition methods based on machine vision

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111797909A (en) * 2020-06-22 2020-10-20 上海工程技术大学 Pointer instrument reading method based on machine vision
CN111797909B (en) * 2020-06-22 2024-03-29 上海工程技术大学 Pointer type instrument reading method based on machine vision
CN112036391A (en) * 2020-07-22 2020-12-04 四川长宁天然气开发有限责任公司 Electronic inspection method and system based on shale gas field production station
CN112036390A (en) * 2020-07-22 2020-12-04 四川长宁天然气开发有限责任公司 Identification method for reading of three-pin instrument based on shale gas field production
CN112036391B (en) * 2020-07-22 2023-09-19 四川长宁天然气开发有限责任公司 Electronic inspection method and system based on shale gas field production station
CN115655576A (en) * 2022-12-13 2023-01-31 成都千嘉科技股份有限公司 Automatic sensing method for displacement abnormity of pointer type pressure gauge

Similar Documents

Publication Publication Date Title
CN110807458A (en) Automatic reading method for pointer instrument
CN108764229B (en) Water gauge image automatic identification method based on computer vision technology
CN105761219B (en) Text image Slant Rectify method and system
CN105447512B (en) A kind of detection method and device for the beauty defect that essence slightly combines
CN110210477B (en) Digital instrument reading identification method
CN105740872B (en) Image feature extraction method and device
CN110660072B (en) Method and device for identifying straight line edge, storage medium and electronic equipment
Short et al. Latent fingerprint segmentation using ridge template correlation
US10679094B2 (en) Automatic ruler detection
CN112734729B (en) Water gauge water level line image detection method and device suitable for night light supplement condition and storage medium
CN111310771B (en) Road image extraction method, device and equipment of remote sensing image and storage medium
WO2017161636A1 (en) Fingerprint-based terminal payment method and device
CN116758045B (en) Surface defect detection method and system for semiconductor light-emitting diode
Riana et al. Extraction and classification texture of inflammatory cells and nuclei in normal pap smear images
CN111222507A (en) Automatic identification method of digital meter reading and computer readable storage medium
CN110288040B (en) Image similarity judging method and device based on topology verification
Ye et al. Automatic Value Identification of Pointer-Type Pressure Gauge Based on Machine Vision.
US9946918B2 (en) Symbol detection for desired image reconstruction
CN109241975B (en) License plate character segmentation method based on character center point positioning
CN116452613B (en) Crack contour extraction method in geological survey
CN112560839A (en) Automatic identification method and system for reading of pointer instrument
CN109145912B (en) Automatic digital instrument reading identification method
Iruansi et al. An active contour approach to water droplets segmentation from insulators
Yang et al. A perspective correction method based on the bounding rectangle and least square fitting
Ray et al. Palm print recognition using hough transforms

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
AD01 Patent right deemed abandoned

Effective date of abandoning: 20231215

AD01 Patent right deemed abandoned