CN106485728B - A kind of automatic measure of bar shaped main transformer oil level indicator - Google Patents

A kind of automatic measure of bar shaped main transformer oil level indicator Download PDF

Info

Publication number
CN106485728B
CN106485728B CN201610814028.8A CN201610814028A CN106485728B CN 106485728 B CN106485728 B CN 106485728B CN 201610814028 A CN201610814028 A CN 201610814028A CN 106485728 B CN106485728 B CN 106485728B
Authority
CN
China
Prior art keywords
image
oil level
level indicator
bar shaped
main transformer
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
CN201610814028.8A
Other languages
Chinese (zh)
Other versions
CN106485728A (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.)
University of Electronic Science and Technology of China
Original Assignee
University of Electronic Science and Technology of China
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 University of Electronic Science and Technology of China filed Critical University of Electronic Science and Technology of China
Priority to CN201610814028.8A priority Critical patent/CN106485728B/en
Publication of CN106485728A publication Critical patent/CN106485728A/en
Application granted granted Critical
Publication of CN106485728B publication Critical patent/CN106485728B/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
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning

Landscapes

  • Image Analysis (AREA)

Abstract

The invention discloses a kind of automatic measures of bar shaped main transformer oil level indicator, belong to machine vision instrument and meter intelligent testing technology field, solve the problem of that there are backlight to take pictures in imaging process, uneven illumination is even etc. and cannot achieve automatic measurement.Utilization orientation histogram of gradients feature and support vector machines carry out Primary Location to the oil level indicator of bar shaped main transformer, color segmentation and Canny edge extracting method are recycled to be positioned to obtain the gray level image f for containing only complete oil level indicator to oil level indicator1(x, y) obtains containing only the gray level image f of complete observation window using the black outer rim of the removal oil level indicator such as expansion, holes filling and corrosion2(x, y) obtains the position of oil level indicator index line using Otsu threshold segmentation method, indicates line position and image f2Oil level indicator bound can be calculated oil level indicator percentage and mark in (x, y).Automatic measurement and reading for substation's bar shaped main transformer oil level indicator.

Description

