CN115700814A - Parking space detection method and device, computer equipment and storage medium - Google Patents

Parking space detection method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115700814A
CN115700814A CN202110802843.3A CN202110802843A CN115700814A CN 115700814 A CN115700814 A CN 115700814A CN 202110802843 A CN202110802843 A CN 202110802843A CN 115700814 A CN115700814 A CN 115700814A
Authority
CN
China
Prior art keywords
parking space
line
line segment
points
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110802843.3A
Other languages
Chinese (zh)
Inventor
袁慧珍
李莹
肖映彩
伏东奇
宋汉辰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Changsha Intelligent Driving Research Institute Co Ltd
Original Assignee
Changsha Intelligent Driving Research Institute Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Changsha Intelligent Driving Research Institute Co Ltd filed Critical Changsha Intelligent Driving Research Institute Co Ltd
Priority to CN202110802843.3A priority Critical patent/CN115700814A/en
Publication of CN115700814A publication Critical patent/CN115700814A/en
Pending legal-status Critical Current

Links

Images

Abstract

The application relates to a parking space detection method, a parking space detection device, computer equipment and a storage medium. According to the method, line segments are extracted from the parking space lines and then classified, each parking space line is represented as a line segment set, the parking space lines are restored in a straight line fitting mode, noise points caused by deformation in line segment end point sets can be shielded, most points are guaranteed to be concentrated around the fitting straight line, positioning errors caused by deformation are reduced, on the basis of the noise points, key points of parking spaces are determined according to intersection points of the most value end points of various line segment subsets and the fitting straight line, and the detection effect of positioning point detection of the parking spaces is improved.

Description

