Camera calibration method and device, computer equipment and storage medium

Through the automated camera calibration method, image segmentation and homography matrix projection technology are used, and coordinate conversion is combined with high-precision maps, which solves the problem of manual calibration in the existing technology that is time-consuming and low accuracy, and realizes an efficient and accurate camera Calibration.

CN119478062APending Publication Date: 2025-02-18SHENZHEN GENVICT TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411540781.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

Existing camera calibration methods rely on manual selection of feature points, which are time-consuming and susceptible to human factors, making it difficult to ensure calibration accuracy and stability in complex environments.

Method used

By obtaining the images captured by the camera and high-precision maps, use the findHomography function in OpenCV to establish a homography matrix, and project the high-precision map to the camera's viewing angle; use the image segmentation model to extract the contour of the target object, calculate the similarity to obtain outline information; Douglas-Peucker algorithm extracts key fixed points, combines high-precision maps to perform coordinate conversion, and obtains latitude and longitude information.

Benefits of technology

It significantly reduces the labor and time cost required for calibration, improves calibration accuracy and stability, and ensures the accuracy and responsiveness of calibration results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119478062A_ABST
    Figure CN119478062A_ABST
Patent Text Reader

Abstract

The invention discloses a camera calibration method and device, computer equipment and a storage medium. The method comprises the following steps: acquiring an image shot by a camera and a corresponding high-precision map; projecting the high-precision map to a camera visual angle according to the image; segmenting the image and the high-precision map, and performing target object contour determination and approximation degree calculation on the segmented image to obtain contour information; performing key fixed point extraction on the contour information to obtain the position of a target object; and performing coordinate conversion on the position of the target object in combination with the high-precision map to obtain latitude and longitude information. By implementing the method provided by the invention, the manpower and time cost required by calibration can be remarkably reduced, the working efficiency is improved, the calibration precision is improved, and the accuracy and stability of a calibration result are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a camera calibration method, and more specifically to a camera calibration method, device, computer equipment and storage medium. Background Art

[0002] With the continuous advancement of intelligent transportation systems, vehicle and pedestrian detection and tracking applications are becoming more and more common. In order to improve the accuracy and reliability of these applications, the images captured by roadside cameras must be accurately matched with high-precision maps. This work not only involves image processing, but also needs to be combined with geographic information to ensure that the system can correctly identify and track targets in complex traffic environments.

[0003] At present, traditional camera calibration methods usually rely on manually selecting multiple feature points and establishing the relationship between the camera and the map through complex mathematical algorithms. This process is not only very time-consuming, but also easily affected by human factors. In complex environments, the selected feature points may be inaccurate, thus affecting the accuracy of calibration. In addition, the quality of images captured by the camera is affected by many factors, such as road conditions, weather changes, etc. These changes may cause manual calibration to be unable to adapt in time, reducing the responsiveness and accuracy of the system.

[0004] Therefore, it is necessary to design a new method to significantly reduce the manpower and time costs required for calibration, improve work efficiency, improve calibration accuracy, and ensure the accuracy and stability of the calibration results. Summary of the invention

[0005] The purpose of the present invention is to overcome the defects of the prior art and provide a camera calibration method, device, computer equipment and storage medium.

[0006] To achieve the above object, the present invention adopts the following technical solution: a camera calibration method, comprising:

[0007] Get the images taken by the camera and the corresponding high-precision map;

[0008] Projecting the high-precision map to a camera viewing angle according to the image;

[0009] Segmenting the image and the high-precision map, and determining the contour of the target object and calculating the approximation of the segmented image to obtain contour information;

[0010] Extracting key points from the contour information to obtain the position of the target object;

[0011] The target object position is combined with the high-precision map to perform coordinate conversion to obtain longitude and latitude information.

[0012] A further technical solution is: projecting the high-precision map to a camera viewing angle according to the image comprises:

[0013] Selecting a plurality of corresponding points from the image captured by the camera and the high-precision map;

[0014] The findHomography function in OpenCV is used to establish a homography matrix for the corresponding points to project the high-precision map to the camera's perspective.

[0015] A further technical solution is: segmenting the image and the high-precision map, determining the contour of the target object and calculating the approximation of the segmented image to obtain contour information, including:

[0016] Using an image segmentation model to segment the image and the high-precision map, and extracting the contour of the target object from the segmented image to generate a mask;

[0017] The similarity between the mask and the corresponding area in the high-precision map is calculated, and similar graphics are determined by the similarity and a preset threshold to obtain contour information.

[0018] A further technical solution is: calculating the similarity between the mask and the corresponding area in the high-precision map, and determining similar graphics by the similarity and a preset threshold to obtain contour information, including:

[0019] The structural similarity index is used to calculate the similarity between the mask and the corresponding area in the high-precision map, and similar graphics are determined by the similarity and a preset threshold to obtain contour information.

[0020] A further technical solution is: extracting key fixed points from the contour information to obtain the position of the target object includes:

[0021] The Douglas-Peucker algorithm is used to perform polygonal approximation on the extracted contour and extract key vertices to obtain the position of the target object.

[0022] A further technical solution is: the coordinate conversion of the target object position in combination with the high-precision map to obtain longitude and latitude information includes:

[0023] The target object position is converted into high-precision map coordinates through the inverse transformation of the homography matrix, and further converted into geographic coordinates to obtain longitude and latitude information.

[0024] The present invention also provides a camera calibration device, comprising:

[0025] An acquisition unit, used to acquire images taken by the camera and the corresponding high-precision map;

[0026] A projection unit, used for projecting the high-precision map to a camera viewing angle according to the image;

[0027] A contour information extraction unit, used to segment the image and the high-precision map, and determine the contour of the target object and calculate the approximation of the segmented image to obtain contour information;

[0028] A position determination unit, used for extracting key fixed points from the contour information to obtain the position of the target object;

[0029] The conversion unit is used to convert the coordinates of the target object position in combination with the high-precision map to obtain longitude and latitude information.

[0030] Its further technical solution is: the projection unit comprises:

[0031] A screening subunit, used for screening a number of corresponding points from the image taken by the camera and the high-precision map;

[0032] The matrix establishment subunit is used to establish a homography matrix for the corresponding points using the findHomography function in OpenCV to project the high-precision map to the camera's viewing angle.

[0033] The present invention further provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor implements the above method when executing the computer program.

[0034] The present invention also provides a storage medium, wherein the storage medium stores a computer program, and the computer program implements the above method when executed by a processor.

[0035] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention realizes comprehensive data collection by acquiring images taken by a camera and corresponding high-precision maps; projects the high-precision maps to the camera's viewing angle for effective spatial matching; uses images and maps for segmentation to determine the contour of the target object and perform approximation calculations to obtain accurate contour information; extracts key fixed points from the contour information to clarify the position of the target object; combines the target object position with the high-precision map for coordinate conversion to obtain longitude and latitude information, thereby ensuring the accuracy and stability of the calibration results; through this series of steps, the manpower and time costs required for calibration can be significantly reduced, and work efficiency and calibration accuracy can be improved.

[0036] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] 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 will be briefly introduced below. Obviously, the accompanying drawings described below are 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 any creative work.

[0038] Figure 1 A schematic diagram of a flow chart of a camera calibration method provided by an embodiment of the present invention;

[0039] Figure 2 A schematic diagram of a sub-process of a camera calibration method provided by an embodiment of the present invention;

[0040] Figure 3 A schematic diagram of a sub-process of a camera calibration method provided by an embodiment of the present invention;

[0041] Figure 4 A schematic diagram of a high-precision map provided by an embodiment of the present invention;

[0042] Figure 5 A schematic diagram of the calibration points of a high-precision map provided by an embodiment of the present invention;

[0043] Figure 6 A schematic diagram of calibration points of a camera image provided by an embodiment of the present invention;

[0044] Figure 7 A schematic diagram of a projected high-precision map provided by an embodiment of the present invention;

[0045] Figure 8 A schematic diagram of a segmented image provided by an embodiment of the present invention;

[0046] Fig. 9 A schematic diagram of a segmented high-precision map provided by an embodiment of the present invention;

[0047] Fig.10 Schematic diagram of similarity matching provided by an embodiment of the present invention Figure 1 ;

