Driving scene rendering method and device, vehicle and medium

By establishing a spatial hash grid in the driving scene and adjusting the position of the target to be rendered, the visual jitter problem caused by the low precision of on-board sensors is solved, and the rendering quality and efficiency are improved.

CN120599116BActive Publication Date: 2025-10-17CHONGQING CHANGAN AUTOMOBILE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511094873.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-06
Publication Date
2025-10-17
Estimated Expiration
2045-08-06

AI Technical Summary

Technical Problem

Due to the low precision of on-board sensors, visual jitter occurs during the rendering of driving scenes, affecting the user experience.

Method used

By establishing a spatial hash grid centered on the vehicle's position, the target to be rendered is mapped to the hash grid, and the target position is checked and adjusted to avoid overlap, thus generating a target driving scene image.

Benefits of technology

Improves the rendering quality and efficiency of driving scenes, avoids visual jitter, and enhances user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120599116B_ABST
    Figure CN120599116B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image processing, and discloses a driving scene rendering method and device, a vehicle and a medium.The present application maps all to-be-rendered targets in a target area where the ego vehicle is located into a spatial hash grid in the form of establishing a spatial hash grid, successively checks the number of to-be-rendered targets contained in each hash grid, adjusts the corresponding positions of the to-be-rendered targets in the spatial hash grid according to the checking result, and performs scene rendering of the target area based on the positions, to generate a target driving scene image, thereby avoiding the phenomenon of visual jitter in the rendering result caused by the position overlap of to-be-rendered targets in the rendering process, improving the rendering quality of the driving scene, and through the calculation mode of the hash grid, the calculation amount of the whole process is extremely small, the query speed is fast, and in the face of large-scale to-be-rendered targets in the case of spatial discontinuity and continuity, the whole driving scene can work quickly, the rendering efficiency of the whole driving scene is improved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, in particular to a driving scene rendering method and device, a vehicle and a medium. BACKGROUND

[0002] At present, the scene data displayed by the intelligent driving system of a vehicle contains more and more information. However, due to the low accuracy of the vehicle-mounted sensors, the original data collected by the vehicle-mounted sensors is directly used for scene rendering. For example, in a parking scene, the data of a remote parking space collected is not accurate, which causes the adjacent parking spaces to overlap and results in a rendering depth conflict (Z-Fighting) problem, thereby causing visual jitter in the finally rendered scene and affecting the user experience. SUMMARY

[0003] Therefore, the present application provides a driving scene rendering method, device, vehicle and medium to solve the problem of visual jitter in the rendered scene caused by the low accuracy of the vehicle-mounted sensors in the driving scene rendering process of a vehicle, which affects the user experience.

[0004] In a first aspect, the present application provides a driving scene rendering method, which comprises:

[0005] obtaining target rendering object data of a target area where the ego vehicle is located, wherein the target rendering object data comprises the size and position relationship of each target to be rendered with respect to the ego vehicle;

[0006] establishing a spatial hash grid centered on the position of the ego vehicle, and mapping each target to be rendered to the spatial hash grid based on the target rendering object data to determine the hash value of the hash grid covered by each target to be rendered;

[0007] starting from the position of the ego vehicle in the spatial hash grid, sequentially performing a target number test on each hash grid, and adjusting the corresponding position of each target to be rendered in the spatial hash grid based on the test result, so that there is no position overlap area of each target to be rendered in the spatial hash grid;

[0008] performing scene rendering on the target area where the ego vehicle is located based on the hash grid finally covered by each target to be rendered in the spatial hash grid, to generate a target driving scene image.

[0009] The application maps all to-be-rendered targets in the target area where the ego vehicle is located into a spatial hash grid by establishing the spatial hash grid centering on the ego vehicle position, then successively checks the number of to-be-rendered targets contained in each hash grid, adjusts the positions of the to-be-rendered targets in the spatial hash grid according to the checking result, so that there is no position overlapping area among all to-be-rendered targets, and renders the scene of the target area to generate a target driving scene image, thereby avoiding the phenomenon of visual shaking of the rendered driving scene due to the position overlapping of to-be-rendered targets in the rendering process, improving the rendering quality of the driving scene, and through the calculation method of the hash grid, the calculation amount of the entire position adjustment process is extremely small, the query speed between adjacent to-be-rendered targets is fast, and the rendering efficiency of the entire driving scene is improved, improving the user experience.

[0010] In an optional embodiment, starting from the ego vehicle position, the number of to-be-rendered targets is successively checked for each hash grid, and the positions of the to-be-rendered targets in the spatial hash grid are adjusted based on the checking result, including:

[0011] Starting from the position of the ego vehicle in the spatial hash grid, the current hash grid closest to the ego vehicle is determined;

[0012] It is checked whether the hash value of the current hash grid corresponds to multiple to-be-rendered targets;

[0013] When the hash value of the current hash grid corresponds to multiple to-be-rendered targets, the first to-be-rendered target closest to the ego vehicle is determined;

[0014] The first to-be-rendered target and the second to-be-rendered target second closest to the ego vehicle are subjected to separate axis calculation to determine a minimum translation vector, and the second to-be-rendered target is controlled to move according to the minimum translation vector, after the second to-be-rendered target is removed, the step of performing separate axis calculation on the first to-be-rendered target and the second to-be-rendered target second closest to the ego vehicle is re-executed until all to-be-rendered targets corresponding to the hash value of the current hash grid are traversed;

[0015] After the first to-be-rendered target is removed, the step of determining the first to-be-rendered target closest to the ego vehicle is re-executed until all to-be-rendered targets corresponding to the hash value of the current hash grid are traversed, and after the current hash grid is removed, the step of determining the current hash grid closest to the ego vehicle is returned.

[0016] The present application starts from the hash grid closest to the vehicle to check whether multiple rendering targets exist, and when multiple rendering targets exist, that is, there is position overlap between the multiple rendering targets, the rendering target closest to the vehicle is regarded as reliable data, the minimum translation vector between the other rendering targets and the reliable data is calculated in turn, and the other rendering targets are moved in turn to remove the position overlap between the other rendering targets and the reliable data, and then the rendering target second closest to the vehicle is regarded as reliable data again to repeat the above process, so that while ensuring that there is no position overlap between the rendering targets in the spatial hash grid, the data reliability is improved based on the physical reality of high reliability near and low reliability far, so that the final rendering driving scene conforms to the real visual effect of high accuracy of near data and low accuracy of far data, further improving the user experience, and in the collision detection process, the second rendering target that has been position adjusted is removed to avoid the collision false detection that the hash grid covered by the two rendering targets after position adjustment overlaps, but the two rendering targets themselves do not overlap, further improving the collision detection efficiency and accuracy between the rendering targets.

[0017] In an optional embodiment, the step of determining the current hash grid closest to the vehicle from the position of the vehicle in the spatial hash grid comprises:

[0018] Starting from the target hash grid covered by the vehicle, the current hash grid adjacent to the target hash grid is accessed in turn according to the preset position sequence, and the current hash grid is a hash grid that has not been accessed;

[0019] After the current hash grid adjacent to the target hash grid has been accessed, the accessed current hash grid is updated as the target hash grid in turn according to the access sequence, and the step of accessing the current hash grid adjacent to the target hash grid in turn according to the preset position sequence is returned, until there is no hash grid that has not been accessed in the spatial hash grid.

[0020] The present application derives the actual parking lot rendering requirement size according to the idea from near to far, starts from the hash grid covered by the vehicle to perform peripheral diffusion derivation iteration, realizes the function of peripheral rapid diffusion query, and finds the corresponding current hash grid for collision detection in turn in the mode of radius recursion and remote, improves the running efficiency, and further ensures that the data processing process conforms to the reality of high accuracy of near data and low accuracy of far data.

