CN111242939B - Method for identifying state of pressing plate - Google Patents

Method for identifying state of pressing plate Download PDF

Info

Publication number
CN111242939B
CN111242939B CN202010054436.4A CN202010054436A CN111242939B CN 111242939 B CN111242939 B CN 111242939B CN 202010054436 A CN202010054436 A CN 202010054436A CN 111242939 B CN111242939 B CN 111242939B
Authority
CN
China
Prior art keywords
boundrects
adjacent
differences
tarracts
pressing plate
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
CN202010054436.4A
Other languages
Chinese (zh)
Other versions
CN111242939A (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.)
Shenzhen Nanwang Dingli Technology Co ltd
Original Assignee
Guangdong Chixing Electric Power Equipment 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 Guangdong Chixing Electric Power Equipment Co ltd filed Critical Guangdong Chixing Electric Power Equipment Co ltd
Priority to CN202010054436.4A priority Critical patent/CN111242939B/en
Publication of CN111242939A publication Critical patent/CN111242939A/en
Application granted granted Critical
Publication of CN111242939B publication Critical patent/CN111242939B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/60Rotation of whole images or parts thereof
    • G06T3/608Rotation of whole images or parts thereof by skew deformation, e.g. two-pass or three-pass rotation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • G06T5/30Erosion or dilatation, e.g. thinning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/181Segmentation; Edge detection involving edge growing; involving edge linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Geometry (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides a method for identifying a pressing plate state, which comprises the following steps: s channels in an HSV color space of the input graph are taken out, and the threshold 80 and the maximum 255 are binarized; morphological operation is carried out by using morph l ogyEx function, the kernel selects a rectangle with the size of 9x9, and the image is subjected to open operation; searching the Contours by using f i ndContours functions, and storing all the found Contours Contours; taking a minimum circumscribed rectangle BoundRects for each element of the contents; calculating the area median of all BoundREcts, and carrying out first screening on the deviation domain of each element limiting BoundREcts and BoundREcts to screen TarARcts 1; performing second screening on the limited aspect ratio of each element of TarRNA 1 to screen TarRNA 2; judging the switching state of the pressing plate according to the aspect ratio of each element of TarRacts 2; the x-coordinate of each element of TarRacts 2 is sequenced in an increasing mode, adjacent element differences are calculated, and the adjacent differences are converted into percentage changes dIff; the y-coordinate of each element of Tarrcts 2 is incrementally ordered, adjacent element differences are calculated, and the adjacent differences are converted into percent changes dIff.

Description

Method for identifying state of pressing plate
Technical Field
The invention relates to the technical field of power system inspection assistance, in particular to a method for identifying a pressing plate state.
Background
In 110kv substations, there are usually 10-20 protection cabinets, the number of the protection cabinets of 220kv and 500kv substations can reach hundreds, the number of the pressure plate switches of each protection cabinet is up to fifty-four, and inspection work needs to be performed on the pressure plate switches. However, the existing manual inspection process has the problems of large workload, poor timeliness, paperiness of work records and the like, and inspection personnel can have errors due to physical and psychological quality, responsibility, technical level, working experience and other factors, so that potential safety hazards are left, and even serious safety disasters are caused. Due to the development of the existing machine vision technology and network technology, a clamp plate part of a protection screen cabinet can be photographed through a camera, and then an image is processed through a processor to identify the on-off state of the clamp plate. However, the prior art does not have a method that can accurately recognize the state of the platen.
Disclosure of Invention
The invention provides a method for identifying the state of a pressing plate, which can effectively solve the problems.
The invention is realized in the following way:
the method for identifying the state of the pressing plate is characterized by comprising the following steps of:
s331, taking out an S channel in an HSV color space of the input diagram, and carrying out binarization of a threshold value 80 and a maximum value 255;
s332, performing morphological operation by using a morphyoyEx function, selecting a rectangle with the size of 9x9 by a kernel, and performing operation on an image;
s333, searching the contour by utilizing a findContours function, and storing all the found contour contents;
s334, taking a minimum circumscribed rectangle BoundRects for each element of the contents;
s335, calculating the area median of all BoundREcts, and carrying out first screening on each element of BoundREcts to limit the deviation domain of BoundREcts and BoundREcts, so as to screen TarRacts 1;
s336, performing second screening on the limited aspect ratio of each element of TarRNA 1 to screen TarRNA 2;
s337, judging the switching state of the pressing plate according to the aspect ratio for each element of TarRacts 2;
s338, carrying out incremental sequencing on the x coordinate of each element of TarRacts 2, calculating the difference of adjacent elements, and converting the adjacent differences into percentage change diff;
s339, the y coordinates of each element of TarRacts 2 are incrementally ordered, adjacent element differences are calculated, and the adjacent differences are converted into percentage change diff.
The beneficial effects of the invention are as follows: the method for identifying the state of the pressing plate can accurately identify the state of the pressing plate, and the accuracy of identification can reach more than 99.9.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some examples of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 to 23 are process images of background filtering, rotation correction, and platen state recognition processing in the platen state automatic checking method according to the embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments.
Referring to fig. 1 to 23, an embodiment of the present invention provides a method for automatically checking a state of a platen, including the steps of:
s1, scanning a two-dimensional code corresponding to a protection screen cabinet through a handheld scanning device, and acquiring the setting state of a pressure plate switch on the protection screen cabinet from a server;
s2, acquiring a photo of the protection screen cabinet through the handheld scanning equipment and uploading the photo to a server;
s3, the server sequentially carries out background filtering, rotation correction and pressing plate state identification on the photo, and transmits an identification result back to the handheld scanning device;
s4, the handheld scanning equipment compares the identification result with the set state and displays the comparison result on the handheld scanning equipment;
s5, the inspection personnel re-inspect according to the comparison result, and upload the result to the server for storage after confirming that the result is correct.
Referring to fig. 1, in step S3, the step of performing background filtering on the photo includes:
s311, an S channel in an HSV color space of an input photo is acquired, a threshold value 80 and a maximum value 255 are binarized, and a picture is obtained as shown in FIG. 2:
s312, morphological operation is carried out by using a morphyoyEx function, a kernel selects a rectangle with the size of 9x9, and an image is subjected to open operation (corrosion is carried out before expansion), so that a picture is shown in FIG. 3:
and (3) carrying out an opening operation:
img_open=open(img_THR,element)=dnate(erode(img_THR elemet))
firstly, corroding:
re-expanding:
s313, searching the Contours by utilizing the findContours function, and storing all the found Contours contents to obtain a picture as shown in fig. 4:
Contour8=findContours(img_open)。
s314, taking the minimum circumscribed rectangle BoundRects for each element of the contents, and obtaining a picture as shown in FIG. 5:
BoundRects={boundRect|boundRect
=Rect(min(contour.x),min(contour,y),max(contour,x)-min(contour.x),max(contour,y)-min(contour,y)),contour∈Contoura)。
s315, calculating the area median of all BoundREcts (without area boundary selection, so that the algorithm is applicable to distribution boards with various pixel sizes), and performing first screening on each element of BoundREcts to define the deviation domain of BoundREcts and the deviation domain thereof, and screening out TarRacts 1, as shown in FIG. 6:
the area size set after incremental sequencing according to the area size of BoundRects is terms
terma(BoundRects)=Ascending order(BoundRects,aree)
Calculating median of terms
First screening
S316, performing a second screening on the limited aspect ratio of each element of Tarrcts 1 to screen Tarrcts 2, as shown in FIG. 7;
TarRects2={rect|2*rect.height>rect.width,rect∈TarRects1)。
s317, calculating and normalizing a histogram H for each element of Tarrcts 2 by using a calcHist function, comparing the histogram with a previously prepared red and Huang Yaban template by using a compactreHist function, defining an upper score limit, filtering non-red and Huang Yaban, and performing third screening of Tarrcts 3, as shown in FIG. 9:
the comparison histogram:
s318, calculating four corner points for each element of TarRact 3, merging and storing into a point container;
s319, taking the minimum circumscribed rectangle filter_rect of all points in the point container, adjusting the boundary range, and filling the part outside the area in the input photo with white to obtain a photo with a filtered background, as shown in FIG. 10.
As a further improvement, in step S3, the step of performing rotation correction on the photograph includes:
s321, filtering the photo of the background to obtain a minimum area rectangle (minAreate), and then obtaining a two-dimensional box (CvBox 2D) to obtain a single rotation angle, as shown in FIG. 11; solving for
Average rotation angle avg_angle.
Contour of pressing plate after three times of screening under the same index of background filtering:
Contoura2={contour|contour=Contgura[rect.index],rect∈TarRect3)
average rotation angle:
s322, selecting the larger number in the longer and wider width of the input diagramSetting the square with the length and the width of canvas as canvas, and filling black into the gap between the input diagram and the canvas by using a copyMakeBorder function, as shown in FIG. 12;
square canvas side length:
length and width of upper, lower, left and right filling areas:
dx=(canvas_length-img_BGFliter.cols)/2
dy=(canvas_length-img_BGFilter rowa)/2
thus, the filled canvas:
canvaa=Rect(0,0,canvaa_length,canvaa_length)。
s323, rotating the input diagram by using the warp Affine function, wherein the rotation angle is avg_angle, and the canvas center is denoted as center, as shown in FIG. 13.
The original coordinates (x, y) are transformed into new coordinates (x ', y'), the intermediate transformation matrix being denoted M.
The basic formula of the transformation of the warp affine,
translation transformation, if
x′=x+t x
Y′=y+t y
Then
Rotation conversion, if the rotation angle is
In the image processing of opencv, all processing is performed from the origin, the origin of the image defaults to the upper left corner of the image, and when we perform rotation processing on the image, the midpoint of the image is generally used as the axis, so the following processing is needed: the axle center is moved to the origin to make rotation transformation, and finally the upper left corner is set as the origin of the image.
arc2(x′,y′)=M3ximg.BGFnter(x,y)。
S324, calculating the size of the minimum circumscribed rectangle img_Recor of the rotated image, and cutting off redundant frames of the canvas, as shown in FIG. 14:
output img_record length and width:
img_Recor.width=src2.cola*aba(cos(avg_angle))+arc2,rowa*aba(sin(avg_angle))img_Recor,height=src2.cda*aba(ain(avg_angle))+src2,rowa*aba(coa(avg_angle))
cutting canvas area length and width:
dx2=(canvas_length-img_Recor,width)/2
dy2=(canvas_length-img__Recor.height)/2
thus, img_record is output:
img_Recor=canvas(dx2,dy2,img_Recor.width,img_Recor.height)。
as a further improvement, in step S3, the step of performing platen state recognition on the photo includes:
s331 to S336 are the same as steps S311 to S316, and refer to fig. 15 to 20.
S337, judging the switching state of the pressing plate according to the aspect ratio for each element of TarRacts 2;
please refer to fig. 21:
opening:
TarRecta_on={rect|2*rect.width>rect.height,rect∈TarRects2)
and (3) closing:
TarRects_off={rect|2*rect,width≤rect,heightrect∈TarRecta2}。
s338, carrying out incremental sequencing on the x coordinate of each element of TarRacts 2, calculating the difference of adjacent elements, and converting the adjacent differences into percentage change diff; s339, the y-coordinate increment of each element of tarrces 2 is sequenced, the adjacent element differences are calculated, and the adjacent differences are converted into percentage change diff, please refer to fig. 22 and 23:
setting a threshold value diffVal, and entering the next cluster when diff is larger than diffVal.
TarRects2=Ascending order(TarRecta2)
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, and various modifications and variations may be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (1)

1. The method for identifying the state of the pressing plate is characterized by comprising the following steps of:
s331, taking out an S channel in an HSV color space of the input diagram, and carrying out binarization of a threshold value 80 and a maximum value 255;
s332, performing morphological operation by using a morphyoyEx function, selecting a rectangle with the size of 9x9 by a kernel, and performing operation on an image;
s333, searching the contour by utilizing a findContours function, and storing all the found contour contents;
s334, taking a minimum circumscribed rectangle BoundRects for each element of the contents;
s335, calculating the area median of all BoundREcts, and carrying out first screening on each element of BoundREcts to limit the deviation domain of BoundREcts and BoundREcts, so as to screen TarRacts 1;
s336, performing second screening on the limited aspect ratio of each element of TarRNA 1 to screen TarRNA 2;
s337, judging the switching state of the pressing plate according to the aspect ratio for each element of TarRacts 2;
s338, carrying out incremental sequencing on the x coordinate of each element of TarRacts 2, calculating the difference of adjacent elements, and converting the adjacent differences into percentage change diff;
s339, the y coordinates of each element of TarRacts 2 are incrementally ordered, adjacent element differences are calculated, and the adjacent differences are converted into percentage change diff.
CN202010054436.4A 2020-01-17 2020-01-17 Method for identifying state of pressing plate Active CN111242939B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010054436.4A CN111242939B (en) 2020-01-17 2020-01-17 Method for identifying state of pressing plate

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010054436.4A CN111242939B (en) 2020-01-17 2020-01-17 Method for identifying state of pressing plate

Publications (2)

Publication Number Publication Date
CN111242939A CN111242939A (en) 2020-06-05
CN111242939B true CN111242939B (en) 2023-09-19

Family

ID=70872764

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010054436.4A Active CN111242939B (en) 2020-01-17 2020-01-17 Method for identifying state of pressing plate

Country Status (1)

Country Link
CN (1) CN111242939B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114998581A (en) * 2020-12-22 2022-09-02 三峡大学 Protection pressing plate effective pressing plate area extraction method based on multi-threshold and K-means clustering
CN113158751B (en) * 2021-02-05 2023-09-19 广东驰行电力设备有限公司 Method for facilitating rapid processing of press plate switch state

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108010026A (en) * 2017-12-26 2018-05-08 深圳供电局有限公司 Protection pressing plate state identification method and device
CN108573256A (en) * 2017-03-14 2018-09-25 山东鲁能智能技术有限公司 A kind of substation's plate pressing equipment state identification method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9751329B2 (en) * 2013-08-22 2017-09-05 Yuan Chang Method for printing on elevation contours of the print object
JP6768537B2 (en) * 2017-01-19 2020-10-14 キヤノン株式会社 Image processing device, image processing method, program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108573256A (en) * 2017-03-14 2018-09-25 山东鲁能智能技术有限公司 A kind of substation's plate pressing equipment state identification method and device
CN108010026A (en) * 2017-12-26 2018-05-08 深圳供电局有限公司 Protection pressing plate state identification method and device

Also Published As

Publication number Publication date
CN111242939A (en) 2020-06-05

Similar Documents

Publication Publication Date Title
CN111242938B (en) Automatic checking method for state of pressing plate
CN108921176B (en) Pointer instrument positioning and identifying method based on machine vision
CN111284154B (en) Seal control machine seal control method, device and system based on image recognition
CN109978839B (en) Method for detecting wafer low-texture defects
CN111879241B (en) Mobile phone battery size measuring method based on machine vision
CN111968172B (en) Method and system for measuring volume of stock ground material
CN114549835B (en) Pointer instrument correction identification method and device based on deep learning
CN110473221B (en) Automatic target object scanning system and method
CN111242939B (en) Method for identifying state of pressing plate
CN111310573B (en) Method for identifying pressing plate in image of protection screen cabinet
CN112465809A (en) Mold defect detection method based on image recognition, computer-readable storage medium and device
CN109284718A (en) The recognition methods simultaneously of the more instrument in change visual angle towards crusing robot
WO2019001164A1 (en) Optical filter concentricity measurement method and terminal device
CN114998571B (en) Image processing and color detection method based on fixed-size markers
CN111242869B (en) Method for background filtering of photo
CN115272664A (en) Instrument panel display method and device, electronic equipment and storage medium
CN111935399B (en) Digitalization method of historical navigation films
CN113610091A (en) Intelligent identification method and device for air switch state and storage medium
CN112308848A (en) Method and system for identifying state of baffle plate of scrap steel truck, electronic equipment and medium
CN110288655B (en) Method and device for automatically identifying position of test pattern in chart picture
JPS63311485A (en) Automatic calibration device
CN114359414A (en) Lens smudge identification method and device, computer equipment and storage medium
CN115393855A (en) License plate product quality detection method, system and equipment
CN111445431B (en) Image segmentation method, terminal equipment and computer readable storage medium
CN112507838A (en) Pointer meter identification method and device and power inspection robot

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20231214

Address after: 518053, Room 401-5, Building D, Smart Plaza, No. 4068 Qiaoxiang Road, Gaofa Community, Shahe Street, Nanshan District, Shenzhen City, Guangdong Province

Patentee after: Shenzhen Nanwang Dingli Technology Co.,Ltd.

Address before: No. 7, Xin'an First Industrial Zone, Xin'an Village, East District, Zhongshan City, Guangzhou City, Guangdong Province, 528403

Patentee before: GUANGDONG CHIXING ELECTRIC POWER EQUIPMENT CO.,LTD.

TR01 Transfer of patent right