A kind of automatic measure of bar shaped main transformer oil level indicator
Technical field
A kind of automatic measure of bar shaped main transformer oil level indicator, for substation's bar shaped main transformer oil level indicator it is automatic measurement and Reading, belongs to machine vision instrument and meter intelligent testing technology field.
Background technique
Electric instrument is the important tool of people's detection and monitoring device, and accuracy is most important, therefore electric power Department needs periodically to examine and determine instrument, and task is heavy.Using the very easy error of artificial calibrating mode and efficiency Lowly, therefore people are excited to various instrument automation degree quantifier eliminations.Field is measured automatically in industrial instrument, it is mainly sharp The automatic measurement of instrument is realized with the image processing method based on machine vision.Compared to artificial reading, automatic the advantages of measuring Have:24 hours uninterrupted readings, save manual labor, stability is high, high-efficient.Therefore in industrial circle application, instrument Table is measured automatically very high researching value.
Due to the function of industrial instrument, use is different, so that industrial instrument is many kinds of, structure is different, even if It is the instrument of same model, there is also color, shape, the difference such as size.Thus, there is no a kind of omnipotent instrument to spend automatically Amount method can accurately realize automatic measurement to all instrument.The instrument measured automatically is realized in this patent, is one Kind bar shaped main transformer oil level indicator.Currently, for ellipse without grid oil level indicator and pointer dial plate, existing patent is able to achieve automatic degree Amount, but it is directed to the oil level indicator of bar shaped main transformer, both patents all can not achieve automatic measurement.Due in imaging process, There are backlight to take pictures, and uneven illumination is even, imaging noise, and focusing is fuzzy, and background is complicated, blocks, and tilts, and rotation etc. influences, in reality When the automatic metric algorithm of existing instrument, need to consider several factors, in addition, shaping is precisely located in complicated image background Shape oil level indicator is also a difficult point.
Summary of the invention
The present invention provides a kind of automatic measure of bar shaped main transformer oil level indicator in view of the above shortcomings, solves existing For technology in imaging process, there are backlight to take pictures, uneven illumination is even, imaging noise, focusing is fuzzy, background is complicated, blocks, inclines Tiltedly, the problem of rotation etc. influences, and cannot achieve the automatic measurement of Instrument image.
To achieve the goals above, the technical solution adopted by the present invention is:
A kind of automatic measure of bar shaped main transformer oil level indicator, which is characterized in that include the following steps:
Step 1, input original image f1(x,y);
Step 2 extracts original image f1The histograms of oriented gradients feature (HOG) of (x, y) recycles trained branch It holds vector machine (SVM) to classify, obtains the Primary Location image f of oil level indicator2(x,y);
Step 3 chooses threshold value appropriate, to Primary Location image f2(x, y) carries out color segmentation, obtains image f3(x, y);
Step 4, to Primary Location image f2(x, y) carries out Canny edge extracting, obtains image f4(x, y), by image f3 (x, y) and image f4(x, y) is carried out or operation obtains image f5(x,y);
Step 5, to image f5(x, y) successively carries out triple-expansion, a holes filling and ten etching operations and obtains figure As f6(x,y);
Step 6 extracts image f6Minimum rectangle in the connected component of (x, y), as bar shaped oil level indicator, in Primary Location Image f2It cuts minimum rectangle on (x, y), obtains image f7(x,y);
Step 7, Otsu Threshold segmentation handle image f7The position of index line is calculated in (x, y);
Step 8 utilizes instruction line position and image f7(x, y) obtains the position of bar shaped oil level indicator bound, passes through bar shaped The position of oil level indicator bound calculates the percentage of oil level indicator, and marks in Primary Location image f2On (x, y).
Further, the detailed process of the step 2 is:
(21) the bar shaped oil level indicator region for intercepting out several oil level indicator images, as positive sample, while intercepting The HOG feature of positive negative sample is extracted as negative sample in background area, and the extraction of HOG feature is real by the library Opencv intrinsic function Existing, input SVM is trained, and obtains trained SVM;
(22) original image f is inputted1(x, y) extracts original image f1The HOG feature of (x, y), the extraction of HOG feature pass through The library Opencv intrinsic function is realized, is classified using trained SVM, is obtained the Primary Location image f of oil level indicator2(x,y)。
Further, in the step 3, to Primary Location image f2The formula that (x, y) carries out color segmentation is as follows:
Wherein R (x, y) indicates Primary Location image f2The channel R of the RGB channel of (x, y), G (x, y) indicate Primary Location Image f2The channel G of the RGB channel of (x, y), B (x, y) indicate Primary Location image f2The channel B of the RGB channel of (x, y).
Further, in the step 4, by image f3(x, y) and image f4(x, y) is carried out or operation obtains image f5(x,y) Calculation formula it is as follows:
Further, the detailed process of the step 5 is:
Indicate etching operation,Indicate expansion,Indicate holes filling;
Wherein A indicates original image, AcIndicate the supplementary set of A, B indicates structural elements, (B)z=w | and w=b+z, b ∈ B } it indicates B's Origin translation to point z,Indicate all elements that the set is mapped about the origin of structural elements B, Xk Maximum connected component is indicated, to the image f in step 45(x, y) carries out carrying out a secondary aperture after triple-expansion morphological operation Hole padding finally carries out ten etching operations, obtains image f6(x,y)。
Further, the detailed process of the step 6 is:
(61) image f is extracted6The connected component of (x, y), formula are as follows:
In formula, A indicates original image, and B indicates structural elements, XKIndicate maximum connected component;
(62) it is gone with the smallest rectangle comprising maximum connected component, in f2Corresponding minimum rectangle is intercepted on (x, y), is obtained To image f7(x, y), wherein minimum rectangle highest point ordinate positional value is P1, the minimum point value of ordinate is P2
Further, the detailed process of the step 7 is:
(71) to image f7(x, y) carries out Otsu Threshold segmentation, and Otsu Threshold segmentation is real by the library Opencv intrinsic function It is existing, maximum two pieces of white color components after segmentation are found, the ordinate of two white piece of highs and lows is obtained, totally 4 values;
(72) 4 values obtained in step (71) are ranked up, find out the ordinate average value of second with third, Ordinate value P as instruction line position3
Further, in the step 8, the formula for calculating the percentage of oil level indicator is:
Compared with the prior art, the advantages of the present invention are as follows:
One, in the positioning of oil level indicator, the present invention innovatively uses the classical HOG characteristics algorithm for pedestrian detection, And in conjunction with SVM algorithm, the positioning of oil level indicator can substantially reach 100%, and accuracy is very high, well solve complicated back The problem of being positioned under scape;
Two, present invention employs the image processing algorithm HOG feature of simple algorithm for pattern recognition SVM and some classics, Otsu Threshold segmentation, Canny edge extracting etc. are fast implemented by calling the library Opencv can be simple;By largely surveying An average picture operation time is calculated in 1s in examination, thus operand of the present invention is few, processing speed is fast, it is high-efficient with And preferable robustness;
Three, due to that can be solved well using Morphology Algorithms, the present invention such as color segmentation, burn into expansion, holes filling Certainly backlight is taken pictures, and uneven illumination is even, imaging noise problem, since the calculated result of oil level indicator is percentage, can be kept away well The inclination exempted from, rotation bring influence;
Four, the present invention is realized on MATLAB software platform, and last successful implantation is flat to VS2013+Opencv Platform illustrates that the transplantability of this algorithm is good, due to the C++ platform having been migrated under VS2013, can also be transplanted to other platforms, Such as DSP platform.
Detailed description of the invention
Fig. 1 is algorithm flow schematic diagram of the invention;
Fig. 2 is the image of Primary Location of the invention;
Fig. 3 is the image after color segmentation of the invention;
Fig. 4 is the image after of the invention or operation;
Fig. 5 is the image after expansive working of the invention;
Fig. 6 is the image after holes filling operation of the invention;
Fig. 7 is the image after etching operation of the invention;
Fig. 8 is the pinpoint image of oil level indicator of the invention;
Fig. 9 is the image after Otsu segmentation of the invention;
Figure 10 is the oil level of the invention calculated and the image being labeled.
Specific embodiment
The present invention is further illustrated with reference to the accompanying drawings and examples.
A kind of automatic measure of bar shaped main transformer oil level indicator, includes the following steps:
Step 1, input original image f1(x,y);
Step 2 extracts original image f1The histograms of oriented gradients feature (HOG) of (x, y) recycles trained branch It holds vector machine (SVM) to classify, obtains the Primary Location image f of oil level indicator2(x,y);Detailed process is:
(21) the bar shaped oil level indicator region for intercepting out several oil level indicator images, as positive sample, while intercepting The HOG feature of positive negative sample is extracted as negative sample in background area, and the extraction of HOG feature is real by the library Opencv intrinsic function Existing, input SVM is trained, and obtains trained SVM;
(22) original image f is inputted1(x, y) extracts original image f1The HOG feature of (x, y), the extraction of HOG feature pass through The library Opencv intrinsic function is realized, is classified using trained SVM, is obtained the Primary Location image f of oil level indicator2(x,y)。
Step 3 chooses threshold value appropriate, to Primary Location image f2(x, y) carries out color segmentation, obtains image f3(x, y);To Primary Location image f2The formula that (x, y) carries out color segmentation is as follows:
Wherein R (x, y) indicates Primary Location image f2The channel R of the RGB channel of (x, y), G (x, y) indicate Primary Location Image f2The channel G of the RGB channel of (x, y), B (x, y) indicate Primary Location image f2The channel B of the RGB channel of (x, y).
Step 4, to Primary Location image f2(x, y) carries out Canny edge extracting, obtains image f4(x, y), by image f3 (x, y) and image f4(x, y) is carried out or operation obtains image f5(x,y);By image f3(x, y) and image f4(x, y) is carried out or fortune Calculation obtains image f5The calculation formula of (x, y) is as follows:
Step 5, to image f5(x, y) successively carries out triple-expansion, a holes filling and ten etching operations and obtains figure As f6(x,y);Detailed process is:
Indicate etching operation,Indicate expansion,Indicate holes filling;
Wherein A indicates original image, AcIndicate the supplementary set of A, B indicates structural elements, (B)z=w | and w=b+z, b ∈ B } it indicates B's Origin translation to point z,Indicate all elements that the set is mapped about the origin of structural elements B, Xk Maximum connected component is indicated, to the image f in step 45(x, y) carries out carrying out a secondary aperture after triple-expansion morphological operation Hole padding finally carries out ten etching operations, obtains image f6(x,y)。
Step 6 extracts image f6Minimum rectangle in the connected component of (x, y), as bar shaped oil level indicator, in Primary Location Image f2It cuts minimum rectangle on (x, y), obtains image f7(x,y);Detailed process is:
(61) image f is extracted6The connected component of (x, y), formula are as follows:
In formula, A indicates original image, and B indicates structural elements, XKIndicate maximum connected component;
(62) it is gone with the smallest rectangle comprising maximum connected component, in f2Corresponding minimum rectangle is intercepted on (x, y), is obtained To image f7(x, y), wherein minimum rectangle highest point ordinate positional value is P1, the minimum point value of ordinate is P2
Step 7, Otsu Threshold segmentation handle image f7The position of index line is calculated in (x, y);Detailed process is:
(71) to image f7(x, y) carries out Otsu Threshold segmentation, and Otsu Threshold segmentation is real by the library Opencv intrinsic function It is existing, maximum two pieces of white color components after segmentation are found, the ordinates of two white piece of highs and lows totally 4 values are obtained;
(72) 4 values obtained in step (71) are ranked up, find out the ordinate average value of second with third, Ordinate value P as instruction line position3
Step 8 utilizes instruction line position and image f7(x, y) obtains the position of bar shaped oil level indicator bound, passes through bar shaped The position of oil level indicator bound calculates the percentage of oil level indicator, and marks in Primary Location image f2On (x, y).Calculate oil level indicator The formula of percentage be:
Present invention utilizes histograms of oriented gradients features (HOG) and support vector machines (SVM), color segmentation, the side Canny The classics image procossing such as Morphology Algorithms such as edge extracting method, Otsu threshold segmentation method, expansion, holes filling and corrosion is calculated Method is obtained in conjunction with the concrete condition of bar shaped main transformer oil level indicator image by the continuous test of combination and various threshold values to algorithm The present invention.

