Method, device and equipment for extracting boundary points of drivable area and medium
By compressing and clustering the binary images of the feasible areas in the autonomous driving system, accurate and complete boundary points are extracted, and the problems of inaccurate and incomplete boundary points in the prior art are solved, and the perception and decision-making capabilities of the autonomous driving system are improved.
Patent Information
- Application Number
- CN202510076628.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-04-25
AI Technical Summary
The boundary points of the feasible area in the prior art are inaccurate and incomplete, which affects the decision-making planning and control of the autonomous driving system.
By compressing pixel points with the same pixel value in the binary image of the travelable area, comparing the compression results line by line, determining whether there is an intersection, and clustering the compression results of the intersection to extract the boundary points of the travelable area.
It improves the accuracy and completeness of boundary points in the driving area, and enhances the autonomous driving system's perception and decision-making capabilities of the environment.
Smart Images

Figure CN119888667A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of autonomous driving technology, and in particular to a method, device, equipment and medium for extracting boundary points of a drivable area. Background Art
[0002] The core of autonomous driving is to enable vehicles to drive safely and accurately without active human operation. To achieve this goal, the autonomous driving system needs to accurately perceive and understand the surrounding environment in real time, including roads, pedestrians, vehicles and other obstacles. Accurate perception of the drivable area of the road is the basis for decision-making, planning and control of the autonomous driving system. In related technologies, the free space point position information is calculated using the internal and external parameters of the vehicle camera and the inverse perspective projection transformation method, and the boundary points of the drivable area are screened by the boundary tracking algorithm, but the complete boundary point information cannot be obtained. Summary of the invention
[0003] The purpose of the present application is to provide a method, device, equipment and medium for extracting boundary points of a drivable area, so as to solve the problem of inaccurate and incomplete boundary points of a drivable area in the prior art.
[0004] The technical solutions adopted in this application are as follows:
[0005] A method for extracting boundary points of a drivable area, the method comprising: respectively compressing pixel points of the same pixel value in a binary image of the drivable area, and obtaining a corresponding set of compression results of the pixel points of the same pixel value; the binary image is an image of the surrounding image of the current vehicle output by a first model; for the set of compression results of the pixel points of the same pixel value, starting from the second row of compression results in the set of compression results, the compression results of the subsequent row are compared with the compression results of the previous row in sequence; based on the comparison result, determining whether there is an intersection between the compression results of the subsequent row and the compression results of the previous row; in the case that there is an intersection between the compression results of the subsequent row and the compression results of the previous row, determining the compression results of the subsequent row and the compression results of the previous row as an equivalent pair, and clustering the equivalent pairs to obtain a clustering result; extracting the boundary points of the drivable area in the clustering result to obtain the set of boundary points of the drivable area.
[0006] According to the above technical means, on the one hand, by compressing pixel points with the same pixel value, the amount of data that needs to be processed is reduced, thereby improving the compression efficiency; on the other hand, by comparing the compression result of the latter row with the compression result of the previous row row line by line, if the compression result of the latter row and the compression result of the previous row have an intersection, the compression result of the latter row and the compression result of the previous row are determined as an equivalent pair, and the boundary points of the drivable area are extracted from the clustering results after the equivalent pairs are clustered, which can improve the accuracy and completeness of the boundary points of the drivable area.
[0007] Furthermore, the pixel points with the same pixel value in the binary image of the drivable area are compressed respectively to obtain a set of compression results of the pixel points with the same pixel value, including: inputting the acquired surrounding image of the current vehicle into the first model to obtain a binary image of the drivable area; scanning each pixel point in the binary image row by row, compressing the pixel points corresponding to the first pixel value to obtain a set of compression results of the first pixel value; compressing the pixel points corresponding to the second pixel value to obtain a set of compression results of the second pixel value.
[0008] According to the above technical means, on the one hand, by scanning the binary image line by line and compressing the pixels with the same pixel value, the amount of data to be processed can be significantly reduced; on the other hand, the compression result set represents the distribution of pixel points with the same pixel value in the binary image in a more concise form. The compression result set provides important information for subsequent comparison, clustering and other processing steps, which helps to efficiently extract the boundary points of the drivable area in the subsequent process.
[0009] Further, the compression result includes pixel values, a starting column and an ending column of the pixel values, and determining whether there is an intersection between the compression result of the subsequent row and the compression result of the previous row based on the comparison result includes: determining whether the starting column in the compression result of the previous row is less than or equal to the ending column in the compression result of the subsequent row; if the starting column in the compression result of the previous row is less than or equal to the ending column in the compression result of the subsequent row, determining whether the ending column in the compression result of the previous row is greater than or equal to the starting column in the compression result of the subsequent row; if the ending column in the compression result of the previous row is greater than or equal to the starting column in the compression result of the subsequent row, determining that the compression result of the subsequent row has an intersection with the compression result of the previous row.
[0010] According to the above technical means, by comparing the start column in the compression result of the previous row with the end column in the compression result of the next row, and the end column in the compression result of the previous row with the start column in the compression result of the next row, it is possible to accurately determine whether the two rows of compression results have an intersection. If the two rows of compression results have an intersection, the pixels represented by the two rows of compression results are continuous in the binary image and may belong to the same drivable area or the same non-drivable area.
[0011] Further, the determining whether there is an intersection between the compression result of the subsequent row and the compression result of the previous row based on the comparison result includes: when the starting column in the compression result of the previous row is larger than the ending column in the compression result of the subsequent row, determining that there is no intersection between the compression result of the subsequent row and the compression result of the previous row; or, when the ending column in the compression result of the previous row is smaller than the starting column in the compression result of the subsequent row, determining that there is no intersection between the compression result of the subsequent row and the compression result of the previous row.
[0012] According to the above technical means, by comparing the start column in the compression result of the previous row with the end column in the compression result of the next row, or the end column in the compression result of the previous row with the start column in the compression result of the next row, it can be accurately determined whether the two rows of compression results have an intersection. If the two rows of compression results do not have an intersection, the pixels represented by the two rows of compression results are not continuous in the binary image and may belong to different regions.
[0013] Furthermore, when there is an intersection between the compression result of the subsequent row and the compression result of the previous row, the compression result of the subsequent row and the compression result of the previous row are determined as an equivalent pair, and the equivalent pairs are clustered to obtain a clustering result, including: when there is an intersection between the compression result of the subsequent row and the compression result of the previous row, the compression result of the subsequent row and the compression result of the previous row are determined as an equivalent pair; setting the same label and the same label value for the equivalent pair; clustering the equivalent pairs with the same label value to obtain a clustering result.
[0014] According to the above technical means, since the equivalent pairs are determined based on the intersection of the compression result of the latter row and the compression result of the previous row, the equivalent pairs have similar features or attributes to a large extent, making it easier for the clustering algorithm to identify these similar features and correctly group them together, thereby improving the quality and accuracy of clustering.
[0015] Furthermore, the extracting the boundary points of the drivable area in the clustering result to obtain the boundary point set of the drivable area includes: determining the drivable area in the clustering result; extracting the boundary points of the drivable area to obtain the boundary point set of the drivable area.
[0016] According to the above technical means, a set of boundary points of the drivable area can be formed by extracting the boundary points of the drivable area, which helps to more accurately identify and track the drivable area in autonomous driving, generate a more reasonable and safe driving path, and avoid collisions with obstacles or other non-drivable areas.
[0017] Further, determining the drivable area in the clustering results includes: determining a first direction position and a second direction position of the current vehicle in the binary image; searching for a compression result corresponding to the first direction position from the compression result set; determining a label corresponding to the second direction position based on the compression result corresponding to the first direction position; and clustering equivalent labels in the labels corresponding to the second direction positions to obtain a drivable area.
[0018] According to the above technical means, on the one hand, by first determining the position of the current vehicle in the binary image and then searching for the compression results related thereto, the amount of data that needs to be processed can be significantly reduced, thereby improving the overall processing efficiency; on the other hand, by determining the label of the second direction position based on the compression result of the first direction position, the drivable area of the current vehicle can be more accurately located.
[0019] Further, the determining of the first directional position and the second directional position of the current vehicle in the binary image includes: obtaining the size, resolution and field of view of the binary image; the size includes a row width and a column width; the field of view includes a top boundary, a bottom boundary, a left boundary and a right boundary; multiplying the row width by the top boundary and then taking the quotient of the sum of the top boundary and the bottom boundary to obtain the first directional position of the current vehicle in the binary image; multiplying the column width by the left boundary and then taking the quotient of the sum of the left boundary and the right boundary to obtain the second directional position of the current vehicle in the binary image.
[0020] According to the above technical means, the first direction position of the current vehicle in the binary image is determined by the row width and the top and bottom boundaries, and the second direction position of the current vehicle in the binary image is determined by the column width and the left and right boundaries, so that the position of the current vehicle in the two-dimensional image can be accurately located.
[0021] Furthermore, the boundary points of the drivable area are extracted to obtain a set of boundary points of the drivable area, including: for each pixel point in the drivable area, multiplying the first direction position of the current vehicle in the binary image by the row resolution to obtain the translation amount of each pixel point in the first direction; multiplying the position of each pixel point in the first direction by the row resolution and then subtracting the result from the translation amount of the corresponding pixel point in the first direction to obtain the first direction coordinate of each pixel point; multiplying the second direction position of the current vehicle in the binary image by the column resolution to obtain the translation amount of each pixel point in the second direction; multiplying the position of each pixel point in the second direction by the column resolution and then subtracting the result from the translation amount of the corresponding pixel point in the second direction to obtain the second direction coordinate of each pixel point; and determining the set of boundary points of the drivable area based on the first direction coordinate and the second direction coordinate.
[0022] According to the above-mentioned technical means, by calculating the translation amount of each pixel point in the drivable area in the first direction and the second direction and adjusting the position of the pixel point accordingly, the boundary points of the drivable area can be extracted more accurately, which helps to ensure that the extracted boundary point set can truly reflect the shape and outline of the drivable area.
[0023] A device for extracting boundary points of a drivable area, the device comprising:
[0024] A compression module, used for respectively compressing pixel points with the same pixel value in the binary image of the drivable area, and correspondingly obtaining a set of compression results of the pixel points with the same pixel value; the binary image is an image of the surrounding image of the current vehicle output by the first model;
[0025] A comparison module, for comparing, for a set of compression results of pixels having the same pixel value, starting from the second row of compression results in the set of compression results, the compression results of the subsequent row with the compression results of the previous row in sequence;
[0026] A first determination module, configured to determine whether the compression result of the subsequent row and the compression result of the previous row have an intersection based on the comparison result;
[0027] a second determination module, configured to determine the compression result of the subsequent row and the compression result of the previous row as an equivalent pair when there is an intersection between the compression result of the subsequent row and the compression result of the previous row, and cluster the equivalent pairs to obtain a clustering result;
[0028] The extraction module is used to extract the boundary points of the drivable area in the clustering result to obtain a boundary point set of the drivable area.
[0029] An electronic device comprises a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and the processor implements the steps in the above method when executing the program.
[0030] A computer-readable storage medium stores a computer program, which implements the steps in the above method when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 A schematic diagram of the implementation flow of a method for extracting boundary points of a drivable area proposed in this embodiment;
[0032] Figure 2 A schematic diagram of the implementation process of a Bev Occupancy Network drivable area boundary extraction method based on clustering proposed in this embodiment;
[0033] Figure 3 A schematic diagram of a binary image of a drivable area proposed in this embodiment;
[0034] Figure 4 A schematic diagram of a clustering result provided in this embodiment;
[0035] Figure 5 A schematic diagram of a set of boundary points of a drivable area provided in this embodiment;
[0036] Figure 6 A schematic diagram of the composition structure of a device for extracting boundary points of a drivable area provided in this embodiment;
[0037] Figure 7 A schematic diagram of a hardware entity of an electronic device proposed in this embodiment. DETAILED DESCRIPTION
[0038] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention, not for limiting the scope of protection of the present invention.
[0039] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0040] This embodiment proposes a method for extracting boundary points of a drivable area, such as Figure 1 As shown, the method for extracting the boundary points of the drivable area includes the following steps S101 to S105, wherein:
[0041] Step S101, compressing the pixel points with the same pixel value in the binary image of the drivable area respectively, and obtaining a compression result set of the pixel points with the same pixel value;
[0042] Here, the binary image is an image of the surrounding image of the current vehicle output by the first model. The surrounding image of the current vehicle can be a real-time image captured by a camera or other sensor installed on the current vehicle, which reflects the environmental conditions around the current vehicle. The first model of the current vehicle can be a BEV Occupancy Network model, which is a deep learning model for an autonomous driving system that can convert the surrounding image of the current vehicle into a binary image in the form of a bird's eye view (BEV).
[0043] Here, the binary image contains two pixel values (usually 0 and 1), and different pixel values are used to represent different areas. In this embodiment, a pixel value of 0 represents a drivable area in the binary image, and a pixel value of 1 represents a non-drivable area in the binary image.
[0044] In some embodiments, in a binary image, pixels with the same pixel value (i.e., pixels representing the same area) are grouped and compressed, and a compression result set of pixels with the same pixel value is obtained, and each compression result set corresponds to a group of pixels with the same pixel value in the binary image. The following is an explanation of a binary image containing pixels with a pixel value of 0 and pixels with a pixel value of 1.
[0045] In some embodiments, the pixel points with a pixel value of 0 in the binary image are compressed to obtain a compression result set of the pixel points with a pixel value of 0; the pixel points with a pixel value of 1 in the binary image are compressed to obtain a compression result set of the pixel points with a pixel value of 1.
[0046] It should be noted that, since the pixel points with a pixel value of 0 in the binary image may be scattered, that is, the pixel points with a pixel value of 0 may be located in different rows on the binary image, the pixel points with a pixel value of 0 in each row are compressed, and the compression results of the pixel points with a pixel value of 0 in each row are obtained accordingly. In this way, the compression results of the pixel points with a pixel value of 0 in all rows constitute the compression result set of the pixel points with a pixel value of 0. The method for forming the compression result set of the pixel points with a pixel value of 1 is the same as the method for forming the compression result set of the pixel points with a pixel value of 0, and the method for forming the compression result set of the pixel points with a pixel value of 0 may be referred to.
[0047] Step S102, for a set of compression results of pixels with the same pixel value, starting from the second row of compression results in the set of compression results, the compression results of the subsequent row are compared with the compression results of the previous row in sequence;
[0048] In some embodiments, for a set of compression results of pixel points with a pixel value of 0, starting from the second row in the set of compression results of pixel points with a pixel value of 0, the compression results of the pixel points with a pixel value of 0 in each row are compared row by row with the compression results of the pixel points with a pixel value of 0 in the previous row.
[0049] In some embodiments, for a set of compression results of pixel points with a pixel value of 1, starting from the second row in the set of compression results of pixel points with a pixel value of 1, the compression results of the pixel points with a pixel value of 1 in each row are compared row by row with the compression results of the pixel points with a pixel value of 1 in the previous row.
[0050] Step S103, based on the comparison result, determining whether the compression result of the next row and the compression result of the previous row have an intersection;
[0051] Here, the comparison result may refer to a conclusion obtained by comparing the compression result of the next row with the compression result of the previous row.
[0052] In some embodiments, in the process of comparing the compression result of the next row with the compression result of the previous row, it is checked whether the compression result of the next row overlaps (i.e., intersects) with the compression result of the previous row. If the compression result of the next row intersects with the compression result of the previous row, the area between the two rows is continuous; if the compression result of the next row does not intersect with the compression result of the previous row, the area between the two rows is not continuous.
[0053] Step S104, when there is an intersection between the compression result of the subsequent row and the compression result of the previous row, determining the compression result of the subsequent row and the compression result of the previous row as an equivalent pair, and clustering the equivalent pairs to obtain a clustering result;
[0054] In some implementations, if there is an intersection between two adjacent rows of compression results, the two rows of compression results are determined as equivalent pairs, indicating that they belong to part of the same drivable area; then, these equivalent pairs are clustered to obtain clustering results. In an autonomous driving system, the clustering results can help identify drivable areas, obstacles, or other key information.
[0055] Step S105 , extracting the boundary points of the drivable area in the clustering result to obtain a boundary point set of the drivable area.
[0056] Here, the boundary point of the drivable area may refer to a point on the boundary between the drivable area and other areas (eg, an obstacle, a road boundary, etc.).
[0057] In some embodiments, boundary points of the drivable area are extracted from the drivable area in the clustering results, and these boundary points are combined into a boundary point set of the drivable area, which can be used to guide the driving of the vehicle. It should be noted that the boundary point set of the drivable area can be represented in different forms, such as a pixel point list, a coordinate array, or other data structures. The boundary point set of the drivable area is crucial to the autonomous driving system because it provides key information about the shape, size, and location of the drivable area, which can help plan the driving path.
[0058] In this embodiment, on the one hand, by compressing pixel points with the same pixel value, the amount of data that needs to be processed is reduced, thereby improving the compression efficiency; on the other hand, by comparing the compression result of the latter row with the compression result of the previous row row line by line, if the compression result of the latter row and the compression result of the previous row have an intersection, the compression result of the latter row and the compression result of the previous row are determined as an equivalent pair, and the boundary points of the drivable area are extracted from the clustering results after the equivalent pairs are clustered, which can improve the accuracy and completeness of the boundary points of the drivable area.
[0059] In this embodiment, the implementation of step S101 "compressing the pixel points with the same pixel value in the binary image of the drivable area respectively, and obtaining a corresponding compression result set of the pixel points with the same pixel value" may include the following steps S111 to S113, wherein:
[0060] Step S111, inputting the acquired surrounding image of the current vehicle into the first model to obtain a binary image of the drivable area;
[0061] In some embodiments, first, an image of the surroundings of the current vehicle is acquired through a camera or other sensor installed on the current vehicle; then, the image of the surroundings of the current vehicle is input into the first model, and the first model can identify and output a binary image of the drivable area. In the binary image, a pixel point with a pixel value of 0 corresponds to a pixel point in the drivable area, and a pixel point with a pixel value of 1 corresponds to a pixel point in the non-drivable area.
[0062] Step S112, scanning each pixel point in the binary image row by row, compressing the pixel points corresponding to the first pixel value, and obtaining a compression result set of the first pixel value;
[0063] Here, in order to compress the pixels in the binary image, it is necessary to scan each pixel in the image line by line. The scanning process can be performed in a top-to-bottom and left-to-right order to ensure that each pixel on the binary image is scanned. The first pixel value is different from the second pixel value. For example, if the first pixel value is 0, then the second pixel value is 1; if the first pixel value is 1, then the second pixel value is 0. The following is an explanation with the first pixel value being 0 and the second pixel value being 1.
[0064] In some embodiments, compression processing is performed on each row of pixels with a pixel value of 0 in a binary image, and a compression result with a pixel value of 0 is obtained accordingly. The compression results of the pixel values of 0 in all rows constitute a compression result set with a pixel value of 0, and the compression result set with a pixel value of 0 represents the distribution of all pixels with a pixel value of 0 in the binary image.
[0065] Step S113, compressing the pixel points corresponding to the second pixel value to obtain a compression result set of the second pixel value.
[0066] In some embodiments, compression processing is performed on each row of pixels with a pixel value of 1 in a binary image, and a compression result with a pixel value of 1 is obtained accordingly. The compression results of the pixel values of all rows with a pixel value of 1 constitute a compression result set with a pixel value of 1. The compression result set with a pixel value of 1 represents the distribution of all pixels with a pixel value of 1 in the binary image.
[0067] In this embodiment, on the one hand, by scanning the binary image line by line and compressing the pixels with the same pixel value, the amount of data that needs to be processed can be significantly reduced; on the other hand, the compression result set represents the distribution of pixel points with the same pixel value in the binary image in a more concise form. The compression result set provides important information for subsequent comparison, clustering and other processing steps, which helps to efficiently extract the boundary points of the drivable area.
[0068] In this embodiment, the compression result includes a pixel value, a starting column and an ending column of the pixel value, and the implementation of step S103 "determining whether the compression result of the subsequent row and the compression result of the previous row have an intersection based on the comparison result" may include the following steps S121 to S123, wherein:
[0069] Step S121, determining whether the start column in the compression result of the previous row is less than or equal to the end column in the compression result of the next row;
[0070] Here, each compression result contains three key information: pixel value, starting column and ending column of pixel value. The pixel value may refer to the pixel value (e.g., 0 or 1) of the pixel represented by the compression result; the starting column may refer to the starting position of the pixel in the compression result in the binary image; and the ending column may refer to the ending position of the pixel in the compression result in the binary image.
[0071] In some embodiments, the start column in the compression result of the previous row is compared with the end column in the compression result of the next row. If the start column in the compression result of the previous row is greater than the end column in the compression result of the next row, the two rows of compression results do not overlap, and therefore it is determined that the compression result of the next row does not intersect with the compression result of the previous row.
[0072] Step S122, when the start column in the compression result of the previous row is less than or equal to the end column in the compression result of the next row, determining whether the end column in the compression result of the previous row is greater than or equal to the start column in the compression result of the next row;
[0073] In some implementations, if the start column in the compression result of the previous row is less than or equal to the end column in the compression result of the next row, the end column in the compression result of the previous row is continued to be compared with the start column in the compression result of the next row. If the end column in the compression result of the previous row is less than the start column in the compression result of the next row, the two rows of compression results do not overlap, and therefore it is determined that the compression result of the next row does not have an intersection with the compression result of the previous row.
[0074] Step S123, when the end column in the compression result of the previous row is greater than or equal to the start column in the compression result of the next row, determine that the compression result of the next row has an intersection with the compression result of the previous row.
[0075] In some implementations, if the end column in the compression result of the previous row is greater than or equal to the start column in the compression result of the next row, the two rows of compression results overlap, and therefore it is determined that the compression result of the next row intersects with the compression result of the previous row.
[0076] In this embodiment, by comparing the start column in the compression result of the previous row with the end column in the compression result of the next row, and the end column in the compression result of the previous row with the start column in the compression result of the next row, it is possible to accurately determine whether the two rows of compression results have an intersection. If the two rows of compression results have an intersection, the pixels represented by the two rows of compression results are continuous in the binary image and may belong to the same drivable area or the same non-drivable area.
[0077] In this embodiment, the implementation of step S103 "determining whether the compression result of the next row and the compression result of the previous row have an intersection based on the comparison result" may include the following steps S131 to S132, wherein:
[0078] Step S131, when the start column in the compression result of the previous row is larger than the end column in the compression result of the next row, determining that the compression result of the next row does not have an intersection with the compression result of the previous row;
[0079] In some implementations, if the start column in the compression result of the previous row is greater than the end column in the compression result of the next row, the two rows of compression results do not overlap, and therefore it is determined that the compression result of the next row does not intersect with the compression result of the previous row.
[0080] Step S132: when the end column in the compression result of the previous row is smaller than the start column in the compression result of the next row, determine that there is no intersection between the compression result of the next row and the compression result of the previous row.
[0081] In some implementations, if the end column in the compression result of the previous row is smaller than the start column in the compression result of the next row, the two rows of compression results do not overlap, and therefore it is determined that the compression result of the next row does not intersect with the compression result of the previous row.
[0082] In this embodiment, by comparing the start column in the compression result of the previous row with the end column in the compression result of the next row or the end column in the compression result of the previous row with the start column in the compression result of the next row, it can be accurately determined whether the two rows of compression results have an intersection. If the two rows of compression results do not have an intersection, the pixels represented by the two rows of compression results are not continuous in the binary image and may belong to different regions.
[0083] In this embodiment, the implementation of step S104 "when the compression result of the subsequent row and the compression result of the previous row have an intersection, determine the compression result of the subsequent row and the compression result of the previous row as an equivalent pair, and cluster the equivalent pairs to obtain a clustering result" may include the following steps S141 to S143, wherein:
[0084] Step S141, when the compression result of the subsequent row and the compression result of the previous row have an intersection, determine the compression result of the subsequent row and the compression result of the previous row as an equivalent pair;
[0085] In some embodiments, when the compression result of the subsequent row has an overlapping part with the compression result of the previous row (i.e., there is an intersection), the compression result of the subsequent row and the compression result of the previous row are determined to be an equivalent pair, and it can be considered that the compression result of the subsequent row and the compression result of the previous row are related to some extent. Therefore, in the subsequent processing process, the compression result of the subsequent row and the compression result of the previous row can be regarded as a whole or have the same properties.
[0086] Step S142, setting the same label and the same label value for the equivalent pair;
[0087] In some implementations, after the equivalent pairs are determined, they need to be marked so that they can be easily identified in subsequent processing. This is usually achieved by setting a same label for each compression result in each pair of equivalent pairs, and the label corresponds to a label value, which is used to distinguish different equivalent pairs in the subsequent clustering process.
[0088] Step S143: clustering equivalent pairs with the same label value to obtain a clustering result.
[0089] Here, clustering can refer to a technique that groups similar objects together, which can help us better understand the structure and distribution of data.
[0090] In some embodiments, a clustering algorithm (e.g., K-means, hierarchical clustering, etc.) is used to cluster equivalent pairs with the same label value to obtain clustering results. These clustering results may represent specific areas, features, etc. in the two-dimensional image, which are used for subsequent extraction of boundary points of the drivable area.
[0091] In this embodiment, since the equivalent pairs are determined based on the intersection of the compression result of the latter row and the compression result of the previous row, the equivalent pairs have similar features or attributes to a large extent, making it easier for the clustering algorithm to identify these similar features and correctly group them together, thereby improving the quality and accuracy of clustering.
[0092] In this embodiment, the implementation of step S105 "extracting the boundary points of the drivable area in the clustering result to obtain the boundary point set of the drivable area" may include the following steps S151 to S152, wherein:
[0093] Step S151, determining a drivable area in the clustering result;
[0094] In some implementations, the clustering results may include drivable areas and non-drivable areas, and therefore it is necessary to determine the drivable areas from the clustering results.
[0095] Step S152: extracting boundary points of the drivable area to obtain a boundary point set of the drivable area.
[0096] Here, the boundary point of the drivable area may refer to a pixel point or a feature point located between the drivable area and the non-drivable area.
[0097] In some embodiments, after determining the drivable area, boundary points of the drivable area are extracted, and all extracted boundary points are combined together to form a boundary set of the drivable area. The boundary set of the drivable area contains all boundary information of the drivable area and can be used for subsequent path planning.
[0098] In this embodiment, a set of boundary points of the drivable area can be formed by extracting the boundary points of the drivable area, which helps to more accurately identify and track the drivable area in autonomous driving, generate a more reasonable and safe driving path, and avoid collisions with obstacles or other non-drivable areas.
[0099] In this embodiment, the implementation of step S151 "determining the drivable area in the clustering result" may include the following steps S161 to S164, wherein:
[0100] Step S161, determining a first direction position and a second direction position of the current vehicle in the binary image;
[0101] Here, the first direction position may refer to the row number of the current vehicle in the binary image; the second direction position may refer to the column number of the current vehicle in the binary image. In a two-dimensional binary image, the first direction and the second direction may refer to the horizontal direction (e.g., the x-axis) and the vertical direction (y-axis) in the binary image.
[0102] Step S162, searching the compression result corresponding to the first direction position from the compression result set;
[0103] In some embodiments, the compression result set may include features in different areas of the two-dimensional image. According to the first direction position of the current vehicle in the binary image, finding the corresponding compression result from the compression result set helps to subsequently determine the drivable area.
[0104] Step S163, determining a label corresponding to the second direction position based on the compression result corresponding to the first direction position;
[0105] In some implementations, the compression result corresponding to the first direction position of the current vehicle in the binary image is used to determine the possible label of the current vehicle at the second direction position.
[0106] Step S164: cluster equivalent labels in the labels corresponding to the second direction positions to obtain a drivable area.
[0107] In some implementations, equivalent labels in the labels corresponding to the second direction positions are clustered to obtain the drivable area. By clustering, it is possible to identify which parts of the two-dimensional image are continuous and belong to the same drivable area.
[0108] In this embodiment, on the one hand, by first determining the position of the current vehicle in the binary image and then searching for the compression results related thereto, the amount of data that needs to be processed can be significantly reduced, thereby improving the overall processing efficiency; on the other hand, by determining the label of the second direction position based on the compression result of the first direction position, the drivable area of the current vehicle can be more accurately located.
[0109] In this embodiment, the implementation of step S161 "determining the first direction position and the second direction position of the current vehicle in the binary image" may include the following steps S171 to S173, wherein:
[0110] Step S171, obtaining the size, resolution and field of view of the binary image;
[0111] Here, the size includes the row width and column width; the view range includes the top border, bottom border, left border, and right border.
[0112] In some implementations, when the first model outputs a binary image of the drivable area, the size, resolution, and field of view of the binary image are also output.
[0113] Step S172, multiplying the line width by the top boundary and then calculating the quotient of the sum of the top boundary and the bottom boundary to obtain a first direction position of the current vehicle in the binary image;
[0114] In some implementations, the first direction position of the current vehicle in the binary image may be determined by the following formula (1):
[0115]
[0116] Among them, h1 represents the first direction position of the current vehicle in the binary image; H represents the line width; top represents the top boundary; and bottom represents the bottom boundary.
[0117] Step S173 , multiplying the column width by the left boundary and then calculating the quotient of the sum of the left boundary and the right boundary to obtain the second direction position of the current vehicle in the binary image.
[0118] In some implementations, the second direction position of the current vehicle in the binary image may be determined by the following formula (2):
[0119]
[0120] Among them, w1 represents the second direction position of the current vehicle in the binary image; W represents the column width; left represents the left boundary; and right represents the right boundary.
[0121] In this embodiment, the first direction position of the current vehicle in the binary image is determined by the row width and the top and bottom boundaries, and the second direction position of the current vehicle in the binary image is determined by the column width and the left and right boundaries, so that the position of the current vehicle in the two-dimensional image can be accurately located.
[0122] In this embodiment, the implementation of step S152 "extracting the boundary points of the drivable area to obtain the boundary point set of the drivable area" may include the following steps S181 to S185, wherein:
[0123] Step S181, for each pixel point in the drivable area, multiplying the first direction position of the current vehicle in the binary image by the row resolution to obtain the translation amount of each pixel point in the first direction;
[0124] In some embodiments, the translation amount of each pixel in the first direction is determined by the following formula (3):
[0125] x0=h1*dh (3);
[0126] Wherein, x0 represents the translation amount of each pixel in the first direction; dh represents the row resolution in the binary image.
[0127] Step S182, multiplying the position of each pixel point in the first direction by the row resolution and then subtracting the result from the translation amount of the corresponding pixel point in the first direction to obtain the first direction coordinates of each pixel point;
[0128] In some embodiments, the first direction coordinate of each pixel point is determined by the following formula (4):
[0129] x1=x*dh-x0 (4);
[0130] Wherein, x1 represents the first direction coordinate of each pixel point; x represents the position of each pixel point in the first direction, that is, the horizontal coordinate of each pixel point.
[0131] Step S183, multiplying the second direction position of the current vehicle in the binary image by the column resolution to obtain the translation amount of each pixel in the second direction;
[0132] In some embodiments, the translation amount of each pixel in the second direction is determined by the following formula (5):
[0133] y0=w1*dw (5);
[0134] Wherein, y0 represents the translation amount of each pixel in the second direction; dw represents the column resolution in the binary image.
[0135] Step S184, multiplying the position of each pixel point in the second direction by the column resolution and then subtracting the result from the translation amount of the corresponding pixel point in the second direction to obtain the second direction coordinates of each pixel point;
[0136] In some embodiments, the second direction coordinate of each pixel is determined by the following formula (6):
[0137] y1=y*dw-y0 (6);
[0138] Among them, y1 represents the first direction coordinate of each pixel point; y represents the position of each pixel point in the second direction, that is, the vertical coordinate of each pixel point.
[0139] Step S185: determining a set of boundary points of the drivable area based on the first direction coordinates and the second direction coordinates.
[0140] In some implementations, a boundary point of the drivable area may be determined based on the first direction coordinates and the second direction coordinates of a pixel point in the drivable area, and then a boundary point set of the drivable area may be determined based on all boundary points of the drivable area.
[0141] In this embodiment, the boundary points of the drivable area can be more accurately extracted by calculating the translation amount of each pixel point in the first direction and the second direction and adjusting the position of the pixel point accordingly, which helps to ensure that the extracted boundary point set can truly reflect the shape and outline of the drivable area.
[0142] In the related art, the free space point position information is calculated by using the internal and external parameters of the vehicle camera and the inverse perspective projection transformation method, and the boundary points of the drivable area are screened by the boundary tracking algorithm, but the complete boundary point information cannot be obtained. The position error of the boundary points calculated by the above method is large, and the complete boundary point information cannot be obtained. It has an unstable impact on the subsequent information fusion and driving path planning and control.
[0143] In order to improve the accuracy and completeness of the boundary of the drivable area, this embodiment provides a Bev Occupancy Network drivable area boundary extraction method based on clustering. The binary image of the drivable area is output through the Bev Occupancy Network model, the drivable area where the vehicle is located is obtained through the clustering method, the boundary points of the drivable area are extracted and the vehicle-centric system (Vehicle Centric System, VCS) coordinate conversion is performed. The correspondence between the position of the drivable area on the image and the VCS coordinate system is given by the Bev Occupancy Network model, avoiding the problem of large deviation of the boundary point position information in the inverse perspective projection transformation method; the boundary of the drivable area is obtained through the clustering method, and the noise and useless boundary points are filtered. Compared with the boundary tracking algorithm, this embodiment only needs to traverse the image once to complete the clustering and the selection of the drivable area, and give the identification of the same obstacle. The algorithm used to extract the boundary of the drivable area is very stable in terms of efficiency and time consumption.
[0144] This embodiment proposes a Bev Occupancy Network drivable area boundary extraction method based on clustering, such as Figure 2 As shown, the following steps are included:
[0145] Step S201, inputting the surrounding image of the current vehicle into the BEV Occupancy Network model to obtain a binary image of the drivable area;
[0146] In some embodiments, the surrounding image of the current vehicle captured by the camera is input into the BEV Occupancy Network model to obtain a binary image of the drivable area (such as Figure 3 As shown) and related parameters of the binary image, the related parameters include the size, resolution, and field of view (FOV) range of the binary image.
[0147] Step S202, scanning the binary image line by line, and performing RLE compression processing on the pixel points with pixel values of 0 and 1 in the binary image respectively;
[0148] In some embodiments, a binary image is scanned line by line, and RLE compression processing is performed on pixel points with pixel values of 0 and 1 in the binary image, respectively, to obtain compression results with pixel values of 0 and 1, and each compression result records the pixel value (0 or 1), the starting column and the ending column of the pixel value, wherein the compression results with pixel values of 0 and 1 are stored separately.
[0149] Step S203, assigning a label to each compression result, and determining two compression results with an intersection as an equivalent pair;
[0150] In some embodiments, starting from the second row of the compression results, each compression result is compared with each compression result of the same pixel value in the previous row, and the starting column col_start and the ending column pixel information col_end of the compression result are used to determine whether there is an intersection. If there is an intersection, that is, the condition rle1.start≤rle2.end&&rle1.end≥rle2.start is satisfied, then the same label is assigned to the compression results. If the compression result of the latter row has an intersection with multiple compression results of the previous row, then the multiple compression results with intersection are recorded as an equivalent pair. If the starting column and the ending column of each compression result have no intersection with the starting column and the ending column of each compression result of the same pixel value in the previous row, then a new label is assigned to the compression result.
[0151] Step S204, processing the equivalent pairs with pixel value 1 and re-dividing the labels;
[0152] In some implementations, equivalent pairs with a pixel value of 1 are assigned the same label and the same label value, and the label values are rearranged continuously, and a mapping relationship is formed between the original label and the re-divided label.
[0153] Step S205, calculate the vehicle position and find its corresponding label, set the area marked with this label and equivalent labels as the drivable area, process the equivalent pairs with pixel values of 0 and re-divide the labels.
[0154] In some embodiments, assuming that the rows and columns of the image are H and W respectively, and the FOV area is represented by top (top boundary), bottom (bottom boundary), left (left boundary), and right (right boundary), then the row number of the vehicle in the image is Column number is Find the corresponding compression result through the row number of the vehicle, traverse the compression result to find the label corresponding to the column where the vehicle is located, cluster the found label and its equivalent label into one category, set it as the drivable area, and cluster other labels into one category. In this way, process the equivalent pairs with pixel value 0 and re-divide the labels; the clustering results are as follows: Figure 4 shown.
[0155] Step S206, obtaining the location information of the boundary of the drivable area and the label value of the boundary point according to the clustering result;
[0156] In some embodiments, in the non-drivable area in the image, that is, in the pixel points with a pixel value of 1 in the image, the points that satisfy the existence of a drivable area in their 8 neighborhoods (adjacent pixels in the upper, lower, left, right and four diagonal directions) are the boundary points of the drivable area that need to be extracted, and the label value corresponding to the corresponding pixel point is obtained by searching the boundary points of the drivable area.
[0157] Step S207, calculating the position information of the boundary points according to the relevant parameters.
[0158] In some embodiments, assume that the rows and columns of the image are H and W, respectively, and the units are pixels (pixel), the resolutions of the rows and columns are dh and dw, and the units are pixels per meter (m / pixel), the FOV is top, bottom, left, right, and the units are meters (m), and the VCS coordinates corresponding to the image points x and y are The calculated VCS coordinate results corresponding to each point on the image are integrated to form a set of boundary points of the drivable area, such as Figure 5 shown.
[0159] This embodiment proposes a device for extracting boundary points of a drivable area, such as Figure 6 As shown, the device for extracting the boundary points of the drivable area includes:
[0160] The compression module 610 is used to compress the pixel points with the same pixel value in the binary image of the drivable area respectively, and obtain a compression result set of the pixel points with the same pixel value; the binary image is an image of the surrounding image of the current vehicle output by the first model;
[0161] A comparison module 620 is used for comparing, for a set of compression results of pixels having the same pixel value, starting from the second row of compression results in the set of compression results, the compression results of the subsequent row with the compression results of the previous row in sequence;
[0162] A first determination module 630, configured to determine whether the compression result of the next row and the compression result of the previous row have an intersection based on the comparison result;
[0163] A second determination module 640 is used to determine the compression result of the subsequent row and the compression result of the previous row as an equivalent pair when there is an intersection between the compression result of the subsequent row and the compression result of the previous row, and cluster the equivalent pairs to obtain a clustering result;
[0164] The extraction module 650 is used to extract the boundary points of the drivable area in the clustering result to obtain a set of boundary points of the drivable area.
[0165] In this embodiment, the compression module 610 includes: an input unit, used to input the acquired surrounding image of the current vehicle into the first model to obtain a binary image of the drivable area; a first compression unit, used to scan each pixel point in the binary image row by row, compress the pixel points corresponding to the first pixel value, and obtain a compression result set of the first pixel value; a second compression unit, used to compress the pixel points corresponding to the second pixel value, and obtain a compression result set of the second pixel value.
[0166] In this embodiment, the compression result includes pixel values, a starting column and an ending column of the pixel values, and the first determination module 630 includes: a first determination unit, used to determine whether the starting column in the compression result of the previous row is less than or equal to the ending column in the compression result of the next row; a second determination unit, used to determine whether the ending column in the compression result of the previous row is greater than or equal to the starting column in the compression result of the next row when the starting column in the compression result of the previous row is less than or equal to the ending column in the compression result of the next row; a third determination unit, used to determine whether the compression result of the next row has an intersection with the compression result of the previous row when the ending column in the compression result of the previous row is greater than or equal to the starting column in the compression result of the next row.
[0167] In this embodiment, the first determination module 630 includes: a fourth determination unit, which is used to determine that the compression result of the subsequent row does not intersect with the compression result of the previous row when the starting column in the compression result of the previous row is larger than the ending column in the compression result of the subsequent row; or, when the ending column in the compression result of the previous row is smaller than the starting column in the compression result of the subsequent row, determine that the compression result of the subsequent row does not intersect with the compression result of the previous row.
[0168] In this embodiment, the second determination module 640 includes: a fifth determination unit, used to determine the compression result of the subsequent row and the compression result of the previous row as an equivalent pair when there is an intersection between the compression result of the subsequent row and the compression result of the previous row; a setting unit, used to set the same label and the same label value for the equivalent pair; and a clustering unit, used to cluster the equivalent pairs with the same label value to obtain a clustering result.
[0169] In this embodiment, the extraction module 650 includes: a sixth determination unit, used to determine the drivable area in the clustering result; an extraction unit, used to extract boundary points of the drivable area to obtain a boundary point set of the drivable area.
[0170] In this embodiment, the sixth determination unit includes: a first determination subunit, used to determine the first directional position and the second directional position of the current vehicle in the binary image; a search subunit, used to search for the compression result corresponding to the first directional position from the compression result set; a second determination subunit, used to determine the label corresponding to the second directional position based on the compression result corresponding to the first directional position; and a clustering subunit, used to cluster equivalent labels in the labels corresponding to the second directional position to obtain a drivable area.
[0171] In this embodiment, the first determination subunit is used to obtain the size, resolution and field of view of the binary image; the size includes row width and column width; the field of view includes top boundary, bottom boundary, left boundary and right boundary; the row width is multiplied by the top boundary and then the sum of the top boundary and the bottom boundary is divided to obtain the first directional position of the current vehicle in the binary image; the column width is multiplied by the left boundary and then the sum of the left boundary and the right boundary is divided to obtain the second directional position of the current vehicle in the binary image.
[0172] In this embodiment, the extraction unit includes: a first multiplication subunit, which is used to multiply the first direction position of the current vehicle in the binary image by the row resolution for each pixel point in the drivable area, so as to obtain the translation amount of each pixel point in the first direction; a first difference subunit, which is used to multiply the position of each pixel point in the first direction by the row resolution and then subtract the result from the translation amount of the corresponding pixel point in the first direction, so as to obtain the first direction coordinates of each pixel point; a second multiplication subunit, which is used to multiply the second direction position of the current vehicle in the binary image by the column resolution and obtain the translation amount of each pixel point in the second direction; a second difference subunit, which is used to multiply the position of each pixel point in the second direction by the column resolution and then subtract the result from the translation amount of the corresponding pixel point in the second direction, so as to obtain the second direction coordinates of each pixel point; and a third determination subunit, which is used to determine the boundary point set of the drivable area based on the first direction coordinates and the second direction coordinates.
[0173] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. In some embodiments, the functions or modules included in the device provided in this embodiment can be used to execute the method described in the above method embodiment. For technical details not disclosed in the device embodiment of this application, please refer to the description of the method embodiment of this application for understanding.
[0174] It should be noted that, in this embodiment, if the above-mentioned method for extracting the boundary points of the drivable area is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of this application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk. In this way, this embodiment is not limited to any specific hardware, software or firmware, or any combination of hardware, software, and firmware.
[0175] This embodiment also provides an electronic device, including a memory and a processor of a server or a memory and a processor of a user terminal, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, some or all of the steps in the above method are implemented.
[0176] This embodiment also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, some or all of the steps in the above method are implemented. The computer-readable storage medium can be transient or non-transient.
[0177] This embodiment also provides a computer program, including a computer-readable code. When the computer-readable code runs in a server or a user terminal, a processor in the server or the user terminal executes some or all of the steps for implementing the above method.
[0178] This embodiment also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and when the computer program is read and executed by a computer, some or all of the steps in the above method are implemented. The computer program product can be implemented in hardware, software, or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium, and in other embodiments, the computer program product is specifically embodied as a software product, such as a software development kit (SDK), etc.
[0179] It should be noted here that the description of the various embodiments above tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. The description of the above device, storage medium, computer program and computer program product embodiments is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the embodiments of the device, storage medium, computer program and computer program product of this application, please refer to the description of the method embodiment of this application for understanding.
[0180] It should be noted that this embodiment provides an electronic device, such as Figure 7 As shown, the hardware entity of the electronic device 700 includes: a processor 701, a communication interface 702 and a memory 703, wherein: the processor 701 generally controls the overall operation of the electronic device 700. The communication interface 702 can enable the electronic device to communicate with other terminals or servers through a network. The memory 703 is configured to store instructions and applications executable by the processor 701, and can also cache data to be processed or processed by the processor 701 and each module in the electronic device 700 (for example, image data, audio data, voice communication data and video communication data), which can be implemented by flash memory (FLASH) or random access memory (Random Access Memory, RAM). Data transmission can be carried out between the processor 701, the communication interface 702 and the memory 703 through the bus 704.
[0181] The above embodiments are only preferred embodiments for fully illustrating the present invention, and the protection scope of the present invention is not limited thereto. Any equivalent substitution or change made by a person skilled in the art based on the present invention is within the protection scope of the present invention.
Claims
1. A method for extracting boundary points of a drivable area, characterized in that: The extraction method comprises: Pixel points with the same pixel value in the binary image of the drivable area are respectively compressed to obtain a corresponding set of compression results of the pixel points with the same pixel value; the binary image is an image of the surrounding image of the current vehicle output by the first model; For the compression result set of pixel points with the same pixel value, starting from the second row of compression results in the compression result set, the compression results of the subsequent row are compared with the compression results of the previous row in sequence; Based on the comparison result, determining whether the compression result of the subsequent row and the compression result of the previous row have an intersection; In the case where the compression result of the subsequent row and the compression result of the previous row have an intersection, the compression result of the subsequent row and the compression result of the previous row are determined as an equivalent pair, and the equivalent pairs are clustered to obtain a clustering result; Boundary points of the drivable area in the clustering result are extracted to obtain a boundary point set of the drivable area.
2. The extraction method according to claim 1, characterized in that The pixel points with the same pixel value in the binary image of the drivable area are respectively compressed to obtain a compression result set of the pixel points with the same pixel value, including: Inputting the acquired surrounding image of the current vehicle into the first model to obtain a binary image of the drivable area; Scanning each pixel point in the binary image row by row, compressing the pixel points corresponding to the first pixel value, and obtaining a compression result set of the first pixel value; The pixel points corresponding to the second pixel value are compressed to obtain a compression result set of the second pixel value.
3. The extraction method according to claim 1, characterized in that The compression result includes a pixel value, a start column and an end column of the pixel value, The determining, based on the comparison result, whether there is an intersection between the compression result of the subsequent row and the compression result of the previous row includes: Determine whether the starting column in the compression result of the previous row is less than or equal to the ending column in the compression result of the next row; In the case where the start column in the compression result of the previous row is less than or equal to the end column in the compression result of the next row, determining whether the end column in the compression result of the previous row is greater than or equal to the start column in the compression result of the next row; When the end column in the compression result of the previous row is greater than or equal to the start column in the compression result of the next row, it is determined that the compression result of the next row and the compression result of the previous row have an intersection.
4. The extraction method according to claim 1, characterized in that The determining, based on the comparison result, whether there is an intersection between the compression result of the subsequent row and the compression result of the previous row includes: In the case where the start column in the compression result of the previous row is greater than the end column in the compression result of the next row, determining that the compression result of the next row does not have an intersection with the compression result of the previous row; or, When the end column in the compression result of the previous row is smaller than the start column in the compression result of the next row, it is determined that there is no intersection between the compression result of the next row and the compression result of the previous row.
5. The extraction method according to claim 1, characterized in that In the case where the compression result of the subsequent row and the compression result of the previous row have an intersection, the compression result of the subsequent row and the compression result of the previous row are determined as an equivalent pair, and the equivalent pairs are clustered to obtain a clustering result, including: In the case where the compression result of the subsequent row and the compression result of the previous row have an intersection, determining the compression result of the subsequent row and the compression result of the previous row as an equivalent pair; Setting the same label and the same label value for the equivalent pairs; Cluster equivalent pairs with the same label value to obtain clustering results.
6. The extraction method according to claim 1, characterized in that The step of extracting the boundary points of the drivable area in the clustering result to obtain a set of boundary points of the drivable area includes: Determining a drivable area in the clustering result; Boundary points of the drivable area are extracted to obtain a boundary point set of the drivable area.
7. The extraction method according to claim 6, characterized in that The determining of the drivable area in the clustering result includes: Determine a first direction position and a second direction position of the current vehicle in the binary image; Searching for the compression result corresponding to the first direction position from the compression result set; Determine, based on the compression result corresponding to the position in the first direction, a label corresponding to the position in the second direction; The equivalent labels in the labels corresponding to the second direction positions are clustered to obtain a drivable area.
8. The extraction method according to claim 7, characterized in that Determining the first direction position and the second direction position of the current vehicle in the binary image includes: Acquire the size, resolution and field of view of the binary image; the size includes row width and column width; the field of view includes top boundary, bottom boundary, left boundary and right boundary; After multiplying the line width by the top boundary, a quotient is taken for the sum of the top boundary and the bottom boundary to obtain a first direction position of the current vehicle in the binary image; After multiplying the column width by the left border, a quotient is taken for the sum of the left border and the right border to obtain a second direction position of the current vehicle in the binary image.
9. The extraction method according to any one of claims 1 to 8, characterized in that The step of extracting the boundary points of the drivable area to obtain a set of boundary points of the drivable area includes: For each pixel point in the drivable area, multiply the first direction position of the current vehicle in the binary image by the row resolution to obtain a translation amount of each pixel point in the first direction; The position of each pixel point in the first direction is multiplied by the row resolution and then subtracted from the translation amount of the corresponding pixel point in the first direction to obtain the first direction coordinates of each pixel point; Multiplying the second direction position of the current vehicle in the binary image by the column resolution to obtain the translation amount of each pixel in the second direction; The position of each pixel point in the second direction is multiplied by the column resolution and then subtracted from the translation amount of the corresponding pixel point in the second direction to obtain the second direction coordinates of each pixel point; Based on the first direction coordinate and the second direction coordinate, a set of boundary points of the drivable area is determined.
10. A device for extracting boundary points of a drivable area, characterized in that: The extraction device comprises: A compression module, used for respectively compressing pixel points with the same pixel value in the binary image of the drivable area, and correspondingly obtaining a set of compression results of the pixel points with the same pixel value; the binary image is an image of the surrounding image of the current vehicle output by the first model; A comparison module, for comparing, for a set of compression results of pixels having the same pixel value, starting from the second row of compression results in the set of compression results, the compression results of the subsequent row with the compression results of the previous row in sequence; A first determination module, configured to determine whether the compression result of the subsequent row and the compression result of the previous row have an intersection based on the comparison result; a second determination module, configured to determine the compression result of the subsequent row and the compression result of the previous row as an equivalent pair when there is an intersection between the compression result of the subsequent row and the compression result of the previous row, and cluster the equivalent pairs to obtain a clustering result; The extraction module is used to extract the boundary points of the drivable area in the clustering result to obtain a boundary point set of the drivable area.
11. An electronic device comprising a memory and a processor, characterized in that: The memory stores a computer program that can be run on the processor, and when the processor executes the program, the steps in the method according to any one of claims 1 to 9 are implemented.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps in the method according to any one of claims 1 to 9 are implemented.