Vehicle identification method, device, electronic device and storage medium

By using multi-angle image acquisition and target detection technology in the expressway toll system, the driving time of the target vehicle and the side image are determined and the side images are obtained, which solves the problems of low vehicle recognition efficiency and inaccurate vehicle model recognition, and improves the accuracy of recognition.

CN118918546BActive Publication Date: 2025-02-11ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411399007.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-08
Publication Date
2025-02-11
Estimated Expiration
2044-10-08

AI Technical Summary

Technical Problem

In the existing highway toll system, vehicle identification efficiency is low, especially when the vehicle body is long, it is difficult to accurately identify the number of wheels, which affects the accuracy of vehicle model identification.

Method used

By acquiring the video containing the target vehicle acquired by the first acquisition device, the target time is determined using the acquisition time of the start and end video frames in the video and the device distance between the second acquisition device and the first acquisition device. Then, a side image of the target vehicle collected by the second acquisition device is obtained based on the target moment, and the target detection is performed to obtain vehicle model information.

Benefits of technology

It improves the accuracy of vehicle identification, especially the accuracy of vehicle model identification, and solves the problem of difficulty in identifying when the vehicle body is long.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118918546B_ABST
    Figure CN118918546B_ABST
Patent Text Reader

Abstract

The present application relates to the field of computer technology, and in particular to a vehicle identification method, device, electronic device and storage medium for improving the accuracy of vehicle identification. The method includes: determining the target time when the target vehicle travels to the second acquisition device based on the acquisition time of the starting video frame and the end video frame in the video containing the target vehicle acquired by the first acquisition device, and the pre-stored device distance between the second acquisition device and the first acquisition device, acquiring the side image of the target vehicle acquired by the second acquisition device based on the target time, performing target detection on the front image and the side image of the target vehicle respectively, and obtaining the license plate information and vehicle model information. The present application uses two acquisition devices to respectively acquire the front image and the side image of the target vehicle, and associates the front and side images by the time of acquiring the images and the distance between the devices, and performs target detection on the associated images, which can improve the recognition accuracy of the license plate information and vehicle model information.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] In the existing highway toll collection, vehicles such as trucks and vans need to go through manual channels to register or pay for different vehicles and the goods they carry. When registering or paying for vehicles at manual channels, it is usually done by manually identifying license plates and vehicle models, and the highway entrance staff manually collects the fees. This method is inefficient and cannot meet the needs of modern traffic management.

[0003] In the related art, in order to improve the efficiency of license plate and vehicle model recognition, image acquisition equipment is usually deployed in advance at the entrances and exits of highways to collect video data, and then feature extraction is performed on the video data containing the target vehicle to obtain the license plate information and vehicle model information of the target vehicle.

[0004] Based on the above method, since the image acquisition device needs to take into account the functions of license plate recognition and vehicle model recognition, the image acquisition device can only be deployed diagonally in front of the vehicle's driving direction. However, when the vehicle body is long, it is difficult to accurately identify the number of wheels from the image captured from the diagonal front angle, which will affect the accuracy of vehicle model recognition.

[0005] In summary, how to improve the accuracy of vehicle recognition has become a problem that needs to be solved urgently. Summary of the invention

[0006] Embodiments of the present application provide a vehicle identification method, device, electronic device, and storage medium to improve the accuracy of vehicle identification.

[0007] A vehicle identification method provided in an embodiment of the present application includes:

[0008] Acquire a video containing a target vehicle captured by a first capturing device; during the capturing of the video, an angle between a driving direction of the target vehicle and a capturing direction of the first capturing device is less than or equal to a preset angle threshold;

[0009] Determine a target time based on the acquisition time of the starting video frame and the ending video frame in the video and the pre-stored device distance between the second acquisition device and the first acquisition device; the target time is the time when the target vehicle travels to the second acquisition device;

[0010] Based on the target moment, acquiring a side image of the target vehicle acquired by the second acquisition device;

[0011] Performing target detection on the front image of the target vehicle contained in the video to obtain the license plate information of the target vehicle;

[0012] Perform target detection on the side image of the target vehicle to obtain the vehicle model information of the target vehicle.

[0013] Optionally, determining the target time based on the capture time of the starting video frame and the ending video frame in the video and a pre-stored device distance between the second capture device and the first capture device includes:

[0014] Respectively determining first position information of a designated key point of the target vehicle in the starting video frame, and second position information of the designated key point in the ending video frame;

[0015] The target time is determined based on the capture time of the starting video frame and the ending video frame in the video, the first position information, the second position information and the device distance.

[0016] Optionally, determining the target time based on the capture time of the starting video frame and the ending video frame in the video, the first position information, the second position information, and the device distance includes:

[0017] Determine the time interval between a first acquisition moment and a second acquisition moment; the first acquisition moment is the acquisition moment of the starting video frame; the second acquisition moment is the acquisition moment of the ending video frame;

[0018] Based on the first position information, the second position information and the optical parameters of the first acquisition device, obtaining the travel distance of the target vehicle within the time interval;

[0019] Determine the driving time required for the target vehicle to drive from the first collection device to the second collection device based on the time interval, the driving distance, and the device distance;

[0020] The target time is determined based on the second collection time and the travel time.

[0021] Optionally, obtaining the travel distance of the target vehicle within the time interval based on the first position information, the second position information and the optical parameters of the first acquisition device includes:

[0022] Based on the first position information, the second position information and the optical parameter, respectively determine third position information corresponding to the first position information in a world coordinate system, and fourth position information corresponding to the second position information in a world coordinate system;

[0023] Based on the third position information and the fourth position information, a travel distance of the target vehicle within the time interval is determined.

[0024] Optionally, determining the driving time required for the target vehicle to drive from the first collection device to the second collection device based on the time interval, the driving distance, and the device distance includes:

[0025] Based on the time interval and the travel distance, obtaining the travel speed of the target vehicle;

[0026] The driving time is obtained based on the driving speed and the device distance.

[0027] Optionally, acquiring the side image of the target vehicle acquired by the second acquisition device based on the target moment includes:

[0028] Obtaining the entry time corresponding to each candidate vehicle that enters the video screen of the second acquisition device after the acquisition time of the endpoint video frame, and the side image of each candidate vehicle acquired by the second acquisition device; wherein the entry time corresponding to any candidate vehicle is the acquisition time of the side image of the candidate vehicle;

