Vehicle positioning method, device and equipment and storage medium

By using cameras and traffic light information on autonomous driving vehicles, the high-precision positioning of the vehicle is calculated, and the problem of insufficient accuracy of the visual imaging positioning method is solved, low-cost and high-precision vehicle positioning is achieved, which is suitable for autonomous driving in high-speed scenarios.

CN119274373APending Publication Date: 2025-01-07INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411303040.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

In the existing autonomous driving technology, the vehicle positioning method based on visual imaging has problems such as insufficient accuracy and the need for high-precision map coordination, and cannot be used as a reliable low-cost and high-precision positioning method.

Method used

By installing a camera on the vehicle, images containing traffic lights are collected, the vertical distance between the camera and traffic lights is calculated using the light source diameter of the traffic light and the preset point position coordinates, and vehicle positioning is performed based on the projection coordinates to achieve high-precision real-time positioning at millimeter level.

Benefits of technology

Low-cost and high-precision vehicle positioning is achieved, reducing dependence on high-precision maps, reducing positioning costs, and achieving autonomous driving positioning in high-speed scenarios, reducing the construction cost of additional sensors and high-precision point cloud maps.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119274373A_ABST
    Figure CN119274373A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a vehicle positioning method and device, equipment and a storage medium, and the method comprises the steps: collecting an image through a camera, and enabling the image to comprise traffic lights; obtaining the vertical distance between the camera and the traffic light according to the position coordinates of the traffic light at the plurality of first preset points on the image, the focal length of the camera and the light source diameter; based on the position coordinates of the plurality of first preset points and the plurality of spatial position coordinates of the traffic light, calculating projection coordinates of the camera on a plane where the traffic light is located; and positioning the vehicle according to the spatial position coordinate of the camera, wherein the spatial position coordinate of the camera is obtained according to the vertical distance, the projection coordinate and the spatial position coordinate of the traffic light. According to the embodiment of the invention, the traffic light information generally existing in urban roads is utilized, and the low-cost camera is combined, so that the positioning cost is remarkably reduced, good positioning precision can be ensured, and automatic driving positioning can be realized in a high-speed scene without depending on a high-precision map.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of autonomous driving technology, and in particular to a vehicle positioning method and device, an electronic device, and a storage medium. Background Art

[0002] In the autonomous driving system, accurate acquisition of the vehicle's current location information is crucial, as it is the basis for subsequent planning, decision-making and other autonomous driving services. Although there are a variety of vehicle positioning systems based on different principles in the prior art, each has its limitations. For example, the positioning method based on the Global Positioning System (GPS) may have reduced accuracy due to signal blocking and multipath propagation in an environment with tall buildings in the city; although inertial navigation has the advantages of automatic operation, high short-term accuracy and strong anti-interference ability, long-term use will lead to increased cumulative errors, making it difficult to independently provide long-term precise positioning; LiDAR positioning can obtain the accurate position of the vehicle relative to the map by measuring the three-dimensional structure of the surrounding environment and the position of obstacles, but it requires expensive equipment and high-precision maps, which is costly.

[0003] In contrast, the visual imaging positioning system has shown great application potential due to its low price, no need for high-precision maps, and high positioning accuracy. Although there are many positioning methods based on visual imaging in the field of autonomous driving, they generally have problems such as insufficient accuracy and the need for high-precision maps, and cannot yet be used as a reliable positioning method.

[0004] Therefore, how to provide a low-cost, high-precision positioning method based on visual imaging that does not require the cooperation of high-precision maps is an urgent problem to be solved in this field. Summary of the invention

[0005] The embodiment of the present application provides a vehicle positioning method to solve the problem of how to provide a low-cost, high-precision positioning method based on visual imaging that does not require the cooperation of high-precision maps.

[0006] Correspondingly, the embodiments of the present application also provide a vehicle positioning device, an electronic device and a storage medium to ensure the implementation and application of the above method.

[0007] In order to solve the above problem, an embodiment of the present application discloses a vehicle positioning method, wherein a camera is installed on the vehicle, and the method comprises:

[0008] The camera collects an image, wherein the image includes a traffic light, and the traffic light has a corresponding light source diameter;

[0009] Obtaining a vertical distance between the camera and the traffic light according to the position coordinates of a plurality of first preset points of the traffic light on the image, the focal length of the camera, and the diameter of the light source;

[0010] Based on the position coordinates of the plurality of first preset points and the plurality of spatial position coordinates of the traffic light, the projection coordinates of the camera on the plane where the traffic light is located are calculated;

[0011] The vehicle is positioned according to the spatial position coordinates of the camera, where the spatial position coordinates of the camera are obtained according to the vertical distance, the projection coordinates and the spatial position coordinates of the traffic light.

[0012] In an optional embodiment of the present application, obtaining the vertical distance between the camera and the traffic light according to the position coordinates of a plurality of first preset points of the traffic light on the image, the focal length of the camera, and the diameter of the light source includes:

[0013] respectively calculating the position distance between the position coordinates of each of the first preset points and the position coordinates of the remaining first preset points;

[0014] The farthest position distance among the position distances is used as the maximum distance between the first preset points;

[0015] The vertical distance between the camera and the traffic light is obtained according to the maximum distance, the focal length of the camera and the diameter of the light source.

[0016] In an optional embodiment of the present application, the calculating, based on the position coordinates of the plurality of first preset points and the plurality of spatial position coordinates of the traffic light, the projection coordinates of the camera on the plane where the traffic light is located includes:

[0017] Based on the light source diameter, the vertical distance, the focal length of the camera, the position coordinates of each of the first preset points, and the spatial position coordinates of the traffic light corresponding to each of the first preset points, obtaining a projection coordinate equation corresponding to each of the first preset points;

[0018] According to the projection coordinate equations corresponding to all the first preset points, the projection coordinates of the camera on the plane where the traffic light is located are calculated using the least squares method;

[0019] Wherein, the projection coordinate equation corresponding to each of the first preset points is:

[0020] C pi (xx lamp i ) 2 +C pi (yy lamp i) 2 -h image 2

[0021]

[0022] C pi is the projection parameter corresponding to the i-th first preset point, x is the horizontal coordinate of the projection coordinate of the camera on the plane where the traffic light is located, y is the vertical coordinate of the projection coordinate of the camera on the plane where the traffic light is located, and x lamp i is the horizontal coordinate of the spatial position coordinate of the traffic light corresponding to the i-th first preset point, y lamp i is the ordinate of the spatial position coordinate of the traffic light corresponding to the i-th first preset point, x′ i is the horizontal coordinate of the position coordinate of the i-th first preset point, y′ i is the ordinate of the position coordinate of the i-th first preset point, h image is the vertical distance, f image is the diameter of the light source.

[0023] In an optional embodiment of the present application, after collecting the image by the camera, the method further includes:

[0024] Acquire the position information of the camera, wherein the position information of the camera at least includes the azimuth and pitch angle of the camera;

[0025] Acquire initial position coordinates of a plurality of first preset points of the traffic light from the image;

[0026] The initial position coordinates of the plurality of first preset points are corrected according to the azimuth angle and the pitch angle to obtain the position coordinates of the plurality of first preset points of the traffic light on the image.

