Vehicle distance detection method, device, equipment and medium

By image processing and identification of the original images in multiple directions around the vehicle, the distance between the target object and the vehicle is determined, and the problem of high hardware cost or low accuracy in the prior art is solved, and high accuracy and low cost vehicle distance detection is achieved.

CN119888675APending Publication Date: 2025-04-25BEIJING UCAS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411661653.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The existing vehicle distance detection method based on panoramic circumferential image system has the problem of high hardware cost or low accuracy.

Method used

By acquiring original images in multiple directions around the vehicle in real time, image processing is performed to remove distortion, identify the category of the target object and the coordinates of the detection box, and determine the distance between the target object and the vehicle based on the coordinates of the detection box.

Benefits of technology

Accurate detection of the distance between the target object and the vehicle in multiple directions around the vehicle is achieved, the accuracy of distance detection is improved, hardware costs are saved, and category information of the target object is provided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119888675A_ABST
    Figure CN119888675A_ABST
Patent Text Reader

Abstract

The invention relates to a vehicle distance detection method and device, equipment and a medium. The method comprises the steps that original images in multiple directions around a vehicle are acquired in real time; performing image processing on the original image to obtain a target image; wherein the target image comprises a distorted image; identifying the category of the target object in the distorted image and the coordinate of the detection frame; and determining the distance between the target object and the vehicle according to the coordinates of the detection frame. According to the invention, the accuracy of distance detection can be improved on the basis of ensuring relatively low hardware cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of vehicle technology, and in particular to a vehicle distance detection method, device, equipment and medium. Background Art

[0002] At present, in order to measure the distance of objects around the vehicle, the panoramic view monitoring (AVM) system needs to install additional distance measuring sensors such as ultrasonic radar and millimeter wave radar, which significantly increases the hardware cost. Alternatively, the traditional distance measurement method based on visual sensors is only applicable to narrow-angle and distortion-free cameras and has low measurement accuracy. The panoramic view imaging system uses a fisheye camera with an ultra-wide angle, which has very obvious distortion and is subject to certain restrictions in application, and cannot accurately measure distance. Therefore, the existing vehicle distance detection method based on the panoramic view imaging system has the problems of high hardware cost or low accuracy. Summary of the invention

[0003] In order to solve the above technical problems, the present disclosure provides a vehicle distance detection method, device, equipment and medium.

[0004] According to one aspect of the present disclosure, a vehicle distance detection method is provided, comprising:

[0005] Acquire original images in multiple directions around the vehicle in real time;

[0006] Performing image processing on the original image to obtain a target image; wherein the target image includes: a dedistorted image;

[0007] Identifying the category of the target object and the coordinates of the detection box in the dedistorted image;

[0008] The distance between the target object and the vehicle is determined according to the coordinates of the detection frame.

[0009] According to another aspect of the present disclosure, there is also provided a vehicle distance detection device, comprising:

[0010] An image acquisition module is used to acquire original images in multiple directions around the vehicle in real time;

[0011] An image processing module, used to perform image processing on the original image to obtain a target image; wherein the target image includes: a dedistorted image;

[0012] An image recognition module, used to identify the category of the target object and the coordinates of the detection box in the dedistorted image;

[0013] A distance determination module is used to determine the distance between the target object and the vehicle according to the coordinates of the detection frame.

[0014] According to another aspect of the present disclosure, an electronic device is provided, the electronic device comprising:

[0015] processor;

[0016] a memory for storing instructions executable by the processor;

[0017] The processor is used to read the executable instructions from the memory and execute the instructions to implement the above method.

[0018] According to another aspect of the present disclosure, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and the computer program is used to execute the above method.

[0019] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:

