A parking space recognition method, device and equipment
By acquiring a cloud dataset of parking spaces and determining the boundary lines and corner points, the problem of inaccurate identification of ordinary parallelogram parking spaces in existing technologies has been solved, enabling accurate identification of parking spaces of various shapes.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NAVINFO
- Filing Date
- 2023-02-20
- Publication Date
- 2026-05-29
AI Technical Summary
In existing technologies, the method of converting parking spaces into images based on point cloud contrast and extracting line segments through Hough transform can only identify rectangular parking spaces and cannot accurately identify ordinary parallelogram parking spaces.
By acquiring a cloud dataset of parking spaces, several boundary lines are determined. One boundary line is selected as the baseline for the parking space. Based on the positional relationship between the other boundary lines and the baseline, the boundary lines and corner points of the parking space are determined, thereby identifying the parking space.
It improves the accuracy of parking space recognition, enabling vehicles to park accurately, and is suitable for recognizing parking spaces of various shapes.
Smart Images

Figure CN116385999B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer data processing technology, and in particular to a method, apparatus and equipment for identifying parking spaces. Background Technology
[0002] With the continuous development of the automotive industry, the demands on automobiles are also increasing. For example, when parking, there is a desire to identify parking spaces so that vehicles can be accurately parked in the appropriate positions. Current technologies for identifying parking spaces first require converting the parking space into an image based on point cloud contrast, then using Hough transform to extract line segments from the image and calculate the rotation angle of these segments. Next, integral projection is performed in the horizontal and vertical directions to search for the corner coordinates of the parking space, and finally, the corner coordinates are converted back into point cloud coordinates. However, this method can only identify rectangular parking spaces and is not suitable for ordinary parallelogram-shaped parking spaces, leading to inaccurate parking space identification. Summary of the Invention
[0003] This specification provides a method, apparatus, and device for identifying parking spaces, in order to solve the problem of inaccurate identification in existing parking space identification methods.
[0004] To solve the above-mentioned technical problems, the embodiments in this specification are implemented as follows:
[0005] The parking space identification method provided in the embodiments of this specification may include:
[0006] Obtain the cloud data set of parking locations to be identified;
[0007] Based on the location information of each point in the parking space cloud data set, several boundary lines representing parking spaces are determined;
[0008] One of the aforementioned boundary lines is designated as the parking space baseline.
[0009] Based on the positional relationship between other boundary lines and the baseline, a boundary line representing a parking space is determined from a number of boundary lines;
[0010] Based on the intersection of the boundary lines representing a parking space, determine the four corner points representing a parking space;
[0011] A parking space is determined based on the four corner points.
[0012] The parking space identification device provided in the embodiments of this specification may include:
[0013] The parking location cloud data set acquisition module is used to acquire the parking location cloud data set to be identified;
[0014] The boundary line determination module is used to determine several boundary lines representing parking spaces based on the location information of each point in the parking space cloud data set.
[0015] The parking space baseline determination module is used to determine one of the several boundary lines as the parking space baseline.
[0016] The same parking space boundary line determination module is used to determine the boundary line representing a parking space from several boundary lines based on the positional relationship between other boundary lines and the baseline;
[0017] The corner point determination module is used to determine the four corner points representing a parking space based on the intersection of the boundary lines representing a parking space.
[0018] The parking space determination module is used to determine a parking space based on the four corner points.
[0019] This specification provides an embodiment of a computer device that may include a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps of a parking space identification method.
[0020] This specification provides an embodiment of a computer-readable storage medium having a computer program or instructions stored thereon, which can be executed by a processor to implement a parking space identification method.
[0021] The embodiments of this specification provide a computer program product that may include a computer program or instructions, which, when executed by a processor, implement the steps of a parking space identification method.
[0022] At least one embodiment in this specification can achieve the following beneficial effects: by acquiring a cloud dataset of parking spaces to be identified; determining several boundary lines representing parking spaces based on the position information of each point in the cloud dataset; determining one of the boundary lines as the parking space baseline; determining the boundary line representing a parking space from the several boundary lines based on the positional relationship between the other boundary lines and the baseline; determining the four corner points representing a parking space based on the intersection of the boundary lines representing a parking space; and determining a parking space based on the four corner points. This can improve the accuracy of parking space identification. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a schematic diagram of the overall scheme architecture of a parking space identification method provided in the embodiments of this specification in a practical application scenario;
[0025] Figure 2 This is a flowchart illustrating a parking space identification method provided in the embodiments of this specification;
[0026] Figure 3 This is a schematic diagram of a method for determining the boundary line of the same parking space, provided in the embodiments of this specification;
[0027] Figure 4 This is a schematic diagram of the structure of a parking space identification device provided in the embodiments of this specification;
[0028] Figure 5 This is a schematic diagram of the structure of a parking space identification device provided in the embodiments of this specification. Detailed Implementation
[0029] To make the objectives, technical solutions, and advantages of one or more embodiments of this specification clearer, the technical solutions of one or more embodiments of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of one or more embodiments of this specification.
[0030] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0031] In existing technologies, identifying parking spaces first requires converting the parking space into an image based on point cloud contrast. Then, Hough transform is used to extract line segments from the image and calculate the rotation angle of these line segments. Next, integral projection is performed in the horizontal and vertical directions to search for the corner coordinates of the parking space. Finally, the corner coordinates are converted into point cloud coordinates. However, this identification method can only identify rectangular parking spaces and is not applicable to ordinary parallelogram parking spaces, leading to inaccurate parking space identification.
[0032] To address the shortcomings of existing technologies, this solution provides the following embodiments:
[0033] Figure 1 This is a schematic diagram of the overall architecture of a parking space identification method in a practical application scenario, as described in the embodiments of this specification.
[0034] like Figure 1 As shown, the solution mainly includes: point cloud data 1 and server 2. In practical applications, point cloud data 1 can represent the point cloud of parking spaces; point cloud data 1 can be obtained based on parking space image information collected by cameras; server 2 can obtain point cloud data 1 from the database, perform calculations on point cloud data 1 to obtain the corner points corresponding to each parking space, and obtain each parking space based on the corner points to improve the accuracy of parking space recognition.
[0035] Figure 2 This is a flowchart illustrating a parking space identification method provided in an embodiment of this specification. From a programming perspective, the entity executing the process can be a program hosted on an application server or an application client.
[0036] like Figure 2 As shown, the process may include the following steps:
[0037] Step 202: Obtain the cloud data set of parking spots to be identified.
[0038] The parking space point cloud in the embodiments of this specification can be parking space point cloud data collected by a point cloud acquisition device. A point cloud can be a set of point data on the surface of the parking space boundary line obtained by a measuring instrument. Typically, the number of points obtained using a 3D coordinate measuring machine is relatively small, and the distance between points is relatively large, called a sparse point cloud; while the point cloud obtained using a 3D laser scanner or photographic scanner has a large number of points and is relatively dense, called a dense point cloud. The parking space point cloud obtained from the database can be projected onto a two-dimensional plane to facilitate calculations based on the two-dimensional coordinates, thereby identifying parking spaces. A grid of a preset size can be divided according to the projection result, for example, dividing the two-dimensional plane into a grid of 0.3m * 0.3m. The parking point cloud can be clustered according to the divided grid, that is, the point clouds contained in adjacent grids are grouped into the same category, thereby obtaining a parking space point cloud data set. In practical applications, the point cloud of parking spaces output by the point cloud acquisition device can be point cloud information containing three-dimensional coordinate information. Projecting the parking space point cloud onto a two-dimensional plane can be obtained by removing the latitude coordinate, i.e., the Z-axis coordinate, which represents the height.
[0039] Step 204: Based on the location information of each point in the parking space cloud data set, determine several boundary lines representing parking spaces.
[0040] In the embodiments of this specification, the position information of each point can be determined based on the two-dimensional coordinate information projected onto a two-dimensional plane. Points within a certain range can be selected based on the position information of each point to obtain multiple corresponding point clouds, such as a point cloud composed of points within a 0.2-meter range of each point. The information of the points contained in each point cloud can be fitted to obtain several line segments, which can represent several boundary lines of a parking space. The information of a point can at least include its position information. The position information of a point can be represented by its two-dimensional coordinates or its three-dimensional coordinates. It is understood that any one of the several boundary lines includes at least one boundary line of a parking space. That is, any one of the several boundary lines can also be composed of the boundary lines of multiple parking spaces.
[0041] Step 206: Determine one of the boundary lines as the parking space baseline.
[0042] In the embodiments described in this specification, any boundary line can be selected from several boundary lines as the parking space reference line; alternatively, the longest or shortest boundary line can be selected from several boundary lines as the parking space reference line. No specific limitation is made on how to determine a parking space reference line from several boundary lines; users can set it according to their own needs.
[0043] Step 208: Based on the positional relationship between other boundary lines and the baseline, determine the boundary line representing a parking space from among several boundary lines.
[0044] In this specification, the other boundary lines in the embodiments can be any of the boundary lines other than the parking space baseline. Three additional boundary lines representing the same parking space as the baseline can be identified from these other boundary lines. These four boundary lines can form a parking space.
[0045] Step 210: Determine the four corner points representing a parking space based on the intersection of the boundary lines representing a parking space.
[0046] In the embodiments of this specification, since a boundary line can be composed of the boundary lines of multiple parking spaces, in order to prevent identification errors, the intersection of four boundary lines belonging to the same parking space can be selected as the corner point of the parking space. This can prevent errors and improve the accuracy of parking space identification.
[0047] Step 212: Determine a parking space based on the four corner points.
[0048] In the embodiments described in this specification, four corner points can be connected to obtain a parking space, thereby achieving the purpose of parking space identification. Any parking space in a parking lot can be identified according to the parking space identification method. After successful identification, the identified parking space information can be sent to a display device, such as an in-vehicle display, so that the display device can render and display the parking space, allowing the driver to refer to the parking space image for parking, thus improving parking accuracy. Alternatively, the server can use the identified parking space to plan parking for the autonomous driving system, facilitating the accurate parking control of the autonomous vehicle.
[0049] It should be understood that the order of some steps in the methods described in one or more embodiments of this specification may be interchanged according to actual needs, or some steps may be omitted or deleted.
[0050] Figure 2 The method described above involves acquiring a cloud dataset of parking space locations to be identified; determining several boundary lines representing parking spaces based on the location information of each point in the cloud dataset; designating one of these boundary lines as the baseline for the parking space; determining the boundary line representing a parking space from the remaining boundary lines based on the positional relationship between the other boundary lines and the baseline; determining the four corner points representing a parking space based on the intersection of the boundary lines representing the parking space; and finally, determining a parking space based on the four corner points. This method can improve the accuracy of parking space identification, enabling vehicles to park accurately according to the designated parking spaces.
[0051] based on Figure 2 In addition to the method described herein, this specification also provides some specific implementation methods of this method, which will be described below.
[0052] Optionally, the determination of several boundary lines representing parking spaces as described in the embodiments of this specification may specifically include:
[0053] Obtain the vector orientation of each point in the parking spot cloud data set;
[0054] The principal orientation is calculated based on the vector orientation of each point; the principal orientation represents the direction of the parking space boundary line.
[0055] Based on the main orientation and the position information of each point, determine the fitted line equation corresponding to each point cloud;
[0056] The point clouds are fitted according to the fitted straight line equation to obtain the straight line segments of the corresponding point clouds; the straight line segments represent the boundary lines of the parking spaces.
[0057] In the embodiments of this specification, the corresponding point cloud can be a set of neighboring points within a certain range determined by the position of each point, such as points within 0.2 meters of each point. The server can determine the principal orientation based on the vector orientation of each point, which can represent the direction of the boundary line of the parking space. Based on the direction of the parking space and the position of each point, the fitted line equation corresponding to the point cloud representing the same straight line segment can be determined. By fitting each point cloud according to the corresponding fitted line equation, multiple line segments are obtained, which represent the boundary line of the parking space. At the same time, the length of each line segment can also be calculated.
[0058] The vector orientation of a point can be calculated based on its location information, thereby improving the accuracy of the parking space boundary line direction. The method for obtaining the vector orientation of each point in the parking space cloud data set as described in this embodiment may specifically include:
[0059] Based on the location information of each point, search the neighborhood point cloud within a preset radius of each point;
[0060] Based on the position information of each point in the neighborhood point cloud, calculate the covariance matrix corresponding to the neighborhood point cloud;
[0061] Calculate the feature vector of the neighborhood point cloud based on the covariance matrix;
[0062] The feature vector is determined as the vector orientation of the point in the neighborhood point cloud.
[0063] In the embodiments of this specification, points can be arranged according to their coordinate values in the two-dimensional coordinate information, or the points can be randomly arranged. The points are then searched sequentially to avoid missing points or repeatedly searching for the same point. A KD-tree can be used to search for each point, resulting in a neighborhood point cloud composed of points within a preset radius (e.g., a radius of 2 meters). A KD-tree is a data structure for segmenting k-dimensional data space. It is mainly used for searching key data in multi-dimensional space, such as range search and nearest neighbor search. The search radius can be set by the user. The covariance matrix can be determined based on the position information of each point in the neighborhood point cloud of the search point. The covariance matrix is solved to obtain the eigenvector corresponding to the covariance matrix, which is then used as the vector orientation of the search point. The search point can be understood as the point currently being searched. The vector orientation of the point can be calculated during the search or after the search is complete.
[0064] The specific shape of a parking space can be determined by defining the direction of its boundary lines, thereby improving recognition accuracy. The calculation of the principal orientation based on the vector orientation of each point, as described in the embodiments of this specification, may specifically include:
[0065] Calculate the angle between the vector orientation of each point and the positive direction of the vertical axis; the vertical axis is the vertical axis of the two-dimensional plane to which each point is projected.
[0066] Based on the included angle, each point is assigned to a corresponding cell; the cell is obtained by dividing a preset angle range into equal intervals.
[0067] Calculate the average of the vector orientations of all points in the first cell that contains the most points, and obtain the first primary orientation;
[0068] Select the second cell from all cells that contains the vector orientation with an angle greater than the first preset angle that is the largest number of points;
[0069] Calculate the average value of the vector orientation of each point in the second cell to obtain the second principal orientation.
[0070] In this embodiment, the angle between the vector azimuth of each point and the positive direction of the vertical axis can be calculated, that is, the angle between the vector azimuth of each point and the (0, 1) direction, which is between 0° and 180°. The angle range of 0° to 180° can be divided at equal intervals, for example, with 5° intervals, to obtain cells representing different angle categories. The corresponding angle category is determined based on the value of the angle between each point, and each point is assigned to a cell within the corresponding angle category. The number of points in each cell is counted, and the cell with the most points is selected as the first cell. The average vector azimuth of each point in the first cell is calculated, and this average is used as the first primary azimuth. A set of cells is selected from several cells where the angle between the vector azimuth of a point and the first primary azimuth is greater than a first preset angle. The number of points in each cell of the cell set whose vector azimuth angle with the first primary azimuth is greater than the first preset angle is counted, and the cell with the most counted points in the cell set is selected as the second cell. The average vector azimuth of each point in the second cell is calculated, and this average is used as the second primary azimuth. The first and second main directions are the two directions of the parking space boundary line, respectively.
[0071] Determining the equation of the fitted line facilitates fitting the equation to each point to obtain the boundary line of the parking space. The calculation of the fitted line equation based on the main orientation and the position information of each point, as described in the embodiments of this specification, may specifically include:
[0072] Select a first point cloud whose angle with the main orientation is less than a second preset angle;
[0073] Based on the position information of each point in the first point cloud, the projection scale of each point is determined; the projection scale is calculated based on the two-dimensional coordinates and vector orientation of each point.
[0074] Based on the projection scale of each point, the points within the preset scale range are determined to obtain the first point set;
[0075] The first point set is fitted using the least squares method to obtain the fitting result;
[0076] Based on the fitting results, the corresponding fitted line equation is determined.
[0077] In this embodiment, a first point cloud can be formed by selecting points from the parking spot cloud data set whose vector orientation and the angle between the first main orientation and the first main orientation are less than a second preset angle. The second preset angle is less than the first preset angle. The first projection scale of each point is calculated based on its position information, i.e., its two-dimensional coordinate information. This can be done according to formula p. 1s =v 1y p 1x -v 1x p 1y Calculate the projected scale, where p 1s It can represent the first projected scale; v 1y It can represent the vertical coordinate value corresponding to the first position; v 1x It can represent the x-coordinate value corresponding to the first position; p 1x It can represent the x-coordinate value of the first point in the cloud; p 1y This can represent the ordinate value of a point in the first point cloud. Points whose vector orientation and the second principal orientation form the second point cloud from the parking spot cloud data set are selected to form the second point cloud. The second projection scale is calculated based on the above formula, combined with the second principal orientation and the positions of each point in the second point cloud. That is, p 2s =v 2y p 2x -v 2x p 2y , where p 2s It can represent the second projection scale; v 2y It can represent the ordinate value corresponding to the second position; v 2x It can represent the x-coordinate value corresponding to the second position; p 2x This can represent the x-coordinate value of the midpoint of the second point in the cloud; p 2y It can represent the ordinate value of the second point in the cloud.
[0078] In this embodiment, a first point set within a preset scale range can be determined based on the projection scale of each point in the first point cloud, and the information of the first point set is recorded. The first point set information may include the number of points, the position information of the points, and the position information of the center point in the point set. The preset scale range is appropriately increased, and a second point set is re-determined based on the increased preset scale range. It is then determined whether the number of points in the first point set is equal to the number of points in the second point set. If so, the first point set is determined to be a neighborhood point set; otherwise, the calculation and determination continue for the next point. Each point in the second point cloud can also be calculated and determined according to the aforementioned method. Regarding the setting of the preset scale range, it can be [p 1s -0.15, p 1s Within the range of +0.15], it can be appropriately increased to [p]. 1s -0.20, p 1s Within the range of +0.20]. This preset scale range setting is only an illustrative example; the actual setting should be based on the user's own values. The points in the first and second point clouds can be sorted according to their scale values, and then statistical calculations are performed on each point in the sorted order.
[0079] In the embodiments of this specification, after determining the neighborhood point set, the least squares method can be used to fit the neighborhood point set to obtain the linear equation and the parameters A and B in the equation. The linear equation and the corresponding parameters A and B for each point in the first point cloud can be obtained using this method.
[0080] To improve the accuracy of the fitted straight line equation, the determination of the corresponding fitted straight line equation in the embodiments of this specification may specifically include:
[0081] Obtain the parameter information of the fitting equation corresponding to each point;
[0082] The normal weighted mean is calculated based on the parameter information of the fitting equation corresponding to each point to obtain the correction parameters;
[0083] The correction parameters are used as parameters for the fitted line equations corresponding to each point to obtain the corrected fitted line equations.
[0084] In the embodiments described in this specification, the normal weighted mean can be calculated based on parameters A and B corresponding to each point in the first point cloud. in in It can represent the mean of parameter A; It can represent the mean of parameter B; A i Parameters A and B can be represented by the i-th point in the first point cloud. i p can represent the parameter B of the i-th point in the first point cloud;ni This can represent the number of points in the neighborhood set corresponding to the i-th point in the first point cloud. The equations of each line are corrected based on the normal weighted mean. Where p centre (x) can represent the x-coordinate of the center point in each neighborhood point set in a two-dimensional coordinate system; p centre (y) can represent the ordinate of the center point in each neighborhood point set in a two-dimensional coordinate system. The projection length of the neighborhood point set onto the corresponding fitted line can be calculated, yielding the length of the fitted line segment and the fitted line segment itself. The fitted line equations for each point in the second point cloud can also be calculated using the same method as for the points in the first point cloud.
[0085] To facilitate the determination of a specific boundary line of a parking space, the embodiment of this specification describes determining one of the plurality of boundary lines as the parking space baseline, which may specifically include:
[0086] Select the longest boundary line from the aforementioned boundary lines as the horizontal line segment;
[0087] The boundary lines that are parallel to the horizontal line segments among the plurality of boundary lines are taken as the horizontal line segment group;
[0088] Among the plurality of boundary lines, the boundary lines that are not parallel to the horizontal line segments are taken as the vertical line segment group;
[0089] Select one boundary line from the group of vertical line segments as the parking space reference line.
[0090] In this embodiment, the longest line segment among the fitted straight line segments can be used as the horizontal line segment, which can represent the boundary line. Each line segment is traversed sequentially, and fitted straight line segments parallel to the horizontal line segments are grouped as horizontal line segments; fitted straight line segments not parallel to the horizontal line segments are grouped as vertical line segments, meaning the line segments in the vertical line segments form an angle with the horizontal line segments. The longest or shortest line segment, or even any line segment, can be selected from the vertical line segments as the parking space baseline.
[0091] To improve the accuracy of parking space identification, the method described in this specification for determining the boundary line representing a parking space from a plurality of boundary lines may specifically include:
[0092] Based on the position of the parking space baseline, a first line segment that is adjacent to the parking space baseline and has overlapping projections is searched from the plurality of boundary lines; the first line segment represents the boundary line on the side of the parking space opposite to the parking space baseline.
[0093] Based on the positions of the aforementioned boundary lines, the position of the parking space baseline, and the position of the first line segment, determine the line segment corresponding to the adjacent boundary lines on both sides of the parking space baseline.
[0094] In this embodiment, based on the position of the parking space baseline, a search can be conducted to the left for the nearest line segment whose projection overlaps with the baseline in that direction, thus determining the overlapping position range of these two line segments. A set of line segments whose projection scales in the direction of the baseline fall within this position range is searched from the horizontal group. The line segments in this set are arranged in ascending order of projection scale, and the adjacent line segments after arrangement are used as the boundary lines on the other two sides of the same parking space. Alternatively, a search can be conducted to the right for the nearest line segment whose projection overlaps with the baseline in that direction, thus determining the boundary line on the right side belonging to the same parking space. The intersection points of the four line segments belonging to the same parking space are used as the four corner points of the parking space. Connecting the four corner points yields a parking space. After calculating one parking space, a line segment can be selected from the remaining line segments in the vertical line segment group according to the baseline selection rules to be used as the baseline for calculation. The remaining line segments are all line segments in the vertical line segment group other than those that have been calculated.
[0095] Figure 3 This is a schematic diagram illustrating a method for determining the boundary lines of the same parking space, as provided in an embodiment of this specification. Figure 3 As shown, where L v It can represent the baseline of a parking space; L h It can represent the horizontal line segment in a group of horizontal line segments; L left This can represent a search to the left of the parking space baseline for the closest line segment whose projection overlaps with the baseline in that direction; L right It can represent a search for the closest line segment that has a projection overlap with the baseline in the direction of the parking space, based on the location of the baseline.
[0096] Using the above method, the boundary lines belonging to the same parking space can be accurately determined, and then the four corner points of the parking space can be identified. A parking space can be obtained based on the four corner points, thus improving the accuracy of parking space identification.
[0097] Based on the same idea, embodiments of this specification also provide apparatus corresponding to the above methods. Figure 4 The embodiments provided in this specification correspond to Figure 2 A schematic diagram of the structure of a parking space identification device. Figure 4 As shown, the device may include:
[0098] Parking location cloud data set acquisition module 402 is used to acquire the parking location cloud data set to be identified;
[0099] Boundary line determination module 404 is used to determine several boundary lines representing parking spaces based on the location information of each point in the parking space cloud data set;
[0100] The parking space baseline determination module 406 is used to determine one of the several boundary lines as the parking space baseline.
[0101] The same parking space boundary line determination module 408 is used to determine the boundary line representing a parking space from a number of boundary lines based on the positional relationship between other boundary lines and the baseline.
[0102] The corner point determination module 410 is used to determine the four corner points representing a parking space based on the intersection of the boundary lines representing a parking space.
[0103] The parking space determination module 412 is used to determine a parking space based on the four corner points.
[0104] based on Figure 4 The embodiments of this specification also provide some specific implementation schemes of the method, which are described below.
[0105] Optionally, the boundary line determination module may specifically include:
[0106] The vector orientation acquisition unit is used to acquire the vector orientation of each point in the parking spot cloud data set.
[0107] The main orientation calculation unit is used to calculate the main orientation based on the vector orientation of each point; the main orientation represents the direction of the parking space boundary line.
[0108] The fitting line equation determination unit is used to determine the fitting line equation corresponding to each point cloud based on the main orientation and the position information of each point.
[0109] The straight line segment determination unit is used to fit each point cloud according to the fitted straight line equation to obtain the straight line segment of the corresponding point cloud; the straight line segment represents the boundary line of the parking space.
[0110] Optionally, the vector orientation acquisition unit can be specifically used for:
[0111] Based on the location information of each point, search the neighborhood point cloud within a preset radius of each point;
[0112] Based on the position information of each point in the neighborhood point cloud, calculate the covariance matrix corresponding to the neighborhood point cloud;
[0113] Calculate the feature vector of the neighborhood point cloud based on the covariance matrix;
[0114] The feature vector is determined as the vector orientation of the point in the neighborhood point cloud.
[0115] Optionally, the main orientation calculation unit can be specifically used for:
[0116] Calculate the angle between the vector orientation of each point and the positive direction of the vertical axis; the vertical axis is the vertical axis of the two-dimensional plane to which each point is projected.
[0117] Based on the included angle, each point is assigned to a corresponding cell; the cell is obtained by dividing a preset angle range into equal intervals.
[0118] Calculate the average of the vector orientations of all points in the first cell that contains the most points, and obtain the first primary orientation;
[0119] Select the second cell from all cells that contains the vector orientation with an angle greater than the first preset angle that is the largest number of points;
[0120] Calculate the average value of the vector orientation of each point in the second cell to obtain the second principal orientation.
[0121] Optionally, the unit for determining the fitted line equation may specifically include:
[0122] The first point cloud selection subunit is used to select a first point cloud whose angle with the main orientation is less than the second preset angle.
[0123] The projection scale determination subunit is used to determine the projection scale of each point based on the position information of each point in the first point cloud; the projection scale is calculated based on the two-dimensional coordinates and vector orientation of each point.
[0124] The first point set acquisition sub-unit is used to determine the points within a preset scale range based on the projection scale of each point, thereby obtaining the first point set;
[0125] The fitting results are used to obtain sub-units, which are then used to fit the first point set using the least squares method to obtain the fitting results.
[0126] The fitted linear equation determines the sub-unit, which is used to determine the corresponding fitted linear equation based on the fitting result.
[0127] Optionally, the fitted linear equation determines the sub-unit, which can be specifically used for:
[0128] Obtain the parameter information of the fitted line equation corresponding to each point;
[0129] The normal weighted mean is calculated based on the parameter information of the fitting equation corresponding to each point to obtain the correction parameters;
[0130] The correction parameters are used as parameters for the fitted line equations corresponding to each point to obtain the corrected fitted line equations.
[0131] Optionally, the parking space baseline determination module can be specifically used for:
[0132] Select the longest boundary line from the aforementioned boundary lines as the horizontal line segment;
[0133] The boundary lines that are parallel to the horizontal line segments among the plurality of boundary lines are taken as the horizontal line segment group;
[0134] Among the plurality of boundary lines, the boundary lines that are not parallel to the horizontal line segments are regarded as the vertical line segment group;
[0135] Select one boundary line from the group of vertical line segments as the parking space baseline.
[0136] Optionally, the module for determining the boundary line of the same parking space can be specifically used for:
[0137] Based on the position of the parking space baseline, a first line segment that is adjacent to the parking space baseline and has overlapping projections is searched from the plurality of boundary lines; the first line segment represents the boundary line on the side of the parking space opposite to the parking space baseline.
[0138] Based on the positions of the aforementioned boundary lines, the position of the parking space baseline, and the position of the first line segment, determine the line segment corresponding to the adjacent boundary lines on both sides of the parking space baseline.
[0139] Based on the same idea, this specification also provides devices corresponding to the above methods in its embodiments.
[0140] Figure 5 The embodiments provided in this specification correspond to Figure 2 A schematic diagram of the structure of a parking space recognition device. Figure 5 As shown, device 500 may include:
[0141] The system includes a memory 530, a processor 510, and a computer program 520 stored in the memory. The processor 510 executes the computer program 520 to implement the steps of the parking space identification method described in any of the above embodiments.
[0142] Based on the same approach, embodiments of this specification also provide computer-readable storage media corresponding to the above methods. The computer-readable storage medium stores a computer program or instructions that can be executed by a processor to implement the parking space identification method described in any of the above embodiments.
[0143] Based on the same approach, embodiments of this specification also provide computer program products corresponding to the above methods. The computer program product includes a computer program or instructions that, when executed by a processor, can implement the steps of the parking space identification method described in any of the above embodiments.
[0144] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on its differences from other embodiments. In particular, for... Figure 5 As the device shown is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0145] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0146] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0147] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0148] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.
[0149] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0150] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0151] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0152] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0153] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0154] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0155] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0156] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0157] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0158] This application can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0159] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for identifying parking spaces, characterized in that, include: Obtain the cloud data set of parking locations to be identified; Based on the location information of each point in the parking space cloud data set, several boundary lines representing parking spaces are determined; One of the aforementioned boundary lines is designated as the parking space baseline. Based on the location of the parking space baseline, find the adjacent side line segment that overlaps with it in the projection direction from all boundary lines, and combine the positional relationship between the opposite side line segment and the baseline to determine the boundary line representing a parking space from several boundary lines. Based on the intersection of the boundary lines representing a parking space, determine the four corner points representing a parking space; A parking space is determined based on the four corner points.
2. The method according to claim 1, characterized in that, The determination of several boundary lines representing parking spaces specifically includes: Obtain the vector orientation of each point in the parking spot cloud data set; The principal orientation is calculated based on the vector orientation of each point; the principal orientation represents the direction of the parking space boundary line. Based on the main orientation and the position information of each point, determine the fitted line equation corresponding to each point cloud; The point clouds are fitted according to the fitted straight line equation to obtain the straight line segments of the corresponding point clouds; the straight line segments represent the boundary lines of the parking spaces.
3. The method according to claim 2, characterized in that, The step of obtaining the vector orientation of each point in the parking spot cloud data set specifically includes: Based on the location information of each point, search the neighborhood point cloud within a preset radius of each point; Based on the position information of each point in the neighborhood point cloud, calculate the covariance matrix corresponding to the neighborhood point cloud; Calculate the feature vector of the neighborhood point cloud based on the covariance matrix; The feature vector is determined as the vector orientation of the point in the neighborhood point cloud.
4. The method according to claim 2, characterized in that, The calculation of the principal orientation based on the vector orientation of each point specifically includes: Calculate the angle between the vector orientation of each point and the positive direction of the vertical axis; the vertical axis is the vertical axis of the two-dimensional plane to which each point is projected. Based on the included angle, each point is assigned to a corresponding cell; the cell is obtained by dividing a preset angle range into equal intervals. Calculate the average of the vector orientations of all points in the first cell that contains the most points, and obtain the first primary orientation; Select the second cell from all cells that contains the vector orientation with an angle greater than the first preset angle that is the largest number of points; Calculate the average value of the vector orientation of each point in the second cell to obtain the second principal orientation.
5. The method according to claim 2, characterized in that, The step of calculating the fitted straight line equation based on the main orientation and the position information of each point specifically includes: Select a first point cloud whose angle with the main orientation is less than a second preset angle; Based on the position information of each point in the first point cloud, the projection scale of each point is determined; the projection scale is calculated based on the two-dimensional coordinates and vector orientation of each point. Based on the projection scale of each point, the points within the preset scale range are determined to obtain the first point set; The first point set is fitted using the least squares method to obtain the fitting result; Based on the fitting results, the corresponding fitted line equation is determined.
6. The method according to claim 5, characterized in that, The determination of the corresponding fitted line equation specifically includes: Obtain the parameter information of the fitting equation corresponding to each point; The normal weighted mean is calculated based on the parameter information of the fitting equation corresponding to each point to obtain the correction parameters; The correction parameters are used as parameters for the fitted line equations corresponding to each point to obtain the corrected fitted line equations.
7. The method according to claim 1, characterized in that, The step of determining one of the several boundary lines as the parking space baseline specifically includes: Select the longest boundary line from the aforementioned boundary lines as the horizontal line segment; The boundary lines that are parallel to the horizontal line segments among the plurality of boundary lines are taken as the horizontal line segment group; Among the plurality of boundary lines, the boundary lines that are not parallel to the horizontal line segments are taken as the vertical line segment group; Select one boundary line from the group of vertical line segments as the parking space reference line.
8. The method according to claim 1, characterized in that, The step of determining the boundary line representing a parking space from a plurality of boundary lines specifically includes: Based on the position of the parking space baseline, a first line segment that is adjacent to the parking space baseline and has overlapping projections is searched from the plurality of boundary lines; the first line segment represents the boundary line on the side of the parking space opposite to the parking space baseline. Based on the positions of the aforementioned boundary lines, the position of the parking space baseline, and the position of the first line segment, determine the line segment corresponding to the adjacent boundary lines on both sides of the parking space baseline.
9. A parking space identification device, characterized in that, include: The parking location cloud data set acquisition module is used to acquire the parking location cloud data set to be identified; The boundary line determination module is used to determine several boundary lines representing parking spaces based on the location information of each point in the parking space cloud data set. The parking space baseline determination module is used to determine one of the several boundary lines as the parking space baseline. The same parking space boundary line determination module is used to find the adjacent and overlapping opposite side line segments in the projection direction from all boundary lines based on the position of the parking space baseline, and determine the boundary line representing a parking space from several boundary lines by combining the positional relationship between the opposite side line segment and the baseline. The corner point determination module is used to determine the four corner points representing a parking space based on the intersection of the boundary lines representing a parking space. The parking space determination module is used to determine a parking space based on the four corner points.
10. A computer device, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 8.
11. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, The computer program or instructions may be executed by a processor to implement the parking space identification method according to any one of claims 1 to 8.
12. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 8.