[0027] In an optional embodiment of the present application, the traffic light includes a target signal light that is lit at the current moment, and the acquiring the initial position coordinates of a plurality of first preset points of the traffic light from the image includes:

[0028] Identify the target traffic light in the image that is currently lit;

[0029] Convert the image into a binary image, and perform an opening operation on the binary image to obtain a preprocessed image;

[0030] The initial position coordinates of the plurality of first preset points of the target signal light are acquired from the preprocessed image.

[0031] In an optional embodiment of the present application, the vehicle has a corresponding vehicle coordinate system, the camera has a corresponding camera coordinate system, the vehicle coordinate system and the camera coordinate system have a posture relationship, and the positioning of the vehicle according to the spatial position coordinates of the camera includes:

[0032] Obtaining the position information and initial positioning information of the vehicle;

[0033] Based on the posture information of the vehicle and the posture relationship, obtaining the spatial position coordinates of the vehicle according to the spatial position coordinates of the camera;

[0034] The initial positioning information is updated using the spatial position coordinates of the vehicle to obtain the positioning information of the vehicle.

[0035] In an optional embodiment of the present application, the initial position coordinates of the plurality of first preset points of the target signal light include at least: the position coordinates of the center point of the target signal light on the preprocessed image, and the position coordinates of the vertices of the circumscribed rectangle of the target signal light on the preprocessed image;

[0036] The spatial position coordinates of the traffic light include at least: the spatial position coordinates of the center point of the target traffic light, and the spatial position coordinates of a second preset point of the target traffic light, wherein the second preset point is obtained based on the spatial position coordinates of the center point of the target traffic light and the diameter of the light source.

[0037] The embodiment of the present application also discloses a vehicle positioning device, wherein a camera is installed on the vehicle, and the device comprises:

[0038] An image acquisition module, used for acquiring an image through the camera, wherein the image includes a traffic light, and the traffic light has a corresponding light source diameter;

[0039] A vertical distance calculation module, used to obtain the vertical distance between the camera and the traffic light according to the position coordinates of a plurality of first preset points of the traffic light on the image, the focal length of the camera and the diameter of the light source;

[0040] A projection coordinate calculation module, used to calculate the projection coordinates of the camera on the plane where the traffic light is located based on the position coordinates of the plurality of first preset points and the plurality of spatial position coordinates of the traffic light;

[0041] The vehicle positioning module is used to position the vehicle according to the spatial position coordinates of the camera, wherein the spatial position coordinates of the camera are obtained according to the vertical distance, the projection coordinates and the spatial position coordinates of the traffic light.

[0042] The embodiment of the present application also discloses an electronic device, including: a processor; and a memory, on which executable code is stored. When the executable code is executed, the processor executes the vehicle positioning method as described in one or more of the embodiments of the present application.

[0043] The embodiments of the present application also disclose one or more machine-readable media on which executable codes are stored. When the executable codes are executed, a processor executes the vehicle positioning method as described in one or more of the embodiments of the present application.

[0044] Compared with the prior art, the embodiments of the present application have the following advantages:

[0045] In the embodiment of the present application, an image is captured by a camera, and the image includes a traffic light, and the traffic light has a corresponding light source diameter; the vertical distance between the camera and the traffic light is obtained according to the position coordinates of several first preset points of the traffic light on the image, the focal length of the camera, and the light source diameter; based on the position coordinates of several first preset points and several spatial position coordinates of the traffic light, the projection coordinates of the camera on the plane where the traffic light is located are calculated; the vehicle is positioned according to the spatial position coordinates of the camera, and the spatial position coordinates of the camera are obtained according to the vertical distance, the projection coordinates, and the spatial position coordinates of the traffic light. The embodiment of the present application realizes millimeter-level high-precision real-time positioning by utilizing the traffic light information that is ubiquitous in urban roads and combining it with a low-cost camera, which not only significantly reduces the positioning cost, but also ensures good positioning accuracy. Automatic driving positioning can be achieved in high-speed scenarios without relying on high-precision maps, thereby reducing the construction cost of additional sensors and high-precision point cloud maps. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 is a flow chart of steps of an embodiment of a vehicle positioning method of the present application;

[0047] Figure 2 This is a schematic diagram of image acquisition in an embodiment of a vehicle positioning method of the present application;

[0048] Figure 3 This is a schematic diagram of vertical distance calculation of a vehicle positioning method embodiment of the present application;

[0049] Figure 4 This is a system architecture diagram of a vehicle positioning method embodiment of the present application;

[0050] Figure 5 is a structural block diagram of an embodiment of a vehicle positioning device of the present application;

[0051] Figure 6 It is a schematic diagram of the structure of a device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0052] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0053] Autonomous driving technology uses computers and sensors to enable vehicles to drive autonomously and perform driving tasks. In an autonomous driving system, it is crucial to accurately obtain the vehicle's current location information, which is the basis for subsequent planning and decision-making.

[0054] Although there are many vehicle positioning systems based on different principles, each has its limitations. For example, the positioning method based on the global positioning system (GPS) determines the three-dimensional position of the vehicle by receiving satellite signals. However, in the environment of high-rise buildings on urban roads, GPS may be affected by signal blocking or multipath propagation, resulting in a significant reduction in accuracy. Inertial navigation is an important positioning technology with the advantages of automatic operation, high short-term accuracy and strong anti-interference ability. However, as time goes by, the cumulative error of inertial navigation will gradually increase, making it difficult to provide long-term accurate positioning, so it is usually necessary to combine it with other positioning methods. LiDAR positioning uses laser beams to measure the three-dimensional structure and obstacle positions of the surrounding environment. By processing and registering the laser point cloud, the accurate position information of the vehicle relative to the map can be obtained. However, this solution requires the cooperation of expensive LiDAR equipment and high-precision point cloud maps, which is costly.

[0055] In contrast, the visual imaging positioning system has great application potential due to its low price, no need for high-precision point cloud maps, and high positioning accuracy. However, the current positioning methods based on visual imaging in the field of autonomous driving generally have problems such as insufficient accuracy and the need for high-precision maps, and visual positioning cannot be used as a reliable positioning method. For example, the positioning method based on roadside signs combined with maps requires the pre-collection and entry of a large number of signs, which increases the workload of early collection. The visual positioning method based on the lane lines on both sides of the vehicle requires a high-precision map and the position of the vehicle in the map must be known in advance to achieve positioning; another method is to use a camera to collect surrounding images and compare them with the previous frame to achieve visual odometer, but it cannot be used alone to obtain vehicle coordinates.

[0056] To this end, an embodiment of the present application proposes a vehicle positioning method to solve the problem of how to provide a low-cost, high-precision positioning method based on visual imaging that does not require the cooperation of high-precision maps.

[0057] Reference Figure 1 , is a flowchart of a vehicle positioning method embodiment of the present application, comprising the following steps:

[0058] Step 101: Capture an image through the camera, wherein the image includes a traffic light, and the traffic light has a corresponding light source diameter.

[0059] In the embodiment of the present application, a camera is installed at a fixed position of the vehicle to be positioned, and the camera is used to capture images of the road the vehicle is currently on. In the embodiment of the present application, images can be captured at a certain time interval or at a certain mileage interval, and the embodiment of the present application does not impose any restrictions on this.