[0021] In an optional embodiment, the method further comprises:

[0022] When the hash value of the current hash grid does not correspond to multiple to-be-rendered targets, the step of determining the current hash grid closest to the ego vehicle is returned after the current hash grid is removed, until all hash grids in the spatial hash grid are traversed.

[0023] The application further saves the calculation amount, improves the data processing efficiency, and further improves the rendering efficiency of the entire driving scene and the user experience.

[0024] In an optional implementation, the control of the movement of the second to-be-rendered target according to the minimum translation vector includes:

[0025] The control of the movement of the region of the hash grid currently covered by the second to-be-rendered target according to the minimum translation vector obtains the final hash grid covered by the second to-be-rendered target in the spatial hash grid.

[0026] The application determines the final hash grid covered by the to-be-rendered target in the spatial hash grid by moving the grid region of the to-be-rendered target in the hash space grid that overlaps with the fixed to-be-rendered target according to the minimum translation vector, thereby determining the size of the to-be-rendered target and the relative position relationship between the to-be-rendered target and the ego vehicle in the spatial hash grid, providing an accurate data basis for subsequent rendering, and improving the accuracy and efficiency of driving scene rendering.

[0027] In an optional implementation, the scene rendering of the target region of the ego vehicle based on the final hash grid covered by each to-be-rendered target in the spatial hash grid generates a target driving scene image, including:

[0028] The rendering position of each to-be-rendered target is determined based on the real visual size of each hash grid in the spatial hash grid, and the relationship between the final hash grid covered by each to-be-rendered target in the spatial hash grid and the position of the ego vehicle in the spatial hash grid.

[0029] The rendering size of each to-be-rendered target is determined based on the real visual size of each hash grid in the spatial hash grid and the final hash grid covered by each to-be-rendered target in the spatial hash grid.

[0030] The scene rendering is performed according to the rendering position and the rendering size of each to-be-rendered target with the ego vehicle as the rendering position reference point, and a target driving scene image is obtained.

[0031] The application converts the position relationship and size of the ego vehicle and each target to be rendered in the spatial hash grid into rendering position and rendering size by using the real visual size corresponding to each hash grid, and renders the scene with the ego vehicle as the rendering position reference point, thereby guaranteeing the accuracy of the final target driving scene image.

[0032] In an optional embodiment, the target rendering object data of the target area where the ego vehicle is located is obtained, including:

[0033] Obtaining perception data in the target area collected by the ego vehicle;

[0034] Performing target identification on the perception data to obtain each target to be rendered and the position relationship between each target to be rendered and the ego vehicle;

[0035] Calculating the bounding box of each target to be rendered respectively to obtain the size corresponding to each target to be rendered.

[0036] The application determines the position relationship between each target to be rendered and the ego vehicle through target identification by using the perception data collected by the ego vehicle, and obtains the size corresponding to each target to be rendered by calculating the bounding box of each target to be rendered, thereby using the geometric features of the bounding box to represent the outline of the target to be rendered, which can further simplify the subsequent data processing amount, improve the data processing efficiency, and further improve the rendering efficiency of the final driving scene and the user experience.

[0037] In an optional embodiment, the spatial hash grid is established with the position of the ego vehicle as the center, including:

[0038] Determining the real visual size corresponding to a single hash grid based on the minimum size corresponding to each target to be rendered;

[0039] Establishing the spatial hash grid covering the target area with the position of the ego vehicle as the center and the real visual size corresponding to a single hash grid, and determining the hash value corresponding to each hash grid.

[0040] The application adaptively sets the real visual size corresponding to a single hash grid by using the minimum size corresponding to each target to be rendered, which avoids excessive consumption of calculation amount and excessive detection error, thereby improving the detection efficiency while guaranteeing the detection accuracy of each hash grid.

[0041] In an optional embodiment, the target rendering object data is used to map each target to be rendered to the spatial hash grid to determine the hash value of the hash grid covered by each target to be rendered, including:

[0042] determine the hash value of the hash grid covered by each target to be rendered based on the real visual size corresponding to the single hash grid, the size corresponding to each target to be rendered, and the positional relationship with the ego vehicle.

[0043] determine the hash value of the hash grid covered by each target to be rendered based on the real visual size corresponding to the single hash grid, the size corresponding to each target to be rendered, and the positional relationship with the ego vehicle.

[0044] The present application determines the hash grid corresponding to each rendering target in the spatial hash grid and further determines the hash value of the covered hash grid based on the real visual size corresponding to the single hash grid, the size corresponding to each target to be rendered, and the positional relationship with the ego vehicle, thereby providing accurate data basis for subsequent collision detection.

[0045] In an optional implementation, the target to be rendered includes a parking space and / or a vehicle.

[0046] The present application realizes the optimized rendering of images of different driving scenes such as parking and reversing by taking the parking space and / or the vehicle as the target to be rendered of the target area where the ego vehicle is located, thereby meeting the driving scene rendering requirements of intelligent driving and further improving the user experience.

[0047] In a second aspect, the present application provides a driving scene rendering device, which comprises:

[0048] The acquisition module is configured to acquire target rendering object data of a target area where an ego vehicle is located, the target rendering object data comprising the size corresponding to each target to be rendered and the positional relationship with the ego vehicle.

[0049] The first processing module is configured to establish a spatial hash grid with the position of the ego vehicle as the center, and map each target to be rendered to the spatial hash grid based on the target rendering object data, and determine the hash value of the hash grid covered by each target to be rendered.

[0050] The second processing module is configured to perform target to be rendered quantity inspection on each hash grid in turn from the position of the ego vehicle in the spatial hash grid, and adjust the corresponding position of each target to be rendered in the spatial hash grid based on the inspection result, so that there is no positional overlapping area of each target to be rendered in the spatial hash grid.

[0051] The third processing module is configured to perform scene rendering on the target area where the ego vehicle is located based on the hash grid finally covered by each target to be rendered in the spatial hash grid, and generate a target driving scene image.

[0052] In a third aspect, the present application provides a vehicle, which comprises a controller, the controller comprising:

[0053] The memory and the processor are connected in communication with each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the method in the first aspect and any optional implementation thereof.

[0054] In a fourth aspect, the application provides a computer readable storage medium, which stores computer instructions for causing a computer to perform the method in the first aspect or any implementation thereof.

[0055] Advantages of the application:

[0056] The application maps all the to-be-rendered targets in the target area where the ego vehicle is located into a spatial hash grid by establishing the spatial hash grid centered on the ego vehicle position, then successively checks the number of to-be-rendered targets contained in each hash grid, adjusts the positions of the to-be-rendered targets in the spatial hash grid according to the checking result, so that there is no position overlapping area among all the to-be-rendered targets, and performs scene rendering of the target area based on this, to generate a target driving scene image, thereby avoiding the phenomenon of visual shaking of the rendered driving scene due to position overlapping of the to-be-rendered targets in the rendering process, improving the rendering quality of the driving scene, and through the calculation method of the hash grid, the calculation amount of the entire position adjustment process is extremely small, the query speed between adjacent to-be-rendered targets is fast, and the rendering efficiency of the entire driving scene is improved, and the user experience is improved. BRIEF DESCRIPTION OF DRAWINGS

[0057] In order to more clearly illustrate the specific embodiments of the application or the technical solutions in the prior art, the following will briefly introduce the drawings needed to be used in the specific embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the application, and for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.

[0058] Figure 1 is a flowchart of a driving scene rendering method according to an embodiment of the application;