[0029] respectively determining the time difference between the target time and the entry time corresponding to each candidate vehicle;

[0030] The side image of the candidate vehicle with the shortest time difference is used as the side image of the target vehicle.

[0031] Optionally, the side image of each candidate vehicle is obtained by:

[0032] Acquire multiple video frames captured by the second acquisition device, of the candidate vehicle from entering the video screen to leaving the video screen;

[0033] For the multiple video frames, respectively, by detecting feature points, a translation matrix between every two adjacent video frames is obtained;

[0034] The multiple video frames are spliced ​​by using the obtained translation matrices to obtain the side image of the candidate vehicle.

[0035] Optionally, the endpoint video frame includes designated key points of the target vehicle, and the video frames acquired by the first acquisition device after the endpoint video frame do not include the designated key points.

[0036] A vehicle identification device provided in an embodiment of the present application includes:

[0037] A collection unit, used to obtain a video containing a target vehicle collected by a first collection device; during the collection of the video, an angle between a driving direction of the target vehicle and a collection direction of the first collection device is less than or equal to a preset angle threshold;

[0038] A determination unit, configured to determine a target time based on the acquisition time of the starting video frame and the ending video frame in the video and the pre-stored device distance between the second acquisition device and the first acquisition device; the target time is the time when the target vehicle travels to the second acquisition device;

[0039] an acquisition unit, configured to acquire, based on the target moment, the side image of the target vehicle acquired by the second acquisition device;

[0040] The detection unit is used to perform target detection on the front image of the target vehicle contained in the video to obtain the license plate information of the target vehicle; and to perform target detection on the side image of the target vehicle to obtain the vehicle model information of the target vehicle.

[0041] Optionally, the determining unit is specifically configured to:

[0042] Respectively determining first position information of a designated key point of the target vehicle in the starting video frame, and second position information of the designated key point in the ending video frame;

[0043] The target time is determined based on the capture time of the starting video frame and the ending video frame in the video, the first position information, the second position information and the device distance.

[0044] Optionally, the determining unit is specifically configured to:

[0045] Determine the time interval between a first acquisition moment and a second acquisition moment; the first acquisition moment is the acquisition moment of the starting video frame; the second acquisition moment is the acquisition moment of the ending video frame;

[0046] Based on the first position information, the second position information and the optical parameters of the first acquisition device, obtaining the travel distance of the target vehicle within the time interval;

[0047] Determine the driving time required for the target vehicle to drive from the first collection device to the second collection device based on the time interval, the driving distance, and the device distance;

[0048] The target time is determined based on the second collection time and the travel time.

[0049] Optionally, the determining unit is specifically configured to:

[0050] Based on the first position information, the second position information and the optical parameter, respectively determine third position information corresponding to the first position information in a world coordinate system, and fourth position information corresponding to the second position information in a world coordinate system;

[0051] Based on the third position information and the fourth position information, a travel distance of the target vehicle within the time interval is determined.

[0052] Optionally, the determining unit is specifically configured to:

[0053] Based on the time interval and the travel distance, obtaining the travel speed of the target vehicle;

[0054] The driving time is obtained based on the driving speed and the device distance.

[0055] Optionally, the acquiring unit is specifically used for:

[0056] Obtaining the entry time corresponding to each candidate vehicle that enters the video screen of the second acquisition device after the acquisition time of the endpoint video frame, and the side image of each candidate vehicle acquired by the second acquisition device; wherein the entry time corresponding to any candidate vehicle is the acquisition time of the side image of the candidate vehicle;

[0057] respectively determining the time difference between the target time and the entry time corresponding to each candidate vehicle;

[0058] The side image of the candidate vehicle with the shortest time difference is used as the side image of the target vehicle.

[0059] Optionally, the acquiring unit is specifically used for:

[0060] Acquire multiple video frames captured by the second acquisition device, of the candidate vehicle from entering the video screen to leaving the video screen;

[0061] For the multiple video frames, respectively, by detecting feature points, a translation matrix between every two adjacent video frames is obtained;

[0062] The multiple video frames are spliced ​​by using the obtained translation matrices to obtain the side image of the candidate vehicle.

[0063] Optionally, the endpoint video frame includes designated key points of the target vehicle, and the video frames acquired by the first acquisition device after the endpoint video frame do not include the designated key points.

[0064] An electronic device provided in an embodiment of the present application includes a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of any one of the above-mentioned vehicle identification methods.

[0065] An embodiment of the present application provides a computer-readable storage medium, which includes a computer program. When the computer program is run on an electronic device, the computer program is used to enable the electronic device to execute the steps of any one of the above-mentioned vehicle identification methods.

[0066] An embodiment of the present application provides a computer program product, which includes a computer program, and the computer program is stored in a computer-readable storage medium; when a processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the electronic device performs the steps of any one of the above-mentioned vehicle identification methods.

[0067] The beneficial effects of this application are as follows:

[0068] The embodiments of the present application provide a vehicle identification method, device, electronic device and storage medium. First, a video containing a target vehicle captured by a first acquisition device is acquired. Since during the acquisition of the video, the angle between the driving direction of the target vehicle and the acquisition direction of the first acquisition device is less than or equal to a preset angle threshold, the captured image contains a front image of the target vehicle. Target detection is performed on the obtained front image, so that the license plate information of the target vehicle can be accurately obtained.

[0069] Furthermore, based on the acquisition time of the starting video frame and the ending video frame in the video, and the pre-stored device distance between the second acquisition device and the first acquisition device, the target time when the target vehicle drives to the second acquisition device can be estimated;

[0070] Finally, the side image of the target vehicle captured by the second acquisition device is obtained based on the target time. Since the second acquisition device only needs to capture the side image of the target vehicle, the vehicle model information can be accurately obtained by performing target detection on the side image, thereby improving the accuracy of vehicle model recognition.

[0071] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0073] Figure 1 An optional schematic diagram of an application scenario in an embodiment of the present application;

[0074] Figure 2 This is a flow chart of an implementation of a vehicle identification method in an embodiment of the present application;

[0075] Figure 3 A schematic diagram of the positional relationship between the first acquisition device and the second acquisition device in the embodiment of the present application;

[0076] Figure 4 A schematic diagram of the structure of a vehicle identification device in an embodiment of the present application;

[0077] Figure 5 A schematic diagram of a hardware structure of an electronic device to which an embodiment of the present application is applied;