[0048] Fig.11 Schematic diagram of similarity matching provided by an embodiment of the present invention Figure 2 ;

[0049] Fig.12 A schematic diagram of a process of polygonal approximation provided by an embodiment of the present invention;

[0050] Fig.13 Schematic diagram of the multi-vertex extraction effect provided by an embodiment of the present invention Figure 1 ;

[0051] Fig.14Schematic diagram of the multi-vertex extraction effect provided by an embodiment of the present invention Figure 2 ;

[0052] Fig.15 A schematic block diagram of a camera calibration device provided by an embodiment of the present invention;

[0053] Fig.16 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0054] 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.

[0055] 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.

[0056] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0057] 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.

[0058] See also Figure 1 , Figure 1A schematic flow chart of a camera calibration method provided in an embodiment of the present invention. The camera calibration method is applied in a server. The server interacts with the camera for data, combining an advanced large image segmentation model with a high-precision map to achieve accurate mapping of vehicle positions, further improving the overall performance of the intelligent transportation system, significantly reducing the manpower and time costs required for calibration, and improving work efficiency. By utilizing deep learning technology, the method can more accurately identify key feature points in the image, thereby improving calibration accuracy. Through real-time processing and dynamic adjustment, it can better adapt to changing environmental conditions and ensure the accuracy and stability of the calibration results. This calibration method helps to improve the performance of intelligent transportation systems and promote their application in more complex scenarios.

[0059] Figure 1 FIG. 1 is a flow chart of a camera calibration method provided by an embodiment of the present invention. Figure 1 As shown, the method includes the following steps S110 to S150.

[0060] S110: Obtain images captured by the camera and corresponding high-precision maps.

[0061] See also Figure 4 , collect and prepare images taken by the camera and the corresponding high-precision maps from a bird's-eye view, ensuring that the data of both are clear and complete. Specifically, high-precision maps can be collected and surveyed in target areas (such as intersections and roads). Professional surveying and mapping equipment (such as laser scanners and drones) are used to obtain high-resolution terrain and road network data, and key feature points (such as traffic signs, signal lights, and crosswalks) are marked, and finally this information is converted into a digital map format to ensure that the map data is detailed and accurate.

[0062] S120: Projecting the high-precision map to a camera viewing angle according to the image.

[0063] In this embodiment, a high-precision map is projected onto the camera's viewing angle to ensure that the geometric relationship between the map and the camera image is accurate.

[0064] Projecting a high-precision map to the camera’s viewpoint is a key step in camera calibration. This process involves geometric transformation and image processing techniques, which aim to convert a high-precision map from a bird’s-eye view into a viewpoint that matches the image captured by the camera.

[0065] In one embodiment, see Figure 2 , the above-mentioned step S120 may include steps S121 to S122.

[0066] S121. Filter a number of corresponding points from the image taken by the camera and the high-precision map.

[0067] In this embodiment, at least four corresponding points are selected in the high-precision map and the image captured by the camera. These points should be easily recognizable and stable features, such as the corners of an intersection, traffic signs, or street lights. The selected points should be distributed in different locations of the image to enhance the stability and accuracy of the homography matrix. Figure 5 and Figure 6 shown.

[0068] S122, using the findHomography function in OpenCV to establish a homography matrix for the corresponding points, so as to project the high-precision map to the camera's viewing angle.

[0069] In this embodiment, the findHomography function in the OpenCV library is used to calculate the homography matrix based on the selected corresponding points. This matrix is ​​a 3x3 array used to describe the geometric transformation relationship between two planes. The homography matrix H is expressed by the following formula: Among them, (x, y) is the point in the high-precision map, and (x′, y′) is the corresponding point in the camera image. The high-precision mapping image processed by the homography matrix can present the same angle as the camera image, such as Figure 7 shown.

[0070] By accurately projecting map data onto the camera's viewpoint, the accuracy of understanding and analysis of the environment can be improved, especially in complex urban environments. This conversion process can support applications such as real-time navigation and autonomous driving, allowing the system to recognize and respond to the surrounding environment in real time based on the images captured by the camera. Combining data from different sources (maps and camera images) helps to improve the reliability and effectiveness of the overall system, thereby promoting the development of intelligent transportation systems. The ability to combine high-precision map information with actual captured images helps to conduct deeper environmental analysis and decision support, providing a basis for the optimization of intelligent systems.