[0059] Figure 2 is a real parking space size schematic diagram of the visual effect rendered by the parking space according to an embodiment of the application;

[0060] Figure 3 is a schematic diagram of a common corner point expanding into a plane and intersecting with adjacent objects;

[0061] Figure 4 is a flowchart of another driving scene rendering method according to an embodiment of the application;

[0062] Figure 5 This is a schematic diagram of the AABB bounding box of the parking space after spatial hashing;

[0063] Figure 6 It is a schematic diagram of finding the overlap of two objects using spatial hashing;

[0064] Figure 7 It is the overall spatial schematic diagram of the spatial hash grid;

[0065] Figure 8 is a schematic diagram of the starting hash grid occupied by the ego vehicle;

[0066] Figure 9 This is a schematic diagram of expanding the area of ​​the unvisited hash grid;

[0067] Figure 10 This is a schematic diagram of MTV calculation between parking spaces;

[0068] Figure 11 This is a schematic diagram of using MTV to move objects to prevent interpenetration;

[0069] Figure 12 This is a schematic diagram of parking space A after it is moved;

[0070] Figure 13 This is another schematic diagram of expanding the area of ​​the unvisited hash grid;

[0071] Figure 14 This is a schematic diagram of the overall program operation process of driving scene rendering;

[0072] Figure 15 is a structural diagram of a driving scene rendering device according to an embodiment of the present invention;

[0073] Figure 16 2 is a schematic structural diagram of a vehicle controller according to an embodiment of the present invention. DETAILED DESCRIPTION

[0074] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.

[0075] While the scene data displayed by intelligent driving systems in vehicles is increasing in volume, the accuracy of onboard sensors and the fact that most of the raw data is for vehicle control purposes have not been fully considered. This can lead to model interleaving when used directly. For example, in parking scenarios, inaccurate data collected from distant parking spaces can cause the intelligent driving HMI (center console human-machine interface) to render the 3D scene inaccurately. This data can overlap with adjacent spaces, resulting in visual jitter caused by rendering Z-fighting.

[0076] The embodiment of the present invention uses spatial hashing to perform fast overlap query of 2D plane collision bodies and calculate new positions after collision to generate new rendering object data, so as to avoid image jitter caused by the interlacing of two rendering objects.

[0077] According to an embodiment of the present invention, an embodiment of a driving scene rendering method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0078] In this embodiment, a driving scene rendering method is provided, which can be applied to vehicle controllers such as single-chip microcomputers, MCUs and other control chips, and can also be applied to cloud servers, etc. Figure 1 is a flowchart of a driving scene rendering method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0079] Step S101: Acquire target rendering object data of a target area where the vehicle is located.

[0080] The target rendering object data includes: the size of each target to be rendered and its positional relationship with the vehicle. In practical applications, taking the target to be rendered as a parking space as an example, the target rendering object data is parking space data. The size of the target to be rendered can be collected by the perception module composed of various sensors on the vehicle, and the real visual size can be obtained by expanding the rendering parameters of the parking space. For example, Figure 2 The expanded dt size shown is the actual parking space size for the final rendered visual effect, but this size can easily cause adjacent parking spaces to intersect, creating overlapping areas. The aforementioned positional relationship with the vehicle refers to the spatial relationship between the parking space and the vehicle, including direction and distance. This is prior art and will not be further elaborated here.

[0081] Specifically, the target to be rendered can be flexibly set according to actual driving scene requirements, such as in a parking scene in a parking lot, the target to be rendered can be a parking space around the ego vehicle, in a reversing scene, the target to be rendered can be other vehicles around the ego vehicle, and in addition, in the parking scene, the target to be rendered can include both the parking space and other vehicles around the ego vehicle, and the application is not limited thereto. It should be noted that, in order to facilitate the description of the embodiments of the application, the target to be rendered is taken as a parking space for example in the embodiments of the application.

[0082] In step S102, a spatial hash grid is established with the position of the ego vehicle as the center, and each target to be rendered is mapped to the spatial hash grid based on the target rendering object data, to determine the hash value of the hash grid covered by each target to be rendered.

[0083] Specifically, since the driving scene image is usually a 2D image, in order to simplify the calculation to adapt to the rendering requirements of the driving scene, the spatial hash grid is a 2D planar spatial hash grid, and the 2D planar spatial hash grid is constructed by taking the position of the ego vehicle as the center point, and then the collected parking space data is spatially hashed according to the center point of the parking space to determine the hash value of the hash grid covered by each parking space. Of course, in actual application, if a three-dimensional driving scene is needed, a 3D spatial hash grid can also be established, and the application is not limited thereto.

[0084] Further, each hash grid corresponds to a hash value, and there are many ways to calculate the hash value, as long as the principle of mapping any point (x, y, z) in space to a unique int value can be met, and the int value is the hash value. Since the 2D planar spatial hash grid is established in the embodiments of the application, the value of the z axis can be ignored, and the specific calculation method is a prior art, which will not be described here. In actual application, due to the appearance of objects in space, such as overlapping areas of parking spaces, there can be multiple points on different objects in space mapping to the same hash value, which is called hash collision. Exemplarily, after the common corner point is expanded into a plane, the intersection with the adjacent object is formed as shown in Figure 3 , Figure 3 The M and N parking spaces in the figure respectively have overlapping areas with adjacent parking spaces.

[0085] In step S103, starting from the position of the ego vehicle in the spatial hash grid, the number of targets to be rendered is checked for each hash grid in turn, and based on the checking result, the corresponding position of each target to be rendered in the spatial hash grid is adjusted, so that there is no position overlapping area for each target to be rendered in the spatial hash grid.

[0086] Specifically, based on the analysis of step S102, when the slots are interleaved, that is, part of the areas overlap, there will be a case that multiple slots correspond to one hash grid. Therefore, the number of to-be-rendered targets in the hash grid can be checked to identify which slots overlap, and then the positions of these slots are adjusted so that there is no overlapping area in the spatial hash grid, thereby ensuring the subsequent driving scene rendering effect and avoiding visual jitter.

[0087] Step S104: performing scene rendering on the target area where the ego vehicle is based on the hash grid finally covered by each to-be-rendered target in the spatial hash grid, to generate a target driving scene image.

[0088] Specifically, the slot distribution that meets both the visual effect and the physical law can be obtained by calling the corresponding function of the rendering engine to draw the position-corrected slot. The specific rendering method is prior art, which will not be described here.

[0089] In the embodiment of the application, the spatial hash grid is established with the position of the ego vehicle as the center, and then all the to-be-rendered targets in the target area where the ego vehicle is are mapped into the spatial hash grid. Then, the number of to-be-rendered targets contained in each hash grid is checked in sequence, and the positions of the to-be-rendered targets in the spatial hash grid are adjusted according to the checking result, so that there is no overlapping area between all the to-be-rendered targets. Scene rendering is performed on the target area based on this, to generate a target driving scene image. Thus, the phenomenon of visual jitter in the rendered driving scene caused by the overlapping of the positions of the to-be-rendered targets during the rendering process is avoided, the rendering quality of the driving scene is improved, and the calculation amount of the entire position adjustment process is extremely small through the calculation method of the hash grid. The query speed between adjacent to-be-rendered targets is fast, and the rendering efficiency of the entire driving scene is improved, thereby improving the user experience.

[0090] In the embodiment, a driving scene rendering method is also provided, which can be applied to a controller of a vehicle, such as a single-chip microcomputer, an MCU, and the like, or a cloud server, and the like. Figure 4 The flowchart of the driving scene rendering method according to the embodiment of the application is shown in FIG. 4, which includes the following steps: Figure 4