[0060] In step 101, an image of the road where the vehicle is currently located is collected by a camera, and the image is recognized. When a traffic light in the image is recognized, the image is retained for subsequent positioning of the vehicle, and the light source diameter of the target signal light of the traffic light that is currently lit is obtained. In an optional embodiment, when a traffic light in the image is recognized, the target signal light that is currently lit in the traffic light is identified, and subsequent data processing will only be for the target signal light that is currently lit. For example, if the red light is currently lit, the red light is used as the target signal light for subsequent data processing, and the yellow light and green light that are not currently lit are ignored.

[0061] In an optional embodiment, when a traffic light is identified in an image, data such as the longitude and latitude of the traffic light, the height of the traffic light, and the size of the traffic light can be obtained based on a low-precision map and coarse positioning information to obtain the spatial position coordinates of the center of the traffic light. The source of the coarse positioning information can be GPS or inertial navigation positioning, etc.

[0062] Step 102: Obtain a vertical distance between the camera and the traffic light according to the position coordinates of a plurality of first preset points of the traffic light on the image, the focal length of the camera, and the diameter of the light source.

[0063] In step 102, the vertical distance between the camera and the traffic light, that is, the vertical distance between the camera and the plane where the traffic light is located, is obtained according to the position coordinates of a plurality of first preset points of the traffic light on the image, the focal length of the camera, and the diameter of the light source.

[0064] Specifically, in one embodiment, it is first necessary to obtain the position coordinates of a plurality of first preset points of the traffic light on the image. As an example, if the red light is currently on, the position O(x1, y1) of the center point of the red light on the image and the positions of the four vertices of the circumscribed rectangle of the red light on the image are obtained, R1(x2, y2), R2(x3, y3), R3(x4, y4), and R4(x5, y5), and image correction is performed on these five points to obtain O'(x1', y1'), R1'(x2', y2'), R2'(x3', y3'), R3'(x4', y4'), and R4(x5, y5), that is, the position coordinates of several first preset points of the traffic light on the image are O'(x1', y1'), R1'(x2', y2'), R2'(x3', y3'), R3'(x4', y4'), and R4(x5, y5).

[0065] After that, the position distances between the five points are calculated, and the maximum distance d between the five points is obtained by screening. max , combined with the light source diameter d lamp and the focal length f of the camera image , the vertical distance between the camera and the traffic light h image It can be calculated using formula (1):

[0066] h image =f image ×d lamp / d max (1)

[0067] Among them, h image is the vertical distance between the camera and the traffic light, f image is the focal length of the camera, d lamp is the light source diameter, d max is the maximum distance.

[0068] Step 103: Based on the position coordinates of the plurality of first preset points and the plurality of spatial position coordinates of the traffic light, calculate the projection coordinates of the camera on the plane where the traffic light is located.

[0069] In step 103, based on the position coordinates of a plurality of first preset points and a plurality of spatial position coordinates of the traffic light, the projection coordinates of the camera on the plane where the traffic light is located are calculated.

[0070] In one example, the plurality of spatial position coordinates of the traffic light include the spatial position coordinates of the center point of the target signal light and the spatial position coordinates of the second preset point of the target signal light, the second preset point being obtained based on the spatial position coordinates of the center point of the target signal light and the diameter of the light source. The plurality of spatial position coordinates of the traffic light are located on the spatial coordinate system and correspond one-to-one to the position coordinates of the first preset point.

[0071] In an optional embodiment, if the light is currently red, the spatial position coordinates A(x lamp ,y lamp ,z lamp ), and the spatial position coordinates B(x lamp -d lamp / 2,y lamp -d lamp / 2,z lamp ), C(x lamp -d lamp / 2,y lamp +d lamp / 2,z lamp ), D(x lamp +d lamp / 2,y lamp +d lamp / 2,z lamp ), E(x lamp +d lamp / 2,y lamp -d lamp / 2,z lamp ). These points correspond one-to-one with the position coordinates of several first preset points of the red light on the image, A′(x′1 y′1), B′(x′2, y′2), C′(x′3, y′3), D′(x′4, y′4), and E′(x′5, y′5). Based on this, the projection coordinates (x, y) of the camera on the plane where the traffic light is located can be calculated.

[0072] Step 104 , positioning the vehicle according to the spatial position coordinates of the camera, where the spatial position coordinates of the camera are obtained according to the vertical distance, the projection coordinates and the spatial position coordinates of the traffic light.

[0073] In step 104, the spatial position coordinates of the camera are first calculated based on the vertical distance, the projection coordinates and the spatial position coordinates of the traffic light.

[0074] In one example, the vertical distance is h image , the projection coordinates are (x, y), and the spatial position coordinates of the center of the current traffic light are A(x lamp ,y lamp ,z lamp), then the calculated spatial position coordinates of the camera can be (x lamp +h image ,y lamp +x,z lamp +y), the spatial position coordinates of the camera and the spatial position coordinates of the traffic light are both located in the spatial coordinate system.

[0075] After obtaining the spatial position coordinates of the camera, the vehicle can be positioned. In one embodiment, the vehicle has a corresponding vehicle coordinate system, and the camera also has a corresponding camera coordinate system. There is a posture relationship between the vehicle coordinate system and the camera coordinate system, that is, a rotation and translation relationship. Therefore, through the posture relationship between the vehicle coordinate system and the camera coordinate system, the spatial position coordinates of the vehicle can be further obtained according to the posture information of the vehicle and the spatial position coordinates of the camera, thereby obtaining the positioning information of the vehicle.

[0076] Reference Figure 2 , is a schematic diagram of image acquisition in an embodiment of a vehicle positioning method of the present application.

[0077] like Figure 2 As shown, a camera is installed on the vehicle, and the image taken by the camera includes traffic lights. The camera coordinate system corresponding to the camera takes the camera as the origin, the positive direction of the y-axis points to the rear of the vehicle, the positive direction of the x-axis points to the left of the vehicle's forward direction, and the positive direction of the z-axis points to the top of the vehicle; the vehicle coordinate system is not shown in the figure, and can take the center of the rear axle of the vehicle as the origin, the positive direction of the x-axis points to the front of the vehicle's forward direction, the positive direction of the y-axis points to the left of the vehicle's forward direction, and the positive direction of the z-axis points to the top of the vehicle. The posture relationship between the vehicle coordinate system and the camera coordinate system, that is, the rotation and translation relationship, is solved in advance, so that after obtaining the spatial position coordinates of the camera based on the image containing the traffic lights, the spatial position coordinates of the vehicle can be calculated in combination with the posture information of the vehicle. Figure 2 The pose relationship between the vehicle coordinate system and the camera coordinate system is only for example. Those skilled in the art can set the vehicle coordinate system and the camera coordinate system respectively according to actual needs and solve the pose relationship between them.

[0078] In the embodiment of the present application, an image is captured by a camera, and the image includes a traffic light, and the traffic light has a corresponding light source diameter; the vertical distance between the camera and the traffic light is obtained according to the position coordinates of several first preset points of the traffic light on the image, the focal length of the camera, and the light source diameter; based on the position coordinates of several first preset points and several spatial position coordinates of the traffic light, the projection coordinates of the camera on the plane where the traffic light is located are calculated; the vehicle is positioned according to the spatial position coordinates of the camera, and the spatial position coordinates of the camera are obtained according to the vertical distance, the projection coordinates, and the spatial position coordinates of the traffic light. The embodiment of the present application realizes millimeter-level high-precision real-time positioning by utilizing the traffic light information that is ubiquitous in urban roads and combining it with a low-cost camera, which not only significantly reduces the positioning cost, but also ensures good positioning accuracy. Automatic driving positioning can be achieved in high-speed scenarios without relying on high-precision maps, thereby reducing the construction cost of additional sensors and high-precision point cloud maps.