Claims (8)

1. a kind of automatic measure of bar shaped main transformer oil level indicator, which is characterized in that include the following steps:
Step 1, input original image f1(x,y);
Step 2 extracts original image f1The histograms of oriented gradients feature (HOG) of (x, y), recycle it is trained support to Amount machine (SVM) is classified, and the Primary Location image f of oil level indicator is obtained2(x,y);
Step 3 chooses threshold value appropriate, to Primary Location image f2(x, y) carries out color segmentation, obtains image f3(x,y);
Step 4, to Primary Location image f2(x, y) carries out Canny edge extracting, obtains image f4(x, y), by image f3(x,y) With image f4(x, y) is carried out or operation obtains image f5(x,y);
Step 5, to image f5(x, y) successively carries out triple-expansion, a holes filling and ten etching operations and obtains image f6 (x,y);
Step 6 extracts image f6Minimum rectangle in the connected component of (x, y), as bar shaped oil level indicator, in Primary Location image f2It cuts minimum rectangle on (x, y), obtains image f7(x,y);
Step 7, Otsu Threshold segmentation handle image f7The position of index line is calculated in (x, y);
Step 8 utilizes instruction line position and image f7(x, y) obtains the position of bar shaped oil level indicator bound, passes through bar shaped oil level indicator The position of bound calculates the percentage of oil level indicator, and marks in Primary Location image f2On (x, y).
2. a kind of automatic measure of bar shaped main transformer oil level indicator according to claim 1, which is characterized in that the step 2 detailed process is:
(21) the bar shaped oil level indicator region for intercepting out several oil level indicator images, as positive sample, while intercepting some backgrounds The HOG feature of positive negative sample is extracted, the extraction of HOG feature is realized by the library Opencv intrinsic function, defeated as negative sample in region Enter SVM to be trained, obtains trained SVM;
(22) original image f is inputted1(x, y) extracts original image f1The HOG feature of (x, y), the extraction of HOG feature pass through The library Opencv intrinsic function is realized, is classified using trained SVM, is obtained the Primary Location image f of oil level indicator2(x,y)。
3. a kind of automatic measure of bar shaped main transformer oil level indicator according to claim 1, which is characterized in that the step In 3, to Primary Location image f2The formula that (x, y) carries out color segmentation is as follows:
Wherein R (x, y) indicates Primary Location image f2The channel R of the RGB channel of (x, y), G (x, y) indicate Primary Location image f2 The channel G of the RGB channel of (x, y), B (x, y) indicate Primary Location image f2The channel B of the RGB channel of (x, y).
4. a kind of automatic measure of bar shaped main transformer oil level indicator according to claim 1, which is characterized in that the step In 4, by image f3(x, y) and image f4(x, y) is carried out or operation obtains image f5The calculation formula of (x, y) is as follows:
5. a kind of automatic measure of bar shaped main transformer oil level indicator according to claim 1, which is characterized in that the step 5 detailed process is:
Indicate etching operation,Indicate expansion,Indicate holes filling;
Wherein A indicates original image, AcIndicate the supplementary set of A, B indicates structural elements, (B)z=w | and w=b+z, b ∈ B } it indicates the origin of B Point z is moved to,Indicate all elements that the set is mapped about the origin of structural elements B, XkIt indicates Maximum connected component, to the image f in step 45Hole of progress is filled out after (x, y) carries out triple-expansion morphological operation Operation is filled, ten etching operations is finally carried out, obtains image f6(x,y)。
6. a kind of automatic measure of bar shaped main transformer oil level indicator according to claim 1, which is characterized in that the step 6 detailed process is:
(61) image f is extracted6The connected component of (x, y), formula are as follows:
In formula, A indicates original image, and B indicates structural elements, XKIndicate maximum connected component;
(62) it is gone with the smallest rectangle comprising maximum connected component, in f2Corresponding minimum rectangle is intercepted on (x, y), obtains figure As f7(x, y), wherein minimum rectangle highest point ordinate positional value is P1, the minimum point value of ordinate is P2
7. a kind of automatic measure of bar shaped main transformer oil level indicator according to claim 6, which is characterized in that the step 7 detailed process is:
(71) to image f7(x, y) carries out Otsu Threshold segmentation, and Otsu Threshold segmentation is realized by the library Opencv intrinsic function, seeks Maximum two pieces of white color components after dividing are looked for, the ordinate of two white piece of highs and lows is obtained, totally 4 values;
(72) 4 values obtained in step (71) are ranked up, find out the ordinate average value of second with third, as Indicate the ordinate value P of line position3
8. a kind of automatic measure of bar shaped main transformer oil level indicator according to claim 7, which is characterized in that the step In 8, the formula for calculating the percentage of oil level indicator is:
CN201610814028.8A 2016-09-09 2016-09-09 A kind of automatic measure of bar shaped main transformer oil level indicator Active CN106485728B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610814028.8A CN106485728B (en) 2016-09-09 2016-09-09 A kind of automatic measure of bar shaped main transformer oil level indicator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610814028.8A CN106485728B (en) 2016-09-09 2016-09-09 A kind of automatic measure of bar shaped main transformer oil level indicator

Publications (2)

Publication Number Publication Date
CN106485728A CN106485728A (en) 2017-03-08
CN106485728B true CN106485728B (en) 2018-11-27

Family

ID=58273434

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610814028.8A Active CN106485728B (en) 2016-09-09 2016-09-09 A kind of automatic measure of bar shaped main transformer oil level indicator

Country Status (1)

Country Link
CN (1) CN106485728B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107610128A (en) * 2017-09-26 2018-01-19 山东鲁能智能技术有限公司 The method for inspecting and device of a kind of oil level indicator
CN111272257A (en) * 2020-02-20 2020-06-12 上海电机学院 Transformer oil level monitoring system based on machine vision
CN114143446A (en) * 2021-10-20 2022-03-04 深圳航天智慧城市系统技术研究院有限公司 Histogram identification method, system, storage medium and equipment based on edge calculation

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7041059B2 (en) * 2002-08-02 2006-05-09 Diagnostic Ultrasound Corporation 3D ultrasound-based instrument for non-invasive measurement of amniotic fluid volume
CN102254159B (en) * 2011-07-07 2014-07-02 清华大学深圳研究生院 Interpretation method for digital readout instrument
CN103955694B (en) * 2014-04-09 2017-05-24 广州邦讯信息系统有限公司 Image recognition meter reading system and method
CN105809168A (en) * 2015-12-23 2016-07-27 佛山市质量计量监督检测中心 Image fuzzy identification method of standard constant temperature bath glass thermometer