[0091] Step S401: obtaining target rendering object data of a target area where an ego vehicle is, the target rendering object data including the size and position relationship with the ego vehicle corresponding to each to-be-rendered target.

[0092] Specifically, step S401 includes:

[0093] ​Step a1, obtaining the perception data of the target area collected by the ego vehicle.

[0094] The perception data can be collected by various sensors mounted on the ego vehicle, such as lidar sensors, cameras, etc.

[0095] Step a2, target recognition is performed on the perception data to obtain each target to be rendered and the positional relationship between each target to be rendered and the ego vehicle.

[0096] Specifically, the specific implementation process of step a2 can be realized by the target detection or target recognition algorithm integrated in the ego vehicle, and the specific implementation process is a prior art, which will not be described here.

[0097] Step a3, calculating the bounding box of each target to be rendered to obtain the corresponding size of each target to be rendered.

[0098] Specifically, in order to simplify the calculation and improve the operation efficiency, the size corresponding to each target to be rendered can be the key point coordinates of the bounding box corresponding to the target to be rendered. The bounding box refers to replacing a complex geometric object with a geometric body with a larger volume and simple characteristics (referred to as a bounding box). The bounding box can be an axis-aligned bounding box (AABB), which is a rectangular frame aligned with the coordinate axis. By simplifying the complex geometric object into a regular bounding box, the calculation process of subsequent collision detection can be greatly simplified. It can also be an OBB (Oriented Bounding Box), which is a three-dimensional directional bounding box constructed based on the first-order moment mathematical characteristics of the object. Its core feature is to determine three principal direction axes through the eigenvectors of the covariance matrix to form a minimum volume cuboid that can rotate with the object. In the embodiments of the present application, the AABB bounding box is taken as an example for description in the two-dimensional hash space grid. As shown in Figure 5 The AABB bounding box of the parking space M1 is Figure 5 The corresponding rectangular area M2 is shown in the left shadow part of the figure, and the Min and Max corner points of the AABB bounding box are the size corresponding to the parking space.

[0099] The embodiments of the present application determine the positional relationship between each target to be rendered and the ego vehicle by target recognition based on the perception data collected by the ego vehicle, and obtain the size corresponding to each target to be rendered by calculating the bounding box of each target to be rendered. The geometric features of the bounding box are used to represent the outline of the target to be rendered, which can further simplify the subsequent data processing amount, improve the data processing efficiency, and further improve the rendering efficiency of the final driving scene, thereby further improving the user experience.

[0100] Step S402, a spatial hash grid is established with the ego vehicle position as the center, and each target to be rendered is mapped to the spatial hash grid based on the target rendering object data, and the hash value of the hash grid covered by each target to be rendered is determined.

[0101] Specifically, the above step S402 includes:

[0102] Step b1, the real visual size corresponding to a single hash grid is determined based on the minimum size corresponding to each target to be rendered.

[0103] Specifically, continuing to take the parking space as an example, assuming that the minimum size corresponding to the parking space is a length of a and a width of b in all parking space data, and a is greater than b, the real visual size corresponding to a single hash grid is set to be not greater than b, further, in order to improve the detection accuracy of subsequent parking space penetration, the real visual size corresponding to a single hash grid is set to be smaller than b, for example, assuming that b=2.5 meters, the real visual size corresponding to a single hash grid is 2 meters, in order to prevent excessive calculation, a 2-meter grid is used as a single hash grid size, because the error of the data source is not too large, using a 2-meter grid size will not cause a large range of parking space position movement and subsequent penetration.

[0104] Step b2, a spatial hash grid covering the target area is established with the real visual size corresponding to a single hash grid as the center, and the hash value corresponding to each hash grid is determined.

[0105] Specifically, after the center point information and the real visual size corresponding to a single hash grid are determined, the process of establishing a spatial hash grid covering the target area and determining the hash value corresponding to each hash grid is a prior art, which will not be described here.

[0106] The embodiment of the application sets the real visual size corresponding to a single hash grid adaptively by using the minimum size corresponding to each target to be rendered, which avoids excessive consumption of calculation and excessive detection error, thereby ensuring the detection accuracy of each hash grid while improving the detection efficiency.

[0107] Step b3, based on the real visual size corresponding to a single hash grid, the size corresponding to each target to be rendered, and the position relationship with the ego vehicle, the hash grid covered by each target to be rendered is determined.

[0108] Step b4, based on the hash value corresponding to each hash grid, the hash value of the hash grid covered by each target to be rendered is determined.

[0109] For example, due to the particularity of the AABB bounding box, the hash grid covered by each target to be rendered does not necessarily completely fit the real graphics,Figure 5 The right part is the corresponding hash grid occupied by the AABB bounding box of the parking space M1 in the entire grid space, and the corresponding hash grid covered by the shadow area.

[0110] Specifically, the Hash value of all covered grids of a single parking space is calculated. Taking 10*10 2D plane Hash grids in space as an example, any 2D point coordinate can be mapped to a certain grid in the 10*10 grid by a pre-designed Hash formula, and the corresponding parking space information is stored in the SpatialHash data structure by using the Hash value. Since the structure of SpatialHash is prior art, it is only a general tool item, and therefore the specific storage details are not described here. If the Hash values of multiple parking spaces are stored in the same Hash grid, the situation shown in FIG. 4 will be formed. Figure 6 Figure 6 The darkest grid area in the figure is the intersection of the two parking spaces. According to the principle of Hash value storage, the Hash value of the parking space P1 is stored in the Hash grid P, and the Hash value of the parking space P2 is stored in the Hash grid Q. Therefore, the intersection of the two parking spaces P1 and P2 is the intersection of the Hash grid P and the Hash grid Q. Figure 6 For example, at this time, the Hash grid P stores two rectangular parking spaces P1 and P2, that is, the parking space P1 and the parking space P2 are inserted, so that the parking spaces that have occurred insertion can be accurately and quickly found in subsequent checking.

[0111] The embodiment of the application determines the Hash grid corresponding to each rendering target in the spatial Hash grid and the Hash value of the covered Hash grid according to the size of each to-be-rendered target and the positional relationship with the ego vehicle based on the real visual size corresponding to each Hash grid, thereby providing accurate data basis for subsequent collision detection.

[0112] In step S403, the number of to-be-rendered targets in each Hash grid is checked in sequence from the position of the ego vehicle in the spatial Hash grid, and the position of each to-be-rendered target in the spatial Hash grid is adjusted based on the checking result, so that there is no positional overlapping area of each to-be-rendered target in the spatial Hash grid.

[0113] Specifically, the above step S403 includes:

[0114] In step S4031, the current Hash grid closest to the ego vehicle is determined from the position of the ego vehicle in the spatial Hash grid.

[0115] Specifically, the above step S4031 includes:

[0116] In step c1, the current Hash grid adjacent to the target Hash grid is accessed in sequence according to a preset position order from the target Hash grid covered by the ego vehicle.

[0117] ​The current hash grid is a hash grid that has not been visited. The preset position sequence can be to visit the hash grid clockwise or counterclockwise from the set position, or to visit in other set orders, and the present invention is not limited thereto. For example, in Figure 7 In the figure, O represents the car, A, B, C, and D represent four parking spaces. Figure 8 In the figure, the black shaded hash grid is the starting hash grid occupied by the ego vehicle. Starting from the ego vehicle position and starting from the left side of the vehicle head, we visit the current hash grids adjacent to the ego vehicle in a clockwise manner. If we expand the area of ​​the surrounding hash grids that have not been visited in a 9-square grid manner, we can get the following: Figure 9 The expanded area shown. It can be seen that Figure 9 contrast Figure 8 , the visited hash grid is expanded to an outer circle, which achieves the purpose of collision detection from near to far. It should be noted that Figure 9 The bottom position in the figure is not expanded, but is only used to demonstrate the basic principle. In fact, it can be expanded, so I will not go into details here.

