Roadside parking vehicle counting method based on position information
By using the GNSS receiver and camera on the patrol vehicle, generating the shooting trigger area and automatically taking pictures, the problems of vehicle information identification time in the prior art are solved, and accurate counting and information correspondence of vehicles in roadside berths are achieved.
Patent Information
- Application Number
- CN202411475790.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-03-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
After obtaining roadside berthing pictures through vehicle-side cameras, it is difficult to process and identify vehicle and license plate information in real time, resulting in too long generation time and it is difficult to accurately select the front and rear pictures of the same roadside berthing for splicing.
Real-time location information is obtained by installing a GNSS receiver on the inspection vehicle, generating shooting trigger areas, and automatically taking pictures in these areas to store pictures. Then, identify the license plate and vehicle information, send the picture to the backend platform for splicing and merging, and accurately obtain the number of vehicles on the roadside parking lot.
实现了对路侧泊位内车辆的精准拍摄和信息识别,确保车辆信息与路侧泊位一一对应,提高了收费效率和准确性,降低了边缘计算设备的负担。
Smart Images

Figure CN119649637A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of vehicle counting, and in particular to a method for counting roadside parking space vehicles based on position information. Background Art
[0002] Roadside parking is an open parking lot that can make full and effective use of urban infrastructure, which is of great significance for alleviating urban parking pressure; it is also convenient for vehicles to enter and reduce walking distance, which is an important advantage for many drivers. In order to improve charging efficiency and reduce costs, there is now a method of installing on-board cameras on patrol vehicles to obtain roadside parking space images and identify vehicle and license plate information;
[0003] However, accurately identifying vehicle information and matching it with roadside parking space information is the basis for correct charging. After obtaining roadside parking space images through on-board cameras, if you choose to process the video stream frame by frame, the computing power overhead is too large and the hardware performance requirements are high. The edge computing equipment on the inspection vehicle is usually difficult to process and recognize images in real time, and the generation time of vehicle and license plate recognition results is too long. In order to reduce the burden on edge computing equipment and increase processing speed, it is necessary to select key frames in the video stream for processing, but it is difficult to select suitable key frames relying solely on image recognition.
[0004] At the same time, in order to fully preserve parking evidence and avoid charging disputes, the image of a roadside parking space needs to be stitched together from two pictures at the front and rear of the vehicle. It is necessary to select pictures of the same roadside parking space from multiple recognized images for stitching, but it is difficult to accurately select the two corresponding pictures of the same roadside parking space by processing the video stream frame by frame. Even if the front parking space picture of the same vehicle is selected, it is impossible to know the roadside parking space where the vehicle is parked, and it is difficult to match the vehicle information with the roadside parking space one by one. Summary of the invention
[0005] The object of the present invention is to provide a method for counting vehicles in roadside parking spaces based on location information to solve the problems raised in the above-mentioned background technology.
[0006] To achieve the above object, the present invention provides the following technical solutions:
[0007] A method for counting roadside parking spaces based on location information comprises the following steps:
[0008] S1. Obtaining the location information of the inspection vehicle: Install a GNSS receiver on the inspection vehicle as a navigation device to obtain the real-time location information of the inspection vehicle;
[0009] S2. Recording of roadside berth position information: defining a number of consecutive roadside berths as an inspection section, and recording the position information of each roadside berth in the inspection section, including the starting roadside berth and the ending roadside berth;
[0010] S3, trigger area generation: by using a camera fixedly installed on the inspection vehicle, trigger areas of the inspection section are generated in batches, starting from the starting roadside parking space within the inspection section and ending at the ending roadside parking space;
[0011] S4, photo storage in the trigger area: When the inspection vehicle is moving along the inspection section, the location information of the inspection vehicle is obtained in real time through the navigation device, and the edge computing device is used to determine whether the current location is within a certain trigger area; if it is within the trigger area, the vehicle automatically takes photos and stores the image information;
[0012] S5, license plate and vehicle information recognition: process the stored images to recognize license plates and vehicle information;
[0013] S6. Image stitching and merging: All images with license plate and vehicle information are sent to the roadside parking control platform in the background, and all received images are continuously traversed; if two images are taken of the same roadside parking space, and the images taken are of the front and rear of the vehicle respectively, the two images are stitched and merged and stored in the roadside parking control platform, so as to accurately obtain the number of vehicles in the roadside parking lot.
[0014] As a further solution of the present invention: in the step S2, the two long marking lines in the roadside berth are respectively recorded as LM1 and LM2, and the two short marking lines are respectively recorded as SM1 and SM2; the long marking line close to the shoulder is defined as LM1, and the long marking line away from the shoulder is defined as LM2; the short marking line that the inspection vehicle passes first during normal driving is defined as SM1, and the short marking line that the inspection vehicle passes later is defined as SM2; the intersection of LM2 and SM1 is defined as SP, and the intersection of LM2 and SM2 is defined as EP.
[0015] As a further solution of the present invention: in the step S2, the method for recording the position information of each roadside parking space in the inspection section is as follows:
[0016] S21. Define a unique number Num for each roadside parking space in the inspection section i , i = 1, 2…, n, where the number of the starting roadside berth is Num S The number of the terminating roadside berth is Num E ;
[0017] S22. Determine the relationship between roadside parking spaces within a road section. The specific method is as follows:
[0018] When the inspection vehicle passes a roadside parking space normally, the first position passed is defined as the head, and the second position passed is defined as the tail. S and terminate roadside berth Num EAny roadside berth other than Num i Two adjacent roadside berths are recorded as the first roadside berth number Num i-1 The number of the berth on the roadside i+1 ;
[0019] S23, then measure and record the position information of each roadside berth in the inspection section by the theodolite, that is, the longitude and latitude of the SP point and EP point of each roadside berth.
[0020] As a further solution of the present invention: in the step S3, the method for batch generating the triggering areas of the inspection sections is as follows:
[0021] S31, determining whether the roadside parking space to be processed is a termination roadside parking space; if it is not a termination roadside parking space, generating a set of triggering areas at the SP point of the current roadside parking space; if it is a termination roadside parking space, generating a set of triggering areas at the SP point and the EP point of the current roadside parking space respectively;
[0022] S32, calculating the slope and corresponding angle of the current roadside berth according to the longitude and latitude of the current roadside berth point SP and EP;
[0023] S33, defining the trigger area as a rectangle, and one side of the rectangular trigger area is parallel to the long marking line LM2 of the current roadside parking space; according to the slope and corresponding angle of the current roadside parking space, and according to the different positions of the front and rear of the vehicle, generating independent vehicle head trigger areas and parking space trigger areas respectively, and calculating the longitude and latitude of the four corner points of each trigger area;
[0024] S34, record the generated rectangular trigger area information, and store the area information in a list every time a trigger area is generated.
[0025] As a further solution of the present invention: in the step S32, the calculation formula of the roadside berth slope SL and the corresponding angle α is as follows:
[0026]
[0027] In the above formula (1), Lon S is the longitude of the roadside berth SP point, Lat S Lon is the latitude of the roadside berth SP point; E is the longitude of the roadside berth EP point, Lat E It is the latitude of the roadside berth EP point.
[0028] As a further solution of the present invention: in the step S33, the longitude and latitude of the four corner points of the vehicle head triggering area at the roadside parking space SP point are calculated as follows:
[0029] The four corner points of the vehicle head trigger area at the roadside parking point SP are marked as a, b, c and d, and arranged clockwise, where the bc side is on the same straight line as LM2; the bc side length of the trigger area is marked as L, the ab side length is marked as H, and the offset of the center of the trigger area relative to the roadside parking point SP is (Lon B ,Lat B ), the longitude and latitude of points a, b, c and d are calculated as follows:
[0030]
[0031] Similarly, the methods for generating the vehicle rear trigger area at the roadside parking space SP point and the vehicle front and rear shooting trigger areas at the roadside parking space EP point are the same as the above method.
[0032] As a further solution of the present invention: in the step S34, the area information stored in the list includes:
[0033] 1) Location information of the trigger area, i.e. the longitude and latitude of points a, b, c and d;
[0034] 2) Whether the current trigger area is used to capture the front or rear of the vehicle;
[0035] 3) The roadside parking lot number Mum of the roadside parking lot photographed in the current trigger area C , where the roadside parking space number Mum is determined C The rules are as follows:
[0036] If the current trigger area is Num i The vehicle head trigger area at the SP point of the roadside parking space, then Mum C Num i ;
[0037] If the current trigger area is Num i The rear trigger area at the SP point of the roadside parking space is C Num i-1 ;
[0038] If the current trigger area is Num i The rear trigger area at the EP point of the roadside parking space is C Num i ;
[0039] If the current trigger area is Num S The rear trigger area at the roadside parking SP point, or Num E The vehicle head trigger area at the roadside parking EP point, then Mum C Recorded as NULL.
[0040] As a further solution of the present invention: in the step S4, storing the picture information includes:
[0041] 1) The image and the time and location where it was taken;
[0042] 2) The roadside parking space number of the roadside parking space captured in the image;
[0043] 3) Is the current picture taken the front part or the rear part of the car?
[0044] Compared with the prior art, the present invention has the following beneficial effects:
[0045] The present invention generates a shooting trigger area according to the position information of the roadside parking space, accurately shoots the front part and the rear part of the vehicle in the roadside parking space, and after identifying the license plate and vehicle information, the shot pictures are spliced and merged to make the vehicle information correspond to the roadside parking space one by one, thereby accurately obtaining the number of vehicles in the roadside parking lot and providing effective proof for the collection of parking fees. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A schematic diagram of a process for counting roadside parking spaces based on location information;
[0047] Figure 2 A schematic diagram of an inspection section, a roadside parking space and a triggering area in a method for counting roadside parking spaces based on location information;
[0048] Figure 3 A schematic diagram of capturing and stitching images in a method for counting roadside parking spaces based on location information. DETAILED DESCRIPTION
[0049] In an embodiment of the present invention, a method for counting roadside parking spaces based on location information is provided. Figure 1 As shown, the following steps are included:
[0050] S1. Obtaining the location information of the inspection vehicle: Install a GNSS receiver on the inspection vehicle as a navigation device to obtain the real-time location information of the inspection vehicle;
[0051] S2. Roadside parking space location information record: Figure 2As shown in the figure, several consecutive roadside parking spaces are defined as an inspection section; since the roadside parking space is rectangular and consists of two long sides and two short sides, the two long marking lines in the roadside parking space are respectively recorded as LM1 and LM2, and the two short marking lines are respectively recorded as SM1 and SM2; according to the principle of right-hand traffic for motor vehicles, the long marking line close to the shoulder is defined as LM1, and the long marking line far from the shoulder is defined as LM2; the short marking line that the inspection vehicle passes first during normal driving is defined as SM1, and the short marking line that the inspection vehicle passes later is defined as SM2; the intersection of LM2 and SM1 is defined as SP, and the intersection of LM2 and SM2 is defined as EP;
[0052] Record the location information of each roadside parking space in the inspection section, including the starting roadside parking space and the ending roadside parking space. The specific recording method is as follows:
[0053] S21. Define a unique number Num for each roadside parking space in the inspection section i , i = 1, 2…, n, where the number of the starting roadside berth is Num S The number of the terminating roadside berth is Num E ;
[0054] S22. Determine the relationship between roadside parking spaces within a road section. The specific method is as follows:
[0055] When the inspection vehicle passes a roadside parking space normally, the first position passed is defined as the head, and the second position passed is defined as the tail. S and terminate roadside berth Num E Any roadside berth other than Num i Two adjacent roadside berths are recorded as the first roadside berth number Num i-1 The number of the berth on the roadside i+1 ;
[0056] S23, measuring and recording the position information of each roadside berth in the inspection section by the theodolite, that is, the longitude and latitude of the SP point and EP point of each roadside berth;
[0057] S3, trigger area generation: Figure 2 As shown in the figure, when the angle of the camera installed on the inspection vehicle is fixed, there is an area where the vehicles parked in the roadside parking spaces can be clearly and completely photographed. This area is defined as the trigger area. When the inspection vehicle enters the trigger area, it automatically takes photos. Since the size specifications of the roadside parking spaces in an inspection section are the same, the trigger areas of the inspection section are generated in batches by fixing the camera installed on the inspection vehicle, starting from the starting roadside parking space in the inspection section and ending at the ending roadside parking space. The specific generation method is as follows:
[0058] S31, determining whether the roadside parking space to be processed is a termination roadside parking space; if it is not a termination roadside parking space, generating a set of triggering areas at the SP point of the current roadside parking space; if it is a termination roadside parking space, generating a set of triggering areas at the SP point and the EP point of the current roadside parking space respectively;
[0059] S32. Calculate the slope and the corresponding angle of the current roadside berth according to the longitude and latitude of the SP point and the EP point in the current roadside berth. The calculation formula of the roadside berth slope SL and the corresponding angle α is as follows:
[0060]
[0061] In the above formula (1), Lon S is the longitude of SP point, Lat S is the latitude of SP point; Lon E is the longitude of EP point, Lat E is the latitude of the EP point;
[0062] S33. In order to make the shooting result more accurate, the trigger area is defined as a rectangle, and one side of the rectangular trigger area is parallel to the long mark line LM2 of the current roadside parking space; according to the slope and corresponding angle of the current roadside parking space, and based on the different positions of the shooting front and rear of the vehicle, independent vehicle head trigger areas and parking space trigger areas are generated respectively, and the longitude and latitude of the four corner points of each trigger area are calculated; wherein, the longitude and latitude of the four corner points of the vehicle head trigger area at the roadside parking space SP point are calculated as follows:
[0063] The four corner points of the vehicle head trigger area at the roadside parking point SP are marked as a, b, c and d, and arranged clockwise, where the bc side is on the same straight line as LM2; the bc side length of the trigger area is marked as L, the ab side length is marked as H, and the offset of the center of the trigger area relative to the roadside parking point SP is (Lon B ,Lat B ), the longitude and latitude of points a, b, c and d are calculated as follows:
[0064]
[0065] Similarly, the generation method of the rear trigger area at the SP point and the front and rear shooting trigger areas at the EP point are the same as the above method;
[0066] S34, record the generated rectangular trigger area information, and store the area information in a list for each generated trigger area; the area information stored in the list specifically includes:
[0067] 1) Location information of the trigger area, i.e. the longitude and latitude of points a, b, c and d;
[0068] 2) Whether the current trigger area is used to capture the front or rear of the vehicle;
[0069] 3) The roadside parking lot number Mum of the roadside parking lot photographed in the current trigger area C , where the roadside parking space number Mum is determined C The rules are as follows:
[0070] If the current trigger area is Num i The vehicle head trigger area at the SP point of the roadside parking space, then Mum C Num i ;
[0071] If the current trigger area is Num i The rear trigger area at the SP point of the roadside parking space is C Num -1 ;
[0072] If the current trigger area is Num i The rear trigger area at the EP point of the roadside parking space is C Num i ;
[0073] If the current trigger area is Num S The rear trigger area at the roadside parking SP point, or Num E The vehicle head trigger area at the roadside parking EP point, then Mum C Recorded as NULL
[0074] S4. Photographing and storing in the triggering area: When the inspection vehicle is traveling along the inspection section, the location information of the inspection vehicle is obtained in real time through the navigation device, and the edge computing device is used to determine whether the current location is within a certain triggering area; if it is within the triggering area, the inspection vehicle automatically takes photos and stores the image information; the stored image information specifically includes:
[0075] 1) The image and the time and location where it was taken;
[0076] 2) The roadside parking space number of the roadside parking space captured in the image;
[0077] 3) Is the current picture taken the front part or the rear part of the vehicle?
[0078] S5, license plate and vehicle information recognition: process the stored images to recognize license plates and vehicle information;
[0079] S6, picture stitching and merging: Figure 3As shown in the figure (in order to protect privacy and prevent information leakage, the license plate part in the picture is coded), all pictures with identified license plates and vehicle information are sent to the roadside parking control platform in the background, and all received pictures are continuously traversed; if there are two pictures taken of the same roadside parking space, and the pictures taken are the front part and the rear part of the vehicle respectively, the two pictures are spliced and merged and then stored in the roadside parking control platform, so as to accurately obtain the number of vehicles in the roadside parking lot.
[0080] What is described above is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for counting roadside parking spaces based on location information, characterized in that: The following steps are involved: S1. Obtaining the location information of the inspection vehicle: Install a GNSS receiver on the inspection vehicle as a navigation device to obtain the real-time location information of the inspection vehicle; S2. Recording of roadside berth position information: defining a number of consecutive roadside berths as an inspection section, and recording the position information of each roadside berth in the inspection section, including the starting roadside berth and the ending roadside berth; S3, trigger area generation: by using a camera fixedly installed on the inspection vehicle, trigger areas of the inspection section are generated in batches, starting from the starting roadside parking space within the inspection section and ending at the ending roadside parking space; S4, photo storage of the trigger area: When the inspection vehicle moves along the inspection section, the location information of the inspection vehicle is obtained in real time through the navigation device, and the edge computing device is used to determine whether the current location is within a certain trigger area; If it is in the trigger area, it will automatically take a photo and store the image information; S5, license plate and vehicle information recognition: process the stored images to recognize license plates and vehicle information; S6. Image stitching and merging: All images with license plate and vehicle information are sent to the roadside parking control platform in the background, and all received images are continuously traversed; if two images are taken of the same roadside parking space, and the images taken are of the front and rear of the vehicle respectively, the two images are stitched and merged and stored in the roadside parking control platform, so as to accurately obtain the number of vehicles in the roadside parking lot.
2. A method for counting roadside parking spaces based on location information according to claim 1, characterized in that: In the step S2, the two long marking lines in the roadside parking space are respectively recorded as LM1 and LM2, and the two short marking lines are respectively recorded as SM1 and SM2; the long marking line close to the shoulder is defined as LM1, and the long marking line far from the shoulder is defined as LM2; the short marking line that the inspection vehicle passes first during normal driving is defined as SM1, and the short marking line that the inspection vehicle passes later is defined as SM2; the intersection of LM2 and SM1 is defined as SP, and the intersection of LM2 and SM2 is defined as EP.
3. A method for counting roadside parking spaces based on location information according to claim 1, characterized in that: In the step S2, the method for recording the location information of each roadside parking space in the inspection section is as follows: S21. Define a unique number Num for each roadside parking space in the inspection section i , i = 1, 2…, n, where the number of the starting roadside berth is Num S The number of the terminating roadside berth is Num E ; S22. Determine the relationship between roadside parking spaces within a road section. The specific method is as follows: When the inspection vehicle passes a roadside parking space normally, the first position passed is defined as the head, and the second position passed is defined as the tail. S and terminate roadside berth Num E Any roadside berth other than Num i Two adjacent roadside berths are recorded as the first roadside berth number Num i-1 The number of the berth on the roadside i+1 ; S23, then measure and record the position information of each roadside berth in the inspection section by the theodolite, that is, the longitude and latitude of the SP point and EP point of each roadside berth.
4. A method for counting roadside parking spaces based on location information according to claim 1, characterized in that: In the step S3, the method for batch generating triggering areas of inspection sections is as follows: S31, determining whether the roadside parking space to be processed is a termination roadside parking space; if it is not a termination roadside parking space, generating a set of triggering areas at the SP point of the current roadside parking space; if it is a termination roadside parking space, generating a set of triggering areas at the SP point and the EP point of the current roadside parking space respectively; S32, calculating the slope and corresponding angle of the current roadside berth according to the longitude and latitude of the current roadside berth point SP and EP; S33, defining the trigger area as a rectangle, and one side of the rectangular trigger area is parallel to the long marking line LM2 of the current roadside parking space; according to the slope and corresponding angle of the current roadside parking space, and according to the different positions of the front and rear of the vehicle, generating independent vehicle head trigger areas and parking space trigger areas respectively, and calculating the longitude and latitude of the four corner points of each trigger area; S34, record the generated rectangular trigger area information, and store the area information in a list every time a trigger area is generated.
5. A method for counting roadside parking spaces based on location information according to claim 4, characterized in that: In the step S32, the calculation formula of the roadside parking space slope SL and the corresponding angle α is as follows: In the above formula (1), Lon S is the longitude of the roadside berth SP point, Lat S Lon is the latitude of the roadside berth SP point; E is the longitude of the roadside berth EP point, Lat E It is the latitude of the roadside berth EP point.
6. A method for counting roadside parking spaces based on location information according to claim 4, characterized in that: In the step S33, the longitude and latitude of the four corner points of the vehicle head triggering area at the roadside parking space SP point are calculated as follows: The four corner points of the vehicle head trigger area at the roadside parking point SP are marked as a, b, c and d, and arranged clockwise, where the bc side is on the same straight line as LM2; the bc side length of the trigger area is marked as L, the ab side length is marked as H, and the offset of the center of the trigger area relative to the roadside parking point SP is (Lon B ,Lat B ), the longitude and latitude of points a, b, c and d are calculated as follows: Similarly, the methods for generating the vehicle rear trigger area at the roadside parking space SP point and the vehicle front and rear shooting trigger areas at the roadside parking space EP point are the same as the above method.
7. A method for counting roadside parking spaces based on location information according to claim 4, characterized in that: In the step S34, the area information stored in the list includes: 1) Location information of the trigger area, i.e. the longitude and latitude of points a, b, c and d; 2) Whether the current trigger area is used to capture the front or rear of the vehicle; 3) The roadside parking lot number Mum of the roadside parking lot photographed in the current trigger area C , where the roadside parking space number Mum is determined C The rules are as follows: If the current trigger area is Num i The vehicle head trigger area at the SP point of the roadside parking space, then Mum C Num i ; If the current trigger area is Num i The rear trigger area at the roadside parking SP point, then Mum C Num i-1 ; If the current trigger area is Num i The rear trigger area at the EP point of the roadside parking space is C Num i ; If the current trigger area is Num S The rear trigger area at the SP point of the roadside parking space, or Num E The vehicle head trigger area at the roadside parking EP point, then Mum C Recorded as NULL.
8. The method for counting roadside parking spaces based on location information according to claim 1, wherein in step S34, In the step S4, storing the picture information includes: 1) The image and the time and location where it was taken; 2) The roadside parking space number of the roadside parking space captured in the image; 3) Is the current picture taken the front part or the rear part of the car?