CN114639022A - Switch cabinet on-off state identification method and system based on SUFR template matching - Google Patents

Switch cabinet on-off state identification method and system based on SUFR template matching Download PDF

Info

Publication number
CN114639022A
CN114639022A CN202210311039.XA CN202210311039A CN114639022A CN 114639022 A CN114639022 A CN 114639022A CN 202210311039 A CN202210311039 A CN 202210311039A CN 114639022 A CN114639022 A CN 114639022A
Authority
CN
China
Prior art keywords
image
line
new
projection
row
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
CN202210311039.XA
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.)
Guangdong Power Grid Co Ltd
Zhaoqing Power Supply Bureau of Guangdong Power Grid Co Ltd
Original Assignee
Guangdong Power Grid Co Ltd
Zhaoqing Power Supply Bureau of Guangdong Power Grid 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 Power Grid Co Ltd, Zhaoqing Power Supply Bureau of Guangdong Power Grid Co Ltd filed Critical Guangdong Power Grid Co Ltd
Priority to CN202210311039.XA priority Critical patent/CN114639022A/en
Publication of CN114639022A publication Critical patent/CN114639022A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to the technical field of intelligent monitoring of a power grid, and discloses a switch cabinet on-off state identification method and system based on SUFR template matching.

Description

Switch cabinet on-off state identification method and system based on SUFR template matching
Technical Field
The invention relates to the technical field of intelligent monitoring of a power grid, in particular to a switch cabinet on-off state identification method and system based on SUFR template matching.
Background
With the rapid development of social economy, the number of transformer substations increases year by year, the operation and maintenance labor cost is high, the operation and maintenance labor gap is in a trend of obvious increase, scientific and technological means are not sufficiently applied, and the matching management system is lagged, so that the operation and maintenance efficiency is low. The traditional technical means mainly depends on the manual work to go on, personnel's skill level is uneven, the risk that fortune dimension quality descends is more showing, traditional video monitoring is mostly "passive" control, mainly rely on the manual work to realize, need fortune dimension personnel manual intervention, coordinate the control between the camera, and the on-the-spot position of confirming of separating brake combined floodgate operation of cubical switchboard in the transformer substation needs, extravagant a large amount of manpowers, can't reach a key and control, the control of cubical switchboard is leaned on artifical tour, can't in time discover the defect of cubical switchboard, threaten the safe operation of transformer substation.
In order to improve the operation and maintenance efficiency of the transformer substation and ensure the safe operation of the transformer substation. The traditional algorithm is used for extracting and describing local features of images, the algorithm does not directly match the two images, but searches similar feature points and completes matching through corresponding feature vectors. The algorithm has huge calculation data amount and long time consumption, and the efficiency and the accuracy of real-time monitoring are lower in a transformer substation with a large amount of switch equipment.
Disclosure of Invention
The invention provides a switch cabinet on-off state identification method and system based on SUFR template matching, and solves the technical problem that the traditional monitoring method is low in real-time monitoring efficiency and accuracy.
In view of this, the first aspect of the present invention provides a switch cabinet on-off state identification method based on SUFR template matching, including the following steps:
s1, acquiring a disconnecting link image to be identified in the switch cabinet;
s2, preprocessing the disconnecting link image to be identified to obtain an image-enhanced disconnecting link image to be identified;
s3, positioning a target character area image in the image-enhanced disconnecting link image to be identified by adopting a morphological Boolean operation algorithm;
s4, performing SUFR feature matching by using a preset template character image and the target character area image based on a SUFR feature matching algorithm, and positioning a knife switch position in the target character area image;
s5, extracting a disconnecting link area image from the target character area image according to the disconnecting link position, calculating the feature similarity between the preset template character image and the disconnecting link area image, and determining the disconnecting link on-off state of a disconnecting link to be identified in the switch cabinet according to the feature similarity.
Preferably, step S1 specifically includes:
the method comprises the steps of collecting a knife switch image to be identified in a switch cabinet based on a visible light camera carried by an inspection robot.
Preferably, step S2 specifically includes:
s201, graying the disconnecting link image to be identified by adopting a weighted average method to obtain a grayscale image;
s202, carrying out gray level enhancement on the gray level image by adopting a histogram equalization method to obtain an image-enhanced disconnecting link image to be identified.
Preferably, step S3 specifically includes:
s301, performing binarization processing on the to-be-identified knife-blade image subjected to image enhancement by adopting an OSTU dynamic threshold method to obtain a binarized image, wherein the binarized image is marked as B (i, j), 0< i < h, o < j < w, w and h respectively represent the total column number and the total row number of the binarized image, i represents the ith row, and j represents the jth column;
s302, scanning from the i-th to H/2-th lines of the binarized image downward line by line, boolean projecting the local image of each line in the horizontal direction to obtain the projection value H (i, j), H (i, j) ∑ B (i, j), i 1,2,3 …, H, and determining the upper boundary i, where the first satisfies H (i, j) ═ 0 and H (i-1, j) ═ 0up
S303, scanning the binary image from the i-th line to the H/2 th line upward line by line, performing boolean projection on the local image of each line in the horizontal direction, and determining a lower boundary i that meets the first requirement of H (i, j) being 0 and H (i-1, j) being 0down
S304, using the upper boundary iupAnd said lower boundary idownRemoving the images exceeding the boundary threshold value from the binarized image as an upper boundary threshold value and a lower boundary threshold value to obtain a new image, and marking the new image as NewB (i)1,j1);
S305, from the new image NewB (i)1,j1) Ith of (2)1Line by line scanning down to i1=h1And/2, performing Boolean projection on the local image of each line in the horizontal direction, and determining that the first local image satisfies H (i)1,j1) 0 and H (i)1+1,j1) Line i of 0new_up(ii) a Wherein h is1For new images NewB (i)1,j1) Total number of rows of (c);
s306, from the new image NewB (i)1,j1) H is1Line up line by line scanning to i1=h1And/2, performing Boolean projection on the local image of each row in the horizontal direction, and determining that the first satisfies H (i)1,j1) 0 and H (i)1-1,j1) Line i of 0new_downThereby obtaining the upper and lower boundaries of the target character area image as lines i respectivelynew_upAnd row inew_down
S307, scanning the binarized image from the j-th to W/2-th columns of the binarized image to the right row by row, performing boolean projection on the local image of each column in the vertical direction to obtain a projection value W (i, j), and determining a left boundary j where the first boundary j satisfies W (i, j) 0 and W (i-1, j) 0up;W(i,j)=∑B(i,j),j=1,2,3…,w;
S308, scanning the binary image from the j-th row to the W/2-th row to the left, performing boolean projection on the local image of each row in the vertical direction, and determining a right boundary j where the first boundary satisfies W (i, j) is 0 and W (i-1, j) is 0down
S309, using the left boundary jupAnd the right boundary jdownRemoving the images exceeding the boundary threshold value from the binarized image as a left boundary threshold value and a right boundary threshold value to obtain a new image, and marking the new image as NewB (i)2,j2);
S310, from the new image NewB (i)2,j2) J (d) of21 column to j line by line right2=w2And/2, performing Boolean projection on the local image of each column in the vertical direction, and determining that the first local image satisfies W (i)2,j2) 0 and H (i)1+1,j1) Column j 0new_up(ii) a Wherein, w2For new images NewB (i)2,j2) The total number of columns;
s311, from the new image NewB (i)2,j2) I ═ w2Column left line by line to j2=w2And/2, performing Boolean projection on the local image of each column in the vertical direction, and determining that the first local image satisfies W (i)2,j2) 0 and H (i)1+1,j1) 0 beingColumn jnew_downSo as to obtain the left and right boundaries of the target character area image as column j respectivelynew_upAnd column jnew_down
In a second aspect, the present invention further provides a switch cabinet on-off state identification system based on SUFR template matching, including:
the acquisition module is used for acquiring the disconnecting link image to be identified in the switch cabinet;
the preprocessing module is used for preprocessing the disconnecting link image to be identified to obtain an image-enhanced disconnecting link image to be identified;
the first positioning module is used for positioning a target character area image in the image-enhanced disconnecting link image to be identified by adopting a morphological Boolean operation algorithm;
the second positioning module is used for carrying out SUFR feature matching on the basis of an SUFR feature matching algorithm by utilizing a preset template character image and the target character area image so as to position the position of a disconnecting link in the target character area image;
the identification module is used for extracting a disconnecting link area image from the target character area image according to the disconnecting link position, calculating the feature similarity between the preset template character image and the disconnecting link area image, and determining the disconnecting link on-off state of a disconnecting link to be identified in the switch cabinet according to the feature similarity.
Preferably, the acquisition module comprises an inspection robot carrying a visible light camera.
Preferably, the preprocessing module specifically includes:
the gray module is used for carrying out gray processing on the disconnecting link image to be identified by adopting a weighted average method to obtain a gray image;
and the gray level enhancement module is used for carrying out gray level enhancement on the gray level image by adopting a histogram equalization method to obtain the image-enhanced disconnecting link image to be identified.
Preferably, the first positioning module specifically includes:
the binarization module is used for carrying out binarization processing on the to-be-identified knife-switch image enhanced by the image by adopting an OSTU dynamic threshold method to obtain a binarization image, wherein the binarization image is marked as B (i, j), 0< i < h, o < j < w, w and h respectively represent the total column number and the total row number of the binarization image, i represents the ith row, and j represents the jth column;
a first boolean projection module, configured to scan from the i-th line to the H/2-th line of the binarized image downward line by line, perform boolean projection on the local image of each line in the horizontal direction, obtain a projection value H (i, j), H (i, j) Σ B (i, j), i 1,2,3 …, H, and determine an upper boundary i where the first boundary satisfies H (i, j) is 0 and H (i-1, j) is 0up
A second boolean projection module, configured to scan from the ith line to the H/2 th line of the binarized image line by line, perform boolean projection on the local image of each line in the horizontal direction, and determine a lower boundary i that satisfies the first condition where H (i, j) is 0 and H (i-1, j) is 0down
A first culling module for removing the upper boundary iupAnd the lower boundary idownRemoving the images exceeding the boundary threshold value from the binarized image as upper and lower boundary thresholds to obtain a new image, and marking the new image as NewB (i)1,j1);
A third Boolean projection module for projecting the new image NewB (i)1,j1) I th of (1)1Line by line scanning down to i1=h1And/2, performing Boolean projection on the local image of each row in the horizontal direction, and determining that the first satisfies H (i)1,j1) 0 and H (i)1+1,j1) Line i of 0new_up(ii) a Wherein h is1For new images NewB (i)1,j1) Total number of rows of (c);
a fourth Boolean projection module for deriving a new image NewB (i)1,j1) H is1Line up line by line scanning to i1=h1And/2, performing Boolean projection on the local image of each line in the horizontal direction, and determining that the first local image satisfies H (i)1,j1) 0 and H (i)1-1,j1) Line i of 0new_downSo as to obtain the upper and lower boundaries of target character zone image respectively as line inew_upAnd row inew_down
A fifth boolean projection module, configured to scan from the j-th row to the W/2-th row rightward from the j-1-th row of the binarized image, boolean-project the local image of each row in the vertical direction, obtain a projection value W (i, j), determine a left boundary j where the first satisfies W (i, j) 0 and W (i-1, j) 0up;W(i,j)=∑B(i,j),j=1,2,3…,w;
A sixth boolean projection module, configured to scan the jth row W of the binarized image to the jth row W/2 row left, perform boolean projection on the local image in each row in the vertical direction, and determine that the first right boundary j satisfies W (i, j) 0 and W (i-1, j) 0down
A second culling module for culling the left boundary jupAnd the right boundary jdownRemoving the images exceeding the boundary threshold value from the binarized image as a left boundary threshold value and a right boundary threshold value to obtain a new image, and marking the new image as NewB (i)2,j2);
A seventh Boolean projection module for projecting a new image NewB (i)2,j2) J (d) of21 column to j line by line right2=w2And/2, performing Boolean projection on the local image of each column in the vertical direction, and determining that the first local image satisfies W (i)2,j2) 0 and H (i)1+1,j1) Column j of 0new_up(ii) a Wherein, w2For new images NewB (i)2,j2) The total number of columns;
an eighth Boolean projection module for projecting a new image NewB (i)2,j2) I ═ w2Column left line by line to j2=w2And/2, performing Boolean projection on the local image of each column in the vertical direction, and determining that the first local image satisfies W (i)2,j2) 0 and H (i)1+1,j1) Column j 0new_downSo as to obtain the left and right boundaries of the target character area image as column j respectivelynew_upAnd column jnew_down
In a third aspect, the present invention also provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the steps of the method implemented in the computer program.
In a fourth aspect, the invention also provides a computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the method as described above.
According to the technical scheme, the invention has the following advantages:
according to the method, after the acquired disconnecting link image is subjected to image enhancement, coarse positioning is carried out by using a morphological Boolean operation algorithm to obtain a target character area image, then the disconnecting link position is accurately positioned by using a SUFR feature matching algorithm, the feature similarity of a preset template character image and the disconnecting link area image is calculated, and the disconnecting link on-off state of the disconnecting link to be identified in the switch cabinet is determined according to the feature similarity, so that the monitoring efficiency and the accuracy of the disconnecting link on-off state are improved.
Drawings
Fig. 1 is a flowchart of a switch cabinet on-off state identification method based on SUFR template matching according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a switchgear separation and combination state identification system based on SUFR template matching according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
For convenience of understanding, please refer to fig. 1, the method for identifying the switch cabinet on-off state based on SUFR template matching provided by the present invention includes the following steps:
and S1, collecting the knife switch image to be identified in the switch cabinet.
It can be understood that most of newly-built transformer substations adopt GIS switch cabinets, and one set of switch cabinet equipment comprises a circuit breaker, an isolation switch and a grounding switch, and the on-off characters on the switches reflect the equipment state. The related images can be based on a visible light camera carried by the inspection robot to acquire the knife switch image to be identified in the switch cabinet.
And S2, preprocessing the switch image to be recognized to obtain an image-enhanced switch image to be recognized.
And S3, positioning a target character area image in the image-enhanced disconnecting link image to be recognized by adopting a morphological Boolean operation algorithm.
And S4, performing SUFR feature matching by using a preset template character image and a target character area image based on a SUFR feature matching algorithm, and positioning the position of a knife switch in the target character area image.
S5, extracting a disconnecting link area image from the target character area image according to the position of the disconnecting link, calculating the feature similarity between the preset template character image and the disconnecting link area image, and determining the disconnecting link on-off state of the disconnecting link to be identified in the switch cabinet according to the feature similarity.
It should be noted that, in order to accurately analyze the target image, useful feature information needs to be extracted from the image, so as to obtain some quantitative expressions of the image, in this embodiment, a SUFR feature matching algorithm is adopted, so that feature points that are the same in the template character image and the target character region image can be found, and then the position of the knife switch is located.
Because the SUFR feature matching algorithm adopted in this embodiment can perform feature matching according to the prior art, the maximum edge of the disconnecting link can be determined in the target character region image according to the disconnecting link position, and then the disconnecting link region image is extracted, wherein the disconnecting link region image includes a complete disconnecting link, the size of the disconnecting link region image can be scaled and adjusted so that the size of the disconnecting link region image is consistent with that of the template character image, the feature similarity between the preset template character image and the disconnecting link region image is calculated according to the euclidean distance, the disconnecting link on-off state of the disconnecting link to be identified in the switch cabinet is determined according to the feature similarity, wherein when the feature similarity is greater than the preset similarity, it can be determined whether the disconnecting link on-off state of the disconnecting link to be identified is consistent with the character in the template character image, wherein the template character image is one of the characters represented in two different switching-off states, such as "in" or "out".
Experiments prove that the time for identification by the method is less than 0.4s, the precision is 95%, the algorithm identification speed is high, the accuracy is high, and the requirement of mass data identification is met.
According to the switch cabinet on-off state identification method based on SUFR template matching, after the acquired disconnecting link image is subjected to image enhancement, rough positioning is carried out by using a morphological Boolean operation algorithm to obtain a target character area image, then the disconnecting link position is accurately positioned by using an SUFR characteristic matching algorithm, the characteristic similarity of a preset template character image and the disconnecting link area image is calculated, and the switch on-off state of a disconnecting link to be identified in a switch cabinet is determined according to the characteristic similarity, so that the monitoring efficiency and the accuracy of the switch on-off state are improved.
In a specific embodiment, step S2 specifically includes:
s201, graying the disconnecting link image to be recognized by adopting a weighted average method to obtain a gray image.
It can be understood that the original image obtained by the camera is an RGB image, and therefore, graying processing needs to be performed on the original RGB image, color information is removed, the amount of calculation is reduced, and the recognition speed is improved.
S202, carrying out gray level enhancement on the gray level image by adopting a histogram equalization method to obtain an image-enhanced disconnecting link image to be identified.
The gray level enhancement has the functions of highlighting the effective characteristics of the interested image, increasing the difference between useful information and interference information of the image and achieving the purpose of improving the image quality. The embodiment adopts a histogram equalization method to enhance the image, and the method describes the number of pixels of the gray value, the abscissa represents the gray value, and the ordinate represents the occurrence probability of the gray value.
In a specific embodiment, step S3 specifically includes:
s301, performing binarization processing on the to-be-identified knife-blade image subjected to image enhancement by adopting an OSTU dynamic threshold method to obtain a binarized image, wherein the binarized image is marked as B (i, j), 0< i < h, o < j < w, w and h respectively represent the total column number and the total row number of the binarized image, i represents the ith row, and j represents the jth column.
S302 scans from the i-1 st line of the binarized image to the i-H/2 th line of the binarized image line by line, performs boolean projection on the partial image of each line in the horizontal direction to obtain a projection value H (i, j), H (i, j) Σ B (i, j), i-1, 2,3 …, H, and determines an upper boundary i where the first satisfies H (i, j) 0 and H (i-1, j) 0up
S303, scanning the binary image from the i-H line to the i-H/2 line, performing boolean projection on the local image of each line in the horizontal direction, and determining a lower boundary i where H (i, j) is 0 and H (i-1, j) is 0down
S304 boundary i aboveupAnd a lower boundary idownRemoving the image exceeding the boundary threshold value from the binary image as the upper and lower boundary threshold values to obtain a new image, and marking the new image as NewB (i)1,j1);
S305, from the new image NewB (i)1,j1) I th of (1)1Line by line scanning down to i1=h1And/2, performing Boolean projection on the local image of each row in the horizontal direction, and determining that the first satisfies H (i)1,j1) 0 and H (i)1+1,j1) Line i of 0new_up(ii) a Wherein h is1For new images NewB (i)1,j1) Total number of rows of (c);
s306, from the new image NewB (i)1,j1) H is1Line up line by line scanning to i1=h1And/2, performing Boolean projection on the local image of each row in the horizontal direction, and determining that the first satisfies H (i)1,j1) 0 and H (i)1-1,j1) Line i of 0new_downSo as to obtain the upper and lower boundaries of target character zone image respectively as line inew_upAnd row inew_down
S307, scanning the binary image from the j-th to W/2-th columns of the binary image to the right row by row, performing Boolean projection on the local image of each column in the vertical direction to obtain a projection value W (i, j), and determining the first left boundary j meeting the condition that W (i, j) is 0 and W (i-1, j) is 0up;W(i,j)=∑B(i,j),j=1,2,3…,w;
S308, scanning the binary image from the j-th row to the W/2-th row to the left row by row, performing Boolean projection on the local image of each row in the vertical direction, and determining the right boundary j until the first boundary meets the condition that W (i, j) is 0 and W (i-1, j) is 0down
S309, with left boundary jupAnd a right boundary jdownRemoving the images exceeding the boundary threshold value from the binarized image as the left and right boundary threshold values to obtain a new image, and marking the new image as NewB (i)2,j2);
S310, from the new image NewB (i)2,j2) J (d) of21 column to j line by line right2=w2And/2, performing Boolean projection on the local image of each column in the vertical direction, and determining that the first local image satisfies W (i)2,j2) 0 and H (i)1+1,j1) Column j 0new_up(ii) a Wherein w2New image NewB (i)2,j2) The total number of columns;
s311, from the new image NewB (i)2,j2) I ═ w2Column left line by line to j2=w2And/2, performing Boolean projection on the local image of each column in the vertical direction, and determining that the first local image satisfies W (i)2,j2) 0 and H (i)1+1,j1) Column j 0new_downSo as to obtain the left and right boundaries of the target character area image as column j respectivelynew_upAnd column jnew_down
It can be understood that the accurate region positions of the characters of the switch cabinet can be positioned by obtaining the upper, lower, left and right boundaries of the target character region image, unnecessary regions are effectively removed, the target region is better extracted and determined, the position desired by a user is obtained, the operation steps are simplified, the operation time is reduced, and accurate positioning is realized.
The above is a detailed description of an embodiment of a switch cabinet on-off state identification method based on SUFR template matching provided by the present invention, and the following is a detailed description of an embodiment of a switch cabinet on-off state identification system based on SUFR template matching provided by the present invention.
For convenience of understanding, please refer to fig. 2, the switch cabinet on-off state recognition system based on SUFR template matching provided by the present invention includes:
the acquisition module 100 is used for acquiring an image of the disconnecting link to be identified in the switch cabinet;
the preprocessing module 200 is configured to preprocess the switch image to be identified to obtain an image-enhanced switch image to be identified;
the first positioning module 300 is configured to position a target character area image in the image-enhanced disconnecting link image to be identified by using a morphological boolean operation algorithm;
the second positioning module 400 is configured to perform SUFR feature matching on the basis of a SUFR feature matching algorithm by using a preset template character image and a target character region image, and position a knife switch position in the target character region image;
the identification module 500 is configured to extract a disconnecting link area image from the target character area image according to the position of the disconnecting link, calculate a feature similarity between a preset template character image and the disconnecting link area image, and determine a disconnecting link on-off state of the disconnecting link to be identified in the switch cabinet according to the feature similarity.
In one embodiment, the acquisition module includes an inspection robot that carries a visible light camera.
In a specific embodiment, the preprocessing module specifically includes:
the gray module is used for carrying out gray processing on the disconnecting link image to be identified by adopting a weighted average method to obtain a gray image;
and the gray level enhancement module is used for carrying out gray level enhancement on the gray level image by adopting a histogram equalization method to obtain the image-enhanced disconnecting link image to be identified.
In a specific embodiment, the first positioning module specifically includes:
the binarization module is used for carrying out binarization processing on the to-be-identified knife-switch image enhanced by the image by adopting an OSTU dynamic threshold method to obtain a binarization image, wherein the binarization image is marked as B (i, j), 0< i < h, o < j < w, w and h respectively represent the total column number and the total row number of the binarization image, i represents the ith row, and j represents the jth column;
a first boolean projection module, configured to scan from the i-th line to the H/2-th line of the binarized image downward line by line, boolean-project the local image of each line in the horizontal direction, obtain a projection value H (i, j), H (i, j) Σ B (i, j), i 1,2,3 …, H, and determine an upper boundary i that first satisfies H (i, j) 0 and H (i-1, j) 0up
A second boolean projection module, which is used to scan the i-H line of the binary image to the i-H/2 line by line, make boolean projection to the horizontal direction of the local image of each line, and determine the first lower boundary i satisfying H (i, j) 0 and H (i-1, j) 0down
A first culling module for the above boundary iupAnd a lower boundary idownRemoving the image exceeding the boundary threshold value from the binary image as the upper and lower boundary threshold values to obtain a new image, and marking the new image as NewB (i)1,j1);
A third Boolean projection module for deriving a new image NewB (i)1,j1) I th of (1)1Line by line scanning down to i1=h1And/2, performing Boolean projection on the local image of each row in the horizontal direction, and determining that the first satisfies H (i)1,j1) 0 and H (i)1+1,j1) Line i of 0new_up(ii) a Wherein h is1For new images NewB (i)1,j1) Total number of rows of (c);
a fourth Boolean projection module for deriving a new image NewB (i)1,j1) H1Line up line by line scanning to i1=h1And/2, performing Boolean projection on the local image of each row in the horizontal direction, and determining that the first satisfies H (i)1,j1) 0 and H (i)1-1,j1) Line i of 0new_downThereby obtaining the upper and lower boundary boundaries of the target character region imageIs other than row inew_upAnd row inew_down
A fifth boolean projection module, configured to scan from the j-th row of the binarized image to the W/2 th row rightward, perform boolean projection on the local image in each row in the vertical direction, obtain a projection value W (i, j), determine a first left boundary j that satisfies W (i, j) 0 and W (i-1, j) 0up;W(i,j)=∑B(i,j),j=1,2,3…,w;
A sixth boolean projection module, configured to scan the binarized image from the j-th W column to the left row by row to the j-th W/2 column, perform boolean projection on the local image in each column in the vertical direction, and determine that the first right boundary j satisfies W (i, j) 0 and W (i-1, j) 0down
A second culling module for dividing the left boundary jupAnd a right boundary jdownRemoving the images exceeding the boundary threshold value from the binarized image as left and right boundary thresholds to obtain a new image, and marking the new image as NewB (i)2,j2);
A seventh Boolean projection module for projecting a new image NewB (i)2,j2) J (d) of21 column to j line by line right2=w2And/2, performing Boolean projection on the local image of each column in the vertical direction, and determining that the first local image satisfies W (i)2,j2) 0 and H (i)1+1,j1) Column j 0new_up(ii) a Wherein w2For new images NewB (i)2,j2) The total number of columns;
an eighth Boolean projection module for projecting a new image NewB (i)2,j2) I ═ w2Column left line by line to j2=w2And/2, performing Boolean projection on the local image of each column in the vertical direction, and determining that the first local image satisfies W (i)2,j2) 0 and H (i)1+1,j1) Column j of 0new_downSo as to obtain the left and right boundaries of the target character area image as column j respectivelynew_upAnd column jnew_down
The invention also provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method when executing the computer program.
The invention also provides a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention, which is substantially or partly contributed by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for executing all or part of the steps of the method according to the embodiments of the present invention by a computer device (which may be a personal computer, a server, or a network device). And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A switch cabinet on-off state identification method based on SUFR template matching is characterized by comprising the following steps:
s1, acquiring a disconnecting link image to be identified in the switch cabinet;
s2, preprocessing the disconnecting link image to be identified to obtain an image-enhanced disconnecting link image to be identified;
s3, positioning a target character area image in the image-enhanced disconnecting link image to be identified by adopting a morphological Boolean operation algorithm;
s4, performing SUFR feature matching by using a preset template character image and the target character area image based on a SUFR feature matching algorithm, and positioning a knife switch position in the target character area image;
s5, extracting a disconnecting link area image from the target character area image according to the disconnecting link position, calculating the feature similarity between the preset template character image and the disconnecting link area image, and determining the disconnecting link on-off state of a disconnecting link to be identified in the switch cabinet according to the feature similarity.
2. The method for identifying the switching on/off state of the switch cabinet based on the SUFR template matching as claimed in claim 1, wherein step S1 specifically includes:
the method comprises the steps of collecting a disconnecting link image to be identified in a switch cabinet based on a visible light camera carried by a patrol robot.
3. The method for identifying the switching on/off state of the switch cabinet based on the SUFR template matching as claimed in claim 1, wherein step S2 specifically includes:
s201, graying the disconnecting link image to be identified by adopting a weighted average method to obtain a grayscale image;
s202, carrying out gray level enhancement on the gray level image by adopting a histogram equalization method to obtain an image-enhanced disconnecting link image to be identified.
4. The method for identifying the switching on/off state of the switch cabinet based on the SUFR template matching as claimed in claim 1, wherein step S3 specifically includes:
s301, performing binarization processing on the to-be-identified knife-blade image subjected to image enhancement by adopting an OSTU dynamic threshold method to obtain a binarized image, wherein the binarized image is marked as B (i, j), 0< i < h, o < j < w, w and h respectively represent the total column number and the total row number of the binarized image, i represents the ith row, and j represents the jth column;
s302, scanning the binary image from the i-th line to the H/2-th line downward line by line, boolean projecting the local image of each line in the horizontal direction to obtain a projection value H (i, j), H (i, j) ∑ B (i, j), i ═ 1,2,3 …, H, and determining an upper boundary i where the first satisfies H (i, j) ═ 0 and H (i-1, j) ═ 0up
S303, scanning from the ith to ith of the binary image line by line upwardsPerforming Boolean projection on the local image of each line in the horizontal direction to determine a lower boundary i satisfying that H (i, j) is 0 and H (i-1, j) is 0down
S304, using the upper boundary iupAnd said lower boundary idownRemoving the images exceeding the boundary threshold value from the binarized image as upper and lower boundary thresholds to obtain a new image, and marking the new image as NewB (i)1,j1);
S305, from the new image NewB (i)1,j1) I th of (1)1Line by line scanning down to i1=h1And/2, performing Boolean projection on the local image of each row in the horizontal direction, and determining that the first satisfies H (i)1,j1) 0 and H (i)1+1,j1) Line i of 0new_up(ii) a Wherein h is1For new images NewB (i)1,j1) Total number of rows of (c);
s306, from the new image NewB (i)1,j1) H1Line up line by line scanning to i1=h1And/2, performing Boolean projection on the local image of each row in the horizontal direction, and determining that the first satisfies H (i)1,j1) 0 and H (i)1-1,j1) Line i of 0new_downThereby obtaining the upper and lower boundaries of the target character area image as lines i respectivelynew_upAnd row inew_down
S307, scanning the binarized image from the j-th to W/2-th columns of the binarized image to the right row by row, performing boolean projection on the local image of each column in the vertical direction to obtain a projection value W (i, j), and determining a left boundary j where the first boundary j satisfies W (i, j) 0 and W (i-1, j) 0up;W(i,j)=∑B(i,j),j=1,2,3…,w;
S308, scanning the binarized image from the j-th W-th column to the j-th W/2 column line by line to the left, performing boolean projection on the local image of each column in the vertical direction, and determining a right boundary j of the first row satisfying W (i, j) 0 and W (i-1, j) 0down
S309, using the left boundary jupAnd the right boundary jdownRemoving the binary image beyond the left and right boundary thresholdsThe image of the boundary threshold value obtains a new image, which is marked as NewB (i)2,j2);
S310, from the new image NewB (i)2,j2) J (d) of21 column to j line by line right2=w2And/2, performing Boolean projection on the local image of each column in the vertical direction, and determining that the first local image satisfies W (i)2,j2) 0 and H (i)1+1,j1) Column j 0new_up(ii) a Wherein, w2New image NewB (i)2,j2) The total number of columns;
s311, from the new image NewB (i)2,j2) W2Column left line by line to j2=w2And/2, performing Boolean projection on the local image of each column in the vertical direction, and determining that the first local image satisfies W (i)2,j2) 0 and H (i)1+1,j1) Column j 0new_downSo as to obtain the left and right boundaries of the target character area image as column j respectivelynew_upAnd column jnew_down
5. Cubical switchboard divides closed state identification system based on SUFR template matching, its characterized in that includes:
the acquisition module is used for acquiring the disconnecting link image to be identified in the switch cabinet;
the preprocessing module is used for preprocessing the disconnecting link image to be identified to obtain an image-enhanced disconnecting link image to be identified;
the first positioning module is used for positioning a target character area image in the image-enhanced disconnecting link image to be identified by adopting a morphological Boolean operation algorithm;
the second positioning module is used for carrying out SUFR feature matching on the basis of an SUFR feature matching algorithm by utilizing a preset template character image and the target character area image so as to position the position of a disconnecting link in the target character area image;
the identification module is used for extracting a disconnecting link area image from the target character area image according to the disconnecting link position, calculating the feature similarity between the preset template character image and the disconnecting link area image, and determining the disconnecting link on-off state of a disconnecting link to be identified in the switch cabinet according to the feature similarity.
6. The system for identifying the switching on and off states of the switch cabinets based on the SUFR template matching as claimed in claim 5, wherein the acquisition module comprises an inspection robot carrying a visible light camera.
7. The system for identifying the switching on and off states of the switch cabinet based on the SUFR template matching as claimed in claim 5, wherein the preprocessing module specifically comprises:
the gray module is used for carrying out gray processing on the disconnecting link image to be identified by adopting a weighted average method to obtain a gray image;
and the gray level enhancement module is used for carrying out gray level enhancement on the gray level image by adopting a histogram equalization method to obtain the image-enhanced disconnecting link image to be identified.
8. The system for identifying the switching on and off states of the switch cabinet based on the SUFR template matching as claimed in claim 5, wherein the first positioning module specifically comprises:
the binarization module is used for carrying out binarization processing on the to-be-identified knife-switch image enhanced by the image by adopting an OSTU dynamic threshold method to obtain a binarization image, wherein the binarization image is marked as B (i, j), 0< i < h, o < j < w, w and h respectively represent the total column number and the total row number of the binarization image, i represents the ith row, and j represents the jth column;
a first boolean projection module, configured to scan from the i-th line to the H/2-th line of the binarized image downward line by line, perform boolean projection on the local image of each line in the horizontal direction, obtain a projection value H (i, j), H (i, j) Σ B (i, j), i 1,2,3 …, H, and determine an upper boundary i where the first boundary satisfies H (i, j) is 0 and H (i-1, j) is 0up
A second boolean projection module, configured to scan from the ith row to the ith row of the binarized image line by line, perform boolean projection on the local image of each row in the horizontal direction, and determine a first lower boundary that satisfies H (i, j) 0 and H (i-1, j) 0idown
A first culling module for removing the upper boundary iupAnd said lower boundary idownRemoving the images exceeding the boundary threshold value from the binarized image as upper and lower boundary thresholds to obtain a new image, and marking the new image as NewB (i)1,j1);
A third Boolean projection module for deriving a new image NewB (i)1,j1) I th of (1)1Line by line scanning down to i1=h1And/2, performing Boolean projection on the local image of each row in the horizontal direction, and determining that the first satisfies H (i)1,j1) 0 and H (i)1+1,j1) Line i of 0new_up(ii) a Wherein h is1For new images NewB (i)1,j1) Total number of rows of (c);
a fourth Boolean projection module for deriving a new image NewB (i)1,j1) H1Line up line by line scanning to i1=h1And/2, performing Boolean projection on the local image of each row in the horizontal direction, and determining that the first satisfies H (i)1,j1) 0 and H (i)1-1,j1) Line i of 0new_downThereby obtaining the upper and lower boundaries of the target character area image as lines i respectivelynew_upAnd row inew_down
A fifth boolean projection module, configured to scan from the j-th row of the binarized image to the j-th row W/2 row rightward, perform boolean projection on the local image in each row in the vertical direction, obtain a projection value W (i, j), determine a first left boundary j that satisfies W (i, j) 0 and W (i-1, j) 0up;W(i,j)=∑B(i,j),j=1,2,3…,w;
A sixth boolean projection module, configured to scan from the j-th row to the W-th row of the binarized image to the left row by row, perform boolean projection on the local image in each row in the vertical direction, and determine that the j is the right boundary where the first W (i, j) is 0 and W (i-1, j) is 0down
A second culling module for culling the left boundary jupAnd the right boundary jdownEliminating the binary image as left and right boundary threshold valuesThe image exceeding the boundary threshold value obtains a new image, and the new image is marked as NewB (i)2,j2);
A seventh Boolean projection module for projecting a new image NewB (i)2,j2) J (d) of21 column to j line by line right2=w2And/2, performing Boolean projection on the local image of each column in the vertical direction, and determining that the first local image satisfies W (i)2,j2) 0 and H (i)1+1,j1) Column j 0new_up(ii) a Wherein, w2For new images NewB (i)2,j2) The total number of columns;
an eighth Boolean projection module for projecting a new image NewB (i)2,j2) I ═ w2Column left line by line to j2=w2And/2, performing Boolean projection on the local image of each column in the vertical direction, and determining that the first local image satisfies W (i)2,j2) 0 and H (i)1+1,j1) Column j 0new_downSo as to obtain the left and right boundaries of the target character area image as column j respectivelynew_upAnd column jnew_down
9. An electronic device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor realizes the steps of the method of any of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 4.
CN202210311039.XA 2022-03-28 2022-03-28 Switch cabinet on-off state identification method and system based on SUFR template matching Pending CN114639022A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210311039.XA CN114639022A (en) 2022-03-28 2022-03-28 Switch cabinet on-off state identification method and system based on SUFR template matching

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210311039.XA CN114639022A (en) 2022-03-28 2022-03-28 Switch cabinet on-off state identification method and system based on SUFR template matching

