A method and device for determining the number of vehicle axles

Through image enhancement and foreground extraction technology of infrared video data, the number of vehicle axles is identified, which solves the problem of low recognition accuracy in the prior art, especially in high-speed multi-lane and rainy and foggy environments, which achieves higher recognition accuracy.

CN111914675BActive Publication Date: 2025-02-28WUHAN WANJI INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010658436.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-09
Publication Date
2025-02-28
Estimated Expiration
2040-07-09

AI Technical Summary

Technical Problem

When identifying the number of vehicle axles in high-speed multi-lane environments, the prior art has the problem of low recognition accuracy, especially in rainy and foggy environments.

Method used

By acquiring infrared video data in the monitoring area, image enhancement processing is performed, the foreground map and a single vehicle image are determined, and the number of axes of each vehicle is calculated. The method includes steps such as image enhancement, foreground extraction, vehicle area search and axle counting.

Benefits of technology

The accuracy of vehicle axle number recognition is improved, especially in high-speed multi-lane and rainy and foggy environments, which can more accurately identify vehicle axle number.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for determining the number of vehicle axles, wherein the method comprises: acquiring infrared video data of a monitored area, and performing image enhancement processing on a current frame image of the infrared video data to obtain an image enhancement map of the current frame image; determining a foreground map of the current frame image according to the image enhancement map; determining a single vehicle image in the current frame image according to the foreground map and the image enhancement map; and determining the number of axles of each vehicle in the current frame image according to the single vehicle image. The method can solve the problem of low recognition accuracy of a method for identifying the number of vehicle axles in related technologies, and adopt infrared thermal imaging technology to identify the number of vehicle axles in a highway free flow scenario, thereby improving the accuracy of vehicle axle number recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent transportation, and in particular to a method and device for determining the number of vehicle axles. Background Art

[0002] At present, the toll collection of expressways has been changed from the previous weight-based toll collection to axle-based toll collection, and the prerequisite for axle-based toll collection is to identify the axle number information of the vehicle. Therefore, it is of great significance to install a vehicle axle number identification system on expressways.

[0003] Since the axle type of toll vehicles is identified in a single-lane, low-speed environment, it is difficult to detect the type of toll vehicles in a high-speed, multi-lane, free-flow environment, especially to identify the number of vehicle axles. The current technical methods, such as laser recognition technology, video recognition technology, and weighing recognition technology, will inevitably have problems such as recognition difficulties or low recognition accuracy, and the recognition effect is not good in rainy and foggy environments.

[0004] There is no solution to the problem of low recognition accuracy in the method of identifying the number of vehicle axles in the related art. Summary of the invention

[0005] The embodiments of the present invention provide a method and device for determining the number of vehicle axles, so as to at least solve the problem of low recognition accuracy of the method for identifying the number of vehicle axles in the related art.

[0006] According to one embodiment of the present invention, a method for determining the number of vehicle axles is provided, comprising:

[0007] Acquire infrared video data of the monitored area, and perform image enhancement processing on a current frame image of the infrared video data to obtain an image enhancement map of the current frame image;

[0008] Determine the foreground image of the current frame image according to the image enhancement image;

[0009] Determine a single vehicle image in the current frame image according to the foreground image and the image enhancement image;

[0010] The number of axles of each vehicle in the current frame image is determined according to the single vehicle image.

[0011] Optionally, determining a single vehicle image in the current frame image according to the foreground image and the image enhancement image includes:

[0012] Binarizing the foreground image to obtain a binary image of the current frame image;

[0013] Performing a vehicle region search on the binary graph to obtain a first connected region set;

[0014] Cutting out the image enhancement map according to the first connected region set to obtain a vehicle position region map;

[0015] Determine a vehicle set according to the vehicle position area map and a pre-stored lane boundary coordinate set, wherein the vehicle set includes the number of vehicles, lane information of each vehicle, and boundary information of each vehicle;

[0016] The single vehicle image is extracted from the image enhancement image according to the vehicle set.

[0017] Optionally, performing a vehicle region search on the binary graph to obtain a first connected region set includes:

[0018] Search from the upper left pixel point to the lower right pixel point of the binary image, and establish multiple connected group sets according to the search results, wherein the constituent unit of the connected group set is a connected group, and the connected group includes a group label, a row, a start column, and an end column;

[0019] Scanning the multiple connected group sets, and setting group labels of connected groups in the multiple connected group sets that have a connection relationship to be the same group label;

[0020] The multiple connected group sets are separated by different group labels to obtain the first connected region set.

[0021] Optionally, determining the number of axles of each vehicle in the current frame image according to the single vehicle image includes:

[0022] Binarizing the single vehicle image to obtain a single vehicle binary image;

[0023] Performing a connected region search on the single vehicle binary graph to obtain a second connected region set and an edge point set;