Parking space detection method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of intelligent driving and image processing technologies, and in particular, to a parking space detection method and apparatus, a computer device, and a storage medium.
Background
Parking space accurate positioning is one of key technologies in the field of intelligent driving, and the current main method is mainly used for positioning a parking space of a small vehicle by using a multi-sensor or a high-precision map. However, the cost of multiple sensors is high, and some parking spaces do not have high-precision maps, so that the use of a multi-sensor or high-precision map positioning mode is limited.
Based on this, it is a trend to perform parking space detection using a camera. The method comprises the steps of collecting parking space images through a camera, detecting a parking space, extracting a parking position line of the parking space, further extracting an intersection point on the parking position line, and determining a key point of the parking space according to the intersection point. However, in the image processing process, image deformation often occurs due to camera acquisition or image processing (such as stitching). In case of a deformed parking space, local lines and points can not be segmented, so that the risk of losing the parking position in complex environment images such as deformation is increased, the stability of key point extraction is reduced, and the parking space cannot be effectively detected.
Disclosure of Invention
In view of the above, it is necessary to provide a parking space detection method, apparatus, computer device and storage medium capable of improving detection effect.
A parking space detection method, the method comprising:
acquiring a parking space line pixel point image of a parking space image;
processing the parking space line pixel point image and extracting a parking space line;
extracting a line segment set of the parking bit line, and acquiring coordinates of two end points of each line segment;
classifying each line segment according to the slope and the first distance according to the coordinates of two end points of each line segment in the line segment set to obtain a line segment subset included in each category; the first distance is the distance from the midpoint of one line segment of any two line segments to the other line segment;
performing straight line fitting according to the end point coordinates of each line segment in the line segment subsets to obtain a fitted straight line corresponding to each line segment subset;
determining the intersection point of each fitting straight line;
and determining key points of each parking space according to the intersection points of the most value end points of all line segment subsets and the fitting straight line, wherein the most value end points comprise the maximum end point and/or the minimum end point.
In one embodiment, the acquiring of the parking space line pixel point image of the parking space image includes:
acquiring a parking space image;
inputting the parking space image into a trained generation countermeasure network, and generating a parking space line pixel point image of the parking space image through a generator of the generation countermeasure network; the generation countermeasure network is obtained by training according to the parking space image and the marked parking space line pixel point image of the parking space image.
In one embodiment, the acquiring obtains a parking space image, including:
acquiring parking space area images acquired by a plurality of cameras;
and matching and splicing the parking space area images to obtain a look-around parking space image.
In one embodiment, the processing the parking space line pixel image to extract the parking space line includes:
carrying out binarization processing on the parking bit line pixel point image to obtain a line area;
after the line area is subjected to morphological processing, extracting lines and carrying out line processing
And performing skeletonization treatment to obtain the parking space line.
In one embodiment, the classifying, according to the coordinates of the two end points of each line segment in the line segment set, each line segment according to the slope and the first distance to obtain the line segment subset included in each category includes:
and according to the coordinates of the end points of each line segment in the line segment set, obtaining the slope of each line segment and the first distance from the midpoint of the line segment to another line segment, and dividing the line segments of which the slope difference value and the average value of the first distances in any two line segments are smaller than the corresponding threshold value into one class, so as to obtain the rough-divided line segment subset corresponding to each class.
In another embodiment, the method further comprises:
sequencing line segment end points in each type of roughly divided line segment subsets according to end point coordinates to obtain an end point sequence, if no parking space line information exists in intermediate interval points of adjacent end points in the end point sequence, dividing the corresponding adjacent end points into two different types to obtain subdivided line segment subsets, wherein each subdivided line segment subset corresponds to one parking space line segment in the parking space image; wherein the coarsely divided line segment subset is used for straight line fitting, and the finely divided line segment subset is used for determining the most significant endpoint.
In one embodiment, determining the key point of each parking space according to the intersection point of the most significant endpoint of each line segment subset and the fitted straight line includes:
obtaining a most-valued endpoint pair of each subdivided line segment subset, wherein the most-valued endpoint pair comprises a maximum endpoint and a minimum endpoint;
determining intersection points of the parking spaces and the most extreme end points in the adjacent intersection point range of the parking spaces according to the intersection points of the fitting straight lines and the coordinates of the most extreme end point pairs of the subdivided line segment subsets to obtain candidate end points, wherein the intersection points represent boundary vertexes of the parking spaces;
determining a candidate endpoint far away from the intersection point as a target endpoint according to the distance between the candidate endpoint and the intersection point, wherein the target endpoint represents a position point of a parking space entrance or a position point of a shielded parking space line;
and obtaining the key points of the parking space according to the intersection points and the target end points.
A parking space detection apparatus, the apparatus comprising:
the image acquisition module is used for acquiring a parking space line pixel point image of the parking space image;
the image processing module is used for processing the pixel point image of the parking space line and extracting a parking space line;
the line segment extraction module is used for extracting a line segment set of the parking bit line and acquiring coordinates of two end points of each line segment;
the classification module is used for classifying the line segments according to the coordinates of the two end points of each line segment in the line segment set and the slope and the first distance to obtain a line segment subset included by each category; the first distance is the distance from the midpoint of one line segment of any two line segments to the other line segment;
the line fitting module is used for performing line fitting according to the endpoint coordinates of each line segment in the line segment subsets to obtain a fitting line corresponding to each line segment subset;
the intersection point determining module is used for determining the intersection point of each fitting straight line;
and the key point acquisition module is used for determining key points of all parking spaces according to the intersection points of the most-valued end points of all line segment subsets and the fitting straight line, wherein the most-valued end points comprise a maximum end point and/or a minimum end point.
A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the methods of the embodiments when executing the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of the embodiments described above.
According to the parking space detection method, the parking space detection device, the computer equipment and the storage medium, line segments are extracted from the parking space lines, then the parking space lines are classified, each parking space line is represented as a line segment set, the parking space lines are restored in a straight line fitting mode, noise points caused by deformation in the line segment endpoint sets can be shielded, most of points are guaranteed to be concentrated around the fitting straight line, positioning errors caused by deformation are reduced, on the basis, key points of parking spaces are determined according to the most value endpoints of all line segment subsets and the intersection points of the fitting straight line, and the detection effect of the positioning point detection of the parking spaces is improved.
Drawings
FIG. 1 is a diagram of an exemplary parking space detection method;
FIG. 2 is a schematic flowchart illustrating a parking space detection method according to an embodiment;
FIG. 3 is an embodiment of a parking space image viewed around;
FIG. 4 is a parking space line pixel image of the parking space image of FIG. 3;
FIG. 5 is a binary image of the parking bit line pixel image of FIG. 4;
FIG. 6 is a parking space line skeleton diagram extracted from the binary image of FIG. 5;
FIG. 7 is a schematic view of a region of a parking space line skeleton diagram;
FIG. 8 is a schematic diagram of a line segment corresponding to the region of FIG. 7;
FIG. 9 is a parking space line skeleton diagram with a parking space line being blocked;
FIG. 10 is a schematic diagram of a set of thick line segments, according to an embodiment;
FIG. 11 is a diagram illustrating the result of subdividing the set of coarse segmentation segments of FIG. 10;
FIG. 12 is a schematic view of a fitted straight line for a parking space of one embodiment;
FIG. 13 is a key point diagram of a parking space of an embodiment;
FIG. 14 is a schematic diagram illustrating a coordinate range between a first intersection and a second intersection including a pair of most significant points, according to one embodiment;
FIG. 15 is a diagram illustrating an embodiment of an intersection between a coordinate range between a first intersection and a second intersection and a pair of extreme endpoints;
FIG. 16 is a schematic illustration of key points of a parking space according to yet another embodiment;
FIG. 17 is a schematic illustration of key points of a parking space according to another embodiment;
fig. 18 is a block diagram showing the construction of a parking space detecting apparatus according to an embodiment;
FIG. 19 is a diagram showing an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The parking space detection method provided by the application can be applied to the application environment shown in fig. 1. As shown in fig. 1, the vehicle is equipped with a camera 102 and a vehicle controller 103, and the vehicle controller 103 is communicatively connected to an edge calculation server 105. The camera 102 of the vehicle may be installed at the top in front of the vehicle, the top behind the vehicle, and the top at the side of the vehicle, and when the vehicle triggers a parking instruction, the camera is used to collect images around the vehicle, obtain a parking space image, and send the parking space image to the vehicle controller or the edge calculation server, and the vehicle controller or the edge calculation server implements a parking space detection method to obtain key point information of a parking space. The parking space is not limited to a side parking space or a garage-reversing parking space.
In one embodiment, as shown in fig. 2, a parking method is provided, which is illustrated by applying the method to the edge computing server or the vehicle controller in fig. 1, and includes the following steps:
step 202, obtaining a parking space line pixel point image of the parking space image.
The parking space image is an image of a parking space acquired by a camera of a vehicle, and the parking space image is further processed into a parking space line pixel point image. The parking space line pixel point image only has the pixel point information of the parking space line, and other pixel point information irrelevant to the parking space, such as environment information of the parking space, is eliminated.
Specifically, acquiring a parking space line pixel image of a parking space image includes: acquiring a parking space image, inputting the parking space image into a trained generation countermeasure network, and generating a parking space line pixel point image of the parking space image through a generator for generating the countermeasure network; the generation countermeasure network is obtained by training according to the parking space images and the parking space line pixel point images of the marked parking space images.
When a parking instruction is triggered, a collecting instruction is sent to a camera of the vehicle, and the camera of the vehicle shoots to obtain a parking space image. The parking space can be a side parking space or a reverse parking space.
In practical applications, especially in the field of intelligent driving, vehicles are often equipped with multiple cameras, so that the acquisition (line of sight) range is wider. In particular, in the case of a large vehicle, the vehicle is bulky, the parking space is large, and the field of view of the vehicle needs to be enlarged. Therefore, in order to obtain a better visual range, a plurality of cameras are generally arranged. Therefore, acquiring a parking space line pixel image of a parking space image includes: acquiring parking space area images acquired by a plurality of cameras; and matching and splicing the parking space area images to obtain the all-round parking space image.
The method comprises the steps that each camera collects a parking space area image in the sight range of the camera, the adjacent parking space area images are matched in an image matching mode, matching points are determined, the adjacent parking space area images are spliced based on the matching points, and the around-looking parking space images are obtained. A look-around parking space image of one embodiment is shown in fig. 3.
In practical application, the sight range of the spliced all-around parking space images is enlarged, and the corresponding storage space and the image processing time are relatively increased. Therefore, it leads to an increase in time-consuming acquisition of the parking space rectangular region for the division of the parking space image viewed around. And utilize traditional image recognition technology, cut apart the parking stall line in the follow image, easily receive the influence of noise, have unstable problem.
Aiming at the problem, the well-trained generation countermeasure network is used in the method, and the parking space pixel point image of the parking space image is extracted. Specifically, a parking space image is input into a trained generation countermeasure network, and a parking space line pixel point image of the parking space image is generated through a generator of the generation countermeasure network; the generation countermeasure network is obtained by training according to the parking space images and the parking space line pixel point images of the marked parking space images.
Specifically, the generation of the countermeasure network model mainly includes two parts: a generator and a discriminator. The generator means that an image can be generated from input data through model training according to a task. The discriminator judges whether the generated image is a real image. And after the training stage is finished, obtaining a generator capable of accurately extracting the image information, and extracting the image information by using the generator. The parking space line pixel point image of the parking space image of fig. 3 extracted by the generator generating the countermeasure network in one embodiment is shown in fig. 4.
Specifically, according to the application, the sample of the sample set comprises the parking space image and the parking space pixel point image corresponding to the marked parking space image. In the training stage, the generator generates a parking space line pixel image of the parking space image, and the discriminator judges whether the generated parking space line pixel image is the parking space pixel image of the marked parking space image.
Specifically, a training set is obtained, wherein the training set comprises a parking space image and a parking space line pixel point image of the marked parking space image; inputting the parking space images in the training set into a generator for generating a confrontation network to obtain parking space line pixel point images of the predicted parking space images; comparing the predicted parking space line pixel point image with the marked parking space line pixel point image by utilizing a generated countermeasure network; and training the generation countermeasure network according to the comparison result, wherein the training aims to enable the predicted parking space line pixel point image to be close to the labeled pixel point image.
Firstly, a generation countermeasure network, a parking space image set training generator and a discriminator are utilized. The geometric structure for dividing the parking bit line is simple, so that the requirement can be met by using a general coding and decoding network generator, the discriminator is a two-classifier for comparing pixel distribution difference, and is used for comparing the generated parking space pixel point image with the marked parking space pixel point image, and continuously supervising whether the image generated by each weight of the generator at random is the marked parking space pixel point image or not during training. In the actual parking space detection, the parking space pixel point images can be segmented only by using the confrontation network generator, so that the time for segmenting the parking space lines by the confrontation network is further reduced, and the stability for segmenting the unknown parking space line interested regions by the confrontation network is also improved.
And step 204, processing the pixel point image of the parking space line and extracting the parking space line.
Specifically, binarization processing is carried out on the parking space line pixel point image to obtain the parking space line.
Further, the parking position line is a parking position line skeleton obtained after image thinning processing. Image refinement refers to a process of reducing lines of a binary image from a multi-pixel width to a unit pixel width. Through image thinning processing, redundant pixel points can be removed while the main characteristics of the parking position line are kept, and the calculation amount is reduced.
Specifically, processing the parking space line pixel image and extracting the parking space line includes: carrying out binarization processing on the parking bit line pixel point image to obtain a line area; and after the line area is subjected to morphological processing, extracting lines and performing skeletonization processing on the lines to obtain the parking position line.
The binarization processing is a process of setting the gray value of a pixel point on an image to be 0 or 255, that is, setting the whole image to have an obvious black-and-white effect. In digital image processing, a binary image plays a very important role, and binarization of an image greatly reduces the amount of data in the image, thereby making it possible to highlight the contour of a target. After the parking bit line pixel point image shown in fig. 4 is subjected to binarization processing, an obtained binary image is shown in fig. 5. The pixel points with the gray scale value of 255 in the binary image correspond to parking bit lines, namely line regions.
After binarization, there may be noise at the edge of the line region. In the scheme of the application, the line region is denoised by morphology. Specifically, morphological corrosion is used for removing noise at the edge of the area, then the smooth line area is expanded and holes of the line area are filled, then the maximum connected area of the line area is calculated, then the connected area is subjected to contouring, so that a small outline with the circumference smaller than a threshold value is removed, and finally denoising of the parking position line is completed, and a corresponding line is obtained.
And performing skeletonization processing on the parking bit line, specifically, performing region refinement on the binarized line obtained in the last step by using a kernel function, removing redundant pixel points, and reserving the main characteristics of the parking bit line as a slender line. The parking space line comprises a main skeleton point set of parking space pixel point images, and the calculation amount of key point judgment is reduced by reducing key points. Fig. 6 shows a parking space line skeleton obtained by skeletonizing the line region of the parking space line shown in fig. 5.
And step 206, extracting a line segment set of the parking bit line, and acquiring coordinates of two end points of each line segment.
Specifically, the parking space line skeleton is extracted as a plurality of line segments through cumulative probability Hough transformation
Figure BDA0003165282610000081
The set of line segments provides a set of key points for the final parking space. Wherein L is i Is the ith segment, n is the total number of segments,
Figure BDA0003165282610000082
is L i The coordinates of the left and right endpoints of the line segment. Specifically, parameters of the cumulative probability Hough transform can be set for extracting line segments, for example, the parameters include the number of the points connected around and the data of the points at intervals, the cumulative probability Hough transform is performed according to the set parameters, and a line segment set of the parking bit line skeleton is extracted. Each line segment is provided with a left end point and a right end point, and coordinates of two ends of each line segment are obtained. In practical application, the hough transform will be overlapped, which results in the condition that the found line segments are overlapped,that is, there is an error, and after hough transform is performed on one region of the parking bit line skeleton diagram in fig. 7, a plurality of line segments are superimposed to indicate the parking bit line at that position as shown in fig. 8.
Step 208, classifying the line segments according to the slope and the first distance according to the coordinates of the two end points of each line segment in the line segment set to obtain a line segment subset included in each category; the first distance is the distance from the midpoint of one line segment of any two line segments to the other line segment.
Specifically, line segments with similar slopes and first distances are classified into the same category, so that a subset of the line segments included in each category is obtained.
Specifically, the slope of each line segment and the first distance from the midpoint of the line segment to another line segment are obtained according to the coordinates of the end points of each line segment in the line segment set, the line segments with the slope difference and the first distance average value smaller than the corresponding threshold value in any two line segments are divided into one class, and the roughly divided line segment subset corresponding to each class is obtained.
Specifically, the way of roughly dividing the line segment is as follows: obtaining the slope of the line segment according to the coordinates of two end points of each line segment, and obtaining the linear expression of the line segment according to the slope; calculating a first distance from the middle point of one line segment to the other line segment in any two line segments according to the linear expression of the line segments and the coordinates of the two end points; judging whether the two line segments are close to each other or not according to the slopes of the two line segments and the first distance, if so, judging the two line segments to be of the same type, and if not, judging the two line segments to be of two types; the iteration is repeated until all the line segments have the category.
Specifically, density-based clustering is used to align any two segments
Figure BDA0003165282610000091
And (e) performing iterative classification on n, i and j which are less than or equal to n, wherein i and j are segment subscripts. The method comprises the following steps:
1. respectively calculate any two line segments L i ,L j Corresponding slope k i 、k j The straight line expression of the line segment is obtained as y = kx + b.
2. Formula of distance from point to straight line
Figure BDA0003165282610000092
Obtaining a first distance d from the midpoint of one line segment to another line segment i ,d j At two line slope k i 、k j Close and two first distances d i ,d j If the two line segments are close, the two line segments are judged to be close, and the two line segments are of the same type, otherwise, the two line segments are judged to be of the two types. The slope difference of the two line segments can be compared with a slope threshold value to judge whether the slopes of the two line segments are close or not. And if the difference of the slopes of the two line segments is smaller than the slope threshold value, determining that the slopes of the two line segments are similar. The average value of the first distances of the two line segments can be compared with a distance threshold value to judge whether the distances of the two line segments are close. And if the first distance average value of the two line segments is smaller than the distance threshold value, determining that the two line segments are close in distance.
3. And repeating the steps until all the line segments have the categories.
Through the steps, the slope and the distance of the line segments can be considered, and the line segments with similar slopes and distances are classified into the same category. Therefore, the method is adopted to obtain the roughly divided line segment subsets of the parking space lines corresponding to different parking space positions through clustering { (x) 1 ,y 1 ),.......,(x j ,y j )} m,c M is more than or equal to 0, c is less than or equal to N, wherein x j Is the x-axis coordinate value of the jth endpoint, y j Is the y-axis coordinate value of the jth endpoint, m is the total segment number of the c-th line segment, and N is the total number of rough classification.
It will be appreciated that by setting reasonable slope and distance thresholds, parking lines with significant differences in slope and distance can be distinguished. It should be noted that one parking space line segment in the parking space image does not represent an actual parking space line. If one parking space line is blocked by one object due to shooting blocking or the like, the parking space line skeleton is as shown in the parking space in the middle of fig. 9, and for this parking space, six parking space line segments exist in the parking space image. Therefore, the parking space line segment in the parking space image includes a complete parking space line segment in the parking space image, a parking space line segment segmented due to occlusion and the like, and a parking space line segment of the parking space entrance (the parking space entrance mark is usually two unconnected line segments for representing the entrance).
In practical application, when there are a plurality of parking spaces and entrance marks of the parking spaces in an image, or when there is shielding on a parking space line, because the first distance between two line segments is short, there may be errors in the line segment division, and a parking space line is segmented into two parking space line segments due to shielding, or two parking space line segments in which the entrance of a parking space in the same parking space is used as an entrance mark are assigned to the same category. With the parking bitmap shown in fig. 10, there are three parking stalls in the image scope, through setting up reasonable threshold value, divide according to slope and distance, the line segment on the slope and the great parking line position of distance difference can be distinguished into different categories, but the line segment that is nearer can not be distinguished by accuracy, if be belonged to same category by the parking stall line segment of segmentation because of reasons such as sheltering from, like the parking stall of fig. 10 downside, have a parking bit line because sheltered from by the object, be divided into two parking stall line segments. The target of parking space line identification needs to determine the end point of the parking space line segment, and the end point is used as the key point of the parking space. If two parking space line segments which are blocked and segmented belong to the same category, the end points of the parking space line segments cannot be identified, and the key points of the parking spaces cannot be accurately determined. As shown in fig. 10, the lowest parking space segment is classified as the first type, the two parking space segments at the entrance of the left parking space segment are classified as the second type, the parking space segment at the upper side is classified as the third type, and the parking space segment at the right side is classified as the fourth type. This classification does not achieve an accurate classification.
Aiming at the situation, for classifying each parking space line segment of the parking space image, a rough segmentation set is further subdivided, and line segment endpoints in line segment subsets of each type of rough segmentation are sequenced according to endpoint coordinates to obtain an endpoint sequence; if the intermediate interval points of the adjacent endpoints in the endpoint sequence do not have parking space line information, dividing the corresponding adjacent endpoints into two different types to obtain subdivided line segment subsets, wherein each subdivided line segment subset corresponds to one parking space line segment; wherein the coarse segment subset is used for straight line fitting, and the segment subset is used for determining the most significant endpoint.
It can be understood that the parking space line in the parking space image specifically corresponds to the parking space line segment of each parking space shown in the parking space image, including the case of the complete boundary line segment of each parking space, the case of the boundary line of the parking space line being divided into a plurality of parking space line segments due to occlusion, and the case of the entrance marking line segment of the parking space entrance.
Whether the parking space information exists in the intermediate interval point or not can be judged through whether the binary image pixel corresponding to the intermediate interval point is zero or not. If the binary image pixel corresponding to the intermediate interval point is zero, the point is not on the parking space line and is blank. I.e. the empty space between two parking spaces. In order to improve the accuracy of classification, after the intermediate interval point is determined, traversing a preset number of points around the intermediate interval point, judging whether areas with the intermediate interval point as a center are all zero, if so, determining that the intermediate interval point is not on a parking space line, namely, no parking space information exists. Specifically, for a coarse line segment, the set of endpoints per class { (x) 1 ,y 1 ),.......,(x j ,y j )} m,c And m is more than or equal to 0, c is less than or equal to N, sequencing is carried out, intermediate interval points of adjacent end points in the sequence are calculated, whether the binary image pixels corresponding to the interval points are zero or not is searched, if the binary image pixels corresponding to the interval points are zero, the intermediate interval points of the adjacent end points are not parking space pixel points (such as the interval part of adjacent parking spaces, the sheltered part of parking space lines and the entrance part of the parking spaces), and two adjacent end points corresponding to the intermediate interval points are divided into two types on the end point sequence. Finally, subdivided line segment subsets are obtained
Figure BDA0003165282610000111
c * For the subdivision class, M is the total number of subdivision classes, M>N。
The subdivided line segment subset is a line segment set of each parking space line segment in the parking space image. As shown in fig. 11, the line segments of the parking space lines of each parking space are respectively classified into one type, and line segment set data, such as the line segment end points of the line segment sets of each type labeled in fig. 11, is provided for the later stage judgment of the relative position of the parking space. The coarsely divided subset of line segments is used for straight line fitting, i.e. direct fitting is obtained from the coarsely divided subset of line segments, which is used to determine the most significant end point.
And step 210, performing straight line fitting according to the endpoint coordinates of each line segment in the line segment subsets to obtain a fitted straight line corresponding to each line segment subset.
Specifically, the end point set of each line segment in the line segment subset in the same rough division { (x) 1 ,y 1 ),.......,(x j ,y j )} m,c M is more than or equal to 0, c is less than or equal to N, and linear least square fitting is carried out to obtain a linear equation A of the class-c parking space line c x c +B c y c +C c =0,A c ,B c ,C c Finally obtaining N linear equations { A) as equation coefficients c x c +B c y c +C c =0} c And c is less than or equal to N, and the fitting straight line is shown in figure 12. For deformation appearing around the parking space of the large-scale vehicle, noise points appearing due to deformation in the line segment endpoint set are shielded by adopting a straight line fitting method, most points are guaranteed to be concentrated around the fitting straight line, and positioning errors caused by deformation are reduced.
And step 212, determining the intersection point of each fitting straight line.
Specifically, { A c x c +B c y c +C c =0} c And c is less than or equal to N linear equations, and every two of the equations are subjected to intersection point calculation to obtain a corresponding intersection point set { (x) 1 ,y 1 ),.......,(x s ,y s )} L And L is more than 0, wherein L is the total number of the intersection points.
And 214, determining key points of each parking space according to intersection points of the most value end points of the various line segment subsets and the fitting straight line, wherein the most value end points comprise the maximum end point and/or the minimum end point.
The target that the parking stall detected can draw the key point in parking stall, and the key point in parking stall can be used to confirm the relative position of parking stall and vehicle, provides the guidance for vehicle control in the parking process. The key point in parking stall can be used to the direction of backing a car of ordinary vehicle, also can be used to the control of backing a car of intelligent driving vehicle. Generally, the parking space key points include boundary vertices of the parking space (i.e. intersection points of four parking lines), position points of entrance of the parking space, and position points of the occluded parking line, wherein the position points of the occluded parking line are intersection points of the occlusion and the parking line. The position point of the parking space entrance and the position point of the sheltered parking space line can be determined by the maximum end point of each line segment in the subdivided line segment subset. The maximum endpoint is the maximum endpoint and/or the minimum endpoint in the line segment subset of each type of subdivision. The maximum endpoint and/or the minimum endpoint may be determined by coordinates, which refers to the endpoint with the largest coordinate position and/or the endpoint with the smallest coordinate position in each subdivision segment subset.
The intersection points of the fitting straight lines are determined according to the roughly divided line segment subsets, and can represent the intersection points of the parking spaces. However, errors may exist in the roughly divided line segment subsets, and the parking spaces corresponding to the intersection points need to be further determined by combining the maximum end points of the finely divided line segment subsets, that is, the intersection points belong to each parking space.
Specifically, determining the key points of each parking space according to the most significant end points of all line segment subsets and the intersection points of the fitted straight lines comprises the following steps: obtaining a most-valued endpoint pair of each subdivided line segment subset, wherein the most-valued endpoint pair comprises a maximum endpoint and a minimum endpoint; determining intersection points of the parking spaces and the most extreme end points in the adjacent intersection point range of the parking spaces according to the intersection points of the fitting straight lines and the coordinates of the most extreme end point pairs of the subdivided line segment subsets to obtain candidate end points, wherein the intersection points represent boundary vertexes of the parking spaces; determining candidate end points far away from the intersection point as target end points according to the distance between each candidate end point and the intersection point, wherein the target end points represent position points of parking space entrances or position points of sheltered parking space lines; and obtaining the key points of the parking space according to the intersection points and the target end points.
Specifically, for the subdivided line segment subsets, the most-valued end points of the line segments in each line segment subset are obtained, and the most-valued end point pair P is obtained 1 ,P 2 The most valued end points are the maximum end points and the minimum end points of the subdivided segment subsets. For example, there are M sorted segments of subdivisionAnd in the set, M most-valued end point pairs exist, and each most-valued end point pair corresponds to one subdivided line segment subset. A sub-divided line segment subset includes a plurality of line segments, each line segment having two end points, the largest end point being the end point with the largest coordinate value in the sub-divided line segment subset, and the smallest end point being the end point with the smallest coordinate value in the sub-divided line segment subset.
Determining the intersection point of each parking space and the most end point in the adjacent intersection point range of each parking space according to the intersection point of the fitting straight line and the coordinates of the most end point pair of each subdivided line segment subset to obtain a candidate end point, and the method comprises the following steps of: sequencing the intersection points of the fitting straight lines according to the abscissa or the ordinate, and dividing the intersection points belonging to the same abscissa or the ordinate into the same intersection point set; finding out candidate intersection pairs with the closest position distance in one intersection set, if a maximum end point pair exists in a coordinate range between the candidate intersection pairs or the maximum end point pair does not exist but the coordinate range between the candidate intersection pairs and the coordinate range of the maximum end point pair intersect, determining the candidate intersection pairs as a first intersection point of a parking space and a second intersection point adjacent to the first intersection point respectively, and obtaining candidate end points corresponding to the coordinate range between the first intersection point and the second intersection point, wherein the candidate end points are the maximum end point pair existing in the coordinate range between the first intersection point and the second intersection point or the maximum end point pair existing in the coordinate range between the first intersection point and the second intersection point and are the maximum end points in the coordinate range between the first intersection point and the second intersection point; judging whether a maximum endpoint pair exists in a coordinate range between the first intersection point and the intersection points in each remaining intersection point set or not for the first intersection point, if so, determining the corresponding intersection point as a third intersection point adjacent to the first intersection point, and acquiring a candidate endpoint in the coordinate range between the first intersection point and the third intersection point, wherein the candidate endpoint is the maximum endpoint pair in the coordinate range between the first intersection point and the third intersection point; for the second intersection point, judging whether a maximum end point pair exists in a coordinate range between the second intersection point and the intersection points in the residual intersection point set, if so, determining the corresponding intersection point as a fourth intersection point adjacent to the second intersection point, and acquiring a candidate end point in the coordinate range between the second intersection point and the fourth intersection point, wherein the candidate end point is the maximum end point pair in the coordinate range between the second intersection point and the fourth intersection point; and obtaining candidate end points in the coordinate range between the third intersection point and the fourth intersection point, wherein the candidate end points are the most significant end point pairs existing in the coordinate range between the third intersection point and the fourth intersection point, or are the most significant end point pairs existing in intersection with the coordinate range between the third intersection point and the fourth intersection point, the third intersection point and the fourth intersection point are adjacent to each other in the coordinate range between the third intersection point and the fourth intersection point, and the intersection points of the parking spaces and the candidate end points in the adjacent intersection point range of each parking space are determined according to the first intersection point, the second intersection point, the third intersection point, the fourth intersection point and the candidate end points in the adjacent intersection point range.
Specifically, by utilizing the characteristic that the horizontal coordinate or the vertical coordinate values of the intersection points of the fitting straight line of the parking bit line are close (theoretically the same) in the same direction, the intersection points can be sorted according to the coordinates, the sorting mode can be sorting according to the horizontal coordinate or sorting according to the vertical coordinate, and the intersection points belonging to the same horizontal coordinate or the same vertical coordinate are divided into the same intersection point set. Taking the sorting by abscissa as an example, all the intersections are sorted by abscissa, and then the intersection M is shown in fig. 13 1 -M 6 Belongs to a first intersection set, an intersection M 9 -M 20 Belonging to a second set of intersection points. On the basis of horizontal coordinate sorting, finding out an intersection set with a shortest random distance from the first intersection set, and taking two intersections with continuous positions and containing a most valued endpoint pair as candidate intersection pairs M 1 ,M 2 If the candidate point pair M 1 ,M 2 If the most significant end point pair exists in the coordinate range between the candidate intersection point pairs or the most significant end point pair does not exist but the coordinate range between the candidate intersection point pairs and the coordinate range of the most significant end point pair exist an intersection, then the candidate intersection point pairs are respectively taken as the first intersection point M 1 And a first intersection M 1 Adjacent second intersection point M 2 Obtaining a first intersection point and a second intersection point M 1 ,M 2 Corresponding candidate endpoint in the coordinate range of the M 1 ,M 2 The most significant end point pair existing in the coordinate range between or and M 1 ,M 2 The most significant end point pair where the coordinate range pairs intersect, in M 1 ,M 2 The most extreme point in the coordinate range therebetween. For in M 1 ,M 2 The most significant end point pair existing in the coordinate range between, i.e. the most significant end point pair (maximum end point and minimum end point) of a sub-set of segment subdivision is at M 1 ,M 2 In the coordinate range, as shown in fig. 14, the position points where the occlusion exists can be extracted well to serve as candidate end points, so that the key points of the parking space can be extracted later.
For and M 1 ,M 2 The most significant end point pair of intersection exists in the coordinate range between M 1 ,M 2 The extreme end of the range, i.e. M 1 ,M 2 The coordinate range of the subdivided line segment subsets is intersected with the coordinate range of the most-valued end point pair, and one of the most-valued end points of the subdivided line segment subsets is positioned at M 1 ,M 2 In the coordinate range, as shown in fig. 15, one of the extreme end points of the subdivision line segment subset a is M 1 ,M 2 Within the coordinate range of the segment subset A, the coordinate range of the segment subset A between the most significant end point pair and M 1 ,M 2 In the coordinate range of the two, and one of the extreme end points M is set at the intersection 0 At M 1 ,M 2 Within the coordinate range of M, then M is 0 As candidate endpoints. FIG. 15 illustrates the situation where the parking spaces are connected, M 1 ,M 2 Under the condition that a parking space entrance exists, the method can well extract the position point of the parking space entrance to be used as a candidate endpoint, so that the key point of the parking space can be extracted subsequently.
It should be noted that the intersection point is determined according to a fitted straight line, and the fitted straight line is obtained by fitting a straight line according to the coordinates of the end points of each line segment in the rough line segment subset, so that the intersection point may also be the maximum end point, that is, the candidate end points found may include the intersection point. For the first intersection point M 1 Looking up M 1 A third intersection M containing the most significant end point pair in the coordinate range between each intersection in the remaining intersection set (the second intersection set shown in fig. 13) 9 Obtaining the intersection M 1 M 9 Candidate end points in the inter-coordinate range (intersection points coinciding with the most significant end points of the sub-set of subdivided line segments, candidate end points being the intersection points themselves), for a second intersection point M 2 Finding M 2 With each of the remaining set of intersections (second set of intersections)Fourth intersection M containing the most significant end point pair in the coordinate range between the intersections 12 Obtaining the intersection point M 2 M 12 Candidate end points in the inter-coordinate range, and in this case, the intersection point M can be defined 1 M 2 M 9 M 12 Belonging to a parking space. Then, a third intersection point and a fourth intersection point M are searched 9 M 12 Candidate endpoints contained in the inter-coordinate range, wherein the candidate endpoints are M 9 M 12 The most significant end point pair or and M existing in the inter-coordinate range 9 M 12 The coordinate ranges between the intersections have the maximum endpoint pairs of intersection, in M 9 M 12 The maximum end point in the coordinate range between the intersection points, M shown in FIG. 13 9 M 12 Candidate end points between intersections include the intersection itself and M 10 M 11
After the intersection points of the parking spaces and the candidate end points of the parking spaces are determined, the intersection points are boundary vertexes of the parking spaces, and the target end points can be further determined through the candidate end points, namely the position points of the entrances of the parking spaces or the position points of the shielded parking bit lines. Specifically, in some cases, the intersection point may also be the most significant end point, that is, the determined candidate end points may include the intersection point, and therefore, the end point after the intersection point is removed, that is, the target end point, the position point corresponding to the parking space entrance, and the position point of the occluded parking space line. Specifically, candidate end points in the intersection point range and the intersection point P are combined i ,P j Performing distance calculation to find the point P not intersecting with the intersection i ,P j The target end point close to (excluding the intersection itself), i.e., the candidate end point far from the intersection, is the target end point (the end point close to the intersection is the intersection itself excluding the intersection), and the target end point determined in correspondence with fig. 13 is M 10 M 11 Finally, M will be 1 M 2 M 9 M 12 And the found target endpoint M 10 M 11 Collectively referred to as key points of the same parking space, where M 1 M 2 M 9 M 12 The target endpoint is an entrance inside the parking space. In other embodiments, the target endpoint may also include an occluded location point on the parking line. As shown in FIG. 16, the found gateThe key points comprise intersection points and target end points, and the target end points are position points of entrances inside the parking spaces. As shown in fig. 17, the searched key points include intersection points and target end points, and the target includes a position point of an entrance inside the parking space and a position point where occlusion occurs.
The parking space key point obtained by the method is irrelevant to the vehicle coordinate, and the parking state of the vehicle can be judged according to the vehicle coordinate and the parking space key point coordinate.
According to the parking space detection method, the line segments are extracted from the parking space lines and then classified, so that each parking space line is represented as a line segment set, the parking space lines are restored in a straight line fitting mode, noise points caused by deformation in the line segment endpoint set can be shielded, most points are guaranteed to be concentrated around the fitting straight line, positioning errors caused by deformation are reduced, on the basis of the noise points, key points of the parking spaces are determined according to the most value endpoints of various line segment subsets and the intersection points of the fitting straight lines, and the detection effect of the positioning point detection of the parking spaces is improved.
According to the method, the accumulated probability Hough transformation is used for obtaining the line segment set of the parking space line, the line segment set of the parking space line is further divided into line segments and end points of different types by using the clustering method, so that the equation of the parking space line is obtained by using straight line fitting, the intersection point is obtained by using the straight line equation, finally the distance between the intersection point and the end point is comprehensively judged, the set of positioning key points comprising the intersection point and the end point is obtained, and the method improves the real-time performance and the stability of the parking space key point detection.
It should be understood that, although the steps in the flowchart of fig. 2 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not limited to being performed in the exact order illustrated and, unless explicitly stated herein, may be performed in other orders. Moreover, at least a portion of the steps in fig. 2 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
In one embodiment, as shown in fig. 18, there is provided a parking space detecting apparatus including:
an image obtaining module 1502 for obtaining a parking space line pixel image of a parking space image;
the image processing module 1504 is used for processing the pixel point images of the parking space lines and extracting the parking space lines;
the line segment extraction module 1506 is configured to extract a line segment set of the parking space line, and obtain coordinates of two end points of each line segment;
a classification module 1508, configured to classify each line segment according to a slope and a first distance according to coordinates of two end points of each line segment in the line segment set, so as to obtain a subset of line segments included in each category; the first distance is the distance from the midpoint of one line segment of any two line segments to the other line segment;
the straight line fitting module 1510 is configured to perform straight line fitting according to the coordinates of the end points of the line segments in the line segment subset to obtain a fitted straight line corresponding to each line segment subset;
an intersection determining module 1512 for determining an intersection of the fitted straight lines;
and a key point obtaining module 1514, configured to determine key points of the parking spaces according to intersection points of the most significant end points of the various line segment subsets and the fitted straight lines, where the most significant end points include a large end point and/or a minimum end point.
In another embodiment, an image acquisition module, comprising:
and the acquisition module is used for acquiring the parking space image.
The extraction module is used for inputting the parking space image into the trained generation countermeasure network and generating a parking space line pixel point image of the parking space image through the generator for generating the countermeasure network; the generation countermeasure network is obtained by training according to the parking space images and the parking space line pixel point images of the marked parking space images.
In another embodiment, the system comprises an acquisition module, a storage module and a display module, wherein the acquisition module is used for acquiring parking space area images acquired by a plurality of cameras; and matching and splicing the parking space area images to obtain the all-round parking space image.
In another embodiment, the image processing module is configured to perform binarization processing on the parking bit line pixel point image to obtain a line region; and after the line area is subjected to morphological processing, extracting lines and performing skeletonization processing on the lines to obtain the parking position line.
In another embodiment, the classification module is configured to obtain a slope of each line segment and a first distance from a midpoint of the line segment to another line segment according to coordinates of endpoints of each line segment in the line segment set, classify line segments of which slope differences and first distance average values in any two line segments are smaller than corresponding thresholds into a class, and obtain a roughly-classified line segment subset corresponding to each class.
In another embodiment, the classifying module is further configured to sort end points of each line segment in each of the roughly-divided line segment subsets according to end point coordinates to obtain an end point sequence, and if no parking space line information exists at intermediate interval points of adjacent end points in the end point sequence, divide corresponding adjacent end points into two different classes to obtain subdivided line segment subsets, where each subdivided line segment subset corresponds to one parking space line segment in the parking space image; wherein the roughly divided subset of line segments is used for straight line fitting, and the subdivided subset of line segments is used for determining the most significant end point.
In another embodiment, the key point obtaining module is configured to obtain a most significant endpoint pair of each segment subset of the segments, where the most significant endpoint pair includes a maximum endpoint and a minimum endpoint; determining intersection points of the parking spaces and the most extreme end points in the adjacent intersection point range of the parking spaces according to the intersection points of the fitting straight lines and the coordinates of the most extreme end point pairs of the subdivided line segment subsets to obtain candidate end points, wherein the intersection points represent boundary vertexes of the parking spaces; determining a candidate end point far away from the intersection point as a target end point according to the distance between the candidate end point and the intersection point, wherein the target end point represents a position point of a parking space entrance or a position point of an occluded parking space line; and obtaining the key points of the parking space according to the intersection points and the target end points.
The parking space detection device extracts the line segments from the parking space lines and classifies the line segments to enable each parking space line to be represented as a line segment set, restores the parking space lines in a straight line fitting mode, can shield noise points appearing in line segment endpoint sets due to deformation, ensures that most points are concentrated around the fitting straight line, reduces positioning errors caused by deformation, and determines key points of parking spaces on the basis of the most point of each line segment subset and the intersection point of the fitting straight line, thereby improving the detection effect of positioning point detection. For specific definition of the parking space detection device, reference may be made to the above definition of the parking space detection method, which is not described herein again. All or part of each module in the parking space detection device can be realized through software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be an edge computing server or a vehicle controller, and its internal structure diagram may be as shown in fig. 19. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a parking space detection method.
Those skilled in the art will appreciate that the architecture shown in fig. 19 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory in which a computer program is stored and a processor, which when executing the computer program performs the steps of the method of the above embodiments.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the methods of the embodiments described above.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, and these are all within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A parking space detection method, the method comprising:
acquiring a parking space line pixel image of a parking space image;
processing the parking space line pixel point image and extracting a parking space line;
extracting a line segment set of the parking bit line, and acquiring coordinates of two end points of each line segment;
classifying each line segment according to the slope and the first distance according to the coordinates of two end points of each line segment in the line segment set to obtain a line segment subset included in each category; the first distance is the distance from the midpoint of one line segment of any two line segments to the other line segment;
performing straight line fitting according to the coordinates of the end points of the line segments in the line segment subsets to obtain fitting straight lines corresponding to the line segment subsets;
determining the intersection point of each fitting straight line;
and determining key points of each parking space according to the intersection points of the most value end points of all line segment subsets and the fitting straight line, wherein the most value end points comprise the maximum end point and/or the minimum end point.
2. The method of claim 1, wherein obtaining a parking space line pixel image of a parking space image comprises:
acquiring a parking space image;
inputting the parking space image into a trained generation countermeasure network, and generating a parking space line pixel point image of the parking space image through a generator of the generation countermeasure network; the generation countermeasure network is obtained by training according to the parking space image and the marked parking space line pixel point image of the parking space image.
3. The method of claim 2, wherein said acquiring a parking space image comprises:
acquiring parking space area images acquired by a plurality of cameras;
and matching and splicing the parking space area images to obtain a look-around parking space image.
4. The method of claim 1, wherein the processing the parking space line pixel point image to extract the parking space line comprises:
carrying out binarization processing on the parking bit line pixel point image to obtain a line area;
and after the line area is subjected to morphological processing, extracting lines and performing skeletonization processing on the lines to obtain the parking space line.
5. The method of claim 1, wherein the classifying the line segments according to the slope and the first distance according to the coordinates of the two end points of each line segment in the line segment set to obtain the line segment subset included in each class comprises:
and according to the coordinates of the end points of each line segment in the line segment set, obtaining the slope of each line segment and the first distance from the midpoint of the line segment to another line segment, and dividing the line segments of which the slope difference value and the average value of the first distances in any two line segments are smaller than the corresponding threshold value into one class, so as to obtain the rough-divided line segment subset corresponding to each class.
6. The method of claim 5, further comprising:
sequencing line segment end points in each type of roughly divided line segment subsets according to end point coordinates to obtain an end point sequence, if no parking space line information exists in intermediate interval points of adjacent end points in the end point sequence, dividing the corresponding adjacent end points into two different types to obtain subdivided line segment subsets, wherein each subdivided line segment subset corresponds to one parking space line segment in the parking space image; wherein the coarsely divided line segment subset is used for straight line fitting, and the finely divided line segment subset is used for determining the most significant endpoint.
7. The method of claim 6, wherein determining the key points of each parking space according to the intersection of the most significant end point of each line segment subset and the fitted straight line comprises:
obtaining a most-valued endpoint pair of each subdivided line segment subset, wherein the most-valued endpoint pair comprises a maximum endpoint and a minimum endpoint;
determining intersection points of the parking spaces and the most extreme end points in the adjacent intersection point range of the parking spaces according to the intersection points of the fitting straight lines and the coordinates of the most extreme end point pairs of the subdivided line segment subsets to obtain candidate end points, wherein the intersection points represent boundary vertexes of the parking spaces;
determining a candidate endpoint far away from the intersection point as a target endpoint according to the distance between the candidate endpoint and the intersection point, wherein the target endpoint represents a position point of a parking space entrance or a position point of a shielded parking space line;
and obtaining the key points of the parking space according to the intersection points and the target end points.
8. A parking space detection apparatus, characterized in that the apparatus comprises:
the image acquisition module is used for acquiring a parking space line pixel point image of the parking space image;
the image processing module is used for processing the pixel point image of the parking space line and extracting a parking space line;
the line segment extraction module is used for extracting a line segment set of the parking bit line and acquiring coordinates of two end points of each line segment;
the classification module is used for classifying the line segments according to the slope and the first distance according to the coordinates of the two end points of each line segment in the line segment set to obtain a line segment subset included in each category; the first distance is the distance from the midpoint of one line segment of any two line segments to the other line segment;
the line fitting module is used for performing line fitting according to the endpoint coordinates of each line segment in the line segment subsets to obtain a fitting line corresponding to each line segment subset;
the intersection point determining module is used for determining the intersection point of each fitting straight line;
and the key point acquisition module is used for determining key points of all parking spaces according to the intersection points of the most-valued end points of all line segment subsets and the fitting straight line, wherein the most-valued end points comprise a maximum end point and/or a minimum end point.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202110802843.3A 2021-07-15 2021-07-15 Parking space detection method and device, computer equipment and storage medium Pending CN115700814A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110802843.3A CN115700814A (en) 2021-07-15 2021-07-15 Parking space detection method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110802843.3A CN115700814A (en) 2021-07-15 2021-07-15 Parking space detection method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115700814A true CN115700814A (en) 2023-02-07