Publications (1)

Publication Number Publication Date
CN114639022A true CN114639022A (en) 2022-06-17

Family

ID=81949248

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210311039.XA Pending CN114639022A (en) 2022-03-28 2022-03-28 Switch cabinet on-off state identification method and system based on SUFR template matching

Country Status (1)

Country Link
CN (1) CN114639022A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116907349A (en) * 2023-09-12 2023-10-20 北京宝隆泓瑞科技有限公司 Universal switch state identification method based on image processing

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116907349A (en) * 2023-09-12 2023-10-20 北京宝隆泓瑞科技有限公司 Universal switch state identification method based on image processing
CN116907349B (en) * 2023-09-12 2023-12-08 北京宝隆泓瑞科技有限公司 Universal switch state identification method based on image processing

Similar Documents

Publication Publication Date Title
CN106610969A (en) Multimodal information-based video content auditing system and method
CN110133443B (en) Power transmission line component detection method, system and device based on parallel vision
CN113888462A (en) Crack identification method, system, readable medium and storage medium
CN112115807A (en) Transformer substation secondary equipment switching operation anti-error simulation method and system based on image recognition
CN116311201A (en) Substation equipment state identification method and system based on image identification technology
CN113297420A (en) Video image processing method and device, storage medium and electronic equipment
CN114639022A (en) Switch cabinet on-off state identification method and system based on SUFR template matching
CN107369162B (en) Method and system for generating insulator candidate target area
CN110569848A (en) feature extraction method and system for power equipment nameplate
CN110321890A (en) A kind of digital instrument recognition methods of electric inspection process robot
CN111985488B (en) Target detection segmentation method and system based on offline Gaussian model
CN114627463B (en) Non-contact power distribution data identification method based on machine identification
Saranya et al. An approach towards ear feature extraction for human identification
CN115830342A (en) Method and device for determining detection frame, storage medium and electronic device
CN113657196B (en) SAR image target detection method, SAR image target detection device, electronic equipment and storage medium
CN111488889B (en) Intelligent image processor for extracting image edges
Zhang et al. Research on multiple features extraction technology of insulator images
CN111767777B (en) Transformer substation disconnecting switch state analysis method based on image processing algorithm
CN110310274B (en) Plant flower number detection method
CN113643234A (en) Composite insulator damage detection method, terminal equipment and readable storage medium
Choubey et al. Bilateral Partitioning based character recognition for Vehicle License plate
Cheng et al. Text Detection of Transformer Based on Deep Learning Algorithm
CN114842006B (en) Digital twin station power line detection method and related device thereof
CN114926635B (en) Target segmentation method in multi-focus image combined with deep learning method
CN115937229B (en) Three-dimensional automatic segmentation method and device based on super-voxel and graph cutting algorithm

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