CN112990064A - Dial pointer identification method based on color segmentation and probability model - Google Patents

Dial pointer identification method based on color segmentation and probability model Download PDF

Info

Publication number
CN112990064A
CN112990064A CN202110345179.4A CN202110345179A CN112990064A CN 112990064 A CN112990064 A CN 112990064A CN 202110345179 A CN202110345179 A CN 202110345179A CN 112990064 A CN112990064 A CN 112990064A
Authority
CN
China
Prior art keywords
pointer
dial
calculating
color
probability
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
CN202110345179.4A
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.)
Nanjing Gmi Video Science & Technology Co ltd
Original Assignee
Nanjing Gmi Video Science & 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 Nanjing Gmi Video Science & Technology Co ltd filed Critical Nanjing Gmi Video Science & Technology Co ltd
Priority to CN202110345179.4A priority Critical patent/CN112990064A/en
Publication of CN112990064A publication Critical patent/CN112990064A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • 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)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a dial pointer identification method based on color segmentation and a probability model, which is mainly used for automatic reading of an electric power dial. Firstly, positioning a dial, removing a complex background, carrying out rough positioning according to color iterative segmentation, calculating a fitting point, accurately positioning a scale area and a pointer area by utilizing circular fitting, then drawing a radius mapping chart to determine a candidate pointer position through self-adaptive binarization, and finally determining the angle of a pointer according to a probability model. The invention has good recognition effect on the existing dial plate automatic reading technology which has complex background, more light interference, more dial plate arc rings, very short pointers, numerous characters in the dial plate and the like and is difficult to read the electric power dial plate, and simultaneously has very high anti-interference performance.

Description

