CN106446903A - Recognition method for position of wave-band switch of instrument - Google Patents

Recognition method for position of wave-band switch of instrument Download PDF

Info

Publication number
CN106446903A
CN106446903A CN201610832507.2A CN201610832507A CN106446903A CN 106446903 A CN106446903 A CN 106446903A CN 201610832507 A CN201610832507 A CN 201610832507A CN 106446903 A CN106446903 A CN 106446903A
Authority
CN
China
Prior art keywords
band switch
image
pixel
computer
profile
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610832507.2A
Other languages
Chinese (zh)
Other versions
CN106446903B (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.)
Shandong Institute of Metrology
Original Assignee
Shandong Institute of Metrology
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 Shandong Institute of Metrology filed Critical Shandong Institute of Metrology
Priority to CN201610832507.2A priority Critical patent/CN106446903B/en
Publication of CN106446903A publication Critical patent/CN106446903A/en
Application granted granted Critical
Publication of CN106446903B publication Critical patent/CN106446903B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/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
    • 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)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a recognition method for the position of a wave-band switch of an instrument. The recognition method comprises the following steps: inputting an acquired original image into a computer, and converting the original image into a gray scale image; performing binarization processing on the gray scale image; respectively establishing rectangles outside a profile; calculating a center of a wave-band switch knob; calculating a gray-scale valve of a central image of the wave-band switch knob by the computer, and differencing gray-scale values of M pixel points of an image in a rectangular area where the profile of the wave-band switch knob is positioned and the gray-scale valve of the center of the wave-band switch knob, wherein an area formed by P pixel points with maximum difference values is an indicator of the wave-band switch; converting planimetric rectangular coordinates of the M pixel points of the image in the rectangular area where the profile of the wave-band switch knob is positioned into polar coordinates, and differentiating the M pixel points to obtain Y pixel points with maximum derivative values, wherein the derivative values of the Y pixel points are identical, and a closed area among the Y pixel points is an indicator of the wave-band switch.

Description