[0020] The technical solution provided by the embodiment of the present disclosure includes: acquiring original images in multiple directions around the vehicle in real time; performing image processing on the original images to obtain a target image; wherein the target image includes: a dedistorted image; identifying the category of the target object and the coordinates of the detection frame in the dedistorted image; and determining the distance between the target object and the vehicle according to the coordinates of the detection frame. By acquiring original images in multiple directions and performing vehicle distance detection based on the original images, the present embodiment can simultaneously detect the distance between the target objects in multiple directions around the vehicle and the vehicle, and is not limited to the distance measurement in a certain direction, thereby improving the accuracy of distance detection from the direction. The distance between the target object and the vehicle is determined by the coordinates of the detection frame obtained by image recognition, which can improve the accuracy of the distance; at the same time, image recognition can also obtain the category of the target object, which can make the information of the target object richer and more intuitive, and the category, distance and other information of the target object are matched with the direction, and it is clear what target object each direction corresponds to and the distance between the target object and the vehicle, etc., so that the distance detection result is more intuitive and accurate. In addition, the present disclosure does not require additional distance measurement sensors, saving hardware costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0022] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0023] Figure 1is a flow chart of the vehicle distance detection method according to an embodiment of the present disclosure;

[0024] Figure 2 It is a structural schematic diagram of the panoramic surround image system according to an embodiment of the present disclosure;

[0025] Figure 3 is a structural block diagram of the vehicle distance detection device according to an embodiment of the present disclosure;

[0026] Figure 4 It is a schematic diagram of the structure of the electronic device described in the embodiment of the present disclosure. DETAILED DESCRIPTION

[0027] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0028] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0029] Considering that the current vehicle distance detection method based on the panoramic surround view imaging system has the problems of high hardware cost or low accuracy. Based on this, the embodiments of the present disclosure provide a vehicle distance detection method, device, equipment and medium. This solution uses the camera of the panoramic surround view imaging system itself, without the need for additional ranging sensors, and can more accurately realize the recognition of the category, direction and distance of target objects in multiple directions around the vehicle. For ease of understanding, the embodiments of the present disclosure are described below.

[0030] Figure 1 This is a flow chart of a vehicle distance detection method provided by an embodiment of the present disclosure. The method can be applied to the case where a vehicle uses a panoramic surround image system to detect the distance of surrounding target objects. The method can be executed by a vehicle distance detection device configured at the vehicle end, and the device can be implemented using software and / or hardware. Figure 1 The vehicle distance detection method provided by the embodiment of the present disclosure may include the following steps S102-S108.

[0031] S102, acquiring original images in multiple directions around the vehicle in real time.

[0032] This embodiment can collect original images around the vehicle in real time through multiple cameras in the panoramic surround image system; wherein, multiple cameras are installed in multiple directions around the vehicle, for example, four cameras are installed in the front, rear, left and right directions around the vehicle respectively, and multiple cameras in different directions collect original images in real time around the vehicle in multiple directions; based on the original images in multiple directions, the distance between the target objects in multiple directions around the vehicle and the vehicle can be detected simultaneously, without being limited to the distance measurement in a single direction. The above-mentioned cameras are generally the most commonly used wide-angle cameras (commonly known as fisheye cameras) in the panoramic surround image system, and this embodiment does not require additional hardware changes to the cameras in the panoramic surround image system.

[0033] S104, performing image processing on the original image to obtain a target image; wherein the target image includes: a dedistorted image.

[0034] For each original image, this embodiment can perform at least one image processing such as dedistortion, projection transformation, splicing fusion and image enhancement on the original image to improve the image quality and obtain the target image to be further processed. The above target image includes, but is not limited to: a dedistorted image, a first overhead view image in a single direction and a second overhead view image in multiple directions.

[0035] Considering that the camera used in the panoramic surround imaging system is generally a fisheye camera with an ultra-wide angle and has very obvious distortion; therefore, in one embodiment, the original image can be dedistorted to obtain a dedistorted image.

[0036] S106, identifying the category of the target object and the coordinates of the detection box in the dedistorted image.

[0037] In this embodiment, image recognition is performed based on the dedistorted image, so that existing common deep learning-based target detection algorithms and models can be directly used. There is no need to rewrite the target detection algorithm or train a new target detection model specifically for special cameras such as fisheye cameras and images with special perspectives such as bird's-eye views, thereby reducing the complexity of image recognition in the panoramic surround imaging system.

[0038] Exemplarily, this embodiment can perform target recognition on the dedistorted image based on image recognition models such as YOLO (You Only Look Once), SSD (Single Shot MultiBox Detector) or DETR (Detection Transformer) to obtain the category, detection frame and coordinates of the target object in the dedistorted image; wherein the target object in the dedistorted image may include moving objects (such as pedestrians, bicycles, other vehicles) and stationary objects (such as trees, roadblocks) around the vehicle.

