CN114219818A - Rigid contact net positioning wire clamp clamping stagnation detection method and device, computer equipment and storage medium - Google Patents

Rigid contact net positioning wire clamp clamping stagnation detection method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN114219818A
CN114219818A CN202111352012.7A CN202111352012A CN114219818A CN 114219818 A CN114219818 A CN 114219818A CN 202111352012 A CN202111352012 A CN 202111352012A CN 114219818 A CN114219818 A CN 114219818A
Authority
CN
China
Prior art keywords
image
wire clamp
positioning wire
straight line
positioning
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
CN202111352012.7A
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.)
Chengdu Tangyuan Electric Co Ltd
Original Assignee
Chengdu Tangyuan Electric 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 Chengdu Tangyuan Electric Co Ltd filed Critical Chengdu Tangyuan Electric Co Ltd
Priority to CN202111352012.7A priority Critical patent/CN114219818A/en
Publication of CN114219818A publication Critical patent/CN114219818A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • 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
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • 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
    • G06T2207/30164Workpiece; Machine component

Landscapes

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

Abstract

The invention discloses a method and a device for detecting clamping stagnation of a positioning wire clamp of a rigid contact net, computer equipment and a storage medium, and relates to the field of intelligent image identification of contact nets. The method comprises the steps of sequentially carrying out image enhancement, image edge segmentation, Hough transformation detection line, line screening and merging and line gray difference on a positioning wire clamp image to be detected to obtain a busbar direction line, cutting out a strip area image according to the busbar direction line, rotating and cutting the cut area image to obtain a final candidate strip image, carrying out binarization and connected domain extraction on the final candidate strip image to extract a positioning wire clamp area, carrying out included angle calculation based on a positioning wire clamp boundary and the busbar direction, and judging whether the positioning wire clamp is clamped or not according to an included angle calculation result. The invention has the advantages of high identification speed and high identification accuracy, and can realize the automatic identification and detection of the whole process by identifying a single picture in millisecond level.

Description

