Map correction method and device, computer equipment and storage medium
By extracting the straight line angle in the map image and selecting the optimal rotation calibration angle, the map is quickly corrected, solving the problems of large amount of calculation and limited applicable scenarios in the prior art, and providing an efficient and robust map calibration method.
Patent Information
- Application Number
- CN202411582877.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-02-28
AI Technical Summary
The existing map correction methods are computationally expensive, have a long training time, and are difficult to apply to various scenarios.
By obtaining the initial map image to be corrected, multiple straight lines in the image are extracted, and the angle value of the straight lines is extracted in the image coordinate system, the optimal rotation calibration angle is selected, and each point on the map image is rotated and calibrated according to this angle to obtain the corrected map image.
It realizes the rapid identification of key features in the map, completes accurate coordinate matching, is suitable for various scenarios, and provides stable map calibration results.
Smart Images

Figure CN119540102A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a map correction method, device, computer equipment and storage medium. Background Art
[0002] In scenarios such as autonomous driving, robot navigation, and precision measurement, it is particularly important to accurately match the map with the user's perspective. Robots obtain environmental data through sensors, and the coordinate system of the sensors often deviates from the coordinate system of the existing map. These deviations may occur for a variety of reasons, which may be due to sensor accuracy limitations, installation errors, or even inaccuracies in the mapping process. Therefore, in order to ensure that the robot can accurately locate and perform tasks, the map must be calibrated to keep it consistent with the coordinate system obtained by the sensors.
[0003] At present, many researchers have proposed various calibration methods, among which machine learning and straight line fitting are two of the more common techniques. The machine learning method trains the model through a large amount of data, enabling it to automatically identify the correspondence between the map and the real world. Although this method shows certain effects when there is sufficient data, it has a huge demand for computing power and a long training time. More importantly, machine learning models often have a "black box effect", that is, their prediction results are difficult to explain and control, especially when facing new scenarios or environments with large changes, the model's robustness (i.e., robustness) and generalization ability may be poor.
[0004] Another commonly used method is the straight line fitting technology. The straight line fitting method extracts characteristic straight lines from the map and the actual environment, such as the boundaries of buildings and the edges of roads, and then matches and fits these straight lines to calibrate the deviation between the map and the actual coordinate system. However, straight line fitting has high requirements on image quality and environmental structure, is only applicable to specific scenarios, and has certain limitations. Summary of the invention
[0005] The embodiments of the present invention provide a map correction method, device, computer equipment and storage medium to solve the problems of large amount of calculation, long training time and inapplicability to various scenarios in the existing map correction process.
[0006] A map correction method, comprising:
[0007] Acquire an initial map image to be corrected, extract a plurality of straight lines in the initial map image, and extract corresponding straight line parameters in an image coordinate system, wherein the straight line parameters include angle values of the straight line angles in the image coordinate system;
[0008] Selecting an optimal rotation calibration angle according to the number of times each angle value appears in the plurality of straight line parameters;
[0009] Each point on the initial map image is rotationally calibrated according to the optimal rotation calibration angle to obtain a corrected map image.
[0010] A map correction device, comprising:
[0011] A parameter acquisition module, used to acquire an initial map image to be corrected, extract a plurality of straight lines in the initial map image, and extract corresponding straight line parameters in the image coordinate system, wherein the straight line parameters include angle values of the straight line in the image coordinate system;
[0012] A processing module, configured to select an optimal rotation calibration angle according to the number of times each angle value appears in the plurality of straight line parameters;
[0013] The calibration module is used to perform rotation calibration on each point on the initial map image according to the optimal rotation calibration angle to obtain a corrected map image.
[0014] A computer device includes a memory and a processor, wherein the memory stores computer-executable instructions, and the processor executes the computer-executable instructions stored in the memory to implement the above-mentioned map correction method.
[0015] A computer-readable storage medium, characterized in that the computer-readable storage medium is used to store computer-executable instructions, and the computer-executable instructions are used to implement the above-mentioned map correction method when executed by a processor.
[0016] The map correction method, device, computer equipment and storage medium provided by the present invention have the following beneficial effects:
[0017] The present invention obtains an initial map image to be corrected, extracts multiple straight lines in the initial map image, and extracts the angle values of the straight lines in the image coordinate system in the image coordinate system, and selects the optimal rotation calibration angle according to the number of times each angle value appears in the multiple straight line parameters; each point on the initial map image is rotationally calibrated according to the optimal rotation calibration angle to obtain a corrected map image.
[0018] The technical solution of the present invention provides a map calibration method based on straight line extraction and angle analysis, which mainly extracts straight lines in the image through image processing technology, and then analyzes the angle distribution of these straight lines, determines the most important optimal rotation angle, and finally realizes the accurate calibration of the coordinate system. The method of the present invention can quickly identify the optimal rotation calibration angle of key features in the map and complete accurate coordinate matching in a short time. In addition, the robustness of the method is reflected in its adaptability to different types of environments and complex application scenarios, and can cope with various noise and error conditions to provide stable map calibration results. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0020] Figure 1 is a schematic diagram of an application environment of a map correction method in an embodiment of the present invention;
[0021] Figure 2 is a flow chart of a map correction method in one embodiment of the present invention;
[0022] Figure 3 is a schematic diagram of a map correction device in one embodiment of the present invention;
[0023] Figure 4 is a schematic diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0024] 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.
[0025] The present invention provides a map correction method, which can be applied as follows: Figure 1 Specifically, the map correction method is applied in a map correction system, and the map correction system includes: Figure 1 The client and server shown in the figure communicate with each other through the network to solve the problems of large amount of calculation, long training time and inapplicability to various scenarios in the existing map correction process. The client, also known as the user end, refers to the program corresponding to the server that provides local services to customers. The client can be installed on but not limited to various personal computers, laptops, smart phones, tablets and portable wearable devices. The server can be implemented as an independent server or a server cluster consisting of multiple servers.
[0026] In one embodiment, if Figure 2 As shown, a map correction method is provided, which is applied in Figure 1 The server in the example is used as an example to illustrate the process, including the following steps:
[0027] S01: Acquire an initial map image to be corrected, extract a plurality of straight lines in the initial map image, and extract corresponding straight line parameters in an image coordinate system, wherein the straight line parameters include angle values of the straight line in the image coordinate system.
[0028] Specifically, first, use image processing tools such as OpenCV, scikit-image or Pillow to extract straight lines from the map image. Assuming that the input is a two-dimensional image, the pixel coordinates of the image can be expressed as (x, y). In the polar coordinate system, the straight line in the image can be expressed by the following parametric equation:
[0029] ρ=xcos(θ)+ysin(θ)
[0030] Among them, ρ represents the distance from the straight line to the origin, and θ represents the angle of the straight line. Through algorithms such as Hough Transform, a series of straight line parameters (ρ i , = θ i ).
[0031] In practical applications, some features in the map, such as road edges, walls, and building outlines, are usually represented as obvious straight lines, which are distributed at different angles. The angle data of these straight lines are stored in a container V1 for subsequent processing.
[0032] S02: Selecting the optimal rotation calibration angle according to the number of times each angle value appears in multiple straight line parameters.
[0033] In this embodiment, the optimal rotation calibration angle is selected according to the number of times each angle value appears in the plurality of straight lines, the number of times all angle values appear in the plurality of straight line parameters is counted, and the angle value with the largest number of appearances is selected as the optimal rotation calibration angle.
[0034] Specifically, all extracted straight line angles are analyzed and each angle is stored in container V1. Assume that N straight lines are extracted from the image, and their corresponding angles are: θ1, θ2, ..., θ N These angles appear with a certain frequency, especially some common angles (such as 0°, 90°) may appear frequently in images of buildings or man-made structures.
[0035] In order to count the frequency of occurrence of these angles, a container V2 with index values is constructed. The length of container V2 is related to the possible angle value range. For example, for the angle range [0°, 180°], the length of container V2 can be set to 180, and each index θ index Corresponding to an angle θ i Initially, all values of container V2 are set to 0, as shown in Table 1.
[0036] Table 1. Container V2 data and index distribution during initialization
[0037] Key 0 1 2 3 ... ... K-2 K-1 K Value 0 0 0 0 0 0 0 0 0
[0038] Next, traverse the angle data in V1 and calculate each angle θ i Index θ in V2 index Right now:
[0039]
[0040] The round() function rounds the angle value to ensure that it corresponds to a discrete index position in the container V2. index Each time a count is reached, the value of the corresponding position of V2 is incremented by 1:
[0041] V2[θ index ]=V2[θ index ]+1
[0042] In this way, the number of occurrences of each angle in the image can be counted, as shown in Table 2.
[0043] Table 2 Angle data statistics in V2
[0044] Key 0 1 ... <![CDATA[θ index ]]> ... K-2 K-1 K Value <![CDATA[V2[θ0]]]> <![CDATA[V2[θ1]]]> ... <![CDATA[V2[θ index ]+1]]> ... <![CDATA[V2[θ k-2 ]]]> <![CDATA[V2[θ k-1 ]]]> <![CDATA[V2[θ k ]]]>
[0045] After the angle index is calculated, the data in V2 is sorted to find the angle with the highest frequency. This angle is the most frequent straight line angle in the image, which is the main basis for map rotation calibration, that is, the optimal rotation calibration angle θ. max .
[0046] Set the position index with the highest frequency to Index max ,Right now:
[0047] Index max =arg max(V2)
[0048] The angle index corresponding to the maximum value index max This is the angle θ required for rotation calibration. max .
[0049] The pseudo code to find the maximum index is:
[0050]
[0051]
[0052] S03: performing rotation calibration on each point on the initial map image according to the optimal rotation calibration angle to obtain a corrected map image.
[0053] After determining the main rotation angle θ max After that, the map needs to be calibrated based on this angle. The core of calibration is to construct a new coordinate system, called map_calibration coordinate system, which is based on the rotation angle θ max And the map origin position is defined.
[0054] Assume that the original coordinate system of the map is (x, y) and the rotation calibration angle is θ max , then in the new calibration coordinate system, the original coordinate point (x, y) will be transformed to (x′, y′).
[0055] When it is detected that the optimal rotation calibration angle value is greater than the preset reference angle 0, each point on the initial map image is rotated clockwise by the optimal rotation calibration angle value. A two-dimensional rotation matrix is constructed based on the optimal rotation calibration angle; the pixel coordinates of each point on the initial map image are multiplied by the two-dimensional rotation matrix to obtain the corrected pixel coordinates. The conversion relationship is as follows:
[0056]
[0057] When it is detected that the optimal rotation calibration angle value is less than the preset reference angle 0, each point on the initial map image is rotated counterclockwise by the optimal rotation calibration angle value. A two-dimensional rotation matrix is constructed according to the optimal rotation calibration angle; the pixel coordinates of each point on the initial map image are multiplied by the two-dimensional rotation matrix to obtain the corrected pixel coordinates. The conversion relationship is as follows:
[0058]
[0059] Among them, θ max is the optimal rotation calibration angle, x and y are the horizontal and vertical coordinates of the original coordinate point, x′ and y′ are the horizontal and vertical coordinates of the corrected pixel coordinates, sin and cos are the sine function and cosine function respectively.
[0060] This transformation matrix is a standard two-dimensional rotation matrix that can rotate all points on the map according to the rotation angle θ max Perform the corresponding rotation calibration.
[0061] After completing the construction of the coordinate system, all data on the map and other sensor data need to be converted to a unified map_calibration coordinate system. Through this coordinate system, map data and sensor data can be processed in the same reference system to ensure consistency between them. This process not only solves the problem of inconsistent coordinate systems of different data sources, but also ensures that all navigation-related data can be consistent with the user's actual perspective. In the navigation system, the robot perceives the environment through sensors, and the accurate fusion of map and sensor data is crucial. By converting all data to the map_calibration coordinate system, it is ensured that when the system performs positioning, path planning, and interactive operations, the map display is completely matched with the user's actual perspective, avoiding errors caused by misaligned coordinate systems, thereby improving navigation accuracy and user experience. If the sensor or robot pose data is expressed as (x s ,y s ,θ s ), then in the map_calibration coordinate system, its new representation is (x s ′,y s ′,θ s ′), the conversion formula is as follows:
[0062]
[0063] θ′ s =θ s +θ max
[0064] This conversion process ensures that all perception data can be accurately mapped into a unified calibrated coordinate system, thus ensuring consistency and accuracy between maps and sensors.
[0065] The technical solution of the present invention constructs an efficient map calibration method by extracting straight lines from an image and analyzing their angles. The method utilizes the geometric features in the image, especially the angle information of the straight lines, and achieves accurate matching between the map and the robot coordinate system through steps such as angle indexing, frequency statistics, and coordinate system conversion, thereby solving the problem of deviation between the map and the real world during navigation. Especially during user interaction, when the map has a large angle deviation due to rotation or change in perspective, the solution can effectively correct these deviations to ensure that the map is consistent with the user's perspective.
[0066] The core steps of the method of the present invention include: first, extracting key straight line features from the map image, and performing angle indexing and statistical analysis on these lines. By analyzing the angle distribution of the lines, the main rotation direction of each feature in the map relative to the robot coordinate system is determined. Then, based on this angle information, frequency statistics are performed to find the main angle deviations, thereby achieving accurate map rotation calibration.
[0067] Next, the method further adjusts the map to match the coordinate system of the robot's sensors through a formulated angle calculation and coordinate system conversion step. The angle calculation in this process uses a highly precise formula, which ensures accuracy during the calibration process and reduces errors caused by noise or interference. In addition, the coordinate system conversion process takes into account the differences between different sensors and systems, ensuring a high degree of robustness in a variety of complex application scenarios.
[0068] The biggest advantage of this technical solution is its wide applicability. In practical applications, whether it is autonomous driving, robot navigation, or other systems that rely on high-precision maps, this method can provide stable calibration results. Through frequency statistics and angle indexing, the system can quickly identify key features in the map and complete accurate coordinate matching in a short time. In addition, the robustness of this method is reflected in its adaptability to different types of environments and complex application scenarios. It can cope with various noise and error conditions and provide stable map calibration results.
[0069] In general, the map calibration method of the present invention ensures the precise matching of the map and the robot coordinate system through innovative technologies such as angle indexing, frequency statistics and coordinate system conversion. Its formulated angle calculation and highly robust conversion process not only improve the accuracy of the system, but also greatly enhance its applicability in complex application scenarios, and has broad application prospects.
[0070] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0071] In one embodiment, a map correction device is provided, and the map correction device corresponds to the map correction method in the above embodiment. Figure 3 As shown, the map correction device includes a parameter acquisition module 101, a processing module 102 and a calibration module 103. The detailed description of each functional module is as follows:
[0072] The parameter acquisition module 101 is used to acquire an initial map image to be corrected, extract a plurality of straight lines in the initial map image, and extract corresponding straight line parameters in the image coordinate system, wherein the straight line parameters include angle values of the straight line in the image coordinate system;
[0073] A processing module 102, configured to select an optimal rotation calibration angle according to the number of times each angle value appears in the plurality of straight line parameters;
[0074] The calibration module 103 is used to perform rotation calibration on each point on the initial map image according to the optimal rotation calibration angle to obtain a corrected map image.
[0075] The specific definition of the map correction device can be found in the definition of the map correction method above, which will not be repeated here. Each module in the above-mentioned map correction device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0076] In one embodiment, Figure 4 This is a schematic diagram of the structure of a computer device provided in Embodiment 4 of the present invention. Figure 4 As shown, the computer device of this embodiment includes: at least one processor ( Figure 4 Only one is shown in the figure), a memory, and a computer program stored in the memory and executable on at least one processor, wherein when the processor executes the computer program, the steps in any of the above-mentioned map correction method embodiments are implemented.
[0077] The computer device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that Figure 4 This is merely an example of a computer device and does not constitute a limitation on the computer device. The computer device may include more or fewer components than those shown in the figure, or a combination of certain components, or different components. For example, it may also include a network interface, a display screen, and an input device.
[0078] The processor may be a CPU, or other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0079] The memory includes a readable storage medium, an internal memory, etc., wherein the internal memory may be the memory of a computer device, and the internal memory provides an environment for the operation of an operating system and computer-readable instructions in the readable storage medium. The readable storage medium may be a hard disk of a computer device, and in other embodiments may also be an external storage device of a computer device, for example, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on a computer device. Further, the memory may also include both an internal storage unit of a computer device and an external storage device. The memory is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as program codes of computer programs, etc. The memory may also be used to temporarily store data that has been output or is to be output.
[0080] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention. The specific working process of the units and modules in the above-mentioned device can refer to the corresponding process in the above-mentioned method embodiment, which will not be repeated here. 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 such understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned method embodiment can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device capable of carrying computer program code, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0081] The present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by a computer program product. When the computer program product runs on a computer device, the computer device can implement the steps in the above-mentioned method embodiment when executing.
[0082] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0083] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the map correction method in the above embodiment is implemented, for example Figure 2 Alternatively, when the computer program is executed by a processor, the functions of each module in the embodiment of the map correction device are realized, for example Figure 3 The map correction functions shown are not described here in detail to avoid repetition.
[0084] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0085] The present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by a computer program product. When the computer program product runs on a computer device, the computer device can implement the steps in the above-mentioned method embodiment when executing.
[0086] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0087] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. 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.
[0088] In the embodiments provided by the present invention, it should be understood that the disclosed devices / computer equipment and methods can be implemented in other ways. For example, the device / computer equipment embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0089] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0090] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A map correction method, characterized in that: include: Acquire an initial map image to be corrected, extract a plurality of straight lines in the initial map image, and extract corresponding straight line parameters in an image coordinate system, wherein the straight line parameters include angle values of the straight line angles in the image coordinate system; Selecting an optimal rotation calibration angle according to the number of times each angle value appears in the plurality of straight line parameters; Each point on the initial map image is rotationally calibrated according to the optimal rotation calibration angle to obtain a corrected map image.
2. The map correction method according to claim 1, characterized in that: The step of selecting the optimal rotation calibration angle according to the number of times each angle value appears in the plurality of straight lines comprises: The number of times all angle values appear in the plurality of straight line parameters is counted, and the angle value with the largest number of appearances is selected as the optimal rotation calibration angle.
3. The map correction method according to claim 1, characterized in that: The step of rotating each point on the initial map image according to the optimal rotation calibration angle comprises: When it is detected that the optimal rotation calibration angle value is greater than the preset reference angle, each point on the initial map image is rotated clockwise by the optimal rotation calibration angle value.
4. The map correction method according to claim 1, characterized in that: The step of rotating each point on the initial map image according to the optimal rotation calibration angle comprises: When it is detected that the optimal rotation calibration angle value is less than the preset reference angle, each point on the initial map image is rotated counterclockwise by the optimal rotation calibration angle value.
5. The map correction method according to claim 3 or 4, characterized in that: The corrected map image includes corrected pixel coordinates, and the corrected pixel coordinates include: A two-dimensional rotation matrix is constructed according to the optimal rotation calibration angle; and the pixel coordinates of each point on the initial map image are multiplied by the two-dimensional rotation matrix to obtain corrected pixel coordinates.
6. The map correction method according to claim 5, characterized in that: After rotating clockwise according to the optimal rotation calibration angle value, the relevant expression of the corrected pixel coordinates is: Among them, θ max is the optimal rotation calibration angle, x and y are the horizontal and vertical coordinates of the original coordinate point, x′ and y′ are the horizontal and vertical coordinates of the corrected pixel coordinates, sin and cos are the sine function and cosine function respectively.
7. The map correction method according to claim 5, characterized in that: After rotating the optimal rotation calibration angle value counterclockwise, the relevant expression of the corrected pixel coordinates is: Among them, θ max is the optimal rotation calibration angle, x and y are the horizontal and vertical coordinates of the original coordinate point, x′ and y′ are the horizontal and vertical coordinates of the corrected pixel coordinates, sin and cos are the sine function and cosine function respectively.
8. A map correction device, characterized in that: include: A parameter acquisition module, used to acquire an initial map image to be corrected, extract a plurality of straight lines in the initial map image, and extract corresponding straight line parameters in the image coordinate system, wherein the straight line parameters include angle values of the straight line in the image coordinate system; A processing module, configured to select an optimal rotation calibration angle according to the number of times each angle value appears in the plurality of straight line parameters; The calibration module is used to perform rotation calibration on each point on the initial map image according to the optimal rotation calibration angle to obtain a corrected map image.
9. A computer device comprising a memory and a processor, characterized in that: The memory stores computer-executable instructions, and the processor executes the computer-executable instructions stored in the memory to implement a map correction method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement a map correction method as described in any one of claims 1 to 7.