Dial pointer identification method based on color segmentation and probability model
Technical Field
The invention belongs to an image capturing and processing technology in the technical field of data identification, and particularly relates to a dial pointer identification method based on color segmentation and a probability model, wherein pointers of an electric power dial are automatically identified and converted into dial readings.
Background
The pointer type dial plate has the advantages of water resistance, freezing resistance and dust resistance, so that the pointer type dial plate is widely applied to an electric power system. At present, many transformer substations still adopt the manual reading pointer type dial plate to indicate, and are very time-consuming, have certain potential safety hazard moreover, and with regard to the trend of technical development, the automatic indicating number reading of pointer type dial plate will become a normality.
The current dial pointer automatic identification technology mainly comprises a template calibration method, an edge detection method, a straight line and circle detection method, an angular point detection method, a contour fitting and radial segmentation and depth learning method and the like. The template calibration method still needs more manual work in practice, and once the dial plate installation position changes, calibration needs to be carried out again, so that the practicability is not strong. The methods such as edge, straight line, circle and angular point detection methods can only have higher accuracy under the conditions that the image is relatively clear, the interference of too many light rays is avoided, the number of dial characters is small and the pointer is relatively long. Under the conditions of poor image quality and interference of light and noise, the identification accuracy rate cannot meet the practical requirement. The deep learning method needs to acquire a large number of images of different scenes, has high performance requirements on a processor, is generally used for dial plate positioning, and is not suitable for accurately identifying pointer readings.
Therefore, the problem of how to remove a large amount of complicated manual calibration to accelerate deployment needs to be objectively solved, and the problems of low accuracy and difficulty in identification of pointer identification of the power dial plate in the prior art, such as complex background, much light interference, more dial plate arc circles, very short pointer, numerous characters in the dial plate, irregular hole digging in the center, extremely irregular shape in the hole and image fracture caused by oil filling in the dial plate, are solved.
Disclosure of Invention
The invention aims to solve the technical problems that the dial plate has complex background, much light interference, more dial plate arc rings, very short pointers, numerous characters in the dial plate, irregularly-dug holes in the center, extremely irregular shapes in the holes and oil filled in the dial plate, and provides a step-by-step pointer identification method based on color segmentation and a probability model.
In order to achieve the above object, the technical solution provided by the present invention is a dial pointer identification method based on color segmentation and probability model, specifically comprising the following steps:
1) the dial plate is positioned by a circle detection method, and a complex background is removed;
2) carrying out coarse positioning of a scale area according to color iterative segmentation;
3) calculating a fitting point through rough positioning of the scale area, and accurately positioning the scale area and the pointer area by utilizing circular fitting;
4) carrying out self-adaptive binarization on the pointer area;
5) drawing a radius mapping chart, calculating gradient and determining candidate pointer positions;
6) and calculating the probability of each candidate pointer and determining the position of the pointer.
In order to remove all disordered backgrounds outside the dial and avoid the interference of background colors on subsequent color segmentation, the dial is positioned by detecting the dial shell through Hough transform. To avoid confusion, the range of circle radii may be limited when multiple circles are detected, considering that hough circle detection may detect multiple circles.
The coarse positioning of the scale area according to the color iterative segmentation is to obtain a self-adaptive threshold value by using red, yellow and green information of the scale area and adopting an iterative method, and then perform the color segmentation according to the threshold value to obtain the coarse positioning of the scale area.
And 2, calculating the fitting point through rough positioning of the scale area, namely drawing a plurality of horizontal straight lines in the outer frame of the scale area on the basis of the scale area generated in the step 2, and taking the middle points of the crossed lines between the horizontal straight lines and the scale area as the fitting points.
The radius mapping map is obtained by dividing the circle of the binarized map generated in step 4 into 360 degrees, calculating the radius of each angle, and drawing the angle as the abscissa and the radius as the ordinate.
The candidate pointer location is calculated from the gradient of the falling edge of the radius map.
Calculating the probability of each candidate pointer means that the position of the falling edge is obtained by drawing a radius mapping map and calculating the radial gradient to be used as a candidate pointer, and then the probability of the falling edge being used as a pointer is calculated according to the length of the falling edge and the position relation between the falling edges.
Compared with the mode of automatically reading the dial plate in the prior art, the invention has the beneficial effects that:
firstly, the interference resistance is strong, the method of the invention adopts a step-by-step positioning mode, each step removes certain external interference to achieve the aim of finally positioning the pointer, and the actual effect proves that the method has very high capability of resisting interference of light rays, oil level, noise points and the like.
The pointer of the electric power dial plate with the irregular hole digging and the extremely irregular shape in the hole can be identified, and the pointer has good practical effect.
And thirdly, the deployment is convenient, manual calibration of the dial plate is not needed, the labor is saved, and the deployment efficiency is improved. Moreover, the invention can be operated on an embedded system and a common PC without depending on a processor with strong computing performance.
Drawings
Fig. 1 is a schematic view of a typical dial image.
Fig. 2 is a flow chart of dial pointer identification of the present invention.
FIG. 3 is a schematic diagram of a scale region fitting point.
Fig. 4 is a binarized map.
Fig. 5 is a radius map.
Detailed Description
The embodiments of the present invention will now be further described with reference to the accompanying drawings.
The invention provides a step-by-step pointer identification method based on color segmentation and a probability model, aiming at an electric power dial plate which is complex in dial plate background, much in light interference, more in dial plate arc circle, very short in pointer, numerous in characters inside the dial plate, irregular in center hole, extremely irregular in shape inside the hole and oil filled inside the dial plate.
Fig. 1 is a schematic image diagram of a dial, which can be divided into a cluttered background area, an inner and outer casing of the dial, an internal structure circle, a scale area, a pointer area, an irregular hole digging area and a cluttered text area.
The method comprises the steps of firstly carrying out dial positioning, removing complex backgrounds, carrying out rough positioning according to color characteristics, calculating fitting points, accurately positioning a scale area and a pointer area by utilizing circular fitting, then drawing a radius mapping chart through self-adaptive binarization, calculating the position of a falling edge, and finally determining the angle of a pointer according to probability. One embodiment of the identification process of the present method is shown in fig. 2, and comprises the following steps:
s1: dial plate location: the Hough conversion detection dial shell is adopted, Hough circular detection can possibly detect a plurality of circles, and the radius of the circle can be limited within a certain range. The position of the outer circle of the dial detected by the Hough circle detection method is not fixed, some dial outer circles are close to the outer circle of the dial shell, some dial outer circles are arranged in the inner circle of the dial shell, and the circle center is not necessarily in the center of the dial, but the Hough circle detection method is enough for distinguishing the background from the dial. After the dial area is detected, all disordered backgrounds outside the dial can be removed, and the interference of background colors on subsequent color segmentation is avoided.
S2: coarse positioning of a scale area: due to the influence of light, oil surface fracture, numerous characters and other factors, the scale area is difficult to determine by a circle detection or edge detection method. The most obvious characteristic of the dial plate is the color information of the scale area, the rough positioning of the scale area can be obtained by utilizing the information, and the circle fitting is adopted for accurate positioning after the rough positioning. Before color segmentation, color histogram equalization is performed on the image to ensure that the hues are substantially consistent. The scale area contains three colors, red, yellow and green, which need to be extracted separately. Taking red extraction as an example, let the pixel Color value be Color (r, g, b), r, g, b be red, green, blue components, respectively, T be an adaptive threshold, if (r-g) is satisfied>T and (r-g)>T, and r e [80,220]And if not, resetting the color value. In order to improve the universality of the method, a proper threshold value T is found through an iteration method. Let T be0Is an initial threshold, Δ T is an iteration step, and the threshold used in the ith division is Ti=T0Δ T, the number of remaining non-0 pixels in the image after the ith segmentation is CiThen when C is presentiIf the value is larger than a certain value, the iteration is ended, and T is TiAnd taking the segmentation result of the ith time as a final color extraction result. After color segmentation, three images of red, yellow and green are obtained. And combining the three images to obtain a complete scale area.
S3: calculating a fitting point: after the scale area is obtained, a plurality of horizontal straight lines are drawn in the scale area outer frame, and the middle points of the cross lines between the horizontal straight lines and the scale area are taken as fitting points, as shown in fig. 3. Due to the interference of light rays, the scale area may be incomplete, but several of the line segments can be intersected with the scale area, so that a sufficient fitting point is obtained.
S4: accurate positioning of the pointer area: and fitting a circle by using the fitting points, wherein the circle just can surround the scale area. After the scale area is found, the pointer area can be obtained according to the radius proportional relation, and the disordered hole area in the center of the dial is dug out to obtain a clean pointer area.
S5: and (3) pointer area binarization: and (3) adopting an adaptive threshold value method, taking the red component of the pointer region as a gray level map, and calculating a gray level map histogram Hist (i), wherein i belongs to [0,255 ]. Assuming that the total number of non-0 pixels in the figure is Count and w is a proportion set according to actual conditions, the method for calculating the adaptive threshold Th comprises the following steps:
Figure BDA0003000457910000041
after binarization is performed by using Th as a threshold value, morphological etching and hole filling are performed, and a middle dug hole is filled, so that a relatively clean scale and pointer binarization image is finally obtained, as shown in FIG. 4.
S6: acquiring a candidate pointer: the circle of the binarized map shown in fig. 4 is divided into 360 degrees, the radius of each angle is calculated, and the radius is drawn as a radius map with the angle as the abscissa and the radius as the ordinate, as shown in fig. 5. The radius map empirically excludes the bottom character region. And calculating the position of the candidate pointer according to the gradient of the falling edge of the radius mapping map.
S7: calculating the probability of the candidate pointer: in fact, there may be scale and pointer damage due to light interference, oil filling, noise interference, and many falling edges outside of the scale and pointer. But has two features that can be used to distinguish between a scale and a pointer. The first is the gradient value of the falling edge. The larger the gradient value of the falling edge, the greater the probability that the falling edge is a pointer. Let the gradient of the falling edge i be giAll falling edges have a maximum gradient gmax. Defining the gradient probability of a falling edge i as gi/gmax
The second is the distance relationship with other falling edges. The average angular difference between two scales is known as a and the total number of scales is known as K. Definition of m ∈ [1, K ]]Suppose that the map has N falling edges, wherein the distance between the ith falling edge and the jth falling edge is Dij。DijIs the angular difference between the ith falling edge and the jth falling edge. Define Boolean value Bij
Figure BDA0003000457910000042
The distance relationship between the falling edge i and the other falling edges is defined as:
Figure BDA0003000457910000043
s of falling edge iiThe larger the probability that the falling edge is a pointer. Defining the distance probability of a falling edge i as Si/(N-1). The total probability that the falling edge i is a pointer is calculated by the following expression:
Figure BDA0003000457910000051
s8: determining the position of the pointer: and taking the candidate pointer with the highest probability as the identified pointer, and converting the angle of the candidate pointer into the pointer reading.
It should be noted that the above-mentioned embodiments provided by the present invention are only illustrative, and do not limit the scope of the specific implementation of the present invention. The scope of the invention is intended to include such modifications or alterations as would be obvious to one of ordinary skill in the art.