Rigid contact net positioning wire clamp clamping stagnation detection method and device, computer equipment and storage medium
Technical Field
The invention relates to the technical field of intelligent image identification of a rail transit overhead line system, in particular to a method and a device for detecting clamping stagnation of a positioning wire clamp of a rigid overhead line system, computer equipment and a storage medium.
Background
At present, overhead rigid contact networks are commonly used for supplying power to trains in the process of construction and operation of many urban rail transit nationwide. The rigid suspension contact net mainly comprises a bus bar, a contact wire, an insulation element and a suspension device, and the composite rigid suspension bus bar positioning wire clamp plays an important role as the suspension device of the contact net. In actual operation, the positioning wire clamp has the faults of looseness, clamping stagnation, falling and the like for many times, and serious faults of the positioning wire clamp even can cause the contact wire to fall off to cause a bow net accident.
The patent of the invention discloses a positioning wire clamp falling detection system and method based on image processing, wherein the national intellectual property office is 6/23/2020, and the publication number is CN111325147A, and the invention discloses that a positioning wire clamp image acquisition end acquires an image of a positioning wire clamp of a contact net and sends the image of the positioning wire clamp to a positioning wire clamp image processing end; the positioning wire clamp image processing end processes and analyzes the positioning wire clamp image, judges whether the positioning wire clamp falls off or not, and sends out an alarm if the positioning wire clamp falls off; and after the positioning wire clamp position information is superposed on the positioning wire clamp image, the positioning wire clamp image is stored.
The prior art can only detect the falling fault of the positioning wire clamp, and can not detect whether the clamping stagnation fault occurs in the positioning wire clamp which does not fall off. At present, the detection of the clamping stagnation fault of the positioning wire clamp still limits the stage of manually checking a high-definition image of the positioning wire clamp at the later stage, the clamping stagnation fault of the positioning wire clamp in a contact net suspension part is manually identified, the workload is large, and the identification efficiency is low.
Disclosure of Invention
In order to overcome the defects and shortcomings in the prior art, the invention provides a clamping stagnation detection method and device for a positioning wire clamp of a rigid contact net, computer equipment and a storage medium. The method comprises the steps of sequentially carrying out image enhancement, image edge segmentation, Hough transformation detection line, line screening and merging and line gray difference on a positioning wire clamp image to be detected to obtain a busbar direction line, cutting out a strip area image according to the busbar direction line, rotating and cutting the cut area image to obtain a final candidate strip image, carrying out binarization and connected domain extraction on the final candidate strip image to extract a positioning wire clamp area, carrying out included angle calculation based on a positioning wire clamp boundary and the busbar direction, and judging whether the positioning wire clamp is clamped or not according to an included angle calculation result. The invention has the advantages of high identification speed and high identification accuracy, a single picture can reach millisecond speed, the identification accuracy is more than 85 percent, and the automatic identification and detection of the whole process can be realized.
In order to solve the problems in the prior art, the invention is realized by the following technical scheme:
the invention provides a method for detecting clamping stagnation of a positioning wire clamp of a rigid contact net, which comprises the following steps:
s1, acquiring an image to be detected, wherein the image to be detected comprises a positioning wire clamp and a busbar;
s2, sequentially carrying out histogram equalization, image edge segmentation, Hough transformation line detection, line screening and merging and line gray difference on an image to be detected to obtain a bus direction line;
s3, linearly intercepting candidate strip-shaped area images according to the bus direction;
s4, rotating and cutting the candidate strip-shaped area image to obtain a final candidate strip-shaped image;
s5, performing binarization processing and connected domain extraction on the final candidate strip-shaped image, and extracting a positioning wire clamp region;
and S6, extracting a positioning wire clamp boundary straight line according to the positioning wire clamp area, calculating an included angle between the positioning wire clamp boundary straight line and the busbar direction, and if the included angle is larger than a set threshold, representing that the positioning wire clamp has a clamping stagnation fault.
In the step S2, the discrete form formula of histogram equalization is as follows:
Figure BDA0003356148830000021
wherein, T (r)k) Is a gray scale rkImage equalization transformation, MN is the total number of image pixels, L is the number of gray levels of the image, njIs gray scale of rkThe number of pixels.
In the step S2, image edge segmentation, specifically, performing binarization processing on the image after histogram equalization processing, and then performing edge detection by a canny operator to obtain an image edge; the Hough transform straight line detection is straight line detection for Hough transform based on the image edge.
In the step S2, after straight lines in the image are obtained through hough transform straight line detection, the straight lines are screened and merged, specifically, straight lines which do not conform to the conventional bus bar direction and are too short in length are removed, and then straight lines with similar directions in the remaining straight lines are merged.
The linear gray level difference specifically includes: calculating the difference value of the sum of the gray levels of the two side sections of the merged straight line, and finally determining the edge straight line of the bus bar so as to obtain the straight line in the bus bar direction;
the formula of the gray difference is as follows:
Figure BDA0003356148830000022
wherein G isDIFF(x, y) is a gray difference value at the image (x, y), N is a calculation interval, g (x, y) is a gray value of a pixel point (x, y), j is a summation item serial number in the calculation interval, and abs is an absolute value function.
In the step S4, perspective transformation is performed on the candidate bar-shaped region image, and the candidate bar-shaped region image is rotated until the bus bar is in the vertical direction; the perspective transformation formula is as follows:
Figure BDA0003356148830000031
wherein (u, v) is an original image pixel coordinate, w is a z-axis coordinate of the image, the image is a two-dimensional image, w is 1, and the transformed image coordinate is obtained by dividing w ', that is, (x ═ x '/w ', y ═ y '/w ') is the transformed image pixel coordinate;
Figure BDA0003356148830000032
representing a linear transformation of the image;
T2=[a13 a23]Tfor generating a perspective transformation of the image;
T3=[a31 a32]representing image translation;
and cutting the rotated image according to the pixel distribution to obtain a final candidate strip image.
After the candidate strip-shaped area is rotated to the vertical direction of the busbar, step S6 determines whether the positioning clip is stuck according to the included angle between the positioning clip boundary line and the busbar direction and the slope direction.
The second aspect of the invention provides a clamping stagnation detection device for a positioning wire clamp of a rigid contact network, which comprises:
the device comprises an image acquisition module to be detected, a processing module and a control module, wherein the image acquisition module to be detected is used for acquiring an image to be detected, and the acquired image to be detected comprises a positioning wire clamp and a busbar;
the bus bar direction straight line acquisition module is used for sequentially carrying out histogram equalization, image edge segmentation, Hough transformation straight line detection, straight line screening and merging and straight line gray level difference on an image to be detected to obtain a bus bar direction straight line;
the candidate strip-shaped area image acquisition module is used for intercepting candidate strip-shaped area images according to the bus direction straight line obtained in the bus direction straight line acquisition module;
the final candidate strip-shaped image acquisition module is used for rotating and cutting the candidate strip-shaped area image to obtain a final candidate strip-shaped image;
the positioning wire clamp area acquisition module is used for carrying out binarization processing and connected domain extraction on the final candidate strip-shaped image and extracting a positioning wire clamp area;
the positioning wire clamp clamping stagnation fault determination module extracts a positioning wire clamp boundary straight line according to the positioning wire clamp area, calculates an included angle between the positioning wire clamp boundary straight line and the busbar direction, and represents that the positioning wire clamp has a clamping stagnation fault if the included angle is larger than a set threshold value.
In the bus bar direction straight line acquisition module, a discrete form formula of histogram equalization is as follows:
Figure BDA0003356148830000041
wherein, T (r)k) Is a gray scale rkImage equalization transformation, MN is the total number of image pixels, L is the number of gray levels of the image, njIs gray scale of rkThe number of pixels.
In the bus bar direction straight line acquisition module, image edge segmentation, specifically, performing binarization processing on an image after histogram equalization processing, and then performing edge detection of a canny operator to obtain an image edge; the Hough transform straight line detection is straight line detection for Hough transform based on the image edge.
In the bus bar direction straight line acquisition module, after straight lines in an image are obtained through Hough transform straight line detection, the straight lines are screened and combined, specifically, straight lines which do not accord with the conventional bus bar direction and are too short in length are removed, and then straight lines with similar directions in the remaining straight lines are combined; the linear gray level difference specifically includes: and calculating the difference value of the sum of the gray levels of the two side sections of the merged straight line, and finally determining the edge straight line of the bus bar so as to obtain the straight line in the bus bar direction.
The formula of the gray difference is as follows:
Figure BDA0003356148830000042
wherein G isDIFF(x, y) is a gray-scale difference value at the image (x, y), N isAnd calculating the interval, wherein g (x, y) is the gray value of the pixel point (x, y), j is the serial number of the summation item in the calculation interval, and abs is an absolute value function.
In the final candidate strip-shaped image acquisition module, perspective transformation is carried out on the candidate strip-shaped area images, and the candidate strip-shaped area images are rotated to the vertical direction of the bus bar; the perspective transformation formula is as follows:
Figure BDA0003356148830000043
wherein (u, v) is an original image pixel coordinate, w is a z-axis coordinate of the image, the image is a two-dimensional image, w is 1, and the transformed image coordinate is obtained by dividing w ', that is, (x ═ x '/w ', y ═ y '/w ') is the transformed image pixel coordinate;
Figure BDA0003356148830000044
representing a linear transformation of the image;
T2=[a13 a23]Tfor generating a perspective transformation of the image;
T3=[a31 a32]representing image translation;
and cutting the rotated image according to the pixel distribution to obtain a final candidate strip image.
And after the candidate strip-shaped area rotates to the busbar in the vertical direction, the positioning wire clamp clamping stagnation fault determination module determines whether clamping stagnation exists in the positioning wire clamp according to the included angle between the boundary line of the positioning wire clamp and the busbar direction and the slope direction.
A third aspect of the present invention provides a computer apparatus comprising a processor, an input device, an output device and a memory, the processor, the input device, the output device and the memory being interconnected, wherein the memory is adapted to store a computer program comprising program instructions, and wherein the processor is configured to invoke the program instructions to perform some or all of the steps as described in the first aspect of the present invention.
A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program causes a computer to perform some or all of the steps as described in the first aspect of the present invention.
Compared with the prior art, the beneficial technical effects brought by the invention are as follows:
1. the invention has the advantages of high recognition speed and millisecond-level speed of a single picture. Meanwhile, the recognition accuracy is high, and the recognition accuracy in the existing data is over 85 percent. Meanwhile, the scheme does not depend on any priori knowledge, is a complete unsupervised detection mode and has strong practicability. As long as the input image is shot according to the fixed visual angle, the automatic identification of the whole process can be realized.
2. The positioning principle of the positioning wire clamp area is as follows: and determining the direction of the bus bar based on Hough transform line detection, and calculating the gray scales of the bus bar and the positioning wire clamp through image operation so as to determine the position of the positioning wire clamp area. According to the invention, the positioning wire clamp can be quickly positioned according to the direction characteristics of the bus bar and the gray characteristics of the bus bar and the positioning wire clamp, and compared with the prior art, the positioning wire clamp has higher identification efficiency and higher identification accuracy.
3. The method judges the clamping stagnation fault of the positioning wire clamp according to the included angle between the edge of the positioning wire clamp and the busbar, and has the advantages of less calculation amount, high fault identification efficiency and high fault identification precision.
Drawings
FIG. 1 is a flow chart of a method for detecting clamping stagnation of a positioning wire clamp of a rigid contact network;
FIG. 2 is an image of a positioning clamp to be detected;
FIG. 3 is a partial image of a normal state of a positioning clamp;
FIG. 4 is a partial image of a localization cable clamp stuck fault condition;
FIG. 5 is a processed image of an image to be detected of a positioning wire clamp after Hough transform straight line detection;
FIG. 6 is a candidate stripe region image;
FIG. 7 is a final candidate bar image;
FIG. 8 is an image of a locating clip area;
fig. 9 is an image of a target area of a positioning clip.
Detailed Description
The technical solution of the present invention is further elaborated below with reference to specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1
As a preferred embodiment of the present invention, the present embodiment discloses: a method for detecting clamping stagnation of a positioning wire clamp of a rigid contact net comprises the following steps:
s1, acquiring an image to be detected, wherein the image to be detected comprises a positioning wire clamp and a busbar;
s2, sequentially carrying out histogram equalization, image edge segmentation, Hough transformation line detection, line screening and merging and line gray difference on an image to be detected to obtain a bus direction line;
s3, linearly intercepting candidate strip-shaped area images according to the bus direction;
s4, rotating and cutting the candidate strip-shaped area image to obtain a final candidate strip-shaped image;
s5, performing binarization processing and connected domain extraction on the final candidate strip-shaped image, and extracting a positioning wire clamp region;
and S6, extracting a positioning wire clamp boundary straight line according to the positioning wire clamp area, calculating an included angle between the positioning wire clamp boundary straight line and the busbar direction, and if the included angle is larger than a set threshold, representing that the positioning wire clamp has a clamping stagnation fault.
As an implementation manner of this embodiment, in the step S2, the discrete form formula of histogram equalization is as follows:
Figure BDA0003356148830000061
wherein, T (r)k) Is a gray scale rkImage equalization transformation, MN is the total number of image pixels, L is the number of gray levels of the image, njIs gray scale of rkThe number of pixels.
As another embodiment of this embodiment, in step S2, the image edge segmentation specifically includes performing binarization processing on the image after histogram equalization processing, and then performing edge detection by a canny operator to obtain an image edge; the Hough transform straight line detection is straight line detection for Hough transform based on the image edge.
As another implementation manner of this embodiment, in step S2, after straight lines in an image are obtained through hough transform straight line detection, the straight lines are screened and merged, specifically, straight lines that do not conform to the conventional bus bar direction and have too short length are removed, and then straight lines with similar directions in the remaining straight lines are merged; the linear gray level difference specifically includes: and calculating the difference value of the sum of the gray levels of the two side sections of the merged straight line, and finally determining the edge straight line of the bus bar so as to obtain the straight line in the bus bar direction.
Further, the formula of the gray difference is as follows:
Figure BDA0003356148830000071
wherein G isDIFF(x, y) is a gray difference value at the image (x, y), N is a calculation interval, g (x, y) is a gray value of a pixel point (x, y), j is a summation item serial number in the calculation interval, and abs is an absolute value function.
As another implementation manner of this embodiment, in the step S4, perspective transformation is performed on the candidate bar-shaped region image, and the candidate bar-shaped region image is rotated until the busbar is in the vertical direction; the perspective transformation formula is as follows:
Figure BDA0003356148830000072
wherein (u, v) is the pixel coordinate of the original image, w is the z-axis coordinate of the image, the image is a two-dimensional image, w is 1, and the transformed image coordinate is obtained by dividing w ', that is, (x ═ x '/w ', y ═ y '/w ') is transformedSubsequent image pixel coordinates;
Figure BDA0003356148830000073
representing a linear transformation of the image;
T2=[a13 a23]Tfor generating a perspective transformation of the image;
T3=[a31 a32]representing image translation;
and cutting the rotated image according to the pixel distribution to obtain a final candidate strip image. After the candidate strip-shaped area is rotated to the vertical direction of the busbar, step S6 determines whether the positioning clip is stuck according to the included angle between the positioning clip boundary line and the busbar direction and the slope direction.
As another implementation manner of this embodiment, in step S5, the final candidate bar-shaped image is subjected to binarization processing, the binarized image is subjected to opening and closing operations, and the maximum connected domain that meets the condition is extracted, that is, the position of the positioning clip is extracted.
Example 2
As another preferred embodiment of the present invention, referring to the attached drawings 1-8 of the specification, the embodiment discloses: a method for detecting clamping stagnation of a positioning clamp of a rigid contact net is shown in a specific flow chart in figure 1.
As shown in fig. 2, fig. 2 is original image data of the positioning wire clamp, the black disc-shaped object at the upper part in fig. 2 is an insulator, the middle part is bright, the part of the inclined-span image is a bus bar (and insulator connection part), and the square object with darker color is the positioning wire clamp. The implementation of this embodiment can be divided into two parts: and identifying the positioning wire clamp region and extracting and identifying the characteristics of the positioning wire clamp.
The principle of the regional location of location fastener does: and determining the direction of the busbar based on a Hough transform detection straight line, and calculating the gray scales of the rail busbar and the positioning wire clamp through image operation so as to determine the position of the positioning wire clamp area.
The positioning wire clamp characteristic extraction is based on the following principle: when the positioning line clamp is normal, the direction of the positioning line clamp is basically parallel to the direction of the bus bar, as shown in FIG. 3; when the clamping stagnation fault occurs, the positioning wire clamp deviates from the original direction, and the edge of the positioning wire clamp forms a certain included angle with the direction of the busbar, as shown in fig. 4.
According to the technical idea, the specific implementation steps of determining the clamping stagnation fault of the positioning wire clamp in the embodiment are shown in fig. 1. The method comprises the following specific steps:
the data adopted by the embodiment are all subway detection task field real shot images, and due to the fact that the field environments are complex and the condition difference is large, the difference between the illumination intensity and the image contrast of each image is large, and image enhancement must be carried out firstly. Here local histogram equalization is used. The discrete form formula for histogram equalization is as follows:
Figure BDA0003356148830000081
wherein, T (r)k) Is a gray scale rkImage equalization transformation, MN is the total number of image pixels, L is the number of gray levels of the image, njIs gray scale of rkThe number of pixels.
The direction of the bus bar in the figure is to be obtained next. And screening out the straight line at the edge of the bus bar from the straight line in the graph by detecting the straight line in the graph, and further obtaining the direction of the straight line. The straight line detection is realized by hough transform, and the image needs to be binarized first, and after the edge detection based on canny operator, the straight line detection based on hough transform can be performed based on the image edge, as shown in fig. 5.
After the straight lines in fig. 5 are obtained, the straight lines need to be screened and combined, and the straight lines which do not conform to the conventional bus bar direction and are too short in length are eliminated. And then combining the straight lines with similar directions in the rest straight lines. And the two sides of the bus bar have larger difference of gray values, and the edge straight line of the target bus bar is finally determined by calculating the difference value of the sum of the gray values of the sections at the two sides of the straight line on the basis of the difference value. The formula of the gray difference is as follows:
Figure BDA0003356148830000082
wherein G isDIFF(x, y) at the image (x, y)The gray difference value, N is a calculation interval, g (x, y) is the gray value of the pixel point (x, y), j is the serial number of the summation item in the calculation interval, and abs is an absolute value function.
After the busbar direction is obtained, in order to extract the positioning clip region, the image needs to be cut and rotated first. Intercepting a 100-pixel area below the straight line as an extracted candidate area, and performing perspective transformation on the candidate strip area image as shown in fig. 6, and rotating the candidate strip area image until the bus bar is in the vertical direction; the perspective transformation formula is as follows:
Figure BDA0003356148830000091
wherein (u, v) is an original image pixel coordinate, w is a z-axis coordinate of the image, the image is a two-dimensional image, w is 1, and the transformed image coordinate is obtained by dividing w ', that is, (x ═ x '/w ', y ═ y '/w ') is the transformed image pixel coordinate;
Figure BDA0003356148830000092
representing a linear transformation of the image;
T2=[a13 a23]Tfor generating a perspective transformation of the image;
T3=[a31 a32]representing image translation.
Since the rotated image will have a black area, the image needs to be clipped according to the pixel distribution to obtain the final candidate stripe image, as shown in fig. 7.
The extraction of the positioning wire clamp area is based on the gray distribution characteristics of the image, the gray value of the wire clamp area is deeper than that of the surrounding background area, and the image is cut based on the gray value. Firstly, the image is binarized, and the image is subjected to opening and closing operation in order to remove noise in the image and make the image more visible. And then extracting the maximum connected domain which meets the conditions, namely the position of the positioning wire clamp, as shown in fig. 8. And then, cutting the image based on the upper and lower boundaries of the connected domain to obtain a positioning wire clamp target region, as shown in fig. 9.
The fault discrimination is based on the angle between the locating clip boundary and the busbar direction (i.e., the y-axis direction in the figure). Because the acquisition posture and the angle of the fixed camera are fixed, the approximate distribution directions of the positioning wire clamps and the busbars in the acquired image are determined. And after the image rotation operation, an empirical included angle value of the positioning wire clamp and the busbar can be obtained. For example, for the left-side captured alignment clip image, the normal alignment clip angle will not be greater than 10 degrees from the busbar clip, and its slope from the direction of departure will be positive or near negative infinity (as the image of fig. 3 is rotated to the busbar vertical direction). When the insulator is stuck, the included angle is larger, the slope is negative and generally not smaller than-10 (as the image of fig. 4 rotates clockwise to the vertical direction of the bus). The conclusion of the positioning wire clamp image shot on the right side is opposite: the included angle between the normal positioning wire clamp and the bus bar is not more than 10 degrees, and the slope of the deviation direction is a negative value. When the insulator is stuck, the included angle is larger, and the slope is a positive value. The extraction of the boundary straight line of the positioning wire clamp is also based on Hough transform, and the boundary straight line is finally determined according to the slope and the distribution position of the line. And finally, calculating the included angle to obtain the judgment of the time fault.
Example 3
As another preferred embodiment of the present invention, the present embodiment discloses a clamping stagnation detection device for a positioning clamp of a rigid contact line, which includes:
the device comprises an image acquisition module to be detected, a processing module and a control module, wherein the image acquisition module to be detected is used for acquiring an image to be detected, and the acquired image to be detected comprises a positioning wire clamp and a busbar;
the bus bar direction straight line acquisition module is used for sequentially carrying out histogram equalization, image edge segmentation, Hough transformation straight line detection, straight line screening and merging and straight line gray level difference on an image to be detected to obtain a bus bar direction straight line;
the candidate strip-shaped area image acquisition module is used for intercepting candidate strip-shaped area images according to the bus direction straight line obtained in the bus direction straight line acquisition module;
the final candidate strip-shaped image acquisition module is used for rotating and cutting the candidate strip-shaped area image to obtain a final candidate strip-shaped image;
the positioning wire clamp area acquisition module is used for carrying out binarization processing and connected domain extraction on the final candidate strip-shaped image and extracting a positioning wire clamp area;
the positioning wire clamp clamping stagnation fault determination module extracts a positioning wire clamp boundary straight line according to the positioning wire clamp area, calculates an included angle between the positioning wire clamp boundary straight line and the busbar direction, and represents that the positioning wire clamp has a clamping stagnation fault if the included angle is larger than a set threshold value.
As an implementation manner of this embodiment, in the bus direction straight line obtaining module, a discrete form formula of histogram equalization is as follows:
Figure BDA0003356148830000101
wherein, T (r)k) Is a gray scale rkImage equalization transformation, MN is the total number of image pixels, L is the number of gray levels of the image, njIs gray scale of rkThe number of pixels.
As another embodiment of this embodiment, in the bus direction straight line obtaining module, the image edge segmentation specifically includes performing binarization processing on the image after histogram equalization processing, and then performing edge detection by a canny operator to obtain an image edge; the Hough transform straight line detection is straight line detection for Hough transform based on the image edge.
As another implementation manner of this embodiment, in the bus bar direction straight line obtaining module, after straight lines in an image are obtained through hough transform straight line detection, the straight lines are screened and merged, specifically, straight lines which do not conform to a conventional bus bar direction and have too short lengths are removed, and then straight lines in similar directions in the remaining straight lines are merged; the linear gray level difference specifically includes: and calculating the difference value of the sum of the gray levels of the two side sections of the merged straight line, and finally determining the edge straight line of the bus bar so as to obtain the straight line in the bus bar direction.
Further, the formula of the gray difference is as follows:
Figure BDA0003356148830000102
wherein G isDIFF(x, y) is a gray difference value at the image (x, y), N is a calculation interval, g (x, y) is a gray value of a pixel point (x, y), j is a summation item serial number in the calculation interval, and abs is an absolute value function.
As another implementation manner of this embodiment, in the final candidate bar-shaped image obtaining module, perspective transformation is performed on the candidate bar-shaped region image, and the candidate bar-shaped region image is rotated until the bus bar is in the vertical direction; the perspective transformation formula is as follows:
Figure BDA0003356148830000111
wherein (u, v) is an original image pixel coordinate, w is a z-axis coordinate of the image, the image is a two-dimensional image, w is 1, and the transformed image coordinate is obtained by dividing w ', that is, (x ═ x '/w ', y ═ y '/w ') is the transformed image pixel coordinate;
Figure BDA0003356148830000112
representing a linear transformation of the image;
T2=[a13 a23]Tfor generating a perspective transformation of the image;
T3=[a31 a32]representing image translation;
and cutting the rotated image according to the pixel distribution to obtain a final candidate strip image. And after the candidate strip-shaped area rotates to the busbar in the vertical direction, the positioning wire clamp clamping stagnation fault determination module determines whether clamping stagnation exists in the positioning wire clamp according to the included angle between the boundary line of the positioning wire clamp and the busbar direction and the slope direction.
As another implementation manner of this embodiment, in the locating clip region obtaining module, binarization processing is performed on the final candidate strip-shaped image, opening and closing operations are performed on the binarized image, and the largest connected domain meeting the condition is extracted, that is, the position of the locating clip.
Example 4
In order to achieve the above object, according to another aspect of the present application, there is also provided a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the steps of the method for detecting clamping stagnation of the positioning clamp of the rigid contact line.
The processor may be a Central Processing Unit (CPU) in this embodiment. The Processor may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or a combination thereof.
The memory, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and units, such as the corresponding program units in the above-described method embodiments of the present invention. The processor executes various functional applications of the processor and the processing of the work data by executing the non-transitory software programs, instructions and modules stored in the memory, that is, the method in the above method embodiment is realized.
The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor, and the like. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and such remote memory may be coupled to the processor via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more units are stored in the memory and, when executed by the processor, perform the method of embodiment 1 above.
Example 5
As another preferred embodiment of the present invention, this embodiment discloses a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of embodiment 1 above.

