CN112949484B - High-speed railway rockfall real-time detection method - Google Patents
High-speed railway rockfall real-time detection method Download PDFInfo
- Publication number
- CN112949484B CN112949484B CN202110226904.6A CN202110226904A CN112949484B CN 112949484 B CN112949484 B CN 112949484B CN 202110226904 A CN202110226904 A CN 202110226904A CN 112949484 B CN112949484 B CN 112949484B
- Authority
- CN
- China
- Prior art keywords
- image
- background model
- detection
- channel
- value
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 40
- 238000011897 real-time detection Methods 0.000 title claims abstract description 13
- 238000001514 detection method Methods 0.000 claims abstract description 76
- 239000011435 rock Substances 0.000 claims abstract description 22
- 230000002776 aggregation Effects 0.000 claims abstract description 20
- 238000004220 aggregation Methods 0.000 claims abstract description 20
- 238000007781 pre-processing Methods 0.000 claims abstract description 7
- 238000011410 subtraction method Methods 0.000 claims abstract description 4
- 230000009466 transformation Effects 0.000 claims description 15
- 238000012544 monitoring process Methods 0.000 claims description 11
- 238000012216 screening Methods 0.000 claims description 8
- 230000011218 segmentation Effects 0.000 claims description 8
- 238000003708 edge detection Methods 0.000 claims description 6
- 230000000694 effects Effects 0.000 claims description 6
- 230000008569 process Effects 0.000 claims description 4
- 238000001914 filtration Methods 0.000 claims description 3
- 238000012935 Averaging Methods 0.000 claims description 2
- 238000006243 chemical reaction Methods 0.000 claims description 2
- 238000009499 grossing Methods 0.000 claims description 2
- 238000012545 processing Methods 0.000 claims description 2
- 238000005286 illumination Methods 0.000 abstract description 6
- 238000004364 calculation method Methods 0.000 abstract description 3
- 230000008859 change Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 5
- 239000000284 extract Substances 0.000 description 3
- 238000003384 imaging method Methods 0.000 description 3
- 238000011160 research Methods 0.000 description 3
- 235000002566 Capsicum Nutrition 0.000 description 2
- 239000006002 Pepper Substances 0.000 description 2
- 241000722363 Piper Species 0.000 description 2
- 235000016761 Piper aduncum Nutrition 0.000 description 2
- 235000017804 Piper guineense Nutrition 0.000 description 2
- 235000008184 Piper nigrum Nutrition 0.000 description 2
- 238000013135 deep learning Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000006116 polymerization reaction Methods 0.000 description 2
- 230000002265 prevention Effects 0.000 description 2
- 150000003839 salts Chemical class 0.000 description 2
- 239000004575 stone Substances 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000005452 bending Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000003709 image segmentation Methods 0.000 description 1
- 230000009545 invasion Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000005728 strengthening Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/50—Context or environment of the image
- G06V20/52—Surveillance or monitoring of activities, e.g. for recognising suspicious objects
-
- 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/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/90—Dynamic range modification of images or parts thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/40—Analysis of texture
- G06T7/41—Analysis of texture based on statistical description 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/20—Image preprocessing
- G06V10/25—Determination of region of interest [ROI] or a volume of interest [VOI]
-
- 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/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
-
- 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/20084—Artificial neural networks [ANN]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V2201/00—Indexing scheme relating to image or video recognition or understanding
- G06V2201/07—Target detection
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Software Systems (AREA)
- Multimedia (AREA)
- Probability & Statistics with Applications (AREA)
- Artificial Intelligence (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Medical Informatics (AREA)
- Quality & Reliability (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a high-speed railway rockfall real-time detection method based on aggregate channel characteristics and texture characteristics, and belongs to the field of image target detection. Collecting a sample image without falling rocks, carrying out image preprocessing, and establishing an initial background model; determining a detection area by using the established background model, and extracting the characteristics of the aggregation channel in the image; obtaining a binary image as a preliminary detection result based on a background subtraction method; introducing an HSV color space, removing a virtual scene in the binary image based on the texture characteristics, taking the binary image from which the virtual scene is removed as a rockfall detection result at the current moment, and marking the detection result in the current image; and updating the background model. The method can quickly divide the rail area from the RGB image without using prior information or carrying out a large amount of feature matching calculation, and effectively solves the interference caused by outdoor factors such as illumination and the like by using the characteristics and the texture features of the aggregation channel, and can effectively detect the falling rocks on the high-speed railway.
Description
Technical Field
The invention belongs to the field of image target detection, and particularly relates to a high-speed railway rockfall real-time detection method based on aggregate channel characteristics and texture characteristics.
Background
The geological conditions along the railway are complex and changeable, the track structure is also exposed to foreign matter invasion risks caused by multiple natural disasters such as landslide, collapse, debris flow, earthquake and the like, railway accidents occur frequently every year, and great potential safety hazards are formed on railway transportation safety. Therefore, the problem of monitoring the safety of the track structure has become a critical problem to be solved urgently.
At present, although the construction and operation of railway track structure foreign object intrusion prevention in China have years of engineering practical experience, and certain theoretical research results are accumulated in the field of track structure foreign object intrusion alarm and video monitoring, aiming at the challenges of reliable early warning and safe operation under long-distance, large-range, all-weather and complex environmental conditions faced by high-speed railway track structure foreign object intrusion prevention safety protection, how to improve early warning performance and emergency guarantee mechanism and solve various potential safety accidents in advance, a set of mature theoretical guidance system is not formed, relevant basic research still lags behind engineering, and the healthy sustainable development of high-speed railways is restricted. Therefore, the system deeply researches a set of railway track structure safety protection monitoring early warning and recognition theoretical method and technical means, ensures reliable and efficient operation of the train, and has very urgent practical significance.
The high-speed railway foreign matter detection technology based on the video images mainly detects objects influencing safe operation of trains, such as rockfall, railway operation tools and the like. Due to the fact that the coverage range of the monitoring video image is large, the image can simultaneously comprise a rail area and a non-rail area, and the image section occupied by the targets such as rockfall, railway operation tools and the like in the image is small and even is difficult to distinguish by naked eyes. Therefore, the rock falling and railway operation tool detection based on the video images needs to position a rail monitoring area firstly, and then detect a target based on the positioned rail area.
The detection scene with the high-speed railway track as the background is mainly characterized in that the influence of complex outdoor factors exists, the color tone of the rail environment is single, the rail environment is more gray, and the rail area and the non-rail area in the image need to be distinguished during detection, so that false detection is avoided. During detection, outdoor weather factors such as rainwater and illumination change have great influence on target detection, and more false scenes or false detections are caused. The existence of the factors makes the target detection of the outdoor complex scene always a difficult point in image detection.
At present, the size of falling stones on the background of the high-speed railway is small and not obvious, a rail area needs to be firstly demarcated during detection, and then target detection is carried out on the basis of the demarcated rail area. At present, the main defects of the existing detection method mainly comprise:
(1) the shape of the rockfall target is different in size, no obvious prominent feature exists, and the rockfall target cannot be detected by a traditional feature matching method or subjected to feature learning in a deep learning mode. And the falling stone target is generally smaller, occupies fewer pixel points in the image and is easily interfered by noise.
(2) In a complex outdoor environment, the influence of rainwater and illumination change easily causes shadows to targets such as railway operation tools, and interference can be formed during detection to cause false scenes. The shadow area has no obvious difference from the normal area, the characteristics are less, the traditional mode only removes the shadow influence based on the brightness characteristics, the description on the characteristics of the shadow area is too less, and the shadow influence cannot be effectively eliminated. Has certain limitations.
Disclosure of Invention
Aiming at the problems that in the prior art, when the rockfall target is detected, the traditional feature matching method cannot be adopted for detection, the deep learning mode cannot be adopted for feature learning, and effective detection cannot be carried out; under a complex outdoor background, the target is susceptible to influence of outdoor factors such as rainwater and illumination change during detection to cause false detection and the like.
Firstly, establishing a background model for an initial frame image, strengthening image characteristics through technologies such as filtering and image enhancement, detecting and defining a rail area by using methods such as hough transformation and edge detection, preliminarily screening an interested target according to characteristics of a polymerization channel, and further realizing a task of detecting an abnormal target by using multidimensional characteristics such as space geometric characteristics and texture characteristics.
The method can rapidly divide the rail area from the RGB image without using prior information or carrying out a large amount of feature matching calculation, and simultaneously uses the aggregation channel feature and the texture feature, wherein the method fully extracts the shape profile feature and the color feature of the rockfall target in the video image by using the aggregation channel feature of the image, completes detection by comparing the feature difference with a background model, does not need to depend on a traditional feature matching mode, and weakens the influence of the shape size feature of the rockfall on the detection. According to the method, the shape profile characteristics and the color characteristics of the rockfall target are fully extracted from the video image by utilizing the aggregation channel characteristics of the image, detection is completed by comparing the shape profile characteristics and the color characteristics with the characteristic differences of the background model, the traditional characteristic matching mode is not needed, and the influence of the shape and size characteristics of the rockfall on the detection is weakened. In conclusion, the invention effectively solves the interference caused by outdoor factors such as illumination and the like, and can effectively detect foreign matters on the high-speed railway.
In order to achieve the purpose, the invention adopts the technical scheme that:
a method for detecting falling rocks of a high-speed railway in real time based on aggregate channel characteristics and texture characteristics comprises the following steps:
s1: aiming at any detection point, arranging a camera at a fixed position on one side of a rail to be detected, aligning the monitoring range of the camera to a target detection position, and shooting a railway track image at the target detection position in real time;
s2: collecting a sample image without falling rocks, carrying out image preprocessing, and establishing an initial background model;
s3: extracting a track edge line based on hough transformation by using the established background model, and determining a detection area; extracting aggregation channel features in the image, wherein the aggregation channel features comprise RGB color channel features and gradient amplitude features;
s4: extracting an image to be detected at the current moment from a video corresponding to the current moment, subtracting the gray value of a pixel point at a corresponding position in a current background model from the gray value of each pixel point of the image to be detected at the current moment based on a background subtraction method, detecting the transformation quantity of RGB color channel characteristics and gradient amplitude characteristics of the subtracted image by using the method of step S3, performing threshold segmentation by using an OSTU segmentation algorithm to obtain a binary image, and taking the binary image of a detection area as a primary detection result;
s5: introducing an HSV color space, removing a virtual scene in the binary image based on the texture characteristics, taking the binary image from which the virtual scene is removed as a rockfall detection result at the current moment, and marking the detection result in the current image;
s6: updating the background model and the aggregation channel characteristics of the background model by using the current image;
s7: and repeating the steps S4 to S6, starting the detection of the next moment, and realizing the real-time detection of the falling rocks on the high-speed railway.
Compared with the prior art, the invention has the advantages that:
(1) the method for detecting the falling rocks based on the polymerization channel features fully extracts the shape profile features and the color features of the falling rocks, completes detection by comparing the feature differences with the background model, does not need to depend on a traditional feature matching mode, and weakens the influence of the shape and size features of the falling rocks on the detection.
(2) When the influence of outdoor environment factors on target detection is eliminated, the texture features provided by the invention not only consider the brightness characteristics of the shadow region, but also consider the characteristics that the shadow region is similar to the texture features of the background model, so that the feature dimension is expanded, and the characteristic description of the shadow region is increased.
Drawings
Fig. 1 is a flow chart of a method for detecting falling rocks of a high-speed railway in real time according to an embodiment of the invention.
Fig. 2(a) is a rail background image without image preprocessing provided by the embodiment of the present invention.
Fig. 2(b) is a rail background image before and after image preprocessing according to an embodiment of the present invention.
Fig. 3 is a diagram of a background model established according to an embodiment of the present invention.
Fig. 4(a) is a track edge line extraction diagram according to an embodiment of the present invention.
Fig. 4(b) is a diagram of a defined rail area monitoring range provided by an embodiment of the present invention.
Fig. 5 is an LBP operator provided by an embodiment of the present invention.
Fig. 6 is a diagram illustrating a falling rock detection effect provided by an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in detail below with reference to specific examples. Specific embodiments are described below to simplify the present disclosure. It is to be understood that the invention is not limited to the embodiments described and that various modifications thereof are possible without departing from the basic concept, and such equivalents are intended to fall within the scope of the invention as defined in the appended claims.
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, the method for detecting rockfall of a high-speed railway in real time based on aggregate channel characteristics and texture characteristics provided by the invention mainly comprises the following steps:
step 1: aiming at any detection point, arranging a camera at a fixed position on one side of a rail to be detected, aligning the monitoring range of the camera to a target detection position, and shooting a railway track image at the target detection position in real time;
step 2: collecting a sample image without falling rocks, carrying out image preprocessing, and establishing an initial background model;
and step 3: extracting a track edge line based on hough transformation by using the established background model, and determining a detection area; extracting aggregation channel features in the image, wherein the aggregation channel features comprise RGB color channel features and gradient amplitude features;
and 4, step 4: extracting an image to be detected at the current moment from a video corresponding to the current moment, subtracting the gray value of a pixel point at a corresponding position in a current background model from the gray value of each pixel point of the image to be detected at the current moment based on a background subtraction method, detecting the transformation quantity of RGB color channel characteristics and gradient amplitude characteristics of the subtracted image by using the method in the step 3, performing threshold segmentation by using an OSTU segmentation algorithm to obtain a binary image, and taking the binary image of a detection area as a primary detection result;
and 5: introducing an HSV color space, removing a virtual scene in the binary image based on the texture characteristics, taking the binary image from which the virtual scene is removed as a rockfall detection result at the current moment, and marking the detection result in the current image;
step 6: updating the background model and the aggregation channel characteristics of the background model by using the current image;
and 7: and (4) repeating the steps from 4 to 6, starting the detection at the next moment, and realizing the real-time detection of the falling rocks on the high-speed railway.
The following describes a specific implementation.
And (I) setting a proper position to shoot the monitoring video in real time.
And (II) establishing an initial background model.
The initial model is built using a sample image without falling rocks.
2.1) the sample image needs to be preprocessed first, including:
gray level transformation: carrying out gray level transformation on the color image by using a weighted average value method to obtain a gray level image; in this embodiment, the original image shown in fig. 2(a) is subjected to gradation conversion to obtain a gradation map, when W isR=0.30,WG=0.59,WBWhen the weighted average value is 0.11, the formula of the weighted average value method is as follows:
R=G=B(WRR+WGG+WBB)/3
image enhancement: carrying out gray histogram equalization processing on the gray image to realize an image enhancement effect;
smoothing and filtering: the mean filter filters the enhanced image;
edge detection: and performing edge detection on the filtered image by using a Prewitt differential operator. Here, the edge detection is to detect the edges of all objects, and is not limited to a straight line.
In this example, an effect diagram after the pretreatment as shown in fig. 2(b) was obtained.
Specifically, the video image imaging process is affected by various factors such as weather, lighting, imaging sensor parameters, and the like. The acquired image may be affected by factors such as the photographing time, weather conditions, imaging angle, and the like. Resulting in large differences in image gray scale characteristics between images taken at different times at the same location. The influence of these factors causes the noise interference of the image to be mainly gaussian noise and salt and pepper noise. The mean filter can effectively remove gaussian noise and salt and pepper noise, and particularly, in the embodiment, the 3 × 3 filter template size is adopted to filter the image.
Specifically, the Prewitt differential operator is proposed according to the relationship between the target edge and the gray difference. The definition is shown as the following formula:
expressed in the form of a template as:
2.2) aiming at the sample image, the similar pixel points have similar space-time distribution characteristics, and for one pixel point, the pixel value of the neighbor point is randomly selected as the model sample value of the pixel point. That is, the value of any pixel in the background model is randomly selected from the neighboring pixels at the corresponding position of the image, and the position of each pixel in the background model is traversed to obtain the background model of the image. In this embodiment, a background model as shown in fig. 3 is obtained.
The background model can be updated along with the real-time detection process, and the updating mode is as follows: each pixel in the background model hasTo update the pixel values, alsoUpdating the neighbor pixel point of the pixel point according to the probability; using a background model corresponding to the image at the k moment in the falling rock detection at the k +1 moment;
and (III) extracting the aggregation channel characteristics.
3.1) extracting a track edge line based on hough transformation, and determining a detection area;
hough transformation is used for detecting straight lines in a background model, a polar coordinate is adopted to represent a geometric shape, a polar coordinate system detects the straight lines by searching the number of sinusoidal curves intersected at one point, and the straight lines are judged to be detected when the number of sinusoidal curves intersected at the point exceeds a threshold value by setting a threshold value of the point on the straight lines; and fitting all the detected straight lines, averaging the slope, and selecting the two straight lines with the largest difference between the slope and the average as the two boundary lines of the rail.
Specifically, the hough transformation principle is as follows:
representing the geometry by polar coordinates, for any point (x) in the polar coordinate system0,y0) All can use (r)θθ) represents one of a cluster of straight lines passing through the point, i.e.:
rθ=x0·cosθ+y0·sinθ
in a polar coordinate system, if two different points are located on the same straight line, they satisfy the following condition: and drawing a sine curve obtained by each passing straight line on the polar angle plane of the polar diameter, wherein x is greater than 0, and 0< theta <2 pi. Therefore, a straight line can be detected by searching the number of sinusoidal curves intersecting at one point in a polar coordinate system, and the straight line can be determined to be detected when the number of sinusoidal curves intersecting at the point exceeds a threshold value by artificially setting the threshold value of the point on the straight line. In this embodiment, the result of the line detection is shown in fig. 4 (a).
And calculating the average value of all the detected straight line slopes, and selecting the two lines with the largest difference value between the slopes and the average value as the rails, so that the area of a key monitoring area is increased as much as possible, and the potential safety hazard is reduced. Meanwhile, considering the imperfection of the straight line of the rail, a linear fitting process (polynomial fitting is used for bending the rail) is also needed, and the key detection area is drawn through parameters obtained by fitting and a corresponding proportional relation. In this example, the results are shown in fig. 4 (b).
3.2) calculating the characteristics of the aggregation channel;
the aggregate channel includes RGB color channel characteristics, gradient magnitude characteristics. The RGB color channel characteristics can effectively describe the color characteristics of the falling rocks, and the gradient direction characteristics can effectively describe the outline shape characteristics of the falling rocks.
The calculation formula of the aggregation channel characteristics is as follows:
Gx(x,y)=f(x+1,y)-f(x-1,y)
Gy(x,y)=f(x,y+1)-f(x,y-1)
in the formula, Gx(x, y) represents the gradient amplitude of the image pixel point (x, y) in the horizontal direction, Gy(x, y) is the gradient amplitude of the image pixel point (x, y) in the vertical direction, f (x, y) is the pixel value of the image pixel point (x, y), and G (x, y) is the total gradient amplitude characteristic.
And (IV) preliminary detection.
4.1) extracting the image to be detected at the current moment from the video corresponding to the current moment.
4.2) calculating the characteristics of the aggregation channel in the same way as the step 3.2).
4.3) background subtraction:
subtracting the gray value of each pixel point of the image to be detected from the gray value of the established background model, detecting the change of color characteristics and gradient characteristics of the subtracted image, and performing threshold segmentation by using an OSTU segmentation algorithm to obtain a binary image;
specifically, the maximum inter-class difference method (OSTU) has a size of M × N for a grayscale image f (x, y), a total number of grayscale values of L, and a number of image pixels N for less than a certain grayscale value L in the image0Mean value of gray scale of mu0(ii) a For image pixels larger than a certain gray value L in the image, the number is N1Mean value of gray scale of mu1. The total mean gray of the image is denoted as μ and the between-class variance is v.
For all the gray-scale values L, the gray-scale value that maximizes the inter-class variance v is obtained as a threshold for image segmentation according to the above formula. In the embodiment, there are 128 gray scale values in the gray scale value interval [0,127] of the image, and the gray scale value with the largest inter-class variance v is obtained for the 128 gray scale values.
4.4) outputting a preliminary detection result:
taking the binary image of the detection area as a preliminary detection result;
and (V) extracting texture features to obtain a final detection result.
Comparing the image to be detected with a background model based on the brightness characteristic of the HSV color space, primarily screening a shadow region based on the brightness characteristic, describing the texture characteristic of the shadow region based on a local LBP operator, calculating the Hamming distance between the shadow region and a normal region, and judging as a false scene if the Hamming distance exceeds a threshold value.
5.1) introducing HSV color space:
introducing HSV color space requires converting RGB values to HSV values, with the formula:
V=max
where R, G, B is the RGB color channel feature of the image, max is max (R, G, B), i.e., the maximum value of the three RGB color channels, min is min (R, G, B), i.e., the minimum value of the three RGB color channels, and if the found H is negative, H is H + 360.
5.2) preliminary screening of shadow areas:
comparing an image to be detected at the current moment with a background model, primarily screening a shadow region based on the brightness characteristic, comparing the shadow region with a normal region, in an HSV color space, greatly changing the pixel value of a V channel, basically keeping the pixel values of an H channel and an S channel unchanged, and screening by adopting the following formula:
wherein, shadow is shadow, i (p) is the pixel value of the V channel of the image to be detected, and b (p) is the pixel value of the V channel in the background model.
5.3) describing the texture characteristics of the shadow region based on a local LBP operator:
defining the LBP operator in a 3 x 3 window, taking the central pixel of the window as a threshold value, comparing with the gray values of the adjacent 8 pixels, if the surrounding pixel values are greater than the central pixel value, marking the position as 1, otherwise marking the position as 0, and obtaining an 8-bit binary number.
5.4) calculating the Hamming distance between the shadow area and the normal area:
the hamming distance refers to the number of different characters at corresponding positions of two character strings with equal length. And calculating the Hamming distance by using the LBP values, namely 8-bit binary numbers, of the preliminarily screened shadow area and the corresponding area of the background model. A value greater than the threshold value of 5 indicates a change in texture characteristics. d (x, y) represents a hamming distance, i is 0,1,. 7, x, y are all 8-bit binary numbers, ∈ represents exclusive or:
using the 8-bit binary value as the LBP value of the pixel point in the center of the window to reflect the texture information of the 3 × 3 region, as shown in fig. 5; and calculating Hamming distances corresponding to LBP values of the shadow area and the corresponding area of the background model, if the Hamming distances are larger than a threshold value, indicating that the texture characteristics are changed, and judging as a false scene.
5.5) removing the false scene from the preliminary detection result image, namely the detected result, and marking the detection result in the current image. In this embodiment, fig. 6 shows a final detection result, after the illumination influence is removed, the rockfall detection effect is as shown in fig. 6, and the mark in the circle in fig. 6 is the detected rockfall.
And (VI) updating the background model.
The update formula is:
B(p)=(1-α)B(p)+αI(p)
in the formula, b (p) is a pixel value in the background model, i (p) is a pixel value of the image to be detected, and α is the update rate. In this example, the update rate α is 0.05,
compared with the prior art, the method provided by the embodiment of the invention fully extracts the shape profile characteristics and the color characteristics of the rockfall target in the video image, completes detection by comparing the shape profile characteristics and the color characteristics with the characteristic differences of the background model, does not need to depend on a traditional characteristic matching mode, and also weakens the influence of the shape and size characteristics of the rockfall on the detection. The texture features not only consider the brightness characteristics of the shadow region, but also consider the characteristics that the shadow region is similar to the texture features of the background model, thereby expanding the feature dimension and increasing the characteristic description of the shadow region, thereby effectively achieving the detection effect.
The objects, technical solutions and advantages of the present invention will be more clearly described by the accompanying drawings shown in the embodiments of the present invention. It should be noted that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention. All equivalents, modifications, and the like which come within the spirit and scope of the principles and concepts of the invention are desired to be protected.
Claims (10)
1. A high-speed railway rockfall real-time detection method based on aggregate channel characteristics and texture characteristics is characterized by comprising the following steps:
s1: aiming at any detection point, arranging a camera at a fixed position on one side of a rail to be detected, aligning the monitoring range of the camera to a target detection position, and shooting a railway track image at the target detection position in real time;
s2: collecting a sample image without falling rocks, carrying out image preprocessing, and establishing an initial background model;
s3: extracting a track edge line based on hough transformation by using the established background model, and determining a detection area; extracting aggregation channel features in the image, wherein the aggregation channel features comprise RGB color channel features and gradient amplitude features;
s4: extracting an image to be detected at the current moment from a video corresponding to the current moment, subtracting the gray value of a pixel point at a corresponding position in a current background model from the gray value of each pixel point of the image to be detected at the current moment based on a background subtraction method, detecting the transformation quantity of RGB color channel characteristics and gradient amplitude characteristics of the subtracted image by using the method of step S3, performing threshold segmentation by using an OSTU segmentation algorithm to obtain a binary image, and taking the binary image of a detection area as a primary detection result;
s5: introducing an HSV color space, removing a virtual scene in the binary image based on the texture characteristics, taking the binary image from which the virtual scene is removed as a rockfall detection result at the current moment, and marking the detection result in the current image;
s6: updating the background model and the aggregation channel characteristics of the background model by using the current image;
s7: and repeating the steps S4 to S6, starting the detection of the next moment, and realizing the real-time detection of the falling rocks on the high-speed railway.
2. The method for detecting rockfall of high-speed railway based on aggregate channel characteristics and textural characteristics according to claim 1, wherein the image preprocessing in step S2 includes:
gray level transformation: carrying out gray level transformation on the color image by using a weighted average value method to obtain a gray level image;
image enhancement: carrying out gray histogram equalization processing on the gray image to realize an image enhancement effect;
smoothing and filtering: the mean filter filters the enhanced image;
edge detection: and performing edge detection on the filtered image by using a Prewitt differential operator.
3. The method for detecting rockfall of a high-speed railway in real time based on the aggregate channel feature and the texture feature according to claim 1, wherein the background model establishing method comprises the following steps: aiming at an image needing to establish a background model, the numerical value of any pixel point in the background model is randomly taken from a neighbor pixel point at a corresponding position of the image, and the position of each pixel point in the background model is traversed to obtain the background model of the image.
4. The method for real-time detection of falling rocks of a high-speed railway based on the aggregated channel features and the textural features according to claim 3, wherein the background model is updated along with the real-time detection process in a manner that: each pixel in the background model hasTo update the pixel values, alsoUpdating the neighbor pixel point of the pixel point according to the probability; using a background model corresponding to the image at the k moment in the falling rock detection at the k +1 moment;
the update formula is:
B(p)=(1-α)B(p)+αI(p)
in the formula, b (p) is a pixel value in the background model, i (p) is a pixel value of the image to be detected, and α is the update rate.
5. The method for detecting rockfall of high-speed railway based on aggregation channel characteristics and textural characteristics according to claim 1, wherein hough transformation is used for detecting straight lines in a background model, polar coordinates are used for representing geometric shapes, a polar coordinate system is used for detecting the straight lines by finding the number of sinusoidal curves intersected at a point, and by setting a threshold value of the point on the straight lines, when the number of the sinusoidal curves intersected at the point exceeds the threshold value, the straight lines are judged to be detected; and fitting all the detected straight lines, averaging the slope, and selecting the two straight lines with the largest difference between the slope and the average as the two boundary lines of the rail.
6. The method for real-time detection of falling rocks in high-speed railways based on aggregate channel characteristics and texture characteristics according to claim 1, wherein the aggregate channel characteristics comprise RGB color channel characteristics and gradient magnitude characteristics, wherein the RGB color channel characteristics are R, G, B values of an image, and the gradient magnitude characteristics are calculated according to the following formula:
Gx(x,y)=f(x+1,y)-f(x-1,y)
Gy(x,y)=f(x,y+1)-f(x,y-1)
in the formula, Gx(x, y) represents the gradient amplitude of the image pixel point (x, y) in the horizontal direction, Gy(x, y) is the gradient amplitude of the image pixel point (x, y) in the vertical direction, f (x, y) is the pixel value of the image pixel point (x, y), and G (x, y) is the gradient amplitude characteristic of the image pixel point (x, y).
7. The method for real-time detection of rockfall of high-speed railway based on aggregate channel feature and texture feature according to claim 1, wherein the determination rule of the false scene in step S5 is:
introducing an HSV color space, comparing an image to be detected at the current moment with a background model based on the brightness characteristic of the HSV color space, primarily screening a shadow region based on the brightness characteristic, describing the texture characteristic of the shadow region based on a local LBP operator, calculating the Hamming distance between the shadow region and a normal region, and judging as a false scene if the Hamming distance exceeds a threshold value.
8. The method for detecting rockfall of high-speed railway based on aggregate channel characteristics and textural characteristics according to claim 7, wherein the introduction of HSV color space requires conversion of RGB values to HSV values, and the formula is:
V=max
where R, G, B is the RGB color channel feature of the image, max is max (R, G, B), i.e., the maximum value of the three RGB color channels, min is min (R, G, B), i.e., the minimum value of the three RGB color channels, and if the found H is negative, H is H + 360.
9. The method for detecting rockfall of a high-speed railway in real time based on the aggregate channel feature and the texture feature according to claim 7, wherein the preliminary screening of the shadow area based on the brightness feature specifically comprises:
comparing the shadow area with the normal area, in the HSV color space, the pixel value of the V channel is greatly changed, the pixel values of the H channel and the S channel are basically unchanged, and the screening is carried out by adopting the following formula:
wherein, shadow is shadow, i (p) is the pixel value of the V channel of the image to be detected, and b (p) is the pixel value of the V channel in the background model.
10. The method for detecting rockfall of high-speed railway in real time based on aggregation channel features and texture features according to claim 7, wherein the texture features of the shadow region are extracted based on a local LBP operator, and the method is implemented in a mode that:
defining an LBP operator in a 3 x 3 window, taking a central pixel of the window as a threshold value, comparing the threshold value with gray values of adjacent 8 pixels, if the surrounding pixel value is greater than the central pixel value, marking the position as 1, otherwise marking the position as 0, and obtaining an 8-bit binary number;
the value is used as the LBP value of the central pixel point of the window so as to reflect the texture information of the 3 multiplied by 3 area; and calculating Hamming distances corresponding to LBP values of the shadow area and the corresponding area of the background model, if the Hamming distances are larger than a threshold value, indicating that the texture characteristics are changed, and judging as a false scene.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110226904.6A CN112949484B (en) | 2021-03-01 | 2021-03-01 | High-speed railway rockfall real-time detection method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110226904.6A CN112949484B (en) | 2021-03-01 | 2021-03-01 | High-speed railway rockfall real-time detection method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112949484A CN112949484A (en) | 2021-06-11 |
CN112949484B true CN112949484B (en) | 2022-04-26 |
Family
ID=76246990
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110226904.6A Active CN112949484B (en) | 2021-03-01 | 2021-03-01 | High-speed railway rockfall real-time detection method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112949484B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113591714A (en) * | 2021-07-30 | 2021-11-02 | 金陵科技学院 | Flood detection method based on satellite remote sensing image |
CN114187219B (en) * | 2021-12-06 | 2024-06-25 | 广西科技大学 | Moving target shadow real-time eliminating method based on red-green-blue double difference |
CN114494983A (en) * | 2022-04-15 | 2022-05-13 | 北京大成国测科技有限公司 | Railway foreign matter invasion monitoring method and system |
CN116758528B (en) * | 2023-08-18 | 2023-11-03 | 山东罗斯夫新材料科技有限公司 | Acrylic emulsion color change identification method based on artificial intelligence |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017190574A1 (en) * | 2016-05-04 | 2017-11-09 | 北京大学深圳研究生院 | Fast pedestrian detection method based on aggregation channel features |
CN109190456A (en) * | 2018-07-19 | 2019-01-11 | 中国人民解放军战略支援部队信息工程大学 | Pedestrian detection method is overlooked based on the multiple features fusion of converging channels feature and gray level co-occurrence matrixes |
CN109815807A (en) * | 2018-12-18 | 2019-05-28 | 浙江大学 | A kind of ship detecting method of pulling in shore based on edge line analysis and converging channels feature |
CN111582084A (en) * | 2020-04-24 | 2020-08-25 | 北京航空航天大学 | Weak supervision learning-based rail foreign matter detection method and system under empty base view angle |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10810462B2 (en) * | 2015-12-01 | 2020-10-20 | Intel Corporation | Object detection with adaptive channel features |
-
2021
- 2021-03-01 CN CN202110226904.6A patent/CN112949484B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017190574A1 (en) * | 2016-05-04 | 2017-11-09 | 北京大学深圳研究生院 | Fast pedestrian detection method based on aggregation channel features |
CN109190456A (en) * | 2018-07-19 | 2019-01-11 | 中国人民解放军战略支援部队信息工程大学 | Pedestrian detection method is overlooked based on the multiple features fusion of converging channels feature and gray level co-occurrence matrixes |
CN109815807A (en) * | 2018-12-18 | 2019-05-28 | 浙江大学 | A kind of ship detecting method of pulling in shore based on edge line analysis and converging channels feature |
CN111582084A (en) * | 2020-04-24 | 2020-08-25 | 北京航空航天大学 | Weak supervision learning-based rail foreign matter detection method and system under empty base view angle |
Non-Patent Citations (3)
Title |
---|
《Aggregate channel features for multi-view face detection》;Yang B,et al;《IEEE international Joint Conference on Biometrics》;20141002;全文 * |
《基于边缘线分析与聚合通道特征的港口舰船检测》;黎经元,等;《光学学报》;20190831;第39卷(第8期);第1-10页 * |
《自适应铁路场景前景目标检测》;李兴鑫,等;《交通运输***工程与信息》;20200430;第20卷(第2期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN112949484A (en) | 2021-06-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112949484B (en) | High-speed railway rockfall real-time detection method | |
CN103077384B (en) | A kind of method and system of vehicle-logo location identification | |
CN107253485B (en) | Foreign matter invades detection method and foreign matter invades detection device | |
CN108038883B (en) | Crack detection and identification method applied to highway pavement video image | |
CN101408942B (en) | Method for locating license plate under a complicated background | |
CN101739686B (en) | Moving object tracking method and system thereof | |
CN103442209B (en) | Video monitoring method of electric transmission line | |
CN109255350B (en) | New energy license plate detection method based on video monitoring | |
CN112287888B (en) | Track turning recognition method based on predictive weight | |
CN109784344A (en) | A kind of non-targeted filtering method of image for ground level mark identification | |
CN111814686A (en) | Vision-based power transmission line identification and foreign matter invasion online detection method | |
CN110084169B (en) | Illegal building identification method based on K-Means clustering and contour topology constraint | |
CN108805065A (en) | One kind being based on the improved method for detecting lane lines of geometric properties | |
CN105528609A (en) | Vehicle license plate location method based on character position | |
CN108921076B (en) | Pavement crack disease self-adaptive constant false alarm detection method based on image | |
CN102968625A (en) | Ship distinguishing and tracking method based on trail | |
CN110782409B (en) | Method for removing shadow of multiple moving objects | |
CN110276787B (en) | Conductor galloping monitoring method based on marker image detection | |
KR101224027B1 (en) | Method for dectecting front vehicle using scene information of image | |
CN109886168B (en) | Ground traffic sign identification method based on hierarchy | |
CN109815961B (en) | Pavement repairing type disease detection method based on local texture binary pattern | |
CN115049654B (en) | Method for extracting reflective light bar of steel rail | |
CN110321855A (en) | A kind of greasy weather detection prior-warning device | |
CN103400113A (en) | Method for detecting pedestrian on expressway or in tunnel based on image processing | |
Du et al. | Research on an efficient method of license plate location |
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 |