Also Published As

Publication number Publication date
CN106485728A (en) 2017-03-08

Similar Documents

Publication Publication Date Title
US11506650B2 (en) Method for automatic quantitative statistical distribution characterization of dendrite structures in a full view field of metal materials
CN102176228B (en) Machine vision method for identifying dial plate information of multi-pointer instrument
CN110659636B (en) Pointer instrument reading identification method based on deep learning
CN106485728B (en) A kind of automatic measure of bar shaped main transformer oil level indicator
KR101917515B1 (en) Object recognition apparatus, objection recognition method, and program
CN107239742B (en) Method for calculating scale value of instrument pointer
CN111950330A (en) Pointer instrument indicating number detection method based on target detection
CN104256882B (en) Based on reconstituted tobacco ratio measuring method in the pipe tobacco of computer vision
CN109447061A (en) Reactor oil level indicator recognition methods based on crusing robot
CN109784250A (en) The localization method and device of automatically guiding trolley
CN114220757A (en) Wafer detection alignment method, device and system and computer medium
CN108305242A (en) A kind of intelligent visual detection method, system and device for industrial production line
CN104198325A (en) Method for measuring ratio of cut stem to cut tobacco based on computer vision
CN103218809A (en) Image measuring method of pearl length parameter
CN103150558B (en) A kind of operation of the display terminal based on machine vision responses match detection method
CN204202563U (en) Fish morphological parameters self-operated measuring unit
CN105371769B (en) A kind of method and device for measuring Dynamic Crack length
CN113435442B (en) Water level measuring method and device, water gauge and electronic equipment
CN112561989B (en) Recognition method for hoisting object in construction scene
CN113822836B (en) Method for marking an image
CN104655041B (en) A kind of industrial part contour line multi-feature extraction method of additional constraint condition
CN103955929B (en) Image local edge pattern and non-edge mode judging method and judgment means
CN115615992B (en) Fireproof brick size measurement and defect detection method
CN116486212A (en) Water gauge identification method, system and storage medium based on computer vision
CN105389818A (en) Method and system for positioning element

Legal Events

Date Code Title Description
C06 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