[0039] According to this embodiment, the category, detection frame and detection frame position of the target object in the dedistorted image in each direction can be obtained. In this way, the target object and its category, detection frame and detection frame position can be matched with the direction, and it is clear what target object each direction corresponds to and the detailed information of the target object.

[0040] It can be understood that the image recognition method provided in this embodiment is not only applicable to dedistorted images taken with a wide-angle camera, but also to images taken with a narrow-viewing angle and distortion-free camera, as well as images taken with cameras at various installation angles.

[0041] S18, determining the distance between the target object and the vehicle according to the coordinates of the detection frame.

[0042] In one embodiment, the grounding point coordinates of the target object can be determined based on the coordinates of the detection frame, and then the grounding point coordinates are converted into ranging coordinates in the vehicle body coordinate system, and the distance between the target object and the vehicle is determined based on the ranging coordinates.

[0043] In the existing ranging solutions based on ranging sensors, the distance cannot correspond to the target object one-to-one, and detailed information such as the category, direction, and image of the target object cannot be obtained. However, according to this embodiment, based on the coordinates of the detection frame of the target object in the dedistorted image in multiple directions, the distance between the target object in multiple directions around the vehicle and the vehicle can be determined accordingly, so as to better achieve omnidirectional ranging around the vehicle. At the same time, the distance can also correspond to the image, direction, and target object one-to-one, and it is clear what target object corresponds to each direction and the distance between the target object and the vehicle. Such distance detection results are more intuitive, accurate, and rich in information, which can help drivers reduce the occurrence of accidents such as scratches and collisions.

[0044] The vehicle distance detection method provided in this embodiment includes: acquiring original images in multiple directions around the vehicle in real time; performing image processing on the original images to obtain a target image; wherein the target image includes: a dedistorted image; identifying the category of the target object and the coordinates of the detection frame in the dedistorted image; and determining the distance between the target object and the vehicle according to the coordinates of the detection frame. By acquiring original images in multiple directions and performing vehicle distance detection based on the original images, this embodiment can simultaneously detect the distance between the target objects in multiple directions around the vehicle and the vehicle, and is not limited to the distance measurement in a certain direction, thereby improving the accuracy of distance detection from the direction. The distance between the target object and the vehicle is determined by the coordinates of the detection frame obtained by image recognition, which can improve the accuracy of the distance; at the same time, image recognition can also obtain the category of the target object, which can make the information of the target object richer and more intuitive, and correspond the category, distance and other information of the target object to the direction, clarifying what target object corresponds to each direction and the distance between the target object and the vehicle, etc., so that the distance detection result is more intuitive and accurate. In addition, the present disclosure does not need to add additional distance measurement sensors, saving hardware costs. Therefore, the present disclosure improves the accuracy of distance detection on the basis of ensuring low hardware costs.

[0045] In order to better understand the solution, the following Figure 2 The panoramic surround view imaging system shown describes the vehicle distance detection method provided in the embodiment of the present disclosure.

[0046] The panoramic surround view imaging system provided in this embodiment can be applied to vehicle distance detection in multiple directions. Figure 2 As shown, the panoramic surround image system may include: an image processing system, a camera calibration system and a vehicle distance detection system. Among them, the image processing system may include: an image acquisition unit, an image stitching unit and an image recognition unit. The camera calibration system may include: a parameter setting unit, an internal parameter calibration unit and an external parameter calibration unit. The vehicle distance detection system may include: a coordinate conversion unit, a distance generation unit and an alarm prompt unit.

[0047] In this embodiment, before performing vehicle distance detection, or in other words, before acquiring the original image, in order to perform image processing more accurately, the image captured by the camera can be calibrated by a camera calibration system to obtain a calibration result; the calibration result includes: an intrinsic parameter matrix, a distortion coefficient, a dedistortion lookup table, an extrinsic parameter matrix, a projection transformation matrix, and a top view lookup table, etc.

