CN116468958A - Communication tower safety detection method and system - Google Patents
Communication tower safety detection method and system Download PDFInfo
- Publication number
- CN116468958A CN116468958A CN202310559241.9A CN202310559241A CN116468958A CN 116468958 A CN116468958 A CN 116468958A CN 202310559241 A CN202310559241 A CN 202310559241A CN 116468958 A CN116468958 A CN 116468958A
- Authority
- CN
- China
- Prior art keywords
- image
- features
- pixel
- noise
- feature
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000004891 communication Methods 0.000 title claims abstract description 32
- 238000001514 detection method Methods 0.000 title claims abstract description 20
- 238000000034 method Methods 0.000 claims abstract description 52
- 238000001914 filtration Methods 0.000 claims abstract description 37
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 22
- XEEYBQQBJWHFJM-UHFFFAOYSA-N Iron Chemical compound [Fe] XEEYBQQBJWHFJM-UHFFFAOYSA-N 0.000 claims abstract description 20
- 238000007637 random forest analysis Methods 0.000 claims abstract description 19
- 238000000605 extraction Methods 0.000 claims abstract description 16
- 238000003066 decision tree Methods 0.000 claims abstract description 15
- 229910052742 iron Inorganic materials 0.000 claims abstract description 10
- 230000002708 enhancing effect Effects 0.000 claims abstract description 7
- 230000006870 function Effects 0.000 claims description 23
- 238000013507 mapping Methods 0.000 claims description 13
- 238000012545 processing Methods 0.000 claims description 10
- 238000004364 calculation method Methods 0.000 claims description 9
- 230000006835 compression Effects 0.000 claims description 7
- 238000007906 compression Methods 0.000 claims description 7
- 230000009466 transformation Effects 0.000 claims description 7
- 238000007689 inspection Methods 0.000 claims description 6
- 239000004973 liquid crystal related substance Substances 0.000 claims description 6
- 239000011159 matrix material Substances 0.000 claims description 5
- 239000006002 Pepper Substances 0.000 claims description 4
- 238000010801 machine learning Methods 0.000 claims description 4
- 238000012216 screening Methods 0.000 claims description 4
- 230000001186 cumulative effect Effects 0.000 claims description 3
- 238000009792 diffusion process Methods 0.000 claims description 3
- 230000001965 increasing effect Effects 0.000 claims description 3
- 238000005259 measurement Methods 0.000 claims description 3
- 230000008569 process Effects 0.000 claims description 3
- 150000003839 salts Chemical class 0.000 claims description 3
- 238000005070 sampling Methods 0.000 claims description 3
- 238000012360 testing method Methods 0.000 claims description 3
- 238000012549 training Methods 0.000 claims description 3
- 230000000694 effects Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 4
- 230000004048 modification Effects 0.000 description 4
- 238000006467 substitution reaction Methods 0.000 description 4
- 230000004075 alteration Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000007635 classification algorithm Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000009499 grossing Methods 0.000 description 2
- 235000012434 pretzels Nutrition 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 235000002566 Capsicum Nutrition 0.000 description 1
- 235000016761 Piper aduncum Nutrition 0.000 description 1
- 235000017804 Piper guineense Nutrition 0.000 description 1
- 244000203593 Piper nigrum Species 0.000 description 1
- 235000008184 Piper nigrum Nutrition 0.000 description 1
- 229910000831 Steel Inorganic materials 0.000 description 1
- 230000032683 aging Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000007797 corrosion Effects 0.000 description 1
- 238000005260 corrosion Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 230000005764 inhibitory process Effects 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
- 239000010959 steel Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/764—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
- G06V10/765—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects using rules for classification or partitioning the feature space
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/40—Image enhancement or restoration using histogram techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/40—Analysis of texture
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/46—Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
- G06V10/467—Encoded features or binary features, e.g. local binary patterns [LBP]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/74—Image or video pattern matching; Proximity measures in feature spaces
- G06V10/761—Proximity, similarity or dissimilarity measures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/77—Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
- G06V10/774—Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20024—Filtering details
- G06T2207/20032—Median filtering
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Software Systems (AREA)
- Computing Systems (AREA)
- Medical Informatics (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Multimedia (AREA)
- General Health & Medical Sciences (AREA)
- Databases & Information Systems (AREA)
- Health & Medical Sciences (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
The invention discloses a communication tower safety detection method and a communication tower safety detection system, wherein the communication tower safety detection method comprises the following steps: acquiring a close-range image of the iron tower through unmanned aerial vehicle aerial photographing; performing histogram equalization on the image; enhancing the image; performing an improved weighted median filtering of the image; feature extraction, including extracting edge features, color features, PCA features, and texture features; and classifying the characteristics by using an improved random forest method, and outputting the fault type of the communication tower. According to the invention, noise is filtered by improving a median filtering method, wherein the size of a filtering window is dynamically adjusted according to the image sparseness, and the product of the geometric position similarity and the sparseness factor is used as the weight of a pixel, so that the noise can be removed in a self-adaptive manner; the feature splitting node method in the random forest algorithm is improved, excessive feature discrete values are reduced, splitting of the features of the decision tree is quickened, and the quality of decision tree generation is improved.
Description
Technical Field
The invention belongs to the technical field of communication tower safety, and particularly relates to a communication tower safety detection method and system.
Background
The communication iron tower can appear material ageing, bolt looseness, steel corrosion, appear the damage phenomenon of different degrees such as crack in long-term service in-process, leads to the structure to weaken constantly. If the manual inspection mode is used, a great deal of manpower is required to be input for periodic inspection. With the development of unmanned aerial vehicle technology, unmanned aerial vehicle cost is lower and lower, and compared with the method of installing various sensors on communication tower and detecting the trouble, the safety inspection through unmanned aerial vehicle aerial acquisition communication tower's image is more and more necessary.
Digital images are subject to environmental conditions during acquisition and transmission to produce noise, typical of which include evenly distributed noise, gaussian noise, pretzel noise, and gamma noise. These noises reduce the sharpness of the image, and thus it is necessary to remove the noises and extract image features in the image processing. The median filtering algorithm is a nonlinear filtering method in image processing, and has a good inhibition effect on bursty signals such as salt and pepper noise; the operation is simple and convenient, and complex parameter setting is not needed; image details and texture information are effectively preserved. However, since the median filtering algorithm belongs to a nonlinear filtering method, the image edge is blurred or distorted, and lost information caused by noise cannot be recovered; fixed noise cannot be suppressed, and only random noise can be suppressed; in some cases, the median filtering algorithm may not be ideal for smoothing the outdoor communication tower rainy and snowy weather image, and the filtering effect may affect the accuracy of subsequent image feature extraction.
The machine learning classification algorithm can be used for fault type classification, wherein the random forest algorithm has a plurality of advantages compared with other classification algorithms, such as high accuracy, capability of processing a large amount of data, better robustness and the like, but the problem that the feature splitting of the decision tree is influenced due to too many feature discrete values exists.
Disclosure of Invention
In view of this, the invention provides a communication tower safety detection system and method, noise is filtered by improving a median filtering method, wherein a filtering window is dynamically adjusted according to the image sparseness, the product of geometric position similarity and a sparseness factor is taken as the weight of a pixel, the pixel at the center point of the window of the current image is selected as the object of noise filtering, the pixel points in the window with the size of M multiplied by M are ordered according to the weight value, the median of the weight is selected as the weight value of the current pixel point, and the median is multiplied by the gray value of the pixel to obtain the gray value of the filtered pixel. After extracting the multidimensional features of the image, carrying out fault classification by using an improved random forest algorithm, wherein feature splitting nodes of the random forest algorithm are critical to the generation of a subsequent random decision tree, and the method randomly selects a part of features X from all the features 1 Further screening the feature set X from the part of the features by using a lasso regression method 2 Calculating the CMA sum of the random decision trees corresponding to the features; repeating the above steps for N times to obtain N feature sets X 2,N Selecting a feature set X 2,N Middle CM feature sets X with highest sum of MA 2,M ,M<And N, calculating the similarity among M feature sets, and selecting two feature sets with the lowest similarity as feature splitting nodes, so that excessive feature discrete values are reduced, splitting of the features of the decision tree is quickened, and the quality of the decision tree generation is improved.
The invention discloses a communication tower safety detection method in a first aspect, which comprises the following steps:
acquiring a close-range image of the iron tower through unmanned aerial vehicle aerial photographing;
performing histogram equalization on the image;
enhancing the image;
performing an improved weighted median filtering of the image;
feature extraction, including extracting edge features, color features, PCA features, and the like;
and classifying the characteristics by using an improved random forest method, and outputting the fault type of the communication tower.
Further, the step of performing histogram equalization on the image is as follows:
histogram of statistical image normalized to between [0,1 ]:
;
wherein H, W are the height and width of the image respectively,n k representing gray values asr k The number of pixels of (a);
calculating a mapping function:
;
s k in order to obtain the converted gray-scale value,T(r k ) For the mapping function, the calculation process uses a cumulative histogram;
and processing the image by using the mapping function.
Further, the image enhancement step is as follows:
the image is enhanced using a Gamma transformation, the Gamma transformation formula being as follows:
;
where output is the output gray value, input is the input gray value,εthe compensation coefficient is generally 0, gamma is a gamma coefficient, and positive number.
Further, the step of performing an improved weighted median filtering of the image is as follows:
1) Image noise detection and noise removal: calculating the statistical characteristics of the image, determining the noise type matched with the original image through the statistical characteristics, and if the probability density function of the noise is subjected to Gaussian distribution, the noise type is a Gaussian noise model, otherwise, the noise type is spiced salt noise;
for Gaussian noise, denoising by using an algorithm based on pixel gray value distribution;
for salt-pepper noise, denoising by using an algorithm based on the number of pixel values;
2) Calculating sparsity factors and geometric position similarity
The sparsity and compression ratio values of the image are obtained through a compressed sensing algorithm, and then coefficient factors are further calculated;
the gaussian kernel function formula for the geometrical position similarity is as follows:
;
wherein, the liquid crystal display device comprises a liquid crystal display device,representing geometric diffusion factor, +.>Center pixel representing x->Euclidean distance from other pixels;
3) Determining the size of a dynamic filtering window, if the sparse factor of the image processing area is large, increasing the filtering window, otherwise, using a smaller filtering window; the calculation formula of the filter window size is as follows:
;
4) Taking the product of the geometric position similarity and the sparse factor as the weight of the pixel, selecting the pixel at the center point of the window of the current image as the object of noise filtering, sorting the pixel points in the window with the size of M multiplied by M according to the size of the weight value, selecting the median value of the weight as the weight value of the current pixel, and multiplying the median value with the gray value of the pixel to obtain the gray value of the filtered pixel;
5) Mapping and converting the filtered pixel gray values to a 0-255 interval, so that the pixel gray values < = 255:
;
x ij to map the gray value of the previous pixel, x max To map the gray maximum of the pixel before x ij ' is the gray value of the mapped pixel.
Still further, the sparsity percentage is defined as:
;
the compression ratio is the ratio between the original and compressed signal vector lengths, defined as follows:
;
n represents the length of the signal Γ and M is the dimension of the sensing matrix, i.e. the number M of measurements of the accurately reconstructed signal Γ.
The sparsity factor is defined as follows:
;
wherein a, b, c are experimentally obtained values, and a > b > c, a1 and b1 are preset thresholds.
Still further, the image features include edge features, PCA features, and texture features;
the edge features are extracted by using a Sobel edge extraction operator;
PCA features are extracted by calling PCA functions in a deconvolution library of a machine learning tool package sklearn;
texture features are extracted through a local binary pattern operator LBP;
the color features are obtained by extracting color moment features, including first-order moment, second-order moment and third-order moment color moments.
Further, the steps of performing fault recognition on the image by using the improved random forest method are as follows:
sampling by using a Bootstrap;
training the subset;
selecting a characteristic splitting node;
constructing a decision subtree set;
performing preliminary classification on the test sample set to obtain a preliminary classification set;
calculating the weight of the AUC and carrying out weighted voting;
and obtaining a fault classification result.
Further, the step of selecting the feature split node is as follows:
randomly selecting a portion of features X from all features 1 Further screening the feature set X from the part of the features by using a lasso regression method 2 Calculating the CMA sum of the random decision trees corresponding to the features;
repeating the above steps for N times to obtain N feature sets X 2,N Selecting a feature set X 2,N M feature sets X with highest sum of CMA 2,M ,M<And N, calculating the similarity among M feature sets, and selecting two feature sets with the lowest similarity as feature splitting nodes.
The communication tower safety detection system provided in the second aspect of the invention comprises:
and an image acquisition module: acquiring a close-range image of the iron tower through unmanned aerial vehicle aerial photographing;
histogram equalization module: performing histogram equalization on the image;
an image enhancement module: enhancing the image;
and a filtering module: performing an improved weighted median filtering of the image;
the feature extraction module is used for extracting edge features, color features, PCA features and texture features;
and a fault classification module: and classifying the characteristics by using an improved random forest method, and outputting the fault type of the communication tower.
The beneficial effects of the invention are as follows:
according to the invention, noise is filtered by improving a median filtering method, wherein the size of a filtering window is dynamically adjusted according to the image sparseness degree, and the product of the geometric position similarity and the sparseness factor is used as the weight of a pixel, so that the noise can be removed in a self-adaptive manner;
judging the noise type in the image, and using a corresponding denoising method according to the noise type;
the feature splitting node method in the random forest algorithm is improved, excessive feature discrete values are reduced, splitting of the features of the decision tree is quickened, and the quality of decision tree generation is improved.
Drawings
FIG. 1 is a flow chart of the security detection of the present invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings, without limiting the invention in any way, and any alterations or substitutions based on the teachings of the invention are intended to fall within the scope of the invention.
Referring to fig. 1, the communication tower safety detection method provided by the invention is as follows:
acquiring a close-range image of the iron tower through unmanned aerial vehicle aerial photographing;
performing histogram equalization on the image;
the image is enhanced and the image is then processed,
performing an improved weighted median filtering of the image;
feature extraction, including extracting edge features, color features, PCA features, and the like;
and classifying the characteristics by using an improved random forest method, and outputting the fault type of the communication tower.
The steps of histogram equalization of the image are as follows:
1) Histogram of statistical image normalized to between [0,1 ]:
;
wherein H, W are the height and width of the image respectively,n k representing gray values asr k The number of pixels of (a);
calculating a mapping function:
;
s k in order to obtain the converted gray-scale value,T(r k ) For the mapping function, the calculation process uses a cumulative histogram;
and processing the image by using the mapping function.
The image is enhanced as follows:
the image is enhanced using a Gamma transformation, the Gamma transformation formula being as follows:
;
where output is the output gray value, input is the input gray value,εthe compensation coefficient is generally 0, gamma is a gamma coefficient, and positive number. And correcting the picture with too high or too low gray level by using Gamma transformation, so as to enhance the contrast.
The steps of improved weighted median filtering of the image are as follows:
s1: image noise detection, calculating statistical characteristics of the image, such as pixel mean and variance.
And determining the noise type matched with the original image through the statistical characteristics, wherein the noise type is a Gaussian noise model if a probability density function of the noise is subjected to Gaussian distribution, and otherwise, the noise type is pretzel noise.
The probability density function of gaussian noise is determined by:
;
where z represents the gray value of the image pixel,μindicating the desire for z,σthe standard deviation of z is indicated.
For Gaussian noise, an algorithm based on pixel gray value distribution is used for denoising, namely, points with pixel points smaller than a preset gray value distribution value are taken as noise, and the noise is removed.
For salt-pepper noise, denoising is performed by using an algorithm based on the number of pixel values, namely, points with the number smaller than the preset pixel values are taken as noise to be removed.
2) Calculating a sparse factor and geometric position similarity;
and obtaining the sparsity and compression ratio value of the image through a compressed sensing algorithm, and further calculating to obtain a coefficient factor. The method specifically comprises the following steps: dividing an image into a plurality of M multiplied by M subareas, compressing the subareas by a compressed sensing method, calculating the sparsity and the compression ratio of the subareas, calculating the sparsity factor of the subareas, and taking the sparsity factor as the sparsity factor of all pixel points of the subareas. In some embodiments, under the condition of enough calculation power, the m×m sub-regions may be subjected to sliding calculation, and the calculated sparse factor is used as the sparse factor of the central pixel point of the m×m sub-regions.
Sparsity: if the elements in a domain of the signal are mostly zero or very small values, the signal is sparse in that domain. The effect of sparsity is that these zero elements can be effectively discarded without losing the relevant signal information. If a sparse signal contains S non-zero terms, then the signal is considered to be S sparse. For a signal of length N, this means that (N-S) signal coefficients can be removed while maintaining important information of this signal. In this case, the sparsity percentage is defined as:
;
compression Ratio (CR): a measure of the reduction of the samples of the desired representative signal beta data is required. In the case of CS, it is the ratio between the original and compressed signal vector lengths. If N represents the length of the signal beam, M is the dimension of the sensing matrix, i.e., the number of measurements M needed to accurately reconstruct the signal beam, then CR is defined as:
;
the sparsity factor is defined as follows:
;
wherein a, b, c are experimentally obtained values, and a > b > c, a1 and b1 are preset thresholds.
The gaussian kernel function formula for the geometrical position similarity is as follows:
;
wherein, the liquid crystal display device comprises a liquid crystal display device,representing geometric diffusion factor, +.>Center pixel representing x->Euclidean distance from other pixels.
S3: determining the size of the dynamic filter window, if the sparseness factor of the region is large, indicating that the effective pixels in the region are sparse, the filter window can be increased, otherwise, a smaller filter window is used. The calculation formula of the filter window size is as follows:
;
4) Taking the product of the geometric position similarity and the sparse factor as the weight of the pixel, selecting the pixel at the center point of the window of the current image as the object of noise filtering, sorting the pixel points in the window with the size of M multiplied by M according to the size of the weight value, selecting the median value of the weight as the weight value of the current pixel, and multiplying the median value by the gray value of the pixel to obtain the gray value of the filtered pixel. And mapping and converting the filtered pixel gray values to a 0-255 interval, so that the pixel gray values < = 255.
;
Image features are extracted, including edge features, PCA features, and texture features.
The extraction method of the edge features comprises the following steps: edges are extracted using a Sobel edge extraction operator:
/>;
the Sobel edge extraction operator has a certain smoothing function and further removes noise.
Extracting PCA characteristics: and extracting PCA features of the image by using a PCA algorithm, and mapping pixels in the image into a low-dimensional space to realize dimension reduction of the image features. The method mainly comprises the following steps: the method comprises the steps of zero-equalizing original data, solving a covariance matrix, and solving eigenvectors and eigenvalues of the covariance matrix, wherein the eigenvectors form a new eigenvalue. The specific implementation method is that PCA feature extraction is carried out by calling PCA functions in a composition library of an open-source machine learning tool package sklearn based on python language.
Extracting texture features: LBP (Local Binary Pattern ) is an operator used to describe local texture features of an image, with multiple resolution, unchanged gray scale, unchanged rotation, etc. The method is mainly used for texture extraction in feature extraction. The invention acquires LBP characteristics of an image, comprising: the LBP features of the original LBP mode, the equivalent LBP mode, the rotation-invariant LBP mode, and the equivalent rotation-invariant LBP mode of the image are extracted and displayed.
Extracting color characteristics: the color moment feature is a simple and effective color feature representation method, and has a first moment (mean), a second moment (variance), a third moment (skew) and the like, and since color information is mainly distributed in low-order moments, the color moment feature representation method uses the first moment, the second moment and the third moment to express color distribution of an image, and the color moment has proved to be effective in representing the color distribution in the image.
Aiming at the problem that key parameters of a random forest algorithm are difficult to determine and the quality of decision trees is uneven to influence the overall effect of a model, the method uses an improved random forest algorithm to carry out safety detection on the iron tower image.
The steps for fault identification of images using the modified random forest method are as follows:
sampling by using a Bootstrap;
training the subset;
selecting a feature splitting node:
1) Randomly selecting a portion of features X from all features 1 Further screening the feature set X from the part of the features by using a lasso regression method 2 The sum of CMAs of the random decision trees corresponding to these features is calculated. The lasso regression method is common knowledge in the field and can be used for variable selection, and the invention is not repeated;
2) Repeating the step 1) for N times to obtain N feature sets X 2,N Selecting a feature set X 2,N M feature sets X with highest sum of CMA 2,M (M<N), calculating the similarity between M feature sets, and selecting two feature sets with the lowest similarity as feature splitting nodes; preferably, the similarity may be calculated using a cosine similarity method.
Constructing a decision subtree set;
performing preliminary classification on the test sample set to obtain a preliminary classification set;
calculating the weight of the AUC and carrying out weighted voting;
and obtaining a fault classification result.
The invention mainly uses accuracy, precision, recall andFvalue [(s) ]FScore) to evaluate the results of comparing the modified random forest algorithm processing balanced sample sets.
Accuracy, precision, recall andFthe calculation formula of the values is as follows:
accuracy=(TP + TN )/( TP + FP + TN + FN);
precision=TP / (TP + FP),
indicating that the correct prediction is positive and the proportion of the total predictions is positive.
recall=TP / (TP + FN),
Indicating the proportion of correctly predicted positive to all positive samples.
F-score=2precision×recall/( precision+recall);
Wherein TP represents that the sample is positive and the prediction result is positive; FP indicates that the sample is negative and the predicted result is positive; TN indicates that the sample is negative and the predicted result is negative; FN indicates that the sample is positive and the prediction result is negative.
Another embodiment of the present invention discloses a communication tower safety detection system, including:
and an image acquisition module: acquiring a close-range image of the iron tower through unmanned aerial vehicle aerial photographing;
histogram equalization module: performing histogram equalization on the image;
an image enhancement module: enhancing the image;
and a filtering module: performing an improved weighted median filtering of the image;
the feature extraction module is used for extracting edge features, color features, PCA features and texture features;
and a fault classification module: and classifying the characteristics by using an improved random forest method, and outputting the fault type of the communication tower.
The beneficial effects of the invention are as follows:
according to the invention, noise is filtered by improving a median filtering method, wherein the size of a filtering window is dynamically adjusted according to the image sparseness degree, and the product of the geometric position similarity and the sparseness factor is used as the weight of a pixel, so that the noise can be removed in a self-adaptive manner.
And judging the noise type in the image, and using a corresponding denoising method according to the noise type.
The feature splitting node method in the random forest algorithm is improved, excessive feature discrete values are reduced, splitting of the features of the decision tree is quickened, and the quality of decision tree generation is improved.
The word "preferred" is used herein to mean serving as an example, instance, or illustration. Any aspect or design described herein as "preferred" is not necessarily to be construed as advantageous over other aspects or designs. Rather, use of the word "preferred" is intended to present concepts in a concrete fashion. The term "or" as used in this application is intended to mean an inclusive "or" rather than an exclusive "or". That is, unless specified otherwise or clear from the context, "X uses a or B" is intended to naturally include any of the permutations. That is, if X uses A; x is B; or X uses both A and B, then "X uses A or B" is satisfied in any of the foregoing examples.
Moreover, although the disclosure has been shown and described with respect to one or more implementations, equivalent alterations and modifications will occur to others skilled in the art based upon a reading and understanding of this specification and the annexed drawings. The present disclosure includes all such modifications and alterations and is limited only by the scope of the following claims. In particular regard to the various functions performed by the above described components (e.g., elements, etc.), the terms used to describe such components are intended to correspond, unless otherwise indicated, to any component which performs the specified function of the described component (e.g., that is functionally equivalent), even though not structurally equivalent to the disclosed structure which performs the function in the herein illustrated exemplary implementations of the disclosure. Furthermore, while a particular feature of the disclosure may have been disclosed with respect to only one of several implementations, such feature may be combined with one or other features of the other implementations as may be desired and advantageous for a given or particular application. Moreover, to the extent that the terms "includes," has, "" contains, "or variants thereof are used in either the detailed description or the claims, such terms are intended to be inclusive in a manner similar to the term" comprising.
The functional units in the embodiment of the invention can be integrated in one processing module, or each unit can exist alone physically, or a plurality of or more than one unit can be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules may also be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product. The above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, or the like. The above-mentioned devices or systems may perform the storage methods in the corresponding method embodiments.
In summary, the foregoing embodiment is an implementation of the present invention, but the implementation of the present invention is not limited to the embodiment, and any other changes, modifications, substitutions, combinations, and simplifications made by the spirit and principles of the present invention should be equivalent to the substitution manner, and all the changes, modifications, substitutions, combinations, and simplifications are included in the protection scope of the present invention.
Claims (10)
1. The communication iron tower safety detection method is characterized by comprising the following steps of:
acquiring a close-range image of the iron tower through unmanned aerial vehicle aerial photographing;
performing histogram equalization on the image;
enhancing the image;
performing an improved weighted median filtering of the image;
feature extraction, including extracting edge features, color features, PCA features, and texture features;
and classifying the characteristics by using an improved random forest method, and outputting the fault type of the communication tower.
2. The communication tower safety inspection method according to claim 1, wherein the step of histogram equalization of the image is as follows:
histogram of statistical image normalized to between [0,1 ]:
;
wherein H, W are the height and width of the image respectively,n k representing gray values asr k The number of pixels of (a);
calculating a mapping function:
;
s k in order to obtain the converted gray-scale value,T(r k ) For the mapping function, the calculation process uses a cumulative histogram;
and processing the image by using the mapping function.
3. The communication tower safety detection method according to claim 1, wherein the step of enhancing the image is as follows:
the image is enhanced using a Gamma transformation, the Gamma transformation formula being as follows:
;
where output is the output gray value, input is the input gray value,εthe compensation coefficient is generally 0, gamma is a gamma coefficient, and positive number.
4. The method for detecting safety of communication towers according to claim 1, wherein the step of performing improved weighted median filtering on the image is as follows:
1) Image noise detection and noise removal: calculating the statistical characteristics of the image, determining the noise type matched with the original image through the statistical characteristics, and if the probability density function of the noise is subjected to Gaussian distribution, the noise type is a Gaussian noise model, otherwise, the noise type is spiced salt noise;
for Gaussian noise, denoising by using an algorithm based on pixel gray value distribution;
for salt-pepper noise, denoising by using an algorithm based on the number of pixel values;
2) Calculating sparsity factors and geometric position similarity
The sparsity and compression ratio values of the image are obtained through a compressed sensing algorithm, and then coefficient factors are further calculated;
the gaussian kernel function formula for the geometrical position similarity is as follows:
;
wherein, the liquid crystal display device comprises a liquid crystal display device,representing geometric diffusion factor, +.>Center pixel representing x->Euclidean distance from other pixels;
3) Determining the size of a dynamic filtering window, if the sparse factor of the image processing area is large, increasing the filtering window, otherwise, using a smaller filtering window; the calculation formula of the filter window size is as follows:
;
4) Taking the product of the geometric position similarity and the sparse factor as the weight of the pixel, selecting the pixel at the center point of the window of the current image as the object of noise filtering, sorting the pixel points in the window with the size of M multiplied by M according to the size of the weight value, selecting the median value of the weight as the weight value of the current pixel, and multiplying the median value with the gray value of the pixel to obtain the gray value of the filtered pixel;
5) Mapping and converting the filtered pixel gray values to a 0-255 interval, so that the pixel gray values < = 255:
;
x ij to map the gray value of the previous pixel, x max To map the gray maximum of the pixel before x ij ' is the gray value of the mapped pixel.
5. The communication tower safety inspection method according to claim 4, wherein the sparseness percentage is defined as:
;
the compression ratio is the ratio between the original and compressed signal vector lengths, defined as follows:
;
n represents the length of the signal Γ and M is the dimension of the sensing matrix, i.e. the number M of measurements of the accurately reconstructed signal Γ.
6. The communication tower safety detection method according to claim 5, wherein the sparseness factor is defined as follows:
;
wherein a, b, c are experimentally obtained values, and a > b > c, a1 and b1 are preset thresholds.
7. The method for detecting safety of communication towers according to claim 1, wherein the image features comprise edge features, PCA features and texture features;
the edge features are extracted by using a Sobel edge extraction operator;
PCA features are extracted by calling PCA functions in a deconvolution library of a machine learning tool package sklearn;
texture features are extracted through a local binary pattern operator LBP;
the color features are obtained by extracting color moment features, including first-order moment, second-order moment and third-order moment color moments.
8. The communication tower safety inspection method according to claim 1, wherein the step of performing fault recognition on the image using the modified random forest method comprises the steps of:
sampling by using a Bootstrap;
training the subset;
selecting a characteristic splitting node;
constructing a decision subtree set;
performing preliminary classification on the test sample set to obtain a preliminary classification set;
calculating the weight of the AUC and carrying out weighted voting;
and obtaining a fault classification result.
9. The method for detecting the safety of a communication tower according to claim 8, wherein the step of selecting the feature splitting node is as follows:
randomly selecting a portion of features X from all features 1 Further screening the feature set X from the part of the features by using a lasso regression method 2 Calculating the CMA sum of the random decision trees corresponding to the features;
repeating the above steps for N times to obtain N feature sets X 2,N Selecting a feature set X 2,N M feature sets X with highest sum of CMA 2,M ,M<And N, calculating the similarity among M feature sets, and selecting two feature sets with the lowest similarity as feature splitting nodes.
10. A pylon safety detection system using the method of any one of claims 1 to 9, comprising:
and an image acquisition module: acquiring a close-range image of the iron tower through unmanned aerial vehicle aerial photographing;
histogram equalization module: performing histogram equalization on the image;
an image enhancement module: enhancing the image;
and a filtering module: performing an improved weighted median filtering of the image;
the feature extraction module is used for extracting edge features, color features, PCA features and texture features;
and a fault classification module: and classifying the characteristics by using an improved random forest method, and outputting the fault type of the communication tower.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310559241.9A CN116468958B (en) | 2023-05-18 | 2023-05-18 | Communication tower safety detection method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310559241.9A CN116468958B (en) | 2023-05-18 | 2023-05-18 | Communication tower safety detection method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116468958A true CN116468958A (en) | 2023-07-21 |
CN116468958B CN116468958B (en) | 2024-04-05 |
Family
ID=87179027
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310559241.9A Active CN116468958B (en) | 2023-05-18 | 2023-05-18 | Communication tower safety detection method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116468958B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5594807A (en) * | 1994-12-22 | 1997-01-14 | Siemens Medical Systems, Inc. | System and method for adaptive filtering of images based on similarity between histograms |
CN101179650A (en) * | 2007-11-23 | 2008-05-14 | 西安交通大学 | Video image contrast intensifying method and apparatus |
CN105701835A (en) * | 2016-02-26 | 2016-06-22 | 华北电力大学 | Image edge detection method and system facing electric power facilities |
US20160231549A1 (en) * | 2015-02-06 | 2016-08-11 | The Johns Hopkins University | Compressive imaging systems and methods |
CN107527333A (en) * | 2017-07-31 | 2017-12-29 | 湖北工业大学 | A kind of rapid image Enhancement Method based on gamma transformation |
CN112949714A (en) * | 2021-03-02 | 2021-06-11 | 北京城建设计发展集团股份有限公司 | Fault possibility estimation method based on random forest |
-
2023
- 2023-05-18 CN CN202310559241.9A patent/CN116468958B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5594807A (en) * | 1994-12-22 | 1997-01-14 | Siemens Medical Systems, Inc. | System and method for adaptive filtering of images based on similarity between histograms |
CN101179650A (en) * | 2007-11-23 | 2008-05-14 | 西安交通大学 | Video image contrast intensifying method and apparatus |
US20160231549A1 (en) * | 2015-02-06 | 2016-08-11 | The Johns Hopkins University | Compressive imaging systems and methods |
CN105701835A (en) * | 2016-02-26 | 2016-06-22 | 华北电力大学 | Image edge detection method and system facing electric power facilities |
CN107527333A (en) * | 2017-07-31 | 2017-12-29 | 湖北工业大学 | A kind of rapid image Enhancement Method based on gamma transformation |
CN112949714A (en) * | 2021-03-02 | 2021-06-11 | 北京城建设计发展集团股份有限公司 | Fault possibility estimation method based on random forest |
Non-Patent Citations (2)
Title |
---|
MICHAEL LEIGSNERING; FAUZIA AHMAD; MOENESS G. AMIN; ABDELHAK M. ZOUBIR: "Compressive Sensing-Based Multipath Exploitation for Stationary and Moving Indoor Target Localization", 《IEEE JOURNAL OF SELECTED TOPICS IN SIGNAL PROCESSING 》, 3 August 2015 (2015-08-03), pages 1469 * |
刘凯;郑山红;蒋权;赵天傲: "基于随机森林的自适应特征选择算法", 《计算机技术与发展》, 30 September 2018 (2018-09-30), pages 107 - 110 * |
Also Published As
Publication number | Publication date |
---|---|
CN116468958B (en) | 2024-04-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Yousif et al. | Improving urban change detection from multitemporal SAR images using PCA-NLM | |
Chitradevi et al. | An overview on image processing techniques | |
Zheng et al. | An advanced image fusion algorithm based on wavelet transform: incorporation with PCA and morphological processing | |
Rajput et al. | Comparative study of image enhancement techniques | |
Kotwal et al. | A novel approach to quantitative evaluation of hyperspectral image fusion techniques | |
CN109978848B (en) | Method for detecting hard exudation in fundus image based on multi-light-source color constancy model | |
CN111612741B (en) | Accurate reference-free image quality evaluation method based on distortion recognition | |
Zhang et al. | Region-of-interest extraction based on saliency analysis of co-occurrence histogram in high spatial resolution remote sensing images | |
CN111127387B (en) | Quality evaluation method for reference-free image | |
WO2019049324A1 (en) | Image processing device, image processing method and storage medium | |
Yang et al. | Hyperspectral image classification using fast and adaptive bidimensional empirical mode decomposition with minimum noise fraction | |
CN113610862A (en) | Screen content image quality evaluation method | |
KR20170040983A (en) | Method and apparatus of image denoising using multi-scale block region detection | |
CN111310771B (en) | Road image extraction method, device and equipment of remote sensing image and storage medium | |
Morzelona | Human visual system quality assessment in the images using the IQA model integrated with automated machine learning model | |
CN114255468A (en) | Handwriting recognition method and related equipment thereof | |
Freitas et al. | On the application LBP texture descriptors and its variants for no-reference image quality assessment | |
Lu et al. | SAR image despeckling via structural sparse representation | |
CN110046639A (en) | A kind of Hyperspectral imaging noise label detection method based on super-pixel weight density | |
CN116468958B (en) | Communication tower safety detection method and system | |
Zehtabian et al. | Adaptive restoration of multispectral datasets used for SVM classification | |
CN113822361A (en) | SAR image similarity measurement method and system based on Hamming distance | |
Khmag et al. | Natural image noise removal using non local means and hidden Markov models in stationary wavelet transform domain | |
Mercier et al. | On the characterization of hyperspectral texture | |
CN110866911A (en) | Dial defect detection method and device, image processing equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |