CN112509033B - Automatic iron tower inclination detection method and device based on image processing - Google Patents

Automatic iron tower inclination detection method and device based on image processing Download PDF

Info

Publication number
CN112509033B
CN112509033B CN202011336767.3A CN202011336767A CN112509033B CN 112509033 B CN112509033 B CN 112509033B CN 202011336767 A CN202011336767 A CN 202011336767A CN 112509033 B CN112509033 B CN 112509033B
Authority
CN
China
Prior art keywords
iron tower
frame
value
point
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011336767.3A
Other languages
Chinese (zh)
Other versions
CN112509033A (en
Inventor
明自强
范荣全
朱峰
刘俊勇
李涛
贺含峰
张劲
游杨均
唐杨
刘克亮
王亮
何凌
吕俊杰
董斌
谢伟
王霆
赵星俨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Sichuan Electric Power Co Ltd
Original Assignee
State Grid Sichuan Electric Power 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 State Grid Sichuan Electric Power Co Ltd filed Critical State Grid Sichuan Electric Power Co Ltd
Priority to CN202011336767.3A priority Critical patent/CN112509033B/en
Publication of CN112509033A publication Critical patent/CN112509033A/en
Application granted granted Critical
Publication of CN112509033B publication Critical patent/CN112509033B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20092Interactive image processing based on input by user
    • G06T2207/20104Interactive definition of region of interest [ROI]

Landscapes

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

Abstract

The invention discloses an automatic iron tower inclination detection method and device based on image processing. Comprising the following steps: A. carrying out framing treatment on the iron tower video to obtain continuous frame pictures; for each frame of picture, steps B-C are performed: B. segmenting an ROI from a frame picture; C. clustering the ROI by adopting a K-Means clustering algorithm to separate a tower image from the ROI; D. calculating a frame difference value of two adjacent frames of iron tower images from a first frame of iron tower image, judging that the iron tower is suspected to deviate when the frame difference value exceeds a first threshold value, and if not, continuing to detect the next frame; E. calculating the deflection angles of the central axes of two adjacent frames of iron tower images from the first frame of iron tower image, and judging that the iron tower is suspected to be deflected when the deflection angles exceed a second threshold value; F. and when the step D, E judges that the iron tower is suspected to deviate, judging that the iron tower inclines. The invention adopts the dual verification standard to automatically analyze the inclination condition of the iron tower, has quick and accurate analysis result, and can effectively overcome the influence of the environment on the analysis process.

Description

Automatic iron tower inclination detection method and device based on image processing
Technical Field
The invention relates to the technical field of image processing, in particular to a method and a device for automatically detecting the inclination of an iron tower based on image processing.
Background
The iron tower, including power transmission line tower, signal tower etc. is the important facility that bears as photoelectric transport medium such as power cable, signal cover, and the equipment that its bears possesses characteristics of big weight, high cost, high accuracy mostly, if the iron tower is slightly inclined, can lead to deformation such as power transmission line corridor because of the unbalance of facility weight, influences the safety of facility and surrounding environment born, consequently, the stability of iron tower is crucial, need in time master the condition of iron tower slope to in time get rid of the trouble.
In addition, when troubleshooting reasons or repairing faults, iron towers are needed to be arranged, the iron towers belong to the high-altitude operation environment, and the safety of the high-altitude operation can be possibly influenced due to the change of environmental parameters (such as wind speed, temperature and the like), so that the monitoring of the environment is particularly important when the high-altitude operation (such as high-altitude iron tower operation) is performed.
At present, the iron tower inclination condition is detected in a manual inspection mode, so that time and labor are consumed, the efficiency is low, the timeliness is low, a certain error exists in manual detection, and the accuracy is poor.
Disclosure of Invention
The invention aims at: aiming at the problems, the automatic iron tower inclination detection method based on image processing is provided, and the condition of iron tower inclination is rapidly and accurately detected by utilizing double detection standards on the collected video, so that the problems of high manual detection cost, low efficiency and poor accuracy are avoided.
The technical scheme adopted by the invention is as follows:
an automatic iron tower inclination detection method comprises the following steps:
A. carrying out framing treatment on the iron tower video to obtain continuous frame pictures;
for each frame of pictures, the following steps B-C are performed:
B. segmenting an ROI from a frame picture;
C. clustering the ROI by adopting a K-Means clustering algorithm to separate a tower image from the ROI;
D. calculating a frame difference value of two adjacent frames of iron tower images from a first frame of iron tower image, judging that the iron tower is suspected to deviate when the frame difference value exceeds a first threshold value, and if not, continuing to detect the next frame;
E. calculating the deflection angles of the central axes of two adjacent frames of iron tower images from the first frame of iron tower image, and judging that the iron tower is suspected to be deflected when the deflection angles exceed a second threshold value;
F. and when the step D, E judges that the iron tower is suspected to be offset, judging that the iron tower is inclined.
Further, the step B includes:
b1: converting the frame picture into a gray level picture, and respectively calculating the sum of pixel gray level values of each row and each column of the gray level picture to obtain a corresponding row gray level value characteristic curve and column gray level value characteristic curve;
b2: respectively carrying out smooth normalization processing on the row gray value characteristic curve and the column gray value characteristic curve;
b3: traversing all data of a column gray value sum curve, taking a coordinate value of a maximum gray value as a transverse intercepting center coordinate, respectively differentiating the column gray value sum of every two adjacent coordinates in the column gray value sum curve within a range of a first preset threshold pixel length before and after the center coordinate, traversing differential operation results in the forward and backward directions from the center coordinate, and taking two coordinate points with the minimum absolute value of the differential results as transverse coordinates for intercepting the ROI;
b4: taking the coordinate with the maximum line gray value as the center of longitudinal interception, and respectively expanding the coordinate to the two sides to the pixel length of the second preset threshold value to be used as the longitudinal coordinate of the intercepted ROI;
b5: and cutting out the ROI from the frame picture according to the determined transverse coordinates and the determined longitudinal coordinates.
Further, the step B2 is to convolve the row gray value characteristic curve and the column gray value characteristic curve with a rectangular window function to implement a smoothing normalization process.
Further, for each frame of picture, after executing step C, the method further includes a step of optimizing the iron tower image, including:
dividing the iron tower image into an upper half part and a lower half part from the longitudinal middle part of the iron tower image;
for the upper half, the following method is performed for optimization: edge detection is carried out on the upper half part, for each detected pixel point, a point, the direction deviation of which is within a third threshold value and represented by a unit vector field of the pixel point, is found out in the 8 fields of the detected pixel point, and the point is connected with the pixel point to be used as a detected straight line; traversing all the detected straight lines, and calculating the inclination angle of each straight line; sorting the straight lines by an inclined angle, and connecting every two adjacent straight lines with the angle difference value smaller than a fourth threshold value after sorting;
for the lower half, the following method is performed for optimization: detecting isolated points in the lower half part, wherein the judging method of the isolated points comprises the following steps: if a certain pixel point is an effective value point and no other effective value points exist in the neighborhood of the pixel point 8, the point is judged to be an isolated point, and the effective value point is a point with a pixel value of 255; eliminating the position 0 corresponding to the detected isolated point in the lower half part; and splicing the optimized upper half part and the optimized lower half part at the segmentation position to obtain an optimized iron tower image.
Further, in the process of optimizing the upper half, the method further comprises a step of filtering out the detected straight line with the length lower than the third preset threshold pixel length.
Further, the step of connecting two straight lines in which two straight lines are adjacent in order and the angle difference is smaller than the fourth threshold value after the ordering includes: selecting two endpoints with shortest Euclidean distance in the two straight lines, and calculating the intersection point of the two straight lines; and calculating the Euclidean distance between the intersection point and the two selected endpoints, if the Euclidean distance is lower than the fourth preset threshold pixel length, respectively connecting the intersection point with the two selected endpoints, otherwise, directly connecting the two selected endpoints.
Further, the first threshold is an adaptive frame difference threshold corresponding to the currently detected frame sequence, and the adaptive frame difference threshold calculating method comprises the following steps:
T1=2×(sum(d)+d i )/(N-1)
wherein T1 is an adaptive frame difference threshold, sum (d) is the sum of the frame differences of all previous frames, d i For the current frame difference, N is the number of frames currently detected.
Further, the calculation method of the central axis of the iron tower image comprises the following steps: traversing the iron tower image to determine the middle row of the position of the iron tower, and dividing the iron tower into an upper part and a lower part from the middle row; respectively solving the mass centers of the communication domains of the upper part and the lower part after the segmentation; connecting the centroids of the upper half part and the lower half part to obtain the central axis of the iron tower image.
Further, the second threshold is an adaptive central axis deflection angle threshold corresponding to the currently detected frame sequence, and the calculation method of the adaptive central axis deflection angle threshold is as follows:
T2=1.65×(sum(θ)+θ i )/(N-1)
wherein T2 is the self-adaptive central axis deflection angle threshold, sum (theta) is the sum of the central axis deflection angle values of all the previous frames, and theta i And N is the currently detected frame number, wherein N is the offset angle value of the central axis of the current frame.
Further, the step F further includes: after the iron tower is judged to incline, an environment monitoring system is started, wherein the environment monitoring system comprises a temperature monitoring circuit, a wind speed monitoring circuit, a window comparison circuit and an alarm circuit; the temperature monitoring circuit includes: a first bridge circuit and a first operational amplifier, the first arm of the first bridge circuit comprising a thermistor; two arms of the first bridge circuit are respectively connected to two input ends of the first operational amplifier; the wind speed monitoring circuit includes: the closed-loop constant-temperature circuit comprises a second bridge circuit and a first differential amplifier, wherein a first arm of the second bridge circuit comprises a thermal resistor, and the output end of the first differential amplifier is connected with the input end of the second operational amplifier; the output end of the first operational amplifier and the output end of the second operational amplifier are both connected to the input end of the window comparison circuit; the output end of the window comparison circuit is connected with the input end of the alarm circuit.
In order to solve all or part of the problems, the invention also provides an automatic iron tower inclination detection device which comprises a processor and a data receiving unit and an alarm unit which are respectively connected with the processor; the data receiving unit is used for receiving the iron tower video, transmitting the received iron tower video to the processor, and the processor is used for executing the automatic iron tower inclination detection method and triggering the alarm unit to work when the iron tower inclination is judged.
In summary, due to the adoption of the technical scheme, the beneficial effects of the invention are as follows:
1. according to the invention, the iron tower video (the video obtained by shooting the iron tower at fixed points) is analyzed and calculated by utilizing an image processing technology, so that the inclination condition of the iron tower is monitored, too much labor cost is not required to be consumed, and the analysis efficiency is high.
2. The invention adopts double verification standards to detect the inclination of the iron tower, and has high detection accuracy.
3. The invention creatively provides the self-adaptive frame difference threshold value and the self-adaptive central axis deflection angle threshold value, namely the corresponding threshold value is self-adaptively changed along with the detected frame sequence, so that the misjudgment on the inclination judgment caused by the influence of the environment on the video can be avoided.
4. The invention relates to the image processing process, such as ROI segmentation, iron tower separation, iron tower optimization and the like, which adopts subsection processing, and is more in line with the distribution condition of iron tower characteristics, so that the invention has more accurate image processing result.
5. The environment monitoring system has the advantages of compact structure, high sensitivity, low manufacturing cost and strong endurance.
Drawings
The invention will now be described by way of example and with reference to the accompanying drawings in which:
fig. 1 is a flowchart for automatically detecting the inclination of the iron tower.
Fig. 2 is a pylon video framing diagram.
Fig. 3 is a graph of column and row gray value characteristics.
Fig. 4 is a graph of the gradation value characteristics of the column and row after the smoothing process.
Fig. 5 is a lateral coordinate view of ROI truncation.
Fig. 6 is a longitudinal coordinate view of ROI truncation.
Fig. 7 is a ROI segmentation diagram.
Fig. 8 is an exploded view of the pylon.
Fig. 9 is a plot of the scatter detection results.
Fig. 10 to 12 are respectively first to third partial straight line reconnection diagrams after segmentation.
Fig. 13 is an optimized view of the upper half of the pylon.
Fig. 14 is a cut-away view of the lower half of the pylon, the scatter.
Fig. 15 is a comparison of the cut-out scattered points before and after outlier elimination.
Fig. 16 is an optimized view of the lower half of the pylon.
FIG. 17 is a diagram of image stitching and position restoration of the optimized upper and lower portions.
Fig. 18 is a flowchart of the inclination automatic determination process.
Fig. 19 is a view of the pylon divided from the middle row into upper and lower sections.
Fig. 20 is a diagram of the centroid of the upper and lower portions.
Fig. 21 is a view of the central axis of the pylon.
Fig. 22 is a block diagram of an environmental monitoring system.
Detailed Description
All of the features disclosed in this specification, or all of the steps in a method or process disclosed, may be combined in any combination, except for mutually exclusive features and/or steps.
Any feature disclosed in this specification (including any accompanying claims, abstract) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise. That is, each feature is one example only of a generic series of equivalent or similar features, unless expressly stated otherwise.
The steps and symbols referred to in this disclosure do not represent a particular order of execution, except for a particular order of execution.
Example 1
As shown in fig. 1, this embodiment discloses an automatic detection method for inclination of an iron tower, including:
A. and carrying out framing treatment on the iron tower video to obtain continuous frame pictures, as shown in fig. 2. For each frame of picture, a corresponding iron tower image is separated, and the process comprises the following steps:
B. The ROI is segmented from the frame picture. The process is a process of intercepting the region of the tapping tower from a frame picture, and comprises the following steps:
b1: converting the frame picture into a gray level picture, and respectively calculating the sum of the gray level values of each row and each column of the gray level picture to obtain a corresponding row gray level value characteristic curve and a corresponding column gray level value characteristic curve, as shown in fig. 3.
B2: and respectively carrying out smoothing normalization processing on the row gray value characteristic curve and the column gray value characteristic curve, as shown in fig. 4. The smoothing normalization process is a smoothing process for the positions of abrupt change, jitter, etc. of the curve, and can be realized by convolution with a rectangular window function.
B3: traversing all data of a column gray value sum curve, taking a coordinate value of a maximum gray value as a transverse intercepting center coordinate, respectively differentiating the column gray value sum of every two adjacent coordinates in the column gray value sum curve (namely differentiating the values of two adjacent points on the column gray value sum curve) within a range of a first preset threshold pixel length before and after the center coordinate, traversing a differential operation result in the front and rear directions of the center coordinate, and taking two coordinate points with the minimum absolute value of the differential result (namely the minimum absolute value of a derivative) as transverse coordinates intercepting the ROI, as shown in figure 5.
B4: and taking the coordinate with the maximum line gray value as the center of longitudinal interception, and respectively expanding to the positions of the second preset threshold pixel length to the two sides as the longitudinal coordinates of the intercepted ROI, as shown in figure 6. For two adjacent frames of pictures, after the ROI interception coordinates of the previous frame are determined, the ordinate of the next frame can define a range according to the ordinate intercepted by the ROI of the previous frame, and the maximum line gray level is searched in the range and is determined as the center coordinate intercepted longitudinally, so that the whole frame of image does not need to be traversed.
B5: and cutting out the ROI from the frame picture according to the determined transverse coordinates and the determined longitudinal coordinates, as shown in figure 7.
C. The ROIs are clustered using a K-Means clustering algorithm to separate the turret image from the ROIs.
The K-Means clustering algorithm comprises the steps of:
(1) The K value is determined, i.e., the data is clustered into K clusters or subgroups. The present embodiment preferably has k=8, i.e. is divided into 8 clusters.
(2) The K data points are randomly selected from the dataset as centroids (centroids) or data centers.
(3) The distances from each point to each centroid are calculated separately and each point is divided into a small group from the nearest centroid, which is tracked.
(4) After each centroid gathers some points, calculating the coordinate average value of all points in each cluster, taking the average value as a new cluster center, and selecting a new centroid.
(5) Comparing the new centroid with the old centroid, if the distance between the new centroid and the old centroid is smaller than a certain threshold value, the calculated centroid position is not changed greatly, convergence is stable, the clustering is considered to reach the expected result, and the algorithm is terminated.
(6) If the new centroid and the old centroid change significantly, i.e., the distance is greater than the threshold, then the iterative execution of the third through fifth steps continues until the algorithm terminates.
And taking one or a combination of a plurality of clustered iron tower images, and obtaining the separated iron tower images, as shown in fig. 8. The clustering process and the clustering result can be visualized, so that the clustering result of which type or types of clusters can be visually observed to separate out the iron tower, the corresponding type clusters are determined, and then the iron tower images can be directly clustered and classified for the frame images.
Preferably, noise points or break points exist in the iron tower images obtained through clustering due to factors such as illumination, and subsequent processing can be performed after optimization. The optimizing step comprises the following steps:
the pylon image is segmented from a longitudinal middle of the pylon image into an upper half and a lower half.
For the upper half, the following method is performed for optimization:
and carrying out edge detection on the upper half part, for each detected pixel point, finding out a point, of which the direction deviation represented by a unit vector field of the pixel point is within a third threshold, in the 8 fields of the detected pixel point, and connecting the point and the pixel point as a detected straight line.
Traversing all the detected straight lines, and calculating the inclination angle of each straight line.
And sorting the straight lines by using the inclination angle, and connecting every two adjacent straight lines with the angle difference value smaller than a fourth threshold value after sorting. Since the image has too many straight line elements and the different tower layers have straight lines with similar angles, in order to avoid similar straight line connection, the image is segmented and then is subjected to broken line reconnection in the broken line reconnection process, as shown in fig. 10-12, which are diagrams of 3 parts of the segmented image subjected to straight line reconnection, and as shown in fig. 13, which are comparison results before and after the upper part completes straight line reconnection.
For the lower half, the following method is performed for optimization:
detecting isolated points in the lower half part, wherein the judging method of the isolated points comprises the following steps: if a certain pixel point is an effective value point and no other effective value points exist in the neighborhood of the pixel point 8, the point is determined to be an isolated point, and the effective value point is a point with a pixel value of 255.
The position 0 corresponding to the detected outlier in the lower half is eliminated as shown in fig. 16.
And splicing the optimized upper half part and the optimized lower half part at the segmentation position to obtain an optimized iron tower image, as shown in fig. 17.
In the optimization process, the optimization effect can be checked, and the checking process does not influence the optimization process and can be abandoned in the optimization process. The viewing process includes:
and carrying out scattered point detection on the separated iron tower image, and observing the broken line and noise point distribution condition of the iron tower image as the basis of the next processing. The scatter detection principle is as follows: if a point is a significant point (a point with a pixel value of 255) and there are only 1 or no other significant points in its 8 neighborhood, the point is determined as a breakpoint. The visual flow of breakpoint determination is as follows:
a. the separation result chart is taken as an experiment original chart of the part (separation result improvement part), and a full black background chart with the same size as the experiment original chart is established.
b. Traversing 8 neighborhoods of each effective value point of the original image, counting the number of the effective value points, marking points with the number of the effective value points smaller than 2 in the 8 neighborhoods in corresponding positions of the full black background image, wherein the marked scatter images are shown in fig. 9, and (a) is a separation result image and (b) is a scatter detection result image.
Taking the visualization of the lower half part of the iron tower as an example, corresponding to the lower half part of the separated iron tower, and intercepting the corresponding part from the scattered point detection result. As shown in fig. 14, wherein (a) is a scatter detection result graph, (b) is a scatter detection lower half graph, (c) is a tower separation result graph, and (d) is a tower separation lower half graph.
Traversing 8 neighborhoods of each effective value point of the scatter detection lower half graph, counting the number of the effective value points, defining points with the number of 0 effective value points in the 8 neighborhoods as isolated points, and eliminating the 0 effective value points, wherein the elimination result graph is shown in fig. 15, and (a) is the scatter detection lower half graph, and (b) is the scatter removal lower half scatter graph.
D. And calculating a frame difference value of two adjacent frames of iron tower images from the first frame of iron tower image, judging that the iron tower is suspected to deviate when the frame difference value exceeds a first threshold value, and if not, continuing to detect the next frame. It is obvious that the first frame iron tower image is the initial frame, and the frame difference value of the two frames of iron tower images must be calculated from the second frame.
Because of the influence of other environmental factors such as illumination on the separated iron tower image between each frame of pictures, the first threshold value in the embodiment is synchronous with the detected frame sequence to perform self-adaptive frame difference threshold value calculation, and the calculation method comprises the following steps:
T1=2×(sum(d)+d i )/(N-1)
wherein T1 is an adaptive frame difference threshold, sum (d) is the sum of the frame differences of all previous frames, d i For the current frame difference, N is the number of frames currently detected.
E. And calculating the deflection angles of the central axes of the two adjacent frames of iron tower images from the first frame of iron tower image, and judging that the iron tower is suspected to be deflected when the deflection angles exceed a second threshold value. Calculating the offset angle of the axes of adjacent frames also necessarily starts with the second frame, but requires the first frame as a basis for comparison.
Similarly, in order to alleviate the deviation of the central axis position of each frame caused by the segmentation effect, the second threshold value is synchronized with the detected frame sequence to perform adaptive central axis deflection angle threshold value calculation, and the calculation method comprises the following steps:
T2=1.65×(sum(θ)+θ i )/(N-1)
wherein T2 is the offset angle of the self-adaptive central axisA threshold value sum (theta) is the sum of the axis deflection values of all the previous frames, theta i And N is the currently detected frame number, wherein N is the offset angle value of the central axis of the current frame.
The execution of the above step D, E is shown in fig. 18, wherein (a) is a dual standard determination process and (b) is a determination result update process.
F. And when the step D, E judges that the iron tower is suspected to be offset, judging that the iron tower is inclined. The embodiment adopts double judgment standards to detect whether the iron tower is inclined or not, the intelligent degree is high, the accuracy of a detection result is high, the two detection standards run in parallel, and the two detection standards complement each other, so that the detection has higher efficiency.
After the iron tower is found to incline, namely, the iron tower is judged to incline, an environment monitoring system is started to detect the environment of the iron tower.
In some embodiments, as shown in FIG. 22, the environmental monitoring system includes a temperature monitoring circuit, a wind speed monitoring circuit, a window comparison circuit, and an alarm circuit. The temperature monitoring circuit includes: a first bridge circuit and a first operational amplifier, the first arm of the first bridge circuit comprising a thermistor; the two arms of the first bridge circuit are respectively connected to the two input ends of the first operational amplifier. The wind speed monitoring circuit includes: the closed-loop constant-temperature circuit comprises a second bridge circuit and a first differential amplifier, wherein a first arm of the second bridge circuit comprises a thermal resistor, and the output end of the first differential amplifier is connected with the input end of the second operational amplifier; the output end of the first operational amplifier and the output end of the second operational amplifier are both connected to the input end of the window comparison circuit; the output end of the window comparison circuit is connected with the input end of the alarm circuit.
In the temperature monitoring circuit, a thermistor is designed on a first arm of a first bridge circuit, in an initial state (at a reference temperature), the two arms of the first bridge circuit are in a balanced state (can be set by selecting or adjusting the resistance of the bridge circuit), when the temperature rises, the resistance value of the thermistor becomes small, the first bridge circuit is in an unbalanced state, unbalanced voltage output by the first bridge circuit is changed by a first operational amplifier method, the amplified unbalanced voltage causes corresponding change of current connected to a feedback circuit of the first operational amplifier, the changed current is consistent with the change of the temperature, and the temperature can be measured by observing the changed current.
For a wind speed monitoring circuit, the principle applied is: when a heated object is placed in a fluid, the heat loss of the object increases as the flow rate of the fluid increases. If the object is heated electrically by the thermostat circuit at a known power, it will reach a temperature determined by the cooling rate of the air flow. The change of the temperature of the thermal resistor can cause the change of the resistance value of the thermal resistor, so that a mathematical model of the fluid speed and the output voltage of the bridge can be established through the bridge, and the output voltage is used for linearly representing the wind speed.
The closed loop constant temperature circuit is in balance state when the initial temperature is reached, i.e. for a certain flow rate, the first differential amplifier has V + =V - When the airflow speed is increased, the thermal resistor is cooled, the thermal resistor value is reduced, the second bridge circuit is unbalanced, the output voltage of the first differential amplifier is increased, the output voltage of the first differential amplifier is amplified by the second operational amplifier, and the amplified voltage is consistent with the change of the wind speed, so that the wind speed is measured. When the thermal resistor is cooled, its resistance decreases, resulting in an increase in current, and the thermal resistor is heated until the second bridge circuit is balanced again.
The device may further include a vibration detection circuit including a vibration sensor, a second differential amplifier, a switching transistor, and a monostable trigger connected in sequence; the output end of the monostable trigger is connected with the input end of the alarm circuit.
And when the vibration sensor detects vibration, the output high level can change the balance of the second differential amplifier, so that the output high level triggers the switching transistor to be conducted, the output voltage of the monostable trigger is pulled up, and the detection of vibration is realized.
Example two
An automatic iron tower inclination detection method comprises the following steps:
1. and carrying out framing treatment on the iron tower video to obtain each frame of picture so as to carry out subsequent segmentation treatment. The video is composed of continuous frame pictures, and the frame pictures can be extracted by circularly reading video frames of the read iron tower video to store images of each frame.
Roi (region of interest ) primary selection
The present embodiment performs extraction of an image ROI by distribution of image gray values before image segmentation is performed. Firstly converting a frame picture into a gray level picture, and respectively calculating the sum of pixel gray level values of each row and each column of the gray level picture to obtain a corresponding row gray level value characteristic curve and a column gray level value characteristic curve, wherein the calculation formulas are shown in formulas (1) and (2).
Where col (i) is the sum of the pixel gray values of each column, and row (j) is the sum of the pixel gray values of each row. The calculation results are shown in fig. 3, in which (a) is a column gray value sum curve and (b) is a row gray value sum curve.
And respectively carrying out smoothing normalization processing on the row gray value characteristic curve and the column gray value characteristic curve, wherein in some embodiments, the smoothing normalization processing is realized through convolution calculation with a rectangular window, and the calculation formulas are shown in formulas (3) and (4).
The flat is a rectangular window with a window of 20, and the smoothed data curve is shown in fig. 4, where (a) is a smoothed column gray value sum curve, and (b) is a smoothed column gray value sum curve. According to experiments, the window size of the rectangular window is preferably 18-30, with 20 being optimal.
And extracting coordinates of the ROI according to the two gray value characteristic curves. Since the gray value of the foreground part is larger than that of the background area, the sum of the gray values of the pixels in each column is the highest, and therefore all data of the column gray value sum curve are traversed to find the coordinate value of the maximum pixel point as the transverse intercepting center coordinate. And (3) respectively generating a coordinate point with the minimum derivative value at the sum of the pixel gray values at the two wings of the iron tower, so that differential calculation is respectively carried out on the curve discrete data within the range of the preset threshold pixel length before and after the central coordinate, and a calculation formula is shown in a formula (5).
δ col (i)=col s (i+1)-col s (i) (5)
And traversing difference operation results in the front direction and the rear direction of the central coordinate respectively, and taking two coordinate points with the minimum absolute value of the difference result as transverse coordinates of the intercepted ROI. The position of the determined lateral coordinates in the column gray value characteristic is shown in fig. 5.
For the longitudinal coordinates of the ROI, according to experiments, the pixel gray value at the longitudinal center of the pylon is the largest among the sum of the pixel gray values of each row, and in the frame picture, the background gray value differs greatly from the foreground (pylon portion), so that the judgment of the foreground by the background portion is extremely small. In some embodiments, the coordinate with the largest line gray value is taken as the center of longitudinal interception, and the longitudinal coordinates are respectively extended to the preset pixel length difference value from two sides. The determined longitudinal coordinates are shown in fig. 6 as positions in the line gray value characteristic curve.
And cutting out the ROI in the frame picture according to the determined transverse coordinates and the determined longitudinal coordinates, as shown in figure 7.
3. Iron tower separation
After the segmented image is obtained, a clustering algorithm based on K-Means is used for separating out the target iron tower.
Under the condition that the K value and the central point of each initial cluster of K are given, each pixel point (namely data record) is separated into the clusters represented by the central point of the closest cluster, after all points are distributed, the central point of the cluster is recalculated (averaged) according to all points in one cluster, and then the steps of distributing the points and updating the central point of the cluster are iterated until the change of the central point of the cluster is small, namely the clustering is completed.
By way of example, assume that given data sample X, n objects x= { X1, X2,..xn }, each object having an attribute of m dimensions, are included. The goal of the K-means algorithm is to aggregate n objects into specified K class clusters according to similarity between objects, each object belonging to and only belonging to one class cluster whose distance from the center of the class cluster is the smallest. For K-means, K cluster centers { C1, C2, &..C.. Times.Ck } (1<k n. Ltoreq.), the Euclidean distance of each object to its cluster center is calculated as shown in equation (6):
X i represents the ith object (i is more than or equal to 1 and less than or equal to n), C j Represents the j-th cluster center (j is more than or equal to 1 and is less than or equal to k), and X it The t-th attribute (1.ltoreq.t.ltoreq.m) representing the i-th object, C jt And the jth attribute of the jth cluster center is represented.
And comparing the distances from each object to the cluster centers of the objects in sequence, and distributing the objects to the class clusters closest to the cluster centers to obtain k class clusters { S1, S2,..Sk }.
Cluster-like center calculation formula (7):
wherein C is l Represents the first clustering center (1.ltoreq.l.ltoreq.k) and S l I represents the number of objects in the first class cluster, X i Represents the ith object (1.ltoreq.i.ltoreq.S) l |)。
Algorithm steps:
(1) The K value is determined, i.e., the data is clustered into K clusters or subgroups.
(2) The K data points are randomly selected from the dataset as centroids (centroids) or data centers.
(3) The distances from each point to each centroid are calculated separately and each point is divided into a small group from the nearest centroid, which is tracked.
(4) After each centroid gathers some points, calculating the coordinate average value of all points in each cluster, taking the average value as a new cluster center, and selecting a new centroid.
(5) Comparing the new centroid with the old centroid, if the distance between the new centroid and the old centroid is smaller than a certain threshold value, the calculated centroid position is not changed greatly, convergence is stable, the clustering is considered to reach the expected result, and the algorithm is terminated.
(6) If the new centroid and the old centroid change significantly, i.e., the distance is greater than the threshold, then the iterative execution of the third through fifth steps continues until the algorithm terminates.
According to the experiment, for the segmented image, K is 4, 8 and 16 … … respectively, and the result proves that when K is 8, the classified clusters can independently represent the target iron tower, that is, in some embodiments, K is 8, data are clustered into 8 classes, according to the clustering result of checking and comparing each class, two classes with the highest gray value (7 th class and 8 th class are tested), the two classes are combined into the last separated image, the separation result is shown in fig. 8, wherein (a) is the segmented ROI, and (b) is the clustering result.
4. For a video frame picture, when the video frame picture is acquired or processed, noise points are inevitably present, and in a separation result, the situation that a broken line exists at the edge part of an iron tower, and a small amount of isolated noise points exist on the whole, the embodiment performs certain optimization processing on the separation result, and the method comprises the following steps:
(1) Scatter detection based on 8-neighborhood traversal
And carrying out scattered point detection on the separated image, and observing the broken line and noise point distribution condition of the separated image as the basis of the next processing. The scatter detection principle is as follows: if a point is a significant point (a point with a pixel value of 255) and there are only 1 or no other significant points in its 8 neighborhood, the point is determined as a breakpoint. The visual flow of breakpoint determination is as follows:
a. the separation result chart is taken as an experiment original chart of the part (separation result improvement part), and a full black background chart with the same size as the experiment original chart is established.
b. Traversing 8 neighborhoods of each effective value point of the original image, counting the number of the effective value points, marking points with the number of the effective value points smaller than 2 in the 8 neighborhoods in corresponding positions of the full black background image, wherein the marked scatter images are shown in fig. 9, and (a) is a separation result image and (b) is a scatter detection result image.
As can be seen from the observation of fig. 9, the upper half part of the iron tower is separated and broken due to the fact that the background of the iron tower is closely connected with the foreground and the background connected domain of the upper half part of the iron tower is smaller, scattered points are more and more formed, and the outline of the upper half part of the iron tower can be seen; the area of the background area of the lower half part of the iron tower is larger, the separation effect is better, the phenomenon of linear fracture does not occur, but the problem of excessive scattered points exists. Aiming at the problems, the upper half part and the lower half part of the iron tower are respectively processed.
(2) Optimization of the upper half of the ROI
Aiming at the situation that the upper half part of the iron tower is broken in a straight line, the embodiment provides a broken line reconnection method, which comprises the following steps:
a. the image is edge detected, for example, using a canny operator.
b. And performing straight line detection according to the edge detection result.
In the 8 fields of the detected edge pixel points, points possibly forming a straight line are found to be connected as a straight line detection result. To avoid interference, lines of length below the preset threshold pixel length will not be taken as a result of the detected lines. In the above-mentioned judging method of "possible forming straight line", a unit vector field is generated for the detected pixel point in the edge detection process, and the unit vector field can be used to represent the direction of the straight line where the maximum probability of the corresponding pixel point is located, if the point in the field of the pixel point 8 is within the error of the allowable deviation of the direction, it means that the point and the pixel point are on the same straight line.
And after detecting the straight line, reconnecting the broken line.
c. Traversing all the detected straight lines to obtain the inclination angle of each straight line, wherein a calculation formula is shown in a formula (8).
θ=arctan((sy-ty)/(sx-tx)) (8)
d. And (3) sorting by inclined angles (such as ascending order), and connecting two straight lines adjacent to each other in order and with the angle difference smaller than a preset threshold value condition after sorting.
Considering the defect of the over-short appearance angle of the straight line after the division of the upper half part of the iron tower, firstly selecting two endpoints with the shortest Euclidean distance in the two straight lines when the straight line connection is carried out, and marking the two endpoints as (tx, ty) and (sx, sy) as shown in a calculation formula (9).
And calculating the intersection point of the straight lines. The intersection point of the two straight lines is calculated through four points on the two straight lines, namely the angular points possibly existing in the original image, and the coordinates are marked as (x, y). The intersection point calculation formulas are shown in (10) - (15).
a=y 0 -y 1 (10)
b=x 1 -x 0 (11)
c=x 0 *y 1 -x 1 *y 0 (12)
D=a s *b t -a t *b s (13)
x=b s *c t -b t *c s (14)
y=a t *c t -b t *c s (15)
And taking Euclidean distance between the intersection point and the selected end point on the two straight lines as a condition for judging whether the intersection point is a true corner point, and judging the intersection point to be the true corner point if the pixel length is lower than a preset threshold value pixel length, and connecting the intersection point with the two end points respectively. If the Euclidean distance is larger than the preset threshold value pixel length, the false corner point or the intersection point of the two straight lines is judged to be absent, and the connection mode is changed into direct connection of the two end points under the condition.
In order to avoid the connection of the existing similar straight lines, the segmentation processing is preferably carried out on the separation result diagram and then the disconnection reconnection is carried out in the disconnection reconnection process because the number of the straight line elements in the separation result diagram is excessive and the straight lines with similar angles exist in different tower layers. Fig. 10 to 12 show three-part segment reconnection results as examples, in which (a) is a straight line detection graph, (b) is a broken line reconnection graph, and (c) is a reconnection result graph. The final result of the optimization of the upper part of the ROI is shown in fig. 13, wherein (a) is a separation original image of the upper part of the iron tower, and (b) is a result image of the upper part of the iron tower after the optimization.
(3) Optimization of the lower part of the ROI
The embodiment provides a method for eliminating noise of isolated points under the condition that the lower half part of the iron tower is not broken in a straight line but has partial noise, so as to optimize the separation result of the lower half part of the iron tower. The principle of eliminating isolated points is as follows: if a point is a significant point (as defined above) and there are no other significant points in its 8-neighborhood, then the point is determined to be an isolated point and eliminated. In some embodiments, a method of outlier elimination includes:
a. corresponding to the lower half part of the separated iron tower, the corresponding part is intercepted from the scattered point detection result. As shown in fig. 14, wherein (a) is a scatter detection result graph, (b) is a scatter detection lower half graph, (c) is a tower separation result graph, and (d) is a tower separation lower half graph.
b. Traversing 8 neighborhoods of each effective value point of the scatter detection lower half graph, counting the number of the effective value points, defining points with the number of 0 effective value points in the 8 neighborhoods as isolated points, and eliminating the 0 effective value points, wherein the elimination result graph is shown in fig. 15, and (a) is the scatter detection lower half graph, and (b) is the scatter removal lower half scatter graph. Fig. 15 is only for showing the effect of removing the outliers, and the step of showing may be omitted in the actual optimization process, and only the outliers are detected for standby.
c. And (3) eliminating the isolated point obtained in the step (b) at the corresponding position 0 in the lower half part diagram of the iron tower separation, thus obtaining an optimized lower half part diagram of the iron tower separation, as shown in fig. 16 (b), and fig. 16 (a) is the lower half part diagram of the iron tower separation.
(4) Splicing the upper half part and the lower half part of the optimized iron tower to obtain a final iron tower separation optimization graph, and placing the final iron tower separation optimization graph at a position corresponding to a frame image for iron tower inclination judgment, wherein (a) is a result graph of the upper half part of the iron tower after optimization, (b) is a result graph of the lower half part of the iron tower after optimization, (c) is a final iron tower separation optimization graph, and (d) is a result graph of the iron tower after placement of (c) at a position corresponding to an original frame image.
5. Automatic discrimination based on self-adaptive frame difference threshold and central axis threshold
And when the dual standards confirm that the iron tower is inclined, starting an environment monitoring system, automatically measuring at least one of the temperature, the wind speed and the vibration condition of the iron tower in the current environment, and triggering an alarm circuit according to the conditions.
(1) Adaptive frame difference threshold judgment method
The process obtains the binarization images of each frame of image, and sequentially traverses and calculates differences according to the frame sequence to obtain the frame differences of each adjacent binarization image, namely the absolute value sum of the corresponding subtraction of the pixel points corresponding to the adjacent binarization images, wherein the calculation formula is shown in a formula (16).
Wherein d is the frame difference value of the binary image corresponding to the obtained adjacent frame, f befor A binarization map for a previous frame of the adjacent frames, f after For the binarization graph of the next frame, m and n are the horizontal and vertical pixel sub-sizes of the image.
When the iron tower is not inclined, the frame difference of the adjacent frames is only the difference value generated by the segmentation error, and the numerical value is small; when the iron tower is inclined, the frame difference between the inclined frame and the previous frame is suddenly increased, and a larger floating occurs compared with the previous frame, so that the phenomenon can be used as a standard for judging whether the iron tower is inclined.
In order to reduce the deviation of the segmentation effect between each frame of images caused by illumination or other environmental factors, the embodiment provides an adaptive frame difference threshold judgment method, and the frame difference threshold is adaptively updated along with the frame difference obtained by each calculation. The adaptive threshold calculation formula is shown in formula (17).
T1=2×(sum(d)+d i )/(N-1) (17)
Wherein T1 is the calculated adaptive frame difference threshold, sum (d) is the sum of the frame differences of all previous frames (detected frames), d i For the current frame difference, N is the number of frames currently detected.
Automatically calculating an update to the current frame difference value using equation (17) when it does not exceed the current threshold; when the current frame difference exceeds the current threshold, the iron tower is possibly deviated, and the self-adaptive frame difference threshold judgment result D1 can be set to be 1 for representation; if the current frame difference does not exceed the current threshold, D1 is always 0.
(2) Self-adaptive central axis deflection angle threshold judgment method
The method obtains a central axis for each frame of binarized graph after separation and optimization, calculates the deflection angle of the central axes of two adjacent frames, and is based on the binarized graph of each frame of image as well, and the specific algorithm flow is as follows:
a. traversing the binarization graph to find the middle row of the iron tower, and dividing the iron tower into an upper part and a lower part from the middle row, as shown in fig. 19, wherein (a) corresponds to fig. 17 (d), and (b) and (c) are respectively the upper part and the lower part after the iron tower is divided from the middle row. The method for searching the middle row can find the first row and the last row where the effective value point (the point with the value of 1) in the image is located by traversing the effective value point, and the median value of the two rows is the middle row.
b. The barycenter of the connected domain of the upper and lower parts after division is obtained respectively, and the result is shown in fig. 20, wherein (a) is an upper half barycenter diagram, and (b) is a lower half barycenter diagram, a red dotted line frame is a selected minimum outer rectangular frame of the connected domain, and a blue star point is the barycenter of the connected domain.
c. Connecting the centroids of the upper half part and the lower half part to obtain a central axis of an iron tower in the binarization graph, wherein a red dotted line frame is a selected minimum outer rectangular frame of a connected domain, namely a minimum outer rectangular frame of the part where the iron tower is positioned as shown in fig. 21; the two blue star points are the mass centers of the upper half part and the lower half part of the iron tower respectively; the green connecting line is the connecting line of the mass centers of the upper half part and the lower half part of the iron tower, namely the central axis of the iron tower. The slope of the central axis is calculated as shown in equation (18).
Where k is the slope of the current frame axis, c upx 、c upy The number of rows and columns of the centroid of the upper half part are respectively; c downx 、c downy The number of rows and columns of the centroid of the lower half part are respectively.
d. And calculating the deflection angle of the central axis of the iron tower in the two adjacent frames of pictures by utilizing the slope, namely, the included angle between the central axis of the current frame (from the 2 nd frame) and the central axis of the previous frame, wherein the calculation formulas are shown in formulas (19) and (20).
θ=arctan(tan(θ))×180/π (20)
Wherein θ is the central axis offset angle, k of the two adjacent frames of pictures befor Is the central axis slope, k of the previous frame in the adjacent frames after Is the central axis slope of the following frame.
When the iron tower is not inclined, the positions of the central axes of the adjacent frames are similar, and only the deflection angle value generated by the segmentation error is small; when the iron tower is inclined, the deflection angle value of the inclined frame and the previous frame is suddenly increased, and a larger floating appears compared with the previous frame. According to the principle, whether the iron tower is inclined or not is judged by judging the size relation between the central axis deflection angle of the adjacent frame pictures and the set threshold value.
In order to reduce the deviation of the central axis position between frames caused by the segmentation effect, a self-adaptive central axis deflection angle threshold judgment method is provided, and the central axis deflection angle threshold can be updated in a self-adaptive way along with the central axis deflection angle obtained by each calculation. The calculation formula of the self-adaptive central axis deflection angle threshold is shown as (21).
T2=1.65×(sum(θ)+θ i )/(N-1) (21)
Wherein T2 is the calculated central axis deflection angle threshold, sum (theta) is the sum of the central axis deflection angle values of all the previous frames, and theta i And N is the currently detected frame number, wherein N is the offset angle value of the central axis of the current frame.
When the current central axis deflection angle does not exceed the current threshold value, automatically updating the current central axis deflection angle by utilizing a formula (21); when the current central axis deflection angle exceeds the current threshold value, the iron tower is possibly deflected, the self-adaptive central axis deflection angle threshold value judgment result D2 is set to be 1, and if the current central axis deflection angle does not exceed the current threshold value, the D2 is always 0.
(3) According to the combination judgment of the self-adaptive frame difference threshold judgment result and the central axis threshold judgment result
And when the self-adaptive frame difference threshold value judging result and the self-adaptive central axis threshold value judging result both indicate that the iron tower is possibly offset, judging that the iron tower is inclined, otherwise, updating the corresponding threshold value and continuing the detection of the next frame. In the concrete implementation, whether the iron tower is inclined or not can be judged by judging the zone bit D1 of the self-adaptive frame difference threshold judgment result and the zone bit D2 of the self-adaptive central axis threshold judgment result: when d1 n d2=1, it is determined that the iron tower is inclined.
6. Environment monitoring system
After the iron tower is detected to incline, an environment monitoring system is started to monitor and alarm the iron tower environment. The environment monitoring system is shown in fig. 22, and comprises a temperature monitoring circuit, a wind speed monitoring circuit, a vibration detection circuit, a window comparison circuit and an alarm circuit. The temperature monitoring circuit includes: a first bridge circuit and a first operational amplifier, the first arm of the first bridge circuit comprising a thermistor; the two arms of the first bridge circuit are respectively connected to the two input ends of the first operational amplifier. The wind speed monitoring circuit includes: the closed loop constant temperature circuit comprises a second bridge circuit and a first differential amplifier, wherein a first arm of the second bridge circuit comprises a thermal resistor, and the output end of the first differential amplifier is connected with the input end of the second operational amplifier. The output end of the first operational amplifier and the output end of the second operational amplifier are both connected to the input end of the window comparison circuit; the output end of the window comparison circuit and the output end of the vibration detection circuit are respectively connected with the input end of the alarm circuit.
In the temperature monitoring circuit, a thermistor is designed on a first arm of a first bridge circuit, in an initial state (at a reference temperature), the two arms of the first bridge circuit are in a balanced state (can be set by selecting or adjusting the resistance of the bridge circuit), when the temperature rises, the resistance value of the thermistor becomes small, the first bridge circuit is in an unbalanced state, unbalanced voltage output by the first bridge circuit is changed by a first operational amplifier method, the amplified unbalanced voltage causes corresponding change of current connected to a feedback circuit of the first operational amplifier, the changed current is consistent with the change of the temperature, and the temperature can be measured by observing the changed current.
For a wind speed monitoring circuit, the principle applied is: when a heated object is placed in a fluid, the heat loss of the object increases as the flow rate of the fluid increases. If the object is heated electrically by the thermostat circuit at a known power, it will reach a temperature determined by the cooling rate of the air flow. The change of the temperature of the thermal resistor can cause the change of the resistance value of the thermal resistor, so that a mathematical model of the fluid speed and the output voltage of the bridge can be established through the bridge, and the output voltage is used for linearly representing the wind speed.
The closed loop constant temperature circuit is in balance state when the initial temperature is reached, i.e. for a certain flow rate, the first differential amplifier has V + =V - When the airflow velocity increases, the thermal resistance is causedAnd the thermal resistance value is reduced due to cooling, so that the second bridge circuit is unbalanced, the output voltage of the first differential amplifier is increased, the output voltage of the first differential amplifier is amplified by the second operational amplifier, and the amplified voltage is consistent with the change of the wind speed, thereby realizing the measurement of the wind speed. When the thermal resistor is cooled, its resistance decreases, resulting in an increase in current, and the thermal resistor is heated until the second bridge circuit is balanced again.
The vibration detection circuit comprises a vibration sensor, a second differential amplifier, a switching transistor and a monostable trigger which are sequentially connected; the output end of the monostable trigger is connected with the input end of the alarm circuit.
And when the vibration sensor detects vibration, the output high level can change the balance of the second differential amplifier, so that the output high level triggers the switching transistor to be conducted, the output voltage of the monostable trigger is pulled up, and the detection of vibration is realized.
Example III
The embodiment of the invention also discloses an automatic iron tower inclination detection device, which comprises a processor, and a data receiving unit and an alarm unit which are respectively connected with the processor; the data receiving unit is used for receiving the iron tower video, transmitting the received iron tower video to the processor, and the processor is used for executing the automatic iron tower inclination detection method and triggering the alarm unit to work when the iron tower inclination is judged. Preferably, the apparatus further comprises an environmental monitoring system, the processor is further connected to the environmental monitoring system, and the processor, when triggering the alarm unit to operate, further triggers the environmental monitoring system to operate, and in some embodiments, the environmental monitoring system is configured as described above.
The invention is not limited to the specific embodiments described above. The invention extends to any novel one, or any novel combination, of the features disclosed in this specification, as well as to any novel one, or any novel combination, of the steps of the method or process disclosed.

