Camera-based vehicle track generation method and device, equipment and medium
By configuring virtual detection lines and high-precision electronic maps within the factory area, and combining YOLOv8 and BoT-SORT algorithms to detect and track vehicles, generating historical vehicle trajectories, the problem of missing temporary vehicle data is solved, and the traffic safety of the factory area is improved.
Patent Information
- Application Number
- CN202511423752.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-30
- Publication Date
- 2026-01-20
AI Technical Summary
With low modification costs, low maintenance costs, and low operating costs, temporary vehicles at independent monitoring points suffer from a lack of key data, making it difficult to form a complete historical trajectory of the vehicles.
By configuring virtual detection lines with cameras within the factory area, obtaining road vector data based on a high-precision electronic map, and using the YOLOv8 target detection algorithm and BoT-SORT tracking algorithm to detect and track vehicles, generating historical vehicle trajectories, and reproducing the historical vehicle trajectories within the factory area using a path interpolation algorithm.
It enables the reproduction of vehicle historical trajectories at low cost, improves traffic safety in the factory area, avoids additional equipment investment and manual intervention, and reduces operational risks.
Smart Images

Figure CN121366490A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent transportation, and in particular to a vehicle trajectory generation method and device based on a camera, equipment and a medium. BACKGROUND
[0002] A dense monitoring network is generally deployed in a manufacturing plant, covering most of the traffic roads and workshops in the plant, but there are few cameras for vehicle snapshot and speed measurement, and only a few traffic cameras are installed at traffic intersections. Therefore, there is a significant monitoring efficiency bottleneck and application contradiction, which is particularly prominent when dealing with high-frequency dynamic traffic flow.
[0003] The proportion of daily temporary vehicles (including logistics trucks, visitor vehicles and third-party service vehicles) in a large plant is as high as 52.3%. These vehicles lack pre-registration information and become a management blind spot. The traditional solution faces a double dilemma. If a dedicated snapshot camera is added to cover the main road and secondary road, the cost of single-point comprehensive transformation is high, and building a traffic network in the whole plant requires a large investment. If a temporary GPS locator is used for management, it not only requires a dedicated person to register, recover and collect data, but also affects the vehicle access time, aggravates the congestion during peak hours, and there are risks such as device loss and coverage blind area.
[0004] In the case of low transformation cost, low maintenance cost and low operation cost, temporary vehicles have a problem of missing key data under independent monitoring points, and it is difficult to form a complete vehicle historical trajectory. SUMMARY
[0005] Therefore, it is necessary to provide a vehicle trajectory generation method, device, equipment and medium based on a camera to solve the technical problem of missing key data of temporary vehicles under independent monitoring points in the case of low transformation cost, low maintenance cost and low operation cost.
[0006] To solve the above problems, in a first aspect, the present application provides a vehicle trajectory generation method based on a camera, comprising: Obtaining road vector data in the plant according to a high-precision electronic map, configuring a virtual detection line of a camera in the plant based on the road vector data, and determining configuration data of the virtual detection line; Obtaining video data of a vehicle passing through the plant based on the camera in the plant configured with the virtual detection line, detecting and tracking the vehicle based on the video data to determine the tracked vehicle and data of the tracked vehicle; determine a valid trigger event and a time and a coordinate of the valid trigger event based on the configuration data of the virtual detection line and the data of the tracked vehicle, wherein the trigger event is the valid trigger event when the rectangular identification frame of the tracked vehicle first intersects with the virtual detection line and the length of the intersection is greater than a set threshold value; generate a vehicle historical trajectory based on the time and the coordinate of the valid trigger event.
[0007] In a possible implementation, the road vector data includes a lane in a factory area, a lane direction, a lane width, and a lane topological relationship.
[0008] In a possible implementation, the configuration data of the virtual detection line includes an ID of the virtual detection line, a camera number corresponding to the virtual detection line, geographical coordinate information corresponding to the virtual detection line at the time of event triggering, start point and end point coordinates of the virtual detection line, and end point coordinates of the virtual detection line.
[0009] In a possible implementation, the detecting and tracking the vehicle based on the video data to determine the tracked vehicle and the data of the tracked vehicle include: decoding the video data; detecting a target in the decoded video data by using a YOLOv8 target detection algorithm to determine the tracked vehicle and a rectangular identification frame of the tracked vehicle; tracking the tracked vehicle by using a BoT-SORT tracking algorithm to obtain the data of the tracked vehicle, wherein the data of the tracked vehicle includes a vehicle ID, position information of the vehicle, and a state relationship between the vehicle and the virtual detection line.
[0010] In a possible implementation, the detecting and tracking the vehicle based on the video data to determine the tracked vehicle and the data of the tracked vehicle further include: detecting the tracked vehicle by using the YOLOv8 target detection algorithm to obtain a license plate region, and identifying the license plate region by using a PaddleOCR algorithm to obtain license plate information.
[0011] In a possible implementation, the set threshold value is two-thirds of the rectangular identification frame of the vehicle.
[0012] In a possible implementation, the generating the vehicle historical trajectory based on the time and the coordinate of the valid trigger event includes: obtaining a time and a coordinate of a plurality of valid trigger events, and calculating a time difference value and a spatial distance of the plurality of valid trigger events based on the time and the coordinate; determining an average driving speed of the tracked vehicle based on the time difference value and the spatial distance; Based on the time, coordinates and average driving speed, a path interpolation algorithm is used to generate a vehicle historical trajectory.
[0013] In a second aspect, the present application further provides a camera-based vehicle trajectory generation device, comprising: A virtual detection line configuration module is configured to obtain road vector data in a factory area according to a high-precision electronic map, configure virtual detection lines of cameras in the factory area based on the road vector data, and determine configuration data of the virtual detection lines. A detection and tracking module is configured to obtain video data of vehicles passing through the factory area based on the cameras in the factory area configured with the virtual detection lines, detect and track the vehicles based on the video data, and determine tracked vehicles and data of the tracked vehicles. An event triggering judgment module is configured to judge triggering events of the virtual detection lines based on the configuration data of the virtual detection lines and the data of the tracked vehicles, and determine effective triggering events, time and coordinates of the effective triggering events, wherein the triggering event is an effective triggering event when a rectangular identification frame of the tracked vehicle first intersects with the virtual detection line and the length of the intersection is greater than a set threshold. A vehicle historical trajectory generation module is configured to generate a vehicle historical trajectory based on the time and coordinates of the effective triggering events.
[0014] In a third aspect, the present application further provides an electronic device, comprising a processor and a memory. The memory stores a computer readable program that can be executed by the processor. The processor executes the computer readable program to implement the steps of the camera-based vehicle trajectory generation method described above.
[0015] In a fourth aspect, the present application further provides a computer readable storage medium for storing computer readable programs or instructions, which can implement the steps of the camera-based vehicle trajectory generation method described in any one of the above methods when executed by a processor.
[0016] The beneficial effects of the present application are: based on the camera in the factory area configured with a virtual detection line to obtain video data of the vehicle passing through the factory area, based on the video data to detect and track the vehicle, to determine the tracked vehicle and the data of the tracked vehicle; based on the configuration data of the virtual detection line and the data of the tracked vehicle to judge the triggering event of the virtual detection line, when the intersection length of the rectangular identification box of the tracked vehicle and the virtual detection line is greater than the set threshold, the triggering event is an effective triggering event, and the time and coordinates of the effective triggering event are determined; based on the time and coordinates of the effective triggering event to generate the vehicle historical trajectory, through the camera in the factory area configured with the virtual detection line to detect and track the vehicle, the vehicle trajectory is discretized into the triggering event of the virtual detection line, solves the key data missing problem of the temporary vehicle under the independent monitoring point, and reproduces the historical trajectory of the vehicle in the factory area, improves the traffic safety of the factory area. BRIEF DESCRIPTION OF DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0018] Figure 1 An embodiment flow chart of the vehicle trajectory generation method based on the camera provided by the present application is provided. Figure 2 A virtual detection line division schematic diagram of the vehicle trajectory generation method based on the camera provided by the present application is provided. Figure 3 A vehicle tracking effect schematic diagram of the vehicle trajectory generation method based on the camera provided by the present application is provided. Figure 4 A structure schematic diagram of an embodiment of the vehicle trajectory generation device based on the camera provided by the present application is provided. Figure 5 A structure schematic diagram of an embodiment of the electronic device provided by the present application is provided. DETAILED DESCRIPTION
[0019] The preferred embodiments of the present application will be specifically described below in combination with the drawings, wherein the drawings constitute a part of the present application, and are used to illustrate the principles of the embodiments of the present application, and are not used to limit the scope of the present application.
[0020] Reference to an "embodiment" in this document means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are they necessarily mutually exclusive of one another. As will be apparent to those of ordinary skill in the art, embodiments described herein can be combined with other embodiments.
[0021] The application discloses a camera-based vehicle trajectory generation method, device, equipment and medium, which can be used in a computer. The method, device or computer readable storage medium involved in the application can be integrated with the above-mentioned equipment or be relatively independent.
[0022] One specific embodiment of the application discloses a camera-based vehicle trajectory generation method, which can be executed by a computer, and specifically can be executed by one or more processors of the computer. As shown in Figure 1 The camera-based vehicle trajectory generation method comprises the following steps: S101, obtaining road vector data in a factory area according to a high-precision electronic map, configuring a virtual detection line of a camera in the factory area based on the road vector data, and determining configuration data of the virtual detection line; It should be noted that by configuring the virtual detection line of the camera in the factory area, the latitude and longitude of the corresponding road network and the factory area coordinates of the vehicle can be obtained when each segment of the virtual detection line triggers the vehicle to pass through.
[0023] S102, obtaining video data of a vehicle passing through the factory area based on the camera in the factory area configured with the virtual detection line, detecting and tracking the vehicle based on the video data, to determine a tracked vehicle and data of the tracked vehicle; It should be noted that by detecting and tracking the vehicle based on the video data, the vehicle information in the monitoring picture can be obtained.
[0024] S103, judging a triggering event of the virtual detection line based on the configuration data of the virtual detection line and the data of the tracked vehicle, to determine an effective triggering event and time and coordinates of the effective triggering event, wherein when a rectangular identification frame of the tracked vehicle first intersects with the virtual detection line and the intersection length is greater than a set threshold, the triggering event is the effective triggering event; It should be noted that by judging the triggering event, the coordinates and time of the vehicle in different monitoring pictures can be determined. S104, generating a historical trajectory of the vehicle based on the time and coordinates of the effective triggering event.
[0025] It should be noted that, by using the plant road camera and high-precision electronic map, a virtual detection line (VDL) is configured in the camera, the vehicle detection and tracking are performed by the camera in the plant with the configured virtual detection line, the vehicle trajectory is discretized into trigger events of the virtual detection line, the key data missing problem of the temporary vehicle under the independent monitoring point is solved, the historical trajectory of the temporary vehicle in the plant is reproduced, and the plant traffic safety is improved.
[0026] In some embodiments, in step S101, road vector data in the plant is obtained according to a high-precision electronic map, a virtual detection line of a camera in the plant is configured based on the road vector data, a virtual detection line division schematic diagram is shown in Figure 2 , and configuration data of the virtual detection line is determined. The high-precision electronic map of the plant is processed to extract road vector data, the road vector data includes lanes, lane directions, lane widths, and lane topological relationships in the plant, and specific lanes are divided to form a traffic road network special map including lane directions, widths, and topological relationships. Suitable cameras in the plant are selected to form an identification camera network, specifically, existing road monitoring cameras in the plant are screened, the cameras can clearly capture vehicle passing pictures, and cameras with moderate installation height and no serious obstructions are preferentially considered, that is, cameras covering key road nodes and having good visual angles are selected to form the identification camera network. VDL virtual detection lines are configured on each identification camera, the VDLs are segmented according to lanes, and virtual detection lines perpendicular to the lanes are drawn in the monitoring pictures of each selected camera. According to the road vector data, the spatial calibration function of the electronic map can be used to calculate the accurate geographic coordinates (including latitude and longitude and plant plane coordinates) corresponding to each VDL in the camera monitoring picture when the vehicle triggers. The configuration data of the virtual detection line includes the ID of the virtual detection line, the camera number corresponding to the virtual detection line, the geographic coordinate information corresponding to the event trigger, the start and end point coordinates of the virtual detection line, and the end point coordinates of the virtual detection line.
[0027] In some embodiments, in step S102, based on the factory camera configured with the virtual detection line, the video data of the vehicle passing through the factory is obtained, the vehicle is detected and tracked based on the video data to determine the tracked vehicle and the data of the tracked vehicle; the VDL configuration data is loaded in the camera group, and at the same time, the video data of the vehicle passing through the factory obtained by all selected cameras is decoded in real time, that is, the video data is decoded, the YOLOv8 target detection algorithm is used to detect the vehicle in the decoded video data to determine the tracked vehicle and the rectangular identification frame of the tracked vehicle, the BoT-SORT tracking algorithm is used to track the tracked vehicle to obtain the data of the tracked vehicle, wherein the data of the tracked vehicle includes vehicle ID, vehicle position information, and state relationship between the vehicle and the virtual detection line; the YOLOv8 target detection algorithm is used to cooperate with the BoT-SORT tracking algorithm to identify the vehicle target in the picture frame by frame, that is, the tracked vehicle, and the vehicle tracking effect diagram is shown in Figure 3 An independent tracking object is created for each detected vehicle, and the picture position coordinates, unique tracking ID, and state relationship between the tracked vehicle and each VDL (whether triggered) are continuously recorded, and the license plate recognition state is initialized. After recognizing the tracked vehicle, the YOLOv8 target detection algorithm is used to detect the tracked vehicle to obtain the license plate region, and the PaddleOCR algorithm is used to recognize the license plate region to obtain the license plate information, that is, the license plate region in the picture is located by the YOLOv8, and then the PaddleOCR algorithm is used to recognize the specific license plate number, so that all license plate information in the monitoring picture can be obtained. The license plate information includes license plate recognition text, upper left corner coordinates of the license plate region, and lower right corner coordinates of the license plate region.
[0028] In some embodiments, in step S103, based on the configuration data of the virtual detection line and the data of the tracked vehicle, the triggering event of the virtual detection line is judged to determine the effective triggering event and the time and coordinates of the effective triggering event. The rectangular identification frame of the tracked vehicle and the license plate region are identified according to the configuration data of the virtual detection line and the data of the tracked vehicle, the rectangular identification frame of the tracked vehicle is the tracked vehicle region, the identified license plate region is compared with the tracked vehicle region in space, when it is determined that the license plate belongs to a specific vehicle, the license plate number is bound to the corresponding vehicle object, and the spatial interaction between the tracked vehicle and the VDL is continuously detected, when the intersection length between the rectangular identification frame of the tracked vehicle and the VDL segment exceeds two-thirds of the rectangular identification frame of the tracked vehicle, and the rectangular identification frame of the tracked vehicle first intersects with the virtual detection line, that is, before that, the rectangular identification frame of the tracked vehicle first contacts with the intersecting virtual detection line, it is determined as an effective triggering event, and the triggering time, VDL number and corresponding geographical coordinate point, vehicle ID are recorded and stored in the VDL triggering record of the effective triggering event.
[0029] In some embodiments, in step S104, the vehicle historical trajectory is generated based on the time and coordinates of the effective triggering event, the time and coordinates of multiple effective triggering events are obtained, the time difference value and the spatial distance of the multiple effective triggering events are calculated based on the time and coordinates, the average driving speed of the tracking vehicle is determined based on the time difference value and the spatial distance, the vehicle historical trajectory is generated by using a path interpolation algorithm based on the time, coordinates and average driving speed, and when the tracking vehicle disappears in the picture of the video data for three seconds, the tracking vehicle is processed, it is judged whether the tracking vehicle has a license plate, if the license plate is successfully recognized, the VDL triggering record of the effective triggering event is read, when there is only a single effective triggering event in the record, the license plate information, triggering point coordinates and time stamp are stored in the historical point database, if there are multiple triggering records (not less than twice), the time difference value and the spatial distance of the continuous triggering events are calculated, the average driving speed of the vehicle is calculated, the complete data packet (containing the license plate, coordinates, time and speed value) is written into the database, and finally the continuous vehicle historical trajectory with speed information is generated on the electronic map by using the path interpolation algorithm based on the space-time nodes stored in the historical point database and in combination with the lane topological relationship of the traffic network.
[0030] By multiplexing the ordinary camera in the factory area, the cost of purchasing and positioning terminal distribution of special snapshot equipment is eliminated, the vehicle position calibration error is less than or equal to 0.5 m through the spatial mapping of the virtual detection line VDL and the high-precision map, the factory operation safety control requirements are met, and through the "software defined hardware + data driven decision", the factory vehicle supervision is upgraded from passive recording to active perception under the premise of ensuring "zero equipment investment, zero manual intervention and zero privacy risk", the factory traffic safety is improved in a low-cost and intelligent manner.
[0031] In summary, the vehicle trajectory generation method based on the camera provided by the application obtains road vector data in the factory area according to a high-precision electronic map, configures a virtual detection line of the camera in the factory area based on the road vector data, and determines configuration data of the virtual detection line; video data of a vehicle passing through the factory area is obtained based on the camera in the factory area configured with the virtual detection line, the vehicle is detected and tracked based on the video data to determine the tracking vehicle and data of the tracking vehicle; the triggering event of the virtual detection line is judged based on the configuration data of the virtual detection line and the data of the tracking vehicle to determine the effective triggering event and the time and coordinates of the effective triggering event, wherein when the rectangular recognition box of the tracking vehicle first intersects with the virtual detection line and the intersection length is greater than a set threshold, the triggering event is the effective triggering event; the vehicle historical trajectory is generated based on the time and coordinates of the effective triggering event, and the historical trajectory of the vehicle in the factory area is reproduced.
[0032] In order to better implement the vehicle trajectory generation method based on the camera in the embodiments of the application, on the basis of the vehicle trajectory generation method based on the camera, correspondingly,Figure 4 As shown, the embodiment of the present application also provides a camera-based vehicle trajectory generation device, the camera-based vehicle trajectory generation device 400 comprises: a virtual detection line configuration module 401, configured to acquire road vector data in a factory area according to a high-precision electronic map, configure virtual detection lines of cameras in the factory area based on the road vector data, and determine configuration data of the virtual detection lines; a detection and tracking module 402, configured to acquire video data of a vehicle passing through the factory area based on the cameras in the factory area configured with the virtual detection lines, detect and track the vehicle based on the video data, and determine a tracked vehicle and data of the tracked vehicle; an event triggering judgment module 403, configured to judge triggering events of the virtual detection lines based on the configuration data of the virtual detection lines and the data of the tracked vehicle, and determine effective triggering events, time and coordinates of the effective triggering events, wherein when a rectangular identification frame of the tracked vehicle first intersects with the virtual detection lines and an intersection length is greater than a set threshold, the triggering event is the effective triggering event; a vehicle historical trajectory generation module 404, configured to generate a vehicle historical trajectory based on the time and the coordinates of the effective triggering events.
[0033] As shown in the accompanying drawings, Figure 5 The present application also correspondingly provides an electronic device 500, which can be a mobile terminal, a desktop computer, a notebook computer, a palm computer, a server and other computing devices. The electronic device 500 comprises a processor 501, a memory 502 and a display 503. Figure 5 Only part of the components of the electronic device 500 are shown, but it should be understood that all the shown components are not required, and more or less components can be alternatively implemented.
[0034] The memory 502 can be an internal storage unit of the electronic device 500, such as a hard disk or a memory of the electronic device 500 in some embodiments. The memory 502 can also be an external storage device of the electronic device 500, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, and the like, in other embodiments. Further, the memory 502 can include both an internal storage unit and an external storage device of the electronic device 500. The memory 502 is configured to store application software and various data installed in the electronic device 500, such as program codes installed in the electronic device 500. The memory 502 can also be configured to temporarily store data that has been output or is to be output. In an embodiment, the memory 502 stores a camera-based vehicle trajectory generation program that can be executed by the processor 501 to implement the camera-based vehicle trajectory generation method of the embodiments of the present application.
[0035] The processor 501 can be a Central Processing Unit (CPU), a microprocessor, or other data processing chip in some embodiments, and is configured to execute program codes or process data stored in the memory 502, such as the camera-based vehicle trajectory generation method.
[0036] The display 503 can be an LED display, a liquid crystal display, a touch liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, and the like in some embodiments. The display 503 is configured to display identification information of the camera-based vehicle trajectory generation program and to display a visualized user interface. The components 501-503 of the electronic device 500 communicate with each other through a system bus.
[0037] In some embodiments, the processor 501 implements each step of the camera-based vehicle trajectory generation method as described in the above embodiments when executing the camera-based vehicle trajectory generation program in the memory 502. Since the camera-based vehicle trajectory generation method has been described in detail above, no further description is provided here.
[0038] Accordingly, the present application also provides a computer-readable storage medium for storing computer-readable programs or instructions that can implement the steps or functions of the camera-based vehicle trajectory generation method provided by the method embodiments when executed by a processor.
[0039] Those skilled in the art can understand that all or part of the processes of the above-mentioned embodiment methods can be completed by instructing the relevant hardware by a computer program, and the program can be stored in a computer readable storage medium. The computer readable storage medium is a disk, an optical disk, a read-only memory, a random access memory, etc.
[0040] The above description is merely preferred specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered within the protection scope of the present application.
Claims
1. A camera-based vehicle trajectory generation method, characterized in that, The method comprises the following steps: acquiring road vector data in the factory area according to a high-precision electronic map, configuring a virtual detection line of a camera in the factory area based on the road vector data, and determining configuration data of the virtual detection line; acquiring video data of a vehicle passing through the factory area based on the camera in the factory area configured with the virtual detection line, detecting and tracking the vehicle based on the video data to determine a tracked vehicle and data of the tracked vehicle; judging a triggering event of the virtual detection line based on the configuration data of the virtual detection line and the data of the tracked vehicle to determine an effective triggering event and time and coordinates of the effective triggering event, wherein the triggering event is the effective triggering event when a rectangular identification frame of the tracked vehicle first intersects with the virtual detection line and the length of the intersection is greater than a set threshold value; generating a vehicle historical trajectory based on the time and coordinates of the effective triggering event. 2.The camera-based vehicle trajectory generation method of claim 1, wherein, The road vector data comprises a lane in the factory area, a lane direction, a lane width, and a lane topological relationship. 3.The camera-based vehicle trajectory generation method of claim 1, wherein, The configuration data of the virtual detection line comprises an ID of the virtual detection line, a camera number corresponding to the virtual detection line, geographical coordinate information corresponding to the virtual detection line when an event is triggered, start point and end point coordinates of the virtual detection line, and terminal point and end point coordinates. 4.The camera-based vehicle trajectory generation method of claim 1, wherein, The detecting and tracking the vehicle based on the video data to determine the tracked vehicle and the data of the tracked vehicle comprises the following steps: decoding the video data; detecting a vehicle in the decoded video data by using a YOLOv8 target detection algorithm to determine the tracked vehicle and a rectangular identification frame of the tracked vehicle; tracking the tracked vehicle by using a BoT-SORT tracking algorithm to obtain the data of the tracked vehicle, wherein the data of the tracked vehicle comprises a vehicle ID, position information of the vehicle, and a state relationship between the vehicle and the virtual detection line.
5. The camera-based vehicle trajectory generation method of claim 4, wherein, The detecting and tracking the vehicle based on the video data to determine the tracked vehicle and the data of the tracked vehicle further comprises the following steps: detecting the tracked vehicle by using the YOLOv8 target detection algorithm to obtain a license plate region, and identifying the license plate region by using a PaddleOCR algorithm to obtain license plate information. 6.The camera-based vehicle trajectory generation method of claim 5, wherein, The set threshold value is two-thirds of the rectangular identification frame of the vehicle.
7. The camera-based vehicle trajectory generation method of claim 6, wherein, The generating the vehicle historical trajectory based on the time and coordinates of the effective triggering event comprises the following steps: acquiring time and coordinates of multiple effective triggering events, calculating time difference values and spatial distances of the multiple effective triggering events based on the time and coordinates; determining an average driving speed of the tracked vehicle based on the time difference values and the spatial distances; generating the vehicle historical trajectory by using a path interpolation algorithm based on the time, coordinates, and average driving speed. 8.A camera-based vehicle trajectory generation device, characterized by, The method comprises the following steps: a virtual detection line configuration module is configured to acquire road vector data in the factory area according to a high-precision electronic map, configure a virtual detection line of a camera in the factory area based on the road vector data, and determine configuration data of the virtual detection line; a detection and tracking module is configured to acquire video data of a vehicle passing through the factory area based on the camera in the factory area configured with the virtual detection line, detect and track the vehicle based on the video data to determine a tracked vehicle and data of the tracked vehicle; An event triggering judgment module is configured to judge a triggering event of the virtual detection line based on configuration data of the virtual detection line and data of the tracked vehicle, so as to determine an effective triggering event and a time and coordinates of the effective triggering event, wherein the triggering event is the effective triggering event when a rectangular identification frame of the tracked vehicle first intersects with the virtual detection line and a length of the intersection is greater than a set threshold value; A vehicle historical trajectory generation module is configured to generate a vehicle historical trajectory based on the time and coordinates of the effective triggering event.
9. An electronic device, comprising: comprising a memory and a processor; the memory stores a computer readable program which can be executed by the processor; the processor executes the computer readable program to implement the steps in the camera-based vehicle trajectory generation method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, a program or instruction which can be read by a computer, and the program or instruction can be executed by a processor to implement the steps in the camera-based vehicle trajectory generation method according to any one of claims 1-7.
Citation Information
Patent Citations
Vehicle detection tracking method, device and equipment based on quasi real-time digital twinborn display
CN114639032A
Vehicle tracking and license plate recognition joint detection method based on improved YOLOv8
CN116740124A
Traffic flow video analysis method and system based on computer visual identification
CN119693847A
Cross-lens tracking identification method and device for vehicle, equipment and storage medium
CN119992124A
Logistics park vehicle tracking and flow counting method and device, equipment and storage medium
CN120047906A