[0024] The number of axles of each vehicle in the current frame image is determined according to the second connected region set and the edge point set.

[0025] Optionally, after performing a connected region search on the single vehicle binary graph to obtain a second connected region set and an edge point set, the method further includes:

[0026] For each connected region in the second connected region set, remove the connected region whose sum of the X value of the upper left coordinate and the X value of the lower right coordinate is greater than a first preset threshold;

[0027] For the connected areas with intersection in the second connected area set, the connected areas with a larger sum of the Y value of the upper left coordinate and the Y value of the lower right coordinate are eliminated.

[0028] Optionally, determining the number of axles of each vehicle in the current frame image according to the second connected region set and the edge point set includes:

[0029] Acquire a ground edge pixel point set according to the second connected region set and the edge point set;

[0030] According to the continuity of adjacent points in the ground edge pixel point set, points with a spacing less than a second preset threshold are classified into the same point sequence, and points with a spacing greater than or equal to the second preset threshold are split into two point sequences to obtain a point sequence set;

[0031] Determine whether each point sequence in the point sequence set has an arc;

[0032] The number of point sequences having arcs in each vehicle is determined as the number of axles of each vehicle.

[0033] Optionally, determining the foreground image of the current frame image according to the image enhancement image includes:

[0034] The image enhancement image is compared with a predetermined background image to obtain a foreground image of the current frame image, wherein the background image is determined based on images of a predetermined number of frames before the current frame image in the infrared video data.

[0035] Optionally, the method further comprises:

[0036] Before determining the foreground image of the current frame image according to the image enhancement map, a weight model is established for each pixel point of the image enhancement map of each frame image of the infrared video data; when the video frame is updated, the weight model is updated to obtain the background pixel points; the background pixel points of all pixels are spliced ​​to obtain the background image; and / or

[0037] After the foreground image of the current frame image is determined according to the image enhancement map, the background image is updated according to the image enhancement map of the current frame image.

[0038] According to another embodiment of the present invention, there is also provided a vehicle axle number determination device, comprising:

[0039] A processing module, used to obtain infrared video data of a monitored area, and perform image enhancement processing on a current frame image of the infrared video data to obtain an image enhancement map of the current frame image;

[0040] A first determining module, configured to determine a foreground image of the current frame image according to the image enhancement image;

[0041] A second determination module, configured to determine a single vehicle image in the current frame image according to the foreground image and the image enhancement image;

[0042] The third determination module is used to determine the number of axles of each vehicle in the current frame image according to the single vehicle image.

[0043] Optionally, the second determining module includes:

[0044] A first processing submodule is used to perform a binarization process on the foreground image to obtain a binary image of the current frame image;

[0045] A first search submodule, configured to search the binary graph for vehicle regions to obtain a first connected region set;

[0046] A cutout submodule, configured to cut out the image enhancement map according to the first connected region set to obtain a vehicle position region map;

[0047] A first determination submodule, configured to determine a vehicle set according to the vehicle position area map and a pre-stored lane boundary coordinate set, wherein the vehicle set includes the number of vehicles, lane information of each vehicle, and boundary information of each vehicle;

[0048] The interception submodule is used to intercept the single vehicle image from the image enhancement image according to the vehicle set.

[0049] Optionally, the first search submodule includes:

[0050] A search unit is used to search from the upper left pixel point to the lower right pixel point of the binary image, and establish multiple connected group sets according to the search results, wherein the constituent unit of the connected group set is a connected group, and the connected group includes a group label, a row, a start column, and an end column;

[0051] A scanning unit, configured to scan the multiple connected group sets, and set group labels of connected groups in a connection relationship in the multiple connected group sets to be the same group label;

[0052] The separation unit is used to separate the multiple connected group sets using different group labels to obtain the first connected region set.

[0053] Optionally, the third determining module includes:

[0054] A second processing submodule is used to perform binarization processing on the single vehicle image to obtain a single vehicle binary image;

[0055] A second search submodule is used to perform a connected region search on the single vehicle binary graph to obtain a second connected region set and an edge point set;

[0056] The second determination submodule is used to determine the number of axles of each vehicle in the current frame image according to the second connected area set and the edge point set.

[0057] Optionally, the device further comprises:

[0058] A first elimination submodule is used to eliminate, for each connected area in the second connected area set, a connected area whose sum of the X value of the upper left coordinate and the X value of the lower right coordinate is greater than a first preset threshold;

[0059] The second elimination submodule is used to eliminate the connected areas with the larger sum of the Y value of the upper left coordinate and the Y value of the lower right coordinate from the connected areas with intersection in the second connected area set.

[0060] Optionally, the second determining submodule includes:

[0061] An acquisition unit, configured to acquire a ground edge pixel point set according to the second connected region set and the edge point set;