[0079] In an optional embodiment of the present application, obtaining the vertical distance between the camera and the traffic light according to the position coordinates of a plurality of first preset points of the traffic light on the image, the focal length of the camera, and the diameter of the light source includes:

[0080] respectively calculating the position distance between the position coordinates of each of the first preset points and the position coordinates of the remaining first preset points;

[0081] The farthest position distance among the position distances is used as the maximum distance between the first preset points;

[0082] The vertical distance between the camera and the traffic light is obtained according to the maximum distance, the focal length of the camera and the diameter of the light source.

[0083] In this embodiment, the position distances between the position coordinates of each first preset point and the position coordinates of the remaining first preset points are calculated respectively, and the farthest position distance among the position distances is taken as the maximum distance between the first preset points. Then, based on the maximum distance, the focal length of the camera and the diameter of the light source, the vertical distance between the camera and the traffic light is calculated.

[0084] Reference Figure 3 , is a schematic diagram of vertical distance calculation of an embodiment of a vehicle positioning method of the present application.

[0085] like Figure 3 As shown, the lens is the camera, the center of the camera is point O, and the focal length is f image The image captured by the camera on the imaging surface has a corresponding image coordinate system, and the position coordinates of a plurality of first preset points on the image are located on the image coordinate system.

[0086] If the light currently on in the image is red, obtain the spatial coordinates of the center point of the red light (x lamp ,y lamp ,z lamp ), and then according to the light source diameter d lamp Get the spatial position coordinates B(x lamp -d lamp / 2,y lamp -d lamp / 2,z lamp ), C(x lamp -d lamp / 2,y lamp +d lamp / 2,z lamp ), D(x lamp +d lamp / 2,y lamp +d lamp / 2,z lamp ), E(x lamp +d lamp / 2,y lamp -d lamp / 2,z lamp ); these points correspond one to one with the position coordinates of several first preset points on the image captured by the red light on the imaging surface, namely A′(x′1 y′1), B′(x′2, y′2), C′(x′3, y′3), D′(x′4, y′4), and E′(x′5, y′5).

[0087] The position distances between the position coordinates of each first preset point and the position coordinates of the other first preset points are calculated respectively, and the farthest position distance among the position distances is taken as the maximum distance d between the first preset points. max . Combined light source diameter d lamp and the focal length f of the camera image , the vertical distance between the camera and the traffic light h image The above formula (1) can be used for calculation.

[0088] The embodiment of the present application uses the maximum distance, the focal length of the camera and the diameter of the light source to calculate the vertical distance between the camera and the traffic light, which is used for subsequent positioning of the vehicle. Autonomous driving positioning can be achieved in high-speed scenarios without relying on high-precision maps, thereby reducing the cost of building additional sensors and high-precision point cloud maps.

[0089] In an optional embodiment of the present application, the calculating, based on the position coordinates of the plurality of first preset points and the plurality of spatial position coordinates of the traffic light, the projection coordinates of the camera on the plane where the traffic light is located includes:

[0090] Based on the light source diameter, the vertical distance, the focal length of the camera, the position coordinates of each of the first preset points, and the spatial position coordinates of the traffic light corresponding to each of the first preset points, obtaining a projection coordinate equation corresponding to each of the first preset points;

[0091] According to the projection coordinate equations corresponding to all the first preset points, the projection coordinates of the camera on the plane where the traffic light is located are calculated using the least squares method;

[0092] Wherein, the projection coordinate equation corresponding to each of the first preset points is:

[0093] C pi (xx lamp i ) 2 +C pi (yy lamp i ) 2 -h image 2

[0094]

[0095] C pi is the projection parameter corresponding to the i-th first preset point, x is the horizontal coordinate of the projection coordinate of the camera on the plane where the traffic light is located, y is the vertical coordinate of the projection coordinate of the camera on the plane where the traffic light is located, and x lamp i is the horizontal coordinate of the spatial position coordinate of the traffic light corresponding to the i-th first preset point, y lamp i is the ordinate of the spatial position coordinate of the traffic light corresponding to the i-th first preset point, x′ i is the horizontal coordinate of the position coordinate of the i-th first preset point, y′ i is the ordinate of the position coordinate of the i-th first preset point, h image is the vertical distance, f image is the diameter of the light source.

[0096] In this embodiment, for the position coordinates of each first preset point on the image and the spatial position coordinates of the traffic light corresponding to each first preset point, according to geometric optics and the principle of similar triangles, there is the following relationship:

[0097]

[0098] Where x is the horizontal coordinate of the projection coordinate of the camera on the plane where the traffic light is located, and y is the vertical coordinate of the projection coordinate of the camera on the plane where the traffic light is located. lamp i is the horizontal coordinate of the spatial position coordinate of the traffic light corresponding to the i-th first preset point, y lamp iis the ordinate of the spatial position coordinate of the traffic light corresponding to the i-th first preset point, x′ i is the horizontal coordinate of the position coordinate of the i-th first preset point, y′ i is the ordinate of the position coordinate of the i-th first preset point, h image is the vertical distance, f image is the diameter of the light source.

[0099] According to the above formula (2), formula (3) and formula (4) can be derived, that is, the projection coordinate equation corresponding to each first preset point:

[0100] C pi (xx lamp i ) 2 +C pi (yy lamp i ) 2 -h image 2 (3)

[0101]

[0102] Among them, C pi is the projection parameter corresponding to the i-th first preset point, x is the horizontal coordinate of the projection coordinate of the camera on the plane where the traffic light is located, y is the vertical coordinate of the projection coordinate of the camera on the plane where the traffic light is located, and x lamp i is the horizontal coordinate of the spatial position coordinate of the traffic light corresponding to the i-th first preset point, y lamp i is the ordinate of the spatial position coordinate of the traffic light corresponding to the i-th first preset point, x′ i is the horizontal coordinate of the position coordinate of the i-th first preset point, y′ i is the ordinate of the position coordinate of the i-th first preset point, h image is the vertical distance, f image is the diameter of the light source.

[0103] Therefore, in this embodiment, based on the light source diameter, the vertical distance, the focal length of the camera, the position coordinates of each first preset point, and the spatial position coordinates of the traffic light corresponding to each first preset point, the projection coordinate equation corresponding to each first preset point can be obtained, and the equation group of the projection coordinate equations corresponding to all first preset points can be obtained. In one embodiment, if there are 5 first preset points in total, the equation group can be shown as formula (5):

[0104]

[0105] Among them, C p1 , C p2 , C p3 , Cp4 , C p5 is the projection parameter corresponding to the first preset point, x is the horizontal coordinate of the projection coordinate of the camera on the plane where the traffic light is located, y is the vertical coordinate of the projection coordinate of the camera on the plane where the traffic light is located, and x lamp is the horizontal coordinate of the spatial position coordinate of the traffic light corresponding to the first preset point at the center of the traffic light in the image, y lamp is the ordinate of the spatial position coordinate of the traffic light corresponding to the first preset point at the center of the traffic light in the image, h image is the vertical distance.