Claims (10)

1. The method for detecting the clamping stagnation of the positioning wire clamp of the rigid contact net is characterized by comprising the following steps of:
s1, acquiring an image to be detected, wherein the image to be detected comprises a positioning wire clamp and a busbar;
s2, sequentially carrying out histogram equalization, image edge segmentation, Hough transformation line detection, line screening and merging and line gray difference on an image to be detected to obtain a bus direction line;
s3, linearly intercepting candidate strip-shaped area images according to the bus direction;
s4, rotating and cutting the candidate strip-shaped area image to obtain a final candidate strip-shaped image;
s5, performing binarization processing and connected domain extraction on the final candidate strip-shaped image, and extracting a positioning wire clamp region;
and S6, extracting a positioning wire clamp boundary straight line according to the positioning wire clamp area, calculating an included angle between the positioning wire clamp boundary straight line and the busbar direction, and if the included angle is larger than a set threshold, representing that the positioning wire clamp has a clamping stagnation fault.
2. The method for detecting the clamping stagnation of the positioning clamp of the rigid contact net in claim 1 is characterized in that: in the step S2, the discrete form formula of histogram equalization is as follows:
Figure FDA0003356148820000011
wherein, T (r)k) Is a gray scale rkImage equalization transformation, MN is the total number of image pixels, L is the number of gray levels of the image, njIs gray scale of rkThe number of pixels.
3. The method for detecting the clamping stagnation of the positioning clamp of the rigid contact net in claim 1 is characterized in that: in the step S2, image edge segmentation, specifically, performing binarization processing on the image after histogram equalization processing, and then performing edge detection by a canny operator to obtain an image edge; the Hough transform straight line detection is straight line detection for Hough transform based on the image edge.
4. The method for detecting the clamping stagnation of the positioning clamp of the rigid contact net according to claim 1, 2 or 3, which is characterized in that: in the step S2, after straight lines in the image are obtained through hough transform straight line detection, the straight lines are screened and merged, specifically, straight lines which do not conform to the conventional bus bar direction and are too short in length are removed, and then straight lines with similar directions in the remaining straight lines are merged.
5. The method for detecting the clamping stagnation of the positioning clamp of the rigid contact net according to claim 1, 2 or 3, which is characterized in that: the linear gray level difference specifically includes: calculating the difference value of the sum of the gray levels of the two side sections of the merged straight line, and finally determining the edge straight line of the bus bar so as to obtain the straight line in the bus bar direction;
the formula of the gray difference is as follows:
Figure FDA0003356148820000012
wherein G isDIFF(x, y) is a gray difference value at the image (x, y), N is a calculation interval, g (x, y) is a gray value of a pixel point (x, y), j is a summation item serial number in the calculation interval, and abs is an absolute value function.
6. The method for detecting the clamping stagnation of the positioning clamp of the rigid contact net according to claim 1, 2 or 3, which is characterized in that: in the step S4, perspective transformation is performed on the candidate bar-shaped region image, and the candidate bar-shaped region image is rotated until the bus bar is in the vertical direction; the perspective transformation formula is as follows:
Figure FDA0003356148820000021
wherein (u, v) is an original image pixel coordinate, w is a z-axis coordinate of the image, the image is a two-dimensional image, w is 1, and the transformed image coordinate is obtained by dividing w ', that is, (x ═ x '/w ', y ═ y '/w ') is the transformed image pixel coordinate;
Figure FDA0003356148820000022
representing a linear transformation of the image;
T2=[a13 a23]Tfor generating a perspective transformation of the image;
T3=[a31 a32]representing image translation;
and cutting the rotated image according to the pixel distribution to obtain a final candidate strip image.
7. The method for detecting the clamping stagnation of the positioning clamp of the rigid contact net in claim 6 is characterized in that: after the candidate strip-shaped area is rotated to the vertical direction of the busbar, step S6 determines whether the positioning clip is stuck according to the included angle between the positioning clip boundary line and the busbar direction and the slope direction.
8. Rigidity contact net positioning wire clamp jamming detection device, its characterized in that, the device includes:
the device comprises an image acquisition module to be detected, a processing module and a control module, wherein the image acquisition module to be detected is used for acquiring an image to be detected, and the acquired image to be detected comprises a positioning wire clamp and a busbar;
the bus bar direction straight line acquisition module is used for sequentially carrying out histogram equalization, image edge segmentation, Hough transformation straight line detection, straight line screening and merging and straight line gray level difference on an image to be detected to obtain a bus bar direction straight line;
the candidate strip-shaped area image acquisition module is used for intercepting candidate strip-shaped area images according to the bus direction straight line obtained in the bus direction straight line acquisition module;
the final candidate strip-shaped image acquisition module is used for rotating and cutting the candidate strip-shaped area image to obtain a final candidate strip-shaped image;
the positioning wire clamp area acquisition module is used for carrying out binarization processing and connected domain extraction on the final candidate strip-shaped image and extracting a positioning wire clamp area;
the positioning wire clamp clamping stagnation fault determination module extracts a positioning wire clamp boundary straight line according to the positioning wire clamp area, calculates an included angle between the positioning wire clamp boundary straight line and the busbar direction, and represents that the positioning wire clamp has a clamping stagnation fault if the included angle is larger than a set threshold value.
9. A computer device comprising a processor, an input device, an output device and a memory, the processor, the input device, the output device and the memory being interconnected, wherein the memory is configured to store a computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method of any of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to carry out the method according to any one of claims 1-7.
CN202111352012.7A 2021-11-16 2021-11-16 Rigid contact net positioning wire clamp clamping stagnation detection method and device, computer equipment and storage medium Pending CN114219818A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111352012.7A CN114219818A (en) 2021-11-16 2021-11-16 Rigid contact net positioning wire clamp clamping stagnation detection method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111352012.7A CN114219818A (en) 2021-11-16 2021-11-16 Rigid contact net positioning wire clamp clamping stagnation detection method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114219818A true CN114219818A (en) 2022-03-22