[0118] Step c2: After all current hash grids adjacent to the target hash grid have been visited, the visited current hash grids are updated as the target hash grid in the order of access, and the process returns to the step of accessing the current hash grids adjacent to the target hash grid in the preset position order until there are no unvisited hash grids in the spatial hash grid.

[0119] Specifically, since each hash grid is adjacent to multiple hash grids in the spatial hash grid, after all hash grids adjacent to the target hash grid have been visited, the area of ​​the surrounding hash grids that have not been visited is expanded again to achieve the access order from the vehicle starting from the nearest to the farthest. For example, assuming that the hash grids adjacent to the target hash grid are numbered 1, 2, and 3 respectively, and the access order is represented by the numbers, after visiting the hash grids numbered 1, 2, and 3 in sequence, the above steps are repeated with the hash grid numbered 1 as the target hash grid, and then the above steps are repeated with the hash grid numbered 2 as the target hash grid, and so on, until there are no unvisited hash grids in the spatial hash grid.

[0120] The embodiment of the present invention derives the required size for rendering the actual parking space from near to far, performs iterative peripheral diffusion deduction starting from the hash grid covered by the own vehicle, and implements the function of rapid peripheral diffusion query. It searches for the corresponding current hash grid in turn by recursively pushing the radius far to perform collision detection, thereby improving the operating efficiency and further ensuring that the data processing process complies with the reality that the accuracy of nearby data is high and the accuracy of distant data is low.

[0121] Step S4032, check whether the hash value of the current hash grid corresponds to multiple to-be-rendered targets.

[0122] Specifically, it can be known from the above steps that each parking space covers multiple hash grids, that is, one parking space corresponds to multiple hash values. Conversely, if multiple parking spaces are inserted in the same hash grid, one hash value of the hash grid will correspond to multiple parking spaces. Therefore, whether the hash value of the current hash grid corresponds to multiple to-be-rendered targets can be determined through the correspondence between the hash value and the to-be-rendered target.

[0123] Step S4033, when the hash value of the current hash grid corresponds to multiple to-be-rendered targets, determine the first to-be-rendered target closest to the ego vehicle.

[0124] Exemplarily, as shown in Figure 9 , the hash grid with a shaded mark in the upper left corner has found that the A and C parking spaces intersect, that is, the hash grid stores 2 parking spaces, and collision occurs. At this time, the C parking space in the A and C parking spaces is closer to the ego vehicle, and thus the C parking space is determined as the first to-be-rendered target.

[0125] Step S4034, perform separating axis calculation on the first to-be-rendered target and the second to-be-rendered target closest to the ego vehicle, determine the minimum translation vector, and control the second to-be-rendered target to move according to the minimum translation vector. After the second to-be-rendered target is removed, the step of performing separating axis calculation on the first to-be-rendered target and the second to-be-rendered target closest to the ego vehicle is re-executed until all to-be-rendered targets corresponding to the hash value of the current hash grid are traversed.

[0126] The meaning of removing the second to-be-rendered target is to mark it as a visited state, and it will not be accessed in the subsequent re-execution of the step of performing separating axis calculation on the first to-be-rendered target and the second to-be-rendered target closest to the ego vehicle.

[0127] Exemplarily, as shown in Figure 10 , the A parking space is the second to-be-rendered target, and the overlapping area of the A parking space and the C parking space is marked in black in Figure 10 . Then, the minimum translation vector (MTV) is determined by performing separating axis (SAT) calculation on the A parking space and the C parking space. It is assumed that, as shown by the dotted line box in Figure 11 , the I parking space and the J parking space are inserted, and the separating axis calculation is performed on the inserted objects. In this calculation process, the minimum translation vector (MTV) is generated as shown in Figure 11The minimum translation vector MTV is shown, which represents the minimum displacement direction and length of the removal of the interpenetration. When moving the interpenetrated object, the high accuracy near the ego vehicle position and the low accuracy far from the ego vehicle position need to be referred to the physical fact. The object participating in the movement is distinguished, and the interpenetration in Figure 11 is I and J two parking spaces. It is assumed that J is close to the ego vehicle, and J is regarded as fixed. Therefore, the I parking space is moved by the MTV vector to obtain Figure 11 the solid frame corresponding to the dashed frame. It should be noted that the specific implementation of the minimum translation vector is a prior art, and will not be described here.

[0128] As shown in Figure 10 , the minimum translation vector MTV of the A and C parking spaces can be calculated. At this time, the C parking space is closer to the ego vehicle than the A parking space. Therefore, the MTV vector should be applied to the A parking space, and the parking space is moved as shown in Figure 12 . It is worth noting that the A and C parking spaces need to be marked as visited, and the A and C parking spaces are marked as visited in Figure 12 .

[0129] Specifically, the step S4034 of controlling the second to-be-rendered target to move according to the minimum translation vector includes:

[0130] d1, control the region of the hash grid currently covered by the second to-be-rendered target to move according to the minimum translation vector, to obtain the final hash grid covered by the second to-be-rendered target in the spatial hash grid.

[0131] As shown in Figure 10 , the position of the A parking space after moving is shown in Figure 12 .

[0132] The embodiment of the present application moves the grid region of the to-be-rendered target in the hash space grid which overlaps with the fixed to-be-rendered target according to the minimum translation vector, to obtain the final hash grid covered by the to-be-rendered target in the spatial hash grid, thereby determining the size of the to-be-rendered target itself and the relative position relationship between the to-be-rendered target and the ego vehicle in the spatial hash grid, providing accurate data basis for subsequent rendering, and improving the accuracy and efficiency of driving scene rendering.

[0133] S4035, after removing the first to-be-rendered target, the step of determining the first to-be-rendered target closest to the ego vehicle is re-executed until all to-be-rendered targets corresponding to the hash value of the current hash grid are traversed. After removing the current hash grid, the step of determining the current hash grid closest to the ego vehicle is returned.

[0134] Wherein, the meaning of removing the first to-be-rendered target is to mark it as visited state, and it will not be accessed in the subsequent process of traversing all to-be-rendered targets corresponding to the hash value of the current hash grid. Similarly, the meaning of removing the current hash grid is to mark it as visited state, and it will not be accessed in the subsequent process of determining the current hash grid closest to the vehicle.

[0135] Specifically, on the basis of Figure 12 , the above steps are repeatedly executed, and on the basis of Figure 12 , after one layer of hash grid expansion, one layer of hash grid expansion is performed on the topmost position, which obtains a situation as shown in Figure 13 . It should be noted that the bottommost position in Figure 13 is not expanded, but only to show the basic principle, and in fact it can be expanded, which will not be described here. Figure 13 The newly expanded shadow area in Figure 12 is a new access area, at this time, the A parking space has been accessed, so it is regarded as stationary, and the B parking space is moved according to the MTV vector between the A parking space and the B parking space, and the above steps are repeated until all hash grids are accessed. It should be noted that for the accessed object, it will be regarded as stationary in the subsequent process, and if two stationary objects are found to collide in the subsequent query, the collision processing flow is ignored. For the case that one unvisited hash grid contains three or more objects, the above rules are still followed to move, which will not be described here.