[0106] At this time, formula (5) is an overdetermined equation, so the projection coordinates (x, y) of the camera on the plane where the traffic light is located can be calculated using the least squares method.

[0107] The embodiment of the present application calculates the projection coordinates of the camera on the plane where the traffic light is located according to the projection coordinate equations corresponding to all the first preset points using the least squares method, which is used for subsequent positioning of the vehicle, thereby ensuring good positioning accuracy.

[0108] In an optional embodiment of the present application, after collecting the image by the camera, the method further includes:

[0109] Acquire the position information of the camera, wherein the position information of the camera at least includes the azimuth and pitch angle of the camera;

[0110] Acquire initial position coordinates of a plurality of first preset points of the traffic light from the image;

[0111] The initial position coordinates of the plurality of first preset points are corrected according to the azimuth angle and the pitch angle to obtain the position coordinates of the plurality of first preset points of the traffic light on the image.

[0112] In this embodiment, it is also necessary to correct the initial position coordinates of the first preset point of the traffic light on the acquired image.

[0113] Specifically, the camera's position information can be obtained first. The camera's position information at least includes the camera's azimuth angle θ r and pitch angle w r The initial position coordinates of several first preset points of the traffic light are obtained from the image. In one example, the initial position coordinates of the center point of the currently lit target traffic light on the image and the initial position coordinates of the vertices of the circumscribed rectangle of the target traffic light on the image can be obtained. These initial position coordinates are located in the image coordinate system.

[0114] According to the azimuth and the pitch angle, the initial position coordinates of the first preset points are corrected to obtain the position coordinates of the first preset points of the traffic light on the image. In an example, the initial position coordinates of the first preset points can be corrected by the following formula (6):

[0115]

[0116] Among them, θ r is the azimuth angle of the camera, w r is the pitch angle of the camera, (x ca ,y ca ) is the initial position coordinate of the first preset point, (x re ,y re ) is the position coordinate of the first preset point after correction.

[0117] Formula (6) is used to correct the initial position coordinates of each first preset point, and finally the position coordinates of several first preset points of the traffic light on the image are obtained.

[0118] The embodiment of the present application corrects the initial position coordinates of the first preset point to obtain the position coordinates of several first preset points of the traffic light on the image for subsequent positioning of the vehicle, which can eliminate the influence of image imaging deformation caused by the different postures of the camera and the traffic light in space.

[0119] In an optional embodiment of the present application, the traffic light includes a target signal light that is lit at the current moment, and the acquiring the initial position coordinates of a plurality of first preset points of the traffic light from the image includes:

[0120] Identify the target traffic light in the image that is currently lit;

[0121] Convert the image into a binary image, and perform an opening operation on the binary image to obtain a preprocessed image;

[0122] The initial position coordinates of the plurality of first preset points of the target signal light are acquired from the preprocessed image.

[0123] Those skilled in the art should know that the traffic light includes three light sources: red light, yellow light and green light. In this embodiment, when the camera captures the traffic light, the traffic light includes a target signal light that is lit at the current moment.

[0124] This embodiment needs to identify the target traffic light in the image that is currently lit, and convert the image into a binary image, perform an open operation on the binary image, and obtain a preprocessed image. Then, the initial position coordinates of several first preset points of the target traffic light are obtained from the preprocessed image.

[0125] For example, if the target signal light of the traffic light in the current image that is lit at the current moment is a red light, after the image is binarized and the opening operation is used, the position coordinates of the center point of the red light on the preprocessed image and the position coordinates of the vertices of the circumscribed rectangle of the red light on the preprocessed image can be selected as the initial position coordinates of the first preset point.

[0126] The embodiment of the present application first identifies the target signal light before acquiring the initial position coordinates of the first preset point, so that the target signal light is subsequently used to locate the vehicle; and the embodiment of the present application preprocesses the image to eliminate the influence of random noise generated during the acquisition process, thereby avoiding affecting the accuracy of vehicle positioning.

[0127] In an optional embodiment of the present application, the vehicle has a corresponding vehicle coordinate system, the camera has a corresponding camera coordinate system, the vehicle coordinate system and the camera coordinate system have a posture relationship, and the positioning of the vehicle according to the spatial position coordinates of the camera includes:

[0128] Obtaining the position information and initial positioning information of the vehicle;

[0129] Based on the posture information of the vehicle and the posture relationship, obtaining the spatial position coordinates of the vehicle according to the spatial position coordinates of the camera;

[0130] The initial positioning information is updated using the spatial position coordinates of the vehicle to obtain the positioning information of the vehicle.

[0131] In this embodiment, the vehicle has a corresponding vehicle coordinate system, and the camera also has a corresponding camera coordinate system. There is a posture relationship between the vehicle coordinate system and the camera coordinate system, that is, a rotation and translation relationship. Therefore, through the posture relationship between the vehicle coordinate system and the camera coordinate system, the spatial position coordinates of the vehicle can be further obtained according to the posture information of the vehicle and the spatial position coordinates of the camera, thereby obtaining the positioning information of the vehicle.

[0132] Specifically, the vehicle's posture information and initial positioning information can be obtained. The vehicle's initial positioning information can be obtained based on a low-precision map and coarse positioning information. The source of the coarse positioning information can be GPS or inertial navigation positioning.

[0133] Therefore, based on the vehicle's posture information and posture relationship, the vehicle's spatial position coordinates can be obtained by conversion according to the camera's spatial position coordinates, and the vehicle's spatial position coordinates can be used to update the initial positioning information to obtain the vehicle's positioning information, thereby achieving high-precision positioning of the vehicle.

[0134] The embodiment of the present application obtains the spatial position coordinates of the vehicle based on the posture relationship between the vehicle coordinate system and the camera coordinate system, thereby realizing the positioning of the vehicle. Autonomous driving positioning can be achieved in high-speed scenarios without relying on high-precision maps, thereby reducing the cost of building additional sensors and high-precision point cloud maps.

[0135] In an optional embodiment of the present application, the initial position coordinates of the plurality of first preset points of the target signal light include at least: the position coordinates of the center point of the target signal light on the preprocessed image, and the position coordinates of the vertices of the circumscribed rectangle of the target signal light on the preprocessed image;

[0136] The spatial position coordinates of the traffic light include at least: the spatial position coordinates of the center point of the target traffic light, and the spatial position coordinates of a second preset point of the target traffic light, wherein the second preset point is obtained based on the spatial position coordinates of the center point of the target traffic light and the diameter of the light source.

[0137] In this embodiment, the initial position coordinates of the first preset points of the target signal light may include at least: the position coordinates of the center point of the target signal light on the preprocessed image, and the position coordinates of the vertices of the circumscribed rectangle of the target signal light on the preprocessed image.

[0138] The spatial position coordinates of the traffic light may at least include: the spatial position coordinates of the center point of the target traffic light, and the spatial position coordinates of the second preset point of the target traffic light, the second preset point being obtained according to the spatial position coordinates of the center point of the target traffic light and the diameter of the light source. The plurality of spatial position coordinates of the traffic light are located in the spatial coordinate system and correspond one to one with the position coordinates of the first preset point.

