A fast calibration method with unknown camera parameters
By establishing annotation points and conversion models within the field of view of the vehicle-mounted camera, the problem of camera calibration under unknown camera parameters is solved, fast and accurate pixel coordinate conversion is achieved, and support is provided for medium-precision map updating and image data use.
Patent Information
- Application Number
- CN202210119286.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-08
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2042-02-08
AI Technical Summary
In the case where all camera parameters cannot be obtained, it is difficult for the prior art to effectively perform camera calibration, especially in vehicle-mounted photography equipment, which affects the accuracy of road information extraction.
By establishing rectangular grid-shaped annotation points within the camera's field of view, the image pixel coordinates of the annotation points are obtained, and a conversion model between the image pixel coordinates and the actual coordinates is established, and then the actual coordinates of any point are calculated during vehicle driving.
It realizes the rapid completion of camera calibration tasks under the condition of unknown camera parameters, and can accurately convert pixel coordinates into relative positions. It is suitable for fields such as medium-precision map updating and image data use. The test results show that it has an error accuracy within 10cm in specific scenes. .
Smart Images

Figure CN114627190B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of camera calibration, and in particular to a fast calibration method when camera parameters are unknown. Background Art
[0002] With the advent of the era of crowdsourcing mapping, using on-board photography equipment to extract road information has become a common practice for manufacturers. In this application scenario, image calibration technology can calculate the relative position of elements in the photographed image with respect to the camera. This calculation step requires many parameters, including lens elevation, pitch angle, focal length and other information. In actual operations, not all lens manufacturers can accurately provide the required parameters. Summary of the invention
[0003] In view of the technical problems existing in the prior art, the present invention provides a fast calibration method under the condition of unknown camera parameters. When all camera parameters cannot be obtained, the camera calibration task is completed. The method can be used to convert pixel coordinates into relative positions, providing support for the fields of medium-precision map updating and image data use.
[0004] According to a first aspect of the present invention, a fast calibration method is provided in the case of unknown camera parameters, comprising: step 1, establishing various marking points forming a rectangular grid shape within the field of view of a camera fixed to the front end of a vehicle, and determining the actual coordinates of each of the marking points in an actual coordinate system parallel to the ground with the camera position as the origin;
[0005] Step 2, obtaining the image pixel coordinates of each marked point in the image captured by the camera, and establishing a conversion model between the image pixel coordinates of the marked point and the actual coordinates;
[0006] Step 3, when an image is captured during the driving process of the vehicle, the actual coordinates of any point in the image are determined according to the image pixel coordinates of the point and the transformation model.
[0007] Based on the above technical solution, the present invention can also make the following improvements.
[0008] Optionally, in the coordinate system of the actual coordinate system and the image pixel coordinate system, the camera direction is set as the X axis;
[0009] The process of determining the actual coordinates (X0, Y0) of any point in the image according to the image pixel coordinates (x0, y0) of the point in step 3 includes:
[0010] Performing forward distance fitting on the image pixel coordinates corresponding to a plurality of annotated points having the same X-axis coordinate of the actual coordinate system, and determining X0 according to the forward distance fitting result;
[0011] Perform lateral distance fitting on the image pixel coordinates corresponding to a plurality of marked points having the same Y-axis coordinate of the actual coordinate system, and determine Y0 according to the lateral distance fitting result.
[0012] Optionally, the process of calculating X0 according to the conversion model includes:
[0013] Step 301, obtaining the image pixel coordinates of each annotation point when the X-axis coordinates in the actual coordinate system are X1, X2, ..., and fitting the image pixel coordinates of each annotation point when the X-axis coordinates are the same using a quadratic function fitting method to obtain respective fitting functions y=f1(x), y=f2(x), ...;
[0014] Step 302: Substitute x=x0 into each of the fitting functions to obtain a point sequence [(x0, y 01 ),(x0,y 02 )……], convert x0 into the corresponding X-axis coordinates X1, X2, … in the actual coordinate system, and obtain the point sequence [(X1, y 01 ),(X2,y 02 )……], the horizontal and vertical relationship is reversed to obtain the reverse point sequence [(y 01 ,X1),(y 02 ,X2)……];
[0015] Step 303, fitting the flip point sequence to obtain a forward distance fitting function ahead = f_ahead (y), substituting y0 into the forward distance fitting function to obtain X0 = f_ahead (y0).
[0016] Optionally, in the process of obtaining the image pixel coordinates of each marked point when the X-axis coordinates in the actual coordinate system are X1, X2, ... in step 301, five sets of image pixel coordinate data corresponding to the marked points on the horizontal lines at 3.15 meters, 4.15 meters, 5.15 meters, 6.15 meters and 7.15 meters in front of the vehicle are obtained.
[0017] Optionally, the process of calculating Y0 according to the conversion model includes:
[0018] Step 304, obtaining the image pixel coordinates of each marked point when the Y-axis coordinates in the actual coordinate system are ±Y1, ..., and fitting the image pixel coordinates of each marked point when the Y-axis coordinates are the same using a quadratic function fitting method to obtain each fitting function x=g 11 (y), x=g 12 (y)……;
[0019] Step 305: Substitute y=y0 into each of the fitting functions to obtain a point sequence [(x 110 ,y0),(x 120,y0)……], convert y0 into the corresponding X-axis coordinates -Y1, Y1, … in the actual coordinate system, and obtain the conversion point sequence [(x 110 ,-Y1),(x 120 ,Y1)……];
[0020] Step 306, fitting the conversion point sequence to obtain a function of the left and right lateral distance with respect to the x value, horizon = f_horizon(x), and substituting x0 into the left and right lateral distance fitting function to obtain Y0 = f_horizon(x0).
[0021] Optionally, in the process of obtaining the image pixel coordinates of each annotation point when the Y-axis coordinates in the actual coordinate system are ±Y1, ... in step 304, six sets of image pixel coordinate data corresponding to the annotation points on the vertical lines of 1 meter, 2 meters and 3 meters on the left and right sides of the vehicle are obtained.
[0022] According to a second aspect of the present invention, there is provided a rapid calibration system in the case of unknown camera parameters, comprising: a marking point establishment module, a conversion model determination module and an actual coordinate calculation module;
[0023] The marking point establishment module is used to establish various marking points forming a rectangular grid shape within the field of view of the camera fixed at the front end of the vehicle, and determine the actual coordinates of each of the marking points in an actual coordinate system parallel to the ground with the camera position as the origin;
[0024] The conversion model determination module is used to obtain the image pixel coordinates of each marked point in the image taken by the camera, and establish a conversion model between the image pixel coordinates of the marked point and the actual coordinates;
[0025] The actual coordinate calculation module is used to determine the actual coordinates of any point in the image according to the image pixel coordinates of the point and the transformation model when taking an image during the vehicle driving process.
[0026] According to a third aspect of the present invention, there is provided an electronic device, comprising a memory and a processor, wherein the processor is used to implement the steps of a fast calibration method in the case of unknown camera parameters when executing a computer management program stored in the memory.
[0027] According to a fourth aspect of the present invention, there is provided a computer-readable storage medium on which a computer management program is stored. When the computer management program is executed by a processor, the steps of a fast calibration method in the case of unknown camera parameters are implemented.
[0028] The present invention provides a method, system, electronic device and storage medium for rapid calibration in the case of unknown camera parameters. When all camera parameters cannot be obtained, the camera calibration task is completed and can be used to convert pixel coordinates into relative positions. A calculation function of the forward distance is obtained by fitting multiple sets of data when the forward distance is fixed, and a calculation function of the lateral distance is obtained by fitting multiple sets of data when the lateral distance is fixed. The fitting process is simple and the fitting result is accurate. It has been proved through actual tests that the error accuracy is within 10 cm in a limited scene where there is no obvious change in the slope of the shooting road and the calculation point is within the calibration range. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 A design drawing for laying tape on a site provided by an embodiment of the present invention;
[0030] Figure 2 A captured image of a scene provided by an embodiment of the present invention;
[0031] Figure 3 A labeled diagram of a captured image of a scene provided by an embodiment of the present invention;
[0032] Figure 4 A top view conversion diagram of a scene provided by an embodiment of the present invention;
[0033] Figure 5 A driving capture image provided by an embodiment of the present invention;
[0034] Figure 6 The embodiment of the present invention provides Figure 5 The overhead overlay image corresponding to the driving capture image;
[0035] Figure 7 A schematic diagram of a coordinate system for fitting pixel coordinate columns when calculating forward distance provided by an embodiment of the present invention;
[0036] Figure 8 A schematic diagram of a coordinate system for fitting a flip point sequence when calculating a forward distance provided by an embodiment of the present invention;
[0037] Fig. 9 A schematic diagram of a coordinate system for fitting pixel coordinate columns when calculating a horizontal distance provided by an embodiment of the present invention;
[0038] Fig.10 A schematic diagram of a coordinate system for fitting a transformation point sequence when calculating a lateral distance provided by an embodiment of the present invention;
[0039] Fig.11 A structural block diagram of a fast calibration system under unknown camera parameters provided by the present invention;
[0040] Fig.12A schematic diagram of the hardware structure of a possible electronic device provided by the present invention;
[0041] Fig.13 A schematic diagram of the hardware structure of a possible computer-readable storage medium provided by the present invention. DETAILED DESCRIPTION
[0042] The principles and features of the present invention are described below in conjunction with the accompanying drawings. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.
[0043] The present invention provides a fast calibration method under unknown camera parameters, comprising:
[0044] Step 1: Establish various marking points forming a rectangular grid shape within the field of view of a camera fixed at the front end of the vehicle, and determine the actual coordinates of each marking point in an actual coordinate system parallel to the ground with the camera position as the origin.
[0045] In a specific implementation, the camera can be fixed somewhere on the front windshield of the vehicle so that it is relatively stationary with respect to the vehicle.
[0046] The marking points are established with the help of marking tools, such as laying tape in a rectangular grid shape with fixed distances on an open flat area, such as Figure 1 Shown is a design diagram for laying tape on a site provided by an embodiment of the present invention.
[0047] Step 2, obtain the image pixel coordinates of each marked point in the image taken by the camera, and establish a conversion model between the image pixel coordinates of the marked point and the actual coordinates; drive to the scene where the tape is laid to take the picture, such as Figure 2 The picture shown is a captured image of a scene provided by an embodiment of the present invention, and the image pixel coordinates of each marked point are obtained, such as Figure 3 FIG. 4 is a diagram showing a labeled image of a scene provided by an embodiment of the present invention. Figure 4 The diagram shown is a top-down conversion diagram of a scene provided by an embodiment of the present invention, showing the actual position relationship between each marker point in the captured image and the vehicle.
[0048] Step 3: When the vehicle is driving and taking an image, the actual coordinates of any point in the image are determined according to the image pixel coordinates and the transformation model. Specifically, the vehicle can take an image as needed during driving, such as Figure 5 The figure shows a driving capture image provided by an embodiment of the present invention. Figure 6 The embodiment of the present invention is shown in Figure 5 The overhead overlay image corresponding to the driving capture image shows the actual position relationship between any point in the driving capture image and the vehicle.
[0049] The present invention provides a fast calibration method under unknown camera parameters, which completes the camera calibration task when all camera parameters cannot be obtained. It can be used to convert pixel coordinates into relative positions, providing support for fields such as medium-precision map updates and image data use.
[0050] Example 1
[0051] Embodiment 1 provided by the present invention is an embodiment of a fast calibration method provided by the present invention in the case of unknown camera parameters. The embodiment of the fast calibration method includes:
[0052] Step 1: Establish various marking points forming a rectangular grid shape within the field of view of a camera fixed at the front end of the vehicle, and determine the actual coordinates of each marking point in an actual coordinate system parallel to the ground with the camera position as the origin.
[0053] Step 2: Obtain the image pixel coordinates of each marked point in the image captured by the camera, and establish a conversion model between the image pixel coordinates of the marked point and the actual coordinates.
[0054] Step 3: when an image is captured while the vehicle is driving, the actual coordinates of any point in the image are determined based on the image pixel coordinates and the transformation model.
[0055] In a possible embodiment, in the coordinate system of the actual coordinate system and the image pixel coordinate system, the camera direction is set as the X axis.
[0056] The process of determining the actual coordinates (X0, Y0) of any point in the image according to the image pixel coordinates (x0, y0) of the point in step 3 includes:
[0057] Perform forward distance fitting on the image pixel coordinates corresponding to multiple annotated points with the same X-axis coordinates in the actual coordinate system, and determine X0 based on the forward distance fitting results.
[0058] Perform lateral distance fitting on the image pixel coordinates corresponding to multiple marked points with the same Y-axis coordinate of the actual coordinate system, and determine Y0 based on the lateral distance fitting result.
[0059] In a possible embodiment, the process of calculating X0 according to the conversion model includes:
[0060] Step 301, obtain the image pixel coordinates of each annotation point when the X-axis coordinates in the actual coordinate system are X1, X2, ..., and use the quadratic function fitting method to fit the image pixel coordinates of each annotation point when the X-axis coordinates are the same, and obtain the fitting functions y=f1(x), y=f2(x), ... respectively.
[0061] Step 302: Substitute x=x0 into each fitting function to obtain the point sequence [(x0,y 01),(x0,y 02 )……], convert x0 into the corresponding X-axis coordinates X1, X2, … in the actual coordinate system, and obtain the point sequence [(X1, y 01 ),(X2,y 02 )……], the horizontal and vertical relationship is reversed to obtain the reverse point sequence [(y 01 ,X1),(y 02 ,X2)……].
[0062] Step 303, fitting the flip point sequence to obtain a forward distance fitting function ahead = f_ahead (y), substituting y0 into the forward distance fitting function to obtain X0 = f_ahead (y0).
[0063] In the specific implementation, in step 301, in the process of obtaining the image pixel coordinates of each marked point when the X-axis coordinates in the actual coordinate system are X1, X2, ..., five sets of image pixel coordinate data corresponding to the marked points on the horizontal lines at 3.15 meters, 4.15 meters, 5.15 meters, 6.15 meters and 7.15 meters in front of the vehicle are obtained.
[0064] In a specific implementation, the X-axis coordinate in the actual coordinate system is used to determine the forward distance in front of the vehicle head.
[0065] In step 301, for example, the horizontal line 3.15 meters ahead can be marked as:
[0066] Ahead 3.15 :[(x1,y1),(x2,y2),(x3,y3)……], use the quadratic function fitting method to fit this set of data to y=f1(x), x is the horizontal coordinate and y is the vertical coordinate. Fit 4.15 meters, 5.15 meters, 6.15 meters and 7.15 meters in front to get y=f2(x), y = f3(x), y = f4(x) and y=f5(x) respectively.
[0067] like Figure 7 A schematic diagram of a coordinate system for fitting pixel coordinate columns when calculating forward distance provided by an embodiment of the present invention.
[0068] Step 302, calculate when x is x0, y 01 = f1(x0),y 02 = f2(x0),y 03 = f3(x0),y 04 =f4(x0), y 05 =f5(x0).
[0069] That is, we get a point sequence with five points:
[0070] [(x0,y 01),(x0,y 02 ),(x0,y 03 ),(x0,y 04 ),(x0,y 05 )].
[0071] Convert x0 to forward distance, in this case to a sequence of points:
[0072] [(3.15,y 01 ),(4.15,y 02 ),(5.15,y 03 ),(6.15,y 04 ),(7.15,y 05 )].
[0073] Reverse the horizontal and vertical relationship of the point series to:
[0074] [(y 01 ,3.15),(y 02 ,4.15),(y 03 ,5.15),(y 04 ,6.15),(y 05 , 7.15)].
[0075] Fitting the point sequence yields ahead = f_ahead(y), which is a function that converts the pixel y coordinate into the forward distance.
[0076] like Figure 8 A schematic diagram of a coordinate system for fitting a flip point sequence when calculating a forward distance provided by an embodiment of the present invention.
[0077] Step 303, substitute the pixel coordinates to calculate the forward distance. In this example, the pixel to be calculated is (x0, y0) in step 302, then substitute y0 into the fitting formula ahead = f_ahead (y) to obtain the forward distance ahead0.
[0078] In a possible embodiment, the process of calculating Y0 according to the conversion model includes:
[0079] Step 304, obtaining the image pixel coordinates of each annotation point when the Y-axis coordinates in the actual coordinate system are ±Y1, ..., and fitting the image pixel coordinates of each annotation point when the Y-axis coordinates are the same using a quadratic function fitting method to obtain each fitting function x=g 11 (y), x=g 12 (y)…….
[0080] Step 305, substitute y=y0 into each fitting function to obtain the point sequence [(x 110 ,y0),(x 120,y0)……], convert y0 into the corresponding X-axis coordinates in the actual coordinate system -Y1, Y1, …, and obtain the conversion point sequence [(x 110 ,-Y1),(x 120 ,Y1)……].
[0081] Step 306, fit the conversion point sequence to obtain a function of the left and right lateral distance with respect to the x value, horizon = f_horizon(x), and substitute x0 into the left and right lateral distance fitting function to obtain Y0 = f_horizon(x0).
[0082] In the specific implementation, in step 304, when the image pixel coordinates of each annotation point are obtained when the Y-axis coordinates in the actual coordinate system are ±Y1, ..., six sets of image pixel coordinate data corresponding to the annotation points on the vertical lines of 1 meter, 2 meters and 3 meters on the left and right sides of the vehicle are obtained.
[0083] In a specific implementation, the X-axis coordinate in the actual coordinate system is used to determine the forward distance in front of the vehicle head.
[0084] In step 304, for example, the vertical line 1.0 meters to the left of the vehicle may be marked as:
[0085] Left 1.0 :[(x1,y1),(x2,y2),(x3,y3)……]
[0086] It means that the 1.0 meter line on the left side is composed of (x1,y1) (x2,y2)... pixels in the image.
[0087] Different from the calculation of the front-line distance, since the horizontal difference of the vertical line is small, the coordinates are flipped horizontally and vertically before fitting, and the fitting results are as follows for 1 meter on the left, 2 meters on the left, 3 meters on the left, 1 meter on the right, 2 meters on the right, and 3 meters on the right:
[0088] x=g 11 (y),x=g 12 (y),x=g 13 (y),x=g 21 (y),x=g 22 (y),x=g 23 (y)
[0089] Indicates the change relationship of the x coordinate with respect to the y coordinate.
[0090] Note: If geometric distortion is considered, cubic function fitting should be used; if not, linear function fitting should be used.
[0091] like Fig. 9 A schematic diagram of a coordinate system for fitting pixel coordinate columns when calculating lateral distances provided by an embodiment of the present invention.
[0092] In step 305, the pixel coordinates to be calculated are obtained and a second fitting is performed. If the pixel to be calculated is (x0, y0), the x value of each fitting function is calculated when y=y0, and the x values are obtained respectively. 110 ,x 120 ,x 130 ,x 210 ,x 220 ,x 230 . The point sequence is obtained similarly to the forward distance calculation:
[0093] [(x 110 ,-1),(x 120 ,-2),(x 130 ,-3),(x 210 ,1),(x 220 ,2),(x 230 ,3)].
[0094] Fitting the point sequence yields the function of the left and right lateral distances with respect to the x value, horizon = f_horizon(x).
[0095] like Fig.10 A schematic diagram of a coordinate system for fitting a transformation point sequence when calculating a lateral distance provided by an embodiment of the present invention.
[0096] In step 306, the pixel coordinates are substituted to calculate the left and right distances. In this example, the pixel to be calculated is (x0, y0) in step 305, so x0 is substituted into the fitting formula horizon = f_horizon(x) to obtain the forward distance horizon0.
[0097] After steps 301 - 306 , the relative coordinates corresponding to the pixel (x0, y0) are calculated to be ahead 0 meters in front and horizon 0 meters on the left and right.
[0098] Example 2
[0099] Embodiment 2 provided by the present invention is an embodiment of a fast calibration system under unknown camera parameters provided by the present invention. Fig.11 A structure diagram of a fast calibration system for unknown camera parameters provided by an embodiment of the present invention, combined with Fig.11 It can be seen that this embodiment includes: a marking point establishment module, a conversion model determination module and an actual coordinate calculation module.
[0100] The marking point establishment module is used to establish various marking points forming a rectangular grid shape within the field of view of the camera fixed at the front end of the vehicle, and determine the actual coordinates of each marking point in an actual coordinate system parallel to the ground with the camera position as the origin.
[0101] The conversion model determination module is used to obtain the image pixel coordinates of each marked point in the image taken by the camera and establish a conversion model between the image pixel coordinates of the marked point and the actual coordinates.
[0102] The actual coordinate calculation module is used to determine the actual coordinates of any point in the image according to the image pixel coordinates and the transformation model when shooting an image during vehicle driving.
[0103] It can be understood that the fast calibration system under unknown camera parameters provided by the present invention corresponds to the fast calibration method under unknown camera parameters provided by the aforementioned embodiments. The relevant technical features of the fast calibration system under unknown camera parameters can refer to the relevant technical features of the fast calibration method under unknown camera parameters, which will not be repeated here.
[0104] See also Fig.12 , Fig.13 Schematic diagram of an electronic device provided by an embodiment of the present invention. Fig.12 As shown, an embodiment of the present invention provides an electronic device, including a memory 1310, a processor 1320, and a computer program 1311 stored in the memory 1310 and executable on the processor 1320. When the processor 1320 executes the computer program 1311, the following steps are implemented: establishing various marking points forming a rectangular grid shape within the field of view of a camera fixed at the front end of a vehicle, and determining the actual coordinates of each marking point in an actual coordinate system parallel to the ground with the camera position as the origin; obtaining the image pixel coordinates of each marking point in the image taken by the camera, and establishing a conversion model between the image pixel coordinates of the marking point and the actual coordinates; when taking an image during vehicle driving, determining the actual coordinates of any point in the image based on the image pixel coordinates of the point and the conversion model.
[0105] See also Fig.13 , Fig.13 Schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. Fig.13 As shown, this embodiment provides a computer-readable storage medium 1400, on which a computer program 1411 is stored. When the computer program 1411 is executed by a processor, the following steps are implemented: establishing various marking points that form a rectangular grid shape within the field of view of a camera fixed at the front end of a vehicle, and determining the actual coordinates of each marking point in an actual coordinate system parallel to the ground with the camera position as the origin; obtaining the image pixel coordinates of each marking point in the image taken by the camera, and establishing a conversion model between the image pixel coordinates of the marking point and the actual coordinates; when taking an image while the vehicle is driving, determining the actual coordinates of any point in the image based on the image pixel coordinates of the point and the conversion model.
[0106] The embodiments of the present invention provide a method, system, electronic device and storage medium for rapid calibration in the case of unknown camera parameters. When all camera parameters cannot be obtained, the camera calibration task is completed and can be used to convert pixel coordinates into relative positions. A calculation function of the forward distance is obtained by fitting multiple sets of data when the forward distance is fixed, and a calculation function of the lateral distance is obtained by fitting multiple sets of data when the lateral distance is fixed. The fitting process is simple and the fitting result is accurate. Actual tests have proved that the error accuracy is within 10 cm in a limited scenario where there is no obvious change in the slope of the road being photographed and the calculation point is within the calibration range.
[0107] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0108] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0109] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0110] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0111] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0112] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0113] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A fast calibration method for unknown camera parameters, characterized in that: The rapid calibration method comprises: Step 1, establishing various marking points forming a rectangular grid shape within the field of view of a camera fixed at the front end of the vehicle, and determining the actual coordinates of each of the marking points in an actual coordinate system parallel to the ground with the camera position as the origin; Step 2, obtaining the image pixel coordinates of each marked point in the image captured by the camera, and establishing a conversion model between the image pixel coordinates of the marked point and the actual coordinates; Step 3, when an image is captured while the vehicle is driving, the actual coordinates of any point in the image are determined according to the image pixel coordinates of the point and the transformation model; In the coordinate system of the actual coordinate system and the image pixel coordinate system, the camera direction is set to the X axis; The process of determining the actual coordinates (X0, Y0) of any point in the image according to the image pixel coordinates (x0, y0) of the point in step 3 includes: Performing forward distance fitting on the image pixel coordinates corresponding to a plurality of annotated points having the same X-axis coordinate of the actual coordinate system, and determining X0 according to the forward distance fitting result; Perform lateral distance fitting on the image pixel coordinates corresponding to a plurality of marked points having the same Y-axis coordinate of the actual coordinate system, and determine Y0 according to the lateral distance fitting result.
2. The inference method according to claim 1, characterized in that: The process of determining X0 based on the forward distance fitting result includes: Step 301, obtaining the image pixel coordinates of each annotation point when the X-axis coordinates in the actual coordinate system are X1, X2, ..., and fitting the image pixel coordinates of each annotation point when the X-axis coordinates are the same using a quadratic function fitting method to obtain respective fitting functions y=f1(x), y=f2(x), ...; Step 302: Substitute x=x0 into each of the fitting functions to obtain a point sequence [(x0, y 01 ),(x0,y 02 )……], convert x0 into the corresponding X-axis coordinates X1, X2, … in the actual coordinate system, and obtain the point sequence [(X1, y 01 ),(X2,y 02 )……], the horizontal and vertical relationship is reversed to obtain the reverse point sequence [(y 01 ,X1),(y 02 ,X2)……]; Step 303, fitting the flip point sequence to obtain a forward distance fitting function ahead = f_ahead (y), substituting y0 into the forward distance fitting function to obtain X0 = f_ahead (y0).
3. The inference method according to claim 2, characterized in that: In the process of obtaining the image pixel coordinates of each marked point when the X-axis coordinates in the actual coordinate system are X1, X2, ... in step 301, five sets of image pixel coordinate data corresponding to the marked points on the horizontal lines at 3.15 meters, 4.15 meters, 5.15 meters, 6.15 meters and 7.15 meters in front of the vehicle are obtained.
4. The inference method according to claim 1, characterized in that: The process of determining Y0 based on the lateral distance fitting result includes: Step 304, obtaining the image pixel coordinates of each marked point when the Y-axis coordinates in the actual coordinate system are ±Y1, ..., and fitting the image pixel coordinates of each marked point when the Y-axis coordinates are the same using a quadratic function fitting method to obtain each fitting function x=g 11 (y), x=g 12 (y)……; Step 305: Substitute y=y0 into each of the fitting functions to obtain a point sequence [(x 110 ,y0),(x 120 ,y0)……], convert y0 into the corresponding X-axis coordinates -Y1, Y1, … in the actual coordinate system, and obtain the conversion point sequence [(x 110 ,-Y1),(x 120 ,Y1)……]; Step 306, fitting the conversion point sequence to obtain a function of the left and right lateral distance with respect to the x value, horizon = f_horizon(x), substituting x0 into the left and right lateral distance fitting function to obtain Y0 = f_horizon(x0).
5. The inference method according to claim 4, characterized in that: In the process of obtaining the image pixel coordinates of each marked point when the Y-axis coordinates in the actual coordinate system are ±Y1, ... in step 304, six sets of image pixel coordinate data corresponding to the marked points on the vertical lines of 1 meter, 2 meters and 3 meters on the left and right sides of the vehicle are obtained.
6. A fast calibration system with unknown camera parameters, characterized in that: The rapid calibration system comprises: a marking point establishment module, a conversion model determination module and an actual coordinate calculation module; The marking point establishment module is used to establish various marking points forming a rectangular grid shape within the field of view of the camera fixed at the front end of the vehicle, and determine the actual coordinates of each of the marking points in an actual coordinate system parallel to the ground with the camera position as the origin; The conversion model determination module is used to obtain the image pixel coordinates of each marked point in the image taken by the camera, and establish a conversion model between the image pixel coordinates of the marked point and the actual coordinates; The actual coordinate calculation module is used to determine the actual coordinates of any point in the image according to the image pixel coordinates of the point and the transformation model when the image is captured during the vehicle driving process; In the coordinate system of the actual coordinate system and the image pixel coordinate system, the camera direction is set to the X axis; The process of determining the actual coordinates (X0, Y0) of any point in the image according to the image pixel coordinates (x0, y0) of the point in step 3 includes: Performing forward distance fitting on the image pixel coordinates corresponding to a plurality of annotated points having the same X-axis coordinate of the actual coordinate system, and determining X0 according to the forward distance fitting result; Perform lateral distance fitting on the image pixel coordinates corresponding to a plurality of marked points having the same Y-axis coordinate of the actual coordinate system, and determine Y0 according to the lateral distance fitting result.
7. An electronic device, characterized in that: The invention comprises a memory and a processor, wherein the processor is used to implement the steps of the fast calibration method under unknown camera parameters as described in any one of claims 1 to 5 when executing the computer management program stored in the memory.
8. A computer-readable storage medium, characterized in that: A computer management program is stored thereon, and when the computer management program is executed by the processor, the steps of the fast calibration method under unknown camera parameters as described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Three-dimensional camera module group calibration method and device
CN108257182A
A lateral distance calibration method for forward object based on monocular camera
CN109087361A