CN-122024202-A - Method, device, equipment and medium for predicting position of obstacle
Abstract
The application discloses a method, a device, equipment and a medium for predicting the position of an obstacle, and relates to the field of position detection. The method comprises the steps of obtaining size information of each frame of image, coordinate information of a preset position, a target dividing line and an ultrasonic dividing line, dividing the target dividing line and the ultrasonic dividing line, obtaining a plurality of target dividing points and ultrasonic dividing points, obtaining distances between the target dividing points and the first preset position, determining coordinate information of a target point in the image according to the size information and the coordinate information, determining moving speed when determining that obstacles of two adjacent frames of images are the same obstacle, and obtaining target fusion position information after fusion processing according to the moving speed, the distances and the coordinate information of the first preset position.
Inventors
- CHEN JIANYU
- YU ZHENGHUA
Assignees
- 魔视智能科技(徐州)有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20251204
Claims (10)
- 1. A method of predicting a location of an obstacle, the method being applied to an in-vehicle computing platform, the method comprising: Respectively acquiring size information of each frame of images in two adjacent frames of images containing an obstacle and coordinate information of a preset position, wherein the two adjacent frames of images comprise a target dividing line corresponding to a current frame of image and an ultrasonic dividing line corresponding to the obstacle; Dividing the target dividing line according to a first dividing rule, acquiring first type distance information between each target dividing point in a plurality of target dividing points and a first preset position, dividing the ultrasonic dividing line according to a second dividing rule, and acquiring second type distance information between each ultrasonic dividing point in a plurality of ultrasonic dividing points and the first preset position, wherein the first preset position is a preset position in the current frame image; Determining coordinate information of a preset number of target points in each frame of image according to the size information of each frame of image and the coordinate information of the preset position; when the obstacles contained in two adjacent frames of images belong to the same obstacle according to the coordinate information of the preset number of target points in each frame of images, determining the moving speed of a target obstacle according to the first preset position and a second preset position corresponding to the previous frame of images, wherein the target obstacle is the determined same obstacle; and carrying out fusion processing on the coordinate information of the moving speed and the first preset position, each piece of first-class distance information and each piece of second-class distance information to obtain target fusion position information, and taking the target fusion position information as the final predicted position of the target obstacle.
- 2. The method according to claim 1, wherein the dividing the target dividing line according to a first dividing rule, obtaining first type distance information between each of the target dividing points and a first preset position, and dividing the ultrasonic dividing line according to a second dividing rule, obtaining second type distance information between each of the ultrasonic dividing points and the first preset position, specifically includes: selecting a target division point by taking a first target position in the target division line as a starting point at each first preset distance, and determining first distance information between each target division point and the first preset position; And selecting an ultrasonic dividing point every second preset distance by taking a second target position in the ultrasonic dividing line as a starting point, and determining second-type distance information between each ultrasonic dividing point and the first preset position.
- 3. The method according to claim 1 or 2, wherein determining whether the obstacles contained in the two adjacent frames of images belong to the same obstacle according to the coordinate information of the preset number of target points in each frame of images, specifically comprises: according to the coordinate information of the preset number of target points in each frame of image, the overlapping area and the union area of the images of two adjacent frames are respectively determined; and determining whether the two adjacent frames of images belong to the same obstacle according to the overlapping area and the union area.
- 4. A method according to claim 3, wherein the overlapping area and the union area of the images of two adjacent frames are respectively determined according to the coordinate information of the preset number of target points in each frame of image, specifically using the following expression: ; Wherein Intersection is the overlapping area, n is the number of the target points in the overlapping area of the two adjacent frames of images, i is the i-th target point, and when i is equal to n, the value of i+1 is 0; ; Wherein Union is the Union area, Is the sum of the areas of the images of two adjacent frames.
- 5. The method according to claim 1 or 2, wherein the fusing the coordinate information of the moving speed and the first preset position, each of the first type distance information, and each of the second type distance information, to obtain target fused position information, and using the target fused position information as the final predicted position of the target obstacle, specifically includes: Performing first fusion processing on the moving speed, the first position information and all the first distance information to obtain first fusion information, wherein the first fusion information comprises initial fusion position information and first fusion speed; And carrying out second fusion processing on the initial fusion position information, the first fusion speed and all the second-class distance information to obtain the target fusion position information.
- 6. The method of claim 5, wherein the performing a first fusion process on the moving speed, the first location information, and the first type of distance information to obtain first fusion information specifically includes: determining first average distance information according to all the first type of distance information; And acquiring the first fusion information according to the first average distance information, the moving speed and the first preset position.
- 7. The method according to claim 6, wherein the performing a second fusion process on the initial fusion position information, the first fusion speed, and the ultrasonic dividing line to obtain the target fusion position information specifically includes: determining second average distance information according to all the second class distance information; and acquiring the target fusion position information according to the second average distance information, the first fusion speed and the initial fusion position information.
- 8. A position prediction apparatus for an obstacle, the apparatus being applied to an in-vehicle computing platform, the apparatus comprising: the device comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for respectively acquiring size information of each frame of images in two adjacent frames of images containing an obstacle and coordinate information of a preset position, and the two adjacent frames of images comprise a target dividing line corresponding to a current frame of image and an ultrasonic dividing line corresponding to the obstacle; The dividing module is used for dividing the target dividing line according to a first dividing rule, acquiring first-class distance information between each target dividing point in a plurality of target dividing points and a first preset position, dividing the ultrasonic dividing line according to a second dividing rule, and acquiring second-class distance information between each ultrasonic dividing point in a plurality of ultrasonic dividing points and the first preset position, wherein the first preset position is a preset position in the current frame image; The determining module is used for determining the coordinate information of the preset number of target points in each frame of image according to the size information of each frame of image and the coordinate information of the preset position; determining whether the obstacles contained in two adjacent frames of images belong to the same obstacle according to the coordinate information of the preset number of target points in each frame of images; when the determining module determines that the obstacles contained in two adjacent frames of images belong to the same obstacle according to the coordinate information of the preset number of target points in each frame of images, determining the moving speed of a target obstacle according to the first preset position and a second preset position corresponding to the previous frame of images, wherein the target obstacle is the determined same obstacle; The fusion module is used for carrying out fusion processing on the coordinate information of the moving speed and the first preset position, each piece of first-class distance information and each piece of second-class distance information; The acquisition module is further configured to acquire target fusion position information from the fusion module, and take the target fusion position information as a final predicted position of the target obstacle.
- 9. An electronic device, comprising: A memory for storing a computer program; a processor for implementing the steps of the obstacle position prediction method according to any one of claims 1 to 7 when executing the computer program.
- 10. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program, wherein the computer program, when being executed by a processor, implements the steps of the obstacle position prediction method according to any one of claims 1 to 7.
Description
Method, device, equipment and medium for predicting position of obstacle Technical Field The present application relates to the field of position detection technologies, and in particular, to a method, an apparatus, a device, and a medium for predicting a position of an obstacle. Background In an automatic parking system, a target tracking and detecting technology is a precondition for completing a parking task. Existing methods are typically based on a single vision sensor. However, in the above method, since the accuracy of the single vision sensor is not high, the related art also has a problem that the fusion cost is high in the method in which the vision sensor and the laser radar or the vision sensor and the millimeter wave radar are fused to detect and track the target. Therefore, the fusion sensing method capable of realizing low fusion cost and meeting the requirements of multi-target tracking and automatic parking performance is a problem to be solved in the technical field. Disclosure of Invention The application provides a method, a device, equipment and a medium for predicting the position of an obstacle, which at least solve the problems of low precision of a single vision sensor and high fusion cost of various radars and vision sensors in the related technology. The application provides a position prediction method of an obstacle, which comprises the following steps: Respectively acquiring size information of each frame of images in two adjacent frames of images containing the obstacle, coordinate information of a preset position, a target dividing line corresponding to the current frame of images included in the two adjacent frames of images, and an ultrasonic dividing line corresponding to the obstacle; Dividing the target dividing line according to a first dividing rule, acquiring first type distance information between each target dividing point in the plurality of target dividing points and a first preset position, dividing the ultrasonic dividing line according to a second dividing rule, and acquiring second type distance information between each ultrasonic dividing point in the plurality of ultrasonic dividing points and the first preset position, wherein the first preset position is a preset position in the current frame image; Determining coordinate information of a preset number of target points in each frame of image according to the size information of each frame of image and the coordinate information of a preset position; when the obstacles contained in two adjacent frames of images belong to the same obstacle according to the coordinate information of the preset number of target points in each frame of image, determining the moving speed of a target obstacle according to the first preset position and the second preset position corresponding to the previous frame of image, wherein the target obstacle is the determined same obstacle; and carrying out fusion processing on the moving speed, the coordinate information of the first preset position, each first type of distance information and each second type of distance information to obtain target fusion position information, and taking the target fusion position information as the final predicted position of the target obstacle. The application also provides a device for predicting the position of the obstacle, which is applied to the vehicle-mounted computing platform and comprises the following components: The device comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for respectively acquiring size information of each frame of images in two adjacent frames of images containing an obstacle, coordinate information of a preset position, a target dividing line corresponding to a current frame of image included in the two adjacent frames of images, and an ultrasonic dividing line corresponding to the obstacle; The dividing module is used for dividing the target dividing line according to a first dividing rule, acquiring first-class distance information between each target dividing point in the plurality of target dividing points and a first preset position, dividing the ultrasonic dividing line according to a second dividing rule, and acquiring second-class distance information between each ultrasonic dividing point in the plurality of ultrasonic dividing points and the first preset position, wherein the first preset position is a preset position in the current frame image; The determining module is used for determining the coordinate information of the preset number of target points in each frame of image according to the size information of each frame of image and the coordinate information of the preset position; when the determining module determines that the obstacles contained in the two adjacent frames of images belong to the same obstacle according to the coordinate information of the preset number of target points in each frame of images, the moving speed of the targ