Claims (6)

1. An automatic detection method for the inclination of an iron tower is characterized by comprising the following steps:
A. carrying out framing treatment on the iron tower video to obtain continuous frame pictures;
For each frame of pictures, the following steps B-C are performed:
B. segmenting the ROI from the frame picture, comprising:
b1: converting the frame picture into a gray level picture, and respectively calculating the sum of pixel gray level values of each row and each column of the gray level picture to obtain a corresponding row gray level value characteristic curve and column gray level value characteristic curve;
b2: respectively carrying out smooth normalization processing on the row gray value characteristic curve and the column gray value characteristic curve;
b3: traversing all data of a column gray value characteristic curve, taking a coordinate value of a maximum gray value as a transverse intercepting center coordinate, respectively differentiating the column gray value sum of every two adjacent coordinates in the column gray value characteristic curve within the range of a first preset threshold pixel length before and after the center coordinate, traversing differential operation results in the forward and backward directions from the center coordinate, and taking two coordinate points with the minimum absolute value of the differential results as transverse coordinates for intercepting the ROI;
b4: taking the coordinate with the maximum line gray value as the center coordinate of longitudinal interception, and respectively expanding the coordinate to the two sides to the pixel length of the second preset threshold value to be used as the longitudinal coordinate of interception ROI;
b5: according to the determined transverse coordinates and longitudinal coordinates, an ROI is cut out from the frame picture;
C. Clustering the ROI by adopting a K-Means clustering algorithm to separate a tower image from the ROI;
D. calculating a frame difference value of two adjacent frames of iron tower images from a first frame of iron tower image, judging that the iron tower is suspected to deviate when the frame difference value exceeds a first threshold value, and if not, continuing to detect the next frame; the first threshold is an adaptive frame difference threshold corresponding to the currently detected frame sequence, and the adaptive frame difference threshold calculating method comprises the following steps:
wherein,for adaptive frame difference threshold, +.>Is the sum of the difference values of all the previous frames, +.>For the current frame difference, +.>The number of frames currently detected;
E. calculating the deflection angles of the central axes of two adjacent frames of iron tower images from the first frame of iron tower image, and judging that the iron tower is suspected to be deflected when the deflection angles exceed a second threshold value; the calculation method of the central axis of the iron tower image comprises the following steps:
traversing the iron tower image to determine the middle row of the position of the iron tower, and dividing the iron tower into an upper part and a lower part from the middle row;
respectively solving the mass centers of the communication domains of the upper part and the lower part after the segmentation;
connecting the barycenters of the upper half part and the lower half part to obtain the central axis of the iron tower image;
the second threshold is an adaptive central axis deflection angle threshold corresponding to the currently detected frame sequence, and the calculation method of the adaptive central axis deflection angle threshold is as follows:
Wherein,is self-adaptive to the central axis deflection angle threshold value, +.>Is the sum of the axis deflection values of all the previous frames, +.>For the central axis deflection angle value of the current frame, +.>The number of frames currently detected;
F. and when the step D, E judges that the iron tower is suspected to be offset, judging that the iron tower is inclined.
2. The iron tower tilt automatic detection method according to claim 1, wherein the step B2 is implemented by convolving the row gray value characteristic curve and the column gray value characteristic curve with a rectangular window function, respectively, to implement a smoothing normalization process.
3. The iron tower tilt automatic detection method of claim 1, further comprising, for each frame of pictures, after performing step C, the step of optimizing the iron tower image, comprising:
dividing the iron tower image into an upper half part and a lower half part from the longitudinal middle part of the iron tower image;
for the upper half, the following method is performed for optimization:
edge detection is carried out on the upper half part, for each detected pixel point, a point, the direction deviation of which is within a third threshold value and represented by a unit vector field of the pixel point, is found out in 8 adjacent areas of the detected pixel point, and the point is connected with the pixel point to be used as a detected straight line;
Traversing all the detected straight lines, and calculating the inclination angle of each straight line;
sorting the straight lines by an inclined angle, and connecting every two adjacent straight lines with the angle difference value smaller than a fourth threshold value after sorting;
for the lower half, the following method is performed for optimization:
detecting isolated points in the lower half part, wherein the judging method of the isolated points comprises the following steps: if a certain pixel point is an effective value point and no other effective value points exist in the neighborhood of the pixel point 8, the point is judged to be an isolated point, and the effective value point is a point with a pixel value of 255;
eliminating the position 0 corresponding to the detected isolated point in the lower half part;
and splicing the optimized upper half part and the optimized lower half part at the segmentation position to obtain an optimized iron tower image.
4. A pylon tilt automatic detection method according to claim 3, wherein during the optimization of the upper half, the step of filtering out lines having a length below a third predetermined threshold pixel length is further included for the detected lines.
5. A method for automatically detecting the inclination of an iron tower according to claim 3, wherein the step of connecting two straight lines which are adjacent in order and have an angle difference smaller than a fourth threshold value after the ordering step comprises the steps of:
Selecting two endpoints with shortest Euclidean distance in the two straight lines, and calculating the intersection point of the two straight lines;
and calculating the Euclidean distance between the intersection point and the two selected endpoints, if the Euclidean distance is lower than the fourth preset threshold pixel length, respectively connecting the intersection point with the two selected endpoints, otherwise, directly connecting the two selected endpoints.
6. The automatic iron tower inclination detection device is characterized by comprising a processor, a data receiving unit and an alarm unit, wherein the data receiving unit and the alarm unit are respectively connected with the processor; the data receiving unit is used for receiving the iron tower video, transmitting the received iron tower video to the processor, and the processor is used for executing the iron tower inclination automatic detection method according to any one of claims 1-5 and triggering the alarm unit to work when the iron tower inclination is judged.
CN202011336767.3A 2020-11-25 2020-11-25 Automatic iron tower inclination detection method and device based on image processing Active CN112509033B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011336767.3A CN112509033B (en) 2020-11-25 2020-11-25 Automatic iron tower inclination detection method and device based on image processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011336767.3A CN112509033B (en) 2020-11-25 2020-11-25 Automatic iron tower inclination detection method and device based on image processing