Claims (6)

1. A dial plate pointer identification method based on color segmentation and probability models is characterized by comprising the following steps:
1) the dial plate is positioned by a circle detection method, and a complex background is removed;
2) carrying out coarse positioning of a scale area according to color iterative segmentation;
3) calculating a fitting point through rough positioning of the scale area, and accurately positioning the scale area and the pointer area by utilizing circular fitting;
4) carrying out self-adaptive binarization on the pointer area;
5) drawing a radius mapping chart, calculating gradient and determining candidate pointer positions;
6) and calculating the probability of each candidate pointer and determining the position of the pointer.
2. The method for automatically identifying a dial indicator based on color segmentation and probability model as claimed in claim 1, wherein the step of performing coarse positioning of the scale area according to color iterative segmentation is to obtain an adaptive threshold value by using red, yellow and green information of the scale area and performing color segmentation according to the adaptive threshold value to obtain the coarse positioning of the scale area.
3. The method for automatically identifying a dial indicator based on color segmentation and probability models as claimed in claim 1, wherein the calculation of the fitting point through rough positioning of the scale areas is based on the scale areas generated in step 2, a plurality of horizontal straight lines are drawn within the outer frame of the scale areas, and the midpoints of the intersection lines between the horizontal straight lines and the scale areas are taken as the fitting points.
4. The method for automatically identifying a dial indicator based on color segmentation and probability model as claimed in claim 1, wherein the mapping of the radius is performed by dividing the circle of the binarized map generated in step 4 into 360 degrees, calculating the radius of each angle, and mapping the angle as abscissa and the radius as ordinate.
5. The method for automatic identification of a dial indicator based on color segmentation and probability model according to claim 1, characterized in that the candidate indicator position is calculated from the gradient of the falling edge of the radius map.
6. The method for automatically identifying hands on a dial based on color segmentation and probability model as claimed in claim 1, wherein calculating the probability of each candidate hand means calculating the position of a falling edge as a candidate hand by drawing a radius map, calculating a radial gradient, and then calculating the probability of the falling edge as a hand according to the length of the falling edge and the positional relationship between the falling edges.
CN202110345179.4A 2021-03-31 2021-03-31 Dial pointer identification method based on color segmentation and probability model Pending CN112990064A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110345179.4A CN112990064A (en) 2021-03-31 2021-03-31 Dial pointer identification method based on color segmentation and probability model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110345179.4A CN112990064A (en) 2021-03-31 2021-03-31 Dial pointer identification method based on color segmentation and probability model