A kind of instrument band switch location recognition method
Technical field
The present invention relates to a kind of instrument band switch location recognition method.
Background technology
Indicating value identification currently for pointer instrument is substantially for instrument dial scale and pointer, but many instrument Various band switches, the function of being selected by band switch and range is also had to combine gauge outfit ability especially on analogue instrument panel Correct reading.Existing recognition methodss cannot be identified to the position of band switch.
Content of the invention
The present invention is in order to overcome the shortcomings of above technology, there is provided a kind of instrument band switch position can accurately be extracted Method.
The present invention overcomes its technical problem be employed technical scheme comprise that:
A kind of instrument band switch location recognition method, comprises the steps:
A) outer surface of instrument is carried out with original image collection, and the original image input computer by collection;
B) using computer, original image is carried out with gray processing process and original image is converted to gray level image by coloured image;
C) using computer, binary conversion treatment is carried out to gray level image;
D) obtain the N number of profile in bianry image by the searching profile function algorithm in opencv function library using computer, Set up rectangle outside N number of profile respectively, each profile is located within corresponding rectangle respectively;
E) rectangular area being located using the profile that computer navigates to band switch knob, computer is in this rectangular area The coordinate figure of M pixel makees mean value calculation, calculates the midpoint of this rectangle, is defined as the center of band switch knob;
If the sign f) on band switch is inside the knob of band switch, execution step g), if on band switch Sign outside the knob of band switch, then execution step h);
g)Computer calculates the gray value of the image at center of band switch knob, the square that the profile of band switch knob is located The gray value at the gray value of M pixel of the image in shape region and the center of band switch knob asks poor, the maximum P of difference The region that individual pixel is formed is the sign of band switch.
H) M pixel of the image in the rectangular area that the profile of band switch knob is located by computer is straight by plane Angular coordinate is converted to polar coordinate and M pixel is differentiated, obtain the maximum pixel of Y derivative value and Y pixel that This derivative value is identical, and the enclosed region between Y pixel is the sign of band switch.
For the definition reducing picture noise and improve image, the image in above-mentioned steps b) is converted into gray level image Afterwards, also include by greyscale image transitions for Mat type Image image, computer carried out using OpenCV function pair Image image The step of smooth and Edge contrast.
In order to exclude the interference that illumination leads to, it is additionally included in step g) and increases the P maximum using computer calculating difference The step of the distance at center of individual pixel and band switch knob, when Q pixel in P maximum pixel of difference and When the distance at the center of band switch knob is more than the radius of band switch knob, Q pixel is removed by computer.
The invention has the beneficial effects as follows.
Brief description
Fig. 1 structural representation inside the knob of band switch for the sign on band switch;
Fig. 2 structural representation outside the knob of band switch for the sign on band switch.
Specific embodiment
Below in conjunction with the accompanying drawings 1, the present invention will be further described for accompanying drawing 2.
A kind of instrument band switch location recognition method, comprises the steps:A) original graph is carried out to the outer surface of instrument As collection, and the original image input computer by collection.B) using computer, original image being carried out with gray processing process will be former Beginning image is converted to gray level image by coloured image, and because coloured image is usually rgb format, that is, each pixel is by R(Red)、 G(Green)、B(Blue)Three component compositions, for 24 true color, each component 1 byte representation, memory data output Big and be difficult to process it is therefore necessary to coloured image is converted to gray level image.Gray level image only comprises monochrome information, does not comprise Color information, therefore reduces the data processing amount of computer.C) using computer, binary conversion treatment is carried out to gray level image, Greyscale image transitions are conducive to improving processing speed for bianry image, meet requirement of real-time.Bianry image refers to view picture figure Picture only 0, the image of 255 two gray values, there are not other gray values between them.D) passed through using computer Searching profile function algorithm in opencv function library obtains the N number of profile in bianry image, sets up respectively outside N number of profile Rectangle, each profile is located within corresponding rectangle respectively.E) it is located using the profile that computer navigates to band switch knob Rectangular area, computer makees mean value calculation to the coordinate figure of M pixel in this rectangular area, calculates this rectangle Midpoint, is defined as the center O point of band switch knob.F) as shown in Figure 1, if the sign on band switch is opened in wave band Inside the knob closing, then execution step g), as shown in Figure 2, if the sign on band switch is in the knob of band switch Outside, then execution step h).g)Computer calculates the gray value of the image at center of band switch knob, by band switch knob Profile be located rectangular area in the gray value of M pixel of image and band switch knob center O point gray scale Value asks poor, and the region that P maximum pixel of difference is formed is the sign of band switch, a-quadrant as shown in Figure 1, It is achieved thereby that the accurately identifying of the position of sign of band switch on band switch for the sign.H) computer will M pixel of the image in rectangular area that the profile of band switch knob is located is converted to polar coordinate by plane rectangular coordinates And M pixel is differentiated, derivative value is identical each other to obtain the maximum pixel of Y derivative value and Y pixel, Y picture Enclosed region between vegetarian refreshments is the sign of band switch, B region as shown in Figure 2, it is achieved thereby that sign In accurately identifying of the position of the sign of the band switch in outside.
After image in above-mentioned steps b) is converted into gray level image, also include by greyscale image transitions for Mat type Image Image, computer carries out smooth and Edge contrast step using OpenCV function pair Image image.Because OpenCV is processed Picture is Mat type matrix, therefore first image is entered row format conversion, and computer first carries out smothing filtering, Gu Mingsi to image It is exactly that the part more than burr of a ripple or a certain frequency is removed on adopted signal, be exactly briefly low-pass filtering.It is reacted to It is exactly noise reduction and image blurring process on image(Because high frequency has reacted details, so removing details to obtain fuzzy profile), Edge due to image is typically in HFS, so this smothing filtering will result in edge blurry, i.e. image and background Will not make a clear distinction between good and evil but blurred transition.It is thus desirable to carrying out image sharpening again to fuzzy image, the edge of image is made to become Clearly.The purpose that image sharpening is processed is the Jing Guoping in order that the details of the edge of image, contour line and image is apparent from The basic reason that sliding image thickens is because that image receives average or integral operation, and therefore it can be carried out with inverse fortune Calculating (such as differentiating) can be so that image be apparent from.Differentiate the rate of change being to seek signal, micro- by Fourier transform Divide property to understand, differentiate and there is stronger high fdrequency components effect.To consider from frequency domain, image blurring essence is because it High fdrequency components are attenuated, and therefore can make image clearly with high pass filter.By increasing the place to image smoothing and sharpening Reason, further increases the definition in subsequent step and accuracy.
Further, it is additionally included in step g) and increase the P pixel maximum using computer calculating difference and wave band The step of the distance at the center of switching knob, when Q pixel in P maximum pixel of difference and band switch knob When the distance at center is more than the radius of band switch knob, Q pixel is removed by computer.When light application ratio is stronger, The higher region of brightness value that it is surveyed in Instrument image surface row may interfere to sign region, therefore by with The radius of band switch knob is compared and can remove it, and effectively prevents illumination interference from causing sign Position location accuracy The drawbacks of decline.

