Method and device for detecting distance between vehicle and obstacle
By segmenting the panoramic image, the category, identification and contour information of obstacles is obtained, the problem of inaccurate obstacle detection is solved, the precise calculation of the distance between the vehicle and the obstacle is achieved, and the safety of autonomous driving is improved.
Patent Information
- Application Number
- CN202210487132.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-06
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2042-05-06
AI Technical Summary
In the prior art, the accuracy of obstacle detection is not high, resulting in large errors in the calculation of distance between the vehicle and the obstacle, affecting the safety of autonomous driving.
By acquiring panoramic images and performing segmentation processing, the category information, identification information and outline information of the target object are obtained, and the accurate distance between the vehicle and the obstacle is determined using this information.
It improves the accuracy of obstacle detection, ensures the accuracy of distance calculation between the vehicle and obstacle, and ensures the safety of autonomous driving.
Smart Images

Figure CN114998861B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of information processing technology, and in particular relates to a method and device for detecting the distance between a vehicle and an obstacle. Background Art
[0002] Currently, autonomous driving is a technology that uses computer equipment to control vehicles to automatically drive on the road. Due to the large number of obstacles on the road, the key to autonomous driving is to identify obstacles and then control the vehicle to avoid them.
[0003] Currently, the camera collects the environment image and uses image recognition technology to identify obstacles in the environment image. However, only a rough outline can be obtained (for example: Figure 1 This causes a large error between the calculated distance between the vehicle and the obstacle and the actual distance, resulting in low obstacle detection accuracy. Summary of the Invention
[0004] The embodiments of the present application provide a method and device for detecting the distance between a vehicle and an obstacle, which can solve the problem of low accuracy in current obstacle detection.
[0005] In a first aspect, an embodiment of the present application provides a method for detecting the distance between a vehicle and an obstacle, the method comprising:
[0006] Acquire a panoramic image, where the panoramic image includes at least one target object;
[0007] Segment the panoramic image to obtain object information of each target object, including category information, identification information, and contour information;
[0008] Based on the object information, a target distance between the vehicle's observation point and each target object is determined.
[0009] In a second aspect, an embodiment of the present application provides a device for detecting the distance between a vehicle and an obstacle, the device comprising:
[0010] An acquisition module, configured to acquire a panoramic image, wherein the panoramic image includes at least one target object;
[0011] A processing module is used to segment the panoramic image to obtain object information of each target object, where the object information includes category information, identification information, and outline information;
[0012] The determination module is used to determine the target distance between the observation point of the vehicle and each target object according to the object information.
[0013] In a third aspect, an embodiment of the present application provides an electronic device comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the method in the first aspect or any possible implementation of the first aspect.
[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the method in the first aspect or any possible implementation of the first aspect is implemented.
[0015] In an embodiment of the present application, a panoramic image including at least one target object is acquired and then segmented to obtain object information of each target object including category information, identification information and contour information; here, the object information obtained by image segmentation can accurately represent the location area of the target object in the actual scene. Thus, based on the precise object information, the target distance between the vehicle's observation point and each target object can be accurately determined, thereby improving the accuracy of target object detection and ensuring safe driving of the vehicle. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0017] Figure 1 This is a schematic diagram of obstacle detection in the prior art;
[0018] Figure 2 This is a flow chart of a method for detecting the distance between a vehicle and an obstacle provided in an embodiment of the present application;
[0019] Figure 3 is a schematic diagram of target object detection provided by an embodiment of the present application;
[0020] Figure 4 This is a schematic diagram of a marking point provided in an embodiment of the present application;
[0021] Figure 5 1 is a schematic structural diagram of a device for detecting the distance between a vehicle and an obstacle provided in an embodiment of the present application;
[0022] Figure 6 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only configured to explain the present application and are not configured to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is merely to provide a better understanding of the present application by illustrating the examples of the present application.
[0024] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0025] First, the technical terms involved in the embodiments of the present application are introduced.
[0026] Semantic segmentation is a key problem in computer vision today. It is widely used in fields such as autonomous vehicles, human-computer interaction, and virtual reality. Semantic segmentation is a natural step from coarse to fine reasoning. The starting point can be located in classification, which involves making predictions about the entire input. The next step is localization / detection, which provides not only classes but also additional information about the spatial locations of these classes.
[0027] Image semantic segmentation enables computers to segment images based on their semantics. In speech recognition, semantics refers to the meaning of speech. In the image field, semantics refers to the image's content, the understanding of the image's meaning. For example, if an image includes three people riding three bicycles, its image semantics is three people riding three bicycles. Segmentation separates the different objects in the image from a pixel perspective, labeling each pixel in the original image. After semantic segmentation, the first category of pixels represents people, and the second category of pixels represents bicycles. Image semantic segmentation achieves fine-grained reasoning by densely predicting and inferring labels for each pixel, so that each pixel is labeled with its corresponding category.
[0028] Autonomous vehicles, also known as driverless cars, computer-driven cars, or wheeled mobile robots, are intelligent vehicles that utilize computer systems to achieve unmanned driving. They rely on artificial intelligence, visual computing, radar, monitoring systems, and global positioning systems to enable computers to safely and automatically operate the vehicle without any human intervention. Semantic segmentation is a core algorithmic technology for autonomous vehicles. Images captured by onboard cameras or lidar are fed into a neural network, where a backend computer automatically segments and categorizes the images to avoid obstacles such as pedestrians and vehicles.
[0029] Fisheye cameras are capable of independently achieving panoramic coverage over a wide area without blind spots. Generally speaking, current mainstream panoramic cameras offer 360° and 180° coverage, respectively, through ceiling and wall mounting. Some cameras with only a 120° to 130° field of view are also considered panoramic cameras because they can cover a wider area.
[0030] Panoramic images use wide-angle photography to show as much of the surrounding environment as possible, that is, by capturing image information of the entire scene with a professional camera.
[0031] A microcontroller unit (MCU), also known as a single-chip microcomputer, reduces the frequency and specifications of a central processing unit (CPU) and integrates peripherals such as memory and timers onto a single chip, creating a chip-level computer. This allows for various control combinations for different applications and can be installed in vehicles.
[0032] The method for detecting the distance between a vehicle and an obstacle provided in the embodiments of the present application can be applied to at least the following application scenarios, which are described below.
[0033] With the continuous development of artificial intelligence, autonomous driving technologies have entered a period of rapid development, and automated parking, as a branch of this field, has also received increasing attention. Obstacle detection is an indispensable component of automated parking. Simply put, obstacle detection in automated parking involves real-time detection of obstacles around the vehicle that may affect its smooth parking process. The onboard processing unit performs real-time calculations to control the vehicle to avoid obstacles along the way, ultimately allowing it to successfully park in the space or give up parking – a process without human intervention.
[0034] Currently, obstacle detection is achieved by continuously capturing environmental information around the vehicle through an onboard camera as the vehicle moves forward or backward, and outputting it as an image. The onboard processor then feeds the captured image into an obstacle detection algorithm, which detects the image and outputs a bounding rectangle for each obstacle. The coordinates of these bounding rectangles serve as the obstacle coordinates to assist in the automatic parking process. However, accurate obstacle outline information cannot be obtained, which results in inaccurate obstacle coordinates determined by the obstacle detection algorithm.
[0035] Based on the above application scenarios, the method for detecting the distance between a vehicle and an obstacle provided in an embodiment of the present application is described in detail below.
[0036] Figure 2 A flowchart of a method for detecting the distance between a vehicle and an obstacle provided in an embodiment of the present application.
[0037] like Figure 2 As shown, the method for detecting the distance between a vehicle and an obstacle may include steps 210 to 230. The method is applied to a device for detecting the distance between a vehicle and an obstacle, as shown below:
[0038] Step 210: Acquire a panoramic image, where the panoramic image includes at least one target object.
[0039] Optionally, acquiring the panoramic image includes: acquiring a panoramic image captured by a panoramic camera provided on the vehicle while the vehicle is moving.
[0040] Step 220 : Segment the panoramic image to obtain object information of each target object. The object information includes category information, identification information, and outline information.
[0041] Step 230 : determining a target distance between the observation point of the vehicle and each target object based on the object information.
[0042] In the method for detecting the distance between a vehicle and an obstacle provided in the present application, a panoramic image including at least one target object is acquired, and then the panoramic image is segmented to obtain object information of each target object including category information, identification information and contour information; here, the object information obtained by image segmentation can accurately represent the location area of the target object in the actual scene. Therefore, based on the precise object information, the target distance between the vehicle's observation point and each target object can be accurately determined, thereby improving the accuracy of target object detection and ensuring safe driving of the vehicle.
[0043] The contents of steps 210 to 230 are described below respectively:
[0044] This involves step 210 .
[0045] Specifically, the panoramic image can be collected by a panoramic camera arranged on the vehicle while the vehicle is moving.
[0046] In a possible embodiment, there are multiple panoramic cameras, and step 210 may specifically include the following steps:
[0047] Collect target images through each panoramic camera respectively;
[0048] Multiple target images are stitched together to generate a panoramic image.
[0049] Specifically, four panoramic cameras can be installed at the front, rear, and sides of the vehicle. The target images captured by each panoramic camera can be stitched together to form a complete panoramic image, or a panoramic image. Stitching involves combining the target images captured by the four panoramic cameras installed on the vehicle into a complete panoramic image that captures the surrounding environment.
[0050] The vehicle's movement, specifically when it stops at a designated parking location, uses four panoramic cameras to continuously capture images of the vehicle's surroundings and merge them into a panoramic image in real time. This image is then fed into a digital signal processor (DSP) for image segmentation. The DSP is a high-speed processor and hardware unit on the chip that accelerates the execution of deep neural networks, improving the efficiency of subsequent semantic segmentation of the panoramic image.
[0051] The process of stitching multiple target images to generate a panoramic image may specifically include the following steps:
[0052] A plurality of target images are stitched together to obtain a stitched image; and whether the stitched image includes a target object is detected; and when it is detected that the stitched image includes the target object, the stitched image including the target object is determined as a panoramic image.
[0053] Since the target image acquisition process is continuous, some images that do not include the target object may be acquired. These images do not require subsequent processing. To improve recognition efficiency, the stitched image can be detected to determine whether the target object is an image that requires semantic segmentation. If the target object is detected in the stitched image, it is treated as a panoramic image and segmented, i.e., the segmentation process of the subsequent step 220 is executed.
[0054] This involves step 220 .
[0055] In a possible embodiment, step 220 includes:
[0056] Performing semantic segmentation processing on the panoramic image to obtain a first image, where the first image includes contour information of the target object and category information of the target object, where the contour information is used to mark the contour of the target object;
[0057] Connected component analysis is performed on the first image to obtain a second image, where the second image includes identification information of each target object.
[0058] Semantic segmentation of panoramic images can be used to delineate the outlines of different objects within a panoramic image. For example, by extracting the outline of a car, we can determine the area occupied by the car in the real world. Semantic segmentation can be performed using a deep learning network, which outputs both the outline and the category of the target object. The outline information refers to the outline of the target object and the area within it, while the category information refers to the category of the target object, such as vehicle, obstacle, or person.
[0059] Connected domain analysis segments the target objects in the first image based on their connectivity. This means that connected objects are considered the same object, while disconnected objects are considered separate objects. The result of connected domain segmentation is each individual disconnected object in the same image. For example, if the first image contains two cars, the second image, after connected domain analysis of the first image, will contain the identification information of each target object, namely, vehicle A and vehicle B, to separately label the different target objects.
[0060] This involves step 230 .
[0061] In a possible embodiment, step 230 includes:
[0062] Determining graphic information corresponding to each target object from the panoramic image according to the object information;
[0063] Perform geometric processing on the graphic information to obtain the smallest convex polygon that encloses each target object;
[0064] Determine the target distance based on the convex polygon.
[0065] After the panoramic image is segmented and the category information, identification information and outline information of each target object are obtained, the graphic information corresponding to each target object can be determined from the panoramic image based on the object information. Specifically, the graphic information can be as follows: Figure 3As shown, geometric processing is performed on the graphic information to obtain the smallest convex polygon enclosing each target object. Based on the graphic information obtained from connected domain analysis, a convex hull algorithm (e.g., Melkman's algorithm) can be used to calculate the smallest convex polygon enclosing each target object. The target distance is then determined based on the convex polygon. The target distance indicates the distance between the target object and the vehicle and can be used to determine the coordinates of the target object.
[0066] The above-mentioned step of determining the target distance based on the convex polygon may specifically include the following steps:
[0067] Calculate the shortest first distance from the observation point to the convex polygon, which includes the marked point;
[0068] The first distance is determined as the target distance, where the target distance is the distance from the observation point to the marked point.
[0069] The shortest distance from the observation point to the convex polygon is calculated as the shortest distance from the vehicle to the target object (obstacle). It can be understood that the observation point is a virtual marking point, at which the surrounding environment of the vehicle can be observed. In one embodiment, the position of the observation point can be specifically as follows: Figure 4 shown.
[0070] Current obstacle detection algorithms detect the bounding rectangle of the target object, which cannot accurately describe the exact outline of the target object. The obstacle coordinates calculated based on the bounding rectangle are relatively inaccurate. According to the object information of the embodiments of the present application, the outline of the obstacle can be accurately described. Based on this object information, the graphic information determined from the panoramic image based on the object information is geometrically processed to determine the target distance, which can more accurately determine the distance from the observation point to the marked point.
[0071] The above-mentioned step of calculating the shortest first distance from the observation point to the convex polygon may specifically include the following steps:
[0072] Calculate the third distance from the observation point to each edge of the convex polygon;
[0073] The minimum value among the third distances is determined as the first distance.
[0074] Since the convex polygon has multiple sides, it is necessary to calculate the third distance from the observation point to each side of the convex polygon, and then determine the minimum value from the multiple third distances, and determine the minimum third distance as the first distance.
[0075] The marking point includes a first marking point and a second marking point. The first marking point is a marking point in the convex polygon corresponding to the shortest distance to the observation point. Accordingly, the above-mentioned step of determining the target distance based on the convex polygon may specifically include the following steps:
[0076] Taking the first marking point as the center, extend to both sides of the convex polygon to determine the second marking point respectively; the two sides are the sides of the convex polygon passing through the first marking point;
[0077] respectively determining a second distance between the observation point and each second marking point;
[0078] The first distance and the second distance are determined as the target distance.
[0079] For a larger target object, not only the first distance to the nearest point needs to be obtained, but also the coordinates of two second marking points of the target object close to the vehicle side need to be obtained. The calculation method of the coordinates of the second marking points may specifically include:
[0080] like Figure 4 As shown, with the first marker point as the center, extend to both sides of the convex polygon to determine two second marker points. Taking one of the second marker points as an example, when the first marker point extends along the convex hull, it ends when it hits the edge of the image. The end point can be called the intersection point, and the second marker point is between the first marker point and the intersection point. Then, a point close to the above intersection point but away from the edge greater than a preset threshold (adjustable, can be initially set to 20 pixels) is selected as a second marker point. Then, the second marker point is obtained by the same steps as above, and finally two second marker points are obtained.
[0081] That is, for target objects with smaller volumes, only the shortest first distance from the observation point to the convex polygon can be determined, and accordingly, the coordinates of the first marking point closest to the vehicle can be obtained based on the first distance and the observation point coordinates; for obstacles with larger volumes, the shortest first distance from the observation point to the convex polygon and the second distance between the observation point and each second marking point can be determined, and accordingly, the coordinates of the first marking point closest to the vehicle can be obtained based on the first distance and the observation point coordinates, and the coordinates of the two first marking points can be obtained based on the second distance and the observation point coordinates.
[0082] Among them, the above-mentioned steps of performing connected domain analysis on the first image to obtain a second image, wherein the second image includes identification information of each target object, can specifically include the following steps: obtaining the category to which each pixel point in the first image belongs; performing connected domain analysis based on the category to which each pixel point belongs to obtain at least one connected domain; and determining the identification information of each target object based on the at least one connected domain.
[0083] In a possible embodiment, after step 230, the following steps may be further included:
[0084] Output vehicle control information based on object information and target distance.
[0085] In order for the vehicle to detect target objects around the vehicle body during automatic parking, control information for the vehicle can be output based on the object information and target distance. The control information is used to assist the vehicle in adjusting its posture and speed during the automatic parking process, and ultimately successfully parking into the parking space.
[0086] In the target object detection stage of steps 210 to 230, the object information obtained through image segmentation can obtain accurate object information of the target object, and the target distance between the target object and the vehicle can be calculated based on the object information. Based on the object information and the target distance, control information for the vehicle is output. The control information can assist the vehicle in moving safely and accurately to the parking space.
[0087] In summary, in an embodiment of the present application, a panoramic image including at least one target object is obtained, and then the panoramic image is segmented to obtain object information of each target object including category information, identification information and contour information; here, the object information obtained by image segmentation can accurately represent the location area of the target object in the actual scene. Therefore, based on the precise object information, the target distance between the vehicle's observation point and each target object can be accurately determined, thereby improving the accuracy of target object detection and ensuring safe driving of the vehicle.
[0088] Based on the above Figure 2 The embodiment of the present application also provides a vehicle-obstacle distance detection device, such as Figure 5 As shown, the apparatus 500 may include:
[0089] The acquisition module 510 is configured to acquire a panoramic image, where the panoramic image includes at least one target object.
[0090] The processing module 520 is used to perform segmentation processing on the panoramic image to obtain object information of each target object. The object information includes category information, identification information and contour information.
[0091] The determination module 530 is configured to determine a target distance between the observation point of the vehicle and each target object based on the object information.
[0092] In a possible implementation, the processing module 520 is specifically configured to:
[0093] Performing semantic segmentation processing on the panoramic image to obtain a first image, where the first image includes contour information of the target object and category information of the target object, where the contour information is used to mark the contour of the target object;
[0094] Connected component analysis is performed on the first image to obtain a second image, where the second image includes identification information of each target object.
[0095] In a possible implementation, the determining module 530 is specifically configured to:
[0096] Determining graphic information corresponding to each target object from the panoramic image according to the object information;
[0097] Perform geometric processing on the graphic information to obtain the smallest convex polygon that encloses each target object;
[0098] Determine the target distance based on the convex polygon.
[0099] In a possible implementation, the determining module 530 is specifically configured to:
[0100] Calculate the shortest first distance from the observation point to the convex polygon, which includes the marked point;
[0101] The first distance is determined as the target distance, where the target distance is the distance from the observation point to the marked point.
[0102] In a possible implementation, the marking point includes a first marking point and a second marking point, where the first marking point is a marking point in the convex polygon corresponding to the shortest distance from the observation point. The determining module 530 is specifically configured to:
[0103] Taking the first marking point as the center, extend to both sides of the convex polygon to determine the second marking point respectively; the two sides are the sides of the convex polygon passing through the first marking point;
[0104] respectively determining a second distance between the observation point and each second marking point;
[0105] The first distance and the second distance are determined as the target distance.
[0106] In a possible implementation, the determining module 530 is specifically configured to:
[0107] Calculate the third distance from the observation point to each edge of the convex polygon;
[0108] The minimum value among the third distances is determined as the first distance.
[0109] In a possible implementation, the acquisition module 510 is specifically configured to:
[0110] Collect target images through each panoramic camera respectively;
[0111] Multiple target images are stitched together to generate a panoramic image.
[0112] In a possible implementation, the apparatus 500 may further include:
[0113] The output module 540 is used to output control information for the vehicle according to the object information and the target distance.
[0114] In summary, in an embodiment of the present application, a panoramic image including at least one target object is obtained, and then the panoramic image is segmented to obtain object information of each target object including category information, identification information and contour information; here, the object information obtained by image segmentation can accurately represent the location area of the target object in the actual scene. Therefore, based on the precise object information, the target distance between the vehicle's observation point and each target object can be accurately determined, thereby improving the accuracy of target object detection and ensuring safe driving of the vehicle.
[0115] Figure 6 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown.
[0116] The electronic device may include a processor 601 and a memory 602 storing computer program instructions.
[0117] Specifically, the processor 601 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0118] The memory 602 may include a large-capacity memory for data or instructions. By way of example and not limitation, the memory 602 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 602 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 602 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 602 is a non-volatile solid-state memory. In a specific embodiment, the memory 602 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or a flash memory, or a combination of two or more of these.
[0119] The processor 601 reads and executes computer program instructions stored in the memory 602 to implement any one of the vehicle-obstacle distance detection methods in the embodiments shown in the figures.
[0120] In one example, the electronic device may further include a communication interface 603 and a bus 610. Figure 6 As shown, the processor 601, the memory 602, and the communication interface 603 are connected via a bus 610 and communicate with each other.
[0121] The communication interface 603 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0122] Bus 610 comprises hardware, software or both, couples the parts of electronic equipment to each other.For example, and not limitation, bus can comprise accelerated graphics port (AGP) or other graphics bus, enhanced industry standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industry standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations.In suitable cases, bus 610 can comprise one or more buses.Although the present application embodiment describes and shows specific bus, the application considers any suitable bus or interconnection.
[0123] The electronic device can execute the distance detection method between the vehicle and the obstacle in the embodiment of the present application, thereby realizing the combination Figures 2 to 4 The method described herein is for detecting the distance between a vehicle and an obstacle.
[0124] In addition, in combination with the distance detection method between a vehicle and an obstacle in the above embodiment, the embodiment of the present application can provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by the processor, the Figures 2 to 4 The distance detection method between the vehicle and the obstacle in [1].
[0125] It should be understood that the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present application is not limited to the specific steps described and illustrated. Those skilled in the art can make various changes, modifications, and additions, or change the order of the steps after understanding the spirit of the present application.
[0126] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium that can store or transmit information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0127] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps. In other words, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0128] The above description is only a specific embodiment of the present application. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the scope of protection of the present application.
Claims
1. A method for detecting the distance between a vehicle and an obstacle, characterized in that: The method comprises: Acquire a panoramic image, wherein the panoramic image includes at least one target object; Segmenting the panoramic image to obtain object information of each target object, wherein the object information includes category information, identification information, and outline information; determining a target distance between an observation point of the vehicle and each of the target objects based on the object information; Determining the target distance between the observation point of the vehicle and each of the target objects based on the object information includes: determining graphic information corresponding to each target object from the panoramic image based on the object information; performing geometric processing on the graphic information to obtain a minimum convex polygon that encloses each of the target objects; In the case where the target object is small in volume, determining the target distance based on the convex polygon includes: calculating a first shortest distance from the observation point to the convex polygon, where the convex polygon includes a marking point; determining the first distance as the target distance, where the target distance is the distance from the observation point to the marking point; the marking point includes a first marking point and a second marking point, where the first marking point is a marking point in the convex polygon corresponding to the shortest distance to the observation point; In the case where the target object is large in volume, determining the target distance based on the convex polygon includes: taking the first marking point as the center, extending to both sides of the convex polygon to respectively determine the second marking points; the two sides are the sides of the convex polygon passing through the first marking point; respectively determining the second distance between the observation point and each of the second marking points; and determining the first distance and the second distance as the target distance.
2. The method according to claim 1, characterized in that The segmenting process of the panoramic image to obtain object information of each target object includes: Performing semantic segmentation processing on the panoramic image to obtain a first image, where the first image includes contour information of the target object and category information of the target object, where the contour information is used to mark the contour of the target object; Connected component analysis is performed on the first image to obtain a second image, where the second image includes identification information of each target object.
3. The method according to claim 1, characterized in that Calculating the shortest first distance from the observation point to the convex polygon includes: Calculating a third distance from the observation point to each edge of the convex polygon; The minimum value of the third distances is determined as the first distance.
4. The method according to claim 1, wherein The vehicle is provided with a plurality of panoramic cameras, and the panoramic image acquisition includes: respectively collecting target images through each of the panoramic cameras; The plurality of target images are stitched together to generate the panoramic image.
5. The method according to claim 1, wherein After determining the target distance between the observation point of the vehicle and each target object based on the object information, the method further includes: Control information for the vehicle is output based on the object information and the target distance.
6. A device for detecting the distance between a vehicle and an obstacle, characterized in that: The device comprises: An acquisition module, configured to acquire a panoramic image, wherein the panoramic image includes at least one target object; a processing module, configured to segment the panoramic image to obtain object information of each target object, wherein the object information includes category information, identification information, and outline information; a determination module, configured to determine a target distance between an observation point of the vehicle and each of the target objects based on the object information; The determination module is specifically used to determine the graphic information corresponding to each target object from the panoramic image based on the object information; perform geometric processing on the graphic information to obtain the smallest convex polygon that encloses each target object; when the target object is small in volume, determine the target distance based on the convex polygon, including: calculating the shortest first distance from the observation point to the convex polygon, the convex polygon including a marking point; determining the first distance as the target distance, the target distance being the distance from the observation point to the marking point; the marking point including a first marking point and a second marking point, the first marking point being the marking point in the convex polygon corresponding to the shortest distance to the observation point; when the target object is large in volume, determine the target distance based on the convex polygon, including: taking the first marking point as the center, extending to both sides of the convex polygon respectively, and determining the second marking point respectively; the two sides are the sides of the convex polygon passing through the first marking point; determining the second distance between the observation point and each of the second marking points respectively; and determining the first distance and the second distance as the target distance.
7. An electronic device, characterized in that: The device includes: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the method for detecting the distance between a vehicle and an obstacle according to any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method for detecting the distance between a vehicle and an obstacle according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Method for recognizing and classifying road barriers based on video
CN103914698A
Target identification method, system and device based on binocular camera and storage medium
CN112967283A
Obstacle detection method and device
CN114298953A