Obstacle position determination method and device, electronic equipment and storage medium
By acquiring obstacle positions from multiple data frames within a sliding window in an autonomous vehicle, and using the average value, weighted summation, or fitted curve to determine the second position of the obstacle, the obstacle jitter problem is solved, and a more stable visualization display is achieved.
Patent Information
- Application Number
- CN202210698419.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-20
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2042-06-20
AI Technical Summary
The positions of surrounding obstacles perceived by autonomous vehicles are not fixed, causing the obstacles to vibrate when visualized.
By obtaining the first position of the obstacle in multiple data frames within a sliding window, the second position of the obstacle is determined using the average value, weighted summation, or fitted curve, and the first position of the obstacle in the target data frame is updated to reduce jitter.
It effectively reduces obstacle jitter during visualization, improving the accuracy and stability of location determination.
Smart Images

Figure CN114998435B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, in particular to the field of artificial intelligence such as automatic driving and computer vision, and specifically relates to a method and device for determining the position of an obstacle, an electronic device, and a storage medium. BACKGROUND
[0002] In actual applications, an automatic driving vehicle can perceive an obstacle around the vehicle according to data collected by a sensor on the vehicle, and display the obstacle on a vehicle-mounted display screen. However, the position of the obstacle perceived by the automatic driving vehicle is not fixed, and thus the obstacle may be jittered when visualized. SUMMARY
[0003] The present application provides a method and device for determining the position of an obstacle, an electronic device, and a storage medium. The specific solutions are as follows.
[0004] According to an aspect of the present application, a method for determining the position of an obstacle is provided, comprising:
[0005] obtaining a first position of an obstacle in a plurality of data frames in a sliding window;
[0006] determining a second position of the obstacle according to the first position of the obstacle in the plurality of data frames;
[0007] updating the first position of the obstacle in a target data frame in the sliding window according to the second position, and moving the sliding window by a preset step to continue updating the position of the obstacle in a target data frame in the moved sliding window.
[0008] According to another aspect of the present application, a device for determining the position of an obstacle is provided, comprising:
[0009] an obtaining module configured to obtain a first position of an obstacle in a plurality of data frames in a sliding window;
[0010] a first determining module configured to determine a second position of the obstacle according to the first position of the obstacle in the plurality of data frames;
[0011] an updating module configured to update the first position of the obstacle in a target data frame in the sliding window according to the second position, and move the sliding window by a preset step to continue updating the position of the obstacle in a target data frame in the moved sliding window.
[0012] According to another aspect of the present application, an electronic device is provided, comprising:
[0013] at least one processor; and
[0014] a memory communicatively connected with the at least one processor; wherein
[0015] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the above embodiments.
[0016] According to another aspect of the present application, a non-transitory computer readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to perform the method described in the above embodiments.
[0017] According to another aspect of the present application, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method described in the above embodiments.
[0018] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present application, nor to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0019] The accompanying drawings are used to better understand the present application, and do not limit the present application. Among them:
[0020] Figure 1 A flowchart of a method for determining the position of an obstacle according to an embodiment of the present application is provided.
[0021] Figure 2 A schematic diagram of a sliding window according to an embodiment of the present application is provided.
[0022] Figure 3 A flowchart of a method for determining the position of an obstacle according to another embodiment of the present application is provided.
[0023] Figure 4 A flowchart of a method for determining the position of an obstacle according to another embodiment of the present application is provided.
[0024] Figure 5 A flowchart of a method for determining the position of an obstacle according to another embodiment of the present application is provided.
[0025] Figure 6 A structural diagram of a device for determining the position of an obstacle according to an embodiment of the present application is provided.
[0026] Figure 7 A block diagram of an electronic device for implementing the method for determining the position of an obstacle according to an embodiment of the present application is provided. DETAILED DESCRIPTION
[0027] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of this application, including various details to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this application. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0028] Artificial intelligence (AI) is the study of using computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies include computer vision, speech recognition, natural language processing, deep learning, big data processing, and knowledge graph technologies.
[0029] Autonomous driving, also known as driverless driving, computer-controlled driving, or wheeled mobile robots, is a cutting-edge technology that relies on computer and artificial intelligence technologies to complete a full, safe, and efficient driving process without human intervention.
[0030] Computer vision is a science that studies how to make machines "see". It refers to machine vision, which uses cameras and computers to replace human eyes to identify, track and measure targets, and further performs graphic processing to make the computer-processed images more suitable for human eyes to observe or to be transmitted to instruments for detection.
[0031] The following description, with reference to the accompanying drawings, outlines a method, apparatus, electronic device, and storage medium for determining the location of obstacles according to embodiments of this application.
[0032] Figure 1 This is a flowchart illustrating a method for determining the location of an obstacle according to an embodiment of this application.
[0033] The obstacle location determination method of this application embodiment can be executed by the obstacle location determination device of this application embodiment. The device can be configured in an electronic device to update the obstacle location through a sliding window, thereby reducing obstacle jitter when the obstacle is visualized.
[0034] Among them, electronic devices can be any device with computing capabilities, such as personal computers, mobile terminals, servers, etc. Mobile terminals can be hardware devices with various operating systems, touch screens and / or displays, such as in-vehicle devices, mobile phones, tablets, personal digital assistants, wearable devices, etc.
[0035] like Figure 1 As shown, the method for determining the location of the obstacle includes:
[0036] Step 101: Obtain the first position of the obstacle in multiple data frames within the sliding window.
[0037] In this application, during vehicle operation, the vehicle can identify surrounding obstacles to obtain their locations. The vehicle can be an autonomous vehicle or a regular vehicle.
[0038] For example, LiDAR can be used to perceive obstacles around a vehicle in real time, acquiring the positions of obstacles across multiple consecutive data frames. Each data frame may contain the positions of one or more obstacles. Alternatively, a data frame can also refer to an image frame, allowing for the identification of obstacles in each frame of images captured by a camera.
[0039] In this application, the first position of the obstacle can be obtained by detection, or it can be the position updated within the previous sliding window, etc.
[0040] In this application, before visualizing the obstacle, the position of the obstacle can be updated using a sliding window. First, the first position of the obstacle in multiple data frames within the sliding window can be obtained. The size of the sliding window can be set according to actual needs; for example, if the size of the sliding window is 5, then there are 5 data frames within the sliding window.
[0041] The number of data frames within the sliding window is equal to the size of the sliding window. The number of obstacles in the data frames within the sliding window can be one or more.
[0042] For example, if the sliding window size is 5, and the sliding window contains 5 data frames, all 5 data frames contain obstacle A, and 4 of the 5 data frames contain the position data of obstacle B, then we can obtain the first position of obstacle A in the 5 data frames in the sliding window, and we can also obtain the first position of obstacle B in the 5 data frames in the sliding window. Among them, the first position of obstacle B in one data frame is empty.
[0043] Step 102: Determine the second position of the obstacle based on the first position of the obstacle in multiple data frames.
[0044] In this application, the average value of the first position of an obstacle in multiple data frames can be used to determine the second position of the obstacle.
[0045] The following is combined Figure 2 To explain, Figure 2 This is a schematic diagram of a sliding window provided in an embodiment of this application. Figure 2In the embodiment, the numbers 1, 2, 3…, 8 represent the serial numbers of the data frames, the size of the sliding window is 5, and the current sliding window includes the second data frame to the sixth data frame. For example, during detection, the coordinates of the obstacles and the vehicle on the z-axis are both 0, and the obstacles are by default on a plane. Thus, the first positions of the obstacles obtained by detection can be represented by two-dimensional coordinates. Assuming that the first positions of a certain obstacle in the second data frame to the sixth data frame are (x2, y2), (x3, y3), (x4, y4), (x5, y5), and (x6, y6), the average of the first positions of the obstacle in the second data frame to the sixth data frame can be taken as the second position of the obstacle, i.e., the second position of the obstacle is
[0046] Alternatively, the second position of the obstacle can also be determined according to the weights of the multiple data frames and the weighted sum of the first positions of the obstacle in the multiple data frames. Alternatively, the second position of the obstacle can also be obtained by fitting the first positions of the obstacle in the multiple data frames.
[0047] In step 103, the first positions of the obstacle in the target data frame in the sliding window are updated according to the second position, and the sliding window is moved by a preset step size to continue updating the positions of the obstacle in the target data frame in the moved sliding window.
[0048] In order to reduce the degree of shaking of the obstacle during visualization, in the embodiment, the first positions of the obstacle in the target data frame in the sliding window can be updated by using the calculated second position of the obstacle. For example, the first position of the obstacle in the target data frame can be updated to the second position, so that the processed position of the obstacle is smoother, and the shaking of the obstacle during visualization can be reduced.
[0049] Alternatively, the average between the second position of the obstacle and the first position of the obstacle in the target data frame can be taken as the third position of the obstacle, and the first position of the obstacle in the target data frame is updated to the third position. Thus, by updating the first position of the obstacle in the target data frame according to the second position of the obstacle and the first position of the obstacle in the target data frame, the degree of shaking of the obstacle during visualization can be further reduced.
[0050] In the embodiment, the target data frame in the sliding window can be the center data frame in the sliding window. For example, when the size of the sliding window is 5, the target data frame can be the third data frame in the sliding window. When the size of the sliding window is 6, the target data frame in the sliding window can be the two data frames at the center of the sliding window.
[0051] In the present application, after the first position of the obstacle in the target data frame in the sliding window is updated according to the second position of the obstacle, the sliding window can be moved by a preset step size, so as to continue to update the position of the obstacle in the target data frame in the moved sliding window in the above manner.
[0052] The preset step size of the movement of the sliding window can be determined according to actual needs, such as 1 or 2, and the movement direction of the sliding window is the direction of increasing the frame sequence number of the data frame.
[0053] If the data frames in the sliding window involve multiple obstacles, after the position of each obstacle in the target data frame is updated in the above manner, the sliding window can be moved by a preset step size, so as to continue to update the position of the obstacle in the target data frame in the moved sliding window.
[0054] For example, the size of the sliding window is 3, and the sliding window contains the first data frame, the second data frame and the third data frame from the first data frame position. The three data frames contain obstacles A1 and A2. Then, the second position of the obstacle A1 can be determined according to the first position of the obstacle A1 in the three data frames, and the first position of the obstacle A1 in the second data frame is updated according to the second position of the obstacle A1.
[0055] Similarly, the second position of the obstacle A2 is determined according to the first position of the obstacle A2 in the three data frames, and the first position of the obstacle A2 in the second data frame is updated according to the second position of the obstacle A2. Then, the sliding window can be moved by one step size, and the sliding window contains the second data frame, the third data frame and the fourth data frame. The position of the obstacle in the third data frame can be updated in the above manner. If the three data frames contain obstacles A1, A2 and A3, the positions of the three obstacles in the third data frame can be updated. When the second position of the obstacle A1 in the current sliding window is determined, the updated position of the obstacle A1 in the previous sliding window can be used.
[0056] In the embodiments of the present application, the first positions of the obstacles in multiple data frames in the sliding window are obtained, the second positions of the obstacles are determined according to the first positions of the obstacles in the multiple data frames, the first positions of the obstacles in the target data frame in the sliding window are updated according to the second positions, and the sliding window is moved by a preset step size, so as to continue to update the positions of the obstacles in the target data frame in the moved sliding window. Thus, the positions of the obstacles are updated by using the sliding window, so that the shaking of the obstacles can be reduced when the obstacles are visualized.
[0057] Figure 3This is a flowchart illustrating a method for determining the location of an obstacle, provided in another embodiment of this application.
[0058] like Figure 3 As shown, the method for determining the location of the obstacle includes:
[0059] Step 301: Obtain the first position of the obstacle in multiple data frames within the sliding window.
[0060] In this application, step 301 is similar to the content described in the above embodiments, so it will not be repeated here.
[0061] Step 302: Obtain the weights of multiple data frames.
[0062] In this application, the weights of multiple data frames can be preset, and the preset weights of multiple data frames can be the same or different.
[0063] Alternatively, the target data frame can be determined based on the size of the sliding window, and the number of frames between each of the other data frames and the target data frame can be determined. Then, the weight of each of the other data frames can be determined based on the number of frames between each data frame and the target data frame.
[0064] The weight of the target data frame is set, and the weight of each other data frame is less than the weight of the target data frame. The more data frames that are separated from the target data frame, the smaller the weight of each other data frame.
[0065] by Figure 2 Taking the sliding window shown as an example, the current sliding window includes the 2nd to 6th data frames. The center data frame in the sliding window, which is the 4th data frame, is the target data frame. The 4th data frame has the largest weight, q1. The 3rd and 5th data frames have the same weight, q2. The 2nd and 6th data frames have the same weight, q3. Among them, q1>q2>q3 and q1+q2+q3=1.
[0066] Therefore, by determining the weight of each other data frame based on the number of frames between other data frames and the target data frame, the accuracy of the second location of the obstacle determined subsequently can be improved.
[0067] Step 303: Determine the second position of the obstacle based on the weights of the multiple data frames and the first position of the obstacle in the multiple data frames.
[0068] In this application, if each data frame within the sliding window contains the first position of the obstacle, the first positions of the obstacle in the multiple data frames can be weighted and summed according to the weight of each data frame and the first position of the obstacle in each data frame, and the result of the weighted summation can be used as the second position of the obstacle.
[0069] For example, in the detection, the coordinates of the obstacle and the vehicle on the z-axis are both 0, and the obstacle is by default in a plane, so the position of the obstacle detected can be expressed by two-dimensional coordinates, and the position of the obstacle in the target data frame is expressed by (x, y). Figure 3 For example, the first positions of an obstacle in the second data frame to the sixth data frame are (x2, y2), (x3, y3), (x4, y4), (x5, y5), and (x6, y6) respectively, and the weights corresponding to the second data frame to the sixth data frame are w2, w3, w4, w5, and w6 respectively, so the second position of the obstacle is (w2x2+w3x3+w4x4+w5x5+w6x6, w2y2+w3y3+w4y4+w5y5+w6y6).
[0070] In step 304, the first position of the obstacle in the target data frame in the sliding window is updated according to the second position, and the sliding window is moved by a preset step size to continue updating the position of the obstacle in the target data frame in the moved sliding window.
[0071] In this application, step 304 is similar to the content described in the above embodiments, and therefore will not be described here.
[0072] In the embodiments of the present application, when the second position of the obstacle is determined according to the first positions of the obstacle in multiple data frames, the first positions of the obstacle in multiple data frames can be weighted and summed to determine the second position of the obstacle according to the weights of multiple data frames, so as to improve the accuracy of the determined second position, reduce the difference between the positions of the obstacle in the target data frame and the adjacent data frame, and then update the first position of the obstacle in the target data frame using the second position of the obstacle, so as to reduce the shaking of the obstacle when the obstacle is visualized.
[0073] Figure 4 The flowchart of the method for determining the position of the obstacle provided by another embodiment of the present application is shown.
[0074] As shown in the method for determining the position of the obstacle, the method comprises the following steps: Figure 4
[0075] In step 401, the first positions of the obstacle in multiple data frames in a sliding window are obtained.
[0076] In this application, step 401 is similar to the content described in the above embodiments, and therefore will not be described here.
[0077] In step 402, the first positions of the obstacle in multiple data frames are fitted to obtain a fitting curve.
[0078] In this application, the second position of the obstacle can be determined by fitting. In implementation, the least squares method can be used to fit the first position of the obstacle in multiple data frames to obtain a fitting curve.
[0079] Step 403: The coordinates of the points on the fitted curve that have the same coordinate values in the target direction as the first position of the obstacle in the target data frame are determined as the second position of the obstacle.
[0080] The target direction can be horizontal.
[0081] In this application, the coordinates of the point on the fitted curve that has the same coordinate value in the target direction as the first position of the obstacle in the target data frame can be the coordinates of the intersection point of the straight line corresponding to the coordinate value in the target direction of the first position of the obstacle in the target data frame and the fitted curve. The coordinates of this intersection point are determined as the second position of the obstacle.
[0082] For example, with Figure 3 For example, based on the coordinates of the obstacle in the x-axis direction in the second to sixth data frames, the first position of the obstacle in the second and sixth data frames can be fitted to obtain the fitted curve. Then, the coordinates of the intersection point of the straight line x = x4 and the fitted curve can be determined as the second position of the obstacle.
[0083] Step 404: Based on the second position, update the first position of the obstacle in the target data frame within the sliding window, and move the sliding window by a preset step size to continue updating the position of the obstacle in the target data frame within the moved sliding window.
[0084] In this application, step 404 is similar to the content described in the above embodiments, so it will not be repeated here.
[0085] In this embodiment of the application, when determining the second position of an obstacle based on the first position of the obstacle in multiple data frames, the second position of the obstacle can be determined by fitting the first position of the obstacle in multiple data frames, which improves the accuracy of the second position. Then, the first position of the obstacle in the target data frame can be updated using the second position of the obstacle, thereby reducing the jitter of the obstacle when it is visualized.
[0086] Figure 5 This is a flowchart illustrating a method for determining the location of an obstacle, provided in another embodiment of this application.
[0087] like Figure 5 As shown, the method for determining the location of the obstacle includes:
[0088] Step 501: Obtain the set of locations corresponding to the obstacles.
[0089] In the present application, the vehicle can identify the surrounding obstacles in real time to determine the first positions of the obstacles. In order to distinguish different obstacles, each obstacle can have an identifier, so that the first positions of the same obstacle in different data frames can be obtained, that is, the position set corresponding to the obstacle can be obtained. The position set includes the first positions of the obstacle in each continuous data frame.
[0090] It can be understood that if there are multiple obstacles, the position set corresponding to each obstacle can be obtained.
[0091] In actual application, the problem of missing frames can occur. For example, the first positions of an obstacle are included in the first data frame, the second data frame, the third data frame, the fifth data frame, and the sixth data frame, but the first position of the obstacle is not included in the fourth data frame. Therefore, the first positions of the obstacle in the first data frame, the second data frame, the third data frame, the fifth data frame, and the sixth data frame can be included in the position set corresponding to the obstacle.
[0092] In step 502, the first positions of the obstacle in the multiple data frames in the sliding window are obtained from the position set.
[0093] In the present application, the identifier of the data frame in the sliding window, such as the frame number, can be determined according to the size and moving step of the sliding window, and the data frames included in the sliding window can be determined according to the identifier of each data frame in the sliding window and the position set. The first positions of the obstacle in these data frames in the sliding window can be obtained from the position set.
[0094] For example, the position set of an obstacle includes the first positions of the obstacle in the first data frame to the tenth data frame, and the sliding window includes the seventh data frame to the eleventh data frame. Therefore, the first positions of the obstacle in the seventh data frame to the eleventh data frame can be obtained from the position set, wherein the first position of the obstacle in the eleventh data frame is empty, and the first positions of the obstacle in the other data frames are non-empty.
[0095] In step 503, the second position of the obstacle is determined according to the first positions of the obstacle in the multiple data frames.
[0096] In actual application, the problem of missing frames can occur, or as the obstacle appears or disappears, there can be position information of the obstacle in only part of the multiple data frames in the sliding window. Based on this, in the present application, it can be determined whether the number of data frames containing the position of the obstacle in the sliding window is greater than a preset number and less than or equal to the size of the sliding window, that is, whether the number of data frames in which the first position of the obstacle is non-empty is greater than a preset number and less than or equal to the size of the sliding window.
[0097] In a case where the number of data frames in which the first position of the obstacle is non-empty is greater than the preset number and less than or equal to the size of the sliding window, the second position of the obstacle is determined according to the first position of the obstacle in the plurality of data frames. In this way, in a case where the number of data frames in which the first position of the first obstacle is non-empty in the plurality of data frames satisfies the condition, the second position of the obstacle is determined, thereby reducing the calculation amount and improving the efficiency while reducing the jitter in the visualization of the obstacle.
[0098] The preset number can be determined according to actual needs, which is not limited in the present application.
[0099] For example, the size of the sliding window is 9, and the preset number is 6. If 7 of the 9 data frames in the sliding window include the position of the obstacle A3, and 2 of the 9 data frames do not include the position of the obstacle A3, 4 of the 9 data frames include the position of the obstacle A4, and 5 of the 9 data frames do not include the position of the obstacle A4. For the obstacle A3, the number of data frames in which the first position of the obstacle A3 is non-empty in the 9 data frames in the sliding window is 7, which is greater than the preset number 6. Therefore, 7 of the 9 data frames in which the first position of the obstacle A3 is non-empty are obtained, and the second position of the obstacle A3 can be determined according to the first position of the obstacle A3 in the 7 data frames, and the first position of the obstacle A3 in the target data frame in the sliding window is updated according to the second position of the obstacle A3. For the obstacle A4, since the number of data frames in which the first position of the obstacle A4 is non-empty in the 9 data frames in the sliding window is 4, which is less than the preset number 6, the second position of the obstacle A4 is not calculated, that is, the first position of the obstacle A4 in the target data frame in the sliding window is not updated. Then, the sliding window is moved by a preset step, and the number of data frames in which the first position of each obstacle is non-empty in the plurality of data frames in the moved sliding window is determined, which is greater than the preset number and less than or equal to the size of the sliding window. The first position of each obstacle in the target data frame in the moved sliding window is updated.
[0100] In calculating the second position of the obstacle A3 according to the first position of the obstacle A3 in the 7 data frames, the average of the first position of the obstacle A3 in the 7 data frames can be calculated, and the average is taken as the second position of the obstacle A3, or the weight of each data frame in the sliding window can be determined in the above-mentioned manner, and the weighted average can be calculated according to the weight of the 7 data frames and the first position of the obstacle A3, and the weighted average is taken as the second position of the obstacle A3.
[0101] Step 504: Based on the second position, update the first position of the obstacle in the target data frame within the sliding window, and move the sliding window by a preset step size to continue updating the position of the obstacle in the target data frame within the moved sliding window.
[0102] In this application, step 504 is similar to the content described in the above embodiments, so it will not be repeated here.
[0103] In this embodiment of the application, when obtaining the first position of an obstacle in multiple data frames within a sliding window, a set of positions corresponding to the obstacle can be obtained, and the first position of the obstacle in multiple data frames within the sliding window can be obtained from the set of positions. Thus, the position of the obstacle in a continuous frame sequence can be smoothed by the sliding window, thereby reducing the jitter of the obstacle when it is visualized.
[0104] To achieve the above embodiments, this application also proposes an obstacle location determination device. Figure 6 This is a schematic diagram of the structure of an obstacle location determination device provided in an embodiment of this application.
[0105] like Figure 6 As shown, the obstacle location determination device 600 includes:
[0106] The acquisition module 610 is used to acquire the first position of obstacles in multiple data frames within a sliding window;
[0107] The first determining module 620 is used to determine the second position of the obstacle based on the first position of the obstacle in multiple data frames;
[0108] The update module 630 is used to update the first position of the obstacle in the target data frame within the sliding window according to the second position, and move the sliding window by a preset step size to continue updating the position of the obstacle in the target data frame within the moved sliding window.
[0109] In one possible implementation of this application embodiment, the first determining module 620 includes:
[0110] The acquisition unit is used to acquire the weights of multiple data frames;
[0111] The determining unit is used to determine the second position of the obstacle based on the weights of multiple data frames and the first position of the obstacle in the multiple data frames.
[0112] In one possible implementation of this application embodiment, the acquisition unit is used for:
[0113] Determine the number of frames between each data frame other than the target data frame and the target data frame;
[0114] Determine a weight of each of the other data frames according to a number of frames between each of the other data frames and the target data frame, wherein the weight of each of the other data frames is less than the weight of the target data frame.
[0115] In a possible implementation of the embodiment of the present application, the first determining module 620 is configured to:
[0116] fit the first positions of the obstacle in the plurality of data frames to obtain a fitting curve;
[0117] determine, as the second position of the obstacle, a coordinate of a point on the fitting curve that has a same coordinate value in the target direction as the first position of the obstacle in the target data frame.
[0118] In a possible implementation of the embodiment of the present application, the updating module 630 is configured to:
[0119] update the first position of the obstacle in the target data frame to the second position.
[0120] In a possible implementation of the embodiment of the present application, the updating module 630 is configured to:
[0121] determine a third position of the obstacle according to the second position and the first position of the obstacle in the target data frame;
[0122] update the first position of the obstacle to the third position.
[0123] In a possible implementation of the embodiment of the present application, the obtaining module 610 is configured to:
[0124] obtain a position set corresponding to the obstacle, wherein the position set includes the first positions of the obstacle in the continuous data frames;
[0125] obtain the first positions of the obstacle in the plurality of data frames from the position set.
[0126] In a possible implementation of the embodiment of the present application, the device can further include:
[0127] The second determining module is configured to determine that the number of data frames in which the first position of the obstacle is not empty is greater than the preset number and less than or equal to the size of the sliding window.
[0128] It should be noted that the above explanation of the method for determining the position of the obstacle is also applicable to the device for determining the position of the obstacle, and thus will not be repeated here.
[0129] In the embodiments of the present application, the first positions of the obstacles in the plurality of data frames in the sliding window are acquired; the second positions of the obstacles are determined according to the first positions of the obstacles in the plurality of data frames; the first positions of the obstacles in the target data frame in the sliding window are updated according to the second positions, and the sliding window is moved by a preset step length, so as to continue updating the positions of the obstacles in the target data frame in the moved sliding window. In this way, the positions of the obstacles are updated by using the sliding window, so that the shaking of the obstacles can be reduced when the obstacles are visualized.
[0130] According to the embodiments of the present application, the present application further provides an electronic device, a readable storage medium and a computer program product.
[0131] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application described and / or claimed in this document.
[0132] As shown in Figure 7 The device 700 includes a computing unit 701 that can perform various appropriate actions and processes in accordance with a computer program stored in a ROM (Read-Only Memory) 702 or a computer program loaded into a RAM (Random Access Memory) 703 from a storage unit 708. Various programs and data required for the operation of the device 700 can also be stored in the RAM 703. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An I / O (Input / Output) interface 705 is also connected to the bus 704.
[0133] The plurality of components in the device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, a speaker, etc.; a storage unit 708, such as a magnetic disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0134] The computing unit 701 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Units), various special-purpose AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 701 performs various methods and processes described above, such as the obstacle position determination method. For example, in some embodiments, the obstacle position determination method can be implemented as a computer software program, which is tangibly embodied in a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded onto the RAM 703 and executed by the computing unit 701, one or more steps of the obstacle position determination method described above can be performed. Alternatively, in other embodiments, the computing unit 701 can be configured to perform the obstacle position determination method by other any appropriate means, such as by means of firmware.
[0135] Various implementations of the systems and techniques described above herein can be realized in digital electronic circuitry, integrated circuitry, a Field Programmable Gate Array (FPGA), an Application-Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a System on Chip (SOC), a Complex Programmable Logic Device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0136] Program code for carrying out methods of the present application can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces a means for implementing the functions / acts specified in the flowcharts and / or block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0137] In the context of the present application, a machine-readable medium can be a tangible medium that can contain or store program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable storage medium can include, without limitation, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory), or flash memory, fiber optics, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0138] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0139] The systems and techniques described herein can be implemented in a computing system that includes a back end component, e.g., as a data server, or that includes a middleware component, e.g., an application server, or that includes a front end component, e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described herein, or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication, e.g., a communication network. Examples of communication networks include a LAN (Local Area Network), a WAN (Wide Area Network), the Internet, and a blockchain network.
[0140] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server is generally established using computer programs running on the respective computers and having a client-server relationship to each other. A server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service (Virtual Private Server). The server can also be a server of a distributed system, or a server combined with a blockchain.
[0141] According to the embodiments of the present application, the present application also provides a computer program product, when the processor in the computer program product executes, executes the method for determining the position of the obstacle proposed in the above embodiments of the present application.
[0142] It should be understood that the various forms of flow shown above can be reordered, added to, or deleted from. For example, the steps described in the present application can be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present application can be achieved, which are not limited herein.
[0143] The above detailed description does not constitute a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for determining a position of an obstacle, comprising: obtaining a first position of the obstacle in a plurality of data frames in a sliding window; weighting and summing the first positions of the obstacle in the plurality of data frames according to weights of the plurality of data frames to determine a second position of the obstacle; wherein a frame number of intervals between each data frame other than a target data frame in the sliding window and the target data frame is determined, a weight of each data frame other than the target data frame is determined according to the frame number, the weight of each data frame other than the target data frame is less than a set weight of the target data frame, and the greater the frame number, the smaller the weight of each data frame other than the target data frame; updating the first position of the obstacle in the target data frame in the sliding window according to the second position, and moving the sliding window by a preset step to continue updating the position of the obstacle in the target data frame in the moved sliding window; wherein the first position is updated in a manner comprising updating the first position of the obstacle in the target data frame to the second position.
2. The method of claim 1, wherein, The determining of the second position of the obstacle further comprises: fitting the first positions of the obstacle in the plurality of data frames to obtain a fitting curve; determining a coordinate of a point on the fitting curve that has a same coordinate value in a target direction as the first position of the obstacle in the target data frame as the second position of the obstacle.
3. The method of claim 1, wherein, The updating of the first position of the obstacle in the target data frame in the sliding window according to the second position comprises: determining a third position of the obstacle according to the second position and the first position of the obstacle in the target data frame; updating the first position of the obstacle to the third position.
4. The method of claim 1, wherein, The obtaining of the first position of the obstacle in the plurality of data frames in the sliding window comprises: obtaining a position set corresponding to the obstacle, wherein the position set comprises the first positions of the obstacle in consecutive data frames; obtaining the first position of the obstacle in the plurality of data frames from the position set.
5. The method of any one of claims 1-4, wherein, Before the determining of the second position of the obstacle according to the first positions of the obstacle in the plurality of data frames, the method further comprises: determining that a number of data frames in which the first positions of the obstacle are not empty is greater than a preset number and less than or equal to a size of the sliding window. 6.An apparatus for determining a position of an obstacle, comprising: an obtaining module configured to obtain a first position of the obstacle in a plurality of data frames in a sliding window; a first determining module configured to weight and sum the first positions of the obstacle in the plurality of data frames according to weights of the plurality of data frames to determine a second position of the obstacle; wherein a frame number of intervals between each data frame other than a target data frame in the sliding window and the target data frame is determined, a weight of each data frame other than the target data frame is determined according to the frame number, the weight of each data frame other than the target data frame is less than a set weight of the target data frame, and the greater the frame number, the smaller the weight of each data frame other than the target data frame. an updating module, configured to update a first position of the obstacle in a target data frame in the sliding window according to the second position, and move the sliding window by a preset step to continue updating the position of the obstacle in the target data frame in the moved sliding window; wherein the updating of the first position comprises updating the first position of the obstacle in the target data frame to the second position.
7. The apparatus of claim 6, wherein, The determining of the second position of the obstacle comprises: fitting the first positions of the obstacle in the plurality of data frames to obtain a fitting curve; determining a coordinate of a point on the fitting curve which has a same coordinate value in a target direction as the first position of the obstacle in the target data frame as the second position of the obstacle.
8. The apparatus of claim 6, wherein, The updating module is configured to: determine a third position of the obstacle according to the second position and the first position of the obstacle in the target data frame; update the first position of the obstacle to the third position.
9. The apparatus of claim 6, wherein, The obtaining module is configured to: obtain a position set corresponding to the obstacle, wherein the position set comprises the first positions of the obstacle in the continuous data frames; obtain the first positions of the obstacle in the plurality of data frames from the position set.
10. The apparatus of any one of claims 6-9, further comprising: a second determining module, configured to determine that a number of data frames in which the first positions of the obstacle are not empty is greater than a preset number and less than or equal to a size of the sliding window.
11. An electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5.
12. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to enable the computer to perform the method of any one of claims 1-5.
13. A computer program product comprising a computer program which, when executed by a processor, implements the steps of the method of any one of claims 1-5.
Citation Information
Patent Citations
Trajectory processing method and device, roadside equipment and cloud control platform
CN112529890A