[0062] a splitting unit, configured to classify points whose spacing is less than a second preset threshold into the same point sequence according to the continuity of adjacent points in the ground edge pixel point set, and split points whose spacing is greater than or equal to the second preset threshold into two point sequences, to obtain a point sequence set;

[0063] A judging unit, used for judging whether each point sequence in the point sequence set has an arc;

[0064] A determination unit is used to determine the number of point sequences with arcs in each vehicle as the number of axles of each vehicle.

[0065] Optionally, the first determining module includes:

[0066] The comparison submodule is used to compare the image enhancement image with a predetermined background image to obtain a foreground image of the current frame image, wherein the background image is determined based on images of a predetermined number of frames before the current frame image in the infrared video data.

[0067] Optionally, the device further comprises:

[0068] A splicing submodule is used to establish a weight model for each pixel point of the image enhancement map of each frame of the infrared video data before determining the foreground image of the current frame image according to the image enhancement map; update the weight model when the video frame is updated to obtain the background pixel point; splice the background pixel points of all pixels to obtain the background map; and / or

[0069] An updating submodule is used to update the background image according to the image enhancement map of the current frame image after determining the foreground image of the current frame image according to the image enhancement map.

[0070] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.

[0071] According to yet another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0072] Through the present invention, infrared video data of a monitored area is acquired, and image enhancement processing is performed on a current frame image of the infrared video data to obtain an image enhancement map of the current frame image; a foreground map of the current frame image is determined according to the image enhancement map; a single vehicle image in the current frame image is determined according to the foreground map and the image enhancement map; and the number of axles of each vehicle in the current frame image is determined according to the single vehicle image. This can solve the problem of low recognition accuracy of a method for identifying the number of vehicle axles in related technologies, and infrared thermal imaging technology is used to obtain infrared video data. Vehicle axle number recognition in a highway free flow scenario is performed based on the infrared video data, thereby improving the accuracy of vehicle axle number recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0073] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0074] Figure 1 is a hardware structure block diagram of a mobile terminal of a method for determining the number of vehicle axles according to an embodiment of the present invention;

[0075] Figure 2 is a flow chart of a method for determining the number of vehicle axles according to an embodiment of the present invention;

[0076] Figure 3 Schematic diagram of free flow vehicle division and axle number determination based on infrared camera according to an embodiment of the present invention Figure 1 ;

[0077] Figure 4 Schematic diagram of free flow vehicle division and axle number determination based on infrared camera according to an embodiment of the present invention Figure 2 ;

[0078] Figure 5is a flow chart of a method for determining the number of free-flow vehicles and axles using an infrared camera according to an embodiment of the present invention;

[0079] Figure 6 is a block diagram of a device for determining the number of vehicle axles according to an embodiment of the present invention. DETAILED DESCRIPTION

[0080] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.

[0081] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0082] Example 1

[0083] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 is a hardware structure block diagram of a mobile terminal of a method for determining the number of vehicle axles according to an embodiment of the present invention, such as Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0084] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the vehicle axle number determination method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 can be a high-speed random access memory, or a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 can further be a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0085] The transmission device 106 is used to receive or send data, and the reason is to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.

[0086] In this embodiment, a method for determining the number of vehicle axles running on the above mobile terminal or network architecture is provided. Figure 2 is a flow chart of a method for determining the number of vehicle axles according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0087] Step S202, acquiring infrared video data of the monitoring area, and performing image enhancement processing on a current frame image of the infrared video data to obtain an image enhancement map of the current frame image;

[0088] Specifically, an infrared image collected by an infrared camera is acquired, wherein the infrared image includes at least one first road surface side temperature distribution information.

[0089] In an optional embodiment, before performing image enhancement processing on the current frame image, grayscale processing may also be performed on the current frame image to obtain a grayscale image, and image enhancement processing is performed based on the grayscale image.

[0090] Step S204, determining a foreground image of the current frame image according to the image enhancement image;

[0091] In an embodiment of the present invention, the above-mentioned step S204 may specifically include: comparing the image enhancement image with a predetermined background image to obtain a foreground image of the current frame image, wherein the background image is determined based on images of a predetermined number of frames before the current frame image in the infrared video data.

[0092] In an optional embodiment, before determining the foreground image of the current frame image based on the image enhancement map, a weight model is established for each pixel point of the image enhancement map of each frame image of the infrared video data; the weight model is updated when the video frame is updated to obtain the background pixel points; the background pixel points of all pixels are spliced ​​to obtain the background map; and / or after determining the foreground image of the current frame image based on the image enhancement map, the background map is updated according to the image enhancement map of the current frame image.

[0093] Step S206, determining a single vehicle image in the current frame image according to the foreground image and the image enhancement image;

