CN-119941945-B - Vehicle prompt line display method and device, electronic equipment and storage medium
Abstract
The present application relates to the field of data processing, and in particular, to a method and apparatus for displaying a vehicle prompt line, an electronic device, and a storage medium. According to the method provided by the embodiment of the application, the distance change between the vehicle and the obstacle can be more intuitively displayed by analyzing the difference of the distance data and performing the action picture display, so that the problem of inaccurate distance grasping caused by jump is avoided. The distance between the obstacle and the vehicle is better judged by the driver, so that safer driving decisions are made. The curve segments are rendered according to the animation display strategy and connected with the curve segments rendered in different directions to form a complete continuous prompting line, so that the distance display is smoother, and jump caused by direction/distance change is avoided. The driver can more accurately sense the distance change between the vehicle and the obstacle, make more timely and accurate driving decisions, and improve driving safety.
Inventors
- REN BOWEN
- WANG MING
- YAN XIN
Assignees
- 浙江极氪智能科技有限公司
- 浙江吉利控股集团有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20250102
Claims (8)
- 1. A method for displaying a vehicle hint line, the method comprising: acquiring a curve segment and first distance data between a vehicle and obstacles in different directions at the current moment, wherein the curve segment is positioned between the vehicle and the obstacles; Analyzing the difference between the first distance data and the second distance data to obtain an animation display strategy corresponding to the curve segment, wherein the second distance data is the distance data between the vehicle and the obstacle in the same direction at the last moment; Rendering the curve segments according to the animation display strategy to obtain rendered curve segments, and connecting the rendered curve segments positioned in different directions to obtain a prompt line of the vehicle at the current moment; The method comprises the steps of analyzing the difference between first distance data and second distance data in the same direction to obtain an animation display strategy corresponding to the curve segment, wherein the method comprises the steps of comparing the first distance data with the second distance data, determining a first state corresponding to the first distance data according to whether jump abnormality exists in the first distance data if the first distance data is inconsistent with the second distance data, obtaining a second state corresponding to the second distance data, and determining a corresponding animation display strategy according to whether switching occurs between the first state and the second state; The method comprises the steps of rendering the curve segment according to the animation display strategy to obtain a rendered curve segment, determining initial transparency of a display animation according to a first state if the animation display strategy is a first animation display strategy, wherein the first animation display strategy is an animation display strategy corresponding to when switching occurs between the first state and the second state, obtaining animation frame numbers of the display animation corresponding to the curve segment, calculating transparency of each frame of the display animation according to positions of each frame of the display animation in the animation frame numbers and the initial transparency, and rendering the curve segment according to the transparency of each frame of the display animation to obtain the rendered curve segment.
- 2. The method of claim 1, wherein the determining the first state corresponding to the first distance data according to whether the first distance data has a jump abnormality comprises: if the first distance data has jump abnormality, determining that a first state corresponding to the first distance data is a hidden state; or if the first distance data does not have jump abnormality, determining a first state corresponding to the first distance data as a display state; The obtaining of the second state corresponding to the second distance data comprises inquiring a history detection record, and obtaining the second state corresponding to the second distance data from the history detection record, wherein the second state is a hidden state or a display state.
- 3. The method of claim 1, wherein rendering the curve segment according to the animation display policy results in a rendered curve segment, comprising: If the animation display strategy is a second animation display strategy, calculating a distance difference value between the first distance data and the second distance data, and calculating a color difference value between a first color value corresponding to the first distance data and a second color value corresponding to the second distance data, wherein the second animation display strategy is an animation display strategy corresponding to the situation that no switching occurs between the first state and the second state; Calculating a moving step length of each movement by using the distance difference value and a preset smoothing coefficient, and calculating a color value updated each time according to the color difference value and the preset gradient coefficient; and gradually rendering the curve segment according to the moving step length and the color value to obtain a rendered curve segment.
- 4. The method of claim 1, wherein the connecting curve segments rendered in different orientations to obtain a hint line for the vehicle at a current time comprises: Determining sector areas corresponding to curve segments rendered in different directions, and grades corresponding to each sector area, wherein the grades are determined according to the distance between the sector area and an obstacle; comparing the grades corresponding to every two adjacent sector areas to obtain a grade difference, and determining the adjacent sector areas with the grade difference larger than or equal to a preset value as two sector areas to be connected; and connecting curve segments corresponding to the sector areas to be connected to obtain a prompt line of the vehicle at the current moment.
- 5. The method of claim 4, wherein the connecting the curve segments corresponding to the sector areas to be connected to obtain the prompt line of the vehicle at the current moment includes: taking target equal division points in the two sector areas to be connected as starting points of the smooth curves; Creating an initial curve segment based on the starting point and an initial control point; Updating the control points in the initial curve segment according to interpolation factors, and recalculating the Bezier curve by using the updated control points to obtain an updated curve segment; And constructing a prompt line of the vehicle at the current moment based on the updated curve segment and a target curve segment, wherein the target curve segment is a curve segment corresponding to other fan-shaped areas except the fan-shaped areas to be connected in all the fan-shaped areas.
- 6. A display device for a vehicle reminder line, the device comprising: The system comprises an acquisition module, a control module and a control module, wherein the acquisition module is used for acquiring curve segments and first distance data between a vehicle and obstacles in different directions at the current moment, and the curve segments are positioned between the vehicle and the obstacles; The analysis module is used for analyzing the difference between the first distance data and second distance data in the same direction to obtain an animation display strategy corresponding to the curve segment, wherein the second distance data is the distance data between the vehicle and the obstacle at the last moment; The rendering module is used for rendering the curve segments according to the animation display strategy to obtain rendered curve segments, and connecting the rendered curve segments positioned in different directions to obtain a prompt line of the vehicle at the current moment; The analysis module is specifically configured to compare the first distance data with the second distance data, determine a first state corresponding to the first distance data according to whether the first distance data has jump abnormality if the first distance data is inconsistent with the second distance data, acquire a second state corresponding to the second distance data, and determine a corresponding animation display strategy according to whether switching occurs between the first state and the second state; The analysis module is specifically configured to determine, if the animation display policy is a first animation display policy, an initial transparency of a display animation according to the first state, where the first animation display policy is an animation display policy corresponding to when a switch occurs between the first state and the second state, obtain an animation frame number of the display animation corresponding to a curve segment, calculate, according to a position of each frame of the display animation in the animation frame number and the initial transparency, the transparency of each frame of the display animation, and render the curve segment according to the transparency of each frame of the display animation, thereby obtaining a rendered curve segment.
- 7. An electronic device, comprising: A memory and a processor in communication with each other, the memory having stored therein computer instructions which, upon execution, cause the processor to perform the method of any of claims 1 to 5.
- 8. A computer readable storage medium having stored thereon computer instructions for causing a computer to perform the method of any one of claims 1 to 5.
Description
Vehicle prompt line display method and device, electronic equipment and storage medium Technical Field The present invention relates to the field of data processing, and in particular, to a method and apparatus for displaying a vehicle prompt line, an electronic device, and a storage medium. Background In current vehicle visual display designs, multiple orientation tortoise figures are often employed for this purpose. By corresponding different distance ranges to different numbers and colors of lines, the distance between the barrier and the object is distinguished. For example, when the distance is 10-30cm, a red line representing a nearer distance of the vehicle model is presented, and when the distance is 80-120cm, a green line representing a farther distance from the vehicle model is presented. However, as the distance continues to approach or depart, when switching between different display ranges, the display of the line jumps, resulting in insufficient accuracy in grasping the actual distance. Disclosure of Invention In view of the above, the embodiments of the present invention provide a method, an apparatus, an electronic device, and a storage medium for displaying a vehicle prompt line, so as to solve the problem that when different display ranges are switched with continuous approach or separation of distances, only jump occurs in the display of the line, resulting in inaccurate grasp of the actual distance. In a first aspect, an embodiment of the present invention provides a method for displaying a vehicle prompt line, where the method includes: acquiring a curve segment and first distance data between a vehicle and obstacles in different directions at the current moment, wherein the curve segment is positioned between the vehicle and the obstacles; Analyzing the difference between the first distance data and second distance data in the same direction to obtain an animation display strategy corresponding to the curve segment, wherein the second distance data is the distance data between the vehicle and the obstacle in the same direction at the last moment; And rendering the curve segment according to the animation display strategy to obtain a rendered curve segment, and connecting the rendered curve segments positioned in different directions to obtain a prompt line of the vehicle at the current moment. Further, the analyzing the difference between the first distance data and the second distance data in the same direction to obtain the animation display strategy corresponding to the curve segment includes: comparing the first distance data with the second distance data; if the first distance data is inconsistent with the second distance data, determining a first state corresponding to the first distance data according to whether the first distance data has jump abnormality or not; Acquiring a second state corresponding to the second distance data; and determining a corresponding animation display strategy according to whether the first state and the second state are switched. Further, the determining, according to whether the first distance data has the jump abnormality, a first state corresponding to the first distance data includes: if the first distance data has jump abnormality, determining that a first state corresponding to the first distance data is a hidden state; or if the first distance data does not have jump abnormality, determining a first state corresponding to the first distance data as a display state; The obtaining of the second state corresponding to the second distance data comprises inquiring a history detection record, and obtaining the second state corresponding to the second distance data from the history detection record, wherein the second state is a hidden state or a display state. Further, the rendering the curve segment according to the animation display policy to obtain a rendered curve segment includes: If the animation display strategy is a first animation display strategy, determining initial transparency of the display animation according to the first state, wherein the first animation display strategy is the animation display strategy corresponding to the first state and the second state when the first state and the second state are switched; Obtaining the number of animation frames of the display animation corresponding to the curve segment, and calculating the transparency of each frame of display animation according to the position of each frame of display animation in the number of animation frames and the initial transparency; and rendering the curve segment according to the transparency of each frame display animation, and obtaining the rendered curve segment. Further, the rendering the curve segment according to the animation display policy to obtain a rendered curve segment includes: if the animation display strategy is a second animation display strategy, calculating a distance difference value between the first distance data and the second distance dat