Publications (1)

Publication Number Publication Date
CN112990064A true CN112990064A (en) 2021-06-18

Family

ID=76338605

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110345179.4A Pending CN112990064A (en) 2021-03-31 2021-03-31 Dial pointer identification method based on color segmentation and probability model

Country Status (1)

Country Link
CN (1) CN112990064A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113791532A (en) * 2021-09-16 2021-12-14 飞亚达精密科技股份有限公司 Machine vision travel time detection method and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113791532A (en) * 2021-09-16 2021-12-14 飞亚达精密科技股份有限公司 Machine vision travel time detection method and system
CN113791532B (en) * 2021-09-16 2022-07-29 飞亚达精密科技股份有限公司 Machine vision travel time detection method and system

Similar Documents

Publication Publication Date Title
CN111626190B (en) Water level monitoring method for scale recognition based on clustering partition
CN106557764B (en) A kind of water level recognition methods based on binary-coded character water gauge and image procossing
CN108759973B (en) Water level measuring method
CN112818988B (en) Automatic identification reading method and system for pointer instrument
CN106960208B (en) Method and system for automatically segmenting and identifying instrument liquid crystal number
CN111931776B (en) Deep learning-based double-pointer instrument reading method
CN103164692B (en) A kind of special vehicle instrument automatic identification system based on computer vision and method
CN112149667B (en) Automatic reading method of pointer instrument based on deep learning
CN107679535A (en) A kind of pointer-type water meter automatic indication recognition system and method based on template matches
CN108960237B (en) Reading identification method for pointer type oil level indicator
CN109766886B (en) Water level identification method based on image identification
CN115115638B (en) Oil leakage detection and judgment method for hydraulic system
CN114549981A (en) Intelligent inspection pointer type instrument recognition and reading method based on deep learning
CN114067114B (en) Area nuclear segmentation counting method based on algae cell morphology
CN112734729B (en) Water gauge water level line image detection method and device suitable for night light supplement condition and storage medium
CN111539330B (en) Transformer substation digital display instrument identification method based on double-SVM multi-classifier
CN114926410A (en) Method for detecting appearance defects of brake disc
CN116758045B (en) Surface defect detection method and system for semiconductor light-emitting diode
CN110084587B (en) Automatic dinner plate settlement method based on edge context
CN112990064A (en) Dial pointer identification method based on color segmentation and probability model
CN114627461A (en) Method and system for high-precision identification of water gauge data based on artificial intelligence
CN112036391B (en) Electronic inspection method and system based on shale gas field production station
CN113393430A (en) Thermal imaging image enhancement training method and device for fan blade defect detection
CN116612461A (en) Target detection-based pointer instrument whole-process automatic reading method
CN108363958B (en) Oil tank detection method based on high-resolution optical 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