[0071] Through this method, the matching degree between the map and the camera image can be effectively improved, thus providing a solid data foundation for subsequent applications.

[0072] S130, segmenting the image and the high-precision map, and determining the contour of the target object and calculating the approximation of the segmented image to obtain contour information.

[0073] In this embodiment, the contour information refers to the location information of the contour of the target object. The target objects include lane lines, stop lines, turn signs, etc. Specifically, the Segment Anything large model is used for high-quality image segmentation, which can accurately extract the contours of various target objects in the input image. This technology provides strong support for image analysis, target recognition and automation applications.

[0074] In one embodiment, see Figure 3 , the above-mentioned step S130 may include steps S131 to S132.

[0075] S131. Use an image segmentation model to segment the image and the high-precision map, extract the contour of the target object from the segmented image, and generate a mask.

[0076] In this embodiment, the Segment Anything model, an advanced image segmentation model, is used to process the input image. This model is based on deep learning technology and can effectively identify and separate different objects in the image. The segmentation result will accurately mark the contours of various target objects in the image, such as Figure 8 and Fig. 9 As shown. Among them, Figure 8 The camera snapshots after segmentation are displayed, clearly showing the boundaries and features of each object. Fig. 9 It shows the effect of high-precision map after segmentation processing, which helps to analyze the correspondence between map information and actual scenes.

[0077] S132, calculating the similarity between the mask and the corresponding area in the high-precision map, and determining similar graphics through the similarity and a preset threshold to obtain contour information.

[0078] In this embodiment, in order to evaluate the quality and similarity of the segmented images, the SSIM (Structural Similarity) index is used. This index takes into account the visual perception characteristics of the human eye to the image and can more accurately reflect the similarity between images.

[0079] Given two signals x and y, the structural similarity between the two is defined as: SSIM(x,y) = (L(x,y)) α ×(C(x,y)) β ×(S(x,y)) γ ; Among them, α, β, γ are weight coefficients used to balance the importance of brightness similarity, contrast similarity and structural similarity. L(x, y) is brightness similarity; C(x, y) is contrast similarity; S(x, y) is structural similarity; SSIM value range is [-1, 1], the closer the value is to 1, the more similar the images are, and the closer to -1, the lower the similarity. Through this indicator, the accuracy of the segmentation effect can be quantitatively evaluated. Fig.10 and Fig.11 shown.

[0080] High-quality image segmentation improves the recognition rate of target objects and provides a reliable data basis for subsequent analysis and decision-making. With clear object contours, the system can better understand complex scenes and improve intelligent analysis capabilities. Real-time segmentation and similarity calculation can support applications such as autonomous driving and robot navigation, and improve the response speed and safety of the system. Structural similarity indicators provide an objective assessment of image quality, which helps optimize segmentation algorithms and improve data processing processes. Combining segmented images with high-precision map information can better achieve environmental perception and decision-making, and promote the development of intelligent transportation and automation technologies.

[0081] Through the above steps and advantages, the application of the Segment Anything large model in image segmentation not only improves the quality of image processing, but also lays a solid foundation for the realization of various intelligent application scenarios.

[0082] S140: extract key fixed points from the contour information to obtain the position of the target object.

[0083] In this embodiment, the target object position refers to the position information of the target object enclosed by the polygon after the contour is approximated.

[0084] Specifically, the Douglas-Peucker algorithm is used to perform polygonal approximation on the extracted contour and extract key vertices to obtain the position of the target object, such as Figure 13 to Figure 14 shown.

[0085] Douglas-Peucker algorithm is an algorithm widely used in curve simplification and graphics processing. It simplifies graphics by retaining important shape features and reducing the number of points on the contour.