[0094] Step S208, determining the number of axles of each vehicle in the current frame image according to the single vehicle image.

[0095] Through the above steps S202 to S208, the infrared video data of the monitored area is obtained, and the current frame image of the infrared video data is subjected to image enhancement processing to obtain an image enhancement map of the current frame image; the foreground image of the current frame image is determined according to the image enhancement map; the single vehicle image in the current frame image is determined according to the foreground image and the image enhancement map; the number of axles of each vehicle in the current frame image is determined according to the single vehicle image, which can solve the problem of low recognition accuracy of the method of identifying the number of vehicle axles in the related art, obtain infrared video data using infrared thermal imaging technology, and identify the number of vehicle axles in a highway free flow scenario based on the infrared video data, thereby improving the accuracy of vehicle axle number recognition.

[0096] In the embodiment of the present invention, the above step S206 may specifically include:

[0097] Binarization is performed on the foreground image to obtain a binary image of the current frame image; vehicle area search is performed on the binary image to obtain a first connected area set, and further, from the upper left pixel point of the binary image to the lower right pixel point, multiple connected group sets are established according to the search results, wherein the constituent unit of the connected group set is a connected group, and the connected group includes a group label, a row, a starting column, and an ending column; the multiple connected group sets are scanned, and the group labels of the connected groups in the multiple connected group sets that have a connection relationship are set to the same group label; the multiple connected group sets are separated by different group labels to obtain the first connected area set;

[0098] The image enhancement map is cut out according to the first connected area set to obtain a vehicle position area map; a vehicle set is determined according to the vehicle position area map and a pre-stored lane boundary coordinate set, wherein the vehicle set includes the number of vehicles, lane information of each vehicle, and boundary information of each vehicle; and the single vehicle image is intercepted from the image enhancement map according to the vehicle set.

[0099] In the embodiment of the present invention, the above step S208 may specifically include:

[0100] Binarization is performed on the single vehicle image to obtain a single vehicle binary image; a connected area search is performed on the single vehicle binary image to obtain a second connected area set and an edge point set; the number of axles of each vehicle in the current frame image is determined based on the second connected area set and the edge point set, and further, a ground edge pixel point set is obtained based on the second connected area set and the edge point set; based on the continuity of adjacent points in the ground edge pixel point set, points with a spacing less than a second preset threshold are classified as the same point sequence, and points with a spacing greater than or equal to the second preset threshold are split into two point sequences to obtain a point sequence set; it is determined whether each point sequence in the point sequence set has an arc; and the number of point sequences with an arc in each vehicle is determined as the number of axles of each vehicle.

[0101] In an optional embodiment, after performing a connected area search on the single vehicle binary graph to obtain a second connected area set and an edge point set, for each connected area in the second connected area set, the connected area whose sum of the X value of the upper left coordinate and the X value of the lower right coordinate is greater than a first preset threshold is eliminated; for the connected areas with intersections in the second connected area set, the connected areas whose sum of the Y value of the upper left coordinate and the Y value of the lower right coordinate is larger are eliminated, that is, for each connected area, the upper left coordinate corresponds to the position of the first row and the first column of the connected area, and the lower right coordinate corresponds to the position of the last row and the last column of the connected area.

[0102] In an embodiment of the present invention, at least one first road surface side temperature distribution information in the infrared image is identified, and first attribute information and second attribute information of the first road surface are determined; wherein the first attribute information includes information after image enhancement (corresponding to the above-mentioned image enhancement image), background modeling information (corresponding to the above-mentioned background image), foreground image information (corresponding to the above-mentioned foreground image), thresholded information (corresponding to the above-mentioned binary image), etc., and the second attribute information (corresponding to the above-mentioned first connected area set) includes vehicle position information, coordinate information, and driving direction information; according to the first attribute information, the number of vehicles on the first road surface is determined, and according to the second attribute information and the first calibration information (corresponding to the above-mentioned lane boundary coordinate set), the lane is determined, and the first calibration information includes the calibration between the image pixel coordinates and the lane; according to at least one side temperature distribution information of each vehicle, the vehicle information is determined, the number of vehicle axles is identified, and the total number of vehicles and the number of wheel axles of each vehicle are counted, wherein the vehicle information includes the edge point pixel sequence information of the wheel axle of the vehicle close to the ground.

[0103] Figure 3 Schematic diagram of free flow vehicle division and axle number determination based on infrared camera according to an embodiment of the present invention Figure 1 ,like Figure 3 As shown, the recognition system includes: an infrared camera 11, a processing unit 12 and a mounting frame 13, the infrared camera 11 is installed on the mounting frame 13, the infrared camera 11 is connected to the processing unit 12, wherein the infrared camera 11 is responsible for infrared video acquisition of all lanes.

