A parking space detection method, controller, vehicle and computer readable storage medium
By extracting the geometric information of lane lines and recognizing corner points, the problem of high computing power requirements is solved, and efficient parking space detection is achieved on low computing power platforms.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BYD CO LTD
- Filing Date
- 2023-06-12
- Publication Date
- 2026-05-05
AI Technical Summary
In existing technologies, parking space detection methods based on neural network models have excessively high computing power requirements for vehicle-mounted platforms, making it impossible to meet the parking space detection needs of low-computing-power platforms.
By acquiring ground images, extracting the geometric information of lane lines, determining lane line intersections as corner points, and identifying parking space corner points that represent parking spaces from these corner points, parking space detection is performed in conjunction with lane line information.
It enables real-time parking space detection on low-computing-power platforms, improving detection efficiency and accuracy.
Smart Images

Figure CN119132102B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle technology, and in particular to a parking space detection method, controller, vehicle, and computer-readable storage medium. Background Technology
[0002] In recent years, with the development of automotive intelligence, automatic parking technology has been widely applied in various scenarios. Automatic parking technology enables cars to automatically find and accurately park in appropriate parking positions. Correspondingly, parking space detection has become a core perception module in automatic parking technology. Among related technologies, pure vision-based parking space detection methods based on neural network models have gained favor among professionals. However, the application of neural network models places increasingly higher demands on the computing power of the vehicle's infotainment platform. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a parking space detection method, a controller, a vehicle, and a computer-readable storage medium to solve the problem that the vehicle-mounted platform cannot meet the high computing power requirements.
[0004] In a first aspect, embodiments of the present invention provide a parking space detection method, the parking space detection method comprising: acquiring a ground image and extracting lane lines from the ground image;
[0005] Based on the geometric information of the lane lines, at least one corner point is obtained, wherein the corner point is the point formed by the intersection of the lane lines;
[0006] Identify the corner points representing the parking spaces from all corner points;
[0007] Parking space information is determined based on the corner points of the parking spaces and the lane lines.
[0008] In a second aspect, embodiments of the present invention provide a controller, the controller including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the parking space detection method as described in the first aspect.
[0009] Thirdly, a vehicle comprising an image acquisition unit and a controller as described in the second aspect, the image acquisition unit being used to acquire images.
[0010] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the parking space detection method as described in the first aspect.
[0011] The beneficial effects of the embodiments of the present invention compared with the prior art are as follows:
[0012] This invention acquires ground images and extracts lane lines from them; based on the geometric information of the lane lines, it obtains at least one corner point, where the corner point is the intersection point formed by the intersection of lane lines; it determines the parking space corner point representing the parking space from all corner points; and it determines the parking space information based on the parking space corner point and lane lines, thus realizing real-time parking space detection on a low-computing-power platform and improving the efficiency and accuracy of parking space detection. Attached Figure Description
[0013] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0014] Figure 1 This is a flowchart illustrating a parking space detection method provided in Embodiment 1 of the present invention;
[0015] Figure 2 This is a schematic diagram of lane edge line extraction provided in Embodiment 1 of the present invention;
[0016] Figure 3 This is a schematic diagram of lane line extraction provided in Embodiment 1 of the present invention;
[0017] Figure 4 This is a schematic diagram of a parking space corner detection method provided in Embodiment 1 of the present invention;
[0018] Figure 5 This is a schematic diagram illustrating the correlation between the edge spacing of lane lines and the confidence level of lane lines provided in Embodiment 1 of the present invention;
[0019] Figure 6 This is a schematic diagram of the structure of a vehicle provided in Embodiment 2 of the present invention;
[0020] Figure 7 This is a schematic diagram of the structure of a controller provided in Embodiment 3 of the present invention. Detailed Implementation
[0021] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of the invention. However, those skilled in the art will understand that the invention can be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of the invention with unnecessary detail.
[0022] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0023] It should also be understood that the term “and / or” as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0024] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."
[0025] Furthermore, in the description of this invention and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0026] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of the invention include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0027] It should be understood that the sequence number of each step in the following embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0028] To illustrate the technical solution of the present invention, specific embodiments are described below.
[0029] The vehicle includes various image acquisition devices and controllers. The image acquisition devices are used to collect ground images of the vehicle location. For example, the image acquisition device can be a camera. Specifically, to acquire ground images, the camera can be configured as a panoramic camera or multiple fisheye cameras. The controller is used to analyze and process the ground images to detect parking space information. The controller can be connected to the image acquisition devices wirelessly or via wired means. For example, wired connections can include a Controller Area Network (CAN) bus or hardwired connections to acquire ground images and obtain the actual location information of the parking spaces based on the acquired ground images. This information can be used to realize autonomous driving, assisted driving, assisted parking, and other functions of the vehicle.
[0030] See Figure 1 This is a flowchart illustrating a parking space detection method provided in Embodiment 1 of the present invention, as shown below. Figure 1 As shown, the parking space detection method may include the following steps:
[0031] Step S101: Obtain a ground image and extract lane lines from the ground image; obtain at least one corner point based on the geometric information of the lane lines.
[0032] The ground image is a panoramic view of the vehicle's surroundings, obtained from a top-down perspective. It includes information about the vehicle and its surrounding area. Lane lines are indicative lines on the ground, obtained through line extraction from the ground image. The geometric information of the lane lines includes their position, size, length, and width within the ground image. Corner points can be intersections of two intersecting lane lines, the intersections of extensions of two lane lines, or the endpoints of lane lines with specific meaning.
[0033] In embodiments of the present invention, the image acquisition device on the vehicle consists of at least four fisheye cameras, which are respectively deployed at the front, rear, left, and right positions on the vehicle, thereby enabling the acquisition of images around the vehicle. Compared with ordinary cameras, fisheye cameras have advantages such as a longer shooting distance and a larger field of view.
[0034] The specific method for using fisheye cameras to acquire images of the vehicle and form a ground image is as follows: multiple fisheye cameras on the vehicle acquire images of the vehicle at the same time. After acquiring the images acquired by each fisheye camera at the same time, the images acquired by each fisheye camera are converted or stitched together according to the calibration parameters of each fisheye camera to obtain a ground image that can contain images of the area around the vehicle.
[0035] After acquiring the ground image at the vehicle location, the ground image is preprocessed to obtain a high-quality ground image, improving subsequent detection results. Specifically, the preprocessing includes adaptive image brightness enhancement, adaptive image sharpening, and denoising. For adaptive image brightness enhancement, statistical values of the ground image's illumination intensity, color saturation, and pixel value distribution are obtained. Based on these statistical values, the ground image is adjusted and optimized. Adaptive image brightness enhancement is an existing technique, and its details will not be elaborated here. For adaptive image sharpening and denoising, during vehicle movement, the fisheye camera is a moving camera. The image acquired has a greater degree of blurring in the direction parallel to the vehicle's movement than in the vertical direction, and the blur range varies at different speeds. Therefore, motion blur removal processing can be performed on the ground image based on motion speed and direction information. It is understood that the convolution kernel size in motion blur removal processing needs to be learned through a small number of samples.
[0036] It should be noted that the parameter learning methods for motion blur removal, including but not limited to k-means clustering, ridge regression and other machine learning algorithms, are existing technologies and will not be elaborated here.
[0037] To achieve parking space detection, this invention requires acquiring ground images of vehicles in environments with clearly defined parking spaces. These ground images must contain ground lines for parking space detection to be possible. Since lane lines are brighter than the background in the image, lane lines can be extracted from the ground image based on brightness. This invention uses the intersection point of two intersecting lane lines as corner points, analyzing the geometric information of the extracted lane lines from the ground image to determine the intersection point, thereby obtaining information such as the location of the intersection point and the corresponding lane line.
[0038] Optionally, lane lines can be extracted from the ground image, including:
[0039] Extract lane edge lines from the ground image; cluster the lane edge lines to obtain at least one cluster; cluster each cluster separately to obtain the target lane edge line corresponding to each cluster; determine the lane line based on the target lane edge line and its endpoint.
[0040] Specifically, based on the acquired ground image, and according to the brightness of each pixel in the ground image through first-order gradient detection and / or second-order gradient detection, edge lines with gradient values greater than a preset gradient threshold are extracted to obtain lane edge lines. Figure 2 It shows a schematic diagram of lane edge line extraction. Figure 2 The dashed lines 1-12 in the diagram are the extracted lane edge lines.
[0041] It should be noted that lane edge lines can be obtained directly using first-order gradient detection, or the edge lines can be obtained first using first-order gradient detection and then corrected using second-order gradient detection to obtain more accurate lane edge lines.
[0042] For the extracted lane edge lines, the DBSCAN clustering algorithm is used to cluster all extracted lane edge lines, obtaining at least one cluster to remove abnormal edge lines. Then, for any cluster, the lane edge lines within that cluster are analyzed to obtain the target lane edge lines. For any target lane edge line, the distances between it and other target lane edge lines are calculated, and the lane line with the smallest distance is identified. It's worth noting that a lane line consists of two edge lines, each with two endpoints. Two edge lines and their corresponding four endpoints can construct a lane line. Therefore, a lane line is constructed based on the target lane edge line and the endpoints of the other target lane line with the smallest distance. Similarly, all target lane lines are traversed, and all lane lines in the ground image are confirmed based on their endpoints. (Refer to...) Figure 3 It shows a schematic diagram of lane line extraction. Figure 3 The dashed lines in the diagram represent lane edge lines, and the area 31 between the two lane edge lines is the lane line. The DBSCAN clustering algorithm is used to filter out edge lines that are too short or too long and do not match the actual lane line conditions, thus ensuring the accuracy of lane line extraction.
[0043] Optionally, each cluster can be clustered separately to obtain the target lane edge line corresponding to each cluster, including:
[0044] For any given cluster, calculate the distance between any two lane edge lines;
[0045] For any given distance, check if the distance is less than a preset distance threshold. If the distance is less than the preset distance threshold, then use the two lane edge lines corresponding to the distance as the first lane edge line.
[0046] Obtain all first lane edge lines in the cluster, calculate the length of each first lane edge line in the cluster, and select one first lane edge line in the cluster as the target lane edge line based on the length.
[0047] Specifically, for all lane edge lines in any cluster, the distance between any two lane edge lines is calculated. For any given distance, it is checked whether the distance is less than a preset distance threshold. If the distance is less than the preset distance threshold, it indicates that the detected lane edge line may be missegmented or misaligned. Then, the two lane edge lines corresponding to the distance less than the preset distance threshold are taken as the first lane edge lines. Based on the distance between the two lane edge lines, all first lane edge lines in the cluster are obtained. The length of each first lane edge line is calculated. The absolute value of the difference between the length of the first lane edge line and the preset length threshold is calculated. The first lane edge line with the smallest absolute value of the difference is taken as the target lane edge line.
[0048] Optionally, after extracting lane lines from the ground image, the process includes:
[0049] For any lane line, obtain the edge parallelism score and edge distance score of the lane line, and calculate the lane line confidence score based on the edge parallelism score and edge distance score.
[0050] The edge parallelism score and edge distance score of lane lines can be calculated based on the numerical attributes of the lane lines. Specifically, this invention can train two lightweight calculation models. Information input into these models yields calculation results. Therefore, the invention acquires the trained edge parallelism score calculation model, the trained edge distance score calculation model, and the geometric information of the lane lines. This geometric information includes, but is not limited to, the direction, length, and intersection of the two lane lines, as well as the mean and variance of the brightness of the polygonal region corresponding to the lane lines. The geometric information of the lane lines is then input into the trained edge parallelism score calculation model and the trained edge distance score calculation model, respectively, to obtain the edge parallelism score and edge distance score. The parameters in the edge parallelism score calculation model and the edge distance score calculation model are obtained through rule-based models and learnable machine learning methods. (Refer to...) Figure 4 It shows a schematic diagram illustrating the correlation between lane line edge spacing and lane line confidence. Based on this correlation, for any lane line, the product of the edge parallelism score and edge distance score is calculated, and this product is used as the lane line confidence. The expression for calculating lane line confidence is:
[0051] P lane =P parallel ×P distance
[0052] Among them, P lane P represents the lane line confidence level, with a value range of [0, 1]. parallel For the marginal parallel fraction, P distance This represents the edge distance score.
[0053] Optionally, based on the lane line geometry, at least one corner point is obtained, including:
[0054] Choose any two lane lines as target lane lines. Based on the position of the target lane lines, detect whether the target lane lines intersect. If an intersection is detected, the intersection point between the target lane lines is taken as the corner point.
[0055] For each detected lane line, two lane lines are randomly selected as target lane lines. Based on the position of the target lane lines, it is checked whether the target lane lines intersect. If the two target lane lines intersect, it means that there is an intersection point between the two target lane lines, and the intersection point between the target lane lines is taken as a corner point. Conversely, if the two target lane lines do not intersect, there is no intersection point, and there is no corner point between the two target lane lines. Similarly, all lane lines are traversed to obtain all corner points.
[0056] Step S102: Determine the parking space corner point representing the parking space from all corner points.
[0057] Among them, the parking space corner point is the intersection of the parking space lines that constitute the parking space. In this embodiment of the invention, the parking space corner point includes five preset corner point types, namely T-shaped, I-shaped, U-shaped, L-shaped, and Y-shaped, see [link to relevant documentation]. Figure 5 It shows a schematic diagram of parking space angle detection. Figure 5 Corner point 51 is an L-shaped parking space corner point detected. Then, from all corner points, the parking space corner point that can represent the parking space is identified to improve the accuracy of subsequent parking space detection.
[0058] Optionally, the parking space corner point representing the parking space is determined from all corner points, including:
[0059] For any corner point, obtain the lane line corresponding to the corner point, and calculate the corner point confidence level based on the geometric information of the lane line corresponding to the corner point.
[0060] If the detected corner confidence score is not less than the preset corner confidence score threshold, then the corresponding corner is confirmed as a parking space corner.
[0061] Two lane lines can form a corner point. For any corner point, the two lane lines corresponding to that corner point are obtained. The corner point confidence score is calculated based on the geometric information of the two lane lines corresponding to that corner point. This confidence score is used to characterize the probability that the corner point belongs to a type of parking space corner point. Then, it is checked whether the corner point confidence score is less than a preset corner point confidence score threshold. If the corner point confidence score is less than the preset corner point confidence score threshold, it means that the corresponding corner point does not belong to a parking space corner point and cannot be used to construct a parking space. Therefore, it is not necessary to identify the corner point. If the corner point confidence score is not less than the preset corner point confidence score threshold, it means that the corresponding corner point belongs to any type of parking space corner point in the preset corner point types and can characterize a parking space. Therefore, corner points with a corner point confidence score not less than the preset corner point confidence score threshold are identified as parking space corner points that can characterize parking spaces, thus improving the accuracy of parking space corner point detection.
[0062] Optionally, the corner confidence score is calculated based on the geometric information of the lane lines corresponding to the corner point, including:
[0063] The direction and length of each lane line are obtained separately, a polygonal region of each lane line is constructed, the mean brightness and variance of the brightness of the polygonal region are obtained, and the detection value for whether two lane lines intersect is obtained.
[0064] Based on direction, length, mean brightness, brightness variance, and detection value, obtain the confidence level of the corner point belonging to each preset corner point type;
[0065] Obtain the intersection score and the included angle score between two lane lines, and obtain the corner confidence score based on the corner point type confidence score, intersection score, and included angle score.
[0066] Specifically, based on the two lane lines corresponding to the corner point, the direction and length of each lane line are obtained. Since a lane line is composed of two edge lines, connecting the two edge lines of the lane line yields a polygonal region of the lane line. Then, the mean brightness and variance of the brightness of the polygonal region corresponding to each lane line are obtained. At the same time, the detection value of whether the two lane lines intersect is detected. The detection value corresponding to the intersection of the two lane lines is set to 1, and the detection value corresponding to the non-intersection of the two lane lines is set to 0. The direction, length, mean brightness, variance of brightness, and detection value are then used to form the feature vector of the two lane lines. The feature vector is used as the input of the parking space corner point type determiner, and the corresponding output is the confidence score of the corner point type corresponding to each preset corner point type, which is used to characterize the probability that the corner point belongs to each corner point type.
[0067] Simultaneously, the intersection score and angle score between the two lane lines are obtained. The methods for obtaining the intersection score and angle score are the same as those for obtaining the edge parallelism score and edge distance score; that is, the intersection score and angle score are obtained through corresponding trained calculation models, which are also obtained through rule-based models and learnable machine learning methods. Combining the corner type confidence score, intersection score, and angle score, the corner confidence score is obtained. The expression for calculating the corner confidence score is:
[0068] P mp =P type ×P corss ×P angle
[0069] Among them, P mp P represents the corner confidence level, with a value range of [0, 1]. type For the confidence level of corner point type, P corss For the intersecting fractions, P angle It is a fraction of the included angle.
[0070] Step S103: Determine parking space information based on parking space corner points and lane lines.
[0071] Among them, parking space information can refer to information that can characterize the specific location of the parking space. In this invention, the parking space information is confirmed by detecting the corner points of the parking space and the lane lines in the ground image.
[0072] Optionally, parking space information can be determined based on the corner points of the parking space and lane lines, including:
[0073] Obtain the corner information of all parking space corners and the geometric information of all lane lines, and construct at least one parking space based on the corner information of all parking space corners and the geometric information of all lane lines;
[0074] For any given parking space, calculate the parking space position confidence based on the corner information of the corresponding parking space corner and the geometric information of the lane lines;
[0075] The target parking space is the parking space corresponding to the vehicle location confidence score that is not less than the preset vehicle location confidence score threshold. The parking space information of the target parking space is then confirmed.
[0076] This invention enables the training of a lightweight detection model, with information input to the model corresponding to a parking space. Specifically, since the key features of a parking space are lane lines and parking space corner points, and an ideal parking space consists of four parking space corner points and four lane lines (including the entrance line, two left and right dividing lines, and the bottom boundary line), the corner point information of all parking space corner points and the geometric information of all lane lines detected in the ground image are used as input to the detection model. By training the detection model, a trained detection model is obtained. Thus, the corner point information of all parking space corner points and the geometric information of all lane lines are input into the trained detection model, corresponding to the output of at least one parking space.
[0077] Since lane lines and parking space corners are key to parking spaces, for any given parking space, the parking space position confidence is calculated based on the corner information of the corresponding parking space corner and the geometric information of the lane lines. The corner information includes, but is not limited to: the corner type of the parking space corner and the center coordinates between the parking space corners. The geometric position of the lane lines includes, but is not limited to: the angle between the lane lines and the entrance line, the area of the polygon formed by the lane lines, the distance between lane lines, and the angle difference between the lane lines and the horizontal line.
[0078] The system detects whether the confidence level of the acquired vehicle location is less than a preset vehicle location confidence threshold. If the confidence level is less than the preset threshold, it means that the constructed parking space cannot correspond to the actual parking space, and the corner point of the corresponding parking space will not be identified. Conversely, if the confidence level is not less than the preset threshold, it means that the constructed parking space can correspond to the actual parking space. Therefore, the parking space corresponding to the vehicle location confidence level not less than the preset threshold is the target parking space. Then, based on the position of the target parking space in the ground image, the parking space information corresponding to the target parking space can be obtained, thereby improving the accuracy of parking space detection.
[0079] Optionally, based on the corner information of the parking space's corresponding corner point and the geometric information of the lane lines, the vehicle position confidence of the parking space is calculated, including:
[0080] Based on the corner information of the parking space corner and the geometric information of the lane line, the parking space shape score is calculated; based on the corner information of the parking space corner, the corner distance score is calculated; and based on the geometric information of the lane line, the lane line confidence score is calculated.
[0081] The parking space position confidence is calculated based on the parking space shape score, corner distance score, corner type confidence, and lane line confidence.
[0082] This invention can train two score calculation models of varying magnitudes. Information input into these models yields corresponding scores. Therefore, by acquiring the trained corner distance score calculation model and parking space shape score calculation model, the corner type of the parking space corners and the center coordinates between any two parking space corners are used as inputs to the corner distance score calculation model, which outputs the corner distance score of the parking space. Similarly, since the lane lines in a parking space include the entrance line, two left and right dividing lines, and the bottom boundary line, the angle between the dividing lines and the entrance line, the area of the polygon corresponding to the parking space, and the distance between the left and right dividing lines can characterize the width of the parking space. Furthermore, the angle, polygon area, distance, and angle difference are used as the shape features of the parking space, and these shape features are used as inputs to the parking space shape score calculation model, which outputs the parking space shape score.
[0083] Calculate the product of the parking space shape score, corner distance score, corner type confidence score, and lane line confidence score. Confirm this product as the vehicle position confidence score for the parking space. The expression for calculating the vehicle position confidence score is:
[0084] P slot =P type ×P sp ×P sd ×P morph
[0085] Among them, P slot Let P be the vehicle position confidence level, with a value range of [0,1]. type For the confidence level of corner point type, P sp P represents the lane line confidence level of the lane line. sd P is the corner distance fraction. morph The parking space configuration score.
[0086] It should be noted that the lane line confidence level is obtained in step S101.
[0087] Optionally, if the parking space information includes the coordinates of the first parking space in the image coordinate system, then the parking space detection method may also include:
[0088] Based on the transformation relationship between the image coordinate system and the world coordinate system of the ground image, the coordinates of the first parking space are converted into the coordinates of the second parking space in the world coordinate system.
[0089] The first parking space coordinates can refer to information that can characterize the specific location of the parking space in the ground image. The first parking space coordinates include, but are not limited to: the two-dimensional coordinates of the entrance line, the two-dimensional coordinates of the lane dividing line, and the two-dimensional coordinates of the corner point of the parking space entrance.
[0090] In this embodiment of the invention, the first parking space coordinates are obtained based on the location of the parking space in the ground image. It should be noted that the entrance line can be obtained using the coordinates of the corner point of the parking space in front of it. Then, the image coordinate system is transformed to the world coordinate system using a formula to obtain the true location of the parking space, which is the second parking space coordinate. Based on the transformation relationship between the image coordinate system and the world coordinate system of the ground image, the first parking space coordinates of each parking space are transformed to obtain the second parking space coordinates corresponding to each parking space. The transformation formula is as follows:
[0091]
[0092] Among them, (X) w ,Y w Z w (x,y) represents the coordinates in the world coordinate system, (x,y) represents the coordinates in the image coordinate system of the bird's-eye view image, Z represents the height of the camera relative to the ground, R represents rotation, and M represents the transformation matrix. The specific parameters of the transformation matrix can be obtained through methods such as camera parameter calibration.
[0093] In summary, the embodiments of the present invention acquire ground images and extract lane lines from the ground images; based on the geometric information of the lane lines, at least one corner point is obtained, wherein the corner point is the intersection point formed by the intersection of lane lines; from all corner points, a parking space corner point representing a parking space is determined; based on the parking space corner point and lane lines, parking space information is determined, thereby realizing real-time parking space detection on a low computing power platform and improving the efficiency and accuracy of parking space detection.
[0094] See Figure 6 The diagram illustrates a structural block diagram of a vehicle provided in Embodiment 2 of the present invention. The vehicle includes an image acquisition unit 61 and a controller 62. The controller 62 is connected to the image acquisition unit 61. The image acquisition unit 61 is used to acquire images. The controller 62 includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the parking space detection method in Embodiment 1 above.
[0095] For a detailed description of the controller, please refer to the explanation in Embodiment 3 below. The parking space detection method includes: acquiring a ground image and extracting lane lines from the ground image; obtaining at least one corner point based on the geometric information of the lane lines, wherein the corner point is the point formed by the intersection of the lane lines; determining a parking space corner point representing a parking space from all corner points; and determining parking space information based on the parking space corner point and the lane lines.
[0096] Figure 7 This is a schematic diagram of a controller provided in Embodiment 3 of the present invention. Figure 7 As shown, the controller of this embodiment includes: at least one processor ( Figure 7Only one is shown in the diagram), a memory, and a computer program stored in the memory and capable of running on at least one processor, which, when executing the computer program, implements the steps in any of the above-described parking space detection method embodiments.
[0097] The controller may include, but is not limited to, a processor and memory. Those skilled in the art will understand that... Figure 7 This is merely an example of a controller and does not constitute a limitation on the controller. A controller may include more or fewer components than shown in the figure, or a combination of certain components, or different components, such as network interfaces, displays, and input devices.
[0098] The processor referred to can be a CPU, but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0099] The memory includes readable storage media, internal memory, etc., wherein the internal memory can be the controller's RAM, providing an environment for the operation of the operating system and computer-readable instructions stored in the readable storage media. The readable storage media can be the controller's hard drive, or in other embodiments, an external storage device for the controller, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory can include both internal storage units and external storage devices of the controller. The memory is used to store the operating system, applications, bootloader, data, and other programs, such as program code for computer programs. The memory can also be used to temporarily store data that has been output or will be output.
[0100] Those skilled in the art will understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the functions described above can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this invention. The specific working process of the units and modules in the above device can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention can implement all or part of the processes in the methods of the above embodiments by instructing related hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the above method embodiments. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. A computer-readable medium can include at least: any entity or device capable of carrying computer program code, a recording medium, a computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0101] The present invention can implement all or part of the processes in the above embodiments of the method, or it can be accomplished by a computer program product. When the computer program product runs on the controller, the controller executes the steps in the above method embodiments.
[0102] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0103] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0104] In the embodiments provided by this invention, it should be understood that the disclosed devices / controllers and methods can be implemented in other ways. For example, the device / controller embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0105] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0106] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A parking space detection method, characterized in that, The parking space detection method includes: Acquire a ground image and extract lane lines from the ground image; Based on the geometric information of the lane lines, at least one corner point is obtained, wherein the corner point is the point formed by the intersection of the lane lines; Identify the corner points representing the parking spaces from all the corner points; The parking space information is determined based on the parking space corner point and the lane line; The process of determining the parking space corner point representing the parking space from all corner points includes: For any corner point, the direction and length of each lane line are obtained, a polygonal region of each lane line is constructed, the mean brightness and variance of the brightness of the polygonal region are obtained, and the detection value for whether two lane lines intersect is obtained. Based on the direction, length, average brightness, brightness variance, and detection value, obtain the corner point type confidence level corresponding to each preset corner point type; Obtain the intersection score and the included angle score between the two lane lines. Based on the corner point type confidence score, the intersection score, and the included angle score, obtain the corner point confidence score. The expression for calculating the corner point confidence score is: in, The corner confidence score ranges from [0, 1]. For corner point type confidence, For intersecting fractions, It is a fraction of the included angle; If the confidence level of the detected corner point is not less than the preset corner point confidence level threshold, then the corresponding corner point is confirmed as a parking space corner point.
2. The parking space detection method according to claim 1, characterized in that, The parking space information includes the coordinates of the first parking space in the image coordinate system, and the parking space detection method further includes: Based on the transformation relationship between the image coordinate system and the world coordinate system of the ground image, the coordinates of the first parking space are converted into the coordinates of the second parking space in the world coordinate system.
3. The parking space detection method according to claim 1, characterized in that, Extracting lane lines from the ground image includes: Extract lane edge lines from the ground image; cluster the lane edge lines to obtain at least one cluster; cluster each cluster to obtain the target lane edge line corresponding to each cluster; determine the lane line based on the target lane edge line and its endpoints.
4. The parking space detection method according to claim 3, characterized in that, The step of clustering each cluster to obtain the target lane edge line corresponding to each cluster includes: For any given cluster, calculate the distance between any two lane edge lines; For any given distance, it is determined whether the distance is less than a preset distance threshold. If the distance is less than the preset distance threshold, the two lane edge lines corresponding to the distance are taken as the first lane edge lines. Obtain all first lane edge lines in the cluster, calculate the length of each first lane edge line in the cluster, and select one first lane edge line in the cluster as the target lane edge line based on the length.
5. The parking space detection method according to claim 1, characterized in that, After extracting the lane lines from the ground image, the process includes: For any lane line, obtain the edge parallelism score and edge distance score of the lane line, and calculate the lane line confidence score based on the edge parallelism score and edge distance score.
6. The parking space detection method according to claim 1, characterized in that, The step of obtaining at least one corner point based on the geometric information of the lane lines includes: Two lane lines are randomly selected as target lane lines. Based on the position of the target lane lines, it is detected whether the target lane lines intersect. If the intersection of the target lane lines is detected, the intersection point between the target lane lines is taken as a corner point.
7. The parking space detection method according to claim 1, characterized in that, Based on the parking space corner point and the lane line, determine the parking space information, including: Obtain the corner information of all parking space corners and the geometric information of all lane lines, and construct at least one parking space based on the corner information of all parking space corners and the geometric information of all lane lines; For any parking space, the parking space position confidence is calculated based on the corner information of the corresponding parking space corner and the geometric information of the lane line. The parking spaces corresponding to the vehicle location confidence scores not less than a preset vehicle location confidence threshold are identified as target parking spaces, and the parking space information of the target parking spaces is determined.
8. The parking space detection method according to claim 7, characterized in that, The step of calculating the parking space position confidence based on the corner information of the parking space corner and the geometric information of the lane line includes: Based on the corner information of the parking space corner and the geometric information of the lane line, the parking space shape score is calculated; based on the corner information of the parking space corner, the corner distance score is calculated; and based on the geometric information of the lane line, the lane line confidence score is calculated. The parking space position confidence is calculated based on the parking space shape score, corner distance score, corner type confidence, and lane line confidence of the parking space.
9. A controller, characterized in that, The controller includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the parking space detection method as described in any one of claims 1 to 8.
10. A vehicle, characterized in that, The vehicle includes an image acquisition unit and a controller as described in claim 9, the image acquisition unit being used to acquire images.
11. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the parking space detection method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Parking space identification method, computer equipment and storage medium
CN115797911A