[0139] The embodiment of the present application selects the initial position coordinates of the first preset point and the spatial position coordinates of the corresponding traffic light to calculate the vertical distance between the camera and the traffic light and the projection coordinates of the camera on the plane where the traffic light is located, thereby realizing the positioning of the vehicle.

[0140] In an optional embodiment of the present application, a visual interface can also be set for the vehicle to display the vehicle positioning information obtained by the vehicle positioning method according to the embodiment of the present application in real time. Furthermore, the surrounding environment information, the initial positioning information of the vehicle, etc. can also be displayed, so that the driver can obtain more information and understand the current state of the automatic driving mode.

[0141] In the embodiment of the present application, an image is captured by a camera, and the image includes a traffic light, and the traffic light has a corresponding light source diameter; the vertical distance between the camera and the traffic light is obtained according to the position coordinates of several first preset points of the traffic light on the image, the focal length of the camera, and the light source diameter; based on the position coordinates of several first preset points and several spatial position coordinates of the traffic light, the projection coordinates of the camera on the plane where the traffic light is located are calculated; the vehicle is positioned according to the spatial position coordinates of the camera, and the spatial position coordinates of the camera are obtained according to the vertical distance, the projection coordinates, and the spatial position coordinates of the traffic light. The embodiment of the present application realizes millimeter-level high-precision real-time positioning by utilizing the traffic light information that is ubiquitous in urban roads and combining it with a low-cost camera, which not only significantly reduces the positioning cost, but also ensures good positioning accuracy. Automatic driving positioning can be achieved in high-speed scenarios without relying on high-precision maps, thereby reducing the construction cost of additional sensors and high-precision point cloud maps.

[0142] Reference Figure 4 , is a system architecture diagram of a vehicle positioning method embodiment of the present application.

[0143] like Figure 4 As shown, a vehicle positioning method according to an embodiment of the present application can be applied to a preset vehicle positioning system. The vehicle positioning system includes a map module, a collection module, a positioning algorithm module, a posture module and a map module.

[0144] Specifically, the acquisition module first controls the camera to use free space light to collect images, which contain traffic lights, and identifies the target traffic light in the image that is on at the current moment. At the same time, the map module obtains the vehicle's starting position, that is, the vehicle's initial positioning information, and can also obtain information such as the light source diameter of the traffic light.

[0145] After that, the vehicle is positioned through the positioning algorithm module. First, the key points in the image are extracted, that is, the initial position coordinates of several first preset points of the target traffic light are obtained. Using the camera posture information obtained by the posture module, the initial position coordinates of the first preset points are corrected to obtain the position coordinates of several first preset points of the traffic light on the image.

[0146] The positioning algorithm is used to locate the vehicle. Specifically, the position distance between the position coordinates of each first preset point and the position coordinates of the other first preset points is calculated respectively, and the farthest position distance among the position distances is used as the maximum distance between the first preset points, and then the vertical distance between the camera and the traffic light is calculated based on the maximum distance, the focal length of the camera, and the diameter of the light source.

[0147] Then, according to the spatial position coordinates of the traffic lights corresponding to the first preset points obtained by the map module, based on the light source diameter, vertical distance, focal length of the camera, the position coordinates of each first preset point and the spatial position coordinates of the traffic lights corresponding to each first preset point, a group of equations consisting of the projection coordinate equations corresponding to each first preset point are obtained, and the projection coordinates of the camera on the plane where the traffic lights are located are calculated by the least squares method, that is, the relative position of the camera on the plane where the traffic lights are located.

[0148] The spatial position coordinates of the camera are further calculated based on the vertical distance between the camera and the traffic light, the relative position of the camera on the plane where the traffic light is located, and the spatial position coordinates of the traffic light. Combined with the posture relationship between the vehicle coordinate system and the camera coordinate system, the final vehicle positioning result is obtained.

[0149] In the embodiment of the present application, an image is captured by a camera, and the image includes a traffic light, and the traffic light has a corresponding light source diameter; the vertical distance between the camera and the traffic light is obtained according to the position coordinates of several first preset points of the traffic light on the image, the focal length of the camera, and the light source diameter; based on the position coordinates of several first preset points and several spatial position coordinates of the traffic light, the projection coordinates of the camera on the plane where the traffic light is located are calculated; the vehicle is positioned according to the spatial position coordinates of the camera, and the spatial position coordinates of the camera are obtained according to the vertical distance, the projection coordinates, and the spatial position coordinates of the traffic light. The embodiment of the present application realizes millimeter-level high-precision real-time positioning by utilizing the traffic light information that is ubiquitous in urban roads and combining it with a low-cost camera, which not only significantly reduces the positioning cost, but also ensures good positioning accuracy. Automatic driving positioning can be achieved in high-speed scenarios without relying on high-precision maps, thereby reducing the construction cost of additional sensors and high-precision point cloud maps.

[0150] On the basis of the above embodiments, this embodiment further provides a vehicle positioning device, which is applied to electronic devices such as terminal devices and servers.

[0151] Reference Figure 5 , shows a structural block diagram of an embodiment of a vehicle positioning device of the present application, which may specifically include the following modules:

[0152] An image acquisition module 501 is used to acquire an image through the camera, wherein the image includes a traffic light, and the traffic light has a corresponding light source diameter;

[0153] A vertical distance calculation module 502, for obtaining a vertical distance between the camera and the traffic light according to the position coordinates of a plurality of first preset points of the traffic light on the image, the focal length of the camera and the diameter of the light source;

[0154] A projection coordinate calculation module 503, configured to calculate the projection coordinates of the camera on the plane where the traffic light is located based on the position coordinates of the plurality of first preset points and the plurality of spatial position coordinates of the traffic light;

[0155] The vehicle positioning module 504 is used to position the vehicle according to the spatial position coordinates of the camera, where the spatial position coordinates of the camera are obtained according to the vertical distance, the projection coordinates and the spatial position coordinates of the traffic light.

[0156] In an optional embodiment of the present application, the vertical distance calculation module 502 includes:

[0157] A position distance calculation submodule, used to respectively calculate the position distance between the position coordinates of each of the first preset points and the position coordinates of the remaining first preset points;

[0158] A maximum distance calculation submodule, configured to use the farthest position distance among the position distances as the maximum distance between the first preset points;

[0159] The vertical distance determination submodule is used to obtain the vertical distance between the camera and the traffic light according to the maximum distance, the focal length of the camera and the diameter of the light source.

[0160] In an optional embodiment of the present application, the projection coordinate calculation module 503 includes:

[0161] A coordinate equation establishing submodule, for obtaining a projection coordinate equation corresponding to each of the first preset points based on the light source diameter, the vertical distance, the focal length of the camera, the position coordinates of each of the first preset points, and the spatial position coordinates of the traffic light corresponding to each of the first preset points;

[0162] A coordinate equation solving submodule, configured to calculate the projection coordinates of the camera on the plane where the traffic light is located according to the projection coordinate equations corresponding to all the first preset points using the least squares method;

[0163] Wherein, the projection coordinate equation corresponding to each of the first preset points is:

[0164] C pi (xx lamp i ) 2 +C pi (yy lamp i ) 2 -h image 2