Publications (2)

Publication Number Publication Date
CN112509033A CN112509033A (en) 2021-03-16
CN112509033B true CN112509033B (en) 2024-04-09

Family

ID=74958547

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011336767.3A Active CN112509033B (en) 2020-11-25 2020-11-25 Automatic iron tower inclination detection method and device based on image processing

Country Status (1)

Country Link
CN (1) CN112509033B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113963013B (en) * 2021-10-22 2023-03-21 石家庄铁道大学 Markless power transmission tower displacement vibration identification method based on computer vision
CN117152144B (en) * 2023-10-30 2024-01-30 潍坊华潍新材料科技有限公司 Guide roller monitoring method and device based on image processing

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106153004A (en) * 2015-04-08 2016-11-23 广东中星电子有限公司 A kind of building inclination detection method and device
CN107092909A (en) * 2017-03-21 2017-08-25 杭州朔天科技有限公司 Angle detection algorithm based on triangle correspondence theorem
CN111462235A (en) * 2020-03-31 2020-07-28 武汉卓目科技有限公司 Inclined target detection method and device based on yolo v3 algorithm and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5350501B2 (en) * 2011-03-24 2013-11-27 キヤノン株式会社 Video processing apparatus and video processing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106153004A (en) * 2015-04-08 2016-11-23 广东中星电子有限公司 A kind of building inclination detection method and device
CN107092909A (en) * 2017-03-21 2017-08-25 杭州朔天科技有限公司 Angle detection algorithm based on triangle correspondence theorem
CN111462235A (en) * 2020-03-31 2020-07-28 武汉卓目科技有限公司 Inclined target detection method and device based on yolo v3 algorithm and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
智能视频技术在电力系统领域的应用;周封;刘闻博;刘志刚;王丙全;刘健;王晨光;;哈尔滨理工大学学报(第05期);全文 *