[0086] The Douglas-Peucker algorithm process is as follows Fig.12 As shown, from Fig.12 Select two endpoints from the given contour in Figure B, usually the starting point and the ending point of the contour. These two points form the initial line segment. Connect these two endpoints to form a straight line segment, such as Fig.12 Figure C in . At this point, the generated line segment will divide the contour into two parts. Among all the points of the contour, calculate the distance from each point to the line segment and find the point farthest from the line segment. If the distance of this farthest point is greater than the preset precision parameter (parameter), add the point to the new contour. Divide the contour into two parts and repeat the above steps for each part. Specifically, for the starting point and end point of each part, generate a line segment, calculate the farthest point, and then judge and add it again. This process continues to iterate until the shortest distance from each point to its corresponding line segment is less than the value set by the precision parameter, such as Fig.12Figure F in Figure 1. The precision parameter can be set according to the characteristics of the contour. For example, the perimeter of the contour or a certain proportion of the perimeter of the enclosing rectangle can be selected. This method ensures that the simplified contour can still well retain the original shape characteristics.

[0087] By removing unnecessary points, the DP algorithm significantly reduces the amount of data, which helps speed up subsequent processing and analysis. Despite simplifying the contours, the algorithm can effectively retain the basic features of the shape to ensure that important visual information is not lost. The flexible setting of the accuracy parameters allows users to adjust the degree of simplification according to different application requirements to meet specific accuracy requirements. The DP algorithm has a good time complexity (usually O(n log n)) and can still maintain high efficiency when processing large-scale data.

[0088] This algorithm is not only suitable for image processing, but also widely used in map simplification, path planning, data visualization and other fields. The simplified outline is often clearer, reducing visual clutter, which helps to improve the readability and comprehension of the graphics. When the simplified outline is combined with other algorithms, it can better adapt to subsequent processing needs, such as combining with machine learning models to improve recognition effects.

[0089] By using the Douglas-Peucker approximation algorithm, users can effectively simplify contours and reduce data complexity while ensuring that necessary shape information is retained, laying the foundation for further image processing and analysis.

[0090] S150, performing coordinate conversion on the target object position in combination with the high-precision map to obtain longitude and latitude information.

[0091] In this embodiment, the longitude and latitude information refers to the geographical location information corresponding to each target object in the camera.

[0092] Specifically, the target object position is converted into high-precision map coordinates through the inverse transformation of the homography matrix, and further converted into geographic coordinates to obtain longitude and latitude information.

[0093] In order to transform the image coordinates to the bird's-eye view coordinate system, calculate the inverse matrix H of the homography matrix -1 This inverse matrix is ​​used to map the coordinates (x, y) in the image to the corresponding coordinates (u, v) in the bird's-eye view.

[0094] Using the inverse homography matrix, the image coordinates are transformed by the following formula: (u, v) are the coordinates in the bird's eye view.

[0095] Determine the mapping relationship between the coordinate system of the bird's-eye view and the geographic coordinate system (latitude and longitude). Usually this involves a known geographic location (such as the latitude and longitude of the marked point in the figure) and the pixel coordinates of the bird's-eye view.

[0096] Convert the bird's-eye view coordinates (u, v) to the corresponding geographic coordinates (latitude, longitude) using linear interpolation or other conversion methods.

[0097] Through the above steps, accurate conversion from image coordinates to geographic coordinates can be achieved, which can effectively locate the position of the target in the image in the actual geographic environment.

[0098] Combining visual information with geographic information can enable better data analysis and decision support, for example in urban planning, environmental monitoring and other fields.

[0099] By converting complex image data into easy-to-understand geographic coordinates, it is possible to provide end users with a more friendly operating interface and application experience.

[0100] In emergency response or resource management scenarios, quickly converting on-site image information into geographic location can improve response speed and resource allocation efficiency.

[0101] Combining image processing with geographic information systems (GIS) can enable more complex spatial analysis and facilitate intelligent analysis and decision-making.

[0102] Combining image data with geographic information can generate more intuitive visualization results, helping users quickly understand and analyze data.

[0103] Through this series of coordinate transformations, image information can be efficiently connected with the actual geographical environment, providing more comprehensive and accurate information support.

[0104] The method of this embodiment uses an advanced image segmentation model and homography matrix to achieve a fully automatic process from image acquisition to calibration result generation. This improvement significantly reduces the time and labor cost required for traditional manual calibration. With the help of a large model, it is possible to accurately extract the target object in the image and generate an accurate segmentation mask. This process helps to better match the corresponding points in the camera image and the high-precision map, thereby improving the accuracy of the calibration.