[0078] Figure 6 The present invention is a schematic diagram of the hardware structure of another electronic device to which the embodiments of the present application are applied. DETAILED DESCRIPTION

[0079] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the technical solution of the present application, rather than all of the embodiments. Based on the embodiments recorded in the application documents, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the technical solution of the present application.

[0080] The following is an introduction to some concepts involved in the embodiments of the present application.

[0081] The first acquisition device: an image acquisition device used to acquire the front image of the target vehicle, which may be a camera, a camera head, etc. Therefore, the first acquisition device may also be called a front-mounted camera. In practical applications, the first acquisition device is usually installed on a gantry.

[0082] The second acquisition device: an image acquisition device used to acquire the side image of the target vehicle, which may be a camera, a camera head, etc. Therefore, the second acquisition device may also be called a side-mounted camera. The acquisition direction of the second acquisition device may be perpendicular to the driving direction of the target vehicle, or the angle between the second acquisition device and the driving direction of the target vehicle may be within a preset angle range, for example, 80 degrees to 100 degrees.

[0083] Starting video frame: refers to the first frame in the video containing the target vehicle captured by the first acquisition device. It can be the target vehicle reaching the specified position in the video screen of the first acquisition device. For example, draw a horizontal line in the video screen, and the video frame captured when the front of the target vehicle reaches the horizontal line is used as the starting video frame.

[0084] End point video frame: refers to the last frame in the video containing the target vehicle captured by the first acquisition device, which can be a video frame captured when the target vehicle drives out of the video screen of the first acquisition device, for example, a video frame captured after the right front wheel of the target vehicle disappears from the video screen.

[0085] The following is a brief introduction to the design concept of this application:

[0086] In the existing highway toll collection, vehicles such as trucks and vans need to go through manual channels to register or pay for different vehicles and the goods they carry. When registering or paying for vehicles at manual channels, it is usually done by manually identifying license plates and vehicle models, and the highway entrance staff manually collects the fees. This method is inefficient and cannot meet the needs of modern traffic management.

[0087] In the related art, in order to improve the efficiency of license plate and vehicle model recognition, image acquisition equipment is usually deployed in advance at the entrances and exits of highways to collect video data, and then feature extraction is performed on the video data containing the target vehicle to obtain the license plate information and vehicle model information of the target vehicle.

[0088] Based on the above method, since the image acquisition device needs to take into account the functions of license plate recognition and vehicle model recognition, the image acquisition device can only be deployed diagonally in front of the vehicle's driving direction. However, when the vehicle body is long, it is difficult to accurately identify the number of wheels from the image captured from the diagonal front angle, which will affect the accuracy of vehicle model recognition.

[0089] In summary, how to improve the accuracy of vehicle recognition has become a problem that needs to be solved urgently.

[0090] In view of this, the embodiments of the present application provide a vehicle identification method, device, electronic device and storage medium. First, a video containing a target vehicle captured by a first acquisition device is obtained. Since during the acquisition of the video, the angle between the driving direction of the target vehicle and the acquisition direction of the first acquisition device is less than or equal to a preset angle threshold, the captured image contains a front image of the target vehicle. Target detection is performed on the obtained front image, so that the license plate information of the target vehicle can be accurately obtained.

[0091] Furthermore, based on the acquisition time of the starting video frame and the ending video frame in the video, and the pre-stored device distance between the second acquisition device and the first acquisition device, the target time when the target vehicle drives to the second acquisition device can be estimated;

[0092] Finally, the side image of the target vehicle captured by the second acquisition device is obtained based on the target time. Since the second acquisition device only needs to capture the side image of the target vehicle, the vehicle model information can be accurately obtained by performing target detection on the side image, thereby improving the accuracy of vehicle model recognition.

[0093] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application may be combined with each other if there is no conflict.

[0094] like Figure 1 As shown, it is a schematic diagram of an application scenario of an embodiment of the present application. The application scenario diagram includes a terminal device 110, a terminal device 120 and a server.

[0095] In the embodiment of the present application, the terminal device 110 is the first acquisition device, and the terminal device 120 is the second acquisition device, which may be a device including but not limited to a mobile phone, a computer, etc. containing a camera, or a separate camera or a camera. In the embodiment of the present application, the acquisition device is mainly described as a camera, and the server is the background server corresponding to the acquisition device, or a server specifically used for vehicle identification, which is not specifically limited in the present application. The server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0096] It should be noted that the vehicle identification method in the embodiment of the present application can be executed by an electronic device, which can be a server or a terminal device, that is, the method can be executed by the server or the terminal device alone, or can be executed by the server and the terminal device together.

[0097] In an optional implementation, the first acquisition device 110, the second acquisition device 120 and the server may communicate with each other via a communication network.

[0098] In an optional implementation, the communication network is a wired network or a wireless network.

[0099] It should be noted that Figure 1 The figure is only an example. In fact, the number of acquisition devices and servers is not limited and is not specifically limited in the embodiments of the present application.

[0100] In addition, the embodiments of the present application can be applied to various scenarios, including not only vehicle identification scenarios, but also including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving and other scenarios.

[0101] The following describes the vehicle identification method provided by the exemplary embodiment of the present application in combination with the application scenarios described above and with reference to the accompanying drawings. It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principles of the present application, and the implementation of the present application is not limited in this regard.

[0102] See also Figure 2 As shown, it is a flowchart of an implementation of a vehicle identification method provided in an embodiment of the present application. Taking the execution subject as a server as an example, the specific implementation process of the method includes the following steps S21-S25:

[0103] S21: The server obtains a video containing a target vehicle captured by a first capturing device;

[0104] Among them, the first acquisition device is usually installed on a gantry and is used to acquire the front image of the target vehicle. During the video acquisition, the angle between the driving direction of the target vehicle and the acquisition direction of the first acquisition device is less than or equal to the preset angle threshold. The angle between the driving direction of the target vehicle and the acquisition direction of the first acquisition device can be regarded as the projection of the acquisition direction of the first acquisition device on the road where the target vehicle is traveling. In order to more accurately capture the front image, the angle between the driving direction and the acquisition direction should be as small as possible. The preset angle threshold can be set according to demand. For example, if the preset angle threshold is 45 degrees, the angle is less than or equal to 45 degrees.

[0105] S22: The server determines the target time based on the acquisition time of the starting video frame and the ending video frame in the video and the pre-stored device distance between the second acquisition device and the first acquisition device;