Also Published As

Publication number Publication date
CN112509033A (en) 2021-03-16

Similar Documents

Publication Publication Date Title
CN112509033B (en) Automatic iron tower inclination detection method and device based on image processing
CN113269237A (en) Assembly change detection method, device and medium based on attention mechanism
CN111814686A (en) Vision-based power transmission line identification and foreign matter invasion online detection method
CN107423737A (en) The video quality diagnosing method that foreign matter blocks
CN110910350B (en) Nut loosening detection method for wind power tower cylinder
CN116091504B (en) Connecting pipe connector quality detection method based on image processing
CN105912977B (en) Lane line detection method based on point clustering
US7221789B2 (en) Method for processing an image captured by a camera
CN111563896B (en) Image processing method for detecting abnormality of overhead line system
CN116721107B (en) Intelligent monitoring system for cable production quality
CN110634137A (en) Bridge deformation monitoring method, device and equipment based on visual perception
CN108009556A (en) A kind of floater in river detection method based on fixed point graphical analysis
CN105469380A (en) Method and device for detecting shielding against object
WO2020093631A1 (en) Antenna downtilt angle measurement method based on depth instance segmentation network
CN112288758B (en) Infrared and visible light image registration method for power equipment
CN106709905A (en) Vibration-proof hammer fault online detection and identification method based on binocular vision image
CN113920097A (en) Power equipment state detection method and system based on multi-source image
CN110889874B (en) Error evaluation method for binocular camera calibration result
CN115272353A (en) Image processing method suitable for crack detection
CN110675442A (en) Local stereo matching method and system combined with target identification technology
JPH05215547A (en) Method for determining corresponding points between stereo images
CN112233186A (en) Equipment air tightness detection camera self-calibration method based on image perception
CN105590086A (en) Article antitheft detection method based on visual tag identification
CN113221603A (en) Method and device for detecting shielding of monitoring equipment by foreign matters
CN114266893A (en) Smoke and fire hidden danger identification method and device

Legal Events

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