[0136] The embodiment of the application starts from the hash grid closest to the vehicle to check whether there are multiple to-be-rendered targets in the hash grid, and when there are multiple to-be-rendered targets, the to-be-rendered target closest to the vehicle is regarded as reliable data, and the minimum translation vector between the other to-be-rendered targets and the reliable data is calculated in sequence, and the other to-be-rendered targets are moved in sequence to remove the position overlap between the other to-be-rendered targets and the reliable data, and then the to-be-rendered target second closest to the vehicle is regarded as reliable data and the above process is repeated, so that the data reliability is improved based on the physical reality of high reliability near and low reliability far, while ensuring that there is no position overlap between the to-be-rendered targets in the spatial hash grid, so that the final rendering driving scene conforms to the real visual effect of high accuracy of near data and low accuracy of far data, further improving the user experience, and in the collision detection process, the second to-be-rendered target that has been adjusted in position is removed, avoiding the overlap of the hash grid covered by the two to-be-rendered targets after position adjustment, but there is no overlap between them, further improving the collision detection efficiency and accuracy between the to-be-rendered targets.

[0137] Step S4036, when the hash value of the current hash grid does not correspond to multiple to-be-rendered targets, after removing the current hash grid, the step of determining the current hash grid closest to the ego vehicle is returned until all hash grids in the spatial hash grid are traversed.

[0138] Exemplarily, for Figure 7 The hash grid corresponding to the hollow white area or the hash grid without the position overlapping area can be directly skipped for processing, i.e., without the processing of the collision flow, so as to further improve the detection efficiency.

[0139] The embodiment of the present application directly skips the data processing of the hash grid when the hash value of the current hash grid only corresponds to one to-be-rendered target or there is no to-be-rendered target, and performs the inspection on the next hash grid, thereby further saving the calculation amount, improving the data processing efficiency, further improving the rendering efficiency of the entire driving scene, and improving the user experience.

[0140] Step S404, based on the hash grid finally covered by each to-be-rendered target in the spatial hash grid, the target region where the ego vehicle is located is rendered to generate a target driving scene image.

[0141] Specifically, the above step S404 includes:

[0142] Step e1, based on the real visual size corresponding to each hash grid in the spatial hash grid, the relationship between the hash grid finally covered by each to-be-rendered target in the spatial hash grid and the position of the ego vehicle in the spatial hash grid, the rendering position of each to-be-rendered target is determined.

[0143] Specifically, the rendering position is obtained by using the real visual size corresponding to each hash grid and the position relationship between the to-be-rendered target and the ego vehicle in the spatial hash grid, and the specific implementation process is the prior art, which is not described here.

[0144] Step e2, based on the real visual size corresponding to each hash grid in the spatial hash grid, the hash grid finally covered by each to-be-rendered target in the spatial hash grid, the rendering size of each to-be-rendered target is determined.

[0145] Exemplarily, assuming that the number of hash grids covered in the length direction of the parking space is 3, and the real visual size corresponding to each hash grid is 2 meters, then the rendering size of the parking space is 2*3=6 meters.

[0146] Step e3, taking the ego vehicle as the rendering position reference point, performing scene rendering according to the rendering position and the rendering size corresponding to each to-be-rendered target to obtain a target driving scene image.

[0147] Exemplarily, after the position correction of all parking spaces in the target area scene data, the rendering position and the rendering size of each parking space can be obtained, and then the target driving scene image which conforms to the visual effect and the physical law can be rendered with the self car as the rendering position reference point. The specific rendering position, rendering size and rendering process itself are the prior art, and will not be described here. Repeat the above steps until the overall program constituted by the above steps is exited. During the whole process, different extensions can be made according to the corner points of different parking space types involved in the drawing, so as to obtain different hash grid data, thereby ensuring the visual authenticity. At this time, the generality of the algorithm also ensures that no additional adjustment is needed, and the extension is also effective for visual anti-overlap of any vehicle. In addition, in the whole calculation process, numerical values are used to affect specific parameters, such as dynamically adjusting the size of the hash grid. The larger the size, the less accurate the penetration detection, but it can improve the efficiency in dealing with some large penetration queries in the whole scene. The overall scheme of the above driving scene rendering can be realized by program design. Exemplarily, the overall program running process is as shown in Figure 14 .

[0148] The embodiment of the application converts the position relationship and size of the self car and each target to be rendered in the spatial hash grid into rendering position and rendering size by using the real visual size corresponding to each hash grid, and performs scene rendering with the self car as the rendering position reference point, thereby ensuring the accuracy of the final target driving scene image.

[0149] Exemplarily, the main technical key of the technical scheme provided by the embodiment of the application is to solve the penetration problem of the collision body by using the SAT algorithm based on the spatial hash result. The main functional modules include:

[0150] 1. Parking space data spatial hash construction module.

[0151] This module maps the externally transmitted parking space data according to the parking space center point every frame. Since the scheme provided by the embodiment of the application needs to use the peripheral diffusion iteration starting from the distance from the self car, the conventional quadtree cannot solve the fast peripheral diffusion query function.

[0152] 2. Overlap detection and derivation module.

[0153] This module is responsible for finding the corresponding hash grid from the self car position in a recursive manner with a radius, performing a nearby query on the parking space of the grid, and then performing collision detection. If collision occurs, the SAT algorithm is used to solve the penetration depth and move the objects in the far place according to the rule of not moving the objects in the near place, so that the penetration depth is 0, and the two objects achieve surface contact.

[0154] 3. Rendering module.

[0155] This module is used for rendering model drawing of processed data and calling CPU corresponding method to complete rendering drawing;

[0156] 4. Program main loop module.

[0157] For scheduling the above-mentioned various modules, such as initializing each module during program running. Each program drawing process calls the corresponding method of other modules to drive the entire calculation process.

[0158] Thus, the parking space data set represented by the four corner points of the parking space based on real-time perception can be realized. The center point information is used to quickly construct a 2D plane space hash grid. Then, the actual parking space rendering requirement size derivation is performed from the near to the far. The parking spaces within the specified range from the vehicle distance are regarded as reliable data, which are kept fixed, and then other parking spaces are derived forwardly whether they are inserted. If there is an insertion, the SAT algorithm is directly used to remove the insertion amount. The optimized data is rendered by the related rendering engine such as OpenGL ES, so that the jitter caused by the depth value comparison is avoided, because the above derivation process is based on the physical reality of reliability near high and far low, which improves the data reliability. Compared with the method of directly constructing a quadtree, the space hash method used in the embodiment of the application has extremely small CPU calculation amount, fast nearby parking space query, and can quickly work in the case of large-scale parking spaces in space discontinuity and continuity. At the same time, due to the adjustability of the single parking space parameters, it can adapt to the drawing of various 3D scene elements. Rich and real-time 3D visual effects can be presented on the vehicle machine.

[0159] In the embodiment, a driving scene rendering device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and will not be described again. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware is also possible and is contemplated.

[0160] The embodiment of the application provides a driving scene rendering device, as shown in the figure, the device comprises: Figure 15

[0161] The acquisition module 1501 is used to acquire target rendering object data of a target area where the vehicle is located, and the target rendering object data comprises the size corresponding to each target to be rendered and the positional relationship with the vehicle.

[0162] The first processing module 1502 is used to establish a space hash grid with the vehicle position as the center, and map each target to be rendered to the space hash grid based on the target rendering object data, to determine the hash value of the hash grid covered by each target to be rendered.​

[0163] The second processing module 1503 is configured to perform, starting from the position of the ego vehicle in the spatial hash grid, the quantity check on each hash grid in sequence, and adjust the positions of the to-be-rendered targets in the spatial hash grid based on the check result, so that there is no position overlapping area of the to-be-rendered targets in the spatial hash grid.