[0104] Figure 4 Schematic diagram of free flow vehicle division and axle number determination based on infrared camera according to an embodiment of the present invention Figure 2 ,like Figure 4 As shown, the recognition system uses an infrared camera 11 to collect infrared video of each lane based on the system 1. Each infrared camera 11 is mounted on a mounting frame 13, and each infrared camera 11 is connected to a processing unit 12.

[0105] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0106] Figure 5 FIG. 4 is a flow chart of a method for determining the number of free flow vehicles and axles using an infrared camera according to an embodiment of the present invention. Figure 5 As shown, including:

[0107] Step S501, collecting infrared video data through an infrared camera;

[0108] It should be noted that the infrared camera in this embodiment uses a 288*384 pixel video module, a frame rate of 25 frames per second, a focal length of 7.5 mm, and a calibration distance between 10 and 20 meters. The camera in this embodiment is installed on a gantry with a height of 7 meters from the road, with an inclination angle of 45 degrees to the ground normal and an inclination angle of 45 degrees to the gantry crossbeam. The calculation formula for the calibration distance to the road surface is as follows:

[0109] L1=H×arccosα, L2=L1×arccosβ.

[0110] Wherein, H is the installation height of the infrared camera, α is the inclination angle between the infrared camera and the ground normal, β is the inclination angle between the infrared camera and the gantry beam, and L2 is the calibration distance value of the infrared camera;

[0111] After scanning the road image data and temperature data, the camera fuses the data into an infrared image with varying color levels. The color levels of the higher temperature areas are white, and the color levels of the lower temperature areas are black. The video data in h264 format is output and connected to the algorithm module through streaming media for subsequent algorithm processing.

[0112] Step S502, extracting temperature distribution information of at least one first road surface;

[0113] It should be noted that the raw data of the road infrared video stream is pre-processed into grayscale and the grayscale image Y1 is output. The grayscale image Y1 is enhanced by using the grayscale histogram equalization algorithm to stretch the grayscale distribution of the image in the [0,255] interval to improve the image contrast and obtain the image enhancement image Y2.

[0114] The infrared video data is modeled using a background modeling algorithm. A weight model M1 is established for each pixel of the image enhancement map Y2 of each frame of the video. The pixel weight model M1 is updated when the video frame is refreshed to obtain the background pixel X1. The background pixel X1 of all pixels is obtained and then spliced ​​into the background map T1. Each current frame Z1 of the video is compared with the real-time refreshed background map T1 to filter out the non-background pixel value X2. All non-background pixel values ​​X2 are spliced ​​into the foreground map T2.

[0115] The foreground image T2 is binarized, the binarization threshold is 0, and the grayscale values ​​of all pixels are increased to 255 to obtain a binary image T3.

[0116] Step S503, extracting the first attribute information of the road surface and the second attribute information of the road surface to determine the number of vehicles;

[0117] For binary graph T3, perform vehicle area search. The rows of binary graph T3 are R[1,n], and the columns are C[1,n]. Search from the upper left pixel R1C1 to the lower right pixel RnCn. The search order is R1 to Rn, C1 to Cn. Establish a connected group set LA, whose constituent unit is the connected group L. The connected group contains the group label LI, the row LR, the starting column Cs, and the ending column Ce.

[0118] In the process of scanning the pixels of row number Ri, a corresponding number of connected clusters L are established for the continuous area Q1 with 255 pixels. The cluster label LI value is a unique identifier, which increases in sequence. The row number Ri is used as the row LR value of the connected cluster L, the column value of the starting pixel is used as the starting column Cs value of the connected cluster L, and the column value of the ending pixel is used as the ending column Ce value of the connected cluster L.

[0119] After all rows are scanned, several connected groups L are obtained to form a connected group set LA1. The connected group set LA1 is scanned, and the group mark LI of the connected groups L with a connection relationship is reset to the group mark LI of the upper connected group. A connected group set LA2 is obtained.

[0120] The data with different group labels LI in the connected group set LA2 are separated into corresponding connected region sets V1. According to the connected region set V1, the vehicle position region map Y3 is obtained from the image enhancement map Y2.

[0121] It should be noted that the relationship between the infrared camera image coordinates XY and the lane LN needs to be calibrated. Based on the lane driving direction, the image lane boundary coordinates [X1Y1, XnYn] are delineated along the lane line. Each lane line delineates the image lane boundary coordinates [X1Y1, XnYn] to form an image lane boundary coordinate set LB, and the set elements correspond to the lane LN relationship.

[0122] According to the vehicle position area map Y3 and the lane boundary coordinate set LB, the number of vehicles, the lane information of each vehicle, and the boundary information of each vehicle are obtained to form a vehicle set VL.

[0123] Step S504, extracting temperature distribution information of at least one side surface of each vehicle;

