A method for underground parking space batch identification and measurement based on laser radar technology
Patent Information
- Application Number
- CN202410049334.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-12
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2044-01-12
AI Technical Summary
Existing technologies struggle to efficiently identify and measure underground parking spaces, especially in poor lighting conditions and when batch measurements are required, leading to high labor and time costs and difficulty in controlling data quality.
Point cloud data is acquired using LiDAR technology. Through preprocessing, grid indexing and corner extraction, the corner coordinates of underground parking spaces are identified. The least squares method and HSV color space are used to extract and distinguish parking space lines, thus achieving batch parking space recognition.
It reduces labor and time costs, improves the accuracy of parking space recognition, and can identify a large number of parking spaces simultaneously, meeting the accuracy requirements of planning condition verification measurement.
Smart Images

Figure CN118038664B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of parking space recognition technology, and in particular to a method for batch recognition and measurement of underground parking spaces based on lidar technology. Background Technology
[0002] In planning condition verification surveying, measuring the dimensions of parking spaces is one of the most important tasks. Its purpose is to verify whether the dimensions, number, and location of parking spaces on site meet the requirements of the building permit, avoiding economic disputes and protecting the legitimate rights and interests of all parties. In recent years, with the increasing demand for assisted driving and automatic parking algorithms, parking line recognition, as one of the most fundamental aspects, has been extensively studied. However, unlike the parking line recognition task in intelligent driving, the measurement of underground parking lines in planning condition verification surveying has its own unique characteristics. First, underground parking garages in the completion stage are not yet in use, and typically have poor lighting conditions and dusty surfaces, which poses a challenge for parking line recognition. Second, planning condition verification surveying usually requires measuring thousands of parking spaces, while conventional parking line recognition only requires one or a few surrounding spaces, necessitating a parking line recognition algorithm capable of batch recognition. Finally, planning condition verification surveying demands higher accuracy in the dimensions and location of parking lines.
[0003] Currently, the traditional method for measuring underground parking spaces involves manually measuring and recording each space using measuring tapes, laser rangefinders, etc. This method is labor-intensive and time-consuming, and the data quality relies entirely on on-site personnel, making it difficult to control. Existing parking space line recognition algorithms are mainly based on image data and are designed for individual parking spaces, making them unsuitable for verifying and measuring large numbers of underground parking spaces. Summary of the Invention
[0004] The technical problem to be solved by the embodiments of the present invention is to provide a method for batch identification and measurement of underground parking spaces based on lidar technology. The method identifies parking space lines based on point cloud data, extracts the corner coordinates of parking spaces and determines the target parking space, and can identify a large number of parking spaces at the same time, reducing labor and time costs and improving the accuracy of parking space identification.
[0005] To address the aforementioned technical problems, in a first aspect, embodiments of the present invention provide a method for batch identification and measurement of underground parking spaces based on lidar technology, comprising:
[0006] Acquire point cloud data of a specified area; wherein, the point cloud data is collected by lidar;
[0007] The point cloud data is preprocessed to obtain the point cloud data of ground points;
[0008] A grid index is constructed based on the point cloud data of the ground points to obtain the orthophoto of the specified area.
[0009] Corner point extraction is performed on the orthophoto to obtain the corner point grid of the target parking space;
[0010] The point cloud is discriminated within the neighborhood of the corner grid to obtain the final corner coordinates of the target parking space, and the target parking space is determined based on the corner coordinates.
[0011] Furthermore, the preprocessing of the point cloud data to obtain ground point point cloud data includes:
[0012] Fit point cloud data within a preset range into a plane;
[0013] The plane equation of the plane is calculated using the least squares method;
[0014] The normal vector of the point cloud data is calculated based on the plane equation.
[0015] The point cloud data of ground points is filtered out using the normal vector.
[0016] Furthermore, if the point cloud data includes RGB values, then constructing a grid index based on the point cloud data of the ground points to obtain the orthophoto of the specified area includes:
[0017] The point cloud data of all the aforementioned ground points is divided into a square grid;
[0018] When the grid contains point cloud data, calculate the average RGB value of all point cloud data in each grid, and use the average RGB value as the RGB value of the grid.
[0019] When the grid does not contain point cloud data, morphological closing operations are used to assign values to the grid;
[0020] The orthophoto of the specified region is obtained based on the assigned grid.
[0021] Furthermore, the step of extracting corner points from the orthophoto to obtain the corner grid of the target parking space includes:
[0022] Convert the orthophoto image from RGB color space to HSV color space;
[0023] The orthophoto image is binarized according to the HSV color space;
[0024] The Canny edge detection algorithm is used to extract edges from the binarized orthophoto to obtain an edge image.
[0025] Line segments are extracted from the edge image, and the straight line containing the edge of the parking space line is obtained by fitting using the least squares method;
[0026] The connected domains of the parking spaces divided by the straight lines are obtained using a region growing algorithm.
[0027] The corner grid of the connected domain of the parking space is extracted using a corner detector.
[0028] Furthermore, obtaining the connected regions of the parking spaces divided by the straight lines using the region growing algorithm includes:
[0029] The connected regions divided by the straight line are obtained using a region growing algorithm;
[0030] Calculate the difference between the area of the connected region and the preset parking space area. If the difference is within the preset difference threshold range, determine the connected region as a parking space connected region.
[0031] Furthermore, the step of discriminating the point cloud within the neighborhood of the corner grid to obtain the final corner coordinates of the target parking space, and determining the target parking space based on the corner coordinates, includes:
[0032] The point cloud is divided into parking line point cloud and non-parking line point cloud by using HSV color features.
[0033] Traverse the non-parking space line point cloud and count the number of parking space line point clouds within a preset neighborhood of each non-parking space line point cloud, using this as the statistical quantity of each non-parking space line point cloud.
[0034] The true corner coordinates of the parking space are determined based on the statistical measures.
[0035] Calculate the average coordinates of the actual corner points to obtain the coordinates of the center point of the target parking space;
[0036] The target parking space is determined based on the actual corner coordinates and the center point coordinates.
[0037] Furthermore, after determining the target parking space based on the corner coordinates, the method further includes:
[0038] The dimensions of the target parking space are calculated based on the corner coordinates.
[0039] To address the aforementioned technical problems, in a second aspect, embodiments of the present invention provide a device for batch identification and measurement of underground parking spaces based on lidar technology, comprising:
[0040] The data acquisition module is used to acquire point cloud data of a specified area; wherein, the point cloud data is collected by lidar.
[0041] The data preprocessing module is used to preprocess the point cloud data to obtain point cloud data of ground points;
[0042] The grid construction module is used to construct a grid index based on the point cloud data of the ground points to obtain the orthophoto of the specified area.
[0043] The corner extraction module is used to extract corners from the orthophoto to obtain the corner grid of the target parking space;
[0044] The parking space recognition module is used to identify the point cloud within the neighborhood of the corner grid, obtain the final corner coordinates of the target parking space, and determine the target parking space based on the corner coordinates.
[0045] To address the aforementioned technical problems, in a third aspect, embodiments of the present invention provide an electronic device, comprising:
[0046] Memory, used to store computer programs;
[0047] A processor for executing the computer program;
[0048] Wherein, when the processor executes the computer program, it implements the method for batch identification and measurement of underground parking spaces based on lidar technology as described in any of the first aspects above.
[0049] To address the aforementioned technical problems, in a fourth aspect, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when executed, implements the method for batch identification and measurement of underground parking spaces based on lidar technology as described in any of the first aspects.
[0050] Compared with existing technologies, the method for batch identification and measurement of underground parking spaces based on lidar technology provided in this invention has the following advantages: by collecting point cloud data of the underground parking garage, preprocessing the point cloud data to obtain point cloud data of ground points, constructing a grid index, extracting corner points to obtain the corner coordinates of the target parking space, and determining the target parking space, a large number of parking spaces can be identified at the same time, reducing labor and time costs and improving the accuracy of parking space identification. Attached Figure Description
[0051] To more clearly illustrate the technical features of the embodiments of the present invention, the drawings used in the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0052] Figure 1 This is a flowchart illustrating an embodiment of a method for batch identification and measurement of underground parking spaces based on lidar technology provided by the present invention.
[0053] Figure 2This is a schematic diagram of an embodiment of an underground parking space batch identification and measurement device based on lidar technology provided by the present invention;
[0054] Figure 3 This is a schematic diagram of the structure of one embodiment of an electronic device provided by the present invention. Detailed Implementation
[0055] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0056] In a first aspect, embodiments of the present invention provide a method for batch identification and measurement of underground parking spaces based on lidar technology, see [link to relevant documentation]. Figure 1 This is a flowchart illustrating an embodiment of a method for batch identification and measurement of underground parking spaces based on lidar technology provided by the present invention.
[0057] like Figure 1 As shown, the method includes the following steps:
[0058] S1: Acquire point cloud data of a specified area; wherein, the point cloud data is collected by lidar;
[0059] S2: Preprocess the point cloud data to obtain point cloud data of ground points;
[0060] S3: Construct a grid index based on the point cloud data of the ground points to obtain the orthophoto of the specified area;
[0061] S4: Extract corner points from the orthophoto image to obtain the corner point grid of the target parking space;
[0062] S5: Discriminate the point cloud within the neighborhood of the corner grid to obtain the final corner coordinates of the target parking space, and determine the target parking space based on the corner coordinates.
[0063] In specific implementation, three-dimensional spatial data is collected from the basement to obtain point cloud data. Point cloud data is a massive set of points that represent the spatial distribution of a target object under the same spatial reference frame. The three-dimensional spatial information corresponding to each point cloud data is the position information of the object in space. The acquisition device for collecting point cloud data can be a laser measurement principle or a photogrammetry principle-based acquisition device. This invention uses a Leica BLK2GO handheld real-view scanner and maintains a walking speed of 2 meters per second for acquisition. The specific acquisition device and acquisition speed are not specifically limited here.
[0064] After obtaining the point cloud data of the underground parking garage, the point cloud data is preprocessed to filter out the point cloud data of ground points. A grid index is constructed based on the point cloud data of ground points to obtain the orthophoto of the underground parking garage. Corner points are extracted from the orthophoto to obtain the corner grid of the target parking space. Then, the point cloud is discriminated within the neighborhood of the corner grid to obtain the final corner coordinates of the target parking space. The target parking space is determined based on the corner coordinates.
[0065] In summary, this invention collects point cloud data from underground parking lots, preprocesses the point cloud data to obtain ground point point cloud data, constructs a grid index, extracts corner points to obtain the corner coordinates of the target parking space, and determines the target parking space. It can identify a large number of parking spaces simultaneously, reducing labor and time costs and improving the accuracy of parking space identification.
[0066] In one optional implementation, the preprocessing of the point cloud data to obtain ground point point cloud data includes:
[0067] Fit point cloud data within a preset range into a plane;
[0068] The plane equation of the plane is calculated using the least squares method;
[0069] The normal vector of the point cloud data is calculated based on the plane equation.
[0070] The point cloud data of ground points is filtered out using the normal vector.
[0071] Specifically, the acquired point cloud data of the underground parking garage, including ground point cloud data and non-ground point cloud data, can be distinguished using plane normal vectors. For each point in the point cloud data, all point cloud data within a preset range are fitted to a plane. For example, the preset range can be 5cm. The plane equation of the fitted plane is calculated using the least squares method. The normal vector of the point cloud data is obtained based on the plane equation. The normal vector of ground point cloud data has a larger component in the z-axis direction. A z-axis component threshold is set. If the z-axis component of the normal vector of the point cloud is greater than or equal to the preset z-axis component threshold, the point cloud data can be determined to be ground point cloud data. All ground point cloud data can be filtered out using this method.
[0072] In one optional implementation, the point cloud data includes RGB values. Then, constructing a grid index based on the point cloud data of the ground points to obtain the orthophoto of the specified area includes:
[0073] The point cloud data of all the aforementioned ground points is divided into a square grid;
[0074] When the grid contains point cloud data, calculate the average RGB value of all point cloud data in each grid, and use the average RGB value as the RGB value of the grid.
[0075] When the grid does not contain point cloud data, morphological closing operations are used to assign values to the grid;
[0076] The orthophoto of the specified region is obtained based on the assigned grid.
[0077] Specifically, the point cloud data of all selected ground points is reorganized using a spatial grid index. This maintains the high accuracy of the original point cloud data while facilitating convenient and fast spatial querying and searching. The point cloud data of all ground points is divided into square grids. The side length of the square is set according to the average point spacing of the point cloud data, and is generally set to be slightly larger than the average point spacing to ensure that each grid does not contain too much or too little point cloud data. An example grid side length can be set to 2cm, but no specific limitation is made here.
[0078] In point cloud data, each point has a corresponding RGB color value. When the grid contains point cloud data, the RGB mean of all point cloud data in the grid is calculated and assigned to that grid as its RGB value. When the grid does not contain point cloud data, morphological closing operations are used to process the empty grid. Morphological closing is a morphological operation that performs dilation followed by erosion on the image, which can remove small noise in the image. The empty grid is then assigned the nearest neighbor pixel value through the closing operation. The orthophoto of the ground is obtained from the grid after the assignment. The formula for the nearest neighbor pixel value is as follows:
[0079]
[0080] Where Value(x,y) is the value of the pixel located at row y and column x, n is the number of point clouds falling within the pixel, and p i Points in a point cloud that fall within pixels.
[0081] In one optional implementation, the corner point extraction of the orthophoto image to obtain the corner point grid of the target parking space includes:
[0082] Convert the orthophoto image from RGB color space to HSV color space;
[0083] The orthophoto image is binarized according to the HSV color space;
[0084] The Canny edge detection algorithm is used to extract edges from the binarized orthophoto to obtain an edge image.
[0085] Line segments are extracted from the edge image, and the straight line containing the edge of the parking space line is obtained by fitting using the least squares method;
[0086] The connected domains of the parking spaces divided by the straight lines are obtained using a region growing algorithm.
[0087] The corner grid of the connected domain of the parking space is extracted using a corner detector.
[0088] Specifically, after obtaining the orthophoto of the parking garage, the RGB color space of the orthophoto is converted to the HSV color space. According to the HSV color table, the image is binarized for parking lines of a specified color. For example, the yellow parking lines are binarized with a hue value of 30 and a tolerance of 5. The Canny edge detection algorithm is used to extract edges from the binarized orthophoto. Since the parking space edges are relatively simple, the default parameters can be used for extraction. The resulting edge image is then extracted using a random Hough transform. Line segments are extracted from the extracted edge image. To prevent missed extractions, a small algorithm threshold is used, such as 100. The search radius is 1 and the search angle is 1°. Based on the positional relationship of the endpoints of each line segment, the least squares method is used to fit and obtain the straight line containing the edge of the parking line. The connected regions of the parking spaces divided by the straight line are obtained through a region growing algorithm, and the corner grid is extracted using a corner detector.
[0089] In one optional implementation, obtaining the connected regions of the parking spaces divided by the straight lines using a region growing algorithm includes:
[0090] The connected regions divided by the straight line are obtained using a region growing algorithm;
[0091] Calculate the difference between the area of the connected region and the preset parking space area. If the difference is within the preset difference threshold range, determine the connected region as a parking space connected region.
[0092] Specifically, the connected regions divided by the straight lines are obtained through a region growing algorithm. The difference between the area of the connected regions and the preset parking space area is calculated. If the difference is within the preset difference threshold range, the connected regions are determined to be parking space connected regions. For example, if the design size of the parking space is 5.3×2.4m and the width of the parking space line is 15cm, then the design area of the parking space is 262,500 pixels. The difference threshold can be set to 1,250 pixels. When the difference between the area of the connected regions and the preset parking space area is less than the difference threshold, the connected regions are determined to be parking space connected regions.
[0093] In one optional implementation, the step of discriminating the point cloud within the corner grid neighborhood to obtain the final corner coordinates of the target parking space, and determining the target parking space based on the corner coordinates, includes:
[0094] The point cloud is divided into parking line point cloud and non-parking line point cloud by using HSV color features.
[0095] Traverse the non-parking space line point cloud and count the number of parking space line point clouds within a preset neighborhood of each non-parking space line point cloud, using this as the statistical quantity of each non-parking space line point cloud.
[0096] The true corner coordinates of the parking space are determined based on the statistical measures.
[0097] Calculate the average coordinates of the actual corner points to obtain the coordinates of the center point of the target parking space;
[0098] The target parking space is determined based on the actual corner coordinates and the center point coordinates.
[0099] Specifically, for each extracted corner grid, the point cloud within its neighborhood is obtained through grid indexing. For example, all point clouds within a square area centered on the corner pixel with a side length of 7 are obtained. Since the corner grid is already near the actual corner, the point cloud only contains parking space line points and non-parking space line points within the parking space. Based on HSV color features, the point cloud is divided into parking space line points and non-parking space line points. For each non-parking space line point, the number of parking space line points within its specified neighborhood is counted, and this is used as the statistical value of that non-parking space line point. Based on the properties of the corner points within the parking space contour, the non-parking space point cloud with the largest statistical value is the point cloud closest to the actual corner point position, and this is determined as the actual corner point. The average coordinates of the four corner points of the parking space are calculated as the center point coordinates. The target parking space can be determined based on the corner point coordinates and the center point coordinates.
[0100] In one optional implementation, after determining the target parking space based on the corner coordinates, the method further includes:
[0101] The dimensions of the target parking space are calculated based on the corner coordinates.
[0102] Specifically, the coordinates of the center point are calculated based on the coordinates of the corner points. The angle between the vector formed by the center point and each corner point and the due north direction is calculated. The corner points are sorted according to the size of the angle. The four corner points are connected in sequence to obtain the target parking space. The distance between the corner points is calculated to obtain the size of the target parking space. If the outer contour size is required, the width of the parking space line can be added to correct the result.
[0103] Secondly, embodiments of the present invention provide a device for batch identification and measurement of underground parking spaces based on lidar technology, see [link to related document]. Figure 2 This is a schematic diagram of an embodiment of an underground parking space batch identification and measurement device based on lidar technology provided by the present invention.
[0104] like Figure 2 As shown, the device includes:
[0105] The data acquisition module 21 is used to acquire point cloud data of a specified area; wherein the point cloud data is collected by lidar.
[0106] Data preprocessing module 22 is used to preprocess the point cloud data to obtain point cloud data of ground points;
[0107] Grid construction module 23 is used to construct a grid index based on the point cloud data of the ground points to obtain the orthophoto of the specified area;
[0108] Corner extraction module 24 is used to extract corners from the orthophoto to obtain the corner grid of the target parking space;
[0109] The parking space recognition module 25 is used to identify the point cloud within the neighborhood of the corner grid, obtain the final corner coordinates of the target parking space, and determine the target parking space based on the corner coordinates.
[0110] In one optional implementation, the preprocessing of the point cloud data to obtain ground point point cloud data includes:
[0111] Fit point cloud data within a preset range into a plane;
[0112] The plane equation of the plane is calculated using the least squares method;
[0113] The normal vector of the point cloud data is calculated based on the plane equation.
[0114] The point cloud data of ground points is filtered out using the normal vector.
[0115] In one optional implementation, the point cloud data includes RGB values. Then, constructing a grid index based on the point cloud data of the ground points to obtain the orthophoto of the specified area includes:
[0116] The point cloud data of all the aforementioned ground points is divided into a square grid;
[0117] When the grid contains point cloud data, calculate the average RGB value of all point cloud data in each grid, and use the average RGB value as the RGB value of the grid.
[0118] When the grid does not contain point cloud data, morphological closing operations are used to assign values to the grid;
[0119] The orthophoto of the specified region is obtained based on the assigned grid.
[0120] In one optional implementation, the corner point extraction of the orthophoto image to obtain the corner point grid of the target parking space includes:
[0121] Convert the orthophoto image from RGB color space to HSV color space;
[0122] The orthophoto image is binarized according to the HSV color space;
[0123] The Canny edge detection algorithm is used to extract edges from the binarized orthophoto to obtain an edge image.
[0124] Line segments are extracted from the edge image, and the straight line containing the edge of the parking space line is obtained by fitting using the least squares method;
[0125] The connected domains of the parking spaces divided by the straight lines are obtained using a region growing algorithm.
[0126] The corner grid of the connected domain of the parking space is extracted using a corner detector.
[0127] In one optional implementation, obtaining the connected regions of the parking spaces divided by the straight lines using a region growing algorithm includes:
[0128] The connected regions divided by the straight line are obtained using a region growing algorithm;
[0129] Calculate the difference between the area of the connected region and the preset parking space area. If the difference is within the preset difference threshold range, determine the connected region as a parking space connected region.
[0130] In one optional implementation, the step of discriminating the point cloud within the corner grid neighborhood to obtain the final corner coordinates of the target parking space, and determining the target parking space based on the corner coordinates, includes:
[0131] The point cloud is divided into parking line point cloud and non-parking line point cloud by using HSV color features.
[0132] Traverse the non-parking space line point cloud and count the number of parking space line point clouds within a preset neighborhood of each non-parking space line point cloud, using this as the statistical quantity of each non-parking space line point cloud.
[0133] The true corner coordinates of the parking space are determined based on the statistical measures.
[0134] Calculate the average coordinates of the actual corner points to obtain the coordinates of the center point of the target parking space;
[0135] The target parking space is determined based on the actual corner coordinates and the center point coordinates.
[0136] In one optional implementation, after determining the target parking space based on the corner coordinates, the method further includes:
[0137] The dimensions of the target parking space are calculated based on the corner coordinates.
[0138] It should be noted that the underground parking space batch identification and measurement device based on lidar technology provided in this embodiment of the invention can realize all the processes of the underground parking space batch identification and measurement method based on lidar technology described in any of the above embodiments. The functions and technical effects of each module and unit in the device are the same as the functions and technical effects of the underground parking space batch identification and measurement method based on lidar technology described in the above embodiments, and will not be repeated here.
[0139] Thirdly, embodiments of the present invention provide an electronic device, see [link to previous document]. Figure 3 The diagram shown is a structural schematic of an electronic device provided in an embodiment of the present invention.
[0140] like Figure 3 As shown, the device includes:
[0141] Memory 31 is used to store computer programs;
[0142] Processor 32 is used to execute the computer program;
[0143] When the processor 32 executes the computer program, it implements the method for batch identification and measurement of underground parking spaces based on lidar technology as described in any of the above embodiments.
[0144] For example, the computer program may be divided into one or more modules / units, which are stored in the memory 31 and executed by the processor 32 to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device.
[0145] The processor 32 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0146] The memory 31 can be used to store the computer programs and / or modules. The processor 32 implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory 31 and calling the data stored in the memory 31. The memory 31 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 31 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital card (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0147] It should be noted that the aforementioned electronic devices include, but are not limited to, processors and memory, as will be understood by those skilled in the art. Figure 3 The structural diagram is merely an example of the electronic device described above and does not constitute a limitation on the electronic device. It may include more components than shown in the diagram, or combine certain components, or use different components.
[0148] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed, implements the method for batch identification and measurement of underground parking spaces based on lidar technology described in any of the above embodiments.
[0149] It should be understood that the present invention can implement all or part of the processes in the above-described method for batch identification and measurement of underground parking spaces based on lidar technology, or it can be accomplished by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program can implement the steps of the above-described method for batch identification and measurement of underground parking spaces based on lidar technology. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content contained in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0150] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. It should be noted that, for those skilled in the art, several equivalent obvious modifications and / or equivalent substitutions can be made without departing from the technical principles of the present invention, and these obvious modifications and / or equivalent substitutions should also be considered within the scope of protection of the present invention.
Claims
1. A method for batch identification and measurement of underground parking spaces based on lidar technology, characterized in that, include: Acquire point cloud data of a specified area; wherein, the point cloud data is collected by lidar; The point cloud data is preprocessed to obtain the point cloud data of ground points; A grid index is constructed based on the point cloud data of the ground points to obtain the orthophoto of the specified area. Corner point extraction is performed on the orthophoto to obtain the corner point grid of the target parking space; The point cloud is discriminated within the neighborhood of the corner grid to obtain the final corner coordinates of the target parking space, and the target parking space is determined based on the corner coordinates. The step of discriminating the point cloud within the neighborhood of the corner grid to obtain the final corner coordinates of the target parking space, and determining the target parking space based on the corner coordinates, includes: The point cloud is divided into parking line point cloud and non-parking line point cloud by using HSV color features. Traverse the non-parking space line point cloud and count the number of parking space line point clouds within a preset neighborhood of each non-parking space line point cloud, using this as the statistical quantity of each non-parking space line point cloud. The true corner coordinates of the parking space are determined based on the statistical measures. Calculate the average coordinates of the actual corner points to obtain the coordinates of the center point of the target parking space; The target parking space is determined based on the actual corner coordinates and the center point coordinates.
2. The method for batch identification and measurement of underground parking spaces based on lidar technology as described in claim 1, characterized in that, The preprocessing of the point cloud data to obtain ground point point data includes: Fit point cloud data within a preset range into a plane; The plane equation of the plane is calculated using the least squares method; The normal vector of the point cloud data is calculated based on the plane equation. The point cloud data of ground points is filtered out using the normal vector.
3. The method for batch identification and measurement of underground parking spaces based on lidar technology as described in claim 1, characterized in that, The point cloud data includes RGB values. Therefore, constructing a grid index based on the point cloud data of the ground points to obtain the orthophoto of the specified area includes: The point cloud data of all the aforementioned ground points is divided into a square grid; When the grid contains point cloud data, calculate the average RGB value of all point cloud data in each grid, and use the average RGB value as the RGB value of the grid. When the grid does not contain point cloud data, morphological closing operations are used to assign values to the grid; The orthophoto of the specified region is obtained based on the assigned grid.
4. The method for batch identification and measurement of underground parking spaces based on lidar technology as described in claim 1, characterized in that, The step of extracting corner points from the orthophoto to obtain the corner grid of the target parking space includes: Convert the orthophoto image from RGB color space to HSV color space; The orthophoto image is binarized according to the HSV color space; The Canny edge detection algorithm is used to extract edges from the binarized orthophoto to obtain an edge image. Line segments are extracted from the edge image, and the straight line containing the edge of the parking space line is obtained by fitting using the least squares method; The connected domains of the parking spaces divided by the straight lines are obtained using a region growing algorithm. The corner grid of the connected domain of the parking space is extracted using a corner detector.
5. The method for batch identification and measurement of underground parking spaces based on lidar technology as described in claim 4, characterized in that, The step of obtaining the connected regions of the parking spaces divided by the straight lines using a region growing algorithm includes: The connected regions divided by the straight line are obtained using a region growing algorithm; Calculate the difference between the area of the connected region and the preset parking space area. If the difference is within the preset difference threshold range, determine the connected region as a parking space connected region.
6. The method for batch identification and measurement of underground parking spaces based on lidar technology as described in claim 1, characterized in that, After determining the target parking space based on the corner coordinates, the method further includes: The dimensions of the target parking space are calculated based on the corner coordinates.
7. A device for batch identification and measurement of underground parking spaces based on lidar technology, characterized in that, include: The data acquisition module is used to acquire point cloud data of a specified area; wherein, the point cloud data is collected by lidar. The data preprocessing module is used to preprocess the point cloud data to obtain point cloud data of ground points; The grid construction module is used to construct a grid index based on the point cloud data of the ground points to obtain the orthophoto of the specified area. The corner extraction module is used to extract corners from the orthophoto to obtain the corner grid of the target parking space; The parking space recognition module is used to identify the point cloud within the neighborhood of the corner grid, obtain the final corner coordinates of the target parking space, and determine the target parking space based on the corner coordinates. The step of discriminating the point cloud within the neighborhood of the corner grid to obtain the final corner coordinates of the target parking space, and determining the target parking space based on the corner coordinates, includes: The point cloud is divided into parking line point cloud and non-parking line point cloud by using HSV color features. Traverse the non-parking space line point cloud and count the number of parking space line point clouds within a preset neighborhood of each non-parking space line point cloud, using this as the statistical quantity of each non-parking space line point cloud. The true corner coordinates of the parking space are determined based on the statistical measures. Calculate the average coordinates of the actual corner points to obtain the coordinates of the center point of the target parking space; The target parking space is determined based on the actual corner coordinates and the center point coordinates.
8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program; Wherein, when the processor executes the computer program, it implements the method for batch identification and measurement of underground parking spaces based on lidar technology as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, implements the method for batch identification and measurement of underground parking spaces based on lidar technology as described in any one of claims 1 to 6.