[0048] During implementation, the camera calibration system is used to set parameter information such as the vehicle, checkerboard calibration plate and calibration cloth, and calibrate the images captured by the camera to obtain calibration results such as the intrinsic parameter matrix, distortion coefficient, dedistortion lookup table, extrinsic parameter matrix, projection transformation matrix and top view lookup table.

[0049] Among them, the vehicle information such as the length, width and wheelbase of the vehicle is set through the parameter setting unit, the chessboard information such as the number of rows, columns and side length of the chessboard calibration plate is set, and the calibration cloth information such as the length, width and relative position of the calibration cloth to the vehicle is set.

[0050] A checkerboard calibration plate in different positions and postures is placed in front of the camera; an image of the complete checkerboard calibration plate taken by the camera is obtained through an internal parameter calibration unit, and multiple checkerboard corner points of the checkerboard calibration plate in the image are extracted, and an internal parameter matrix and a distortion coefficient are obtained according to the checkerboard information and the multiple checkerboard corner points set by a parameter setting unit; when the image of the checkerboard calibration plate taken by the camera is projected onto a sensor, the distortion information of the camera and a data table mapping it are determined as a de-distortion lookup table.

[0051] Exemplarily, the functions provided by OpenCV can be used for processing; specifically, the findChessboardCorners() function and the find4QuadCornerSubpix() function are used to extract the corner points of multiple chessboards of the chessboard calibration plate in the image; the fisheye::calibrate() function is used to process the chessboard information and the corner points of multiple chessboards to obtain the intrinsic parameter matrix and the distortion coefficient; the fisheye::initUndistortRectifyMap() function is used to obtain the dedistortion lookup table.

[0052] The above internal parameter matrix can be expressed as: Among them, f x is the horizontal focal length of the camera, f y is the longitudinal focal length of the camera, c x is the horizontal pixel coordinate of the intersection of the camera optical axis and the photosensitive film, c y It is the vertical pixel coordinate of the intersection of the camera optical axis and the photosensitive film.

[0053] The above distortion coefficient can be expressed as: D = (k1, k2, p1, p2), where k1, k2 are radial distortion coefficients of the camera, and p1, p2 are tangential distortion coefficients of the camera.

[0054] In this embodiment, a calibration cloth is placed around the vehicle. The calibration cloth is used to help calibrate multiple cameras of the panoramic surround view imaging system through specific patterns and structures, ensuring that the panoramic image can be accurately captured and stitched, and improving the quality and accuracy of the image. The image containing the complete calibration cloth taken by the camera is collected by the external parameter calibration unit, and the image of the calibration cloth is dedistorted according to the internal parameter matrix, distortion coefficient and dedistortion lookup table, and then the image of the dedistorted calibration cloth is binarized to extract the corner points of multiple black squares of the calibration cloth in the binarized image; the external parameter matrix, projection transformation matrix and top view lookup table are obtained according to the calibration cloth information set by the parameter setting unit and the corner points of multiple black squares.

[0055] Exemplarily, the functions provided by OpenCV can be used for processing; specifically, the OTSU algorithm and the Sauvola algorithm are used to binarize the image of the dedistorted calibration cloth; the solvePnP() function and the findHomography() function are used to process the calibration cloth information and the corner points of multiple black squares to obtain the extrinsic parameter matrix and the projection transformation matrix; the top view lookup table is obtained by processing the dedistortion lookup table, the extrinsic parameter matrix, the projection transformation matrix and the convertMaps() function.

[0056] The above external parameter matrix can be expressed as: Among them, R is the rotation matrix and T is the translation matrix.

[0057] The above projection transformation matrix can be expressed as: Among them, r 00 ,r 01 ,r 10 ,r 11 ,r 20 ,r 21 is the rotation component, and t0, t1, t2 are the translation components.

[0058] The above projection transformation matrix can be expressed as: Among them, u and v are the coordinates of the target ground point of the target object on the dedistorted image, x and y are the ranging coordinates of the target object in the vehicle body coordinate system, and s is the conversion scale coefficient.

[0059] At this point, the camera calibration in the panoramic surround view imaging system is completed, and the subsequent vehicle distance detection method is executed based on this.

[0060] In this embodiment, the original images in multiple directions around the vehicle are acquired in real time through the image processing system, and the original images are subjected to processes such as dedistortion, projection transformation, splicing fusion and image recognition.