Claims (4)

1. a kind of instrument band switch location recognition method is it is characterised in that comprise the steps:
A) outer surface of instrument is carried out with original image collection, and the original image input computer by collection;
B) using computer, original image is carried out with gray processing process and original image is converted to gray level image by coloured image;
C) using computer, binary conversion treatment is carried out to gray level image;
D) obtain the N number of profile in bianry image by the searching profile function algorithm in opencv function library using computer, Set up rectangle outside N number of profile respectively, each profile is located within corresponding rectangle respectively;
E) rectangular area being located using the profile that computer navigates to band switch knob, computer is in this rectangular area The coordinate figure of M pixel makees mean value calculation, calculates the midpoint of this rectangle, is defined as the center of band switch knob;
If the sign f) on band switch is inside the knob of band switch, execution step g), if on band switch Sign outside the knob of band switch, then execution step h);
g)Computer calculates the gray value of the image at center of band switch knob, the square that the profile of band switch knob is located The gray value at the gray value of M pixel of the image in shape region and the center of band switch knob asks poor, the maximum P of difference The region that individual pixel is formed is the sign of band switch.
2.h) M pixel of the image in the rectangular area that the profile of band switch knob is located by computer is by flat square Coordinate Conversion is polar coordinate M pixel is differentiated, and obtains the pixel of Y derivative value maximum and Y pixel each other Derivative value is identical, and the enclosed region between Y pixel is the sign of band switch.
3. instrument band switch location recognition method according to claim 1 it is characterised in that:Figure in described step b) As after being converted into gray level image, also include by greyscale image transitions for Mat type Image image, computer utilizes OpenCV letter Several Image image is carried out with smooth and Edge contrast step.
4. instrument band switch location recognition method according to claim 1 it is characterised in that:It is additionally included in step g) Increase using P maximum pixel of computer calculating difference and the step of the distance at center of band switch knob, work as difference The distance at the center of Q pixel in P maximum pixel and band switch knob is more than the radius of band switch knob When, Q pixel is removed by computer.
CN201610832507.2A 2016-09-20 2016-09-20 A kind of instrument band switch location recognition method Active CN106446903B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610832507.2A CN106446903B (en) 2016-09-20 2016-09-20 A kind of instrument band switch location recognition method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610832507.2A CN106446903B (en) 2016-09-20 2016-09-20 A kind of instrument band switch location recognition method

Publications (2)

Publication Number Publication Date
CN106446903A true CN106446903A (en) 2017-02-22
CN106446903B CN106446903B (en) 2019-04-23

Family

ID=58165584

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610832507.2A Active CN106446903B (en) 2016-09-20 2016-09-20 A kind of instrument band switch location recognition method

Country Status (1)