[0106] Specifically, the starting video frame refers to the first frame in the acquired video, and the ending video frame refers to the last frame in the video. During the acquisition process of the first acquisition device, the video frame acquired when the target vehicle enters the video screen can be used as the starting video frame, and the video frame acquired when the target vehicle exits the video screen can be used as the ending video frame.

[0107] There are many ways to determine whether the target vehicle enters or exits the video screen. For example, when determining whether the target vehicle enters the video screen, a horizontal line is drawn on the video screen. When the front of the target vehicle reaches the horizontal line in the video screen, it is determined that the target vehicle enters the video screen. Alternatively, when the right front wheel of the target vehicle reaches a specified position in the video screen, it is determined that the target vehicle enters the video screen.

[0108] When judging whether the target vehicle enters the video screen, for example, a horizontal line is drawn on the video screen, and when the rear end of the target vehicle reaches the horizontal line in the video screen, it is determined that the target vehicle exits the video screen, or when the right front wheel of the target vehicle reaches a designated position in the video screen, it is determined that the target vehicle exits the video screen.

[0109] It should be noted that there are many ways to determine whether the target vehicle enters or exits the video screen. The above is only an example and is not specifically limited here.

[0110] Optionally, the endpoint video frame includes designated key points of the target vehicle, and the video frames acquired by the first acquisition device after the endpoint video frame do not include the designated key points.

[0111] Specifically, the designated key point can be any point on the target vehicle, for example, the right front wheel contact point, the left front wheel contact point, the right front headlight position, the center point of the front windshield, etc., which are not specifically limited here. In the process of the target vehicle passing through the first acquisition device, the first acquisition device will collect multiple continuous video frames. For example, the first acquisition device collects a video frame every 0.1 seconds. Assuming that the end video frame a is collected at 12:10:0.5 seconds, then the next video frame b is collected at 12:10:0.6 seconds. Taking the designated key point as the right front wheel contact point as an example, the right front wheel contact point is included in the end video frame a, and the right front wheel contact point is not included in the next video frame b.

[0112] like Figure 3 As shown, it is a schematic diagram of the positional relationship between the first acquisition device and the second acquisition device in the embodiment of the present application. The first acquisition device is located on the gantry above the road, and the second acquisition device is located on the side of the road. When the target vehicle is driving, first, when it enters the video screen of the first acquisition device, the starting video frame will be captured. Then, the target vehicle continues to drive, and when it exits the video screen of the first acquisition device, the end video frame will be captured. At this time, the target vehicle has passed the position of the first acquisition device and is approaching the position of the second acquisition device. Finally, at the target time, the target vehicle drives to the second acquisition device, that is, the target time is the time when the target vehicle drives to the second acquisition device.

[0113] The target vehicle can be regarded as traveling at a constant speed, and the target time can be estimated. For example, it is pre-estimated that the distance from the vehicle entering and exiting the video screen of the first acquisition device is 6 meters, the acquisition time of the starting video frame is 10:12:03, the acquisition time of the end video frame is 10:12:06, the device distance is 5 meters, and it takes 5 / (6 / 3)=2.5 seconds from the target vehicle exiting the video screen of the first acquisition device to driving to the second acquisition device. The target time is 10:12:08.5 seconds. The target vehicle can also be regarded as accelerating. If the time from the target vehicle exiting the video screen of the first acquisition device to driving to the second acquisition device is less than 2.5 seconds, 10:12:08 can be used as the target time. The target vehicle can also be regarded as decelerating. In this case, 10:12:09 can be used as the target time. No specific limitation is made here.

[0114] In the embodiment of the present application, the target vehicle is mainly described by taking the average speed as an example. Optionally, step S22 can be implemented as follows:

[0115] S221: respectively determining first position information of a designated key point of the target vehicle in a starting video frame and second position information of the designated key point in an ending video frame;

[0116] S222: Determine a target time based on the capture time of the starting video frame and the ending video frame in the video, the first position information, the second position information, and the device distance.

[0117] Specifically, the first position information is the pixel coordinates of the specified key point in the starting video frame, and the second position information is the pixel coordinates of the specified key point in the ending video frame. The actual displacement of the target vehicle between the starting video frame and the ending video frame can be calculated through the first position information and the second position information. Combined with the acquisition time of the starting video frame and the ending video frame, the travel time of the target vehicle between the starting video frame and the ending video frame can be calculated, and then the target time can be estimated by calculating the actual displacement, driving time and device distance.

[0118] For example, the actual displacement is 5 meters, the driving time is 1 second, the device distance is 5 meters, the time from the target vehicle leaving the video screen of the first acquisition device to driving to the second acquisition device is 1 second, and the acquisition time of the endpoint video frame is 10:12:06, then the target time is 10:12:07.

[0119] Optionally, when the first acquisition moment is the acquisition moment of the starting video frame and the second acquisition moment is the acquisition moment of the ending video frame, step S222 may be implemented as follows:

[0120] S31: Determine the time interval between the first acquisition moment and the second acquisition moment;

[0121] S32: Obtaining a travel distance of the target vehicle within a time interval based on the first position information, the second position information and the optical parameters of the first acquisition device;

[0122] S33: Determine the driving time required for the target vehicle to drive from the first collection device to the second collection device based on the time interval, the driving distance, and the device distance;

[0123] S34: Determine the target time based on the second collection time and the travel time.

[0124] Specifically, the optical parameters of the first acquisition device can also be called camera internal parameters, including parameters used to describe the internal geometric and optical characteristics of the camera, such as focal length, principal point, pixel size, radial distortion coefficient, tangential distortion coefficient, etc. The camera internal parameters are usually calibrated at the factory. The optical parameters of the first acquisition device can be used to calculate the position of the first position information and the second position information in the world coordinate system, and then calculate the travel distance of the target vehicle. The travel time is added to the second acquisition time to obtain the target time.

[0125] Taking the time interval as 2 seconds, the driving distance as 4 meters, and the device distance as 10 meters as an example, the target vehicle's driving speed is 2 meters per second, and the driving time is 5 seconds.

[0126] Optionally, step S32 may be implemented as follows:

[0127] Based on the first position information, the second position information and the optical parameters, the third position information corresponding to the first position information in the world coordinate system and the fourth position information corresponding to the second position information in the world coordinate system are determined respectively; based on the third position information and the fourth position information, the driving distance of the target vehicle within the time interval is determined.

[0128] Specifically, the camera intrinsic parameters can be used to calculate the homography matrix from the pixel coordinates of a point on the image to the world coordinate system:

[0129] First, establish a world coordinate system. The origin of the world coordinate system is the point on the ground projected from the origin of the normal camera, and the Y axis is parallel to the lane line. The camera model is as follows:

[0130]

[0131] Among them, z c1is the z-axis coordinate of the target in the camera coordinate system, (u1, v1) is the coordinate of the target in the image coordinate system, fx is the focal length in the x-axis direction of the camera coordinate system, fy is the focal length in the y-axis direction of the camera coordinate system, (u0, v0) is the position of the image principal point in the image coordinate system, fx, fy, u0, v0 are all camera internal parameters, which can be determined before leaving the factory. r11-r33 constitutes the rotation matrix, tx, ty, tz constitute the translation matrix, (Xw, Yw, Zw) is the coordinate of the target in the world coordinate system.

[0132] For coplanar points, we can set one of the coordinates to 0 and set Zw to 0, then:

[0133]

[0134]

[0135]

[0136]

[0137] Among them, α, β, and γ are the yaw angle, pitch angle, and roll angle of the normal-mounted camera relative to the lane line, respectively. They are rotation matrices generated by yaw, pitch, and roll angles, respectively. In this application, the roll angle γ is 0, tx=0, ty=0, tz=h, h is the camera height, and the yaw angle α and pitch angle β can be calculated by drawing parallel lane lines in the video screen of the normal-mounted camera, and the lane line vanishing points can be calculated. The above can determine the homography matrix H from the image pixel coordinates (u, v) to the world coordinates (X, Y).

[0138]

[0139] According to the homography matrix H, the third position information (X1, Y1) in the world coordinate system corresponding to the first position information (u1, v1) and the fourth position information (X2, Y2) in the world coordinate system corresponding to the second position information (u2, v2) can be obtained, where Y1 and Y2 are the radial distances from the point where the right front wheel touches the first acquisition device, and the difference between Y1 and Y2 is the driving distance.

[0140] Optionally, step S32 may be implemented as follows:

[0141] Based on the time interval and the driving distance, the driving speed of the target vehicle is obtained; based on the driving speed and the device distance, the driving time is obtained.

[0142] For example, if the time interval is 5 seconds and the driving distance is 30 meters, the driving speed is 6 meters per second, and the device distance is 9 meters, then the driving time is 1.5 seconds.

[0143] S23: The server obtains the side image of the target vehicle acquired by the second acquisition device based on the target time;

[0144] Specifically, during the collection process of the second collection device, side images of multiple candidate vehicles may be collected over time. In the present application, since the target time is the estimated time when the target vehicle drives to the second collection device, the time when the second collection device collects the side images of each candidate vehicle is compared according to the target time to find the side image of the target vehicle.

[0145] For example, by comparing the moments when the second acquisition device acquires the side images of each candidate vehicle, the side image of the candidate vehicle corresponding to the moment closest to the target moment is used as the side image of the target vehicle, or the side image of the candidate vehicle corresponding to the moment closest to the target moment among the moments not less than the target moment is used as the side image of the target vehicle, or the side image of the candidate vehicle corresponding to the moment closest to the target moment among the moments not greater than the target moment is used as the side image of the target vehicle, and no specific limitation is made here.

[0146] Optionally, step S23 may be implemented as follows:

[0147] S231: Acquire the entry time corresponding to each candidate vehicle that enters the video screen of the second acquisition device after the acquisition time of the endpoint video frame, and the side image of each candidate vehicle acquired by the second acquisition device;

[0148] S232: respectively determining the time difference between the target time and the entry time corresponding to each candidate vehicle;

[0149] S233: Using the side image of the candidate vehicle with the shortest time difference as the side image of the target vehicle.

[0150] Among them, the entry time corresponding to any candidate vehicle is the collection time of the side image of the candidate vehicle. For example, the collection time of candidate vehicle 1 is 10:10:12, the collection time of candidate vehicle 2 is 10:10:40, the collection time of candidate vehicle 3 is 10:11:02, and the collection time of candidate vehicle 4 is 10:11:12. The target time is 10:10:36. The time difference with candidate vehicle 1 is 24 seconds, the time difference with candidate vehicle 2 is 4 seconds, the time difference with candidate vehicle 3 is 26 seconds, and the time difference with candidate vehicle 4 is 36 seconds. The side image of candidate vehicle 2 is used as the side image of the target vehicle.

[0151] Based on the above method, the vehicle speed measurement can be used to accurately calculate the driving time from the vehicle leaving the front-mounted camera position to the side-mounted camera position, and the front image and side image of the target vehicle can be accurately associated according to the actual time, avoiding association errors caused by different vehicle speeds.

[0152] Optionally, obtain a side image of each candidate vehicle by:

[0153] Acquire multiple video frames of the candidate vehicle from entering the video screen to leaving the video screen captured by the second acquisition device; obtain a translation matrix between every two adjacent video frames through feature point detection for the multiple video frames; splice the multiple video frames through the obtained translation matrices to obtain a side image of the candidate vehicle.

[0154] Specifically, when the second acquisition device detects that the candidate vehicle enters the video screen, the stitching mode is turned on, and the multiple acquired video frames are stitched into a complete side image. The two adjacent video frames are matched using feature point detection and matching algorithms to obtain a translation matrix between the two video frames. The multiple video frames are stitched together using the obtained translation matrices to obtain a side image of the candidate vehicle.

[0155] S24: The server performs target detection on the front image of the target vehicle contained in the video to obtain the license plate information of the target vehicle;

[0156] Specifically, the front image of the target vehicle can be obtained from a video, for example, it can be a starting point video frame, which is not specifically limited here.

[0157] S25: The server performs target detection on the side image of the target vehicle to obtain the model information of the target vehicle.

[0158] Among them, target detection is performed on the side image, mainly detecting the number of wheels of the vehicle, and obtaining the vehicle model information based on the obtained number of wheels.

[0159] In addition, the execution order of step S24 and step S25 can be adjusted according to actual needs. For example, it can be executed in the order of S21→S24→S22→S23→S25, that is, after obtaining the video captured by the first acquisition device, target detection is immediately performed to obtain the license plate information. It can also be executed in the order of S21→S22→S23→S25→S24, that is, after obtaining the side image of the target vehicle, target detection is immediately performed to obtain the vehicle model information. No specific limitation is made here.

