CN108416316B - Detection method and system for black smoke vehicle - Google Patents
Detection method and system for black smoke vehicle Download PDFInfo
- Publication number
- CN108416316B CN108416316B CN201810225174.6A CN201810225174A CN108416316B CN 108416316 B CN108416316 B CN 108416316B CN 201810225174 A CN201810225174 A CN 201810225174A CN 108416316 B CN108416316 B CN 108416316B
- Authority
- CN
- China
- Prior art keywords
- black smoke
- area
- image
- region
- vehicle
- 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
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
- G06V20/54—Surveillance or monitoring of activities, e.g. for recognising suspicious objects of traffic, e.g. cars on the road, trains or boats
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
-
- 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/26—Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
- G06V10/267—Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
-
- 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/44—Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
-
- 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/08—Detecting or categorising vehicles
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Biophysics (AREA)
- Data Mining & Analysis (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Biomedical Technology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Computational Linguistics (AREA)
- Health & Medical Sciences (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a black smoke vehicle detection method and a system, the method is characterized in that the black smoke region of the image acquired after transformation is more prominent by picture information acquired by intersection monitoring equipment based on an improved black smoke detection algorithm for detecting a maximum stable extremum region and by color enhancement transformation of the black smoke region, the maximum stable extremum region is detected on the image obtained by transformation, and the black smoke region is segmented, so that the defect that the black smoke cannot be accurately segmented by traditional methods based on color information and the like is avoided, the black smoke vehicle detection speed is accelerated, and the black smoke vehicle detection complexity is greatly reduced; the system is convenient to operate and has a large market application space.
Description
Technical Field
The invention belongs to the field of motor vehicle tail gas detection, and particularly relates to a black smoke vehicle detection method and system.
Background
Maximum Stable Extremal Region (MSER) is a speckle region detection that can be used for images, and the algorithm was first proposed in 2002 by Matas et al, which is based on the concept of watershed. The MSER is based on the basic principle that a threshold value is taken for a gray image (the gray value is 0-255) to carry out binarization processing, the threshold value is sequentially increased from 0 to 255, the increasing of the threshold value is similar to the rising of a horizontal plane in a watershed algorithm, some shorter hills can be submerged along with the rising of a water surface, and if the water surface looks down from the sky, the ground is divided into two parts, namely a land part and a water area part, which are similar to a binary image. In all the obtained binary images, some connected regions of the binary images have little or no change, and then the regionThe domain is called the maximally stable extremal region. This is similar to the situation where there is no change in the area of the area submerged when the water level continues to rise, and is mathematically defined as Q (i) ═ Qi+Δ-Qi-Δ|/|QiL, wherein QiRepresents a certain connected region when the threshold is i, and Δ is a small variation of the gray threshold, qiIs the region Q when the threshold value is iiThe rate of change of (c). When q isiAt local minimum, then QiIs the maximum stable extremum region. In addition, since the above method can only detect the black area and cannot detect the white area of the gray image, it is necessary to perform a binarization process of inverting the original image and then performing a threshold value from 0 to 255. These two operations are called MSER + and MSER-.
In 2008 David Nister et al proposed a Linear Time Maximally Stable extreme Regions algorithm, and the new improved method is defined as: q (i) ═ Qi-Qi-Δ|/|Qi-ΔL, |; the algorithm is faster than the algorithm proposed in the original literature, a computer vision library opencv realizes a MSER module algorithm on the basis of the algorithm, the principle of the MSER segmentation algorithm is shown in fig. 1, and the proposed algorithm is based on an improved watershed algorithm, namely when water is injected into a fixed place, the water overflows to the four sides of the fixed place only after ravines in the place are filled with the water, each ravine is gradually submerged by the water along with the continuous increase of the water injection amount, but the water surface of each ravine does not rise simultaneously, the water is gradually filled with the water according to the sequence of the water overflowing the place, and the water surface only rises simultaneously for the two ravines after the two adjacent ravines are communicated together by the water. MSER has the following characteristics: 1. invariance of affine transformation is provided for the image gray level; 2. stability, regions supported within the same threshold range will be selected; 3. multi-scale detection can be achieved without any smoothing, i.e. structures of various sizes can be detected.
In recent years, with the rapid development of motor vehicle economy, the production and usage of motor vehicles are increased rapidly, the pollution of motor vehicle exhaust to the environment is severe day by day, the main air pollution in many large cities is changed from coal-fired industrial pollution to coal-fired and motor vehicle tail gas mixed pollution, and the harm of the motor vehicle tail gas pollution to the environment and the human health is serious. Although the problem has attracted social attention, the nation starts to take the control and control, but no effective measures are taken so far to thoroughly solve the problem of the tail gas pollution of the motor vehicles. However, the pollution of black smoke cars, which discharges pollutants including carbon monoxide, hydrocarbons, nitrogen oxides, sulfur dioxide, lead-containing compounds, benzopyrene and particulate matters, not only causes more serious atmospheric environmental problems such as photochemical smog, ozone layer destruction and acid rain, but also causes serious harm to the respiratory system and immune system of human bodies due to a large amount of black smoke.
At present, black smoke emission of motor vehicles is common on most urban roads in China. The common vehicles which discharge the excessive tail gas and black smoke comprise part of gasoline vehicles (old cars, minivans and the like) and large-emission diesel vehicles. The large-displacement old motor vehicle brings a series of problems that the problem of environmental pollution is difficult to solve while the regional economic development is brought, the supervision difficulty of the black smoke vehicle is high, the harm to the environment and the healthy life of human is large, and the like. The method has great significance for monitoring and detecting harmful gases such as black smoke emitted by the motor vehicle in order to better deal with serious environmental pollution caused by increasing motor vehicle exhaust emission. The detection of the black smoke vehicle is an important component of current intelligent traffic, and the detection and identification of the smoke emission of the black smoke vehicle are paid more attention in the fields of artificial intelligent traffic supervision and environment monitoring. Currently applicable to many scenarios such as: (1) a road intelligent environment monitoring system; (2) a motor vehicle exhaust over-standard emission monitoring system and the like; (3) automatic snapshot system of road. The current domestic supervision mode to the black cigarette car is mainly through way inspection and smoke sensing, the mode of the compound detector of sensitization, set up the checkpoint by the environmental protection department and carry out the tail gas inspection to some suspicious vehicles, under the current situation that motor vehicle reserves the volume and increases rapidly, the method is executed and is had the inefficiency too low, the detector detects the black cigarette that the motor vehicle discharged through black cigarette particle and concentration, can only play the detection effect in the place nearer from black cigarette car tail gas vent, to the regional great place in traffic road, the reliability of its detection is lower, can't carry out supervision and detection effect effectively. Therefore, an intelligent method for detecting black smoke cars is urgently needed to solve the problems.
Disclosure of Invention
The invention provides a black smoke vehicle detection method and a system, picture information acquired by intersection monitoring equipment is based on an improved black smoke detection algorithm for maximum stable extremum region detection, a MSER region is detected on an image obtained by conversion through color enhancement conversion of the black smoke region, the black smoke region is segmented, a non-suspected black smoke region is eliminated through a discrimination algorithm based on texture characteristics, an unnecessary and time-consuming process for detecting the non-black smoke region is skipped, the efficiency of the system for black smoke vehicle detection is improved, the computational complexity of the detection process is reduced, and the detection time is reduced.
A detection method of a black smoke vehicle comprises the following steps:
step 1: sequentially extracting vehicle outline images 0 from the road video shot in real time;
step 2: detecting a vehicle contour image of a suspected black smoke-containing area based on the characteristics of the tail gas black smoke area discharged by the motor vehicle aiming at each frame of vehicle contour image, and marking the pixel value of the pixel point of the suspected black smoke-containing area as 255;
and step 3: performing enhanced color conversion on the vehicle outline Image0 to obtain an enhanced color Image 1; (ii) a
And 4, step 4: carrying out binarization operation on the enhanced color Image1 to obtain a binary ImageAnd obtaining each binary imageConnected domain in (1)
Wherein k represents a binary threshold value, and is selected from 1-255 in sequenceTaking a value, wherein delta is the value step length of the gray level threshold and is 1;when the threshold value is k, the obtained binary image is representedAnd the connected domain is connected by a parent nodeObtained by splitting, j is not less than 1k≤Sk,SkRepresenting binary imagesThe total number of the middle connected domains;
different connected domains are different nodes, and the nodes of the same branch are split from the same branch; splitting a certain connected domain into two different connected domains for marking, describing the marked connected domains by using a tree structure according to a splitting mode, and determining the branch of each connected domain;
and 5: based on the MSER principle, the region meeting the following conditions is marked as a maximum extreme value stable region of the vehicle outline Image 0;
wherein V representsThe connected domain area in the connected domain branch changes by a stable value,to representThe extent to which the area of the represented connected domain varies from the area of its parent node connected domain,when the threshold value is k, the obtained binary image is representedThe area of the jth connected domain in (a);
each branch has a V, and there may be a total of S1The branches, namely the number of the connected domains obtained by the first value taking of the binary threshold value is taken as the reference, the subsequent splitting is carried out, the split connected domains are all split by taking the first connected domain as the basis, so the maximum number of the branches is S1;
Step 6: extracting all areas where the maximum extremum stable regions are located from the vehicle contour Image0 to be used as suspected black smoke regions, sequentially performing shape fitting and area calculation on each maximum extremum stable region of the suspected black smoke regions, eliminating non-black smoke regions in the suspected black smoke regions, and identifying that black smoke vehicles exist in the vehicle contour Image according to the pixel value variance delta in the remaining suspected black smoke regions if delta is greater than or equal to 20 and less than or equal to 180.
Further, the step of performing shape fitting on each maximum extremum stable region of the suspected black smoke region and removing the non-black smoke region in the suspected black smoke region refers to performing ellipse fitting on the maximum extremum stable region and calculating a major axis R of a fitting ellipse1And the minor axis R2If R is1/R2If the fitting ellipse is not less than 4, the corresponding fitting ellipse area is too thin and long and belongs to a non-tail gas black smoke area, and the maximum extremum stable area where the fitting ellipse is located is deleted from the suspected black smoke area; and otherwise, determining the maximum extremum stable region where the corresponding fitting ellipse is located as the approximate black smoke region.
Further, after ellipse fitting judgment, external rectangles of the maximum extremum stable regions confirmed to be approximate black smoke regions are sequentially obtained, the area of the maximum extremum stable regions and the area rect _ area of the corresponding external rectangles are calculated, if the area/rect _ area is less than or equal to 0.125, the current maximum extremum stable regions are considered to be narrow and belong to non-tail gas black smoke regions, and the corresponding maximum extremum stable regions are deleted from the confirmed suspected black smoke regions.
Further, the extracting of the vehicle outline Image0 is to first capture two thirds of the area of the entire Image near the lower end of each frame of original Image extracted from the road video captured in real time to obtain a captured Image resize _ Image; then, reducing the size of the intercepted image resize _ image according to a set size reduction proportion; and finally, detecting the vehicle outline area of the resized intercepted Image by using the existing vehicle type identification method based on the neural network to obtain a vehicle outline Image0, and if the vehicle outline of the vehicle is not detected, continuously detecting the next frame of original Image.
Further, the size of the cut image resize _ image is reduced to 320 × 240 pixels at a set size reduction scale.
Further, the pixel value of each pixel point in the enhanced color Image1 is ωT(m,n):
Wherein Ω (m, n) is a region centered on the coordinates (m, n), (i, j) ∈ Ω (m, n), ωT(m,n)For the dark channel pixel value with coordinates (m, n) in the enhanced color Image1, m is more than or equal to 0<Image1.rows,0≤n<Image1.cols, image1.rows is the number of rows of the enhanced color image, image1.cols is the number of columns of the enhanced color image;
the region Ω (m, n) is a region in which the entire image region is divided into square blocks, and the smaller the divided block, the better. (e.g., 100 x 100 size picture divided into 100 10 x 10 block regions), the coordinates (m, n) are within the entire image size;
wherein, Cmin(I, j) is a vehicle contour image IPixel point P in large 0(i,j)Minimum in the three R, G, B channels, Cmax(i, j) is a pixel P of the vehicle outline Image0(i,j)Maximum in the three R, G, B channels of (a); t (i, j) represents a transformed pixel value of the pixel point coordinates (i, j) in the vehicle contour Image 0;
dark channel value C in the case of black or gray smoke regionminIs relatively small and the color information Cmax-CminLarger, T (i, j) will be larger; in contrast, when it is a non-black smoke region, its dark channel value CminIs relatively large and the color information Cmax-CminSmaller, T (i, j) will be smaller.
Further, the step of detecting the vehicle outline image of the suspected black smoke containing area based on the characteristics of the tail gas black smoke area discharged by the motor vehicle and marking the pixel value of the pixel point of the suspected black smoke containing area as 255 means that the pixel point P of the suspected black smoke containing area is sequentially detected according to the row and column sequence by utilizing the component values of RGB and HSI color components(i,j)Whether the 3 channel R, G, B component values satisfy simultaneously:
R±r=G±g=B+b(0≤r,g,b≤k)
F1≤I=(R+G+B)/3≤F2and | Cmax(i,j)-Cmin(i,j)|≤F3
K1≤0.33R+0.33G+0.33B≤K2
Wherein r, g, b are minimum values for equalizing the 3 passages R, G, B, and k, F1、F2、F3For three thresholds, C, set according to the road scenemin(i,j)=min(R,G,B),Cmax(i,j)=max(R,G,B)。
The method comprises the steps of detecting all suspected black smoke areas by utilizing component values of RGB and HSI color components to eliminate interference of textures and shapes of non-black smoke areas, carrying out histogram equalization treatment on 6 components of RGB and HIS models, and obtaining fixed thresholds of R, G, B and I components of the suspected black smoke areas after analyzing each component map subjected to the histogram equalization treatment.
A black smoke vehicle detection system, comprising:
the vehicle contour Image acquisition module is used for sequentially extracting vehicle contour images 0 from the road videos shot in real time;
the preliminary suspected black smoke detection module detects the vehicle outline image of the suspected black smoke-containing area based on the tail gas black smoke area characteristics discharged by the motor vehicle aiming at each frame of vehicle outline image, and marks the pixel value of the pixel point of the suspected black smoke-containing area as 255;
the color enhancement processing module is used for carrying out enhancement color conversion on the vehicle outline Image0 to obtain an enhancement color Image 1;
the connected domain acquisition module is used for carrying out binarization operation on the enhanced color Image1 to obtain a binary ImageAnd obtaining each binary imageConnected domain in (1)
Wherein k represents a binary threshold value, values are sequentially taken from 1-255, and delta is the value step length of the gray level threshold value and is taken as 1;when the threshold value is k, the obtained binary image is representedAnd the connected domain is connected by a parent nodeObtained by splitting, j is not less than 1k≤Sk,SkRepresenting binary imagesThe total number of the middle connected domains;
the maximum extremum stable region marking module is used for marking a region meeting the following conditions as a maximum extremum stable region of the vehicle contour Image0 on the basis of the MSER principle;
wherein V representsThe connected domain area in the connected domain branch changes by a stable value,to representThe extent to which the area of the represented connected domain varies from the area of its parent node connected domain,when the threshold value is k, the obtained binary image is representedThe area of the jth connected domain in (a);
and the black smoke vehicle Image judgment module is used for extracting all areas where the maximum extremum stable regions are located from the vehicle outline Image0 to be used as suspected black smoke regions, sequentially performing shape fitting and area calculation on each maximum extremum stable region of the suspected black smoke regions by using the shape fitting module and the area calculation module, removing non-black smoke regions in the suspected black smoke regions, and identifying that the black smoke vehicle exists in the vehicle outline Image if delta is greater than or equal to 20 and less than or equal to 180 according to the pixel value variance delta in the remaining suspected black smoke regions.
Further, the shape fitting module fits the shape of each maximum extremum stable region of the suspected black smoke region,removing the non-black smoke region in the suspected black smoke region refers to fitting the maximum extremum stable region with an ellipse and calculating the major axis R of the fitting ellipse1And the minor axis r2If R is1/R2If the fitting ellipse is not less than 4, the corresponding fitting ellipse area is too thin and long and belongs to a non-tail gas black smoke area, and the maximum extremum stable area where the fitting ellipse is located is deleted from the suspected black smoke area; and otherwise, determining the maximum extremum stable region where the corresponding fitting ellipse is located as the approximate black smoke region.
Further, the area calculation module sequentially acquires the circumscribed rectangles of the maximum extremum stable regions confirmed to be approximate black smoke regions after ellipse fitting judgment, calculates the area of the maximum extremum stable regions and the area rect _ area of the corresponding circumscribed rectangle, and if the area/rect _ area is less than or equal to 0.125, the current maximum extremum stable region is considered to be narrow and belongs to a non-tail gas black smoke region, and the corresponding maximum extremum stable region is deleted from the confirmed suspected black smoke region.
Advantageous effects
The invention provides a black smoke vehicle detection method and a system, the method enables the black smoke region of the image acquired after transformation to be more prominent through picture information acquired by intersection monitoring equipment based on an improved black smoke detection algorithm for detecting the maximum stable extremum region and through color enhancement transformation of the black smoke region, detects the maximum stable extremum region on the image obtained through transformation, and segments the black smoke region, thereby avoiding the defect that the black smoke can not be accurately segmented based on the traditional methods such as color information and the like, simultaneously accelerating the speed of detecting the black smoke vehicle and greatly reducing the complexity of detecting the black smoke vehicle; compared with the prior art, the method has the following advantages:
1. unnecessary subsequent detection and judgment of the black smoke vehicle are avoided through vehicle type identification detection, the detection time is reduced, and the detection efficiency is improved;
2. the color enhancement transformation of the black smoke area enables the black smoke area of the transformed image to be more obvious and is easier to segment the subsequent black smoke area;
3. by carrying out improved MSER region detection on the transformed image, the accuracy of black smoke region segmentation is improved, the time for black smoke region segmentation is reduced, and the problem that black smoke is difficult to segment accurately according to the inter-frame motion information of the video or the color information of a single-frame image is solved;
4. the method is simple and feasible, can detect the black smoke area under the real-time condition, and is convenient for the industrialized popularization of black smoke vehicle detection.
Drawings
FIG. 1 is a flow chart of the MSER algorithm principle;
FIG. 2 is an overall flow chart of the method of the present invention.
Detailed Description
The invention will be further described with reference to the following figures and examples.
The invention specifically adopts the technical scheme that: firstly, selecting a frame of picture from a video acquired by a monitoring camera, judging whether a motor vehicle exists or not through primary vehicle type identification, acquiring a region around the contour of the motor vehicle, detecting a black smoke region, and performing black smoke color enhancement transformation on the image. And detecting suspected black smoke areas of the MSER after the conversion of the image, removing the black smoke areas which do not accord with the MSER, and merging the MSER areas which accord with the color and texture characteristics of the black smoke. Due to the texture features of the black smoke area and the irregularity of the outline area, the ratio of the long axis and the short axis of the ellipse of the suspected MSER black smoke area is fitted for judgment, and then the ratio of the circumscribed rectangle containing the suspected MSER black smoke area to the area of the suspected MSER black smoke area is used for judgment, so that the interference of other non-black smoke areas is eliminated. And finally, judging whether the characteristic of the black smoke is met by calculating the variance of the suspected MSER black smoke area.
As shown in fig. 2, a method for detecting a black smoke vehicle includes the following steps:
step 1: sequentially extracting vehicle outline images 0 from the road video shot in real time;
the extraction of the vehicle outline Image0 is that firstly, two thirds of the area of the whole Image close to the lower end of each frame of original Image extracted from a road video shot in real time is intercepted to obtain an intercepted Image, namely, resize _ Image; then adjusting the size of the intercepted image resize _ image to 320 multiplied by 240 pixels; and finally, detecting the vehicle outline area of the resized intercepted Image by using the existing vehicle type identification method based on the neural network to obtain a vehicle outline Image0, and if the vehicle outline of the vehicle is not detected, continuously detecting the next frame of original Image.
Step 2: detecting a vehicle contour image of a suspected black smoke-containing area based on the characteristics of the tail gas black smoke area discharged by the motor vehicle aiming at each frame of vehicle contour image, and marking the pixel value of the pixel point of the suspected black smoke-containing area as 255;
sequentially detecting pixel points P in suspected black smoke area according to line sequence by utilizing component values of RGB and HSI color components(i,j)Whether the 3 channel R, G, B component values satisfy simultaneously:
R±r=G±g=B+b(0≤r,g,b≤k)
F1≤I=(R+G+B)/3≤F2and | Cmax(i,j)-Cmin(i,j)|≤F3
K1≤0.33R+0.33G+0.33B≤K2
Wherein r, g, b are minimum values for equalizing the 3 passages R, G, B, and k, F1、F2、F3For three thresholds, C, set according to the road scenemin(i,j)=min(R,G,B),Cmax(i,j)=max(R,G,B)。
The method comprises the steps of detecting all suspected black smoke areas by utilizing component values of RGB and HSI color components to eliminate interference of textures and shapes of non-black smoke areas, carrying out histogram equalization treatment on 6 components of RGB and HIS models, and obtaining fixed thresholds of R, G, B and I components of the suspected black smoke areas after analyzing each component map subjected to the histogram equalization treatment.
And step 3: performing enhanced color conversion on the vehicle outline Image0 to obtain an enhanced color Image 1;
the pixel value of each pixel point in the enhanced color Image1 is omegaT(m,n):
Wherein Ω (m, n) is a region centered on the coordinates (m, n), (i, j) ∈ Ω (m, n), ωT(m,n)For the dark channel pixel value with coordinates (m, n) in the enhanced color Image1, m is more than or equal to 0<Image1.rows,0≤n<Image1.cols, image1.rows is the number of rows of the enhanced color image, image1.cols is the number of columns of the enhanced color image;
the region Ω (m, n) is a region in which the entire image region is divided into square blocks, and the smaller the divided block, the better. (e.g., 100 x 100 size picture divided into 100 10 x 10 block regions), the coordinates (m, n) are within the entire image size;
wherein, Cmin(i,j)Is a pixel point P in the vehicle outline Image0(i,j)Minimum in the three R, G, B channels, Cmax(i,j)Is a pixel point P of a vehicle outline Image0(i,j)Maximum in the three R, G, B channels of (a); t (i, j) represents a transformed pixel value of the pixel point coordinates (i, j) in the vehicle contour Image 0;
dark channel value C in the case of black or gray smoke regionminIs relatively small and the color information Cmax-CminLarger, T (i, j) will be larger; in contrast, when it is a non-black smoke region, its dark channel value CminIs relatively large and the color information Cmax-CminSmaller, T (i, j) will be smaller.
And 4, step 4: carrying out binarization operation on the enhanced color Image1 to obtain a binary ImageAnd obtaining each binary imageConnected domain in (1)
Wherein k represents a binary threshold value, values are sequentially taken from 1-255, and delta is the value step length of the gray level threshold value and is taken as 1;when the threshold value is k, the obtained binary image is representedAnd the connected domain is connected by a parent nodeObtained by splitting, j is not less than 1k≤Sk,SkRepresenting binary imagesThe total number of the middle connected domains;
different connected domains are different nodes, and the nodes of the same branch are split from the same branch; splitting a certain connected domain into two different connected domains for marking, describing the marked connected domains by using a tree structure according to a splitting mode, and determining the branch of each connected domain;
and 5: based on the MSER principle, the region meeting the following conditions is marked as a maximum extreme value stable region of the vehicle outline Image 0;
wherein V representsThe connected domain area in the connected domain branch changes by a stable value,to representThe extent to which the area of the represented connected domain varies from the area of its parent node connected domain,when the threshold value is k, the obtained binary image is representedThe area of the jth connected domain in (a);
each branch has a V, and there may be a total of S1The branches, namely the number of the connected domains obtained by the first value taking of the binary threshold value is taken as the reference, the subsequent splitting is carried out, the split connected domains are all split by taking the first connected domain as the basis, so the maximum number of the branches is S1;
Step 6: extracting all areas where the maximum extremum stable regions are located from the vehicle contour Image0 to be used as suspected black smoke regions, sequentially performing shape fitting and area calculation on each maximum extremum stable region of the suspected black smoke regions, eliminating non-black smoke regions in the suspected black smoke regions, and identifying that black smoke vehicles exist in the vehicle contour Image according to the pixel value variance delta in the remaining suspected black smoke regions if delta is greater than or equal to 20 and less than or equal to 180.
The step of fitting the shape of each maximum extremum stable region of the suspected black smoke region and removing the non-black smoke regions in the suspected black smoke region refers to fitting an ellipse to the maximum extremum stable region and calculating the major axis R of the fitting ellipse1And the minor axis R2If R is1/R2If the fitting ellipse is not less than 4, the corresponding fitting ellipse area is too thin and long and belongs to a non-tail gas black smoke area, and the maximum extremum stable area where the fitting ellipse is located is deleted from the suspected black smoke area; and otherwise, determining the maximum extremum stable region where the corresponding fitting ellipse is located as the approximate black smoke region.
From each point within the fitted elliptical area,calculating geometric 0-order moment and geometric first-order moment m of fitting elliptical area00=∑I(x,y),m01=∑yI(x,y),m10Σ xI (x, y), the center of gravity position of the entire fitting ellipse region is obtained
Calculating the second moment of the center of the fitting ellipse regionWherein u is20=∑(x-xc)2I(x,y),y02=∑(y-yc)2I(x,y),u11=∑(x-xc)(y-yc) I (x, y). Two characteristic values of the second moment are calculated, wherein,
And after ellipse fitting judgment, sequentially acquiring circumscribed rectangles of the maximum extremum stable regions confirmed to be approximate black smoke regions, calculating the area of the maximum extremum stable regions and the area rect _ area of the corresponding circumscribed rectangles, if the area/rect _ area is less than or equal to 0.125, determining that the current maximum extremum stable regions are narrow and belong to non-tail gas black smoke regions, and deleting the corresponding maximum extremum stable regions from the confirmed suspected black smoke regions.
A black smoke vehicle detection system, comprising:
the vehicle contour Image acquisition module is used for sequentially extracting vehicle contour images 0 from the road videos shot in real time;
the preliminary suspected black smoke detection module detects the vehicle outline image of the suspected black smoke-containing area based on the tail gas black smoke area characteristics discharged by the motor vehicle aiming at each frame of vehicle outline image, and marks the pixel value of the pixel point of the suspected black smoke-containing area as 255;
the color enhancement processing module is used for carrying out enhancement color conversion on the vehicle outline Image0 to obtain an enhancement color Image 1;
the connected domain acquisition module is used for carrying out binarization operation on the enhanced color Image1 to obtain a binary ImageAnd obtaining each binary imageConnected domain in (1)
Wherein k represents a binary threshold value, values are sequentially taken from 1-255, and delta is the value step length of the gray level threshold value and is taken as 1;when the threshold value is k, the obtained binary image is representedAnd the connected domain is connected by a parent nodeObtained by splitting, j is not less than 1k≤Sk,SkRepresenting binary imagesThe total number of the middle connected domains;
the maximum extremum stable region marking module is used for marking a region meeting the following conditions as a maximum extremum stable region of the vehicle contour Image0 on the basis of the MSER principle;
wherein V representsThe connected domain area in the connected domain branch changes by a stable value,to representThe extent to which the area of the represented connected domain varies from the area of its parent node connected domain,when the threshold value is k, the obtained binary image is representedThe area of the jth connected domain in (a);
and the black smoke vehicle Image judgment module is used for extracting all areas where the maximum extremum stable regions are located from the vehicle outline Image0 to be used as suspected black smoke regions, sequentially performing shape fitting and area calculation on each maximum extremum stable region of the suspected black smoke regions by using the shape fitting module and the area calculation module, removing non-black smoke regions in the suspected black smoke regions, and identifying that the black smoke vehicle exists in the vehicle outline Image if delta is greater than or equal to 20 and less than or equal to 180 according to the pixel value variance delta in the remaining suspected black smoke regions.
The shape fitting module is used for performing shape fitting on each maximum extreme value stable area of the suspected black smoke area and removing non-black smoke areas in the suspected black smoke area, namely performing ellipse fitting on the maximum extreme value stable area and calculating the long axis R of a fitting ellipse1And the minor axis R2If R is1/R2If the fitting ellipse is not less than 4, the corresponding fitting ellipse area is too thin and long and belongs to a non-tail gas black smoke area, and the maximum extremum stable area where the fitting ellipse is located is deleted from the suspected black smoke area; and otherwise, determining the maximum extremum stable region where the corresponding fitting ellipse is located as the approximate black smoke region.
The area calculation module sequentially acquires the external rectangles of the maximum extremum stable areas confirmed to be approximate black smoke areas after ellipse fitting judgment, calculates the area of the maximum extremum stable areas and the area rect _ area of the corresponding external rectangles, and if the area/rect _ area is less than or equal to 0.125, the current maximum extremum stable areas are considered to be narrow and belong to non-tail gas black smoke areas, and the corresponding maximum extremum stable areas are deleted from the confirmed suspected black smoke areas.
The specific embodiments described herein are merely illustrative of the spirit of the invention. Various modifications or additions may be made to the described embodiments or alternatives may be employed by those skilled in the art without departing from the spirit or ambit of the invention as defined in the appended claims.
Claims (7)
1. The detection method of the black smoke vehicle is characterized by comprising the following steps:
step 1: sequentially extracting vehicle outline images 0 from the road video shot in real time;
step 2: detecting a vehicle contour image of a suspected black smoke-containing area based on the characteristics of the tail gas black smoke area discharged by the motor vehicle aiming at each frame of vehicle contour image, and marking the pixel value of the pixel point of the suspected black smoke-containing area as 255;
and step 3: performing enhanced color conversion on the vehicle outline Image0 to obtain an enhanced color Image 1;
and 4, step 4: carrying out binarization operation on the enhanced color Image1 to obtain a binary ImageAnd obtaining each binary imageConnected domain in (1)
Wherein k representsA binary threshold value is sequentially taken from 1 to 255, wherein delta is the value step length of the gray level threshold value and is taken as 1;when the threshold value is k, the obtained binary image is representedAnd the connected domain is connected by a parent nodeObtained by splitting, j is not less than 1k≤Sk,SkRepresenting binary imagesThe total number of the middle connected domains;
and 5: based on the MSER principle, the region meeting the following conditions is marked as a maximum extreme value stable region of the vehicle outline Image 0;
wherein V representsThe connected domain area in the connected domain branch changes by a stable value,to representThe extent to which the area of the represented connected domain varies from the area of its parent node connected domain,when the threshold value is k, the obtained binary image is representedThe area of the jth connected domain in (a);
step 6: extracting areas where all maximum extremum stable areas are located from the vehicle contour Image0 to serve as suspected black smoke areas, sequentially performing shape fitting and area calculation on each maximum extremum stable area of the suspected black smoke areas, eliminating non-black smoke areas in the suspected black smoke areas, and identifying that a black smoke vehicle exists in the vehicle contour Image if delta is more than or equal to 20 and less than or equal to 180 according to pixel value variance delta in the remaining suspected black smoke areas;
the step of fitting the shape of each maximum extremum stable region of the suspected black smoke region and removing the non-black smoke regions in the suspected black smoke region refers to fitting an ellipse to the maximum extremum stable region and calculating the major axis R of the fitting ellipse1And the minor axis R2If R is1/R2If the fitting ellipse is not less than 4, the corresponding fitting ellipse area is too thin and long and belongs to a non-tail gas black smoke area, and the maximum extremum stable area where the fitting ellipse is located is deleted from the suspected black smoke area; otherwise, determining the maximum extremum stable region where the corresponding fitting ellipse is located as an approximate black smoke region;
calculating the geometric 0 th order moment and the geometric first order moment m of the fitting elliptical area according to each point in the fitting elliptical area00=∑I(x,y),m01=∑yI(x,y),m10Σ xI (x, y), the center of gravity position of the entire fitting ellipse region is obtainedCalculating the second moment of the center of the fitting ellipse regionWherein u is20=∑(x-xc)2I(x,y),u02=∑(y-yc)2I(x,y),u11=∑(x-xc)(y-yc) I (x, y); calculating two features of the second momentThe values of, among others,
The extraction of the vehicle outline Image0 is that firstly, two thirds of the area of the whole Image close to the lower end of each frame of original Image extracted from a road video shot in real time is intercepted to obtain an intercepted Image, namely, resize _ Image; then, reducing the size of the intercepted image resize _ image according to a set size reduction proportion; and finally, detecting the vehicle outline area of the resized intercepted Image by using the existing vehicle type identification method based on the neural network to obtain a vehicle outline Image0, and if the vehicle outline of the vehicle is not detected, continuously detecting the next frame of original Image.
2. The method according to claim 1, wherein after ellipse fitting, the circumscribed rectangles of the maximum extremum stable regions confirmed as the approximately black smoke regions are sequentially obtained, the area of the maximum extremum stable region and the area rect _ area of the corresponding circumscribed rectangle are calculated, if the area/rect _ area is less than or equal to 0.125, the current maximum extremum stable region is considered to be narrow and belongs to the non-tail gas black smoke region, and the corresponding maximum extremum stable region is deleted from the confirmed approximately black smoke regions.
3. The method of claim 2, wherein the truncated image resize _ image is resized to 320 x 240 pixels at a set down-scaling.
4. The method of claim 1, wherein the pixel value of each pixel point in the enhanced color Image1 is ωT(m,n):
Wherein Ω (m, n) is a region centered on the coordinates (m, n), (i, j) ∈ Ω (m, n), ωT(m,n)For the dark channel pixel value with coordinates (m, n) in the enhanced color Image1, m is more than or equal to 0<Image1.rows,0≤n<Colour, image1.cols, image1.rows is the number of rows of the enhanced colour image and image1.cols is the number of columns of the enhanced colour image.
5. The method according to claim 1, wherein the step of detecting the vehicle outline image of the suspected black smoke containing area based on the characteristics of the tail gas black smoke area emitted by the motor vehicle and marking the pixel values of the pixel points of the suspected black smoke containing area as 255 means that the pixel points P of the suspected black smoke containing area are detected sequentially in line and column by using the component values of RGB and HSI color components(i,j)Whether the 3 channel R, G, B component values satisfy simultaneously:
R±r=G±g=B+b(0≤r,g,b≤k)
F1≤I=(R+G+B)/3≤F2and | Cmax(i,j)-Cmin(i,j)|≤F3
K1≤0.33R+0.33G+0.33B≤K2
Wherein r, g, b are minimum values for equalizing the 3 passages R, G, B, and k, F1、F2、F3For three thresholds, C, set according to the road scenemin(i,j)=min(R,G,B),Cmax(i,j)=max(R,G,B)。
6. A detection system of black smoke car, characterized by, includes:
the vehicle contour Image acquisition module is used for sequentially extracting vehicle contour images 0 from the road videos shot in real time;
the preliminary suspected black smoke detection module detects the vehicle outline image of the suspected black smoke-containing area based on the tail gas black smoke area characteristics discharged by the motor vehicle aiming at each frame of vehicle outline image, and marks the pixel value of the pixel point of the suspected black smoke-containing area as 255;
the color enhancement processing module is used for carrying out enhancement color conversion on the vehicle outline Image0 to obtain an enhancement color Image 1;
the connected domain acquisition module is used for carrying out binarization operation on the enhanced color Image1 to obtain a binary ImageAnd obtaining each binary imageConnected domain in (1)
Wherein k represents a binary threshold value, values are sequentially taken from 1-255, and delta is the value step length of the gray level threshold value and is taken as 1;when the threshold value is k, the obtained binary image is representedAnd the connected domain is connected by a parent nodeObtained by splitting, j is not less than 1k≤Sk,SkRepresenting binary imagesThe total number of the middle connected domains;
the maximum extremum stable region marking module is used for marking a region meeting the following conditions as a maximum extremum stable region of the vehicle contour Image0 on the basis of the MSER principle;
wherein V representsThe connected domain area in the connected domain branch changes by a stable value,to representThe extent to which the area of the represented connected domain varies from the area of its parent node connected domain,when the threshold value is k, the obtained binary image is representedThe area of the jth connected domain in (a);
the black smoke vehicle Image judgment module is used for extracting all areas where the maximum extremum stable regions are located from the vehicle outline Image0 to serve as suspected black smoke regions, conducting shape fitting and area calculation on each maximum extremum stable region of the suspected black smoke regions by using the shape fitting module and the area calculation module in sequence, eliminating non-black smoke regions in the suspected black smoke regions, and identifying that a black smoke vehicle exists in the vehicle outline Image if delta is larger than or equal to 20 and smaller than or equal to 180 according to pixel value variance delta in the remaining suspected black smoke regions;
the shape fitting module is used for performing shape fitting on each maximum extreme value stable area of the suspected black smoke area and removing non-black smoke areas in the suspected black smoke area, namely performing ellipse fitting on the maximum extreme value stable area and calculating the long axis R of a fitting ellipse1And the minor axis R2If R is1/R2If the fitting ellipse area is not less than 4, the corresponding fitting ellipse area is too thin and long, and the fitting ellipse area belongs to non-tail gasDeleting the maximum extremum stable region where the fitting ellipse is located from the suspected black smoke region; otherwise, determining the maximum extremum stable region where the corresponding fitting ellipse is located as an approximate black smoke region;
calculating the geometric 0 th order moment and the geometric first order moment m of the fitting elliptical area according to each point in the fitting elliptical area00=∑I(x,y),m01=∑yI(x,y),m10Σ xI (x, y), the center of gravity position of the entire fitting ellipse region is obtainedCalculating the second moment of the center of the fitting ellipse regionWherein u is20=∑(x-xc)2I(x,y),u02=∑(y-yc)2I(x,y),u11=∑(x-xc)(y-yc) I (x, y); two characteristic values of the second moment are calculated, wherein,
The extraction of the vehicle outline Image0 is that firstly, two thirds of the area of the whole Image close to the lower end of each frame of original Image extracted from a road video shot in real time is intercepted to obtain an intercepted Image, namely, resize _ Image; then, reducing the size of the intercepted image resize _ image according to a set size reduction proportion; and finally, detecting the vehicle outline area of the resized intercepted Image by using the existing vehicle type identification method based on the neural network to obtain a vehicle outline Image0, and if the vehicle outline of the vehicle is not detected, continuously detecting the next frame of original Image.
7. The system according to claim 6, wherein the area calculation module sequentially obtains the circumscribed rectangles of the maximum extremum stable regions confirmed as the approximate black smoke regions after the ellipse fitting judgment, calculates the area of the maximum extremum stable regions and the corresponding circumscribed rectangle area, and if the area/rec _ area is less than or equal to 0.125, the current maximum extremum stable region is considered to be narrow and belongs to the non-tail gas black smoke region, and the corresponding maximum extremum stable region is deleted from the confirmed suspected black smoke region.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810225174.6A CN108416316B (en) | 2018-03-19 | 2018-03-19 | Detection method and system for black smoke vehicle |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810225174.6A CN108416316B (en) | 2018-03-19 | 2018-03-19 | Detection method and system for black smoke vehicle |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108416316A CN108416316A (en) | 2018-08-17 |
CN108416316B true CN108416316B (en) | 2022-04-05 |
Family
ID=63132158
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810225174.6A Active CN108416316B (en) | 2018-03-19 | 2018-03-19 | Detection method and system for black smoke vehicle |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108416316B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109165602B (en) * | 2018-08-27 | 2023-05-19 | 成都华安视讯科技有限公司 | Black smoke vehicle detection method based on video analysis |
CN109035298B (en) * | 2018-09-05 | 2021-12-07 | 中南大学 | Black smoke detection and DG calculation method based on black smoke motion characteristics |
CN109409224B (en) * | 2018-09-21 | 2023-09-05 | 河海大学 | Method for detecting flame in natural scene |
CN109934126B (en) * | 2019-02-25 | 2021-01-15 | 北方工业大学 | Vehicle tail smoke detection method and system |
CN112580401A (en) * | 2019-09-29 | 2021-03-30 | 杭州海康威视数字技术股份有限公司 | Vehicle detection method and device |
CN111126165B (en) * | 2019-11-29 | 2022-07-29 | 苏州科达科技股份有限公司 | Black smoke vehicle detection method and device and electronic equipment |
CN114022817A (en) * | 2021-12-06 | 2022-02-08 | 广州市云景信息科技有限公司 | Black smoke detection method adaptive to environment change of detection station |
Family Cites Families (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101783076B (en) * | 2010-02-04 | 2012-06-13 | 西安理工大学 | Method for quick vehicle type recognition under video monitoring mode |
CN103049736A (en) * | 2011-10-17 | 2013-04-17 | 天津市亚安科技股份有限公司 | Face identification method based on maximum stable extremum area |
US9626576B2 (en) * | 2013-03-15 | 2017-04-18 | MotionDSP, Inc. | Determining maximally stable external regions using a parallel processor |
CN103646242B (en) * | 2013-12-31 | 2016-08-24 | 成都正扬博创电子技术有限公司 | Extended target tracking based on maximum stable extremal region feature |
CN104050480A (en) * | 2014-05-21 | 2014-09-17 | 燕山大学 | Cigarette smoke detection method based on computer vision |
RU2658874C1 (en) * | 2014-06-12 | 2018-06-25 | ЭЙЗО Корпорайшн | Fog remover device and method of forming images |
KR102188162B1 (en) * | 2014-08-19 | 2020-12-07 | 현대자동차주식회사 | Method and Apparatus for Detecting Vehicle in Foggy Atmosphere |
CN104751171B (en) * | 2015-03-09 | 2016-04-20 | 中南大学 | The naive Bayesian scanning certificate image classification method of feature based weighting |
CN104834920A (en) * | 2015-05-25 | 2015-08-12 | 成都通甲优博科技有限责任公司 | Intelligent forest fire recognition method and device based on multispectral image of unmanned plane |
CN106157271A (en) * | 2016-03-01 | 2016-11-23 | 闽南师范大学 | A kind of method that carbon-bearing particulate matter nanostructured based on image processing techniques is analyzed |
CN106951821A (en) * | 2016-12-27 | 2017-07-14 | 湘潭大学 | A kind of black smoke car intelligent monitoring recognition methods based on image processing techniques |
CN107085714B (en) * | 2017-05-09 | 2019-12-24 | 北京理工大学 | Forest fire detection method based on video |
-
2018
- 2018-03-19 CN CN201810225174.6A patent/CN108416316B/en active Active
Non-Patent Citations (2)
Title |
---|
opencv MSER;cv_ml_张欣男;《https://www.cnblogs.com/sdlypyzq/p/4387112.html》;20150402;第1-15页 * |
基于颜色增强变换和MSER检测的烟雾检测算法;李笋 等;《北京理工大学学报》;20161031;第36卷(第10期);第1072-1078页 * |
Also Published As
Publication number | Publication date |
---|---|
CN108416316A (en) | 2018-08-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108416316B (en) | Detection method and system for black smoke vehicle | |
Zhang et al. | CCTSDB 2021: a more comprehensive traffic sign detection benchmark | |
CN111368687B (en) | Sidewalk vehicle illegal parking detection method based on target detection and semantic segmentation | |
CN101334836B (en) | License plate positioning method incorporating color, size and texture characteristic | |
CN106971155B (en) | Unmanned vehicle lane scene segmentation method based on height information | |
CN106447674B (en) | Background removing method for video | |
CN106951821A (en) | A kind of black smoke car intelligent monitoring recognition methods based on image processing techniques | |
CN103093249A (en) | Taxi identifying method and system based on high-definition video | |
CN113657305B (en) | Video-based intelligent detection method for black smoke vehicle and ringeman blackness level | |
CN110717886A (en) | Pavement pool detection method based on machine vision in complex environment | |
CN114743119A (en) | High-speed rail contact net dropper nut defect detection method based on unmanned aerial vehicle | |
CN113221943B (en) | Diesel vehicle black smoke image identification method, system and storage medium | |
CN113326846A (en) | Rapid bridge apparent disease detection method based on machine vision | |
CN116597270A (en) | Road damage target detection method based on attention mechanism integrated learning network | |
CN106951831B (en) | Pedestrian detection tracking method based on depth camera | |
CN111881914B (en) | License plate character segmentation method and system based on self-learning threshold | |
CN118196683A (en) | Expressway casting object detection method based on significance prospect matching | |
CN111339824A (en) | Road surface sprinkled object detection method based on machine vision | |
CN114821510B (en) | Lane line detection method and device based on improved U-Net network | |
CN111339823A (en) | Threshing and sunning ground detection method based on machine vision and back projection algorithm | |
CN112150828B (en) | Method for preventing jitter interference and dynamically regulating traffic lights based on image recognition technology | |
CN110321973B (en) | Combined vehicle detection method based on vision | |
Park et al. | Potholeeye+: Deep-learning based pavement distress detection system toward smart maintenance | |
CN113743226A (en) | Daytime headlamp language recognition and early warning method and system | |
Chen et al. | License plate location for vehicles passing through a gate |
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 |