[0105] The method of this embodiment has real-time processing capability and can adapt to dynamic environmental changes. When the camera position is offset, the system can still complete the calibration quickly and accurately, thereby improving the overall response speed and efficiency.

[0106] In summary, the method of this embodiment not only significantly improves the efficiency and accuracy of camera calibration, but also can adapt to dynamically changing environments, providing strong technical support for fields such as intelligent transportation systems and autonomous driving. These improvements make this method more practical and popularizable in practical applications.

[0107] The above-mentioned camera calibration method realizes comprehensive data collection by acquiring the image taken by the camera and the corresponding high-precision map; projects the high-precision map to the camera's field of view for effective spatial matching; uses the image and map for segmentation to determine the contour of the target object and perform approximation calculations to obtain accurate contour information; extracts key points from the contour information to clarify the position of the target object; combines the target object position with the high-precision map for coordinate conversion to obtain longitude and latitude information, thereby ensuring the accuracy and stability of the calibration results; through this series of steps, the manpower and time costs required for calibration can be significantly reduced, and work efficiency and calibration accuracy can be improved.

[0108] Fig.15 is a schematic block diagram of a camera calibration device 300 provided in an embodiment of the present invention. Fig.15 As shown, corresponding to the above camera calibration method, the present invention also provides a camera calibration device 300. The camera calibration device 300 includes a unit for executing the above camera calibration method, and the device can be configured in a server. Fig.15 The camera calibration device 300 includes an acquisition unit 301, a projection unit 302, a contour information extraction unit 303, a position determination unit 304 and a conversion unit 305.

[0109] The acquisition unit 301 is used to acquire the image taken by the camera and the corresponding high-precision map; the projection unit 302 is used to project the high-precision map to the camera perspective according to the image; the contour information extraction unit 303 is used to segment the image and the high-precision map, and determine the target object contour and calculate the approximation of the segmented image to obtain contour information; the position determination unit 304 is used to extract key fixed points from the contour information to obtain the target object position; the conversion unit 305 is used to perform coordinate conversion on the target object position in combination with the high-precision map to obtain longitude and latitude information.

[0110] In one embodiment, the projection unit 302 includes:

[0111] The screening subunit is used to screen a number of corresponding points from the image taken by the camera and the high-precision map; the matrix establishment subunit is used to establish a homography matrix for the corresponding points using the findHomography function in OpenCV to project the high-precision map to the camera's perspective.

[0112] In one embodiment, the contour information extraction unit 303 includes:

[0113] The segmentation subunit is used to segment the image and the high-precision map using an image segmentation model, and extract the contour of the target object from the segmented image to generate a mask; the similarity calculation subunit is used to calculate the similarity between the mask and the corresponding area in the high-precision map, and determine the similar graphics through the similarity and a preset threshold to obtain contour information.

[0114] In one embodiment, the similarity calculation subunit is used to calculate the similarity between the mask and the corresponding area in the high-precision map using a structural similarity index, and determine similar graphics through the similarity and a preset threshold to obtain contour information.

[0115] In one embodiment, the position determination unit 304 is configured to use the Douglas-Peucker algorithm to perform polygonal approximation on the extracted contour and extract key vertices to obtain the position of the target object.

[0116] In one embodiment, the conversion unit 305 is used to convert the target object position into high-precision map coordinates through inverse transformation of the homography matrix, and further convert it into geographic coordinates to obtain longitude and latitude information.

[0117] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned camera calibration device 300 and each unit can refer to the corresponding description in the aforementioned method embodiment, and for the convenience and brevity of description, it will not be repeated here.

[0118] The camera calibration device 300 can be implemented in the form of a computer program. Fig.16 Runs on the computer device shown.

[0119] See also Fig.16 , Fig.16 5 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 500 may be a server, wherein the server may be an independent server or a server cluster composed of multiple servers.

[0120] See also Fig.16 The computer device 500 includes a processor 502 , a memory and a network interface 505 connected via a system bus 501 , wherein the memory may include a non-volatile storage medium 503 and an internal memory 504 .