Family

ID=85120528

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110802843.3A Pending CN115700814A (en) 2021-07-15 2021-07-15 Parking space detection method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115700814A (en)

Similar Documents

Publication Publication Date Title
CN110414507B (en) License plate recognition method and device, computer equipment and storage medium
CN107316031B (en) Image feature extraction method for pedestrian re-identification
CN112419299B (en) Bolt missing detection method, device, equipment and storage medium
CN108052904B (en) Method and device for acquiring lane line
CN109658454B (en) Pose information determination method, related device and storage medium
CN108256445B (en) Lane line detection method and system
CN109635733B (en) Parking lot and vehicle target detection method based on visual saliency and queue correction
CN109858438B (en) Lane line detection method based on model fitting
CN107862319B (en) Heterogeneous high-light optical image matching error eliminating method based on neighborhood voting
CN111783721B (en) Lane line extraction method of laser point cloud and electronic equipment
CN109410248B (en) Flotation froth motion characteristic extraction method based on r-K algorithm
CN114782499A (en) Image static area extraction method and device based on optical flow and view geometric constraint
CN110852327A (en) Image processing method, image processing device, electronic equipment and storage medium
CN116824516B (en) Road construction safety monitoring and management system
CN111783722B (en) Lane line extraction method of laser point cloud and electronic equipment
CN111696072A (en) Color image line detection method, color image line detection device, electronic device, and storage medium
CN114494161A (en) Pantograph foreign matter detection method and device based on image contrast and storage medium
CN110348307B (en) Path edge identification method and system for crane metal structure climbing robot
CN107832732B (en) Lane line detection method based on treble traversal
Chen et al. Image segmentation based on mathematical morphological operator
CN115937825B (en) Method and device for generating robust lane line under BEV of on-line pitch angle estimation
CN111860113A (en) Lane line detection method and system
CN116721396A (en) Lane line detection method, device and storage medium
CN116052120A (en) Excavator night object detection method based on image enhancement and multi-sensor fusion
CN115700814A (en) Parking space detection method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination