Method and system for positioning vehicles in a channel, storage medium and electronic device
Through the combination of a single-line laser and a camera, the three-dimensional coordinates and driving trajectory of the target vehicle are obtained, which solves the problem of high positioning of multi-line laser radar and achieves low-cost and high-precision vehicle positioning.
Patent Information
- Application Number
- CN202211711954.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-29
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2042-12-29
AI Technical Summary
In channels with limited vision, the use of multi-line lidar for vehicle positioning and tracking has high cost problems.
Using a single-line laser combined with a camera, by obtaining the reference vehicle position of the target vehicle and the vehicle driving trajectory within the camera's cone, the vehicle driving trajectory is restored to the vehicle's three-dimensional coordinates based on the reference vehicle position, and three-dimensional positioning is achieved.
The cost of vehicle positioning is reduced, while improving positioning accuracy and recognition accuracy, which is lower than that of multi-line lidar.
Smart Images

Figure CN116243325B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart transportation, and specifically, to a method and system for positioning vehicles in a channel, a storage medium, and an electronic device. Background Art
[0002] When driving in lanes with limited vision (for example, due to insufficient lighting or numerous curves, which affect visual information), vehicles are prone to accidents due to speeding, lane changes, and other factors. Using post-processing methods, real-time monitoring of the lanes is insufficient. To improve real-time monitoring capabilities, related technologies typically deploy multi-line LiDAR sensors at lane entrances and exits, allowing for real-time positioning and tracking of vehicles.
[0003] However, since multiple multi-line laser radars need to be deployed, and the cost of multi-line laser radars is relatively high, the method of using the above-mentioned multi-line laser radars for vehicle positioning has the problem of high cost of vehicle positioning. Summary of the Invention
[0004] The embodiments of the present application provide a method and system for positioning vehicles in a channel, a storage medium, and an electronic device to at least solve the problem of high cost of vehicle positioning and tracking in the related art using multi-line laser radar for vehicle positioning and tracking.
[0005] According to one aspect of an embodiment of the present application, a method for positioning a vehicle in a channel is provided, comprising: obtaining a reference vehicle position of a target vehicle in a target channel, wherein the reference vehicle position is the three-dimensional coordinates of the target vehicle output by a single-line laser when the target vehicle passes through a laser section of the single-line laser, and the laser section is perpendicular to the ground; obtaining a vehicle driving trajectory of the target vehicle within a camera cone of view of a camera, wherein the single-line laser and the camera are arranged at the same position in the target channel; and restoring the vehicle driving trajectory to the vehicle three-dimensional coordinates based on the reference vehicle position to perform three-dimensional positioning of the target vehicle.
[0006] According to another aspect of an embodiment of the present application, a system for positioning vehicles in a channel is also provided, comprising: a single-line laser, the laser cross-section of the single-line laser being perpendicular to the ground; a camera, the camera and the single-line laser being arranged at the same position in the target channel; a data processing component for obtaining a reference vehicle position of the target vehicle in the target channel, wherein the reference vehicle position is the three-dimensional coordinates of the target vehicle output by the single-line laser when the target vehicle passes through the laser cross-section; obtaining a vehicle driving trajectory of the target vehicle within the camera cone of view of the camera; and restoring the vehicle driving trajectory to vehicle three-dimensional coordinates based on the reference vehicle position to perform three-dimensional positioning of the target vehicle.
[0007] According to another aspect of the embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned method for positioning a vehicle in a channel when running.
[0008] According to another aspect of an embodiment of the present application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the above-mentioned method for positioning a vehicle in a channel through the computer program.
[0009] In an embodiment of the present application, a single-line laser is combined with a camera to locate a vehicle in a specific channel. The reference vehicle position of the target vehicle in the target channel is obtained, wherein the reference vehicle position is the three-dimensional coordinates of the target vehicle output by the single-line laser when the target vehicle passes through the laser section of the single-line laser, and the laser section is perpendicular to the ground; the vehicle driving trajectory of the target vehicle in the camera cone of view of the camera is obtained, wherein the single-line laser and the camera are set at the same position of the target channel; based on the reference vehicle position, the vehicle driving trajectory is restored to the vehicle three-dimensional coordinates to perform three-dimensional positioning of the target vehicle, and when the vehicle passes through the laser section of the single-line laser, the three-dimensional coordinates are output once to assist in restoring the vehicle trajectory captured by the camera to the vehicle three-dimensional coordinates, thereby performing three-dimensional positioning of the vehicle. Since the three-dimensional coordinates output by the single-line laser can reduce the inaccurate vehicle positioning caused by the imaging result of the object being affected by the distance, at the same time, compared with the multi-line laser, the cost of the single-line laser and the camera is relatively low, which can achieve the technical effect of reducing the cost of vehicle positioning, thereby solving the problem of high cost of vehicle positioning in the related art using multi-line laser radar for vehicle positioning. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0011] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0012] Figure 1 is a schematic diagram of a hardware environment of an optional method for positioning a vehicle in a channel according to an embodiment of the present application;
[0013] Figure 2is a flow chart of an optional method for positioning a vehicle in a channel according to an embodiment of the present application;
[0014] Figure 3 is a schematic diagram of an optional method for positioning a vehicle in a channel according to an embodiment of the present application;
[0015] Figure 4 is a schematic diagram of another optional method for positioning a vehicle in a channel according to an embodiment of the present application;
[0016] Figure 5 is a flow chart of another optional method for positioning a vehicle in a channel according to an embodiment of the present application;
[0017] Figure 6 This is a structural block diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0018] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings 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 in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0019] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0020] According to one aspect of the embodiment of the present application, a method for positioning a vehicle in a channel is provided. Optionally, in this embodiment, the method for positioning a vehicle in a channel can be applied to Figure 1 In the hardware environment shown, the single-line laser 102, the camera 104 and the data processing unit 106 are all part of the vehicle positioning system. The single-line laser 102 and the camera 104 can be arranged in pairs at the same position in a specific channel. Figure 1As shown, the single-line laser 102, camera 104, and data processing unit 106 can be connected via a network cable or serial port. The data processing unit 106 can be located within the camera or on a separate device, such as a data processor. Furthermore, the vehicle positioning system can also include multi-line lasers, which can be located at the entrance or exit of a specific channel.
[0021] The aforementioned network may include, but is not limited to, at least one of the following: a wired network and a wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: a wide area network, a metropolitan area network, and a local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity) and Bluetooth.
[0022] The method for positioning a vehicle in a channel of the embodiment of the present application can be performed by the camera 104 alone, or by the data processing component 106 alone, or by the camera 104 and the data processing component 106 together. Taking the method for positioning a vehicle in a channel of the embodiment of the present application performed by the camera 104 as an example, Figure 2 This is a flow chart of an optional method for positioning a vehicle in a channel according to an embodiment of the present application, such as Figure 2 As shown, the process of the method may include the following steps:
[0023] Step S202, obtaining a reference vehicle position of the target vehicle in the target channel, wherein the reference vehicle position is the three-dimensional coordinate of the target vehicle output by the single-line laser when the target vehicle passes through the laser section of the single-line laser, and the laser section is perpendicular to the ground.
[0024] The method for locating vehicles within a channel in this embodiment can be applied to scenarios where vehicles traveling within a specific channel are located. Here, the specific channel can be a tunnel or other channel prone to traffic accidents due to limited visibility. Vehicle positioning can be performed in real time. By reporting the positioning and tracking status of vehicles within the channel in real time, the real-time monitoring capability of the specific channel (e.g., a tunnel) can be improved.
[0025] Taking tunnels as an example, tunnel accidents are often caused by vehicles speeding or changing lanes within the tunnel. If tunnel accidents are handled post-accident, tracing the accident can be difficult and determining responsibility can be inaccurate. To locate and track vehicles within tunnels, a multi-line LiDAR solution is typically employed. This involves deploying multiple LiDAR sensors within the tunnel to locate and track vehicles within the tunnel. However, these tunnel vehicle positioning solutions are expensive and difficult to implement.
[0026] Alternatively, pure video can be used to locate and track vehicles in tunnels. However, due to errors in the three-dimensional reconstruction of video, vehicle positioning accuracy is poor. Furthermore, using a multi-line laser combined with video to locate and track vehicles in tunnels also presents the problem of high vehicle positioning costs.
[0027] In order to at least partially solve the above problems, a single-line laser combined with a camera can be used to locate and track vehicles in a specific channel. By using a single-line laser to assist in vehicle positioning, the positioning error that exists when restoring the three-dimensional coordinates of the vehicle through the image captured by the camera can be reduced, thereby improving the accuracy of vehicle positioning. Compared with multi-line lasers, single-line lasers are relatively cheaper, which can reduce the cost of vehicle positioning while having higher recognition accuracy.
[0028] For the target channel, the target channel can be a tunnel. A camera is installed at a certain distance in the target channel for vehicle tracking. The camera can be a monocular camera. In addition, a single-line laser is installed at a certain distance in the target channel. The installation location of the single-line laser is the same as that of the camera and has a one-to-one correspondence with the camera. The single-line laser can cooperate with the camera to restore the 3D (Three Dimensional) coordinates of the vehicle. The single-line laser can be a single-line lidar.
[0029] For any single-line laser and camera combination, both can be set at the same location on the target path, meaning they can be installed in the same location. This can mean they are completely identical or located within a certain distance threshold. The single-line laser's laser cross-section (i.e., scanning cross-section) is defined as perpendicular to the ground and can also be perpendicular to the direction of travel on the road section corresponding to the target path. Compared to other setups, this minimizes the error in the camera's 3D coordinate reconstruction, reducing calibration errors when calibrating the camera and single-line laser.
[0030] When the target vehicle is traveling in the target channel, if it passes through the laser cross section of the single-line laser, the single-line laser outputs the three-dimensional coordinates of the target vehicle. The output three-dimensional coordinates are the reference vehicle position, which can assist the camera in restoring the 3D coordinates of the target vehicle. The reference vehicle position can be output to the camera (or to the data processing component). Correspondingly, the camera can obtain the above-mentioned reference vehicle position output by the single-line laser. For example, when a vehicle passes through the single-line laser, the single-line laser outputs the vehicle's 3D coordinates P1 (x1, y1, z1) to the camera once.
[0031] Step S204 , obtaining a vehicle driving trajectory of the target vehicle within the camera viewing cone of the camera, wherein the single-line laser and the camera are set at the same position of the target channel.
[0032] Within the target channel, the camera and single-line laser are co-located, and their field of view can be considered a cone, i.e., the camera's field of view. If a target vehicle passes through the camera's field of view while traveling within the target channel, the camera can capture it to track it. By capturing and locating the target vehicle at least once, the target vehicle's trajectory within the camera's field of view can be obtained. This trajectory can include a combination of vehicle positions and vehicle angles. The camera angles can include the horizontal angle between the vehicle's pixels and the camera's field of view (angle WA) and the vertical angle between the vehicle's pixels and the camera's field of view (angle WB).
[0033] Step S206 , based on the reference vehicle position, the vehicle driving trajectory is restored to the vehicle three-dimensional coordinates to perform three-dimensional positioning of the target vehicle.
[0034] like Figure 3 As shown, within the camera's field of view, the 3D coordinates of a large, distant object converted in the camera are identical to the 3D coordinates of a small, nearby object, resulting in errors in the 3D coordinates of the target vehicle restored based on the target vehicle's trajectory within the camera's field of view. To improve the accuracy of vehicle positioning, in this embodiment, the vehicle's trajectory can be restored to the vehicle's 3D coordinates based on the vehicle's 3D coordinates output by a single-line laser. Since the 3D coordinates output by a single-line laser can represent the distance between the vehicle and the camera, restoring the vehicle's 3D coordinates using a single-line laser together with the camera can improve the accuracy of the 3D coordinates restored from the vehicle's trajectory.
[0035] For the target vehicle, after acquiring the reference vehicle position output by the single-line laser, the camera can restore the vehicle's trajectory to the vehicle's three-dimensional coordinates based on the reference vehicle position to perform three-dimensional positioning of the target vehicle. The camera can automatically convert the vehicle's trajectory within the camera's field of view into the target vehicle's 3D coordinates through an algorithm. The algorithm that combines the single-line laser and camera to restore the vehicle's 3D coordinates is called the SF6 vehicle 3D coordinate restoration algorithm. The implementation process of the SF6 algorithm can be:
[0036] When a vehicle passes through the laser section of a single-line laser, the single-line laser outputs the vehicle's 3D coordinates P1(x1,y1,z1) to the camera. The camera uses the SF6 algorithm to automatically convert the vehicle's subsequent 3D coordinates [P1(x1,y1,z1),P2(x2,y2,z2),...,Pn(xn,yn,zn)].
[0037] Here, the vehicle's position parameters within the camera's view frustum corresponding to P1(x1, y1, z1) include position W1, angle WA1, and angle WB1. As the vehicle continues to move, the camera obtains the vehicle's new position W2, angles WA2, and angle WB2. Combining these with P1(x1, y1, z1), the camera calculates the vehicle's new 3D coordinates P2(x2, y2, z2) using angles WA2 and WB2. Similarly, the vehicle's entire trajectory within the camera's view frustum is converted to 3D coordinates.
[0038] It should be noted that the known field of view angle at the time of camera installation allows us to determine the size of the camera's viewing cone, and thus the vehicle's new position W2 during subsequent driving. Combined with the data from P1 (x1, y1, z1), we can obtain angles WA2 and WB2. The vehicle's 3D coordinates can be calculated based on position W2, angles WA2, and angle WB2, but these are not unique. Furthermore, based on the P1 coordinates output by the single-line laser and the relationship between [W1, WA1, WB1] and [W2, WA2, WB2], we can further determine the unique 3D coordinate value P2.
[0039] Through the above steps S202 to S206, a reference vehicle position of the target vehicle in the target channel is obtained, wherein the reference vehicle position is the three-dimensional coordinate of the target vehicle output by the single-line laser when the target vehicle passes through the laser section of the single-line laser, and the laser section is perpendicular to the ground; the vehicle driving trajectory of the target vehicle in the camera cone of the camera is obtained, wherein the single-line laser and the camera are set at the same position of the target channel; based on the reference vehicle position, the vehicle driving trajectory is restored to the vehicle three-dimensional coordinates to perform three-dimensional positioning of the target vehicle, thereby solving the problem of high cost of vehicle positioning in the related art using multi-line laser radar for vehicle positioning, thereby reducing the cost of vehicle positioning.
[0040] In an exemplary embodiment, after obtaining the reference vehicle position of the target vehicle in the target channel, the method further includes:
[0041] S11, converting the reference vehicle position into vehicle position information within the camera's field of view according to the coordinate alignment parameters of the single-line laser and the camera, wherein the vehicle position information includes the vehicle position of the target vehicle within the camera's field of view, the horizontal angle between the target vehicle and the camera's field of view, and the vertical angle between the target vehicle and the camera's field of view.
[0042] The 3D coordinates output by a single-line laser are within its corresponding 3D coordinate system, while the 3D coordinates of the vehicle restored by the camera are within the world coordinate system or a specified 3D coordinate system. The reference vehicle position output by the single-line laser can be converted into vehicle position information within the camera's field of view. This vehicle position information includes the target vehicle's position within the camera's field of view, the horizontal angle between the target vehicle and the camera's field of view (the aforementioned angle WA), and the vertical angle between the target vehicle and the camera's field of view (the aforementioned angle WB).
[0043] The above conversion operation can be performed based on the coordinate alignment parameters of the single-line laser and the camera. The coordinate alignment parameters can be pre-set and can be applied to the three-dimensional coordinates output by the single-line laser and the coordinates within the camera's field of view. The converted vehicle position information can be further converted into three-dimensional coordinates in the aforementioned world coordinate system or a specified coordinate system. Optionally, the reference vehicle position output by the single-line laser is a three-dimensional coordinate in the aforementioned world coordinate system or a specified coordinate system. Converting the reference vehicle position to vehicle position information within the camera's field of view facilitates the mapping of the vehicle's movement trajectory within the camera's field of view.
[0044] For example, the position W1, angle WA1, and angle WB1 of the vehicle in the camera's viewing cone can be obtained by using the previously calibrated coordinate alignment parameters PA of the single-line laser and the camera.
[0045] Through this embodiment, the three-dimensional coordinates output by the single-line laser are converted into vehicle position information within the camera's viewing cone based on the coordinate alignment parameters, thereby improving the integrity of vehicle positioning and tracking.
[0046] In an exemplary embodiment, before converting the reference vehicle position into vehicle position information within the camera's viewing cone based on the coordinate alignment parameters of the single-line laser and the camera, the method further includes:
[0047] S21, obtaining a set of calibration lines and an angle corresponding to each calibration line in the set of calibration lines, wherein each calibration line is located within the camera's visual cone and is perpendicular to the driving direction of the target channel, and the angle corresponding to each calibration line is the angle between a plane passing through each calibration line and the camera's camera position and a target plane passing through the camera's visual cone centerline and the camera position, and the set of calibration lines are parallel to each other;
[0048] S22, obtaining a vehicle stitched image and radar point cloud data corresponding to each calibration line, wherein the vehicle stitched image corresponding to each calibration line is an image obtained by stitching image points corresponding to each calibration line in a set of vehicle images, the set of vehicle images being images captured by a camera as the reference vehicle passes through the camera's field of view, and the radar point cloud data being point cloud data of the reference vehicle scanned by a single-line laser.
[0049] S23, projecting the radar point cloud data onto a two-dimensional plane at the installation angle of the camera to obtain a two-dimensional point cloud image;
[0050] S24 , selecting a calibration line whose corresponding vehicle stitching image has the highest similarity with the two-dimensional point cloud image from a set of calibration lines, and determining the selected calibration line and the angle corresponding to the selected calibration line as coordinate alignment parameters.
[0051] Since there is an error between the actual installation position and the expected installation position of the camera and the single-line laser, if the coordinate alignment parameters of the single-line laser and the camera are configured with the default configuration, the inaccurate coordinate alignment parameters will lead to errors in vehicle positioning. To improve the accuracy of the coordinate alignment parameters, in this embodiment, a set of calibration lines and the angle corresponding to each calibration line can be selected within the camera's camera cone of view. The radar point cloud data of the single-line laser and the partial captured image of the vehicle captured by the camera at each calibration line are matched, and the most matching calibration line is selected from the set of calibration lines. The selected calibration line and the angle corresponding to the selected calibration line are then determined as the coordinate alignment parameters of the single-line laser and the camera.
[0052] In this embodiment, a set of calibration lines and the angle corresponding to each calibration line can be obtained. The above set of calibration lines is a set of calibration lines selected within the camera cone that are perpendicular to the driving direction of the target channel and parallel to each other, and each calibration line can be parallel to the laser cross section. For each calibration line, the angle between the plane passing through the calibration line and the camera position and the target plane passing through the center line of the camera cone and the camera position can be used as the angle corresponding to the calibration line. For example, N calibration lines [L1, L2, L3, ..., L n ] and the angles corresponding to each calibration line [A1, A2, A3, ..., A n ].
[0053] Optionally, the camera and single-line laser can be calibrated using a camera image within a preset angle range to the left and right of a centerline of the camera's viewing cone. The centerline of the viewing cone can be referred to as the image centerline. Here, the camera image can be a captured image. The range of the camera image along the driving direction of the target channel can be the range covered by the target plane rotated to the left and right by preset angles along the driving direction, centered on the camera position. The range of the camera image perpendicular to the driving direction can be consistent with the range of the target channel or a group of lanes within the target channel.
[0054] To select the desired calibration line from a set of calibration lines, a set of vehicle images and radar point cloud data can be obtained. The vehicle images are captured by the camera as the reference vehicle passes through the camera's field of view, while the radar point cloud data is the point cloud data of the reference vehicle scanned by a single laser line. For each vehicle image, the image points corresponding to each calibration line can be obtained separately. The image points corresponding to each calibration line in the set of vehicle images are stitched together in the order in which they were acquired to obtain a stitched image of the vehicle corresponding to each calibration line. The radar point cloud data can be obtained by stitching together the point cloud images captured by the reference vehicle as it passes through the laser cross-section.
[0055] After obtaining the radar point cloud data, it can be projected onto a two-dimensional plane at the camera's installation angle. This means projecting the radar point cloud data onto a two-dimensional plane perpendicular to the camera's installation angle to produce a two-dimensional point cloud image of the vehicle. By comparing the similarity between the two-dimensional point cloud image and the vehicle mosaic image corresponding to each calibration line, the calibration line corresponding to the mosaic image with the highest similarity to the two-dimensional point cloud image is selected from a set of calibration lines. The angle between this calibration line and the corresponding angle is then used as the coordinate alignment parameter, completing the calibration of the camera and single-line laser.
[0056] For example, when a vehicle passes by a camera and a single-line lidar, N vehicle stitching images [P1, P2, P3, ..., P n ] and 1 radar point cloud data (PC), project the radar point cloud data onto a two-dimensional plane at the camera installation angle to obtain a two-dimensional point cloud image (PCP), select N vehicle stitching images [P1, P2, P3, ..., P n ] and the closest vehicle stitching image to the two-dimensional point cloud image, and select the calibration line L corresponding to the vehicle stitching image y , and the calibration line L y The corresponding angle A y , the coordinate alignment parameter PA of the camera and the single-line laser is obtained through the algorithm.
[0057] It should be noted that the device for determining the coordinate alignment parameters may be a camera, a data processing component, or other devices capable of performing data processing, which is not limited in this embodiment.
[0058] Through this embodiment, by setting a set of calibration lines and the angle corresponding to each calibration line, and by combining the point cloud data collected by the single-line laser with the vehicle stitching image corresponding to each calibration line in the vehicle image taken by the camera, the required calibration lines and corresponding angles are selected, thereby obtaining the coordinate alignment parameters of the camera and the single-line laser, which can improve the accuracy of determining the coordinate alignment parameters and thereby improve the accuracy of vehicle positioning.
[0059] In an exemplary embodiment, obtaining a set of calibration lines and an angle corresponding to each calibration line in the set of calibration lines includes:
[0060] S31, obtaining camera images within preset angle ranges on both sides of the center line of the viewing cone, wherein the intersection of the target plane and the camera image is the center line of the viewing cone;
[0061] S32, determining a set of calibration lines and an angle corresponding to each calibration line in the camera image, wherein the set of calibration lines includes a center line of the viewing cone, and a distance between two adjacent calibration lines in the set of calibration lines is equal, or an angle between adjacent planes in a set of planes obtained by each calibration line and the camera position is equal.
[0062] In this embodiment, in order to obtain a set of calibration lines and the angle corresponding to each calibration line, the camera image within the preset angle range on the left and right sides of the center line of the viewing cone can be first obtained. The method of obtaining the camera image is similar to that in the aforementioned embodiment, and the intersection of the target plane and the camera image is the center line of the viewing cone. A set of calibration lines includes the center line of the viewing cone.
[0063] Within a camera image, a set of calibration lines can be determined in a variety of ways. For example, a set of calibration lines can be first determined, and then the angle corresponding to each calibration line can be determined: using the centerline of the viewing cone as a reference, calibration lines are sequentially acquired to the left and right at a preset spacing, thereby obtaining a set of calibration lines. Correspondingly, in a set of calibration lines, the distance between two adjacent calibration lines is equal, and the angle corresponding to each calibration line is the angle between a plane passing through the camera position and each calibration line and the target plane. For another example, the angle corresponding to each calibration line can be first determined, and then a set of calibration lines can be determined: with the camera position as a fixed point, the target plane is sequentially rotated to the left and right by a preset angle along the driving direction of the target channel (the driving direction of the current road section). The intersection of each rotated plane with the camera image is a calibration line. Correspondingly, in a set of planes obtained by passing through each calibration line and the camera position, the angles between adjacent planes are equal.
[0064] For example, obtain the camera image within the range of F degrees to the left and right of the camera cone center line (i.e., the image center line), and rotate G degrees around the center point (camera position) in sequence to obtain N = (F*2) / G calibration lines [L1, L2, L3, ..., L n ] and the corresponding angles [A1, A2, A3, ..., A n ].
[0065] Through this embodiment, by obtaining a set of calibration lines from the camera image within a certain angle range on both sides of the center line of the cone according to a preset angle or preset distance, the convenience of obtaining the calibration lines can be improved.
[0066] In an exemplary embodiment, there are multiple cameras and multiple single-line lasers, each camera corresponds to a single-line laser, different cameras are set at different positions of the target channel, and the camera cones of two adjacent cameras partially overlap.
[0067] The target channel is typically long. Using a single camera and a single laser to collect data from vehicles passing through the target channel only captures a portion of the vehicle's data within the channel. This allows for positioning the vehicle at a specific location within the channel, but not for full vehicle positioning and tracking. In this embodiment, a combination of multiple cameras and single-line lasers can be deployed within the target channel, with the visual cones of adjacent cameras partially overlapping to avoid blind spots within the channel and enable full vehicle positioning.
[0068] For example, cameras are installed at regular intervals in the tunnel to track vehicles, with the camera cones of adjacent cameras at least partially overlapping. At the same time, single-line lasers are installed at regular intervals in the tunnel, in the same locations as the cameras, with a one-to-one correspondence.
[0069] Through this embodiment, by providing a combination of multiple cameras and single-line lasers, and with the camera cones of adjacent cameras at least partially overlapping, the visual blind spots within the target channel can be reduced and the accuracy of vehicle positioning can be improved.
[0070] In one exemplary embodiment, the camera requires a specific mounting angle to cover all lanes within the target corridor while preventing vehicles in lanes closer to the camera from obstructing vehicles in lanes farther from the camera. Specifically, the camera captures images of the tallest vehicles. To determine the camera's mounting angle, the maximum angle JDmax between the edge of the camera's vertical field of view and the vertical direction of the ground, as well as the minimum angle JDmin between the edge of the camera's vertical field of view and the vertical direction of the ground, can be determined. The camera's mounting angle is then calculated as half the sum of JDmax and JDmin.
[0071] When determining the camera installation angle, we can first determine the camera's minimum field of view angle Smin. To ensure that objects of the same size are imaged with more pixels in the camera, the camera's field of view angle must be minimum. The calculation formula for the minimum field of view angle is shown in formula (1):
[0072] Smin=JD max-JD min (1)
[0073] The camera installation angle can be determined by the minimum field of view angle and the maximum included angle or the minimum field of view angle and the minimum included angle: JDmax-Smin / 2 or Smin / 2+JDmin.
[0074] The target channel contains multiple lanes, among which the lane closest to the camera (which can be the distance along the driving direction perpendicular to the target channel) is the closest lane. JDmax can be the maximum imaging distance Dmax of the camera on the ground and the camera height H of the camera. c Determined, JDmin can be based on the distance Dmin between the camera and the nearest lane and the camera height H c Determined. JDmax, JDmin, Dmax, Dmin and H c The indication can be as follows Figure 4 As shown, the calculation formulas of JDmax and JDmin are shown in formula (2) and formula (3):
[0075] JDmax=Arctan(Dmax / Hc) (2)
[0076] JDmin=Arctan(Dmin / Hc) (3)
[0077] The farthest imaging distance Dmax is the distance between the farthest imaging point of the camera in the horizontal direction (which can be the horizontal direction in the vertical plane of the lane driving direction) and the camera in the horizontal direction. In order to locate the vehicle in the farthest lane, the farthest imaging distance Dmax can be determined based on the following information: Camera height H c , preset vehicle height Hveh, the total width of all lanes in the target channel, the distance Dmin between the camera and the nearest lane, and Hveh can be the preset maximum height of the vehicle.
[0078] See also Figure 4 The farthest imaging distance can be the sum of Dmin, the total width of all lanes, and the difference Dtemp between the farthest imaging horizontal distance of the camera on the ground (which can be the distance along the direction perpendicular to the lane) and the horizontal distance of the farthest lane on the ground. Taking a two-lane target channel as an example, the width of each lane is Wlane. The farthest imaging distance can be calculated by combining formulas (4) and (5):
[0079] Dmax=Dtemp+2*Wlane+Dmin (4)
[0080] Dtemp / Dmax= Hveh / Hc (5)
[0081] For example, refer to Figure 4 , when the camera is installed at a minimum height of H c=5 meters, Dmin is 2.5 meters, vehicle A is 3 meters tall, the lane width is 3 meters 8, and the horizontal distance between vehicles A and B is the greatest, we can calculate the camera's maximum imaging distance Dmax = 25.25 meters, the maximum angle between the edge of the camera's vertical field of view and the ground perpendicular to the ground JDmax = 78.79920221 degrees, the minimum angle between the edge of the camera's vertical field of view and the ground perpendicular to the ground JDmin = 26.56505118 degrees, and the camera's minimum vertical field of view Smin = 52.23415103 degrees. The camera's installation angle is calculated as: Smin / 2 + JDmin = 26.117075515 + 26.56505118 = 52.682126695 degrees. The camera can be installed according to the calculated installation angle.
[0082] Through this embodiment, by combining multiple information to calculate the installation angle of the vehicle, it is possible to ensure that all vehicles in the channel can be positioned while meeting the minimum field of view angle of the camera, thereby ensuring that objects of the same size are imaged with more pixels in the camera, thereby improving the accuracy of vehicle positioning.
[0083] In an exemplary embodiment, the method further includes:
[0084] S41, when the vehicle height of the target vehicle is less than or equal to a preset height threshold, sending lane prompt information to the target vehicle, wherein the target channel includes multiple lanes, and the lane prompt information is used to prompt the target vehicle to select other lanes among the multiple lanes except the lane farthest from the camera for driving.
[0085] At the camera's current installation angle, vehicles in the lane farthest from the camera must meet certain height requirements to avoid being obscured by vehicles in other lanes. To address this, a vehicle height threshold, i.e., a preset height threshold, can be preset. This threshold can be the vehicle obstruction height, which can be calculated based on the installation angle required for the minimum vertical field of view.
[0086] For example, see Figure 4 , taking the camera installation angle as 52.682126695, according to the formula 0.5 / (3-height of vehicle A) = tan(52.682126695) = 1.3119, it can be obtained that the minimum height of vehicle A that is not blocked is 2.62 meters.
[0087] For the target vehicle, if it is detected that the vehicle height of the target vehicle is less than or equal to a preset height threshold, lane prompt information can be sent to the target vehicle to prompt the target vehicle to select a lane. The lane prompt information can be used to prompt the target vehicle to select a lane other than the lane farthest from the camera among the multiple lanes of the target channel, that is, to prompt the target vehicle not to choose the lane farthest from the camera for driving.
[0088] If the vehicle height of the target vehicle is greater than the preset height threshold, the positioning of the target vehicle is not restricted by the vehicle height. At this time, a lane prompt message may not be sent to the target vehicle, or a lane prompt message may be sent to the target vehicle to prompt the target vehicle to select any lane for driving. This is not limited in this embodiment.
[0089] Alternatively, the lane prompt information may be provided via voice prompts, on-screen text prompts, or the like. For on-screen text prompts, the lane prompt information may be sent to the target vehicle's OBU (On Board Unit) or displayed via a prompt screen within the target lane. The screen may be located before the area where the target vehicle can select a lane, and may be located to the side of the lane or above the lane (supported by a support structure), etc., although this embodiment does not limit this.
[0090] Through this embodiment, by setting a height threshold, vehicles whose height is less than or equal to the set height threshold are prompted to choose lanes other than the lane farthest from the camera to travel, thereby avoiding the vehicle being blocked by vehicles in other lanes and improving the integrity of vehicle positioning.
[0091] In an exemplary embodiment, the method further includes:
[0092] S51, extracting a vehicle point cloud feature of each vehicle in a group of vehicles from point cloud data collected by a multi-line laser, wherein the multi-line laser is set at an entrance position and / or an exit position of the target channel;
[0093] S52, extracting reference vehicle point cloud features of the target vehicle from the point cloud data collected by the single-line laser;
[0094] S53, performing feature matching on the reference vehicle point cloud features and the vehicle point cloud features of each vehicle to obtain target vehicle point cloud data that matches the reference vehicle point cloud features;
[0095] S54 , calibrating target vehicle information of the target vehicle using the target vehicle point cloud data, wherein the target vehicle information includes vehicle information of the target vehicle extracted from a vehicle image of the target vehicle captured by a camera.
[0096] The camera can create vehicle information based on the collected vehicle data, for example, creating a vehicle queue (or vehicle tracking queue information). The vehicle queue contains a variety of vehicle information, including but not limited to vehicle model, lane, speed, location, etc. In addition to the combination of camera and single-line laser, other detection components can also be set at the entrance and exit of the target channel, such as multi-line laser (multi-line lidar). The multi-line laser at the entrance can scan the 3D point cloud data of the vehicle and identify the vehicle point cloud feature A (or vehicle laser feature A) through the point cloud vehicle feature algorithm, including the vehicle's contour features, texture features, size features, etc. The 3D point cloud data of the vehicle collected by the multi-line laser at the exit can be exported through the vehicle result summary algorithm. The vehicle information is summarized and the queue is maintained through the vehicle result summary algorithm, and the vehicle statistics are output and reported.
[0097] For the multi-line laser set at the entrance and exit positions, the vehicle point cloud features of each vehicle in a group of vehicles can be extracted from the point cloud data collected by the multi-line laser. The multi-line laser is set at the entrance position and / or the exit position of the target channel. A group of vehicles may include the target vehicle and may also include other vehicles except the target vehicle.
[0098] In addition to outputting the vehicle's 3D coordinates P1 (x1, y1, z1) to the camera and auxiliary camera to restore the vehicle's 3D coordinates, the single-line laser can also be calibrated with the camera. Furthermore, it can assist in matching the following features to improve the vehicle's information: vehicle point cloud features extracted from the point cloud data collected by the multi-line laser, and vehicle information extracted from the vehicle image collected by the camera, i.e., the aforementioned vehicle queue. To this end, the reference vehicle point cloud features of the target vehicle can be extracted from the point cloud data collected by the single-line laser. For example, the vehicle point cloud feature B of the vehicle can be collected and extracted by the single-line laser.
[0099] By matching the reference vehicle point cloud features with the vehicle point cloud features of each vehicle, the vehicle point cloud features of the target vehicle can be determined, that is, the target vehicle point cloud data that matches the reference vehicle point cloud features. For example, the vehicle point cloud feature B identified by a single-line laser is matched with the vehicle point cloud feature A collected and extracted by a multi-line laser, resulting in a matching result R1. Based on the one-to-one correspondence between the vehicle point cloud feature B and the vehicle image feature C collected and extracted by the camera, the corresponding relationship result R2 can be determined. Through the results R1 and R2, the one-to-one correspondence R3 between the vehicle point cloud feature A collected and extracted by the multi-line laser and the vehicle image feature C collected and extracted by the camera can be determined. In this way, the multi-line point cloud data of each vehicle scanned by the multi-line laser can be found.
[0100] Since both the target vehicle point cloud data and the target vehicle information correspond to the target vehicle, the target vehicle information can be calibrated using the target vehicle point cloud data. Here, the target vehicle information includes vehicle information of the target vehicle extracted from the vehicle image of the target vehicle captured by the camera. While the target vehicle information can be extracted from the vehicle image of the target vehicle captured by the camera, other types of information can be included during creation, such as vehicle point cloud features. Vehicle point cloud features can be added to the target vehicle information during the calibration process or at other times.
[0101] For example, the camera's vehicle tracking queue information can be calibrated using correspondence R3. That is, the multi-line point cloud data is used to further correct the 3D point cloud data and coordinate data of the vehicles in the camera queue, thereby calibrating the camera queue information. Calibration can be performed by generating a correspondence R3 for each camera and single-line laser set that the vehicle passes through during travel. For the restored 3D point cloud data CPC and coordinate data CLA of the vehicles in the camera queue, correspondence R3 is used to find the multi-line point cloud data PC of the vehicle scanned by the multi-line lidar at the tunnel entrance. This multi-line point cloud data PC is then used to correct the 3D point cloud data CPC and coordinate data CLA of the vehicles in the camera queue.
[0102] Through this embodiment, the vehicle information extracted from the vehicle image captured by the camera is calibrated using the vehicle data captured by the multi-line laser set at the entrance and exit of the channel, thereby improving the accuracy of determining the vehicle information.
[0103] The following is an explanation of the method for positioning a vehicle in a channel in an embodiment of the present application with reference to an optional example. In this optional example, the target channel is a tunnel, and the multi-line laser is a multi-line laser radar.
[0104] This optional example provides a solution for positioning vehicles in a tunnel. A multi-line laser radar is installed at the entrance of the tunnel to identify precise initial information such as vehicle point cloud features and vehicle model. Cameras are installed at regular intervals in the tunnel to track vehicles. At the same time, single-line lasers are installed at regular intervals in the tunnel. The installation locations of the single-line lasers are the same as those of the cameras, and they correspond one-to-one. They cooperate with the cameras to restore the 3D coordinates of the vehicle, identify the vehicle's point cloud features, and calibrate the camera's vehicle queue information. A multi-line laser radar is installed at the exit of the tunnel to identify precise vehicle features, vehicle model, and other end information.
[0105] Combine Figure 5 As shown, the process of the method for positioning a vehicle in a channel in this optional example may include the following steps:
[0106] Step S502: Detecting that a vehicle enters a tunnel.
[0107] In step S504, at the tunnel entrance, the vehicle is positioned and tracked by a multi-line laser. At this time, the multi-line laser radar can collect multi-line point cloud data and extract the vehicle point cloud feature A through the point cloud vehicle feature algorithm.
[0108] Step S506: In the tunnel, the vehicle is tracked by cameras at intervals. In the tunnel, the image vehicle tracking algorithm is used to match and track the vehicle in the overlapping area according to the vehicle image feature C, and the real-time value of vehicle tracking is output and reported.
[0109] Step S508: Calibrate each set of single-line lasers and cameras using a single-line laser and camera calibration algorithm. The calibration can be performed when the camera and single-line laser are first used. After the calibration is successful, the subsequent vehicle positioning process only needs to use the calibrated coordinate alignment parameters.
[0110] In step S510, the vehicle's 3D coordinates are restored using a single-line laser installed in correspondence with the camera. Vehicle image data is captured within the tunnel through video, vehicles are tracked, and a vehicle queue is maintained. The vehicle queue includes information such as vehicle type, lane, speed, location, vehicle point cloud feature A, and vehicle image feature C. The vehicle's 3D coordinate restoration algorithm restores the vehicle's 3D coordinates based on the calibration information of the single-line laser and camera, the single-line point cloud coordinates, and the image.
[0111] At the same time, a single-line laser can collect single-line point cloud data (cross-sectional point cloud data) and extract vehicle point cloud feature B using a point cloud vehicle feature algorithm. Vehicle point cloud feature B comprises 3D point cloud data features composed of multiple 2D cross-sectional point cloud data of the same vehicle, including the vehicle's contour, texture, and size features. Based on vehicle point cloud feature B, a vehicle queue correction algorithm can be used to match the camera queue with vehicle point cloud feature A, thereby correcting the vehicle queue using vehicle point cloud feature A.
[0112] Step S512: At the tunnel exit, a vehicle summary result is outputted through a multi-line laser.
[0113] This optional example uses a single-line laser combined with a camera for vehicle positioning and tracking. This provides a solution for in-tunnel camera and single-line LiDAR calibration, 3D coordinate restoration, and vehicle positioning and tracking. This solution provides real-time reporting of vehicle positioning and tracking status within the tunnel. Compared to multi-line laser tracking, this solution maintains positioning accuracy while reducing vehicle positioning costs and facilitating implementation. Compared to video tunnel tracking, it offers higher tracking and positioning accuracy.
[0114] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0115] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM (Read-Only Memory, Read-Only Memory) / RAM (Random Access Memory, Random Access Memory), a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.
[0116] According to another aspect of the embodiments of the present application, a vehicle positioning system for a channel is provided for implementing the above-mentioned vehicle positioning method for a channel. The vehicle positioning system for a channel may include:
[0117] Single-line laser: the laser cross section of a single-line laser is perpendicular to the ground;
[0118] The camera,camera and single-line laser are set at the same position of the target channel;
[0119] A data processing component is used to obtain a reference vehicle position of a target vehicle in a target channel, wherein the reference vehicle position is the three-dimensional coordinate of the target vehicle output by a single-line laser when the target vehicle passes through the laser section; obtain a vehicle driving trajectory of the target vehicle within the camera cone of view of the camera; and based on the reference vehicle position, restore the vehicle driving trajectory to the vehicle three-dimensional coordinates to perform three-dimensional positioning of the target vehicle.
[0120] Through the above-mentioned vehicle positioning system in the channel, a reference vehicle position of the target vehicle in the target channel is obtained, wherein the reference vehicle position is the three-dimensional coordinate of the target vehicle output by the single-line laser when the target vehicle passes through the laser section of the single-line laser, and the laser section is perpendicular to the ground; the vehicle driving trajectory of the target vehicle in the camera cone of the camera is obtained, wherein the single-line laser and the camera are set at the same position in the target channel; based on the reference vehicle position, the vehicle driving trajectory is restored to the vehicle three-dimensional coordinates to perform three-dimensional positioning of the target vehicle, which solves the problem of high cost of vehicle positioning in the related art of using multi-line laser radar for vehicle positioning, and reduces the cost of vehicle positioning.
[0121] In an exemplary embodiment, the data processing component is further used to, after obtaining the reference vehicle position of the target vehicle in the target channel, convert the reference vehicle position into vehicle position information within the camera's viewing cone based on the coordinate alignment parameters of the single-line laser and the camera, wherein the vehicle position information includes the vehicle position of the target vehicle within the camera's viewing cone, the horizontal angle between the target vehicle and the camera's viewing cone, and the vertical angle between the target vehicle and the camera's viewing cone.
[0122] In an exemplary embodiment, the data processing component is further used to obtain a set of calibration lines and an angle corresponding to each calibration line in the set of calibration lines before converting the reference vehicle position into vehicle position information within the camera's field of view according to the coordinate alignment parameters of the single-line laser and the camera, wherein each calibration line is located within the camera's field of view and is perpendicular to the driving direction of the target channel, and the angle corresponding to each calibration line is the angle between a plane passing through each calibration line and the camera's camera position and a target plane passing through the camera's field of view centerline and the camera's position, and the set of calibration lines are parallel to each other; obtain a vehicle stitched image and a radar point corresponding to each calibration line. Cloud data, wherein a vehicle stitching image corresponding to each calibration line is an image obtained by stitching image points corresponding to each calibration line in a set of vehicle images, a set of vehicle images is a set of vehicle images captured by a camera as the reference vehicle passes through the camera's field of view, and radar point cloud data is point cloud data of the reference vehicle scanned by a single-line laser; the radar point cloud data is projected onto a two-dimensional plane at the camera's installation angle to obtain a two-dimensional point cloud map; a calibration line is selected from a set of calibration lines, the corresponding vehicle stitching image having the highest similarity to the two-dimensional point cloud map, and the selected calibration line and the angle corresponding to the selected calibration line are determined as coordinate alignment parameters.
[0123] In an exemplary embodiment, the data processing component is also used to obtain camera images within preset angle ranges on both sides of the center line of the viewing cone, wherein the target plane and the camera image; determine a set of calibration lines and the angle corresponding to each calibration line in the camera image, wherein the set of calibration lines includes the center line of the viewing cone, and the distance between two adjacent calibration lines in the set of calibration lines is equal, or, in a set of planes obtained by each calibration line and the camera position, the angles between adjacent planes are equal.
[0124] In an exemplary embodiment, there are multiple cameras and multiple single-line lasers, each camera corresponds to a single-line laser, different cameras are set at different positions of the target channel, and the camera cones of two adjacent cameras partially overlap.
[0125] In an exemplary embodiment, the installation angle of the camera is half of the sum of the maximum angle between the edge of the vertical field of view of the camera and the vertical direction of the ground and the minimum angle between the edge of the vertical field of view of the camera and the vertical direction of the ground; wherein the maximum angle is determined based on the farthest imaging distance of the camera on the ground and the camera height of the camera, and the minimum angle is determined based on the distance between the camera and the nearest lane and the camera height; the target channel includes multiple lanes, the nearest lane is the lane closest to the camera among the multiple channels, and the distance between the camera and the nearest lane is the distance between the camera and the nearest lane in the vertical direction of the driving direction of the target channel; the farthest imaging distance is determined based on the camera height, the preset vehicle height, the total width of all lanes in the target channel, and the distance between the camera and the nearest lane, and the farthest imaging distance is the distance between the farthest imaging point of the camera in the vertical direction and the camera in the vertical direction.
[0126] In an exemplary embodiment, the above-mentioned positioning system also includes: an information sending component, which is used to send lane prompt information to the target vehicle when the vehicle height of the target vehicle is less than or equal to a preset height threshold, wherein the target channel includes multiple lanes, and the lane prompt information is used to prompt the target vehicle to select other lanes among the multiple lanes except the lane farthest from the camera for driving.
[0127] In an exemplary embodiment, the data processing component is further used to extract vehicle point cloud features of each vehicle in a group of vehicles from point cloud data collected by a multi-line laser, wherein the multi-line laser is set at the entrance position and / or the exit position of the target channel; extract reference vehicle point cloud features of the target vehicle from the point cloud data collected by the single-line laser; perform feature matching on the reference vehicle point cloud features with the vehicle point cloud features of each vehicle to obtain target vehicle point cloud data that matches the reference vehicle point cloud features; and use the target vehicle point cloud data to calibrate target vehicle information of the target vehicle, wherein the target vehicle information includes vehicle information of the target vehicle extracted from the vehicle image of the target vehicle collected by the camera.
[0128] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. Figure 1 The hardware environment shown can be implemented through software or hardware, wherein the hardware environment includes a network environment.
[0129] According to another aspect of the embodiments of the present application, a storage medium is further provided. Optionally, in this embodiment, the storage medium can be used to execute the program code of any of the above-mentioned methods for locating a vehicle in a channel in the embodiments of the present application.
[0130] Optionally, in this embodiment, the above-mentioned storage medium may be located on at least one network device among the multiple network devices in the network shown in the above-mentioned embodiment.
[0131] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps:
[0132] S1, obtaining a reference vehicle position of a target vehicle in a target channel, wherein the reference vehicle position is a three-dimensional coordinate of the target vehicle output by a single-line laser when the target vehicle passes through a laser section of the single-line laser, and the laser section is perpendicular to the ground;
[0133] S2, obtaining the vehicle trajectory of the target vehicle within the camera cone of the camera, wherein the single-line laser and the camera are set at the same position of the target channel;
[0134] S3, based on the reference vehicle position, restore the vehicle's driving trajectory to the vehicle's three-dimensional coordinates to perform three-dimensional positioning of the target vehicle.
[0135] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, which will not be described in detail in this embodiment.
[0136] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a ROM, a RAM, a mobile hard disk, a magnetic disk, or an optical disk.
[0137] According to another aspect of the embodiment of the present application, an electronic device for implementing the above-mentioned method for positioning a vehicle in a channel is also provided. The electronic device may be a server, a terminal, or a combination thereof.
[0138] Figure 6 is a structural block diagram of an optional electronic device according to an embodiment of the present application, such as Figure 6 As shown, it includes a processor 602, a communication interface 604, a memory 606 and a communication bus 608, wherein the processor 602, the communication interface 604 and the memory 606 communicate with each other through the communication bus 608, wherein,
[0139] Memory 606, for storing computer programs;
[0140] The processor 602 is configured to execute the computer program stored in the memory 606 to implement the following steps:
[0141] S1, obtaining a reference vehicle position of a target vehicle in a target channel, wherein the reference vehicle position is a three-dimensional coordinate of the target vehicle output by a single-line laser when the target vehicle passes through a laser section of the single-line laser, and the laser section is perpendicular to the ground;
[0142] S2, obtaining the vehicle trajectory of the target vehicle within the camera cone of the camera, wherein the single-line laser and the camera are set at the same position of the target channel;
[0143] S3, based on the reference vehicle position, restore the vehicle's driving trajectory to the vehicle's three-dimensional coordinates to perform three-dimensional positioning of the target vehicle.
[0144] Optionally, the communication bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 The communication interface is used for communication between the electronic device and other devices.
[0145] The memory may include RAM, or may include non-volatile memory, such as at least one disk memory. Alternatively, the memory may also be at least one storage device located away from the aforementioned processor.
[0146] The above-mentioned processor can be a general-purpose processor, including but not limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signal Processing), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0147] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0148] It can be understood by those skilled in the art that Figure 6 The structure shown is for illustration only. The device for implementing the above-mentioned method for locating vehicles in the channel may be a terminal device, which may be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Figure 6 It does not limit the structure of the above electronic device. For example, the electronic device may also include Figure 6 More or fewer components (such as network interfaces, display devices, etc.) shown in, or with Figure 6 Different configurations shown.
[0149] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which can include: a flash drive, ROM, RAM, a magnetic disk or an optical disk, etc.
[0150] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0151] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above-mentioned computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application.
[0152] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0153] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, and can be electrical or other forms.
[0154] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected based on actual needs to achieve the purpose of the solution provided in this embodiment.
[0155] In addition, the functional units in the various embodiments of the present application may be integrated into a processing unit, or each unit may exist physically separately, or at least two units may be integrated into a single unit. The above-mentioned integrated units may be implemented in the form of hardware or software functional units.
[0156] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for positioning a vehicle in a channel, characterized in that: include: Obtaining a reference vehicle position of a target vehicle in a target channel, wherein the reference vehicle position is a three-dimensional coordinate of the target vehicle output by the single-line laser when the target vehicle passes through a laser cross section of the single-line laser, wherein the laser cross section is perpendicular to the ground; Obtaining a vehicle trajectory of the target vehicle within a camera viewing cone of a camera, wherein the single-line laser and the camera are arranged at the same position of the target channel; Based on the reference vehicle position, the vehicle driving trajectory is restored to the vehicle three-dimensional coordinates to perform three-dimensional positioning of the target vehicle.
2. The method according to claim 1, characterized in that After obtaining the reference vehicle position of the target vehicle in the target channel, the method further includes: The reference vehicle position is converted into vehicle position information within the camera viewing cone according to coordinate alignment parameters of the single-line laser and the camera, wherein the vehicle position information includes the vehicle position of the target vehicle within the camera viewing cone, the horizontal angle between the target vehicle and the camera viewing cone, and the vertical angle between the target vehicle and the camera viewing cone.
3. The method according to claim 2, characterized in that Before converting the reference vehicle position into vehicle position information within the camera viewing cone according to the coordinate alignment parameters of the single-line laser and the camera, the method further includes: Obtaining a set of calibration lines and an angle corresponding to each calibration line in the set of calibration lines, wherein each calibration line is located within the camera's visual cone and is perpendicular to the driving direction of the target channel, and the angle corresponding to each calibration line is the angle between a plane passing through each calibration line and the camera position of the camera and a target plane passing through a centerline of the camera's visual cone and the camera position, and the set of calibration lines are parallel to each other; Obtaining a vehicle stitched image and radar point cloud data corresponding to each calibration line, wherein the vehicle stitched image corresponding to each calibration line is an image obtained by stitching image points corresponding to each calibration line in a set of vehicle images, the set of vehicle images being vehicle images captured by the camera as the reference vehicle passes through the camera's field of view, and the radar point cloud data being point cloud data of the reference vehicle scanned by the single-line laser; Projecting the radar point cloud data onto a two-dimensional plane at the installation angle of the camera to obtain a two-dimensional point cloud image; A calibration line whose corresponding vehicle stitching image has the highest similarity with the two-dimensional point cloud image is selected from the set of calibration lines, and the selected calibration line and an angle corresponding to the selected calibration line are determined as the coordinate alignment parameter.
4. The method according to claim 3, characterized in that The acquiring of a set of calibration lines and an angle corresponding to each calibration line in the set of calibration lines includes: Acquire camera images within preset angle ranges on both sides of the center line of the viewing cone, wherein the intersection of the target plane and the camera image is the center line of the viewing cone; Determining a set of calibration lines and an angle corresponding to each calibration line within the camera image, wherein the set of calibration lines includes the centerline of the viewing cone, a distance between two adjacent calibration lines in the set of calibration lines is equal, or an angle between adjacent planes in a set of planes obtained by each calibration line and the camera position is equal.
5. The method according to claim 1, wherein There are multiple cameras and multiple single-line lasers, each camera corresponds to one single-line laser, different cameras are set at different positions of the target channel, and the camera cones of two adjacent cameras partially overlap.
6. The method according to claim 1, characterized in that The installation angle of the camera is half of the sum of the maximum angle between the edge of the vertical field of view of the camera and the vertical direction of the ground and the minimum angle between the edge of the vertical field of view of the camera and the vertical direction of the ground; The maximum angle is determined based on the maximum imaging distance of the camera on the ground and the camera height, and the minimum angle is determined based on the distance between the camera and the nearest lane and the camera height; The target channel includes multiple lanes, the nearest lane is a lane closest to the camera among the multiple lanes, and the distance between the camera and the nearest lane is the distance between the camera and the nearest lane in a direction perpendicular to the driving direction of the target channel; The farthest imaging distance is determined based on the camera height, the preset vehicle height, the total width of all lanes in the target channel, and the distance between the camera and the nearest lane. The farthest imaging distance is the distance between the farthest imaging point of the camera in the vertical direction and the camera in the vertical direction.
7. The method according to claim 1, characterized in that The method further comprises: When the vehicle height of the target vehicle is less than or equal to a preset height threshold, lane prompt information is sent to the target vehicle, wherein the target channel includes multiple lanes, and the lane prompt information is used to prompt the target vehicle to select other lanes among the multiple lanes except the lane farthest from the camera for driving.
8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: Extracting a vehicle point cloud feature of each vehicle in a group of vehicles from point cloud data collected by a multi-line laser, wherein the multi-line laser is set at an entrance position of the target channel and / or an exit position of the target channel; Extracting reference vehicle point cloud features of the target vehicle from the point cloud data collected by the single-line laser; Performing feature matching on the reference vehicle point cloud features and the vehicle point cloud features of each vehicle to obtain target vehicle point cloud data that matches the reference vehicle point cloud features; Target vehicle information of the target vehicle is calibrated using the target vehicle point cloud data, wherein the target vehicle information includes vehicle information of the target vehicle extracted from a vehicle image of the target vehicle captured by the camera.
9. A vehicle positioning system in a channel, characterized in that: include: A single-line laser, wherein the laser cross section of the single-line laser is perpendicular to the ground; A camera, wherein the camera and the single-line laser are arranged at the same position of the target channel; A data processing component is used to obtain a reference vehicle position of the target vehicle in the target channel, wherein the reference vehicle position is the three-dimensional coordinates of the target vehicle output by the single-line laser when the target vehicle passes through the laser section; obtain a vehicle driving trajectory of the target vehicle within the camera cone of view of the camera; and based on the reference vehicle position, restore the vehicle driving trajectory to vehicle three-dimensional coordinates to perform three-dimensional positioning of the target vehicle.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method according to any one of claims 1 to 8 when executed.
11. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 8 through the computer program.
Citation Information
Patent Citations
Vector-relation-based method for calibrating single-line laser radar and CCD camera
CN103837869A
Tray recognizing and positioning method for unmanned forklift
CN112017240A