[0160] Optionally, the device distance between the first acquisition device and the second acquisition device may be obtained by measurement, or may be calculated in the following manner:

[0161] The distance between the first acquisition device (front-mounted camera) and the second acquisition device (side-mounted camera) is estimated to be Dis1. Data of multiple vehicles traveling between the front-mounted camera and the side-mounted camera are collected. Taking vehicle 1 as an example, at the acquisition time t1 of the starting video frame, the radial distance from the point where the right front wheel of vehicle 1 touches the camera is Y1, and Dis1+Y1 is the distance from the point where the right front wheel touches the camera to the side-mounted camera when the starting video frame is collected. The time T from the acquisition time of the starting video frame to the side-mounted camera is T = (Dis1+Y1) / v, and t1+T is the estimated time when the side-mounted camera will capture the vehicle. The timestamp T0 of the actual side-mounted camera capturing the vehicle is found near (t1+T), and (T0-t1) is the time from t1 to the time when the actual vehicle is captured by the side-mounted camera. Then Dis = (T0-t1)*v-Y1, and Dis is the actual distance from the side-mounted camera to the front-mounted camera. A Dis can be calculated for each vehicle, and the actual distance between the two cameras is expressed by taking the average of the actual distances calculated for multiple vehicles.

[0162] In the embodiment of the present application, first, a video containing a target vehicle captured by a first acquisition device is obtained. Since during the video acquisition period, the angle between the driving direction of the target vehicle and the acquisition direction of the first acquisition device is less than or equal to a preset angle threshold, the captured image contains a front image of the target vehicle. Target detection is performed on the obtained front image, and the license plate information of the target vehicle can be accurately obtained.

[0163] Furthermore, based on the acquisition time of the starting video frame and the ending video frame in the video, and the pre-stored device distance between the second acquisition device and the first acquisition device, the target time when the target vehicle drives to the second acquisition device can be estimated;

[0164] Finally, the side image of the target vehicle captured by the second acquisition device is obtained based on the target time. Since the second acquisition device only needs to capture the side image of the target vehicle, the vehicle model information can be accurately obtained by performing target detection on the side image, thereby improving the accuracy of vehicle model recognition.

[0165] Based on the same inventive concept, the embodiment of the present application also provides a vehicle identification device. Figure 4 As shown, it is a schematic diagram of the structure of a vehicle identification device 400, which may include:

[0166] The acquisition unit 401 is used to acquire a video containing a target vehicle acquired by a first acquisition device; during the acquisition of the video, the angle between the driving direction of the target vehicle and the acquisition direction of the first acquisition device is less than or equal to a preset angle threshold;

[0167] The determination unit 402 is used to determine the target time based on the acquisition time of the starting video frame and the end video frame in the video and the pre-stored device distance between the second acquisition device and the first acquisition device; the target time is the time when the target vehicle travels to the second acquisition device;

[0168] An acquisition unit 403 is used to acquire a side image of the target vehicle acquired by the second acquisition device based on the target time;

[0169] The detection unit 404 is used to perform target detection on the front image of the target vehicle contained in the video to obtain the license plate information of the target vehicle; and perform target detection on the side image of the target vehicle to obtain the model information of the target vehicle.

[0170] Optionally, the determining unit 402 is specifically configured to:

[0171] Determine first position information of a designated key point of the target vehicle in a starting video frame and second position information of the designated key point in an ending video frame respectively;

[0172] The target time is determined based on the capture time of the starting video frame and the ending video frame in the video, the first position information, the second position information and the device distance.

[0173] Optionally, the determining unit 402 is specifically configured to:

[0174] Determine the time interval between a first acquisition moment and a second acquisition moment; the first acquisition moment is the acquisition moment of the starting video frame; the second acquisition moment is the acquisition moment of the ending video frame;

[0175] Obtaining a travel distance of the target vehicle within a time interval based on the first position information, the second position information and the optical parameters of the first acquisition device;

[0176] Determine the driving time required for the target vehicle to drive from the first collection device to the second collection device based on the time interval, the driving distance, and the device distance;

[0177] Based on the second collection time and the travel time, a target time is determined.

[0178] Optionally, the determining unit 402 is specifically configured to:

[0179] Based on the first position information, the second position information and the optical parameter, respectively determine third position information corresponding to the first position information in the world coordinate system and fourth position information corresponding to the second position information in the world coordinate system;

[0180] Based on the third position information and the fourth position information, a travel distance of the target vehicle within the time interval is determined.

[0181] Optionally, the determining unit 402 is specifically configured to:

[0182] Based on the time interval and the driving distance, the driving speed of the target vehicle is obtained;

[0183] Based on driving speed and device distance, get driving time.

[0184] Optionally, the acquiring unit 403 is specifically configured to:

[0185] Obtaining the entry time corresponding to each candidate vehicle that enters the video screen of the second acquisition device after the acquisition time of the endpoint video frame, and the side image of each candidate vehicle acquired by the second acquisition device; wherein the entry time corresponding to any candidate vehicle is the acquisition time of the side image of the candidate vehicle;

[0186] Determine the time difference between the target time and the entry time corresponding to each candidate vehicle respectively;

[0187] The side image of the candidate vehicle with the shortest time difference is used as the side image of the target vehicle.

[0188] Optionally, the acquiring unit 403 is specifically configured to:

[0189] Acquire multiple video frames captured by a second acquisition device, of the candidate vehicle from entering the video screen to exiting the video screen;

[0190] For multiple video frames, feature point detection is performed to obtain a translation matrix between each two adjacent video frames;

[0191] By obtaining each translation matrix, multiple video frames are spliced ​​to obtain the side image of the candidate vehicle.

[0192] Optionally, the endpoint video frame includes designated key points of the target vehicle, and the video frames acquired by the first acquisition device after the endpoint video frame do not include the designated key points.

[0193] For the convenience of description, the above parts are divided into modules (or units) according to their functions and described separately. Of course, when implementing this application, the functions of each module (or unit) can be implemented in the same or multiple software or hardware.

[0194] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories), or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.

[0195] Those skilled in the art will appreciate that various aspects of the present application may be implemented as a system, method or program product. Therefore, various aspects of the present application may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to as "circuit", "module" or "system" herein.