[0124] According to the vehicle set VL, a single vehicle image Y4 is intercepted in the image enhancement image Y3. In the single vehicle image Y4, [250, 255] is used as the binarization threshold to obtain a single vehicle binary image Y5, which contains the high temperature distribution area of ​​the vehicle.

[0125] A connected domain search is performed in the single-vehicle binary graph Y5 to obtain a set LT1 containing the upper left coordinates and the lower right coordinates of the connected domain, and an edge point set LT2 of the vehicle's ground direction is extracted along the lane line direction in the lane boundary coordinate set LB.

[0126] Step S505, extracting vehicle information to determine the number of axles of the vehicle;

[0127] The number of axles of the vehicle is calculated based on the connected domain set LT1 and the edge point set LT2 of the vehicle in the direction close to the ground.

[0128] It should be noted that there is a one-to-one correspondence between the connected domain set LT1 and the edge point set LT2 of the vehicle in the direction close to the ground.

[0129] It should be noted that the connected domain set LT1 contains the interference term GR of the high temperature part of the vehicle body. Interference term elimination includes: 1) According to the upper left coordinate XaYa and the lower right coordinate XbYb of the connected domain, determine the connected domain with intersection [Xa, Xb], compare (Ya+Yb) / 2, and eliminate the connected domain with a larger value. 2) Determine (Xa+Xb) / 2 and eliminate the connected domain with a value greater than the preset threshold.

[0130] It should be noted that, according to the connected domain set LT1 after eliminating interference items, the edge point set LT2 of the vehicle close to the ground is corresponding to the edge point set LT3 of the wheel axle area close to the ground.

[0131] Step S506, counting the number of vehicles and the number of axles of the vehicles;

[0132] According to the edge point set LT3 of the wheel axle area close to the ground, the ground edge pixel point set is obtained. According to the continuity of adjacent points, the points whose distance between two points is less than a preset threshold are classified into the same point sequence, and the points whose distance between two points is greater than the preset threshold are split into two point sequences, and the result is divided into a set of several point sequences LT4, whose structure is [[[X1Y1],...,[XnYn]],...,[[X1Y1],...,[XnYn]]].

[0133] It should be noted that, according to the shape of each point sequence in the point sequence set LT4, it is determined whether it has an arc or satisfies an arc shape, and is calculated as 1 axis. After all point sequences are calculated, the final number of axles of the vehicle is obtained. All vehicles are obtained according to the above algorithm to obtain the final number of vehicles and the number of axles of each vehicle.

[0134] Based on the free flow vehicle division and axle number determination of infrared cameras, collect infrared video image data sets when vehicles pass through the road surface, and the data sets include temperature distribution images of road surface pixel points; perform background modeling, image enhancement or other algorithm processing on the collected road surface temperature distribution images; perform vehicle entry judgment and vehicle coordinate position judgment on the pre-processed images; perform axle area recognition on the image area after vehicle division, including axle connected domain recognition and edge point morphology recognition close to the ground; determine the number of axles based on axle connected domain recognition and edge point morphology recognition close to the ground, and output statistical results for each vehicle in a comprehensive manner;

[0135] Optionally, grayscale processing is performed on the image to output a grayscale image, background modeling is performed on the image in the video to obtain a background frame, foreground extraction is performed, and denoising is performed on the foreground to obtain a vehicle area, and complete pixel points of the vehicle are obtained in the original grayscale image based on the vehicle area; grayscale histogram equalization or other algorithm processing is performed on the image to enhance the contrast;

[0136] Optionally, the XY coordinates of the image pixel points and the two-dimensional coordinates of the lane road surface are calibrated to determine which lane of the road surface the image pixel XY coordinates correspond to; the area in the foreground is divided to obtain one or more vehicle areas, and the lane in which the vehicle area is located is determined according to the XY coordinates of the pixels of the road surface points close to the vehicle area;

[0137] Optionally, the axle area is identified on the image after image enhancement, which is not limited to high-threshold interception of the image after grayscale histogram equalization to obtain the axle area; the connected domain is identified on the intercepted axle area; an interference filtering submodule is used to judge the upper left coordinate X1Y1 and the lower right coordinate X2Y2 of the connected domain, and for two or more connected domains that have intersections with coordinates X1 and X2, the connected domains with larger Y1Y2 values ​​are filtered; the connected domains whose centroid coordinates X3Y3 are greater than a threshold distance from the ground are filtered; a preliminary number of axles is obtained; the edge points close to the ground end in the filtered axle connected domain are extracted, and according to the shape of the extracted edge points, it is determined that there are one or more axles in the connected domain to obtain the final number of axles.

[0138] Example 2

[0139] According to another embodiment of the present invention, a vehicle axle number determination device is provided. Figure 6 is a block diagram of a vehicle axle number determination device according to an embodiment of the present invention, Figure 6 As shown, including:

