Traffic data processing method, device and equipment
The image recognition algorithm automatically identifies traffic data and associates it with the electronic map, which solves the problem of manual annotation in the existing technology that consumes a lot of human resources, and achieves efficient automated processing of traffic data and fine classification of flow data.
Patent Information
- Application Number
- CN201910245115.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-03-28
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2039-03-28
AI Technical Summary
Existing solutions for configuring traffic data in electronic maps require a lot of manual annotation and association, which consumes a lot of human resources.
The image recognition algorithm is used to identify traffic images to obtain traffic data, and the geographical coordinates are determined based on the pre-obtained coordinate mapping relationship, and the traffic data are automatically associated with the electronic map.
It realizes automatic identification and association of traffic data, saves human resources, improves data processing efficiency, and can more precisely divide traffic flow data to the lane level.
Smart Images

Figure CN111753815B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of video surveillance, and in particular to a method, device and equipment for processing traffic data. Background Art
[0002] At present, the data in electronic maps is becoming more and more abundant, and some electronic maps can display various traffic data. Traffic data can include static traffic data, such as traffic lights, road signs, or various traffic signs: lane lines, vehicle guide lines, lane boundary lines, etc.; traffic data can also include dynamic traffic data, such as traffic flow, exclusion length, and some abnormal traffic events.
[0003] The scheme for configuring traffic data in electronic maps generally includes: image acquisition equipment collects traffic images for traffic scenes, relevant personnel manually annotate various traffic data in the traffic images, and associate the manual annotation results with the electronic map. In this scheme, manual annotation and manual association of traffic images with electronic maps are required, which consumes a lot of human resources. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a traffic data processing method, device and equipment to save manpower.
[0005] To achieve the above object, an embodiment of the present invention provides a traffic data processing method, comprising:
[0006] Using an image recognition algorithm to recognize the traffic image, and obtaining traffic data in the traffic image;
[0007] Determine the geographic coordinates of the object to which the traffic data belongs according to the pre-acquired coordinate mapping relationship;
[0008] The traffic data is associated with an electronic map according to the geographic coordinates.
[0009] Optionally, the identifying the traffic image by using an image recognition algorithm to obtain traffic data in the traffic image includes:
[0010] The traffic targets in the traffic image are identified by using an image recognition algorithm to obtain attribute information of the traffic targets, wherein the traffic targets include any one or more of the following: traffic sign lines, signal lights, and road signs.
[0011] Optionally, the using an image recognition algorithm to recognize the traffic image to obtain traffic data in the traffic image includes:
[0012] Using image recognition algorithms, traffic flow data in traffic images is counted;
[0013] And / or, using an image recognition algorithm, determine whether there is a traffic event in the traffic image, and obtain traffic data including the determination result.
[0014] Optionally, determining the geographic coordinates of the object to which the traffic data belongs according to the pre-acquired coordinate mapping relationship includes:
[0015] According to the mapping relationship between the image coordinates and the geographic coordinates acquired in advance, the image coordinates of the object to which the traffic data belongs in the traffic image are converted into the geographic coordinates of the object to which the traffic data belongs.
[0016] Optionally, determining the geographic coordinates of the object to which the traffic data belongs according to the pre-acquired coordinate mapping relationship includes:
[0017] Obtaining the camera coordinates when the camera photographs the traffic image;
[0018] According to the pre-acquired mapping relationship between the camera coordinates and the geographic coordinates, the camera coordinates are converted into the geographic coordinates of the object to which the traffic data belongs.
[0019] Optionally, the camera coordinates include: horizontal angle coordinates and vertical angle coordinates; and the converting of the camera coordinates into the geographic coordinates of the object to which the traffic data belongs according to the mapping relationship between the camera coordinates and the geographic coordinates acquired in advance includes:
[0020] Based on the horizontal angle coordinate, determining the horizontal angle between the object to which the traffic data belongs and the specified direction;
[0021] Calculate the horizontal distance between the object to which the traffic data belongs and the camera based on the vertical angle coordinate and the height of the camera;
[0022] Calculate the distance in the longitude direction and the distance in the latitude direction between the object to which the traffic data belongs and the camera by trigonometric function according to the horizontal angle and the horizontal distance;
[0023] The geographic coordinates of the object to which the traffic data belongs are calculated based on the longitude and latitude of the camera and the distance in the longitude direction and the distance in the latitude direction.
[0024] Optionally, associating the traffic data with an electronic map according to the geographic coordinates includes:
[0025] For each piece of traffic data, determine the layer corresponding to the piece of traffic data;
[0026] Determine, in the electronic map, a display location corresponding to the traffic data according to the geographic coordinates of the object to which the traffic data belongs;
[0027] Based on the display strategy corresponding to the layer, the traffic data is displayed at the determined display position.
[0028] To achieve the above object, an embodiment of the present invention further provides a traffic data processing device, comprising:
[0029] A recognition module, used to recognize the traffic image using an image recognition algorithm to obtain traffic data in the traffic image;
[0030] A determination module, used to determine the geographic coordinates of the object to which the traffic data belongs according to a pre-acquired coordinate mapping relationship;
[0031] The association module is used to associate the traffic data with an electronic map according to the geographic coordinates.
[0032] Optionally, the identification module is specifically used to:
[0033] The traffic targets in the traffic image are identified by using an image recognition algorithm to obtain attribute information of the traffic targets, wherein the traffic targets include any one or more of the following: traffic sign lines, signal lights, and road signs.
[0034] Optionally, the identification module is specifically used to:
[0035] Using image recognition algorithms, traffic flow data in traffic images is counted;
[0036] And / or, using an image recognition algorithm, determine whether there is a traffic event in the traffic image, and obtain traffic data including the determination result.
[0037] Optionally, the determining module is specifically used to:
[0038] According to the mapping relationship between the image coordinates and the geographic coordinates acquired in advance, the image coordinates of the object to which the traffic data belongs in the traffic image are converted into the geographic coordinates of the object to which the traffic data belongs.
[0039] Optionally, the determining module includes:
[0040] An acquisition submodule, used to acquire the camera coordinates when the camera takes the traffic image;
[0041] The conversion submodule is used to convert the camera coordinates into the geographic coordinates of the object to which the traffic data belongs according to the mapping relationship between the camera coordinates and the geographic coordinates acquired in advance.
[0042] Optionally, the camera coordinates include: horizontal angle coordinates and vertical angle coordinates; the conversion submodule is specifically used for:
[0043] Based on the horizontal angle coordinate, determining the horizontal angle between the object to which the traffic data belongs and the specified direction;
[0044] Calculate the horizontal distance between the object to which the traffic data belongs and the camera based on the vertical angle coordinate and the height of the camera;
[0045] Calculate the distance in the longitude direction and the distance in the latitude direction between the object to which the traffic data belongs and the camera by trigonometric function according to the horizontal angle and the horizontal distance;
[0046] The geographic coordinates of the object to which the traffic data belongs are calculated based on the longitude and latitude of the camera and the distance in the longitude direction and the distance in the latitude direction.
[0047] Optionally, the association module is specifically used to:
[0048] For each piece of traffic data, determine the layer corresponding to the piece of traffic data;
[0049] Determine, in the electronic map, a display location corresponding to the traffic data according to the geographic coordinates of the object to which the traffic data belongs;
[0050] Based on the display strategy corresponding to the layer, the traffic data is displayed at the determined display position.
[0051] To achieve the above object, an embodiment of the present invention further provides an electronic device, including a processor and a memory;
[0052] Memory, used to store computer programs;
[0053] The processor is used to implement any of the above-mentioned traffic data processing methods when executing the program stored in the memory.
[0054] To achieve the above objectives, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any of the above traffic data processing methods is implemented.
[0055] By applying the embodiment shown in the present invention, the traffic image is identified by using an image recognition algorithm to obtain traffic data in the traffic image; the geographic coordinates of the object to which the traffic data belongs are determined based on the pre-acquired coordinate mapping relationship; the traffic data is associated with the electronic map based on the geographic coordinates; it can be seen that this solution realizes the automatic identification of traffic data using an algorithm, and automatically associates the traffic data with the electronic map based on the mapping relationship, thereby saving manpower. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0057] Figure 1 A flow chart of a traffic data processing method provided by an embodiment of the present invention;
[0058] Figure 2 A schematic diagram of vertical coordinate conversion in an embodiment of the present invention;
[0059] Figure 3 Schematic diagram of horizontal coordinate conversion in an embodiment of the present invention;
[0060] Figure 4 A schematic diagram of the structure of a traffic data processing device provided by an embodiment of the present invention;
[0061] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0062] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0063] In order to solve the above technical problems, the embodiments of the present invention provide a traffic data processing method, device and equipment, which can be applied to cameras, or can also be applied to other electronic devices, such as mobile phones, computers, etc., without specific limitation. The traffic data processing method provided by the embodiments of the present invention is first introduced in detail.
[0064] Figure 1 A flow chart of a traffic data processing method provided by an embodiment of the present invention includes:
[0065] S101: Using an image recognition algorithm to recognize a traffic image to obtain traffic data in the traffic image.
[0066] For example, if the execution subject is a camera, the camera can collect images of traffic scenes to obtain traffic images; if the execution subject is another electronic device, the electronic device can obtain the traffic images collected by the camera. The traffic images may include roads, traffic signs, traffic lights, vehicles, etc.
[0067] In one implementation, the traffic data identified in S101 may include static traffic data, which is data related to some static traffic targets. Static traffic targets may include traffic lights, road signs, or various traffic marking lines: lane lines, vehicle guide lines, lane boundary lines, etc. The data related to static traffic targets may include attribute information of these traffic targets, for example, what these traffic targets are specifically, such as traffic lights, lane lines, vehicle guide lines, lane boundary lines, etc.
[0068] In this implementation, S101 may include: using an image recognition algorithm to identify traffic targets in a traffic image to obtain attribute information of the traffic targets, wherein the traffic targets include any one or more of the following: traffic sign lines, signal lights, and road signs.
[0069] For example, if a traffic image includes traffic signs, the traffic signs are generally white or yellow lines on a black road, and the traffic signs have a specific shape, such as a rectangle or an arrow shape. Therefore, the traffic signs can be identified in the image based on color features or shape features. For another example, if a traffic image includes a traffic light, the shape of the traffic light is generally fixed, so the traffic light can be identified in the image based on the shape features of the traffic light. For another example, if a traffic image includes traffic targets such as road signs and roadblocks, the shapes of these traffic targets are generally fixed, so these traffic targets can be identified in the image based on their shape features.
[0070] The image recognition algorithm used in this embodiment may be an image recognition algorithm based on deep learning, which makes the recognition effect more accurate, or other image recognition algorithms may be used, without specific limitation.
[0071] In another implementation, the traffic data identified in S101 may include dynamic traffic data, which may include traffic flow data, such as vehicle flow, or queue length, etc., and may also include whether a traffic event occurs, such as vehicle congestion, traffic accidents, etc.
[0072] In this implementation, S101 may include: using an image recognition algorithm to count traffic flow data in a traffic image; and / or using an image recognition algorithm to determine whether there is a traffic event in the traffic image, and obtaining traffic data including the determination result.
[0073] For example, traffic flow data may be the traffic flow at a checkpoint, road intersection or other location, or the length of a vehicle queue. A traffic image may be a video image, and an image recognition algorithm may be used to count the traffic flow in a video image as traffic flow data. Alternatively, the number or length of vehicles queuing at an intersection may be counted in real time using only a single traffic image as traffic flow data.
[0074] As another example, traffic flow data may include the judgment result of whether there are traffic events in traffic images. For example, various traffic event recognition models can be trained in advance through deep learning-based image recognition algorithms, and the recognition models can be used to judge whether there are traffic events such as vehicle congestion and traffic accidents in traffic images, and the judgment results can be used as traffic data.
[0075] S102: Determine the geographic coordinates of the object to which the traffic data belongs according to the pre-acquired coordinate mapping relationship.
[0076] In one implementation, the image coordinates may be converted into geographic coordinates. Specifically, S102 may include: converting the image coordinates of the object to which the traffic data belongs in the traffic image into geographic coordinates of the object to which the traffic data belongs according to a mapping relationship between the image coordinates and the geographic coordinates acquired in advance.
[0077] In this embodiment, the mapping relationship between the image coordinate system and the geographic coordinate system of the traffic image can be pre-calibrated, that is, the mapping relationship between the image coordinates and the geographic coordinates. The position of the camera is generally fixed, and the traffic scene targeted by the camera is generally fixed. Multiple calibration points can be selected in the traffic scene, and the mapping relationship can be solved based on the geographic coordinates of the calibration points in the traffic scene and the image coordinates of the calibration points in the traffic image.
[0078] Then, the image coordinates corresponding to the traffic data obtained in S101 can be converted into geographic coordinates according to the mapping relationship. For example, if the traffic data is static traffic data, such as attribute information of a traffic target, the object to which the traffic data belongs is the traffic target, and the image coordinates of the object to which the traffic data belongs in the traffic image are the image coordinates of the traffic target in the traffic image.
[0079] If the traffic data is dynamic traffic data, such as traffic flow data, the object to which the traffic data belongs may be the checkpoint, intersection, or other location targeted by the traffic flow data. For another example, if the traffic data includes a judgment result of whether a traffic incident exists in a traffic image, the object to which the traffic data belongs may be the location where the traffic incident occurs.
[0080] In another implementation, the camera coordinates may be converted into geographic coordinates. Specifically, S102 may include: obtaining the camera coordinates when the camera captures the traffic image; and converting the camera coordinates into the geographic coordinates of the object to which the traffic data belongs according to a mapping relationship between the camera coordinates and the geographic coordinates obtained in advance.
[0081] For example, the camera coordinates may include: horizontal angle coordinates and vertical angle coordinates, and the specific conversion process may include:
[0082] 1. Based on the horizontal angle coordinates, determine the horizontal angle between the object to which the traffic data belongs and the specified direction.
[0083] For example, if the camera is a ball camera, the horizontal angle coordinate is the P coordinate when the ball camera takes the above traffic image. For the convenience of description, the P coordinate is called the first P coordinate. Through the electronic compass of the ball camera, the P coordinate of the ball camera when the ball camera points to the specified direction can be obtained. For the convenience of description, the P coordinate is called the second P coordinate. The difference between the first P coordinate and the second P coordinate is calculated as the horizontal angle between the object to which the traffic data belongs and the specified direction. The specified direction can be due north, or due south, or due east, or due west, without specific limitation.
[0084] Alternatively, the camera may not be a ball camera, for example, the camera may be a gun camera. In this case, the horizontal angle coordinate and the vertical angle coordinate of the gun camera may be measured, and the specific measurement method is not limited.
[0085] 2. Based on the vertical angle coordinate and the height of the camera, calculate the horizontal distance between the object to which the traffic data belongs and the camera.
[0086] Specifically, the product of the tangent value of the vertical angle coordinate and the height of the camera may be calculated as the horizontal distance between the object to which the traffic data belongs and the camera.
[0087] For example, if the camera is a dome camera, the vertical angle coordinate is the T coordinate when the dome camera takes the above traffic image. Figure 2 It can be seen that tanT*h=L, where h represents the height of the ball camera and L represents the horizontal distance between the object to which the traffic data belongs and the ball camera. The horizontal distance is the distance between the ball camera and the object to which the traffic data belongs, assuming that the ball camera and the object to which the traffic data belongs are at the same height.
[0088] 3. According to the horizontal angle and the horizontal distance, the distance in the longitude direction and the distance in the latitude direction between the object to which the traffic data belongs and the camera are calculated by trigonometric function.
[0089] Specifically, if the specified direction is due north, the product of the sine value of the horizontal angle (the horizontal angle between the object to which the traffic data belongs and the specified direction) and the horizontal distance can be calculated as the distance in the longitude direction between the object to which the traffic data belongs and the camera.
[0090] refer to Figure 3 , Figure 3 This is a top view of the ball machine. Figure 3 The height of the ball camera is not reflected in Figure 3 It can be seen that L*sinθ=L lon , L represents the horizontal distance between the object to which the above traffic data belongs and the ball camera, θ represents the horizontal angle between the object to which the traffic data belongs and the north direction, L lon Indicates the distance in the longitude direction between the object to which the traffic data belongs and the ball camera.
[0091] Alternatively, the specified direction is due east. In this case, the product of the cosine value of the horizontal angle and the horizontal distance can be calculated as the distance between the object to which the traffic data belongs and the camera in the meridian direction. In this case, the horizontal angle between the object to which the traffic data belongs and the specified direction obtained above is Figure 3 α in, L*sinα=L lon Alternatively, the above-specified direction is due west or due south, and the specific calculation process is similar and will not be described in detail.
[0092] If the specified direction is due north, the product of the cosine value of the horizontal angle and the horizontal distance may be calculated as the latitude distance between the object to which the traffic data belongs and the camera.
[0093] Continue to refer Figure 3 ,Depend on Figure 3 It can be seen that L*cosθ=L lat , L represents the horizontal distance between the object to which the above traffic data belongs and the ball camera, θ represents the horizontal angle between the object to which the traffic data belongs and the north direction, L lat Indicates the latitude distance between the object to which the traffic data belongs and the ball camera.
[0094] Alternatively, the specified direction is due east. In this case, the product of the sine value of the horizontal angle and the horizontal distance can be calculated as the latitude distance between the object to which the traffic data belongs and the camera. In this case, the horizontal angle between the object to which the traffic data belongs and the due east direction is Figure 3 α in, L*cosα=L lat Alternatively, the above-specified direction is due west or due south, and the specific calculation process is similar and will not be described in detail.
[0095] 4. Based on the longitude and latitude of the camera, as well as the distance in the longitude direction and the distance in the latitude direction, calculate the geographic coordinates of the object to which the traffic data belongs.
[0096] The camera usually has a GPS (Global Positioning System) positioning device, and the GPS coordinates of the camera can be obtained based on the GPS positioning device. The GPS coordinates include longitude and latitude. In this way, the longitude and latitude of the camera and the longitude and latitude distances between the camera and the object to which the traffic data belongs are obtained, and the longitude and latitude of the object to which the traffic data belongs can be calculated, and the geographic coordinates of the object to which the traffic data belongs can be obtained.
[0097] S103: Associating the traffic data with an electronic map according to the geographic coordinates.
[0098] The electronic map may be a GIS (Geographic Information) map, or other maps, and is not specifically limited thereto. The electronic map carries geographic coordinate information, and therefore, the traffic data may be associated with the electronic map based on the geographic coordinates determined in S102.
[0099] For example, the geographic coordinates determined in S102 can be associated with the location in the electronic map to be determined as the display location corresponding to the traffic data, and the traffic data can be displayed at the display location. In one case, this embodiment can be used to process each frame of traffic image captured by the camera, so that the traffic data can be displayed on the electronic map in real time. Alternatively, in another case, this embodiment can also be used to process the traffic image captured by the camera at regular intervals, and the specific time interval is not limited.
[0100] Alternatively, in one implementation, for each piece of traffic data, a layer corresponding to the traffic data can be determined; based on the geographic coordinates of the object to which the traffic data belongs, a display position corresponding to the traffic data can be determined in the electronic map; and based on the display strategy corresponding to the layer, the traffic data can be displayed at the determined display position.
[0101] For example, different layers may be set for different types of traffic data. For example, different types of traffic targets correspond to different layers, dynamic traffic data and static traffic data correspond to different layers, and so on. The specific image setting strategy is not limited.
[0102] To give another example, layers can be divided into point layers, line layers, and surface layers. If the geographic coordinates of a pixel point in a traffic image are determined, a point layer can be generated for the pixel point. If the geographic coordinates of a traffic sign line are determined, a line layer can be generated for the traffic sign line. If the geographic coordinates of a traffic event are determined, a surface layer can be generated for the traffic event.
[0103] By applying the embodiment shown in the present invention, the traffic image is identified by using an image recognition algorithm to obtain traffic data in the traffic image; the geographic coordinates of the object to which the traffic data belongs are determined based on the pre-acquired coordinate mapping relationship; the traffic data is associated with the electronic map based on the geographic coordinates; it can be seen that this solution realizes the automatic identification of traffic data using an algorithm, and automatically associates the traffic data with the electronic map based on the mapping relationship, thereby saving manpower.
[0104] In one implementation, static traffic data such as lane lines and dynamic traffic data such as traffic flow data are associated with an electronic map; in this implementation, since lane lines are associated with the electronic map, different lanes can be distinguished in the electronic map, and since traffic flow data is also associated with the electronic map, traffic flow data of different lanes can be further distinguished, that is, the traffic flow data can be divided more finely, to the level of lanes. In some related solutions, only the overall traffic data of the road can be counted, or the traffic flow data can only be divided to the level of the road; compared with this solution, this implementation achieves a more fine division of traffic flow data.
[0105] Corresponding to the above method embodiment, the embodiment of the present invention provides a traffic data processing device, such as Figure 4 As shown, including:
[0106] The recognition module 401 is used to recognize the traffic image using an image recognition algorithm to obtain traffic data in the traffic image;
[0107] A determination module 402, configured to determine the geographic coordinates of the object to which the traffic data belongs according to a pre-acquired coordinate mapping relationship;
[0108] The association module 403 is used to associate the traffic data with an electronic map according to the geographic coordinates.
[0109] As an implementation manner, the identification module 401 is specifically used for:
[0110] The traffic targets in the traffic image are identified by using an image recognition algorithm to obtain attribute information of the traffic targets, wherein the traffic targets include any one or more of the following: traffic sign lines, signal lights, and road signs.
[0111] As an implementation manner, the identification module 401 is specifically used for:
[0112] Using image recognition algorithms, traffic flow data in traffic images is counted;
[0113] And / or, using an image recognition algorithm, determine whether there is a traffic event in the traffic image, and obtain traffic data including the determination result.
[0114] As an implementation manner, the determination module 402 is specifically configured to:
[0115] According to the mapping relationship between the image coordinates and the geographic coordinates acquired in advance, the image coordinates of the object to which the traffic data belongs in the traffic image are converted into the geographic coordinates of the object to which the traffic data belongs.
[0116] As an implementation mode, the determination module 402 includes: an acquisition submodule and a conversion submodule (not shown in the figure), wherein:
[0117] An acquisition submodule, used to acquire the camera coordinates when the camera takes the traffic image;
[0118] The conversion submodule is used to convert the camera coordinates into the geographic coordinates of the object to which the traffic data belongs according to the mapping relationship between the camera coordinates and the geographic coordinates acquired in advance.
[0119] As an implementation manner, the camera coordinates include: horizontal angle coordinates and vertical angle coordinates; the conversion submodule is specifically used for:
[0120] Based on the horizontal angle coordinate, determining the horizontal angle between the object to which the traffic data belongs and the specified direction;
[0121] Calculate the horizontal distance between the object to which the traffic data belongs and the camera based on the vertical angle coordinate and the height of the camera;
[0122] Calculate the distance in the longitude direction and the distance in the latitude direction between the object to which the traffic data belongs and the camera by trigonometric function according to the horizontal angle and the horizontal distance;
[0123] The geographic coordinates of the object to which the traffic data belongs are calculated based on the longitude and latitude of the camera and the distance in the longitude direction and the distance in the latitude direction.
[0124] As an implementation manner, the association module 403 is specifically used for:
[0125] For each piece of traffic data, determine the layer corresponding to the piece of traffic data;
[0126] Determine, in the electronic map, a display location corresponding to the traffic data according to the geographic coordinates of the object to which the traffic data belongs;
[0127] Based on the display strategy corresponding to the layer, the traffic data is displayed at the determined display position.
[0128] By applying the embodiment shown in the present invention, the traffic image is identified by using an image recognition algorithm to obtain traffic data in the traffic image; the geographic coordinates of the object to which the traffic data belongs are determined based on the pre-acquired coordinate mapping relationship; the traffic data is associated with the electronic map based on the geographic coordinates; it can be seen that this solution realizes the automatic identification of traffic data using an algorithm, and automatically associates the traffic data with the electronic map based on the mapping relationship, thereby saving manpower.
[0129] The embodiment of the present invention further provides an electronic device, such as Figure 5 As shown, it includes a processor 501 and a memory 502,
[0130] Memory 502, used for storing computer programs;
[0131] The processor 501 is used to implement any of the above-mentioned traffic data processing methods when executing the program stored in the memory 502.
[0132] The memory mentioned in the above electronic device may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the above processor.
[0133] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0134] An embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any of the above-mentioned traffic data processing methods is implemented.
[0135] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0136] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, equipment embodiment, and computer-readable storage medium embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0137] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A traffic data processing method, characterized in that: include: Using an image recognition algorithm to recognize a traffic image, and obtaining traffic data in the traffic image, wherein the traffic data includes static traffic data and dynamic traffic data, the dynamic traffic data includes traffic flow data and traffic events, the traffic image is a video image, and the traffic flow data is obtained by counting the traffic flow in the video image using an image recognition algorithm; Determine the geographic coordinates of the object to which the traffic data belongs according to the pre-acquired coordinate mapping relationship; Associating the traffic data with an electronic map according to the geographic coordinates, wherein the traffic flow data includes traffic flow data of different lanes, and the different lanes are obtained by associating lane lines in the static traffic data with the electronic map; Wherein, associating the traffic data with an electronic map according to the geographic coordinates includes: For each piece of traffic data, determining a layer corresponding to the piece of traffic data, wherein the dynamic traffic data and the static traffic data correspond to different layers; Determine, in the electronic map, a display location corresponding to the traffic data according to the geographic coordinates of the object to which the traffic data belongs; Based on the display strategy corresponding to the layer, the traffic data is displayed at the determined display position.
2. The method according to claim 1, characterized in that The method of using an image recognition algorithm to recognize a traffic image to obtain traffic data in the traffic image includes: The traffic targets in the traffic image are identified by using an image recognition algorithm to obtain attribute information of the traffic targets, wherein the traffic targets include any one or more of the following: traffic sign lines, signal lights, and road signs.
3. The method according to claim 1, characterized in that The method of using an image recognition algorithm to recognize a traffic image to obtain traffic data in the traffic image includes: Using image recognition algorithms, traffic flow data in traffic images is counted; And / or, using an image recognition algorithm, determine whether there is a traffic event in the traffic image, and obtain traffic data including the determination result.
4. The method according to claim 1, characterized in that: Determining the geographic coordinates of the object to which the traffic data belongs according to the pre-acquired coordinate mapping relationship includes: According to the mapping relationship between the image coordinates and the geographic coordinates acquired in advance, the image coordinates of the object to which the traffic data belongs in the traffic image are converted into the geographic coordinates of the object to which the traffic data belongs.
5. The method according to claim 1, characterized in that Determining the geographic coordinates of the object to which the traffic data belongs according to the pre-acquired coordinate mapping relationship includes: Obtaining the camera coordinates when the camera photographs the traffic image; According to the pre-acquired mapping relationship between the camera coordinates and the geographic coordinates, the camera coordinates are converted into the geographic coordinates of the object to which the traffic data belongs.
6. The method according to claim 5, characterized in that The camera coordinates include: horizontal angle coordinates and vertical angle coordinates; the camera coordinates are converted into the geographic coordinates of the object to which the traffic data belongs according to the mapping relationship between the camera coordinates and the geographic coordinates obtained in advance, including: Based on the horizontal angle coordinate, determining the horizontal angle between the object to which the traffic data belongs and the specified direction; Calculate the horizontal distance between the object to which the traffic data belongs and the camera based on the vertical angle coordinate and the height of the camera; Calculate the distance in the longitude direction and the distance in the latitude direction between the object to which the traffic data belongs and the camera by trigonometric function according to the horizontal angle and the horizontal distance; The geographic coordinates of the object to which the traffic data belongs are calculated based on the longitude and latitude of the camera and the distance in the longitude direction and the distance in the latitude direction.
7. A traffic data processing device, characterized in that: include: an identification module, configured to identify a traffic image using an image recognition algorithm to obtain traffic data in the traffic image, wherein the traffic data includes static traffic data and dynamic traffic data, the dynamic traffic data includes traffic flow data and traffic events, the traffic image is a video image, and the traffic flow data is obtained by counting the traffic flow in the video image using an image recognition algorithm; A determination module, used to determine the geographic coordinates of the object to which the traffic data belongs according to a pre-acquired coordinate mapping relationship; an associating module, for associating the traffic data with an electronic map according to the geographic coordinates; Among them, the association module is specifically used to determine the layer corresponding to each piece of traffic data; determine the display position corresponding to the traffic data in the electronic map according to the geographic coordinates of the object to which the traffic data belongs; based on the display strategy corresponding to the layer, display the traffic data at the determined display position, wherein the dynamic traffic data and the static traffic data correspond to different layers, wherein the traffic flow data includes traffic flow data of different lanes, and the different lanes are obtained by associating the lane lines in the static traffic data with the electronic map.
8. An electronic device, characterized in that: including a processor and a memory; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 6 when executing a program stored in a memory.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 6 are implemented.