[0121] The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions, and when the program instructions are executed, the processor 502 may execute a camera calibration method.

[0122] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .

[0123] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a camera calibration method.

[0124] The network interface 505 is used to communicate with other devices over the network. Fig.16 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0125] The processor 502 is used to run the computer program 5032 stored in the memory to implement the following steps:

[0126] Acquire an image taken by a camera and a corresponding high-precision map; project the high-precision map to the camera's viewing angle based on the image; segment the image and the high-precision map, determine the target object contour and calculate the approximation of the segmented image to obtain contour information; extract key fixed points from the contour information to obtain the target object position; and perform coordinate conversion on the target object position in combination with the high-precision map to obtain longitude and latitude information.

[0127] In one embodiment, when the processor 502 implements the step of projecting the high-precision map to the camera viewing angle according to the image, the processor 502 specifically implements the following steps:

[0128] A number of corresponding points are selected from the image taken by the camera and the high-precision map; a homography matrix is ​​established for the corresponding points using the findHomography function in OpenCV to project the high-precision map to the camera's viewing angle.

[0129] In one embodiment, when the processor 502 implements the step of segmenting the image and the high-precision map, determining the target object contour and calculating the approximation of the segmented image to obtain contour information, the processor 502 specifically implements the following steps:

[0130] The image and the high-precision map are segmented using an image segmentation model, and the contour of the target object is extracted from the segmented image to generate a mask; the similarity between the mask and the corresponding area in the high-precision map is calculated, and similar graphics are determined through the similarity and a preset threshold to obtain contour information.

[0131] In one embodiment, when the processor 502 implements the step of calculating the similarity between the mask and the corresponding area in the high-precision map, and determining similar graphics by the similarity and a preset threshold to obtain contour information, the processor 502 specifically implements the following steps:

[0132] The structural similarity index is used to calculate the similarity between the mask and the corresponding area in the high-precision map, and similar graphics are determined by the similarity and a preset threshold to obtain contour information.

[0133] In one embodiment, when the processor 502 implements the step of extracting key fixed points from the contour information to obtain the position of the target object, the processor 502 specifically implements the following steps:

[0134] The Douglas-Peucker algorithm is used to perform polygonal approximation on the extracted contour and extract key vertices to obtain the position of the target object.

[0135] In one embodiment, when the processor 502 implements the step of converting the coordinates of the target object position in combination with the high-precision map to obtain longitude and latitude information, the processor 502 specifically implements the following steps:

[0136] The target object position is converted into high-precision map coordinates through the inverse transformation of the homography matrix, and further converted into geographic coordinates to obtain longitude and latitude information.

[0137] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0138] It can be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.

[0139] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein when the computer program is executed by a processor, the processor executes the following steps:

[0140] Acquire an image taken by a camera and a corresponding high-precision map; project the high-precision map to the camera's viewing angle based on the image; segment the image and the high-precision map, determine the target object contour and calculate the approximation of the segmented image to obtain contour information; extract key fixed points from the contour information to obtain the target object position; and perform coordinate conversion on the target object position in combination with the high-precision map to obtain longitude and latitude information.

[0141] In one embodiment, when the processor executes the computer program to implement the step of projecting the high-precision map to the camera viewing angle according to the image, the processor specifically implements the following steps:

[0142] A number of corresponding points are selected from the image taken by the camera and the high-precision map; a homography matrix is ​​established for the corresponding points using the findHomography function in OpenCV to project the high-precision map to the camera's viewing angle.

[0143] In one embodiment, when the processor executes the computer program to implement the step of segmenting the image and the high-precision map, determining the target object contour and calculating the approximation of the segmented image to obtain contour information, the processor specifically implements the following steps:

[0144] The image and the high-precision map are segmented using an image segmentation model, and the contour of the target object is extracted from the segmented image to generate a mask; the similarity between the mask and the corresponding area in the high-precision map is calculated, and similar graphics are determined through the similarity and a preset threshold to obtain contour information.

[0145] In one embodiment, when the processor executes the computer program to realize the step of calculating the similarity between the mask and the corresponding area in the high-precision map, and determining similar graphics through the similarity and a preset threshold to obtain contour information, the processor specifically implements the following steps:

[0146] The structural similarity index is used to calculate the similarity between the mask and the corresponding area in the high-precision map, and similar graphics are determined by the similarity and a preset threshold to obtain contour information.

[0147] In one embodiment, when the processor executes the computer program to implement the step of extracting key fixed points from the contour information to obtain the position of the target object, the processor specifically implements the following steps:

[0148] The Douglas-Peucker algorithm is used to perform polygonal approximation on the extracted contour and extract key vertices to obtain the position of the target object.

[0149] In one embodiment, when the processor executes the computer program to implement the step of converting the coordinates of the target object position in combination with the high-precision map to obtain longitude and latitude information, the processor specifically implements the following steps:

[0150] The target object position is converted into high-precision map coordinates through the inverse transformation of the homography matrix, and further converted into geographic coordinates to obtain longitude and latitude information.

[0151] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.

[0152] Those of ordinary skill 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, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have 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.

[0153] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0154] The steps in the method of the embodiment of the present invention can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present invention can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0155] 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 storage medium. Based on this understanding, the technical solution of the present invention is essentially 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, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.

[0156] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A camera calibration method, characterized in that: include: Get the images taken by the camera and the corresponding high-precision map; Projecting the high-precision map to a camera viewing angle according to the image; Segmenting the image and the high-precision map, and determining the contour of the target object and calculating the approximation of the segmented image to obtain contour information; Extracting key points from the contour information to obtain the position of the target object; The target object position is combined with the high-precision map to perform coordinate conversion to obtain longitude and latitude information.

2. The camera calibration method according to claim 1, characterized in that: The step of projecting the high-precision map to a camera viewing angle according to the image includes: Selecting a plurality of corresponding points from the image captured by the camera and the high-precision map; The findHomography function in OpenCV is used to establish a homography matrix for the corresponding points to project the high-precision map to the camera's perspective.

3. The camera calibration method according to claim 1, characterized in that: The step of segmenting the image and the high-precision map, and determining the contour of the target object and calculating the approximation of the segmented image to obtain contour information includes: Using an image segmentation model to segment the image and the high-precision map, and extracting the contour of the target object from the segmented image to generate a mask; The similarity between the mask and the corresponding area in the high-precision map is calculated, and similar graphics are determined by the similarity and a preset threshold to obtain contour information.

4. The camera calibration method according to claim 3, characterized in that: The calculating the similarity between the mask and the corresponding area in the high-precision map, and determining similar graphics by the similarity and a preset threshold to obtain contour information, includes: The structural similarity index is used to calculate the similarity between the mask and the corresponding area in the high-precision map, and similar graphics are determined by the similarity and a preset threshold to obtain contour information.

5. The camera calibration method according to claim 1, characterized in that: The extracting key fixed points of the contour information to obtain the position of the target object includes: The Douglas-Peucker algorithm is used to perform polygonal approximation on the extracted contour and extract key vertices to obtain the position of the target object.

6. The camera calibration method according to claim 1, characterized in that: The coordinate conversion of the target object position in combination with the high-precision map to obtain longitude and latitude information includes: The target object position is converted into high-precision map coordinates through the inverse transformation of the homography matrix, and further converted into geographic coordinates to obtain longitude and latitude information.

7. A camera calibration device, characterized in that: include: An acquisition unit, used to acquire images taken by the camera and corresponding high-precision maps; A projection unit, used for projecting the high-precision map to a camera viewing angle according to the image; A contour information extraction unit, used to segment the image and the high-precision map, and determine the contour of the target object and calculate the approximation of the segmented image to obtain contour information; A position determination unit, used for extracting key fixed points from the contour information to obtain the position of the target object; The conversion unit is used to convert the coordinates of the target object position in combination with the high-precision map to obtain longitude and latitude information.

8. The camera calibration device according to claim 7, characterized in that: The projection unit comprises: A screening subunit, used for screening a number of corresponding points from the image taken by the camera and the high-precision map; The matrix establishment subunit is used to establish a homography matrix for the corresponding points using the findHomography function in OpenCV, so as to project the high-precision map to the camera's viewing angle.

9. A computer device, characterized in that: The computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 6 when executing the computer program.

10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.