[0140] The processing module 62 is used to obtain infrared video data of the monitoring area, and perform image enhancement processing on the current frame image of the infrared video data to obtain an image enhancement map of the current frame image;

[0141] A first determination module 64, configured to determine a foreground image of the current frame image according to the image enhancement image;

[0142] A second determination module 66, configured to determine a single vehicle image in the current frame image according to the foreground image and the image enhancement image;

[0143] The third determination module 68 is used to determine the number of axles of each vehicle in the current frame image according to the single vehicle image.

[0144] Optionally, the second determining module 66 includes:

[0145] A first processing submodule is used to perform a binarization process on the foreground image to obtain a binary image of the current frame image;

[0146] A first search submodule, configured to search the binary graph for vehicle regions to obtain a first connected region set;

[0147] A cutout submodule, configured to cutout the image enhancement image according to the first connected region set to obtain a vehicle position region map;

[0148] A first determination submodule is used to determine a vehicle set according to the vehicle position area map and a pre-stored lane boundary coordinate set, wherein the vehicle set includes the number of vehicles, lane information of each vehicle, and boundary information of each vehicle;

[0149] The interception submodule is used to intercept the single vehicle image from the image enhancement image according to the vehicle set.

[0150] Optionally, the first search submodule includes:

[0151] A search unit, configured to search from the upper left pixel point to the lower right pixel point of the binary image, and establish a plurality of connected group sets according to the search results, wherein the constituent unit of the connected group set is a connected group, and the connected group includes a group label, a row, a start column, and an end column;

[0152] A scanning unit, configured to scan the multiple connected group sets, and set group labels of connected groups in a connection relationship in the multiple connected group sets to be the same group label;

[0153] The separation unit is used to separate the multiple connected group sets using different group labels to obtain the first connected region set.

[0154] Optionally, the third determining module 68 includes:

[0155] A second processing submodule is used to perform binarization processing on the single vehicle image to obtain a single vehicle binary image;

[0156] A second search submodule is used to perform a connected region search on the single vehicle binary graph to obtain a second connected region set and an edge point set;

[0157] The second determination submodule is used to determine the number of axles of each vehicle in the current frame image according to the second connected area set and the edge point set.

[0158] Optionally, the device further comprises:

[0159] A first elimination submodule is used to eliminate, for each connected area in the second connected area set, a connected area whose sum of the X value of the upper left coordinate and the X value of the lower right coordinate is greater than a first preset threshold;

[0160] The second elimination submodule is used to eliminate the connected areas with the larger sum of the Y value of the upper left coordinate and the Y value of the lower right coordinate from the connected areas with intersection in the second connected area set.

[0161] Optionally, the second determining submodule includes:

[0162] An acquisition unit, configured to acquire a ground edge pixel point set according to the second connected region set and the edge point set;

[0163] a splitting unit, configured to classify points whose spacing is less than a second preset threshold into the same point sequence according to the continuity of adjacent points in the ground edge pixel point set, and split points whose spacing is greater than or equal to the second preset threshold into two point sequences, to obtain a point sequence set;

[0164] A judging unit, used for judging whether each point sequence in the point sequence set has an arc;

[0165] A determination unit is used to determine the number of point sequences with arcs in each vehicle as the number of axles of each vehicle.

[0166] Optionally, the first determining module 64 includes:

[0167] The comparison submodule is used to compare the image enhancement image with a predetermined background image to obtain a foreground image of the current frame image, wherein the background image is determined based on images of a predetermined number of frames before the current frame image in the infrared video data.

[0168] Optionally, the device further comprises:

[0169] A splicing submodule is used to establish a weight model for each pixel point of the image enhancement map of each frame of the infrared video data before determining the foreground image of the current frame image according to the image enhancement map; update the weight model when the video frame is updated to obtain the background pixel point; splice the background pixel points of all pixels to obtain the background map; and / or

[0170] An updating submodule is used to update the background image according to the image enhancement map of the current frame image after determining the foreground image of the current frame image according to the image enhancement map.

[0171] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0172] Example 3

[0173] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0174] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:

[0175] S1, acquiring infrared video data of a monitoring area, and performing image enhancement processing on a current frame image of the infrared video data to obtain an image enhancement map of the current frame image;

[0176] S2, determining a foreground image of the current frame image according to the image enhancement image;

[0177] S3, determining a single vehicle image in the current frame image according to the foreground image and the image enhancement image;

[0178] S4, determining the number of axles of each vehicle in the current frame image according to the single vehicle image.

[0179] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0180] Example 4

[0181] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0182] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0183] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0184] S1, acquiring infrared video data of a monitoring area, and performing image enhancement processing on a current frame image of the infrared video data to obtain an image enhancement map of the current frame image;