[0165]

[0166] C pi is the projection parameter corresponding to the i-th first preset point, x is the horizontal coordinate of the projection coordinate of the camera on the plane where the traffic light is located, y is the vertical coordinate of the projection coordinate of the camera on the plane where the traffic light is located, x lamp i is the horizontal coordinate of the spatial position coordinate of the traffic light corresponding to the i-th first preset point, y lamp i is the ordinate of the spatial position coordinate of the traffic light corresponding to the i-th first preset point, x′ i is the horizontal coordinate of the position coordinate of the i-th first preset point, y′ i is the ordinate of the position coordinate of the i-th first preset point, h image is the vertical distance, f image is the diameter of the light source.

[0167] In an optional embodiment of the present application, the device further includes:

[0168] A first posture acquisition module, used to acquire the posture information of the camera, wherein the posture information of the camera at least includes the azimuth and pitch angle of the camera;

[0169] An initial position acquisition module, used to acquire the initial position coordinates of a plurality of first preset points of the traffic light from the image;

[0170] The position correction module is used to correct the initial position coordinates of the plurality of first preset points according to the azimuth angle and the pitch angle to obtain the position coordinates of the plurality of first preset points of the traffic light on the image.

[0171] In an optional embodiment of the present application, the traffic light includes a target signal light that is lit at the current moment, and the initial position acquisition module includes:

[0172] A target traffic light recognition submodule, used to recognize the target traffic light in the image that is lit at the current moment;

[0173] An image preprocessing submodule, used for converting the image into a binary image, performing an opening operation on the binary image to obtain a preprocessed image;

[0174] The initial position determination submodule is used to obtain the initial position coordinates of the plurality of first preset points of the target signal light from the preprocessed image.

[0175] In an optional embodiment of the present application, the vehicle has a corresponding vehicle coordinate system, the camera has a corresponding camera coordinate system, the vehicle coordinate system and the camera coordinate system have a posture relationship, and the vehicle positioning module 504 includes:

[0176] A second posture acquisition submodule is used to obtain the posture information and initial positioning information of the vehicle;

[0177] A vehicle position determination submodule, configured to obtain the spatial position coordinates of the vehicle according to the spatial position coordinates of the camera based on the position information of the vehicle and the position relationship;

[0178] The positioning information acquisition submodule is used to update the initial positioning information using the spatial position coordinates of the vehicle to obtain the positioning information of the vehicle.

[0179] In an optional embodiment of the present application, the initial position coordinates of the plurality of first preset points of the target signal light include at least: the position coordinates of the center point of the target signal light on the preprocessed image, and the position coordinates of the vertices of the circumscribed rectangle of the target signal light on the preprocessed image;

[0180] The spatial position coordinates of the traffic light include at least: the spatial position coordinates of the center point of the target traffic light, and the spatial position coordinates of a second preset point of the target traffic light, wherein the second preset point is obtained based on the spatial position coordinates of the center point of the target traffic light and the diameter of the light source.

[0181] In the embodiment of the present application, an image is captured by a camera, and the image includes a traffic light, and the traffic light has a corresponding light source diameter; the vertical distance between the camera and the traffic light is obtained according to the position coordinates of several first preset points of the traffic light on the image, the focal length of the camera, and the light source diameter; based on the position coordinates of several first preset points and several spatial position coordinates of the traffic light, the projection coordinates of the camera on the plane where the traffic light is located are calculated; the vehicle is positioned according to the spatial position coordinates of the camera, and the spatial position coordinates of the camera are obtained according to the vertical distance, the projection coordinates, and the spatial position coordinates of the traffic light. The embodiment of the present application realizes millimeter-level high-precision real-time positioning by utilizing the traffic light information that is ubiquitous in urban roads and combining it with a low-cost camera, which not only significantly reduces the positioning cost, but also ensures good positioning accuracy. Automatic driving positioning can be achieved in high-speed scenarios without relying on high-precision maps, thereby reducing the construction cost of additional sensors and high-precision point cloud maps.

[0182] The embodiment of the present application also provides a non-volatile readable storage medium, which stores one or more modules (programs). When the one or more modules are applied to a device, the device can execute instructions (instructions) of each method step in the embodiment of the present application.

[0183] The present application embodiment provides one or more machine-readable media on which instructions are stored, and when executed by one or more processors, an electronic device executes one or more of the methods described in the above embodiments. In the present application embodiment, the electronic device includes various types of devices such as terminal devices and servers (clusters).

[0184] The embodiments of the present disclosure may be implemented as a device configured as desired using any appropriate hardware, firmware, software, or any combination thereof, and the device may include electronic devices such as terminal devices and servers (clusters). Figure 6 An exemplary apparatus 600 that may be used to implement various embodiments described in this application is schematically illustrated.

[0185] For one embodiment, Figure 6 An exemplary apparatus 600 is shown having one or more processors 602, a control module (chip set) 604 coupled to at least one of the processor(s) 602, a memory 606 coupled to the control module 604, a non-volatile memory (NVM) / storage device 608 coupled to the control module 604, one or more input / output devices 610 coupled to the control module 604, and a network interface 612 coupled to the control module 604.

[0186] The processor 602 may include one or more single-core or multi-core processors, and the processor 602 may include any combination of general-purpose processors or special-purpose processors (such as graphics processors, application processors, baseband processors, etc.). In some embodiments, the device 600 can be used as a terminal device, server (cluster), etc. described in the embodiments of the present application.

[0187] In some embodiments, the apparatus 600 may include one or more computer-readable media (e.g., memory 606 or NVM / storage device 608) having instructions 614 and one or more processors 602 combined with the one or more computer-readable media and configured to execute the instructions 614 to implement a module to perform the actions described in the present disclosure.

[0188] For one embodiment, control module 604 may include any suitable interface controller to provide any suitable interface to at least one of processor(s) 602 and / or any suitable device or component in communication with control module 604 .

[0189] The control module 604 may include a memory controller module to provide an interface to the memory 606. The memory controller module may be a hardware module, a software module, and / or a firmware module.

[0190] The memory 606 may be used, for example, to load and store data and / or instructions 614 for the device 600. For one embodiment, the memory 606 may include any suitable volatile memory, such as a suitable DRAM. In some embodiments, the memory 606 may include double data rate type four synchronous dynamic random access memory (DDR4 SDRAM).

[0191] For one embodiment, control module 604 may include one or more input / output controllers to provide an interface to NVM / storage device 608 and input / output device(s) 610 .

[0192] For example, NVM / storage 608 may be used to store data and / or instructions 614. NVM / storage 608 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable non-volatile storage device(s) (e.g., one or more hard disk drives (HDDs), one or more compact disk (CD) drives, and / or one or more digital versatile disk (DVD) drives).

[0193] NVM / storage device 608 may include storage resources that are physically part of the device on which apparatus 600 is installed, or it may be accessible to the device without being part of the device. For example, NVM / storage device 608 may be accessed via input / output device(s) 610 over a network.

[0194] (One or more) input / output devices 610 may provide an interface for the apparatus 600 to communicate with any other appropriate device, and the input / output device 610 may include a communication component, an audio component, a sensor component, etc. The network interface 612 may provide an interface for the apparatus 600 to communicate through one or more networks, and the apparatus 600 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols, for example, access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, etc., or a combination thereof for wireless communication.