Family

ID=80697211

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111352012.7A Pending CN114219818A (en) 2021-11-16 2021-11-16 Rigid contact net positioning wire clamp clamping stagnation detection method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114219818A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114897778A (en) * 2022-04-08 2022-08-12 成都唐源电气股份有限公司 Rigid busbar defect detection method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114897778A (en) * 2022-04-08 2022-08-12 成都唐源电气股份有限公司 Rigid busbar defect detection method and device

Similar Documents

Publication Publication Date Title
US11797886B2 (en) Image processing device, image processing method, and image processing program
CN104794720B (en) A kind of method and system that registration clamp is oriented in net image is contacted
US8902053B2 (en) Method and system for lane departure warning
US8204277B2 (en) Apparatus and method for camera-bases lane marker detection
CN104318582B (en) Detection method for bad state of rotating double-lug component pin of high-speed rail contact network
CN110321933B (en) Fault identification method and device based on deep learning
Jia et al. A two-step approach to see-through bad weather for surveillance video quality enhancement
CN108564579B (en) Concrete crack detection method and detection device based on time-space correlation
CN111126253A (en) Knife switch state detection method based on image recognition
CN111539927B (en) Detection method of automobile plastic assembly fastening buckle missing detection device
KR20080032856A (en) Recognition method of welding line position in shipbuilding subassembly stage
CN112991374B (en) Canny algorithm-based edge enhancement method, canny algorithm-based edge enhancement device, canny algorithm-based edge enhancement equipment and storage medium
CN105893957A (en) Method for recognizing and tracking ships on lake surface on the basis of vision
CN111696072A (en) Color image line detection method, color image line detection device, electronic device, and storage medium
Reddy et al. Comparative analysis of common edge detection algorithms using pre-processing technique
CN104573680A (en) Image detection method, image detection device and traffic violation detection system
CN117079219B (en) Vehicle running condition monitoring method and device applied to trailer service
CN114219818A (en) Rigid contact net positioning wire clamp clamping stagnation detection method and device, computer equipment and storage medium
Mohammad et al. Study Sobel edge detection effect on the ImageEdges using MATLAB
CN113515655A (en) Fault identification method and device based on image classification
CN114494161A (en) Pantograph foreign matter detection method and device based on image contrast and storage medium
Tong et al. Transmission line extraction and recognition from natural complex background
CN106530292B (en) A kind of steel strip surface defect image Fast Identification Method based on line scan camera
KR20200010658A (en) Method for identifing person, computing system and program using the same
JP2019003575A (en) Image analysis device and maintenance management method of railroad facility component

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