[0061] The image acquisition unit obtains original images in various directions in real time through cameras installed in multiple directions around the vehicle.

[0062] The image stitching unit performs image processing such as dedistortion, projection transformation, stitching and fusion on the original image to obtain the following target images: a dedistorted image, a first overhead view image in a single direction, and a second overhead view image in multiple directions.

[0063] In a specific embodiment of obtaining a dedistorted image, a dedistortion lookup table can be used to perform lens distortion correction on the original image in units of pixels to obtain a dedistorted image; wherein the dedistortion lookup table is a data table that displays information about the camera's distortion and maps it when a checkerboard calibration plate photographed by the camera is projected onto a sensor.

[0064] In a specific embodiment of obtaining a unidirectional first overhead image and a multi-directional second overhead image, a top view lookup table can be used to perform a top view transformation on the dedistorted image to obtain a unidirectional first overhead image; based on multiple unidirectional first overhead images and the weights of each first overhead image, the first overhead images are fused to obtain multi-directional second overhead images; wherein the weight of each first overhead image can be a preset value or a value determined based on the image area of ​​each first overhead image.

[0065] In this embodiment, the category of the target object and the coordinates of the detection box in the dedistorted image are identified by the image recognition unit.

[0066] In this embodiment, the distance detection system determines the distance between the target object and the vehicle according to the coordinates of the detection frame, and generates an alarm prompt information according to the distance between the target object and the vehicle. The distance detection system is relatively independent and can be easily integrated into the existing panoramic surround image system.

[0067] In the vehicle distance detection system, the specific implementation process of determining the distance between the target object and the vehicle according to the coordinates of the detection frame can refer to the following content.

[0068] The initial grounding point coordinates of the target object are determined according to the coordinates of the detection frame; the correction scale factor is determined according to the vertical distance from the midpoint of the bottom edge of the detection frame to the center line of the dedistorted image and the width of the dedistorted image; the initial grounding point coordinates are corrected according to the width of the detection frame and the correction scale factor to obtain the target grounding point coordinates.

[0069] Specifically, the coordinates of the midpoint on the bottom edge of the detection frame are determined as the initial grounding point coordinates of the target object by the coordinate conversion unit according to the coordinates of the detection frame. Since the camera installation angle has a pitch angle, target objects such as pedestrians whose height is much greater than their width will show an obvious tilt state at the non-centerline position of the dedistorted image, and the closer to the two sides of the dedistorted image, the greater the degree of tilt, resulting in the actual grounding point not being at the midpoint of the bottom edge of the detection frame, so the initial grounding point coordinates need to be corrected. During the correction, the correction scale factor can be calculated based on the distance from the midpoint of the bottom edge of the detection frame to the center line of the image and the width of the dedistorted image. Then, the corrected target grounding point coordinates are obtained based on the initial grounding point coordinates, the width of the detection frame and the correction scale factor.

[0070] Next, the target ground point coordinates are converted into the distance between the target object and the vehicle in the vehicle body coordinate system according to the projection transformation matrix.

[0071] Specifically, the distance generating unit converts the target ground point coordinates into distance measuring coordinates in the vehicle body coordinate system according to the projection transformation matrix, so as to generate the distance between the target object and the vehicle using the distance measuring coordinates.

[0072] This embodiment can improve the accuracy of the distance between the target object and the vehicle by correcting the touchdown point coordinates of the target object.

[0073] Based on the above embodiments, the vehicle distance detection method provided by the present disclosure may further include:

[0074] Displaying the dedistorted image with object information annotated on a preset user interface; wherein the object information includes: a detection frame, category, distance, and direction of the target object;

[0075] It also includes: when the distance is less than a preset distance threshold, generating an alarm prompt message and displaying a first overhead image of the target direction on the user interface; wherein the target direction includes: a direction corresponding to a distance less than the distance threshold.

[0076] In some existing solutions, when displaying distance information, the distance information cannot be associated with the image of a specific target object, and the information display is not intuitive enough, resulting in a potential collision hazard for the vehicle, making the vehicle's safety performance low. Based on this, in this embodiment, in order to more intuitively display the target objects around the vehicle and their categories, distances and other information, the relevant information of the target objects can be visualized through the alarm prompt unit.