[0196] Based on the same inventive concept as the above method embodiment, an electronic device is also provided in the embodiment of the present application. In one embodiment, the electronic device may be a server, such as Figure 1 In this embodiment, the structure of the electronic device can be as follows: Figure 5 As shown, it includes a memory 501 , a communication module 503 and one or more processors 502 .

[0197] The memory 501 is used to store computer programs executed by the processor 502. The memory 501 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and programs required for running the instant messaging function, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.

[0198] The memory 501 may be a volatile memory, such as a random-access memory (RAM); the memory 501 may also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); or the memory 501 may be any other medium that can be used to carry or store a desired computer program in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 501 may be a combination of the above memories.

[0199] The processor 502 may include one or more central processing units (CPU) or a digital processing unit, etc. The processor 502 is used to implement the above vehicle identification method when calling the computer program stored in the memory 501 .

[0200] The communication module 503 is used to communicate with terminal devices and other servers.

[0201] The specific connection medium between the memory 501, the communication module 503 and the processor 502 is not limited in the embodiment of the present application. Figure 5 In the embodiment, the memory 501 and the processor 502 are connected via a bus 504. The bus 504 is connected to the processor 502 via a bus 504. Figure 5 The connections between the other components are described with bold lines, which are only for illustrative purposes and are not intended to be limiting. The bus 504 can be divided into an address bus, a data bus, a control bus, etc. For ease of description, Figure 5 The diagram shows that only one thick line is used, but this does not mean that there is only one bus or only one type of bus.

[0202] The memory 501 stores a computer storage medium, and the computer storage medium stores computer executable instructions, and the computer executable instructions are used to implement the vehicle identification method of the embodiment of the present application. The processor 502 is used to execute the above-mentioned vehicle identification method, such as Figure 2 shown.

[0203] In another embodiment, the electronic device may also be other electronic devices, such as Figure 1 In this embodiment, the structure of the electronic device can be as follows: Figure 6 As shown, it includes: a communication component 610, a memory 620, a display unit 630, a camera 640, a sensor 650, an audio circuit 660, a Bluetooth module 670, a processor 680 and other components.

[0204] The communication component 610 is used to communicate with the server. In some embodiments, a wireless fidelity (WiFi) module may be included. The WiFi module belongs to a short-range wireless transmission technology. The electronic device can help the user to send and receive information through the WiFi module.

[0205] The memory 620 can be used to store software programs and data. The processor 680 executes various functions and data processing of the terminal device by running the software programs or data stored in the memory 620. The memory 620 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. The memory 620 stores an operating system that enables the terminal device to run. In the present application, the memory 620 can store an operating system and various application programs, and can also store a computer program for executing the vehicle identification method of the embodiment of the present application.

[0206] The display unit 630 can also be used to display information input by the user or information provided to the user and a graphical user interface (GUI) of various menus of the terminal device. Specifically, the display unit 630 may include a display screen 632 disposed on the front of the terminal device. The display screen 632 may be configured in the form of a liquid crystal display, a light emitting diode, etc. The display unit 630 may be used to display the vehicle identification user interface in the embodiment of the present application, etc.

[0207] The display unit 630 can also be used to receive input digital or character information and generate signal input related to user settings and function control of the terminal device. Specifically, the display unit 630 may include a touch screen 631 arranged on the front of the terminal device, which can collect user touch operations on or near it, such as clicking a button, dragging a scroll box, etc.

[0208] The touch screen 631 can be covered on the display screen 632, or the touch screen 631 and the display screen 632 can be integrated to realize the input and output functions of the terminal device, and the integrated display screen can be referred to as a touch display screen. In this application, the display unit 630 can display the application and the corresponding operation steps.

[0209] The camera 640 can be used to capture still images, and users can post comments on the images taken by the camera 640 through the application. The camera 640 can be one or more. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the processor 680 for conversion into a digital image signal.

[0210] The terminal device may further include at least one sensor 650, such as an acceleration sensor 651, a distance sensor 652, a fingerprint sensor 653, and a temperature sensor 654. The terminal device may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, a light sensor, and a motion sensor.

[0211] The audio circuit 660, the speaker 661, and the microphone 662 can provide an audio interface between the user and the terminal device. The audio circuit 660 can transmit the electrical signal converted from the received audio data to the speaker 661, which is converted into a sound signal for output. The terminal device can also be equipped with a volume button for adjusting the volume of the sound signal. On the other hand, the microphone 662 converts the collected sound signal into an electrical signal, which is received by the audio circuit 660 and converted into audio data, and then the audio data is output to the communication component 610 to be sent to, for example, another terminal device, or the audio data is output to the memory 620 for further processing.

[0212] The Bluetooth module 670 is used to exchange information with other Bluetooth devices having Bluetooth modules through the Bluetooth protocol. For example, the terminal device can establish a Bluetooth connection with a wearable electronic device (such as a smart watch) that also has a Bluetooth module through the Bluetooth module 670 to exchange data.

[0213] The processor 680 is the control center of the terminal device. It uses various interfaces and lines to connect various parts of the entire terminal. It executes various functions of the terminal device and processes data by running or executing software programs stored in the memory 620 and calling data stored in the memory 620. In some embodiments, the processor 680 may include one or more processing units; the processor 680 may also integrate an application processor and a baseband processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the baseband processor mainly processes wireless communications. It is understandable that the above-mentioned baseband processor may not be integrated into the processor 680. In the present application, the processor 680 can run the operating system, application programs, user interface display and touch response, as well as the vehicle identification method of the embodiment of the present application. In addition, the processor 680 is coupled to the display unit 630.

[0214] In some possible implementations, various aspects of the vehicle identification method provided by the present application may also be implemented in the form of a program product, which includes a computer program. When the program product is run on an electronic device, the computer program is used to enable the electronic device to execute the steps of the vehicle identification method according to various exemplary embodiments of the present application described above in this specification. For example, the electronic device may execute the following steps: Figure 2 Follow the steps shown in .

[0215] The program product may adopt any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0216] The program product of the embodiment of the present application may adopt a portable compact disk read-only memory (CD-ROM) and include a computer program, and can be run on an electronic device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which can be used by or in combination with a command execution system, apparatus, or device.

[0217] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable computer program is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with a command execution system, apparatus, or device.