[0164] The third processing module 1504 is configured to perform scene rendering on the target region where the ego vehicle is located based on the hash grids finally covered by the to-be-rendered targets in the spatial hash grid, and generate a target driving scene image.

[0165] In some optional embodiments, the second processing module 1503 includes:

[0166] The first processing unit is configured to determine the current hash grid closest to the ego vehicle, starting from the position of the ego vehicle in the spatial hash grid.

[0167] The second processing unit is configured to check whether the hash value of the current hash grid corresponds to multiple to-be-rendered targets.

[0168] The third processing unit is configured to determine the first to-be-rendered target closest to the ego vehicle when the hash value of the current hash grid corresponds to multiple to-be-rendered targets.

[0169] The fourth processing unit is configured to perform separate axis calculation on the first to-be-rendered target and the second to-be-rendered target second closest to the ego vehicle, determine a minimum translation vector, and control the second to-be-rendered target to move according to the minimum translation vector, remove the second to-be-rendered target, and then re-perform the separate axis calculation on the first to-be-rendered target and the second to-be-rendered target second closest to the ego vehicle until all to-be-rendered targets corresponding to the hash value of the current hash grid are traversed.

[0170] The fifth processing unit is configured to, after removing the first to-be-rendered target, re-perform the step of determining the first to-be-rendered target closest to the ego vehicle until all to-be-rendered targets corresponding to the hash value of the current hash grid are traversed, remove the current hash grid, and then return to the step of determining the current hash grid closest to the ego vehicle.

[0171] In some optional embodiments, the first processing unit includes:

[0172] The first processing subunit is configured to, starting from the target hash grid covered by the ego vehicle, access the current hash grid adjacent to the target hash grid in a preset position sequence, the current hash grid being a hash grid that has not been accessed.

[0173] The second processing subunit is configured to, after all the current hash grids adjacent to the target hash grid have been visited, update the visited current hash grids to the target hash grid in the order of visiting, and return to the step of visiting the current hash grids adjacent to the target hash grid in the order of the preset position until there is no unvisited hash grid in the spatial hash grid.

[0174] In some optional embodiments, the second processing module 1503 further includes:

[0175] The sixth processing unit is configured to, after the current hash grid is removed when the hash value of the current hash grid does not correspond to a plurality of target rendering objects, return to the step of determining the current hash grid closest to the vehicle until all the hash grids in the spatial hash grid are traversed.

[0176] In some optional embodiments, the fourth processing unit is specifically configured to: control the area of the hash grid currently covered by the second target rendering object to move according to the minimum translation vector, to obtain the hash grid finally covered by the second target rendering object in the spatial hash grid.

[0177] In some optional embodiments, the third processing module 1504 includes:

[0178] The seventh processing unit is configured to determine the rendering position of each target rendering object based on the real visual size corresponding to each hash grid in the spatial hash grid, and the relationship between the hash grid finally covered by each target rendering object in the spatial hash grid and the position of the vehicle in the spatial hash grid.

[0179] The eighth processing unit is configured to determine the rendering size of each target rendering object based on the real visual size corresponding to each hash grid in the spatial hash grid and the hash grid finally covered by each target rendering object in the spatial hash grid.

[0180] The ninth processing unit is configured to perform scene rendering according to the rendering position and the rendering size corresponding to each target rendering object with the vehicle as the rendering position reference point, to obtain a target driving scene image.

[0181] In some optional embodiments, the acquisition module 1501 includes:

[0182] The acquisition unit is configured to acquire perception data of a target region collected by the vehicle.

[0183] The tenth processing unit is configured to perform target identification on the perception data to obtain each target rendering object and the positional relationship between each target rendering object and the vehicle.

[0184] The eleventh processing unit is configured to calculate the bounding box of each target rendering object respectively to obtain the size corresponding to each target rendering object.

[0185] In some optional embodiments, the first processing module 1502 comprises:

[0186] a twelfth processing unit configured to determine the real visual size of the single hash grid based on the minimum size of each target to be rendered;

[0187] a thirteenth processing unit configured to establish a spatial hash grid covering the target area with the real visual size of the single hash grid centered at the position of the ego vehicle, and determine the hash value corresponding to each hash grid.

[0188] In some optional embodiments, the first processing module 1502 further comprises:

[0189] a fourteenth processing unit configured to determine the hash grid covered by each target to be rendered based on the real visual size of the single hash grid, the size of each target to be rendered, and the positional relationship with the ego vehicle;

[0190] a fifteenth processing unit configured to determine the hash value of the hash grid covered by each target to be rendered based on the hash value corresponding to each hash grid.

[0191] In some optional embodiments, the target to be rendered comprises a parking space and / or a vehicle.

[0192] Further function descriptions of the above-mentioned modules and units are the same as those of the corresponding method embodiments, which will not be repeated here.

[0193] The embodiments of the present application also provide a vehicle, which comprises a controller, such as Figure 16 As shown in the figure, the controller comprises one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are communicatively connected with each other by using different buses, and can be installed on a common main board or in other manners as needed. The processor can process instructions executed in the computer device, including instructions stored in the memory or graphics information of the memory to display a GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, a plurality of processors and / or buses can be used with a plurality of memories and a plurality of storage, if necessary. Similarly, a plurality of computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 16 In the figure, the processor 10 is taken as an example.

[0194] The processor 10 can be a central processor, a network processor, or a combination thereof. The processor 10 can further include hardware chips. The hardware chips can be application specific integrated circuits, programmable logic devices, or a combination thereof. The programmable logic devices can be complex programmable logic devices, field programmable logic gate arrays, general array logic, or any combination thereof.

[0195] The memory 20 stores instructions executable by the at least one processor 10 to cause the at least one processor 10 to perform the methods illustrated by the above embodiments.

[0196] The memory 20 can include a program storage area and a data storage area. The program storage area can store an operating system, application programs required by at least one function, and the like. The data storage area can store data created according to the use of the computer device, and the like. In addition, the memory 20 can include a high-speed random access memory, and can further include a non-transitory memory such as at least one disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some alternative embodiments, the memory 20 can optionally include a memory disposed remotely from the processor 10, and these remote memories can be connected to the computer device through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0197] The memory 20 can include a volatile memory such as a random access memory, and can also include a non-volatile memory such as a flash memory, a hard disk, or a solid state disk. The memory 20 can further include a combination of the above-mentioned types of memories.

[0198] The controller further includes a communication interface 30 for communication of the vehicle with other devices or communication networks.

[0199] The embodiments of the present application also provide a computer readable storage medium. The above-mentioned methods according to the embodiments of the present application can be implemented in hardware, firmware, or recorded in a storage medium, or stored in a remote storage medium or a non-transitory machine readable storage medium originally downloaded through a network and stored in a local storage medium, so that the methods described herein can be processed by such software on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. The storage medium can be a disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid state disk, etc. Further, the storage medium can further include a combination of the above-mentioned types of memories. It can be understood that the computer, the processor, the microprocessor controller, or the programmable hardware includes a storage component that can store or receive software or computer code, when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the methods illustrated by the above embodiments are implemented.

[0200] Part of the present application can be applied as a computer program product, for example, computer program instructions, when executed by a computer, through the operation of the computer, can invoke or provide the method and / or technical solutions according to the present application. Those skilled in the art should understand that the form of computer program instructions in computer readable medium includes but is not limited to source files, executable files, installation package files, etc., and accordingly, the way of computer program instructions executed by computer includes but is not limited to: the computer directly executes the instructions, or the computer compiles the instructions and then executes the corresponding compiled program, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Here, the computer readable medium can be any available computer readable storage medium or communication medium accessible to the computer.