[0077] Exemplarily, the object information of the target object is annotated on the dedistorted image, and the object information includes: the detection frame, category and distance of the target object; for example, the detection frame of the target object is represented by a rectangular frame on the dedistorted image, and the category, direction, position and distance information are marked at designated positions around the detection frame. The dedistorted image annotated with the object information is displayed on a user interface such as the vehicle's HUD (Head Up Display), central control screen and / or instrument panel, so that detailed information such as the category, direction and distance of each target object can be intuitively displayed.

[0078] This embodiment can monitor whether the distance between the target object and the vehicle is less than a preset distance threshold. When the monitored distance is less than the preset distance threshold, an alarm prompt information such as sound, light, voice and / or text is generated, and the dedistorted image displayed on the user interface is switched to a first overhead view image in the target direction.

[0079] In actual applications, the distance between the target object and the vehicle may be less than the distance threshold in multiple directions, that is, there are multiple target directions. In this case, the first top view images of multiple target directions can be displayed on the user interface at the same time, or the first top view image of the target direction corresponding to the smallest distance can be displayed first in order from near to far.

[0080] Through this embodiment, the distance between the target objects in multiple directions around the vehicle and the vehicle can be detected simultaneously, and the category, position, distance and other information of the target objects in each direction can be intuitively displayed. When the distance is less than the distance threshold that requires warning, an alarm prompt message is issued, so that the driver can clearly understand whether there are target objects around the vehicle and understand the direction, distance and other information of the target objects, helping the driver to drive the vehicle easily and effectively reducing the occurrence of accidents such as scratches and collisions.

[0081] In summary, the vehicle distance detection method provided by the present disclosure can simultaneously detect the distance between the target object in multiple directions around the vehicle and the vehicle by acquiring the original images in multiple directions around the vehicle in real time, and is not limited to the distance measurement in a certain direction, so as to better realize the all-round distance detection; the original image is processed to obtain the target images such as the dedistorted image, the first overhead image in one direction and the second overhead image in multiple directions; the dedistorted image can improve the accuracy of the distance by identifying the category of the target object and the coordinates of the detection frame, and then determining the distance between the target object and the vehicle according to the coordinates of the detection frame. At the same time, the category of the target object obtained by image recognition can make the information of the target object richer and more intuitive, and the category, distance and other information of the target object are matched with the direction, and it is clear what target object corresponds to each direction and the distance between the target object and the vehicle, so that the distance detection result is more intuitive and accurate. The first overhead image and the second overhead image in the target image can help the driver to grasp the environmental conditions around the vehicle from different directions and as a whole. In addition, the present disclosure does not need to add additional ranging sensors, saving hardware costs.

[0082] Figure 3 This is a structural block diagram of a vehicle distance detection device provided by an embodiment of the present disclosure. The device can be used to implement a vehicle distance detection method. The device can be implemented using software and / or hardware. Figure 3 The vehicle distance detection device provided in the embodiment of the present disclosure may include the following modules.

[0083] An image acquisition module 310 is used to acquire original images in multiple directions around the vehicle in real time;

[0084] The image processing module 320 is used to perform image processing on the original image to obtain a target image; wherein the target image includes: a dedistorted image;

[0085] An image recognition module 330, used to identify the category of the target object and the coordinates of the detection box in the dedistorted image;

[0086] The distance determination module 340 is used to determine the distance between the target object and the vehicle according to the coordinates of the detection frame.

[0087] In one embodiment, the device further comprises:

[0088] The calibration module is used to calibrate the image captured by the camera to obtain a calibration result; the calibration result includes: an intrinsic parameter matrix, a distortion coefficient, a dedistortion lookup table, an extrinsic parameter matrix, a projection transformation matrix and a top view lookup table.

[0089] The implementation principle and technical effects of the device provided in this embodiment are the same as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.

[0090] Figure 4 The structure diagram of an electronic device provided by the embodiment of the present disclosure is shown in FIG. Figure 4 As shown, the electronic device 400 includes one or more processors 401 and a memory 402 .

[0091] The processor 401 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 400 to perform desired functions.