[0185] S2, determining a foreground image of the current frame image according to the image enhancement image;

[0186] S3, determining a single vehicle image in the current frame image according to the foreground image and the image enhancement image;

[0187] S4, determining the number of axles of each vehicle in the current frame image according to the single vehicle image.

[0188] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0189] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0190] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for determining the number of vehicle axles, characterized in that: include: Acquire infrared video data of the monitored area, and perform image enhancement processing on a current frame image of the infrared video data to obtain an image enhancement map of the current frame image; Determine the foreground image of the current frame image according to the image enhancement image; Determine a single vehicle image in the current frame image according to the foreground image and the image enhancement image; Determine the number of axles of each vehicle in the current frame image according to the single vehicle image: binarize the single vehicle image to obtain a single vehicle binary image; perform a connected area search on the single vehicle binary image to obtain a second connected area set and an edge point set; obtain a ground edge pixel point set according to the second connected area set and the edge point set; according to the continuity of adjacent points in the ground edge pixel point set, classify points with a spacing less than a second preset threshold into the same point sequence, and split points with a spacing greater than or equal to the second preset threshold into two point sequences to obtain a point sequence set; determine whether each point sequence in the point sequence set has an arc; and determine the number of point sequences with an arc in each vehicle as the number of axles of each vehicle.

2. The method according to claim 1, characterized in that Determining a single vehicle image in the current frame image according to the foreground image and the image enhancement image includes: Binarizing the foreground image to obtain a binary image of the current frame image; Performing a vehicle region search on the binary graph to obtain a first connected region set; Cutting out the image enhancement map according to the first connected region set to obtain a vehicle position region map; Determine a vehicle set according to the vehicle position area map and a pre-stored lane boundary coordinate set, wherein the vehicle set includes the number of vehicles, lane information of each vehicle, and boundary information of each vehicle; The single vehicle image is extracted from the image enhancement image according to the vehicle set.

3. The method according to claim 2, characterized in that The binary graph is searched for vehicle regions, and the first connected region set obtained includes: Search from the upper left pixel point to the lower right pixel point of the binary image, and establish multiple connected group sets according to the search results, wherein the constituent unit of the connected group set is a connected group, and the connected group includes a group label, a row, a start column, and an end column; Scanning the multiple connected group sets, and setting group labels of connected groups in the multiple connected group sets that have a connection relationship to be the same group label; The multiple connected group sets are separated by different group labels to obtain the first connected region set.

4. The method according to claim 1, characterized in that: After performing a connected region search on the single vehicle binary graph to obtain a second connected region set and an edge point set, the method further includes: For each connected region in the second connected region set, remove the connected region whose sum of the X value of the upper left coordinate and the X value of the lower right coordinate is greater than a first preset threshold; For the connected regions with intersection in the second connected region set, the connected regions with a larger sum of the Y value of the upper left coordinate and the Y value of the lower right coordinate are eliminated.

5. The method according to any one of claims 1 to 4, characterized in that Determining the foreground image of the current frame image according to the image enhancement image includes: The image enhancement image is compared with a predetermined background image to obtain a foreground image of the current frame image, wherein the background image is determined based on images of a predetermined number of frames before the current frame image in the infrared video data.

6. The method according to claim 5, characterized in that The method further comprises: Before determining the foreground image of the current frame image according to the image enhancement map, a weight model is established for each pixel point of the image enhancement map of each frame image of the infrared video data; when the video frame is updated, the weight model is updated to obtain the background pixel points; the background pixel points of all pixels are spliced ​​to obtain the background image; and / or After the foreground image of the current frame image is determined according to the image enhancement map, the background image is updated according to the image enhancement map of the current frame image.

7. A device for determining the number of vehicle axles, characterized in that: include: A processing module, used to obtain infrared video data of a monitored area, and perform image enhancement processing on a current frame image of the infrared video data to obtain an image enhancement map of the current frame image; A first determining module, configured to determine a foreground image of the current frame image according to the image enhancement image; A second determination module, configured to determine a single vehicle image in the current frame image according to the foreground image and the image enhancement image; The third determination module is used to determine the number of axles of each vehicle in the current frame image based on the single vehicle image: binarize the single vehicle image to obtain a single vehicle binary image; perform a connected area search on the single vehicle binary image to obtain a second connected area set and an edge point set; obtain a ground edge pixel point set based on the second connected area set and the edge point set; based on the continuity of adjacent points in the ground edge pixel point set, classify points with a spacing less than a second preset threshold into the same point sequence, and split points with a spacing greater than or equal to the second preset threshold into two point sequences to obtain a point sequence set; determine whether each point sequence in the point sequence set has a curvature; and determine the number of point sequences with a curvature in each vehicle as the number of axles of each vehicle.

8. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 6 when executed.

9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 6.