Camera parameter detection method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202310070408.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-12
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2043-01-12
AI Technical Summary
[0005]本发明提供一种相机参数检测方法、装置、电子设备及存储介质,用以解决现有技术中相机参数检测效率低的缺陷,提高了相机参数检测的效率
[0032]本发明提供的相机参数检测方法、装置、电子设备及存储介质,通过相机获取车道线在地图中的位置信息,筛选出相互平行的车道线,由地图中的车道线数据获得所述车道线组成的车道宽度,比较车道宽度之间的差值,实现高精地图中相机参数准确性的检测过程,通过避免采集人员的实地打点,减少地图数据采集的时间,提升检测效率,提高采集人员的安全性。
Smart Images

Figure CN116071435B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent driving technology, and in particular to a camera parameter detection method, device, electronic device, and storage medium. Background Technology
[0002] High-precision maps, as dedicated maps for autonomous driving, are a crucial guarantee for the safe and stable operation of vehicles. Figure 1 Generally, images are acquired using cameras. The parameters of the camera change every time an image is acquired. In the process of converting image coordinates to geodetic coordinates, high-precision maps rely heavily on the accuracy of camera parameters. Therefore, the detection of camera parameters is a necessary process for generating accurate lanes in high-precision maps.
[0003] To test the accuracy of camera parameters, a common method is to manually mark random points during image acquisition and then compare the difference between the marked points and the calculated positions to determine the accuracy of the camera parameters. However, in areas with high vehicle speeds or heavy traffic, manual marking is difficult to perform, making it impossible to test the accuracy of camera parameters. In addition, manual marking during actual data acquisition requires getting out of the vehicle, which is time-consuming. Furthermore, the subsequent manual statistical verification process is complex and affects the detection efficiency.
[0004] Therefore, how to propose a method that can efficiently detect the accuracy of camera parameters has become an urgent problem to be solved. Summary of the Invention
[0005] This invention provides a camera parameter detection method, apparatus, electronic device, and storage medium to address the shortcomings of low efficiency in camera parameter detection in the prior art and improve the efficiency of camera parameter detection.
[0006] In a first aspect, the present invention provides a camera parameter detection method, comprising:
[0007] The location information of at least three adjacent first lane lines in the map is obtained, wherein the at least three adjacent first lane lines are parallel to each other, and the location information of the at least three adjacent first lane lines in the map is obtained by the camera;
[0008] Based on the data of the at least three adjacent first lane lines in the map, the width of at least two lanes formed by the at least three adjacent first lane lines is obtained;
[0009] The camera parameters of the camera are detected based on the difference between the widths of the at least two lanes.
[0010] According to a camera parameter detection method provided by the present invention, the step of detecting camera parameters based on the difference between the widths of the at least two lanes includes:
[0011] The camera parameters are determined to be accurate if the difference between the widths of the at least two lanes is less than or equal to a threshold.
[0012] If the difference between the widths of the at least two lanes is greater than the threshold, the camera parameters are determined to be inaccurate.
[0013] According to a camera parameter detection method provided by the present invention, the step of obtaining the position information of at least three adjacent first lane lines in a map includes:
[0014] Obtain the position information corresponding to each initial lane line in the initial lane line set acquired by the camera;
[0015] Based on the position information corresponding to each initial lane line in the initial lane line set acquired by the camera, at least three adjacent first lane lines that are parallel to each other are determined from the initial lane line set.
[0016] According to a camera parameter detection method provided by the present invention, the step of determining at least three adjacent parallel first lane lines from the initial lane line set based on the position information corresponding to each initial lane line in the initial lane line set acquired by the camera includes:
[0017] Based on the position information corresponding to each initial lane line in the initial lane line set, lane lines for special lanes are excluded from the initial lane line set;
[0018] The special lane includes at least one of the following:
[0019] Ramp, virtual lane, intersection, non-motorized vehicle lane, guide strip, overtaking lane.
[0020] According to a camera parameter detection method provided by the present invention, the step of determining at least three adjacent parallel first lane lines from the initial lane line set based on the position information corresponding to each initial lane line in the initial lane line set acquired by the camera includes:
[0021] Based on the position information corresponding to each initial lane line in the initial lane line set, adjacent but not parallel lane lines are excluded from the initial lane line set.
[0022] According to a camera parameter detection method provided by the present invention, the step of excluding adjacent but non-parallel lane lines from the initial lane line set based on the position information corresponding to each initial lane line in the initial lane line set includes:
[0023] Based on the position information corresponding to two adjacent second lane lines, N lane widths are obtained. The N lane widths correspond to the widths at N different positions on the lane formed by the two adjacent second lane lines. The two adjacent second lane lines are any two adjacent lane lines in the initial lane line set.
[0024] If the difference between any two lane widths in the N lane widths is greater than a second threshold, the two adjacent second lane lines are excluded from the initial lane line set.
[0025] Secondly, the present invention also provides a camera parameter detection device, comprising:
[0026] The location acquisition module is used to acquire the location information of at least three adjacent first lane lines in the map. The at least three adjacent first lane lines are parallel to each other, and the location information of the at least three adjacent first lane lines in the map is acquired by the camera.
[0027] The width acquisition module is used to obtain the width of at least two lanes formed by the at least three adjacent first lane lines based on the data of the at least three adjacent first lane lines in the map;
[0028] A detection module is used to detect camera parameters of the camera based on the difference between the widths of the at least two lanes.
[0029] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the camera parameter detection method as described above.
[0030] Fourthly, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the camera parameter detection method as described above.
[0031] Fifthly, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the camera parameter detection method as described above.
[0032] The camera parameter detection method, device, electronic device, and storage medium provided by this invention acquire the position information of lane lines in a map through a camera, filter out mutually parallel lane lines, obtain the lane width composed of the lane lines from the lane line data in the map, and compare the differences between the lane widths to realize the detection process of camera parameter accuracy in high-precision maps. By avoiding on-site point-by-point measurement by data collection personnel, the time for map data collection is reduced, the detection efficiency is improved, and the safety of data collection personnel is enhanced. Attached Figure Description
[0033] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0034] Figure 1 This is a flowchart illustrating the camera parameter detection method provided by the present invention;
[0035] Figure 2 This is a schematic diagram comparing the lane lines captured by the camera provided by the present invention with the actual lane lines.
[0036] Figure 3 This is a schematic diagram of the camera parameter detection device provided by the present invention;
[0037] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0038] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0039] Figure 1 This is a flowchart illustrating the camera parameter detection method provided by the present invention, as shown below. Figure 1 As shown, the method includes the following steps:
[0040] Step 100: Obtain the position information of at least three adjacent first lane lines in the map. The at least three adjacent first lane lines are parallel to each other. The position information of the at least three adjacent first lane lines in the map is obtained by the camera.
[0041] Optionally, the at least three adjacent first lane lines may be three adjacent parallel lane lines, four adjacent parallel lane lines, or five adjacent parallel lane lines, and the present invention does not limit them.
[0042] Optionally, the location information can be the latitude and longitude of the lane line or geodetic coordinates.
[0043] Optionally, the camera can be used to acquire the location information of lane lines in a map.
[0044] Optionally, the map can be a high-precision map.
[0045] Optionally, the camera can be a vehicle-mounted camera, a road monitoring camera, or a map image acquisition camera.
[0046] Optionally, the subject executing the camera parameter detection method can be an electronic device, a camera parameter detection device, or a device or apparatus with camera parameter detection function, or a high-precision map device.
[0047] Optionally, a camera can be used to capture road images to obtain the road image coordinates. Then, the image coordinates can be converted to geodetic coordinates through a projection transformation system to obtain the position information of the lane lines in the high-precision map. Parallel lane lines can then be obtained through road filtering technology.
[0048] Specifically, in order to detect the accuracy of camera parameters by comparing changes in road width, at least two parallel roads are required, and therefore at least three adjacent first lane lines are needed.
[0049] Step 101: Based on the data of the at least three adjacent first lane lines in the map, obtain the width of at least two lanes formed by the at least three adjacent first lane lines;
[0050] Optionally, the data may be lane line location information.
[0051] Optionally, the width of at least two lanes consisting of at least three adjacent first lane lines can be obtained from the data of the three adjacent first lane lines on the map.
[0052] Optionally, the at least two lanes can be two lanes, three lanes, or four lanes, depending on the number of lanes in the first lane.
[0053] Step 102: Detect the camera parameters of the camera based on the difference between the widths of the at least two lanes.
[0054] Specifically, the image coordinates of the road can be acquired by a camera, and the image coordinates can be converted into pixel coordinates through a three-dimensional projection relationship. Based on the pixel coordinates, the geodetic coordinates can be calculated by solving the coordinate transformation equation, thereby obtaining the position information of the lane lines. Then, the lane width can be calculated, and the accuracy of the camera parameters can be detected by comparing the differences between the lane widths.
[0055] This invention acquires the position information of lane lines on a map using a camera, filters out parallel lane lines, obtains the lane width formed by the lane lines from the lane line data in the map, and compares the differences between lane widths to realize the detection process of camera parameter accuracy in high-precision maps. By avoiding on-site point-by-point measurement by data collection personnel, it reduces map data collection time, improves detection efficiency, and enhances the safety of data collection personnel.
[0056] Optionally, detecting the camera parameters based on the difference between the widths of the at least two lanes includes:
[0057] The camera parameters are determined to be accurate if the difference between the widths of the at least two lanes is less than or equal to a threshold.
[0058] If the difference between the widths of the at least two lanes is greater than the threshold, the camera parameters are determined to be inaccurate.
[0059] Optionally, the threshold can be 0.1 meters, 0.05 meters, or 0.01 meters, and the present invention does not limit it.
[0060] Optionally, the threshold may be a preset value, an empirical value determined based on the experience of the testing personnel, or a value calculated based on a relevant algorithm; the present invention does not limit this.
[0061] Optionally, if the threshold is preset or calculated based on a relevant algorithm, after obtaining the lane width, the accuracy of the camera parameters can be detected by comparing the difference in lane width with the threshold using a high-precision map device and lane width comparison technology.
[0062] Optionally, if the threshold is an empirical value determined based on the experience of the inspector, then after obtaining the lane width, the inspector can calculate the lane width based on the high-precision map and detect the accuracy of the camera parameters by comparing the difference in lane width with the threshold.
[0063] Optionally, the relevant algorithm can be a neural network algorithm, cloud computing, or a backpropagation (BP) neural network algorithm, etc., and the present invention does not limit it.
[0064] Specifically, the image coordinates of the road can be acquired by a camera, and the image coordinates can be converted into pixel coordinates through a three-dimensional projection relationship. Based on the pixel coordinates, the geodetic coordinates can be calculated by solving the coordinate transformation equation, thereby obtaining the position information of the lane lines. Then, the lane width can be calculated, and the difference between lane widths can be judged by width comparison technology to determine whether the difference exceeds a threshold, thereby detecting whether the camera parameters of the camera are accurate.
[0065] Specifically, the conversion from image coordinates to geodetic coordinates is calculated according to a specific formula. The data is obtained by computer, so there are no calculation problems. If the camera parameters are inaccurate, the image coordinates captured by the camera will be inaccurate, and the converted geodetic coordinates will also be inaccurate. As a result, the calculated lanes will become wider or narrower, exceeding the normal lane width range. The difference in lane width will be greater than the threshold. Therefore, the accuracy of the camera parameters can be detected by the relationship between the difference in lane width and the threshold.
[0066] If the difference between lane widths is less than or equal to the threshold, it indicates that the error between the lane width calculated from the data collected by the camera and the actual lane width is small, and the camera parameters are accurate; if the difference between lane widths is greater than the threshold, it is determined that the camera parameters are inaccurate.
[0067] This invention achieves intelligent detection of camera parameter accuracy by determining whether the difference between lane widths exceeds a threshold, avoiding time-consuming, labor-intensive, complex, and difficult manual detection, thus improving detection efficiency and enhancing the safety of data collection personnel.
[0068] Optionally, obtaining the location information of at least three adjacent first lane lines on the map includes:
[0069] Obtain the position information corresponding to each initial lane line in the initial lane line set acquired by the camera;
[0070] Based on the position information corresponding to each initial lane line in the initial lane line set acquired by the camera, at least three adjacent first lane lines that are parallel to each other are determined from the initial lane line set.
[0071] Optionally, the initial lane line set can be a set of all lane lines collected by the camera of the high-precision map. The initial lane line set may include all ramps, virtual lanes, intersections, non-motorized vehicle lanes, guide strips, overtaking lanes, and normal lanes.
[0072] Specifically, the image coordinates of the road can be acquired by a camera, and the image coordinates can be converted into pixel coordinates through a three-dimensional projection relationship. Based on the pixel coordinates, the geodetic coordinates can be calculated by the coordinate transformation equation, and then the position information of all lane lines can be obtained. Based on the position information of the lane lines, at least three adjacent first lane lines that are parallel to each other can be selected.
[0073] This invention obtains the location information of all lane lines in a map and, based on road filtering technology, realizes the filtering process of at least three adjacent first lane lines that are parallel to each other. This prepares for the subsequent step of obtaining lane width, avoids time-consuming, labor-intensive, complex and difficult manual detection, improves detection efficiency, and enhances the safety of data collection personnel.
[0074] Optionally, determining at least three parallel first lane lines from the initial lane line set based on the position information corresponding to each initial lane line in the initial lane line set acquired by the camera includes:
[0075] Based on the position information corresponding to each initial lane line in the initial lane line set, lane lines for special lanes are excluded from the initial lane line set;
[0076] The special lane includes at least one of the following:
[0077] Ramp, virtual lane, intersection, non-motorized vehicle lane, guide strip, overtaking lane.
[0078] Optionally, the special lane can be any lane other than the lane formed by the first lane line, including at least one of the following: ramp, virtual lane, intersection, non-motorized vehicle lane, guide strip, overtaking lane, etc.
[0079] Optionally, the ramp can be a connecting section of road that connects the approach road and the main road. The curvature of the lane can be obtained based on the position information of the lane lines to determine whether the road has the attributes of a ramp, thereby eliminating ramps.
[0080] Optionally, the virtual lane can be a lane automatically generated by the map that does not actually exist. The parameters of the lane can be obtained based on the position information of the lane lines to determine whether the road has the characteristics of a virtual lane, thereby excluding virtual lanes.
[0081] Optionally, the intersection can be a place where two roads intersect. The geometric features of the lanes can be obtained based on the position information of the lane lines to determine whether the road has the characteristics of an intersection, thereby eliminating intersections.
[0082] Optionally, the non-motorized vehicle lane can be a lane on the road from the right-hand sidewalk curb to the first vehicle lane dividing line, or a lane marked out from the sidewalk. The width of the lane can be obtained based on the position information of the lane lines. If the width of the lane is significantly smaller than the width of other lanes and has the characteristics of a non-motorized vehicle lane, then the non-motorized vehicle lane is excluded.
[0083] Optionally, the guide strip can be a road located at an intersection that is too wide, irregular, or complex. The geometric features of the lanes can be obtained based on the position information of the lane lines to determine whether the road has the characteristics of a guide strip, thereby excluding guide strips.
[0084] Optionally, the overtaking lane can be a lane set up when the road reaches the standard of a two-way six-lane expressway. It can be located on the far left of the road. The position information of the lane line can be used to determine whether the road has the characteristics of an overtaking lane, thereby eliminating the overtaking lane.
[0085] Specifically, image coordinates of the road can be acquired by a camera, and the image coordinates can be converted into pixel coordinates through a three-dimensional projection relationship. Based on the pixel coordinates, the geodetic coordinates can be calculated by the coordinate transformation equation, thereby obtaining the position information of all lane lines. Based on the position information of the lane lines, lane lines of special lanes can be excluded by road screening technology. Among them, special lanes include at least one of the following: ramps, virtual lanes, intersections, non-motorized vehicle lanes, guide strips, and overtaking lanes.
[0086] This invention obtains the location information of all lane lines in a map and, based on road filtering technology, realizes the process of excluding special lanes, preparing for the subsequent step of obtaining the width of normal lanes. This avoids time-consuming, labor-intensive, complex, and difficult manual operations, improves detection efficiency, and enhances the safety of data collection personnel.
[0087] Optionally, determining at least three parallel first lane lines from the initial lane line set based on the position information corresponding to each initial lane line in the initial lane line set acquired by the camera includes:
[0088] Based on the position information corresponding to each initial lane line in the initial lane line set, adjacent but not parallel lane lines are excluded from the initial lane line set.
[0089] Optionally, the adjacent but not parallel lane lines can be lane lines when roads are separated or merged.
[0090] Specifically, image coordinates of the road can be acquired by a camera, and the image coordinates can be converted into pixel coordinates through three-dimensional projection relationships. Based on the pixel coordinates, the geodetic coordinates can be calculated by solving the coordinate transformation equation, thereby obtaining the position information of all lane lines. Based on the position information of the lane lines, lane width comparison technology can be used to exclude adjacent but not parallel lane lines.
[0091] This invention obtains the location information of all lane lines in a map and, based on road filtering technology, eliminates adjacent but not parallel lane lines, preparing for the subsequent step of obtaining the normal lane width. This avoids time-consuming, labor-intensive, complex, and difficult manual operations, improving detection efficiency and enhancing the safety of data collection personnel.
[0092] Optionally, the step of excluding adjacent but not parallel lane lines from the initial lane line set based on the position information corresponding to each initial lane line in the initial lane line set includes:
[0093] Based on the position information corresponding to two adjacent second lane lines, N lane widths are obtained. The N lane widths correspond to the widths at N different positions on the lane formed by the two adjacent second lane lines. The two adjacent second lane lines are any two adjacent lane lines in the initial lane line set.
[0094] If the difference between any two lane widths in the N lane widths is greater than a second threshold, the two adjacent second lane lines are excluded from the initial lane line set.
[0095] Figure 2 This is a schematic diagram comparing the lane lines captured by the camera provided by the present invention with the actual lane lines. In the diagram, the solid lines represent the actual positions of the lane lines, the dashed lines parallel to the solid lines represent the positions of the lane lines captured by the camera, and the horizontal dashed lines with double arrows represent the lane width obtained through projection.
[0096] like Figure 2 As shown, by projecting at equal intervals along the same lane, the lane widths at different locations along the same lane can be obtained. Based on the relationship between the differences in these lane widths and a threshold, two adjacent but not parallel lane lines can be excluded.
[0097] When camera parameters are inaccurate, the image coordinates captured by the camera will be inaccurate, and the calculated geodetic coordinates will also be inaccurate. As a result, the calculated lanes will become wider or narrower, exceeding the normal range of lane width. The width of each road can be obtained by projection. Therefore, the accuracy of camera parameters can be detected by the relationship between the difference in lane width and the threshold.
[0098] Optionally, the second lane line can be adjacent but not parallel lane lines.
[0099] Specifically, the image coordinates of the road are acquired by a camera, and the image coordinates are converted into pixel coordinates through a three-dimensional projection relationship. Based on the pixel coordinates, the geodetic coordinates are calculated by the coordinate transformation equation, and then the position information of all lane lines can be obtained. Based on the position information of the lane lines, lane lines of special lanes are excluded by road filtering technology, and then lane width comparison technology is used to exclude adjacent but not parallel lane lines. Finally, adjacent and parallel lane lines are obtained.
[0100] Optionally, after excluding lane lines of special lanes through road screening technology, the first lane line and the second lane line can be obtained. The left lane line in each lane can be projected onto the right lane line at intervals of M meters to obtain N lane widths. The N lane widths correspond to the widths at N different positions on the lane formed by the two adjacent second lane lines. By comparing the differences between the N lane widths, adjacent but not parallel lane lines are excluded.
[0101] Optionally, the left lane lines can be projected onto the right lane lines at 1-meter intervals.
[0102] Optionally, the left lane lines can be projected onto the right lane lines at intervals of 1.5 meters.
[0103] Optionally, the left lane line can be projected onto the right lane line at intervals of 2 meters.
[0104] Optionally, if the difference between any two lane widths among the N lane widths is greater than the second threshold, then the two adjacent but not parallel lane lines are excluded from the initial lane line set.
[0105] Optionally, if the difference between any two lane widths among the N lane widths is less than or equal to the second threshold, then the lane line corresponding to the lane is determined to be an adjacent and parallel lane line, i.e., the first lane line.
[0106] Optionally, the second threshold can be 0.05 meters, 0.1 meters, or 0.2 meters, and the present invention does not limit it.
[0107] This invention is based on lane width comparison technology. It projects the left lane line spacing M meters of each lane onto the right lane line to obtain the lane width of the same lane with the same spacing. By comparing the difference between these lane widths, it realizes the elimination process of adjacent but not parallel lane lines. By avoiding the need for data collection personnel to make on-site measurements, it reduces the time for map data collection, improves detection efficiency, and enhances the safety of data collection personnel.
[0108] The camera parameter detection device provided by the present invention is described below. The camera parameter detection device described below and the camera parameter detection method described above can be referred to in correspondence.
[0109] Figure 3 This is a schematic diagram of the camera parameter detection device provided by the present invention, as shown below. Figure 3 As shown, the device includes: a position acquisition module 301, a width acquisition module 302, and a detection module 303; wherein:
[0110] The location acquisition module 301 is used to acquire the location information of at least three adjacent first lane lines in the map, wherein the at least three adjacent first lane lines are parallel to each other, and the location information of the at least three adjacent first lane lines in the map is acquired by the camera;
[0111] The width acquisition module 302 is used to obtain the width of at least two lanes formed by the at least three adjacent first lane lines based on the data of the at least three adjacent first lane lines in the map;
[0112] The detection module 303 is used to detect the camera parameters of the camera based on the difference between the widths of the at least two lanes.
[0113] Specifically, the camera parameter detection device uses a position acquisition module 301 to acquire the position information of at least three adjacent first lane lines in the map, then uses a width acquisition module 302 to obtain the width of at least two lanes formed by the at least three adjacent first lane lines based on the data of the at least three adjacent first lane lines in the map, and finally uses a detection module 303 to detect the camera parameters of the camera based on the difference between the widths of the at least two lanes.
[0114] The camera parameter detection device provided by this invention acquires the position information of lane lines in a map through a camera, filters out parallel lane lines, obtains the lane width formed by the lane lines from the lane line data in the map, and compares the differences between lane widths to realize the detection process of camera parameter accuracy in high-precision maps. By avoiding on-site point-by-point measurement by data collection personnel, it reduces map data collection time, improves detection efficiency, and enhances the safety of data collection personnel.
[0115] Figure 4 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communication interface 420, and the memory 430 communicate with each other via the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a camera parameter detection method, which includes:
[0116] The location information of at least three adjacent first lane lines in the map is obtained, wherein the at least three adjacent first lane lines are parallel to each other, and the location information of the at least three adjacent first lane lines in the map is obtained by the camera;
[0117] Based on the data of the at least three adjacent first lane lines in the map, the width of at least two lanes formed by the at least three adjacent first lane lines is obtained;
[0118] The camera parameters of the camera are detected based on the difference between the widths of the at least two lanes.
[0119] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0120] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the camera parameter detection method provided by the methods described above, the method comprising:
[0121] The location information of at least three adjacent first lane lines in the map is obtained, wherein the at least three adjacent first lane lines are parallel to each other, and the location information of the at least three adjacent first lane lines in the map is obtained by the camera;
[0122] Based on the data of the at least three adjacent first lane lines in the map, the width of at least two lanes formed by the at least three adjacent first lane lines is obtained;
[0123] The camera parameters of the camera are detected based on the difference between the widths of the at least two lanes.
[0124] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0125] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0126] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting camera parameters, characterized in that, include: The location information of at least three adjacent first lane lines in the map is obtained, wherein the at least three adjacent first lane lines are parallel to each other, and the location information of the at least three adjacent first lane lines in the map is obtained by the camera; Based on the data of the at least three adjacent first lane lines in the map, the width of at least two lanes formed by the at least three adjacent first lane lines is obtained; wherein, obtaining the width of the lanes includes: obtaining N lane widths based on the position information corresponding to the adjacent lane lines respectively, wherein the N lane widths are obtained by projecting the left lane line of each lane onto the right lane line at a preset interval, and obtaining the lane widths at N different positions on the same lane; The camera parameters of the camera are detected based on the difference between the widths of the at least two lanes; the accuracy of the camera parameters is determined by comparing the changes in the width of the lanes. The step of detecting camera parameters based on the difference between the widths of the at least two lanes includes: The camera parameters are determined to be accurate if the difference between the widths of the at least two lanes is less than or equal to a threshold. If the difference between any two lane widths among the N lane widths is greater than the threshold, the camera parameters are determined to be inaccurate. The step of obtaining the location information of at least three adjacent first lane lines on the map includes: Obtain the position information corresponding to each initial lane line in the initial lane line set acquired by the camera; Based on the position information corresponding to each initial lane line in the initial lane line set acquired by the camera, at least three adjacent first lane lines that are parallel to each other are determined from the initial lane line set.
2. The camera parameter detection method according to claim 1, characterized in that, The determination of at least three parallel first lane lines from the initial lane line set acquired by the camera, based on the position information corresponding to each initial lane line, includes: Based on the position information corresponding to each initial lane line in the initial lane line set, lane lines for special lanes are excluded from the initial lane line set; The special lane includes at least one of the following: Ramp, virtual lane, intersection, non-motorized vehicle lane, guide strip, overtaking lane.
3. The camera parameter detection method according to claim 1 or 2, characterized in that, The determination of at least three parallel first lane lines from the initial lane line set acquired by the camera, based on the position information corresponding to each initial lane line, includes: Based on the position information corresponding to each initial lane line in the initial lane line set, adjacent but not parallel lane lines are excluded from the initial lane line set.
4. The camera parameter detection method according to claim 3, characterized in that, The step of excluding adjacent but not parallel lane lines from the initial lane line set based on the position information corresponding to each initial lane line in the initial lane line set includes: Based on the position information corresponding to two adjacent second lane lines, N lane widths are obtained. The N lane widths correspond to the widths at N different positions on the lane formed by the two adjacent second lane lines. The two adjacent second lane lines are any two adjacent lane lines in the initial lane line set. If the difference between any two lane widths in the N lane widths is greater than a second threshold, the two adjacent second lane lines are excluded from the initial lane line set.
5. A camera parameter detection device, characterized in that, The device includes: The location acquisition module is used to acquire the location information of at least three adjacent first lane lines in the map. The at least three adjacent first lane lines are parallel to each other, and the location information of the at least three adjacent first lane lines in the map is acquired by the camera. The width acquisition module is used to obtain the width of at least two lanes formed by the at least three adjacent first lane lines based on the data of the at least three adjacent first lane lines in the map; wherein, obtaining the width of the lanes includes: obtaining N lane widths based on the position information corresponding to the adjacent lane lines respectively, wherein the N lane widths are obtained by projecting the left lane line of each lane onto the right lane line at a preset interval, and obtaining the lane widths at N different positions on the same lane; A detection module is used to detect camera parameters of the camera based on the difference between the widths of the at least two lanes; and to detect the accuracy of the camera parameters by comparing the changes in the width of the lanes. The step of detecting camera parameters based on the difference between the widths of the at least two lanes includes: The camera parameters are determined to be accurate if the difference between the widths of the at least two lanes is less than or equal to a threshold. If the difference between any two lane widths among the N lane widths is greater than the threshold, the camera parameters are determined to be inaccurate. The step of obtaining the location information of at least three adjacent first lane lines on the map includes: Obtain the position information corresponding to each initial lane line in the initial lane line set acquired by the camera; Based on the position information corresponding to each initial lane line in the initial lane line set acquired by the camera, at least three adjacent first lane lines that are parallel to each other are determined from the initial lane line set.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the camera parameter detection method as described in any one of claims 1 to 4.
7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the camera parameter detection method as described in any one of claims 1 to 4.
8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the camera parameter detection method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Camera calibration method, lane departure early warning method and lane departure early warning system
CN111862231A
Binocular camera self-calibration method and system
CN111862235A
Pitch angle calibration method and device of image acquisition device, driving device and medium
CN115526940A