Country Link
CN (1) CN106446903B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106952277A (en) * 2017-03-21 2017-07-14 中国人民解放军国防科学技术大学 A kind of two-value rocker switch method for detecting position based on image procossing
CN112116540A (en) * 2020-09-11 2020-12-22 福建省海峡智汇科技有限公司 Gear identification method and system for knob switch
CN112178706A (en) * 2020-10-14 2021-01-05 宁波方太厨具有限公司 Method and system for identifying fire gear of stove and method and system for linking smoke stove

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101660932A (en) * 2009-06-15 2010-03-03 浙江大学 Automatic calibration method of pointer type automobile meter
CN102262734A (en) * 2011-01-07 2011-11-30 浙江省电力公司 Method and system for determining turning-on or turning-off of switch
CN102609712A (en) * 2012-02-24 2012-07-25 山东鲁能智能技术有限公司 Reading method of round-like pointer instrument used for mobile robot
CN103324943A (en) * 2013-06-18 2013-09-25 中国人民解放军第二炮兵工程大学 Identification method of complex device panel image multi-sub zone state
CN103927507A (en) * 2013-01-12 2014-07-16 山东鲁能智能技术有限公司 Improved multi-instrument reading identification method of transformer station inspection robot
CN104573702A (en) * 2014-12-01 2015-04-29 长沙众治电气技术有限公司 Method for automatically identifying sulfur hexafluoride pressure instrument image
CN105260716A (en) * 2015-10-13 2016-01-20 长沙威胜信息技术有限公司 Fault indicator state identification method and fault indicator state identification device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101660932A (en) * 2009-06-15 2010-03-03 浙江大学 Automatic calibration method of pointer type automobile meter
CN102262734A (en) * 2011-01-07 2011-11-30 浙江省电力公司 Method and system for determining turning-on or turning-off of switch
CN102609712A (en) * 2012-02-24 2012-07-25 山东鲁能智能技术有限公司 Reading method of round-like pointer instrument used for mobile robot
CN103927507A (en) * 2013-01-12 2014-07-16 山东鲁能智能技术有限公司 Improved multi-instrument reading identification method of transformer station inspection robot
CN103324943A (en) * 2013-06-18 2013-09-25 中国人民解放军第二炮兵工程大学 Identification method of complex device panel image multi-sub zone state
CN104573702A (en) * 2014-12-01 2015-04-29 长沙众治电气技术有限公司 Method for automatically identifying sulfur hexafluoride pressure instrument image
CN105260716A (en) * 2015-10-13 2016-01-20 长沙威胜信息技术有限公司 Fault indicator state identification method and fault indicator state identification device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
李静: "《基于图像处理的指针式水表检定系统的研究与设计》", 《中国优秀硕士学位全文数据库 工程科技II辑》 *
邵剑雄等: "《基于霍夫森林的变电站开关设备检测及状态识别》", 《电力系统自动化》 *
陈安伟等: "《基于机器人的变电站开关状态图像识别方法》", 《电力系统自动化》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106952277A (en) * 2017-03-21 2017-07-14 中国人民解放军国防科学技术大学 A kind of two-value rocker switch method for detecting position based on image procossing
CN106952277B (en) * 2017-03-21 2019-10-25 中国人民解放军国防科学技术大学 A kind of two-value rocker switch method for detecting position based on image procossing
CN112116540A (en) * 2020-09-11 2020-12-22 福建省海峡智汇科技有限公司 Gear identification method and system for knob switch
CN112116540B (en) * 2020-09-11 2023-09-22 福建省海峡智汇科技有限公司 Gear identification method and system for knob switch
CN112178706A (en) * 2020-10-14 2021-01-05 宁波方太厨具有限公司 Method and system for identifying fire gear of stove and method and system for linking smoke stove
CN112178706B (en) * 2020-10-14 2021-11-05 宁波方太厨具有限公司 Method and system for identifying fire gear of stove and method and system for linking smoke stove

Also Published As

Publication number Publication date
CN106446903B (en) 2019-04-23

Similar Documents

Publication Publication Date Title
CN108921176B (en) Pointer instrument positioning and identifying method based on machine vision
CN115272346A (en) PCB production process online detection method based on edge detection
CN105654445B (en) A kind of handset image denoising method based on wavelet transformation edge detection
CN108805023A (en) A kind of image detecting method, device, computer equipment and storage medium
CN105260693A (en) Laser two-dimensional code positioning method
CN106446903A (en) Recognition method for position of wave-band switch of instrument
CN115331119B (en) Solid waste identification method
CN116704516B (en) Visual inspection method for water-soluble fertilizer package
CN113609984A (en) Pointer instrument reading identification method and device and electronic equipment
CN108711160B (en) Target segmentation method based on HSI (high speed input/output) enhanced model
CN105894474A (en) Non-linear image enhancement method, and edge detection method using the same
CN106599891A (en) Remote sensing image region-of-interest rapid extraction method based on scale phase spectrum saliency
CN111815542B (en) Tree annual ring image medulla positioning and annual ring measuring method
Li et al. A study of crack detection algorithm
CN115294314A (en) Electronic component surface defect identification method
CN110349129B (en) Appearance defect detection method for high-density flexible IC substrate
CN109472766B (en) Bridge bolt area positioning method and terminal equipment
CN112991359A (en) Pavement area extraction method, pavement area extraction system, electronic equipment and storage medium
Li et al. Segmentation of cDNA microarray image using fuzzy c-mean algorithm and mathematical morphology
CN116485924B (en) Binarization method of CT section image of optical fiber coil containing artifact
Shuaishuai et al. Research on License Plate Recognition Algorithm Based on OpenCV
CN108734180A (en) A kind of SIFT feature gradient generation method based on calculation optimization
CN108596194A (en) A kind of image encoding method of the local binary patterns of Gauss weighting
CN113780107B (en) Radio signal detection method based on deep learning dual-input network model
CN108122233A (en) Color image segmentation method based on local pixel comprehensive characteristics

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant