Shared parking space management methods and systems
By capturing real-time images of the parking lot using cameras and processing the images, the problems of high difficulty and cost in deploying sensors were solved, enabling efficient parking space management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-25
- Publication Date
- 2026-04-03
AI Technical Summary
Existing shared parking space management solutions suffer from difficulties and high costs in deploying sensors.
A fixed camera is used to capture images of the parking lot in real time. Through image segmentation, grayscale processing, and feature vector construction, the parking space status difference is calculated to determine whether the parking space is occupied.
It reduces the difficulty and cost of sensor deployment, increases the management area, and provides a longer field of view.
Smart Images

Figure CN117058908B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of parking space management technology, and more specifically, to a shared parking space management method and system. Background Technology
[0002] Shared parking services have been implemented in many cities. Sensors are installed in each parking space to detect the presence of a vehicle. Currently used sensors include distance sensors and geomagnetic sensors. Distance sensors measure the distance to the vehicle, while geomagnetic sensors measure changes in the magnetic field around the parking space over time. However, this sensor-based monitoring system requires installing sensors in each space and transmitting the collected data back to a relay station via wired or wireless means. The data is then transmitted back to the control room, presenting deployment challenges and high costs. Summary of the Invention
[0003] The purpose of this invention is to provide a shared parking space management method and system, which solves the problems of high deployment difficulty and high cost of existing solutions for managing shared parking spaces through distance sensors and geomagnetic sensors.
[0004] The embodiments of the present invention are implemented through the following technical solution: a shared parking space management method, comprising the following steps:
[0005] S1. Use a fixed camera to capture images of the parking lot area in real time to obtain the current image of the parking lot;
[0006] S2. Segment the current image of the parking lot to obtain the image of each shared parking space area;
[0007] S3. Perform grayscale processing on the image of each shared parking space area to obtain a grayscale image;
[0008] S4. Construct the feature vector of the current parking space based on the grayscale image;
[0009] S5. Calculate the difference between the feature vector of the current parking space and the feature vector of the empty parking space, where the empty parking space is a parking space that is not occupied.
[0010] S6. When the difference is greater than the difference threshold, the current parking space is occupied; when the difference is less than or equal to the difference threshold, the current parking space is not occupied.
[0011] Furthermore, step S2 includes the following sub-steps:
[0012] S21. Use a camera to capture images of the parking lot when there are no vehicles, and obtain comparison images;
[0013] S22. Take the pixel position of the parking line on the comparison image as the parking line position;
[0014] S23. Based on the position of each parking space line, segment the current image of the parking lot to obtain the image of each shared parking space area.
[0015] Furthermore, the formula for grayscale processing in S3 is:
[0016]
[0017] Among them, P i Let R be the grayscale value of the i-th pixel in the grayscale image. i G represents the R channel value of the i-th pixel in the shared parking space area image. i Let G be the G channel value of the i-th pixel in the shared parking space area image, and B be the B channel value. i This represents the B channel value of the i-th pixel in the shared parking space area image.
[0018] Furthermore, step S4 includes the following sub-steps:
[0019] S41. Extract the outline pixels of the grayscale image;
[0020] S42. Calculate the grayscale distribution of contour pixels;
[0021] S43. Calculate the length of the contour formed by the contour pixels;
[0022] S44. Construct the feature vector of the current parking space by using grayscale distribution degree and contour length as elements.
[0023] Furthermore, in step S41, pixels on the grayscale image that satisfy the following conditions are considered contour pixels:
[0024]
[0025] Among them, P i Let P be the gray value of the i-th pixel in the grayscale image. i,j Let be the grayscale value of the j-th pixel within the neighborhood of the i-th pixel in the grayscale image, N be the number of pixels in the grayscale image, μ be the scaling factor, and || be the absolute value.
[0026] Furthermore, the formula for the grayscale distribution in S42 is:
[0027]
[0028]
[0029] Where f1 is the gray-level distribution in the current parking space feature vector, and P k Let θ be the gray value of the k-th contour pixel, K be the number of contour pixels, and θ be the distribution coefficient.
[0030] Furthermore, the formula for calculating the contour length in S43 is:
[0031]
[0032] Where f2 is the contour length in the feature vector of the current parking space, and x k Let y be the x-coordinate of the k-th contour pixel. k Let be the ordinate of the k-th contour pixel, and K be the number of contour pixels.
[0033] Furthermore, the formula for calculating the difference degree in S5 is:
[0034]
[0035] Where ap is the difference degree, f1 is the gray level distribution degree in the current parking space feature vector, f2 is the contour length in the current parking space feature vector, f′1 is the gray level distribution degree in the blank parking space feature vector, and f′2 is the contour length in the blank parking space feature vector.
[0036] A system for managing shared parking spaces includes: a fixed camera, a segmentation unit, a grayscale processing unit, a feature vector construction unit, a difference degree calculation unit, and a parking status monitoring unit;
[0037] The fixed camera is used to capture images of the parking lot area in real time to obtain the current image of the parking lot.
[0038] The segmentation unit is used to segment the current image of the parking lot to obtain an image of each shared parking space area;
[0039] The grayscale processing unit is used to perform grayscale processing on the image of each shared parking space area to obtain a grayscale image;
[0040] The feature vector construction unit is used to construct the feature vector of the current parking space based on the grayscale image;
[0041] The difference degree calculation unit is used to calculate the difference degree between the feature vector of the current parking space and the feature vector of the empty parking space, where the empty parking space is a parking space that is not occupied.
[0042] The parking status monitoring unit is used to determine whether the current parking space is occupied when the difference is greater than the difference threshold, and whether the current parking space is not occupied when the difference is less than or equal to the difference threshold.
[0043] The technical solution of this invention has at least the following advantages and beneficial effects: In this invention, a fixed camera is used to capture images of the parking lot area in real time to obtain the current image of the parking lot. The current image of the parking lot is segmented to obtain the image of each shared parking space area. The image of each shared parking space area is processed in grayscale to facilitate the extraction of the feature vector of the current parking space. By comparing the difference between the feature vector of the current parking space and the feature vector of the empty parking space, the parking status of the parking space can be determined based on the difference. Unlike distance sensors and geomagnetic sensors, this invention does not require setting up a camera under each parking space and has a longer field of view. One camera can manage a larger area, reducing deployment difficulty and cost. Attached Figure Description
[0044] Figure 1 This is a flowchart of a shared parking space management method. Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0046] like Figure 1 As shown, a shared parking space management method includes the following steps:
[0047] S1. Use a fixed camera to capture images of the parking lot area in real time to obtain the current image of the parking lot;
[0048] S2. Segment the current image of the parking lot to obtain the image of each shared parking space area;
[0049] S2 includes the following steps:
[0050] S21. Use a camera to capture images of the parking lot when there are no vehicles, and obtain comparison images;
[0051] S22. Take the pixel position of the parking line on the comparison image as the parking line position;
[0052] S23. Based on the position of each parking space line, segment the current image of the parking lot to obtain the image of each shared parking space area.
[0053] S3. Perform grayscale processing on the image of each shared parking space area to obtain a grayscale image;
[0054] The formula for grayscale processing in S3 is:
[0055]
[0056] Among them, P i Let R be the grayscale value of the i-th pixel in the grayscale image. i G represents the R channel value of the i-th pixel in the shared parking space area image. i Let G be the G channel value of the i-th pixel in the shared parking space area image, and B be the B channel value. i This represents the B channel value of the i-th pixel in the shared parking space area image.
[0057] S4. Construct the feature vector of the current parking space based on the grayscale image;
[0058] S4 includes the following sub-steps:
[0059] S41. Extract the outline pixels of the grayscale image;
[0060] In S41, pixels on the grayscale image that meet the following conditions are considered contour pixels:
[0061]
[0062] Among them, P i Let P be the gray value of the i-th pixel in the grayscale image. i,j Let be the grayscale value of the j-th pixel within the neighborhood of the i-th pixel in the grayscale image, N be the number of pixels in the grayscale image, μ be the scaling factor, and || be the absolute value.
[0063] S42. Calculate the grayscale distribution of contour pixels;
[0064] The formula for grayscale distribution in S42 is:
[0065]
[0066]
[0067] Where f1 is the gray-level distribution in the current parking space feature vector, and P k Let θ be the gray value of the k-th contour pixel, K be the number of contour pixels, and θ be the distribution coefficient.
[0068] S43. Calculate the length of the contour formed by the contour pixels;
[0069] The formula for calculating the contour length in S43 is as follows:
[0070]
[0071] Where f2 is the contour length in the feature vector of the current parking space, and x k Let y be the x-coordinate of the k-th contour pixel. kLet be the ordinate of the k-th contour pixel, and K be the number of contour pixels.
[0072] S44. Construct the feature vector of the current parking space by using grayscale distribution degree and contour length as elements.
[0073] S5. Calculate the difference between the feature vector of the current parking space and the feature vector of the empty parking space, where the empty parking space is a parking space that is not occupied.
[0074] In this invention, the process of obtaining the feature vector of a blank parking space is the same as that of obtaining the feature vector of the current parking space. The difference is that the feature vector of a blank parking space is obtained from the image of an unoccupied parking space, while the feature vector of the current parking space is the current real-time image.
[0075] The formula for calculating the difference degree in S5 is as follows:
[0076]
[0077] Where ap is the difference degree, f1 is the gray level distribution degree in the current parking space feature vector, f2 is the contour length in the current parking space feature vector, f′1 is the gray level distribution degree in the blank parking space feature vector, and f′2 is the contour length in the blank parking space feature vector.
[0078] S6. When the difference is greater than the difference threshold, the current parking space is occupied; when the difference is less than or equal to the difference threshold, the current parking space is not occupied.
[0079] A system for managing shared parking spaces includes: a fixed camera, a segmentation unit, a grayscale processing unit, a feature vector construction unit, a difference degree calculation unit, and a parking status monitoring unit;
[0080] The fixed camera is used to capture images of the parking lot area in real time to obtain the current image of the parking lot.
[0081] The segmentation unit is used to segment the current image of the parking lot to obtain an image of each shared parking space area;
[0082] The grayscale processing unit is used to perform grayscale processing on the image of each shared parking space area to obtain a grayscale image;
[0083] The feature vector construction unit is used to construct the feature vector of the current parking space based on the grayscale image;
[0084] The difference degree calculation unit is used to calculate the difference degree between the feature vector of the current parking space and the feature vector of the empty parking space, where the empty parking space is a parking space that is not occupied.
[0085] The parking status monitoring unit is used to determine whether the current parking space is occupied when the difference is greater than the difference threshold, and whether the current parking space is not occupied when the difference is less than or equal to the difference threshold.
[0086] This invention uses a fixed camera to capture images of the parking lot area in real time, obtaining the current image of the parking lot. The current image of the parking lot is then segmented to obtain images of each shared parking space area. Each shared parking space area image is then processed in grayscale to facilitate the extraction of the current parking space feature vector. By comparing the difference between the current parking space feature vector and the feature vector of an empty parking space, the parking status of the space can be determined based on the difference. Unlike distance sensors and geomagnetic sensors, this invention does not require installation at each parking space and has a longer field of view. One camera can manage a larger area, reducing deployment difficulty and cost.
[0087] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A shared parking space management method, characterized in that, Includes the following steps: S1. Use a fixed camera to capture images of the parking lot area in real time to obtain the current image of the parking lot; S2. Segment the current image of the parking lot to obtain the image of each shared parking space area; S3. Perform grayscale processing on the image of each shared parking space area to obtain a grayscale image; S4. Construct the feature vector of the current parking space based on the grayscale image; S5. Calculate the difference between the feature vector of the current parking space and the feature vector of the empty parking space, where the empty parking space is a parking space that is not occupied. S6. When the difference degree is greater than the difference threshold, the current parking space is already occupied; when the difference degree is less than or equal to the difference threshold, the current parking space is not occupied. S4 includes the following sub-steps: S41. Extract the contour pixels of the grayscale image; pixels in the grayscale image that meet the following conditions are considered contour pixels: in, The first grayscale image The grayscale value of each pixel The first grayscale image Within the neighborhood of the nth pixel The grayscale value of each pixel This represents the number of pixels in the grayscale image. || is the proportionality coefficient, and || is the absolute value; S42. Calculate the grayscale distribution of the contour pixels; as shown in the following formula: in, This represents the grayscale distribution level in the feature vector of the current parking space. For the first The grayscale value of each contour pixel. The number of outline pixels. The distribution coefficient; S43. Calculate the length of the contour formed by the contour pixels; as shown in the following formula: in, The length of the contour in the feature vector of the current parking space. For the first The x-coordinate of each contour pixel. For the first The ordinate of each contour pixel. The number of outline pixels; S44. Construct the feature vector of the current parking space by using the gray level distribution and the contour length as elements; The formula for calculating the difference degree in S5 is as follows: in, For the degree of difference, This represents the grayscale distribution level in the feature vector of the current parking space. The length of the contour in the feature vector of the current parking space. The grayscale distribution in the feature vector of an empty parking space. The length of the contour in the feature vector of the empty parking space.
2. The shared parking space management method according to claim 1, characterized in that, S2 includes the following steps: S21. Use a camera to capture images of the parking lot when there are no vehicles, and obtain comparison images; S22. Take the pixel position of the parking line on the comparison image as the parking line position; S23. Based on the position of each parking space line, segment the current image of the parking lot to obtain the image of each shared parking space area.
3. The shared parking space management method according to claim 1, characterized in that, The formula for grayscale processing in S3 is: in, The first grayscale image The grayscale value of each pixel For the shared parking space area image, the first The R channel value of each pixel For the shared parking space area image, the first The G channel value of each pixel For the shared parking space area image, the first The B channel value of each pixel.
4. A system for a shared parking space management method according to any one of claims 1 to 3, characterized in that, include: Fixed camera, segmentation unit, grayscale processing unit, feature vector construction unit, difference degree calculation unit, and parking status monitoring unit; The fixed camera is used to capture images of the parking lot area in real time to obtain the current image of the parking lot. The segmentation unit is used to segment the current image of the parking lot to obtain an image of each shared parking space area; The grayscale processing unit is used to perform grayscale processing on the image of each shared parking space area to obtain a grayscale image; The feature vector construction unit is used to construct the feature vector of the current parking space based on the grayscale image; The difference degree calculation unit is used to calculate the difference degree between the feature vector of the current parking space and the feature vector of the empty parking space, where the empty parking space is a parking space that is not occupied. The parking status monitoring unit is used to determine whether the current parking space is occupied when the difference is greater than the difference threshold, and whether the current parking space is not occupied when the difference is less than or equal to the difference threshold.
Citation Information
Patent Citations
Detection method and detection system for vacant parking space
CN108346313A