[0218] The computer program embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0219] The computer program for performing the operation of the present application can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and also conventional procedural programming languages ​​such as "C" language or similar programming languages. The computer program can be executed entirely on the user electronic device, partially on the user device, as an independent software package, partially on the user electronic device and partially on the remote electronic device, or completely on the remote electronic device or server. In the case of involving a remote electronic device, the remote electronic device can be connected to the user electronic device through any type of network including a local area network (LAN) or a wide area network (WAN), or can be connected to an external electronic device (for example, using an Internet service provider to connect through the Internet).

[0220] It should be noted that, although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided into multiple units to be embodied.

[0221] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0222] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain a computer-usable computer program.

[0223] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program commands. These computer program commands can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the commands executed by the processor of the computer or other programmable data processing device generate commands for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0224] These computer program commands may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the commands stored in the computer readable memory produce an article of manufacture comprising a command device, the command device implementing the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0225] These computer program commands can also be loaded onto a computer or other programmable data processing device so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the commands executed on the computer or other programmable device provide the instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0226] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0227] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A vehicle identification method, characterized in that: The method comprises: Acquire a video containing a target vehicle captured by a first capturing device; during the capturing of the video, an angle between a driving direction of the target vehicle and a capturing direction of the first capturing device is less than or equal to a preset angle threshold; Determine a target time based on the acquisition time of the starting video frame and the ending video frame in the video and the pre-stored device distance between the second acquisition device and the first acquisition device; the target time is the time when the target vehicle travels to the second acquisition device; Based on the target time and the entry time corresponding to each candidate vehicle that enters the video screen of the second acquisition device after the acquisition time of the endpoint video frame, determine the side image of the target vehicle from the side images of the candidate vehicles; Performing target detection on the front image of the target vehicle contained in the video to obtain the license plate information of the target vehicle; Perform target detection on the side image of the target vehicle to obtain the vehicle model information of the target vehicle.

2. The method according to claim 1, characterized in that The determining the target time based on the acquisition time of the starting video frame and the ending video frame in the video and the pre-stored device distance between the second acquisition device and the first acquisition device includes: Respectively determining first position information of a designated key point of the target vehicle in the starting video frame, and second position information of the designated key point in the ending video frame; The target time is determined based on the capture time of the starting video frame and the ending video frame in the video, the first position information, the second position information and the device distance.

3. The method according to claim 2, characterized in that The determining the target time based on the acquisition time of the starting video frame and the ending video frame in the video, the first position information, the second position information and the device distance includes: Determine the time interval between a first acquisition moment and a second acquisition moment; the first acquisition moment is the acquisition moment of the starting video frame; the second acquisition moment is the acquisition moment of the ending video frame; Based on the first position information, the second position information and the optical parameters of the first acquisition device, obtaining the travel distance of the target vehicle within the time interval; Determine the driving time required for the target vehicle to drive from the first collection device to the second collection device based on the time interval, the driving distance, and the device distance; The target time is determined based on the second collection time and the travel time.

4. The method according to claim 3, characterized in that The obtaining, based on the first position information, the second position information and the optical parameter of the first acquisition device, the travel distance of the target vehicle within the time interval includes: Based on the first position information, the second position information and the optical parameter, respectively determine third position information corresponding to the first position information in a world coordinate system, and fourth position information corresponding to the second position information in a world coordinate system; Based on the third position information and the fourth position information, a travel distance of the target vehicle within the time interval is determined.

5. The method according to claim 3, characterized in that The determining, based on the time interval, the driving distance, and the device distance, the driving time required for the target vehicle to drive from the first collection device to the second collection device includes: Based on the time interval and the travel distance, obtaining the travel speed of the target vehicle; The driving time is obtained based on the driving speed and the device distance.

6. The method according to any one of claims 1 to 5, characterized in that The step of determining the side image of the target vehicle from the side images of the candidate vehicles based on the target time and the entry time corresponding to each candidate vehicle that enters the video screen of the second acquisition device after the acquisition time of the endpoint video frame comprises: Obtaining the entry time corresponding to each candidate vehicle that enters the video screen of the second acquisition device after the acquisition time of the endpoint video frame, and the side image of each candidate vehicle acquired by the second acquisition device; wherein the entry time corresponding to any candidate vehicle is the acquisition time of the side image of the candidate vehicle; respectively determining the time difference between the target time and the entry time corresponding to each candidate vehicle; The side image of the candidate vehicle with the shortest time difference is used as the side image of the target vehicle.

7. The method according to claim 6, characterized in that The side image of each candidate vehicle is obtained by: Acquire multiple video frames captured by the second acquisition device, of the candidate vehicle from entering the video screen to leaving the video screen; For the multiple video frames, respectively, by detecting feature points, a translation matrix between every two adjacent video frames is obtained; The multiple video frames are spliced ​​by using the obtained translation matrices to obtain the side image of the candidate vehicle.

8. The method according to claim 1, characterized in that The endpoint video frame includes the designated key point of the target vehicle, and the video frame acquired by the first acquisition device after the endpoint video frame does not include the designated key point.

9. A vehicle identification device, characterized in that: include: A collection unit, used to obtain the video containing the target vehicle collected by the first collection device; During the acquisition of the video, the angle between the driving direction of the target vehicle and the acquisition direction of the first acquisition device is less than or equal to a preset angle threshold; A determination unit, configured to determine a target time based on the acquisition time of the starting video frame and the ending video frame in the video and the pre-stored device distance between the second acquisition device and the first acquisition device; the target time is the time when the target vehicle travels to the second acquisition device; an acquisition unit, configured to determine the side image of the target vehicle from the side images of the candidate vehicles based on the target time and the entry time corresponding to each candidate vehicle that enters the video screen of the second acquisition device after the acquisition time of the endpoint video frame; A detection unit, configured to perform target detection on the front image of the target vehicle contained in the video to obtain the license plate information of the target vehicle; Perform target detection on the side image of the target vehicle to obtain the vehicle model information of the target vehicle.

10. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of any one of the methods of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: It includes a computer program, and when the computer program is run on an electronic device, the computer program is used to enable the electronic device to execute the steps of any method described in claims 1 to 8.

12. A computer program product, characterized in that The method comprises a computer program stored in a computer-readable storage medium; when a processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the electronic device executes the steps of any one of the methods described in claims 1 to 8.

Citation Information

Patent Citations

  • Vehicle charging type discrimination method and device based on vehicle type identification and axle detection

    CN111292432A

  • Precise vehicle type identification method and device based on ETC gantry

    CN114078212A