[0092] The memory 402 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 401 may run the program instructions to implement the vehicle distance detection method of the embodiment of the present disclosure described above and / or other desired functions. Various contents such as input signals, signal components, noise components, etc. may also be stored in the computer-readable storage medium.

[0093] In one example, the electronic device 400 may further include: an input device 403 and an output device 404, and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0094] In addition, the input device 403 may also include, for example, a keyboard, a mouse, and the like.

[0095] The output device 404 can output various information to the outside, including the determined distance information, direction information, etc. The output device 404 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.

[0096] Of course, to simplify, Figure 4 Only some of the components related to the present disclosure in the electronic device 400 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 400 may also include any other appropriate components.

[0097] Furthermore, this embodiment also provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the above-mentioned vehicle distance detection method.

[0098] A computer program product of a vehicle distance detection method, device, electronic device and medium provided in the embodiments of the present disclosure includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method described in the previous method embodiments. The specific implementation can be found in the method embodiments and will not be repeated here.

[0099] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0100] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A vehicle distance detection method, characterized in that: include: Acquire original images in multiple directions around the vehicle in real time; Performing image processing on the original image to obtain a target image; wherein the target image includes: a dedistorted image; Identifying the category of the target object and the coordinates of the detection box in the dedistorted image; The distance between the target object and the vehicle is determined according to the coordinates of the detection frame.

2. The method according to claim 1, characterized in that The method further comprises: The image captured by the camera is calibrated to obtain a calibration result; the calibration result includes: an intrinsic parameter matrix, a distortion coefficient, a dedistortion lookup table, an extrinsic parameter matrix, a projection transformation matrix and a top view lookup table.

3. The method according to claim 2, characterized in that The performing image processing on the original image to obtain a target image includes: The dedistortion lookup table is used to perform lens distortion correction on the original image in units of pixels to obtain the dedistorted image; wherein the dedistortion lookup table is a data table that displays information on the distortion of the camera and maps it when the checkerboard calibration plate photographed by the camera is projected onto the sensor.

4. The method according to claim 2, characterized in that: The target image includes: a first overhead view image in a single direction and a second overhead view image in multiple directions; the image processing of the original image to obtain the target image includes: Using the top-view lookup table to perform a top-view transformation on the dedistorted image to obtain a first top-view image in a single direction; The first overhead images are fused according to a plurality of first overhead images in a single direction and the weights of the first overhead images to obtain second overhead images in multiple directions.

5. The method according to claim 1 or 2, characterized in that: The determining the distance between the target object and the vehicle according to the coordinates of the detection frame includes: Determining the initial grounding point coordinates of the target object according to the coordinates of the detection frame; Determine a correction scale factor according to a vertical distance from a midpoint of a bottom edge of the detection frame to a center line of the dedistorted image and a width of the dedistorted image; Correcting the initial grounding point coordinates according to the width of the detection frame and the correction scale factor to obtain the target grounding point coordinates; The target grounding point coordinates are converted into the distance between the target object and the vehicle in the body coordinate system of the vehicle according to the projection transformation matrix.

6. The method according to claim 1 or 2, characterized in that: The method further comprises: Displaying the dedistorted image annotated with object information on a preset user interface; wherein the object information includes: the detection frame, the category and the distance of the target object; When the distance is less than a preset distance threshold, an alarm prompt message is generated, and a first overhead image of the target direction is displayed on the user interface; wherein the target direction includes: a direction corresponding to a distance less than the distance threshold.

7. A vehicle distance detection device, characterized in that: include: An image acquisition module is used to acquire original images in multiple directions around the vehicle in real time; An image processing module, used to perform image processing on the original image to obtain a target image; wherein the target image includes: a dedistorted image; An image recognition module, used to identify the category of the target object and the coordinates of the detection box in the dedistorted image; A distance determination module is used to determine the distance between the target object and the vehicle according to the coordinates of the detection frame.

8. The device according to claim 7, characterized in that The device also includes: The calibration module is used to calibrate the image collected by the camera to obtain a calibration result; the calibration result includes: an intrinsic parameter matrix, a distortion coefficient, a dedistortion lookup table, an extrinsic parameter matrix, a projection transformation matrix and a top view lookup table.

9. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the method described in any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device implements the method according to any one of claims 1 to 6.