A method and system for quickly detecting road black smoke vehicles
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANDONG JIAOTONG UNIV
- Filing Date
- 2024-08-02
- Publication Date
- 2026-08-07
AI Technical Summary
[0003]目前黑烟抓拍检测系统多与遥感监测系统结合使用,黑烟识别与不透光烟度或林格曼黑度联合使用,系统复杂、成本高、响应时间长,缺少在不同环境、不同道路、不同时间段测试时,识别率高、误抓率低、抗干扰性强、适应性强的道路黑烟车快速检测系统
[0054] 1. This invention is based on high-definition high-speed cameras capturing photos of vehicles passing through test points. After sequentially performing grayscale and binarization processing on the collected photos, the pixel area for finding black smoke is determined. Then, within this area, the specific black smoke area is determined based on set judgment conditions, thereby obtaining the black smoke area ratio and black smoke area length ratio to determine whether the vehicle is a black smoke vehicle, thus realizing real-time automatic identification of black smoke vehicles.
Smart Images

Figure CN118982799B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image detection technology, specifically to a rapid detection method and system for vehicles emitting black smoke on roads. Background Technology
[0002] With the rapid increase in car ownership, vehicle exhaust pollution has become one of the main sources of urban air pollution. Black smoke emissions from vehicles contain a large number of harmful substances, such as carbon monoxide (CO), hydrocarbons (HC), nitrogen oxides (NOx), and particulate matter (PM), which pose a serious threat to the ecological environment and human health. Therefore, detecting and controlling black smoke emissions from vehicles is an important measure to protect the environment and public health.
[0003] Currently, black smoke capture and detection systems are mostly used in conjunction with remote sensing monitoring systems. Black smoke identification is combined with opacity or Ringelmann blackness. The system is complex, costly, and has a long response time. There is a lack of a rapid black smoke vehicle detection system that can achieve high recognition rate, low false detection rate, strong anti-interference and adaptability when tested in different environments, on different roads and at different time periods. Summary of the Invention
[0004] This invention provides a rapid detection method for vehicles emitting black smoke on roads.
[0005] The technical solution of this invention is as follows:
[0006] A rapid detection method for vehicles emitting black smoke on roads includes the following steps:
[0007] S1. Photo capture: Capture photos of vehicles on the road, obtain the vehicle's license plate number, the coordinate position of any vertex of the license plate in the photo, and the size of the license plate in the photo;
[0008] S2. Photo Processing: Perform grayscale conversion and binarization on the photo sequentially to obtain the binarized image.
[0009] S3. Determine the area to search for black smoke:
[0010] Based on the number of wide and high pixels of the binarized image, the pixel position of the license plate vertex in the binarized image and the number of pixels of the license plate in the binarized image are obtained. Furthermore, the upper y-axis limit, lower y-axis limit, upper x-axis limit, and lower x-axis limit of the black smoke pixel region are obtained.
[0011] S4. Identify the specific area of black smoke:
[0012] Within the range of the upper and lower limits of the y-axis, the upper and lower limits of the x-axis, and the lower limit of the x-axis for finding the black smoke pixel area, the sum of the pixel points and the number of black pixels are obtained row by row. After removing the vehicle shadow, the top, left, right and bottom boundaries of the specific black smoke area are determined.
[0013] S5. Black Smoke Vehicle Judgment: Based on the comparison of the black smoke area ratio with the set black smoke area ratio threshold and the black smoke area length ratio with the set black smoke area length ratio threshold, determine whether the vehicle is a black smoke vehicle.
[0014] Specifically, in step S4, within the obtained upper and lower limits of the y-axis, upper and lower limits of the x-axis of the black smoke pixel region, the sum of pixel values and the number of black pixels are obtained row by row. After removing vehicle shadows, the top boundary of the specific black smoke region is determined, which can be expressed by the formula:
[0015] Y is <(Y) smin ×1.2+10) and Y i0 ≥(x right -x left )×0.6
[0016] Among them, Y is Sum the pixels in the row containing the uppermost position of the vehicle's shadow on the y-axis. smin Y is the value of the row with the smallest sum of pixels. i0 x is the number of black pixels in a row. right To find the upper limit of the x-axis of the black smoke pixel region, x left To find the lower x-axis limit of the black smoke pixel region.
[0017]
[0018] Among them, Y iNS2 The upper limit of the y-axis for the specific area of black smoke, Y iNS This represents the upper limit position of the vehicle's shadow on the y-axis.
[0019] Furthermore, the left boundary of the specific black smoke area determined in S4 is specifically as follows:
[0020] Within a specific range of upper and lower limits on the x-axis, the sum of pixel values is obtained column by column. The column with the minimum sum is then recorded. From this column position to the lower limit on the x-axis, the number of black pixels is further calculated column by column within the upper and lower limits on the y-axis. Based on the set leftmost position judgment condition of the specific black smoke region on the x-axis, the left boundary of the specific black smoke region is determined.
[0021] Furthermore, the specific condition for determining the leftmost position of the black smoke region on the x-axis is as follows:
[0022] X j0 ≥7 and X iLS ≥x left
[0023] Among them, X j0 X represents the number of black pixels in the column. iLS The x-axis represents the leftmost position of the specific area of black smoke. left To find the lower x-axis limit of the black smoke pixel region.
[0024] The right boundary of the specific area where the black smoke is defined is as follows:
[0025] Within the range from the column containing the minimum sum of pixels to the upper limit of the x-axis, the number of black pixels is further calculated column by column within the upper and lower limits of the y-axis. Based on the set rightmost position judgment condition of the specific black smoke region on the x-axis, the right boundary of the specific black smoke region is determined.
[0026] The specific criteria for determining the rightmost position of the black smoke region on the x-axis are as follows:
[0027] X j0 ≥7 and X iRS ≤x right
[0028] Among them, X j0 X represents the number of black pixels in the column. iRS The rightmost position on the x-axis represents the specific area of black smoke. right To find the upper x-axis limit of the black smoke pixel region.
[0029] Furthermore, in step S4, the bottom boundary of the specific black smoke area is determined as follows:
[0030] Within the range from the left boundary to the right boundary of the specific black smoke area, and further within the range from the top boundary to the lower limit of the y-axis of the specific black smoke area, the number of black pixels is obtained row by row, and the bottom boundary of the specific black smoke area is determined based on the set judgment condition of the bottom boundary position of the y-axis of the specific black smoke area.
[0031] The specific conditions for determining the bottom boundary position of the black smoke region along the y-axis are as follows:
[0032] Y i0 ≥7 and Y iBS ≥y bot
[0033] Among them, Y i0 Y represents the number of black pixels in a row. iBs The y-axis position is the bottom boundary of the specific area of black smoke. bot To find the lower y-axis limit of the black smoke pixel region.
[0034] Specifically, in S5, determining whether a vehicle is emitting black smoke involves:
[0035] If the area ratio of the black smoke region exceeds the set threshold for the area ratio of the black smoke region, and the length ratio of the black smoke region exceeds the set threshold for the length ratio of the black smoke region, then the vehicle is determined to be a black smoke vehicle.
[0036] If the area ratio of the black smoke region exceeds the set threshold for the black smoke region area ratio, or the length ratio of the black smoke region exceeds the set threshold for the black smoke region length ratio, the vehicle is determined to be a suspicious black smoke vehicle.
[0037] Otherwise, determine that the vehicle is not emitting black smoke.
[0038] Furthermore, the specific range of values for obtaining the summation of pixel points column by column within a specific range of upper and lower limits of the x-axis is set as follows:
[0039]
[0040] Where x2 is the X-axis coordinate of the pixel position of any vertex of the license plate in the binarized image. This represents the width in pixels of the license plate image after binarization.
[0041] Specifically, the area ratio of the black smoke region in S5 is expressed by the formula:
[0042]
[0043] Among them, R a Y represents the area ratio of the black smoke region. iNS2 The upper limit of the y-axis for the specific area of black smoke, Y iBs The specific location of the black smoke area at the bottom boundary of the y-axis, X iRS X represents the rightmost position on the x-axis of the specific area of black smoke. iLS The leftmost position on the x-axis represents the specific area of black smoke, and the y-axis represents... bot To find the lower y-axis limit of the black smoke pixel region, y top To find the upper limit of the y-axis of the black smoke pixel region, x left To find the lower x-axis limit of the black smoke pixel region, x right To find the upper x-axis limit of the black smoke pixel region;
[0044] The ratio of the length of the black smoke area is expressed by the formula:
[0045]
[0046] Among them, R L Y represents the ratio of the length of the black smoke region. iNS2 The upper limit of the y-axis for the specific area of black smoke, Y iBsThe specific location of the black smoke area is the bottom boundary of the y-axis. bot To find the lower y-axis limit of the black smoke pixel region, y top To find the upper limit of the y-axis of the black smoke pixel region.
[0047] This invention also provides a rapid detection system for vehicles emitting black smoke on roads, comprising:
[0048] Photo Acquisition Module: Acquires photos of vehicles on the road, obtains the vehicle's license plate number, the coordinate position of any vertex of the license plate in the photo, and the size of the license plate in the photo;
[0049] Photo processing module: Performs grayscale conversion and binarization on the photo sequentially to obtain the binarized image;
[0050] The module for determining the region of black smoke: Based on the number of wide pixels and the number of high pixels in the binarized image, the pixel position of the license plate vertex in the binarized image and the number of pixels of the license plate in the binarized image are obtained, and the upper limit of the y-axis, the lower limit of the y-axis, the upper limit of the x-axis, and the lower limit of the x-axis are further obtained for the pixel region of black smoke.
[0051] The module for determining the specific black smoke region: Within the range of the upper and lower limits of the y-axis, the upper and lower limits of the x-axis, and the lower limit of the x-axis of the black smoke pixel region, the module obtains the sum of the pixel points and the number of black pixels row by row. After removing the vehicle shadow, the module determines the top, left, right and bottom boundaries of the specific black smoke region.
[0052] Black smoke vehicle detection module: Based on the comparison of the black smoke area ratio with the set black smoke area ratio threshold and the black smoke area length ratio with the set black smoke area length ratio threshold, it determines whether the vehicle is a black smoke vehicle.
[0053] The beneficial effects of this invention are as follows:
[0054] 1. This invention is based on high-definition high-speed cameras capturing photos of vehicles passing through test points. After sequentially performing grayscale and binarization processing on the collected photos, the pixel area for finding black smoke is determined. Then, within this area, the specific black smoke area is determined based on set judgment conditions, thereby obtaining the black smoke area ratio and black smoke area length ratio to determine whether the vehicle is a black smoke vehicle, thus realizing real-time automatic identification of black smoke vehicles.
[0055] 2. The method for rapid detection of black smoke from vehicles on roads provided by this invention can achieve real-time online monitoring around the clock, adapt to various roads and complex environments, and is simple, low-cost, and fast-responding. It can quickly detect excessive black smoke emissions from internal combustion engine vehicles and effectively improve the detection efficiency of polluting vehicles. Attached Figure Description
[0056] In the attached diagram:
[0057] Figure 1 This is a schematic diagram of a rapid detection method for vehicles emitting black smoke on roads, as illustrated in this embodiment.
[0058] Figure 2 This is a schematic diagram illustrating the acquisition of photos of road vehicles in the embodiment;
[0059] Figure 3 This is a schematic diagram of a rapid detection method for vehicles emitting black smoke on roads, as illustrated in the embodiment.
[0060] Figure 4 This is a schematic diagram of the empty background photograph in the embodiment. Detailed Implementation
[0061] Exemplary embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings.
[0062] Example
[0063] This embodiment provides a rapid detection method for vehicles emitting black smoke on roads. (See also...) Figure 1 This includes the following steps:
[0064] Step 1: Photo Acquisition: Acquire photos of vehicles on the road, obtain the vehicle's license plate number, the coordinate position of any vertex of the license plate in the photo, and the size of the license plate in the photo.
[0065] High-definition, high-speed cameras are used to capture photos of vehicles passing by, such as Figure 1 As shown, license plate information is extracted from the photo, including: the vehicle's license plate number, the coordinate position (x1, y1) of any vertex of the license plate in the photo, and the size of the license plate in the photo. In this embodiment, based on the fact that the exhaust pipe of most vehicles is located on the left side of the vehicle, any vertex of the license plate is limited to the upper left corner. The coordinate position of the upper left corner of the license plate bounding box in the photo is expressed proportionally as follows: the X-axis coordinate x1 of the upper left corner of the license plate bounding box is 0.395999997854233, and the Y-axis coordinate y1 of the upper left corner of the license plate bounding box is 0.310999989509583; the size of the license plate in the photo is expressed proportionally as follows: the width B of the license plate bounding box. w The license plate bounding box height B is 0.0489999987185001. h It is 0.0299999993294477.
[0066] Step 2: Photo Processing: Perform grayscale conversion and binarization on the photo in sequence to obtain the binarized image.
[0067] The photo of the vehicle passing by is converted to grayscale to obtain the R, G, and B values of each pixel in the photo. According to the grayscale conversion formula: Y = 0.299 × R + 0.587 × G + 0.114 × B + 0.5, the grayscale value is obtained and assigned to the output image to obtain the grayscale converted image.
[0068] In the image after grayscale conversion, each pixel has only one grayscale value, the magnitude of which represents the degree of brightness. A grayscale threshold T is set, and the image after grayscale conversion is binarized to divide the pixels into black and white pixels, as shown in the following formula:
[0069]
[0070] When the grayscale value Y is less than the threshold T, its pixel is set to 0, representing black; when the grayscale value Y is greater than or equal to the threshold T, its Y value is 255, representing white.
[0071] In this embodiment, the grayscale threshold T is set to 65, and the image after grayscale conversion is obtained as follows. Figure 3 As shown.
[0072] Step 3: Determine the region for finding black smoke: Based on the number of pixels in the width and height of the binarized image, obtain the pixel position of the license plate vertex in the binarized image and the number of pixels of the license plate in the binarized image. Further obtain the upper y-axis limit, lower y-axis limit, upper x-axis limit, and lower x-axis limit of the pixel region for finding black smoke.
[0073] First, based on the width and height pixel counts of the binarized image, the pixel position of the top-left corner of the license plate in the binarized image is obtained, specifically:
[0074]
[0075] Where x2 is the X-axis coordinate of the top-left corner of the license plate in the binarized image, y2 is the Y-axis coordinate of the top-left corner of the license plate in the binarized image, x1 is the X-axis coordinate of the top-left corner of the license plate in the photo, y1 is the Y-axis coordinate of the top-left corner of the license plate in the photo, and G w G represents the width in pixels of the binarized image. h This represents the number of high-resolution pixels in the binarized image.
[0076] In this embodiment, G w =4096, G h =2160, calculated as follows:
[0077]
[0078] Further, the number of pixels in the license plate image after binarization is calculated, specifically as follows:
[0079]
[0080] in, This represents the width in pixels of the license plate image after binarization. B represents the number of high-resolution pixels in the binarized image of the license plate. w B is the width of the license plate in the photo. h G represents the height of the license plate in the photo. w G represents the width in pixels of the binarized image. h This represents the number of high-resolution pixels in the binarized image.
[0081] In this embodiment,
[0082]
[0083] Based on the pixel position of the top-left corner of the license plate in the binarized image, the width pixel count of the binarized image, and the width and height pixel counts of the license plate in the binarized image, the upper and lower y-axis limits, upper and lower x-axis limits for finding the black smoke pixel region are obtained, specifically:
[0084]
[0085] Among them, y bot To find the lower y-axis limit of the black smoke pixel region, y top To find the upper limit of the y-axis of the black smoke pixel region, x left To find the lower x-axis limit of the black smoke pixel region, x right To find the upper x-axis limit of the black smoke pixel region, x2 is the x-axis coordinate of the pixel position of the top left corner of the license plate in the binarized image, and y2 is the y-axis coordinate of the pixel position of the top left corner of the license plate in the binarized image. This represents the width in pixels of the license plate image after binarization. This represents the number of high-resolution pixels in the image after binarization of the license plate.
[0086] In this embodiment, y bot =23, y top =541, x left =1019, x right =2324.
[0087] Step 4: Within the range of the upper and lower limits of the y-axis, the upper and lower limits of the x-axis, obtain the sum of the pixel values and the number of black pixels row by row. After removing the vehicle shadow, determine the top, left, right and bottom boundaries of the specific black smoke area.
[0088] Any vehicle, regardless of color, type, or direction of travel, casts a shadow between its rear and the ground. The method for identifying vehicle shadows is as follows: Identify the shadow between the rear of the vehicle and the ground along the y-axis, and then remove the vehicle shadow from specific areas covered by black smoke.
[0089] In y bot ~y top Within the range, analyze the summation value of each pixel in the binarized image row by row. And take the value of the smallest row. In this embodiment, Y smin =66555.
[0090] In y bot ~y top Within the range, in x left ~x right Calculate the number Y of pixels (0, black pixels) in the binarized image, row by row, within the specified range. i0 For example: in the first row of this embodiment (i = 23), in x left ~x right There are 193 points within the range (1019~2324), Y 10 =193, similarly, Y 20 =198, Y 30 =191, Y 40 =184, Y 50 =183, Y 60 =189, Y 70 =187, Y 80 =186, Y 90 =190, Y 100 =198
[0091] ...
[0092] In y bot ~y top Within the range, in x left ~x right Within the range, calculate the summation value Y of the binarized image pixels row by row. is And the number Y of pixels with a value of 0 (black pixels) in the image after binarization. i0 From y bot Begin, towards y top Find the y-axis position where the vehicle's shadow begins. iNSThat is, the vehicle shadow is at the upper limit of the y-axis, and the condition for the vehicle shadow to start is: Y iNS Y of the line is <(Y) smin ×1.2+10) and Y i0 ≥(x right -x left )×0.6.
[0093] In this embodiment, from y bot Start, to Y iNS When Y = 343, is =74460, Y i0 =1013, which satisfies the condition for determining vehicle shadows.
[0094] Find Y iNS Afterwards, Y iNS -1 represents the upper limit of the specific black smoke area identified along the y-axis. In this embodiment,
[0095] Furthermore, determining the left boundary of the specific black smoke region involves: within a specific range of the upper and lower limits of the x-axis, obtaining the sum of pixel values column by column, finding the column with the minimum sum of pixel values, and recording its column position. From this column position to the lower limit of the x-axis, further calculating the number of black pixels column by column within the upper and lower limits of the y-axis. Based on the set leftmost position judgment condition of the specific black smoke region on the x-axis, the left boundary of the specific black smoke region is determined.
[0096] exist Within the range, analyze the values of each pixel in the image after binarization column by column. And take the value of the smallest column. At the same time, record the column position X where the minimum value is located. jsminP In this embodiment, X jsmin =22185, X jsminP =1469.
[0097] Determine the column position X containing the minimum value jsminP Then, from column X with the most black pixels... jsminP Beginning, in X jsminP ~x left Within the range, in y bot ~y top Calculate the number X of pixels with a value of 0 (black pixel) in the binarized image column by column within the range. j0 For example, in this case, column 1 (j=1469), in y bot ~y top There are 255 points within the range (23~342), X 14690=255, similarly, X 14680 =253,X 14670 =244, X 14660 =245, X 14650 =247, X 14640 =252, X 14630 =249, X 14620 =252, X 14610 =251, X 14600 =248……
[0098] In X jsminP ~x left Within the range, in y bot ~y top Within the range, calculate X the number of pixels with a value of 0 (black pixel) in the image after binarization, column by column. j0 From X jsminP Begin, towards x left To locate the specific area of black smoke from a vehicle, find the leftmost position on the x-axis. iLS The condition for the leftmost position of the specific area of black smoke from the vehicle on the x-axis is: X iLS Column X j0 ≥7 and X iLS ≥x left .
[0099] In this embodiment, from X jsminP Start, to X iLS When X = 1026, j0 =5, satisfying the judgment condition of the leftmost position on the x-axis of the specific area of black smoke from the vehicle, find X iLS After that, X iLS This refers to the leftmost position of the specific black smoke area identified along the x-axis. In this embodiment, X... iLS =1026.
[0100] Furthermore, the right boundary of the specific black smoke region is determined as follows: within the range from the column containing the minimum sum of pixels to the upper limit of the x-axis, the number of black pixels is calculated column by column within the upper and lower limits of the y-axis. The right boundary of the specific black smoke region is determined based on the set rightmost position judgment condition of the specific black smoke region on the x-axis.
[0101] Determine the column position X containing the minimum value jsminP Then, from column X with the most black pixels... jsminP Beginning, in X jsminP ~x right Within the range, in y bot ~y top Calculate the number X of pixels with a value of 0 (black pixel) in the binarized image column by column within the range. j0For example, in this case, column 1 (j=1469), in y bot ~y top There are 255 points within the range (23~342), X 14690 =255, similarly, X 14700 =254, X 14710 =252, X 14720 =254, X 14730 =243, X 14740 =234, X 14750 =238, X 14760 =245, X 14770 =247, X 14780 =248……
[0102] In X jsminP ~x right Within the range, in y bot ~y top Within the range, calculate X the number of pixels with a value of 0 (black pixel) in the image after binarization, column by column. j0 From X jsminP Begin, towards x right To locate the specific area of black smoke from a vehicle, find the rightmost position on the x-axis. iRS The condition for the rightmost position of the specific area of black smoke from the vehicle on the x-axis is: X iRS Column X j0 ≥7 and X iRS ≤x right .
[0103] In this embodiment, from X jsminP Start, to X iRS When X = 2123, j0 =3, satisfying the judgment condition of the rightmost position on the x-axis of the specific area of black smoke from the vehicle, find X iRS After that, X iRS This refers to the rightmost position of the specific black smoke area identified along the x-axis. In this embodiment, X... iRS =2123.
[0104] Finally, the bottom boundary of the specific black smoke area is determined: within the range from the left boundary to the right boundary of the specific black smoke area, and further within the range from the top boundary to the lower limit of the y-axis of the specific black smoke area, the number of black pixels is obtained row by row, and the bottom boundary of the specific black smoke area is determined based on the set judgment condition of the bottom boundary position of the y-axis of the specific black smoke area.
[0105] Determine the left boundary X of the specific area of black smoke. iLS and right boundary X iRS Afterwards, in X iLS ~X iRSWithin the range, from the upper limit of the y-axis of the specific area of black smoke identified. Start by calculating the number Y of pixels with a value of 0 (black pixels) in the image after binarization, line by line. i0 For example, in this embodiment (i = 342), in X iLS ~X iRS There are 943 points within the range (1026~2123), Y 3420 =943, similarly, Y 3410 =898, Y 3400 =874, Y 3390 =863, Y 3380 =867, Y 3370 =862, Y 3360 =864, Y 3350 =866, Y 3340 =863, Y 3330 =868……
[0106] exist Within the range, in X iLS ~X iRS Within the range, calculate the number Y of pixels with a value of 0 (black pixels) in the image after binarization, line by line. i0 ,from Begin, towards y bot To locate the specific area of black smoke from a vehicle, find the y-axis position of the bottom boundary. iBS The condition for the bottom boundary of the specific area of black smoke from the vehicle is: Y iBS Y of the line i0 ≥7 and Y iBS ≥y bot When Y was found iBS If none of the rows meet the condition, take Y. iBS =y bot .
[0107] In this embodiment, from Start, to Y iBS =23, Y i0 =190, take Y iBS =y bot Find Y iBS Afterwards, Y iBS This refers to the lower limit of the specific black smoke area identified along the y-axis. In this embodiment, Y... iBS =23.
[0108] Step 5: Black Smoke Vehicle Judgment: Based on the comparison of the black smoke area ratio with the set black smoke area ratio threshold and the black smoke area length ratio with the set black smoke area length ratio threshold, determine whether the vehicle is a black smoke vehicle.
[0109] The area ratio of the black smoke region is the ratio of the area of "calculated and identified specific black smoke regions" to the area of "found black smoke pixel regions", as follows:
[0110]
[0111] Among them, R a Y represents the area ratio of the black smoke region. iNS2 The upper limit of the y-axis for the specific area of black smoke, Y iBs The specific location of the black smoke area at the bottom boundary of the y-axis, X iRS X represents the rightmost position on the x-axis of the specific area of black smoke. iLS The leftmost position on the x-axis represents the specific area of black smoke, and the y-axis represents... bot To find the lower y-axis limit of the black smoke pixel region, y top To find the upper limit of the y-axis of the black smoke pixel region, x left To find the lower x-axis limit of the black smoke pixel region, x right To find the upper x-axis limit of the black smoke pixel region.
[0112] In this embodiment:
[0113]
[0114] The ratio of the length of the black smoke region to the ratio of "the length of the specific black smoke region along the y-axis" to "the length of the pixel region where black smoke is found along the y-axis" is as follows:
[0115]
[0116] Among them, R L Y represents the ratio of the length of the black smoke region. iNS2 The upper limit of the y-axis for the specific area of black smoke, Y iBs The specific location of the black smoke area is the bottom boundary of the y-axis. bot To find the lower y-axis limit of the black smoke pixel region, y top To find the upper limit of the y-axis of the black smoke pixel region.
[0117] In this embodiment:
[0118]
[0119] Based on the area ratio of black smoke region R a R is the length of the black smoke area. L To determine whether a vehicle is emitting black smoke, the black smoke area ratio threshold is set to 30, and the black smoke area length ratio threshold is set to 50.
[0120] If the area ratio of the black smoke region exceeds the set threshold for the area ratio of the black smoke region, and the length ratio of the black smoke region exceeds the set threshold for the length ratio of the black smoke region, then the vehicle is determined to be a black smoke vehicle.
[0121] If the area ratio of the black smoke region exceeds the set threshold for the black smoke region area ratio, or the length ratio of the black smoke region exceeds the set threshold for the black smoke region length ratio, the vehicle is determined to be a suspicious black smoke vehicle.
[0122] Otherwise, determine that the vehicle is not emitting black smoke.
[0123] In this embodiment, R a =51.77≥30 and R L =61.58≥50, therefore the vehicle is identified as a vehicle emitting black smoke.
[0124] It should be noted that the area of the black smoke region is larger than R. a R is the length of the black smoke area. L The specific judgment value is related to factors such as vehicle type and the position of the shadow when the vehicle is driving. In the actual measurement points, this value will be set to a quantity that varies with vehicle type and date. The values given in this application are for ease of understanding and are merely illustrative.
[0125] Considering the influence of factors such as road conditions, trees, streetlights, and billboard shadows at the actual measurement points, an empty-area photo of the measurement point is updated as a background photo when no vehicles are passing. The update cycle for the background photo is generally no more than 10 minutes. After grayscale processing of the photos taken when vehicles are passing and the background photo, the pixel areas of black smoke are found, the corresponding pixels are subtracted, and then binarization processing and black smoke vehicle identification are performed. At this point, the grayscale threshold needs to be adjusted; the grayscale threshold of 65 given in this application is only an example. By introducing an empty-area background photo, the recognition accuracy of black smoke vehicles can be effectively improved. Figure 4 This is an illustration of an empty background photograph.
[0126] This invention also provides a rapid detection system for vehicles emitting black smoke on roads, comprising:
[0127] Photo Acquisition Module: Acquires photos of vehicles on the road, obtains the vehicle's license plate number, the coordinate position of any vertex of the license plate in the photo, and the size of the license plate in the photo;
[0128] Photo processing module: Performs grayscale conversion and binarization on the photo sequentially to obtain the binarized image;
[0129] The module for determining the region of black smoke: Based on the number of wide pixels and the number of high pixels in the binarized image, the pixel position of the license plate vertex in the binarized image and the number of pixels of the license plate in the binarized image are obtained, and the upper limit of the y-axis, the lower limit of the y-axis, the upper limit of the x-axis, and the lower limit of the x-axis are further obtained for the pixel region of black smoke.
[0130] The module for determining the specific area of black smoke: Within the range of the upper and lower limits of the y-axis, the upper and lower limits of the x-axis, and the lower limit of the x-axis of the black smoke pixel area, the module obtains the sum of the pixel points and the number of black pixels row by row. After removing the vehicle shadow, the module determines the top boundary, left boundary, right boundary, and bottom boundary of the specific area of black smoke.
[0131] Within a specific range of the binarized image, the sum of pixel values and the number of black pixels are obtained column by column to determine the left and right boundaries of the specific black smoke area.
[0132] Based on the top, left, and right boundaries of the obtained black smoke region, the number of black pixels is obtained row by row within a specific range to further determine the bottom boundary of the black smoke region.
[0133] Black smoke vehicle detection module: Based on the comparison of the black smoke area ratio with the set black smoke area ratio threshold and the black smoke area length ratio with the set black smoke area length ratio threshold, it determines whether the vehicle is a black smoke vehicle.
Claims
1. A rapid detection method for vehicles emitting black smoke on roads, characterized in that, Includes the following steps: S1. Photo capture: Capture photos of vehicles on the road, obtain the vehicle's license plate number, the coordinate position of any vertex of the license plate in the photo, and the size of the license plate in the photo; S2. Photo Processing: Perform grayscale conversion and binarization on the photo sequentially to obtain the binarized image. S3. Determine the area to search for black smoke: Based on the number of wide and high pixels of the binarized image, the pixel position of the license plate vertex in the binarized image and the number of pixels of the license plate in the binarized image are obtained. Furthermore, the upper y-axis limit, lower y-axis limit, upper x-axis limit, and lower x-axis limit of the black smoke pixel region are obtained. S4. Identify the specific area of black smoke: Within the range of the upper and lower limits of the y-axis, the upper and lower limits of the x-axis, and the lower limit of the x-axis for finding the black smoke pixel area, the sum of the pixel points and the number of black pixels are obtained row by row. After removing the vehicle shadow, the top, left, right and bottom boundaries of the specific black smoke area are determined. S5. Black Smoke Vehicle Judgment: Based on the comparison of the black smoke area ratio with the set black smoke area ratio threshold and the black smoke area length ratio with the set black smoke area length ratio threshold, determine whether the vehicle is a black smoke vehicle.
2. The method for rapid detection of vehicles emitting black smoke on roads according to claim 1, characterized in that, In step S4, within the obtained upper and lower limits of the y-axis, upper and lower limits of the x-axis, and upper and lower limits of the black smoke pixel region, the sum of pixel values and the number of black pixels are obtained row by row. After removing vehicle shadows, the top boundary of the specific black smoke region is determined, which can be expressed by the formula: Y is <(Y smin ×1.2 + 10) and Y i0 ≥(x right -x left )×0.6 Among them, Y is Sum the pixels in the row containing the uppermost position of the vehicle's shadow on the y-axis. smin Y is the value of the row with the smallest sum of pixels. i0 x is the number of black pixels in a row. right To find the upper limit of the x-axis of the black smoke pixel region, x left To find the lower x-axis limit of the black smoke pixel region; AND iNS2 =Y iNS -1 Among them, Y iNS2 The upper limit of the y-axis for the specific area of black smoke, Y iNS This represents the upper limit position of the vehicle's shadow on the y-axis.
3. The method for rapid detection of vehicles emitting black smoke on roads according to claim 1, characterized in that, The left boundary of the specific black smoke area determined in S4 is as follows: Within a specific range of upper and lower limits on the x-axis, the sum of pixel values is obtained column by column. The column with the minimum sum is then recorded. From this column position to the lower limit on the x-axis, the number of black pixels is further calculated column by column within the upper and lower limits on the y-axis. Based on the set leftmost position judgment condition of the specific black smoke region on the x-axis, the left boundary of the specific black smoke region is determined. The specific criteria for determining the leftmost position of the black smoke region on the x-axis are as follows: X j0 ≥7 and X iLS ≥x left Among them, X j0 X represents the number of black pixels in the column. iLS The x-axis represents the leftmost position of the specific area of black smoke. left To find the lower x-axis limit of the black smoke pixel region.
4. The method for rapid detection of vehicles emitting black smoke on roads according to claim 1, characterized in that, The right boundary of the specific area where the black smoke is defined is as follows: Within the range from the column containing the minimum sum of pixels to the upper limit of the x-axis, the number of black pixels is further calculated column by column within the upper and lower limits of the y-axis. Based on the set rightmost position judgment condition of the specific black smoke region on the x-axis, the right boundary of the specific black smoke region is determined. The specific criteria for determining the rightmost position of the black smoke region on the x-axis are as follows: X j0 ≥7 and X iRS ≤x right Among them, X j0 X represents the number of black pixels in the column. iRS The rightmost position on the x-axis represents the specific area of black smoke. right To find the upper x-axis limit of the black smoke pixel region.
5. The method for rapid detection of vehicles emitting black smoke on roads according to claim 1, characterized in that, In step S4, the bottom boundary of the specific black smoke area is determined as follows: Within the range from the left boundary to the right boundary of the specific black smoke area, and further within the range from the top boundary to the lower limit of the y-axis of the specific black smoke area, the number of black pixels is obtained row by row, and the bottom boundary of the specific black smoke area is determined based on the set judgment condition of the bottom boundary position of the y-axis of the specific black smoke area. The specific conditions for determining the bottom boundary position of the black smoke region along the y-axis are as follows: Y i0 ≥ 7 and Y iBS ≥ y bot Among them, Y i0 Y represents the number of black pixels in a row. iBs The y-axis position is the bottom boundary of the specific area of black smoke. bot To find the lower y-axis limit of the black smoke pixel region.
6. The method for rapid detection of vehicles emitting black smoke on roads according to claim 1, characterized in that, The determination of whether a vehicle is emitting black smoke in S5 is as follows: If the area ratio of the black smoke region exceeds the set threshold for the area ratio of the black smoke region, and the length ratio of the black smoke region exceeds the set threshold for the length ratio of the black smoke region, then the vehicle is determined to be a black smoke vehicle. If the area ratio of the black smoke region exceeds the set threshold for the black smoke region area ratio, or the length ratio of the black smoke region exceeds the set threshold for the black smoke region length ratio, the vehicle is determined to be a suspicious black smoke vehicle. Otherwise, determine that the vehicle is not emitting black smoke.
7. The method for rapid detection of vehicles emitting black smoke on roads according to claim 3, characterized in that, Within a specific range of values for the upper and lower limits of the x-axis, the summation value of each pixel is obtained column by column, and the specific range of values is set as follows: (x2-B wt ×2)~(x2+B wt ×2) Where x2 is the X-axis coordinate of the pixel position of any vertex of the license plate in the binarized image, and B wt This represents the width in pixels of the license plate image after binarization.
8. The method for rapid detection of vehicles emitting black smoke on roads according to claim 1, characterized in that, The area ratio of the black smoke region in S5 is expressed by the formula: Among them, R a Y represents the area ratio of the black smoke region. iNS2 The upper limit of the y-axis for the specific area of black smoke, Y iBs The specific location of the black smoke area at the bottom boundary of the y-axis, X iRS X represents the rightmost position on the x-axis of the specific area of black smoke. iLS The leftmost position on the x-axis represents the specific area of black smoke, and the y-axis represents... bot To find the lower y-axis limit of the black smoke pixel region, y top To find the upper limit of the y-axis of the black smoke pixel region, x left To find the lower x-axis limit of the black smoke pixel region, x right To find the upper x-axis limit of the black smoke pixel region; The ratio of the length of the black smoke area is expressed by the formula: Among them, R L Y represents the ratio of the length of the black smoke region. iNS2 The upper limit of the y-axis for the specific area of black smoke, Y iBs The specific location of the black smoke area is the bottom boundary of the y-axis. bot To find the lower y-axis limit of the black smoke pixel region, y top To find the upper limit of the y-axis of the black smoke pixel region.
9. A rapid detection system for vehicles emitting black smoke on roads, characterized in that, include: Photo Acquisition Module: Acquires photos of vehicles on the road, obtains the vehicle's license plate number, the coordinate position of any vertex of the license plate in the photo, and the size of the license plate in the photo; Photo processing module: Performs grayscale conversion and binarization on the photo sequentially to obtain the binarized image; The module for determining the region of black smoke: Based on the number of wide pixels and the number of high pixels in the binarized image, the pixel position of the license plate vertex in the binarized image and the number of pixels of the license plate in the binarized image are obtained, and the upper limit of the y-axis, the lower limit of the y-axis, the upper limit of the x-axis, and the lower limit of the x-axis are further obtained for the pixel region of black smoke. The module for determining the specific area of black smoke: Within the range of the upper and lower limits of the y-axis, the upper and lower limits of the x-axis, and the lower limit of the x-axis of the black smoke pixel area, the module obtains the sum of the pixel points and the number of black pixels row by row. After removing the vehicle shadow, the module determines the top boundary, left boundary, right boundary, and bottom boundary of the specific area of black smoke. Black smoke vehicle detection module: Based on the comparison of the black smoke area ratio with the set black smoke area ratio threshold and the black smoke area length ratio with the set black smoke area length ratio threshold, it determines whether the vehicle is a black smoke vehicle.
Citation Information
Patent Citations
Detection method and system of black smoke vehicle
CN108416316A
Black smoke vehicle automatic detection method based on superpixel segmentation
CN116740658A