[0201] Although the embodiments of the present application are described in conjunction with the accompanying drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present application, and such modifications and changes fall within the scope defined by the appended claims.

Claims

1. A driving scene rendering method, characterized in that: The method comprises: Obtaining target rendering object data of the target area where the vehicle is located, wherein the target rendering object data includes: the size of each target to be rendered and its position relationship with the vehicle; Establishing a spatial hash grid centered on the vehicle's position, and mapping each to-be-rendered target to the spatial hash grid based on the target rendering object data, and determining a hash value of the hash grid covered by each to-be-rendered target; Starting from the position of the ego vehicle in the spatial hash grid, the number of objects to be rendered is checked for each hash grid in turn, and the position of each object to be rendered in the spatial hash grid is adjusted based on the check result so that there is no position overlap between the objects to be rendered in the spatial hash grid. Based on the hash grids ultimately covered by each target to be rendered in the spatial hash grid, the target area where the vehicle is located is rendered to generate a target driving scene image; Starting from the vehicle's position, the number of objects to be rendered is checked for each hash grid in turn, and the position of each object to be rendered in the spatial hash grid is adjusted based on the test results, including: Starting from the position of the ego vehicle in the spatial hash grid, determine the current hash grid closest to the ego vehicle; Checking whether the hash value of the current hash grid corresponds to multiple targets to be rendered; When the hash value of the current hash grid corresponds to multiple to-be-rendered targets, determining a first to-be-rendered target that is closest to the vehicle; Calculating a separating axis for the first target to be rendered and a second target to be rendered that is the second closest to the vehicle, determining a minimum translation vector, and controlling the second target to be rendered to move according to the minimum translation vector. After removing the second target to be rendered, re-calculating the separating axis for the first target to be rendered and the second target to be rendered that is the second closest to the vehicle, until all targets to be rendered corresponding to the hash values ​​of the current hash grid are traversed; After removing the first target to be rendered, the step of determining the first target to be rendered that is closest to the vehicle is re-executed until all targets to be rendered corresponding to the hash value of the current hash grid are traversed. After removing the current hash grid, the step of returning to the step of determining the current hash grid that is closest to the vehicle is repeated.

2. The method according to claim 1, characterized in that The method of determining the current hash grid closest to the vehicle starting from the vehicle's position in the spatial hash grid includes: Starting from the target hash grid covered by the vehicle, the current hash grids adjacent to the target hash grid are visited in sequence according to a preset position order, where the current hash grid is a hash grid that has not been visited; After all current hash grids adjacent to the target hash grid have been visited, the visited current hash grids are updated as target hash grids in the order of access, and the step of accessing the current hash grids adjacent to the target hash grid in the preset position order is returned to until there are no unvisited hash grids in the spatial hash grid.

3. The method according to claim 1, characterized in that The method further comprises: When the hash value of the current hash grid does not correspond to multiple targets to be rendered, the current hash grid is removed, and the process returns to the step of determining the current hash grid closest to the vehicle until all hash grids in the spatial hash grid are traversed.

4. The method according to claim 1, wherein The controlling the second target to be rendered to move according to the minimum translation vector includes: The area of ​​the hash grid currently covered by the second target to be rendered is controlled to move according to the minimum translation vector to obtain the hash grid finally covered by the second target to be rendered in the spatial hash grid.

5. The method according to claim 4, characterized in that The method of performing scene rendering on the target area where the vehicle is located based on the hash grid ultimately covered by each target to be rendered in the spatial hash grid to generate a target driving scene image includes: Determine the rendering position of each target to be rendered based on the true visual size of each hash grid in the spatial hash grid, the relationship between the hash grid ultimately covered by each target to be rendered in the spatial hash grid, and the position of the ego vehicle in the spatial hash grid; Determine the rendering size of each target to be rendered based on the actual visual size corresponding to each hash grid in the spatial hash grid and the hash grid ultimately covered by each target to be rendered in the spatial hash grid; Taking the vehicle as the rendering position reference point, the scene is rendered according to the rendering position and rendering size corresponding to each target to be rendered to obtain the target driving scene image.

6. The method according to claim 1, characterized in that The step of obtaining target rendering object data of the target area where the vehicle is located includes: Acquire the perception data within the target area collected by the ego vehicle; Performing target recognition on the perception data to obtain each target to be rendered and a positional relationship between each target to be rendered and the vehicle; Calculate the bounding box of each target to be rendered respectively to obtain the size corresponding to each target to be rendered.

7. The method according to claim 1, characterized in that The spatial hash grid is established with the vehicle position as the center, including: Determine the actual visual size corresponding to a single hash grid based on the minimum size corresponding to each target to be rendered; A spatial hash grid covering the target area is established with the vehicle position as the center and the real visual size corresponding to a single hash grid, and a hash value corresponding to each hash grid is determined.

8. The method according to claim 7, characterized in that The step of mapping each target to be rendered to the spatial hash grid based on the target rendering object data and determining a hash value of the hash grid covered by each target to be rendered comprises: Determine the hash grid covered by each target to be rendered based on the real visual size corresponding to the single hash grid, the size of each target to be rendered, and its positional relationship with the vehicle; Based on the hash value corresponding to each hash grid, the hash value of each hash grid covered by the target to be rendered is determined.

9. The method according to any one of claims 1 to 8, characterized in that The objects to be rendered include: parking spaces and / or vehicles.

10. A driving scene rendering device, characterized in that: The device comprises: An acquisition module is used to acquire target rendering object data of a target area where the vehicle is located, wherein the target rendering object data includes: the size of each target to be rendered and its position relationship with the vehicle; A first processing module is configured to establish a spatial hash grid centered on the vehicle's position, map each to-be-rendered target to the spatial hash grid based on the target rendering object data, and determine a hash value of the hash grid covered by each to-be-rendered target; The second processing module is configured to check the number of objects to be rendered for each hash grid in sequence, starting from the position of the ego vehicle in the spatial hash grid, and adjust the corresponding position of each object to be rendered in the spatial hash grid based on the check result so that there is no position overlap between the objects to be rendered in the spatial hash grid; The third processing module is used to perform scene rendering on the target area where the vehicle is located based on the hash grid finally covered by each target to be rendered in the spatial hash grid, and generate a target driving scene image; The second processing module includes: a first processing unit for determining, starting from the position of the ego vehicle in the spatial hash grid, a current hash grid closest to the ego vehicle; a second processing unit for checking whether the hash value of the current hash grid corresponds to multiple targets to be rendered; a third processing unit for determining, when the hash value of the current hash grid corresponds to multiple targets to be rendered, a first target to be rendered that is closest to the ego vehicle; a fourth processing unit for calculating a separating axis for the first target to be rendered and a second target to be rendered that is second closest to the ego vehicle, determining a minimum translation vector, and controlling the second target to be rendered to move according to the minimum translation vector; after removing the second target to be rendered, re-executing the step of calculating the separating axis for the first target to be rendered and the second target to be rendered that is second closest to the ego vehicle until all targets to be rendered corresponding to the hash value of the current hash grid are traversed; and a fifth processing unit for re-executing the step of determining the first target to be rendered that is closest to the ego vehicle after removing the first target to be rendered, until all targets to be rendered corresponding to the hash value of the current hash grid are traversed, removing the current hash grid, and returning to the step of determining the current hash grid closest to the ego vehicle.

11. A vehicle, characterized in that: The vehicle includes a controller, the controller including: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 9 by executing the computer instructions.

12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • AR display device for vehicle and operation method thereof

    CN117215061A

  • Methods and systems for generating a map mesh for autonomous driving

    US20240212277A1