[0195] For one embodiment, at least one of the processor(s) 602 may be packaged together with the logic of one or more controllers (e.g., a memory controller module) of the control module 604. For one embodiment, at least one of the processor(s) 602 may be packaged together with the logic of one or more controllers of the control module 604 to form a system-in-package (SiP). For one embodiment, at least one of the processor(s) 602 may be integrated on the same die with the logic of one or more controllers of the control module 604. For one embodiment, at least one of the processor(s) 602 may be integrated on the same die with the logic of one or more controllers of the control module 604 to form a system-on-chip (SoC).

[0196] In various embodiments, the device 600 may be, but is not limited to, a terminal device such as a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet computer, a netbook, etc.). In various embodiments, the device 600 may have more or fewer components and / or different architectures. For example, in some embodiments, the device 600 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touch screen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.

[0197] Among them, the main control chip can be used as a processor or control module in the detection device, sensor data, location information, etc. are stored in a memory or NVM / storage device, the sensor group can be used as an input / output device, and the communication interface may include a network interface.

[0198] As for the device embodiment, since it is 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.

[0199] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

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

[0201] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable vehicle positioning terminal device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0202] These computer program instructions can also be loaded onto a computer or other programmable vehicle positioning terminal device, so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable terminal device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

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

[0204] Finally, 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 terminal 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 terminal 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 terminal device including the elements.

[0205] The above is a detailed introduction to a vehicle positioning method and device, an electronic device and a storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for a general technician in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A vehicle positioning method, characterized in that: The vehicle is equipped with a camera, and the method comprises: The camera collects an image, wherein the image includes a traffic light, and the traffic light has a corresponding light source diameter; Obtaining a vertical distance between the camera and the traffic light according to the position coordinates of a plurality of first preset points of the traffic light on the image, the focal length of the camera, and the diameter of the light source; Based on the position coordinates of the plurality of first preset points and the plurality of spatial position coordinates of the traffic light, the projection coordinates of the camera on the plane where the traffic light is located are calculated; The vehicle is positioned according to the spatial position coordinates of the camera, where the spatial position coordinates of the camera are obtained according to the vertical distance, the projection coordinates and the spatial position coordinates of the traffic light.

2. The method according to claim 1, characterized in that The obtaining the vertical distance between the camera and the traffic light according to the position coordinates of a plurality of first preset points of the traffic light on the image, the focal length of the camera, and the diameter of the light source comprises: respectively calculating the position distance between the position coordinates of each of the first preset points and the position coordinates of the remaining first preset points; The farthest position distance among the position distances is used as the maximum distance between the first preset points; The vertical distance between the camera and the traffic light is obtained according to the maximum distance, the focal length of the camera and the diameter of the light source.

3. The method according to claim 2, characterized in that The calculating, based on the position coordinates of the plurality of first preset points and the plurality of spatial position coordinates of the traffic light, the projection coordinates of the camera on the plane where the traffic light is located comprises: Based on the light source diameter, the vertical distance, the focal length of the camera, the position coordinates of each of the first preset points, and the spatial position coordinates of the traffic light corresponding to each of the first preset points, obtaining a projection coordinate equation corresponding to each of the first preset points; According to the projection coordinate equations corresponding to all the first preset points, the projection coordinates of the camera on the plane where the traffic light is located are calculated using the least squares method; Wherein, the projection coordinate equation corresponding to each of the first preset points is: C pi (x-x lampi ) 2 +C pi (y-y lampi ) 2 -h image 2 C pi is the projection parameter corresponding to the i-th first preset point, x is the horizontal coordinate of the projection coordinate of the camera on the plane where the traffic light is located, y is the vertical coordinate of the projection coordinate of the camera on the plane where the traffic light is located, and x lampi is the horizontal coordinate of the spatial position coordinate of the traffic light corresponding to the i-th first preset point, y lampi is the ordinate of the spatial position coordinate of the traffic light corresponding to the i-th first preset point, x′ i is the horizontal coordinate of the position coordinate of the i-th first preset point, y′ i is the ordinate of the position coordinate of the i-th first preset point, h image is the vertical distance, f image is the diameter of the light source.

4. The method according to claim 1, characterized in that: After collecting the image by the camera, the method further includes: Acquire the position information of the camera, wherein the position information of the camera at least includes the azimuth and pitch angle of the camera; Acquire initial position coordinates of a plurality of first preset points of the traffic light from the image; The initial position coordinates of the plurality of first preset points are corrected according to the azimuth angle and the pitch angle to obtain the position coordinates of the plurality of first preset points of the traffic light on the image.

5. The method according to claim 4, characterized in that The traffic light includes a target signal light that is currently lit, and the acquiring of initial position coordinates of a plurality of first preset points of the traffic light from the image includes: Identify the target traffic light in the image that is currently lit; Convert the image into a binary image, and perform an opening operation on the binary image to obtain a preprocessed image; The initial position coordinates of the plurality of first preset points of the target signal light are acquired from the preprocessed image.

6. The method according to claim 1, characterized in that The vehicle has a corresponding vehicle coordinate system, the camera has a corresponding camera coordinate system, the vehicle coordinate system and the camera coordinate system have a posture relationship, and the positioning of the vehicle according to the spatial position coordinates of the camera includes: Obtaining the position information and initial positioning information of the vehicle; Based on the posture information of the vehicle and the posture relationship, obtaining the spatial position coordinates of the vehicle according to the spatial position coordinates of the camera; The initial positioning information is updated using the spatial position coordinates of the vehicle to obtain the positioning information of the vehicle.

7. The method according to claim 5, characterized in that The initial position coordinates of the first preset points of the target signal light include at least: the position coordinates of the center point of the target signal light on the preprocessed image, and the position coordinates of the vertices of the circumscribed rectangle of the target signal light on the preprocessed image; The spatial position coordinates of the traffic light include at least: the spatial position coordinates of the center point of the target traffic light, and the spatial position coordinates of a second preset point of the target traffic light, wherein the second preset point is obtained based on the spatial position coordinates of the center point of the target traffic light and the diameter of the light source.

8. A vehicle positioning device, characterized in that: The vehicle is equipped with a camera, and the device comprises: An image acquisition module, used for acquiring an image through the camera, wherein the image includes a traffic light, and the traffic light has a corresponding light source diameter; A vertical distance calculation module, used to obtain the vertical distance between the camera and the traffic light according to the position coordinates of a plurality of first preset points of the traffic light on the image, the focal length of the camera and the diameter of the light source; A projection coordinate calculation module, used to calculate the projection coordinates of the camera on the plane where the traffic light is located based on the position coordinates of the plurality of first preset points and the plurality of spatial position coordinates of the traffic light; The vehicle positioning module is used to position the vehicle according to the spatial position coordinates of the camera, wherein the spatial position coordinates of the camera are obtained according to the vertical distance, the projection coordinates and the spatial position coordinates of the traffic light.

9. An electronic device, characterized in that: include: processor; and A memory having executable codes stored thereon, which, when executed, causes the processor to execute the vehicle positioning method as described in one or more of claims 1-7.

10. One or more machine-readable media having executable codes stored thereon, which, when executed, cause a processor to perform the vehicle positioning method according to one or more of claims 1-7.