Method, system and equipment for rapidly obtaining road stake number based on machine vision technology and storage medium
Obtaining road pile numbers through machine vision technology solves the high cost problem of obtaining the correspondence between road pile numbers and GNSS positioning information in the existing technology, achieving fast and accurate pile numbers, saving costs and improving the overall level of road management .
Patent Information
- Application Number
- CN202411278769.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2025-01-14
AI Technical Summary
The prior art is difficult to quickly and accurately obtain the correspondence between road pile numbers and GNSS positioning information, resulting in staff needing to drive vehicles to walk on the spot, resulting in high-cost operations.
Using a method based on machine vision technology, by setting the starting point and end point of the road, obtaining the path-planned waypoint array, performing interpolation processing and distance accumulation calculation, naming and inference and saving according to the road pile encoding rules, and using the Selenium component to obtain the waypoint array to enhance suitability and reliability.
It realizes rapid and accurate acquisition of road pile numbers, saves fuel, manpower and time costs, improves the accuracy and speed of pile numbers acquisition, ensures the standardization and consistency of pile numbers, and provides road management and services. Unified information.
Smart Images

Figure CN119314037A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of traffic data processing, and in particular to a method, system, device and storage medium for quickly acquiring road stake numbers based on machine vision technology. Background Art
[0002] Information systems involving traffic roads usually need to use the pile numbers on each road to mark positioning information, and each pile number is coded at intervals of 100 meters. The pile numbers have been planned when the road is designed. In addition to positioning, the functions of the pile numbers include navigation, engineering construction, maintenance, and emergency rescue. The standards involved are: "GB / T917-2017 Highway Route Marking Rules and National Highway Numbering". Road pile numbers are usually only open to people in the industry, and even only the relevant operations and maintenance personnel of the corresponding road sections know them. Modern information systems usually require a quick positioning of Beidou / GPS / GLONASS and pile numbers. How to quickly obtain accurate road pile numbers is a very difficult thing. If non-professionals need to quickly establish the corresponding relationship between GNSS positioning information and pile numbers, the usual practice is to drive the vehicle directly to run the road section, record the GNSS positioning information at each 100-meter pile number, and establish a one-to-one corresponding record data. The cost is very huge: including fuel costs, labor costs, time costs, etc. Summary of the invention
[0003] The present invention provides a method, system, device and storage medium for quickly acquiring road pile numbers based on machine vision technology, which can avoid the high-cost operation of workers driving vehicles on the road sections to obtain the corresponding relationship between pile numbers and GNSS positioning information, greatly saving fuel costs, labor costs and time costs. The specific technical solution is as follows:
[0004] A method for quickly acquiring road stake numbers based on machine vision technology comprises the following steps:
[0005] Set the road for which the stake number needs to be obtained, set the starting point and the end point of the road, and the stake number of the starting point is known;
[0006] Get the discrete waypoint array of the path planning from the starting point to the end point; when the discrete waypoint array of the path planning from the starting point to the end point cannot be obtained, get the waypoint array through the Selenium component;
[0007] Interpolate the obtained waypoint array so that each point in the array is on the curve of path planning;
[0008] The distance accumulation calculation is performed by increasing the array subscript;
[0009] When the cumulative distance is ≥100m, the naming is inferred and saved according to the road post coding rules.
[0010] Preferably, the method of obtaining the waypoint array through the Selenium component comprises the following steps:
[0011] Select a map vendor, visit the map vendor page, and check whether it is the first time to visit the map vendor;
[0012] If you have visited the map manufacturer, obtain the calibrated page zoom ratio and take a screenshot in split screen;
[0013] Use SIFT feature matching algorithm to stitch the captured screenshots; perform path planning on the stitched images, and peel off the path planning curve according to the HSV of the path planning
[0014] Binarize the path planning curve to obtain the skeleton of the path planning curve;
[0015] Calculate the scale based on the actual starting point positioning coordinates, the actual end point positioning coordinates, the starting point coordinates of the curve on the image, and the end point coordinates of the curve on the image;
[0016] Stepless amplification of the curve;
[0017] The curve image is gridded and encoded according to the coordinate points, with the upper left corner of the image as the origin;
[0018] According to the coordinate encoding, GNSS coordinates are bound to each pixel;
[0019] Generates an array of discrete waypoint data and the corresponding GNSS positioning array.
[0020] Preferably, the path planning curve is binarized, and after the skeleton of the path planning curve is obtained, the path planning skeleton is vectorized.
[0021] Preferably, after binding the GNSS coordinates to each pixel according to the coordinate encoding, spline interpolation is performed on the path planning curve.
[0022] Preferably, when checking whether it is the first time to visit the map vendor, if the map vendor has not been visited before, the page zoom ratio of the map vendor is obtained.
[0023] Preferably, when checking whether it is the first time to visit the map vendor, if the map vendor has not been visited before, obtaining the page zoom ratio of the map vendor includes the following steps:
[0024] Query based on the start and end points in the calibration information;
[0025] Automatically scale the calculation based on the path segment size in the calibration information;
[0026] Simulate the input of starting point and end point data to query the path planning;
[0027] Automatically scale the layer so that the marked road segment fills the entire page;
[0028] Save the zoom ratio parameters corresponding to the map manufacturer.
[0029] A system for quickly acquiring road stake numbers based on machine vision technology comprises a first calculation module for setting a road for which a stake number needs to be acquired, and setting a starting point and an end point of the road, wherein the stake number of the starting point is known;
[0030] The second calculation module is used to obtain a discrete waypoint array of the path planning from the starting point to the end point; when the discrete waypoint array of the path planning from the starting point to the end point cannot be obtained, the waypoint array is obtained through the Selenium component;
[0031] The third calculation module is used to interpolate the acquired waypoint array so that each point in the array is on the curve of the path planning;
[0032] A fourth calculation module, used for performing distance accumulation calculation by increasing the array subscript;
[0033] The fifth calculation module is used to perform naming inference and save according to the road post coding rules when the cumulative distance is ≥100m.
[0034] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following steps:
[0035] Set the road for which the stake number needs to be obtained, set the starting point and the end point of the road, and the stake number of the starting point is known;
[0036] Get the discrete waypoint array of the path planning from the starting point to the end point; when the discrete waypoint array of the path planning from the starting point to the end point cannot be obtained, get the waypoint array through the Selenium component;
[0037] Interpolate the obtained waypoint array so that each point in the array is on the curve of path planning;
[0038] The distance accumulation calculation is performed by increasing the array subscript;
[0039] When the cumulative distance is ≥100m, the naming is inferred and saved according to the road stake coding rules.
[0040] A computer-readable storage medium stores a computer program, which, when executed by a processor, causes the processor to perform the following steps:
[0041] Set the road for which the stake number needs to be obtained, set the starting point and the end point of the road, and the stake number of the starting point is known;
[0042] Get the discrete waypoint array of the path planning from the starting point to the end point; when the discrete waypoint array of the path planning from the starting point to the end point cannot be obtained, get the waypoint array through the Selenium component;
[0043] Interpolate the obtained waypoint array so that each point in the array is on the curve of path planning;
[0044] The distance accumulation calculation is performed by increasing the array subscript;
[0045] When the cumulative distance is ≥100m, the naming is inferred and saved according to the road post coding rules.
[0046] Compared with the prior art, the present invention has the following beneficial effects:
[0047] The present invention sets the starting point and end point of the road, obtains the waypoint array by path planning, and then combines the interpolation processing and distance accumulation calculation to accurately and efficiently obtain the road pile number, thereby improving the accuracy and speed of pile number acquisition. Furthermore, in the case where the path planning waypoint array cannot be directly obtained, the Selenium component is used to obtain it, which enhances the applicability and reliability of the method and is not limited by the difficulty of data acquisition. Finally, the naming is inferred and saved according to the road pile coding rules, which ensures the standardization and consistency of the pile number naming, and provides accurate and unified pile number information for subsequent road management, navigation, engineering construction, maintenance and emergency rescue applications, which helps to improve the overall level of road traffic management and services. It avoids the high-cost operation of staff driving vehicles to traverse road sections to obtain the correspondence between pile numbers and GNSS positioning information, greatly saving fuel costs, labor costs and time costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for the specific embodiments or the description of the prior art. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn according to the actual scale.
[0049] Figure 1 It is a system principle diagram of the present invention. DETAILED DESCRIPTION
[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0051] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0052] It should also be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0053] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0054] Example 1
[0055] A method for quickly acquiring road stake numbers based on machine vision technology comprises the following steps:
[0056] Set the road for which the stake number needs to be obtained, set the starting point and the end point of the road, and the stake number of the starting point is known;
[0057] Get the discrete waypoint array of the path planning from the starting point to the end point; when the discrete waypoint array of the path planning from the starting point to the end point cannot be obtained, get the waypoint array through the Selenium component;
[0058] Interpolate the obtained waypoint array with a density of 0.1m based on the actual distance, so that every point in the array is on the curve of the path planning;
[0059] The distance is accumulated by increasing the array index; recursion is performed according to the starting pile number, and the inferred pile number data is recorded;
[0060] When the cumulative distance is ≥100m, the naming is inferred and saved according to the road stake coding rules. Take the coordinate point obtained when the cumulative distance is 100m as the starting point (PointStart), repeatedly use the array subscript increment method to calculate the cumulative distance, and name it according to the road stake coding rules, and the stake number on the entire road can be inferred. When using this method to infer the stake number, the maximum deviation is ≤4 meters and the minimum deviation is ≤0.8 meters. Taking a section of 18 kilometers as an example, the cost obtained is 1 / 20 of the traditional cost. Taking a section of 132 kilometers as an example, the cost obtained is 1 / 80 of the traditional cost. The longer the section, the lower the cost.
[0061] Example 2
[0062] The difference between this embodiment and embodiment 1 is that obtaining the waypoint array through the Selenium component includes the following steps:
[0063] Select a map vendor, visit the map vendor page, and check whether it is the first time to visit the map vendor;
[0064] If you have visited the map manufacturer, obtain the calibrated page zoom ratio and take a screenshot in split screen;
[0065] Use SIFT feature matching algorithm to stitch the captured screenshots; perform path planning on the stitched images, and strip the path planning curve according to the HSV of the path planning;
[0066] Binarize the path planning curve to obtain the skeleton of the path planning curve;
[0067] Calculate the scale based on the actual starting point positioning coordinates, the actual end point positioning coordinates, the starting point coordinates of the curve on the image, and the end point coordinates of the curve on the image;
[0068] The curve is enlarged steplessly; when the distance between two adjacent pixels is actually 0.1m, the enlargement stops;
[0069] The curve image is gridded and encoded according to the coordinate points, with the upper left corner of the image as the origin;
[0070] According to the coordinate encoding, GNSS coordinates are bound to each pixel;
[0071] Generate an array of discrete waypoint data and the corresponding GNSS positioning array. The distance between two adjacent waypoints is 0.1m of the actual distance.
[0072] The SIFT feature matching algorithm is an algorithm used for feature extraction and matching in image processing, which can find the same or similar feature points in different images.
[0073] HSV refers to a color space, which represents hue, saturation, and value. In path planning, the path planning curve can be represented, processed, or analyzed in the form of HSV (hue, saturation, value).
[0074] GNSS is the abbreviation of Global Navigation Satellite System, which is an air-based radio navigation and positioning system that can provide users with all-weather 3D coordinates, speed and time information at any location on the Earth's surface or in near-Earth space.
[0075] Example 3
[0076] The difference between this embodiment and embodiment 2 is that the path planning curve is binarized, and after the skeleton of the path planning curve is obtained, the path planning skeleton is vectorized. By converting the skeleton into vector form, the characteristics of the path can be more accurately described and analyzed, the accuracy and availability of the data can be improved, and a better data foundation can be provided for subsequent road pile number acquisition and analysis. Vectorization refers to the conversion of graphic elements in an image from pixel form to vector form based on mathematical formulas and geometric shapes for easy editing and processing.
[0077] Example 4
[0078] The difference between this embodiment and embodiment 3 is that after binding the GNSS coordinates to each pixel according to the coordinate coding, spline interpolation is performed on the path planning curve. After binding the GNSS coordinates to each pixel according to the coordinate coding, spline interpolation is performed on the path planning curve. Spline interpolation can make the curve smoother and more continuous, reduce the mutation and discontinuity of the data, thereby more accurately reflecting the actual condition of the road and further improving the accuracy and reliability of road stake number acquisition.
[0079] Example 5
[0080] The difference between this embodiment and embodiment 4 is that when checking whether it is the first time to visit the map vendor, if the map vendor has not been visited before, the page zoom ratio of the map vendor is obtained.
[0081] Example 6
[0082] The difference between this embodiment and embodiment 5 is that when checking whether it is the first time to visit the map vendor, if the map vendor has not been visited, obtaining the page zoom ratio of the map vendor includes the following steps:
[0083] Query based on the start and end points in the calibration information;
[0084] Automatically scale the calculation based on the path segment size in the calibration information;
[0085] Simulate the input of starting point and end point data to query the path planning;
[0086] Automatically scale the layer so that the marked road segment fills the entire page;
[0087] Save the zoom ratio parameters corresponding to the map manufacturer.
[0088] Among them, the query operation is performed according to the starting point and the end point in the calibration information to obtain the initial route information. Then, the automatic scaling calculation is performed according to the size of the path segment involved in the calibration information to ensure the accuracy and rationality of the scaling ratio. Then, the data of the starting point and the end point are simulated and input, and then the path planning is queried to obtain detailed path planning results. The automatic scaling layer allows the calibrated section to fill the entire page, thereby obtaining the optimal display effect and data processing range. Finally, the scaling parameters corresponding to the map manufacturer are properly saved so that they can be directly called when they are visited again in the future, thereby improving work efficiency and consistency of data processing.
[0089] Example 7
[0090] A system for quickly acquiring road stake numbers based on machine vision technology comprises a first calculation module for setting a road for which a stake number needs to be acquired, and setting a starting point and an end point of the road, wherein the stake number of the starting point is known;
[0091] The second calculation module is used to obtain a discrete waypoint array of the path planning from the starting point to the end point; when the discrete waypoint array of the path planning from the starting point to the end point cannot be obtained, the waypoint array is obtained through the Selenium component;
[0092] The third calculation module is used to interpolate the acquired waypoint array so that each point in the array is on the curve of the path planning;
[0093] A fourth calculation module, used for performing distance accumulation calculation by increasing the array subscript;
[0094] The fifth calculation module is used to perform naming inference and save according to the road post coding rules when the cumulative distance is ≥100m.
[0095] Example 8
[0096] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following steps:
[0097] Set the road for which the stake number needs to be obtained, set the starting point and the end point of the road, and the stake number of the starting point is known;
[0098] Get the discrete waypoint array of the path planning from the starting point to the end point; when the discrete waypoint array of the path planning from the starting point to the end point cannot be obtained, get the waypoint array through the Selenium component;
[0099] Interpolate the obtained waypoint array so that each point in the array is on the curve of path planning;
[0100] The distance accumulation calculation is performed by increasing the array subscript;
[0101] When the cumulative distance is ≥100m, the naming is inferred and saved according to the road stake coding rules.
[0102] Example 9
[0103] A computer-readable storage medium stores a computer program, which, when executed by a processor, causes the processor to perform the following steps:
[0104] Set the road for which the stake number needs to be obtained, set the starting point and the end point of the road, and the stake number of the starting point is known;
[0105] Get the discrete waypoint array of the path planning from the starting point to the end point; when the discrete waypoint array of the path planning from the starting point to the end point cannot be obtained, get the waypoint array through the Selenium component;
[0106] Interpolate the obtained waypoint array so that each point in the array is on the curve of path planning;
[0107] The distance accumulation calculation is performed by increasing the array subscript;
[0108] When the cumulative distance is ≥100m, the naming is inferred and saved according to the road post coding rules.
[0109] In summary, the present invention can accurately and efficiently obtain the road stake number by setting the starting point and end point of the road, and using path planning to obtain the waypoint array, and then combining interpolation processing and distance accumulation calculation, thereby improving the accuracy and speed of stake number acquisition. Furthermore, in the case where the path planning waypoint array cannot be directly obtained, it is obtained with the help of Selenium components, which enhances the applicability and reliability of the method and is not limited by the difficulty of data acquisition. Finally, the naming is inferred and saved according to the road stake coding rules, which ensures the standardization and consistency of the stake number naming, and provides accurate and unified stake number information for subsequent road management, navigation, engineering construction, maintenance and emergency rescue applications, which helps to improve the overall level of road traffic management and services. It avoids the high-cost operation of staff driving vehicles to traverse road sections to obtain the correspondence between stake numbers and GNSS positioning information, greatly saving fuel costs, labor costs and time costs.
[0110] Those of ordinary skill in the art will appreciate that the units of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition of each example has been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0111] In the embodiments provided by the present invention, it should be understood that the division of units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units can be combined into one unit, one unit can be split into multiple units, or some features can be ignored, etc.
[0112] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0113] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-0nlyMemory), random access memory (RAM, RandomAccessMemory), mobile hard disk, magnetic disk or optical disk, etc., which can store program code.
[0114] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be included in the scope of the claims and specification of the present invention.
Claims
1. A method for quickly acquiring road stake numbers based on machine vision technology, characterized in that: The following steps are involved: Set the road for which the stake number needs to be obtained, set the starting point and the end point of the road, and the stake number of the starting point is known; Get the discrete waypoint array of the path planning from the starting point to the end point; when the discrete waypoint array of the path planning from the starting point to the end point cannot be obtained, get the waypoint array through the Selenium component; Interpolate the obtained waypoint array so that each point in the array is on the curve of path planning; The distance accumulation calculation is performed by increasing the array subscript; When the cumulative distance is ≥100m, the naming is inferred and saved according to the road post coding rules.
2. The method for quickly acquiring road stake numbers based on machine vision technology according to claim 1, characterized in that: The method of obtaining a waypoint array through the Selenium component includes the following steps: Select a map vendor, visit the map vendor page, and check whether it is the first time to visit the map vendor; If you have visited the map manufacturer, obtain the calibrated page zoom ratio and take a screenshot in split screen; Use SIFT feature matching algorithm to stitch the captured screenshots; perform path planning on the stitched images, and peel off the path planning curve according to the HSV of the path planning Binarize the path planning curve to obtain the skeleton of the path planning curve; Calculate the scale based on the actual starting point positioning coordinates, the actual end point positioning coordinates, the starting point coordinates of the curve on the image, and the end point coordinates of the curve on the image; Stepless amplification of the curve; The curve image is gridded and encoded according to the coordinate points, with the upper left corner of the image as the origin; According to the coordinate encoding, GNSS coordinates are bound to each pixel; Generates an array of discrete waypoint data and the corresponding GNSS positioning array.
3. The method for quickly acquiring road stake numbers based on machine vision technology according to claim 1 is characterized in that: The path planning curve is binarized, and after the skeleton of the path planning curve is obtained, the path planning skeleton is vectorized.
4. The method for quickly acquiring road stake numbers based on machine vision technology according to claim 1 is characterized in that: After binding each pixel with the GNSS coordinates according to the coordinate encoding, spline interpolation is performed on the path planning curve.
5. The method for quickly acquiring road stake numbers based on machine vision technology according to claim 1 is characterized in that: When checking whether it is the first time to visit the map manufacturer, if the map manufacturer has not been visited, the page zoom ratio of the map manufacturer is obtained.
6. The method for quickly acquiring road stake numbers based on machine vision technology according to claim 1, characterized in that: The step of checking whether it is the first time to visit the map vendor and obtaining the page zoom ratio of the map vendor if the map vendor has not been visited before includes the following steps: Query based on the start and end points in the calibration information; Automatically scale the calculation based on the path segment size in the calibration information; Simulate the input of starting point and end point data to query the path planning; Automatically scale the layer so that the marked road segment fills the entire page; Save the zoom ratio parameters corresponding to the map manufacturer.
7. A system for quickly acquiring road stake numbers based on machine vision technology, comprising a first calculation module, for setting a road for which a stake number needs to be acquired, and setting a starting point and an end point of the road, wherein the stake number of the starting point is known; The second calculation module is used to obtain a discrete waypoint array of the path planning from the starting point to the end point; when the discrete waypoint array of the path planning from the starting point to the end point cannot be obtained, the waypoint array is obtained through the Selenium component; The third calculation module is used to interpolate the acquired waypoint array so that each point in the array is on the curve of the path planning; A fourth calculation module, used for performing distance accumulation calculation by increasing the array subscript; The fifth calculation module is used to perform naming inference and save according to the road post coding rules when the cumulative distance is ≥100m.
8. A computer device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method for rapidly acquiring road stake numbers based on machine vision technology as claimed in any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for quickly acquiring road stake numbers based on machine vision technology as described in any one of claims 1 to 6 are implemented.