A wide-angle LMD distortion calibration method, correction method, device and equipment

By optimizing the calibration image of the wide-angle LMD and correcting local errors, the problem of poor distortion correction of the wide-angle lens is solved, high-precision distortion correction is achieved, and the cost and operational complexity are reduced.

CN118333915BActive Publication Date: 2024-09-13WUHAN JINGLI ELECTRONICS TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410740967.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-11
Publication Date
2024-09-13
Estimated Expiration
2044-06-11

AI Technical Summary

Technical Problem

The existing wide-angle light measurement device (LMD) distortion correction solution is not effective in correcting wide-angle lens distortion, and the equipment cost and time are high.

Method used

By obtaining the imaging image of the plane calibration pattern containing the regularly arranged lattice taken by the wide-angle LMD, the coordinates of each point in the lattice are determined, and optimization is performed based on the wide-angle LMD imaging model and coordinates to obtain the internal and external parameters. Combined with the lattice The regular arrangement method is used to obtain local interpolation parameters, perform local error compensation, and achieve secondary correction of distortion.

Benefits of technology

It achieves high-precision wide-angle LMD distortion correction, reduces equipment and operating costs, simplifies the calibration process, and avoids the problem of insufficient calibration accuracy caused by polynomial approximate fitting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118333915B
    Figure CN118333915B
Patent Text Reader

Abstract

The present application belongs to the field of wide-angle LMD distortion correction, and specifically discloses a wide-angle LMD distortion calibration method, correction method, device and equipment. The calibration method includes: obtaining an image of a plane calibration pattern shot by a wide-angle LMD, and determining the coordinates of each point in the image; optimizing and solving based on the wide-angle LMD imaging model and the coordinates of each point to obtain the internal and external parameters of the wide-angle LMD; obtaining the corrected coordinates of each point and the expected coordinates of each point after a correction of the distortion of the image according to the internal and external parameters; determining the local interpolation parameters of the wide-angle LMD based on the corrected coordinates of each point and the expected coordinates of each point; the local interpolation parameters are used to perform local error compensation on the image after a correction, so as to perform a secondary correction on the distortion of the image. Through the present application, the distortion calibration is performed using a distortion analysis model plus local error correction, and the distortion correction accuracy is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of distortion correction of wide-angle luminance measuring devices (LMDs). More specifically, it relates to a method and device for calibrating and correcting distortion of a wide-angle LMD, as well as equipment. Background Art

[0002] Near-to-eye display (NED) is a new display technology that can create virtual images in a monocular or binocular field of view. By means of a display device placed within the non-clear vision distance of the human eye, it renders light field information to the human eye, thereby reconstructing a virtual scene in front of the eyes. Typical representatives of NED include Augmented Reality (AR), Virtual Reality (VR), and Extended Reality (XR), which have broad application prospects in multiple fields such as office, medical, and entertainment. Different from traditional flat panel displays or curved display screens, each display screen of NED usually also comes with an additional set of optical modules to achieve virtual images with a large field of view. The large field of view, virtual image display, and geometric distortion of the NED system pose difficulties for the calibration (DeMura) of NED display screens. In addition to performing DeMura on the display screens of the NED system, it is usually necessary to perform targeted geometric distortion correction on the NED system to achieve correct rendering of the virtual image display content.

[0003] The LMD imaging model generally conforms to the following formula (1), where r, f, and θ are the distance from the imaging point to the principal optical axis, the image distance, and the incident angle of the object-side light ray in sequence, and D is a monotonically increasing function. Common LMD imaging models are shown in Table 1.

[0004] (1)

[0005] Table 1 Common LMD Projection Models

[0006]

[0007] The field of view of a conventional LMD follows the pinhole projection model, with a limited field of view, making it difficult to capture the entire field of view of an NED in one image capture. Therefore, a wide-angle LMD is generally used to capture and measure an NED. The wide-angle LMD imaging system introduces distortion in the direction of the field of view radius during the imaging process, compresses the imaging area, and realizes wide-angle light sensing. Corresponding to formula (1), it means that D(θ) of the wide-angle LMD < tan(θ), and the most typical case is D(θ) = θ. The optical path diagrams of a wide-angle LMD and a conventional non-distorted LMD are as Figure 1As shown. The conventional distortion-free optical path is a straight line (TOB) passing through the optical center of the lens group inside and outside the lens group; while the optical path of the wide-angle LMD is a broken line (TOA) passing through the optical center of the lens group inside and outside the lens group. When the angle between the incident light and the main optical axis is θ, the angle between the imaging light of the wide-angle LMD and the main optical axis is α, and the angle between the imaging light of the conventional LMD and the main optical axis is β. Obviously, θ=β>α.

[0008] Although the wide-angle LMD solves the problem of shooting with a large field of view, the distortion of the LMD itself brings new troubles to the subsequent calibration of the NED. Therefore, when using a wide-angle LMD, its original camera image is difficult to be used directly, and it is usually necessary to perform geometric distortion correction on the captured camera original image. Distortion correction ultimately achieves the correction of wide-angle LMD distortion imaging to conventional LMD imaging. For the distortion correction of wide-angle LMD, the existing technical solutions use three solutions: radial tangential distortion model correction, fisheye distortion model correction, and goniometer calibration correction. However, the existing distortion correction solutions are not effective for wide-angle lens distortion correction, or the equipment cost and time cost are high in actual operation. Summary of the invention

[0009] In view of the defects of the prior art, the purpose of this application is to provide a wide-angle LMD distortion calibration method, correction method, device and equipment, aiming to solve the problems of poor effect of existing distortion correction schemes on wide-angle lens distortion correction, or high equipment cost and time consumption in actual operation.

[0010] To achieve the above objectives, in a first aspect, the present application provides a wide-angle LMD distortion calibration method, comprising:

[0011] Acquire an image captured by a wide-angle LMD of a planar calibration pattern containing regularly arranged dot arrays, and determine the coordinates of each point in the dot array in the image;

[0012] Based on the wide-angle LMD imaging model and the coordinates of each point, an optimization solution is performed to obtain the internal and external parameters of the wide-angle LMD;

[0013] Obtaining the corrected coordinates of each point and the expected coordinates of each point after correcting the distortion of the captured image once according to the internal and external parameters; the expected coordinates are the coordinates of each point when they are arranged and distributed according to the rule relative to the center of the dot matrix, determined by referring to the row and column spacing of the points at the center of the dot matrix obtained after the correction once;

[0014] The local interpolation parameters of the wide-angle LMD are determined based on the corrected coordinates of each point and the expected coordinates of each point; the local interpolation parameters are used to perform local error compensation on the captured image after the primary correction, so as to perform secondary correction on the distortion of the captured image.

[0015] It should be noted that the present application captures an image of a plane calibration pattern containing a dot matrix, and then optimizes and solves the internal and external parameters of the wide-angle LMD according to the coordinates of multiple points in the image, and finally obtains the local interpolation parameters of the wide-angle LMD in combination with the regular arrangement of the dot matrix. The present application can calibrate the distortion parameters (internal parameters, external parameters and local interpolation parameters) of the wide-angle LMD by shooting the calibration pattern once. The above calibration process is optimized and calculated in combination with the coordinates of the dot matrix. The calculation process is simple, the required equipment and operating costs are low, and polynomial approximate fitting is not involved, so it will not cause the problem of insufficient calibration accuracy.

[0016] In a possible implementation, performing optimization based on the wide-angle LMD imaging model and the coordinates of each point includes:

[0017] Initialize the internal and external parameters of the wide-angle LMD;

[0018] Based on the internal parameters and imaging model of the wide-angle LMD, the coordinates of each point are subjected to distortion correction to obtain the coordinates after distortion correction; and based on the external parameters of the wide-angle LMD, the coordinates after distortion correction are subjected to perspective transformation posture correction to obtain the coordinates after posture correction;

[0019] Determine the point row and column spacing at the center of the dot matrix according to the coordinates of each point in the dot matrix after posture correction, update the coordinates of each point after posture correction according to the point row and column spacing, and obtain the expected coordinates of each point when it is arranged and distributed according to the rule relative to the center of the dot matrix; and use the average distance between the expected coordinates of all points in the dot matrix and the coordinates after posture correction as the optimization objective function;

[0020] Optimize and update the internal and external parameters until the value of the objective function is minimized.

[0021] In a possible implementation, the spacing between rows and columns of dots at the center of the dot matrix is ​​determined by the following steps:

[0022] Get the corrected coordinates of the center point at the center of the dot matrix;

[0023] Obtaining corrected coordinates of adjacent points in the row and column directions of the center point;

[0024] The point row and column spacing is determined based on the corrected coordinate spacing between the center point and its adjacent points in the row and column directions.

[0025] In a possible implementation, the expected coordinates of each point are determined by the following steps:

[0026] The corrected coordinates of each point are updated in combination with the regular arrangement of the dot matrix, the corrected coordinates of the center point at the center of the dot matrix, and the row and column spacing of the points to obtain the expected coordinates of each point when arranged according to the regular arrangement relative to the center point.

[0027] Optionally, the regular arrangement is a first equal-distance arrangement in the horizontal direction and a second equal-distance arrangement in the vertical direction.

[0028] In a possible implementation, determining the local interpolation parameters of the wide-angle LMD based on the corrected coordinates of each point and the expected coordinates of each point includes:

[0029] Subtract the corrected coordinates of each point from the expected coordinates to obtain the local interpolation parameters of each point;

[0030] The local interpolation parameters between adjacent points in the dot matrix are interpolated to obtain the local interpolation parameters at each pixel between the adjacent points.

[0031] It can be understood that the coordinates of each point in the captured image are pixel coordinates in units of wide-angle LMD sensor pixels. Since the distortion on the entire captured image is smoothly transitioned, there will be no sudden changes. Therefore, the local interpolation parameters at the pixel points outside the point correspondence included in the dot matrix can be obtained by interpolating between the interpolation parameters at the known pixel points to obtain the local interpolation parameters at all pixel points of the wide-angle LMD.

[0032] In a possible implementation manner, the center of the planar calibration pattern is located at the center of the field of view of the wide-angle LMD, and / or the planar calibration pattern fills a preset proportion of the field of view of the wide-angle LMD.

[0033] Optionally, the calibration pattern coincides with the center of the field of view of the wide-angle LMD, and the higher the proportion of the wide-angle LMD field of view filled by the calibration pattern, the better the calibration effect for a wide viewing angle, and the higher the distortion correction accuracy at a wide viewing angle.

[0034] In a second aspect, the present application provides a wide-angle LMD distortion correction method, characterized by comprising:

[0035] Acquire wide-angle LMD imaging images;

[0036] The captured image is corrected in sequence using the internal parameters, external parameters, and local interpolation parameters obtained by the method described in the first aspect or any possible implementation manner of the first aspect to obtain a distortion-corrected image.

[0037] It can be understood that since the calibration of the wide-angle LMD in the present application is calculated based on the actual distortion situation rather than through polynomial fitting, its calibration accuracy is high, which makes the distortion correction accurate. As long as the field of view of the wide-angle LMD calibration is large enough, high-precision distortion correction effect with a large field of view can be achieved.

[0038] In a third aspect, the present application provides a wide-angle LMD distortion calibration device, comprising:

[0039] An image acquisition module is used to acquire an image of a planar calibration pattern including regularly arranged dot arrays captured by a wide-angle LMD, and determine the coordinates of each point in the dot array in the image;

[0040] An internal and external parameter determination module, used for optimizing and solving based on the wide-angle LMD imaging model and the coordinates of each point to obtain the internal and external parameters of the wide-angle LMD;

[0041] A local interpolation parameter determination module is used to obtain the corrected coordinates of each point and the expected coordinates of each point after the distortion of the captured image is corrected once according to the internal parameters and the external parameters; the local interpolation parameters of the wide-angle LMD are determined based on the corrected coordinates of each point and the expected coordinates of each point; the expected coordinates are the coordinates of each point when they are arranged and distributed according to the rule relative to the center of the dot matrix, determined by referring to the point row and column spacing at the center of the dot matrix obtained after the primary correction; the local interpolation parameters are used to perform local error compensation on the captured image after the primary correction, so as to perform secondary correction on the distortion of the captured image.

[0042] In a fourth aspect, the present application provides a wide-angle LMD distortion correction device, comprising:

[0043] An imaging image acquisition unit, used to acquire an imaging image of a wide-angle LMD;

[0044] The distortion correction unit is used to correct the captured image in sequence using the internal parameters, external parameters and local interpolation parameters obtained by the method described in the first aspect or any possible implementation of the first aspect to obtain a distortion-corrected image.

[0045] In a fifth aspect, the present application provides an electronic device comprising: at least one memory for storing programs; and at least one processor for executing the programs stored in the memory. When the programs stored in the memory are executed, the processor is used to execute the first aspect, any possible implementation of the first aspect, or the method described in the second aspect.

[0046] In a sixth aspect, the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a processor, the processor executes the first aspect, any possible implementation of the first aspect, or the method described in the second aspect.

[0047] In a seventh aspect, the present application provides a computer program product. When the computer program product runs on a processor, the processor executes the first party, any possible implementation of the first aspect, or the method described in the second aspect.

[0048] It can be understood that the beneficial effects of the third to seventh aspects mentioned above can be found in the relevant descriptions of the first and second aspects mentioned above, and will not be repeated here.

[0049] In general, the above technical solutions conceived by this application have the following beneficial effects compared with the prior art:

[0050] The present application provides a wide-angle LMD distortion calibration method, correction method, device and equipment, which captures an image of a plane calibration pattern containing a dot matrix, and then optimizes and solves the internal and external parameters of the wide-angle LMD according to the coordinates of multiple points in the captured image, and finally obtains the local interpolation parameters of the wide-angle LMD in combination with the regular arrangement of the dot matrix. The present application can calibrate the distortion parameters (internal parameters, external parameters and local interpolation parameters) of the wide-angle LMD by shooting the calibration pattern once. The above calibration process is optimized and calculated in combination with the coordinates of the dot matrix. The calculation process is simple, and the required equipment and operating costs are low. The distortion calibration is performed by using distortion optimization analysis plus local error correction, and does not involve polynomial approximate fitting, so it will not cause the problem of insufficient calibration accuracy. Furthermore, since the calibration of the wide-angle LMD in the present application is calculated based on the actual distortion situation rather than through polynomial fitting, its calibration accuracy is high, which makes the distortion correction accurate. As long as the field of view of the wide-angle LMD calibration is large enough, a high-precision distortion correction effect with a large field of view can be achieved.

[0051] The present application provides a wide-angle LMD distortion calibration method, correction method, device and equipment. The equipment required for assisting LMD distortion calibration and correction is very simple and low-cost. Only a plane dot matrix pattern or a plane checkerboard pattern is required. The display carrier can be a flat-screen TV / display or a printed image pasted on the wall. There is no need to obtain the dot matrix spacing value or the checkerboard size value. The alignment requirement is low and easy to operate. It is necessary to observe the real-time image of the LMD to make the plane pattern of the auxiliary calibration roughly centered in the LMD field of view and fill the LMD field of view as much as possible. No precise multi-axis alignment control equipment is required. The present application only needs to take a picture, and there is no need to change the spatial posture of the LMD and the auxiliary calibration pattern. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 It is a schematic diagram of the imaging optical path of the wide-angle LMD and pinhole camera;

[0053] Figure 2 is a flow chart of a wide-angle LMD distortion calibration method provided in an embodiment of the present application;

[0054] Figure 3 is a schematic diagram of an LMD distortion calibration system provided in an embodiment of the present application;

[0055] Figure 4 Schematic diagram of centroid extraction of LMD original image provided by an embodiment of the present application;

[0056] Figure 5is a flow chart of the optimization objective function calculation provided by the embodiment of the present application;

[0057] Figure 6 This is a schematic diagram of dot matrix arrangement after distortion correction of an ideal model provided in an embodiment of the present application;

[0058] Figure 7 It is a schematic diagram of the actual dot matrix and the expected dot matrix arrangement provided in the embodiment of the present application;

[0059] Figure 8 is a flow chart of a wide-angle LMD distortion correction method provided in an embodiment of the present application;

[0060] Fig. 9 An architecture diagram of a wide-angle LMD distortion calibration device provided in an embodiment of the present application;

[0061] Fig.10 is a structural diagram of a wide-angle LMD distortion correction device provided in an embodiment of the present application;

[0062] Fig.11 It is an architectural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0063] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0064] The term "and / or" in this article is a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The symbol " / " in this article indicates that the associated objects are in an or relationship, for example, A / B means A or B.

[0065] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0066] First, the technical terms involved in the embodiments of the present application are introduced.

[0067] (1) Wide-angle LMD distortion

[0068] The reason for wide-angle LMD distortion is that the lens has different bending abilities for colored light, which causes the imaging point to be at different distances from the optical axis, and the lateral magnification is also different. As a result, there is an aberration between the actual image and the ideal image.

[0069] (2) LMD internal reference

[0070] Intrinsic parameters are parameters that describe the internal properties of the LMD, including focal length, principal point (optical center) coordinates, distortion coefficients, etc. Intrinsic parameters are usually determined during LMD calibration, because they are usually fixed for a specific LMD model and do not change over time. Once the LMD intrinsic parameters are determined, they usually remain unchanged during the use of the LMD.

[0071] (3) LMD external reference

[0072] The external parameters are the parameters that describe the position and posture of the LMD in the world coordinate system, usually including the rotation matrix and translation vector. The external parameters may change at different LMD positions or shooting times.

[0073] The internal parameters that need to be optimized and solved in this application include: image distance f and point matrix centroid coordinate deviation (dx, dy); external parameters include: perspective transformation matrix T p .

[0074] Secondly, in order to facilitate a clearer understanding of the embodiments of the present application, some relevant background knowledge is introduced as follows.

[0075] First, radial tangential distortion model correction is a conventional correction method in the field of computer vision, which has been integrated in mainstream computer vision software platforms such as Matlab and OpenCV. Its distortion model is shown in formula (2). , and r represent the ideal imaging without distortion coordinate, Coordinate and distance from the center of the optical axis; x d and Represent the actual imaging with distorted images Coordinates and Coordinates. When using this model to calibrate the LMD for distortion, a planar chessboard image is first required. Then, the chessboard is photographed with the LMD in different postures. The coordinates of the chessboard corners are extracted from the captured image. Finally, the camera intrinsic parameters (mainly the equation parameters shown in formula (2)) and extrinsic parameters (mainly the spatial posture parameters of the LMD relative to the chessboard image) are solved. The key to solving the parameters in this method is to measure the quality of parameter estimation with the reprojection error (the reprojection error is to estimate the expected imaging coordinates according to the chessboard coordinates according to the internal and external parameters obtained by solving the internal and external parameters and calculate the deviation from the actual coordinates). Therefore, its solution algorithm is essentially a polynomial fitting optimization algorithm.

[0076] This method has low requirements for equipment and has good correction effects for non-wide-angle lenses. However, this method usually requires 20 shooting results of the image acquisition posture, which is time-consuming; in addition, the highest order of r in the model is 6, which is not enough for wide-angle / fisheye with large distortion. This method does not achieve good results for wide-angle lens distortion correction, especially for wide-angle LMD distortion correction used in NED measurement, so it is rarely used in wide-angle LMD distortion correction.

[0077] (2)

[0078] Second, the fisheye distortion model correction is similar to the radial tangential distortion model correction, but a higher-order polynomial is considered in its distortion model formula, as shown in equation (3). This method improves the large distortion correction of wide-angle LMD, but its underlying idea is still to fit the polynomial of the LMD distortion model.

[0079] (3)

[0080] The fisheye distortion model still has limited distortion correction accuracy for wide-angle LMD. Taking the 1% distortion remaining after distortion correction as the threshold, the effective correction field angle of this model for the most common equidistant projection (D(θ) = θ) is ±47.3°. The analysis process is as follows. According to Table 1, using equidistant projection as the wide-angle LMD model, its distortion model relative to the pinhole model is ,in is the object angle of incidence, is the image-side exit angle after distortion. The expansion of variables is called Taylor expansion. In theory, it is necessary to have infinite terms to ensure accuracy. Here, the 9th-order Taylor polynomial expansion used in the fisheye distortion model is used as an example. When the field of view exceeds ±47.3, the fisheye model differs from the actual model by more than 1%. The wide-angle LMD field of view required by actual NEDs generally reaches more than ±60°, so the fisheye distortion model can only guarantee the distortion correction effect within a smaller field of view, while the distortion effect is very poor for the larger field of view and the edge field of view that are more concerned.

[0081] Third, the calibration and correction of the goniometer is quite different from the previous two solutions. The previous two solutions use polynomial fitting distortion models, while the goniometer extracts model parameters based on the known distortion model corresponding to Table 1. Taking the equidistant projection distortion model as an example, the general process of the goniometer calibration is as follows: set up the goniometer, the 0° line of the goniometer coincides with the optical axis of the LMD, the rotation center of the goniometer coincides with the optical center of the LMD lens group, set up a point light source on the goniometer (such as a laser with an attenuation plate) and change the angle of the light source, and record the imaging position of the light spot on the LMD ( ) and the corresponding incident light angle ( ), and finally fit the slope of the two according to the least squares method, which is the f parameter of the equidistant projection distortion model. Compared with the previous two methods, this method has a smaller error for large field of view distortion, but due to the lack of LMD external parameter calculation, this method has higher requirements for the positioning accuracy of the inclinometer and the installation accuracy of the LMD, and the equipment cost and time are relatively high in actual operation.

[0082] In order to overcome the above-mentioned defects, the present application provides a wide-angle LMD distortion calibration method, correction method, device and equipment. Compared with the traditional method, the present application has low requirements on the calibration equipment and the number of images required for calibration. The entire distortion calibration process is easy to operate and the distortion correction accuracy is high.

[0083] Finally, the technical solutions provided in the embodiments of the present application are introduced in combination with the following contents.

[0084] Figure 2 is a flow chart of a wide-angle LMD distortion calibration method provided in an embodiment of the present application; Figure 2 As shown, the following steps are included:

[0085] Step S101, obtaining an image captured by a wide-angle LMD and including a planar calibration pattern with regularly arranged dot arrays, and determining the coordinates of each point in the dot array in the image captured;

[0086] Step S102, performing optimization and solving based on the wide-angle LMD imaging model and the coordinates of each point to obtain the internal and external parameters of the wide-angle LMD;

[0087] Step S103, obtaining the corrected coordinates of each point and the expected coordinates of each point after the distortion of the captured image is corrected once according to the internal and external parameters; the expected coordinates are the coordinates of each point when they are arranged and distributed according to the rule relative to the center of the dot matrix, determined by referring to the row and column spacing of the points at the center of the dot matrix obtained after the correction once;

[0088] Step S104, determining local interpolation parameters of the wide-angle LMD based on the corrected coordinates of each point and the expected coordinates of each point; the local interpolation parameters are used to perform local error compensation on the captured image after the primary correction, so as to perform secondary correction on the distortion of the captured image.

[0089] Obviously, the distortion calibration process of the present application uses distortion optimization analysis (i.e., distortion analysis model) plus local error correction to perform distortion calibration, and does not have the problem of insufficient accuracy of existing polynomial approximate fitting. Furthermore, when using the parameters after distortion calibration for distortion correction, the distortion correction accuracy is high, and high-precision distortion correction can be achieved at a large field of view.

[0090] It is understandable that the imaging model of the wide-angle LMD, that is, the imaging model of the LMD is known. Whether it is a purchased or self-developed LMD device, there must be an optical design scheme. Ideally, the imaging model of the wide-angle LMD can be uniquely determined by the optical design scheme. Although there are lens processing and assembly errors in practice, which lead to deviations between the actual imaging model and the ideal model, the deviation is generally not too large, and is mainly reflected in local errors. The present application does not blindly establish a fitting polynomial model for the wide-angle LMD distortion model, but relies on the imaging model obtained from the known optical design scheme to extract parameters. As shown in Table 1 and formula (1), the key parameter of the common wide-angle LMD imaging model is f. Considering that the optical axis of the lens and the center of the sensor target surface do not coincide in the actual assembly, there is also a parameter. and , respectively used to describe the optical axis and the sensor center The pixel value of the direction deviation and The pixel value of the direction deviation. Here, f, and It is equivalent to the camera intrinsic parameter in the traditional camera distortion correction model.

[0091] Since the pattern used in the calibration process is located in a plane in space, the influence of the calibration pattern and the spatial posture of the LMD is the spatial perspective transformation relationship, and the spatial perspective transformation relationship (i.e., the perspective transformation matrix T p ) can be described by a 3×3 matrix. This perspective transformation matrix is ​​equivalent to the camera external parameters in the traditional distortion correction model, but the difference is that this solution does not need to calculate the actual corresponding The three-axis translation and rotation angle only need to be described by a 3×3 matrix.

[0092] According to the above camera imaging model, the initial estimated values ​​of the internal parameters and the initial estimated values ​​of the external parameters, the coordinates of the calibration pattern positioning points on the LMD sensor surface can be calculated, and the deviation between this value and the coordinates of the positioning points extracted from the actual LMD image is calculated. The optimization algorithm is used to solve and minimize the deviation to obtain the internal and external parameters of the wide-angle LMD distortion correction. This step is similar to the evaluation of the reprojection error in the traditional distortion correction model. The difference is that this solution only needs one image to perform the calculation, which is more efficient.

[0093] See also Figure 3 As shown, the structure of the LMD distortion calibration system provided by the present application may include: a plane calibration pattern, a TV stand, a computer and a wide-angle LMD.

[0094] Optionally, the above-mentioned plane calibration pattern can be: any display pattern of an object showing an evenly spaced dot matrix; the above-mentioned object can be a wall, paper, drawing printed or printed with a dot matrix, or a television, display screen, etc. displaying a dot matrix. Figure 3 The plane calibration pattern is taken as an example of an equidistant dot matrix displayed on a flat-screen TV.

[0095] like Figure 3 The bracket of this system does not require precise or complex adjustment devices. Its purpose is only to facilitate the alignment and rough posture adjustment of the LMD and the TV. Therefore, a general-purpose TV bracket can meet the requirements. Figure 3 (b) shows a typical dot matrix pattern, which is 18 rows and 32 columns of white dots on a black background. The advantage of using a TV is that the calibration display pattern can be changed at will without any additional cost, which is more flexible to use. In addition, the mainstream size of TVs is now 65 inches, which is easier to obtain a larger size than printed patterns. In the LMD calibration stage, the computer is mainly used to control the LMD to capture images and analyze the captured images to extract distortion parameters. In the correction stage, it is responsible for correcting the distortion of the original distorted image captured by the LMD and outputting it.

[0096] In a more specific embodiment, a typical LMD distortion calibration workflow provided by the present application is as follows:

[0097] a) Obtaining an LMD model; obtaining a wide-angle LMD distortion model to be corrected. For example, when the distortion model r=f·D(θ) is an equidistant projection, D(θ)=θ, and f is a parameter to be solved;

[0098] b) Prepare calibration pattern: Prepare a plane dot matrix calibration pattern for calibrating LMD distortion. The row and column spacing of the calibration pattern dot matrix is ​​equal. A typical pattern is as follows: Figure 3 As shown in (b);

[0099] c) LMD and calibration pattern posture adjustment: Adjust the spatial posture of LMD and plane calibration pattern, so that the LMD optical axis is perpendicular to the calibration pattern, and the calibration pattern is located at the center of the LMD field of view and tries to occupy the entire LMD field of view. The human eye observation is roughly satisfied. The schematic diagram is as follows Figure 3 As shown in (a);

[0100] d) LMD takes a picture; LMD takes a picture of the calibration pattern;

[0101] e) Extract the centroid coordinates of the LMD image; The computer extracts the centroid of each point in the dot matrix of the captured image. This algorithm is a mature algorithm in the field of computer vision, such as corner detection, threshold segmentation, connected area division, grayscale centroid extraction, etc. and The coordinates can be expressed as and , where i and j represent the row and column numbers of the current point in the dot matrix, respectively. The schematic diagram is as follows Figure 4 shown.

[0102] like Figure 4 It can be seen that the image captured by LMD has a large distortion, and the centroids of the points extracted on it are not distributed according to a regular arrangement.

[0103] f) extracting LMD internal and external parameters through optimization algorithm; establishing optimization objective function based on the distortion model obtained in a), such as Figure 5 As shown, the objective function is minimized using the existing public optimization solution, and the obtained LMD internal parameters ( ) and external parameters (3 rows and 3 columns of perspective transformation matrix T p ).

[0104] The average distance calculation formula is as follows, where i and j are the row and column numbers of the current point in the dot matrix, and M and N are the number of rows and columns of the dot matrix.

[0105] (4)

[0106] in and To actually calibrate the lattice coordinates, and are the expected lattice coordinates; refer to steps g) to h) to obtain the above coordinates respectively.

[0107] g) Calculate the coordinates of the ideal model after distortion correction; According to the internal parameters of LMD ( ), for the LMD original image lattice coordinates and Perform distortion correction to obtain the lattice coordinates after distortion correction and , where i and j represent the row and column numbers of the current point in the dot matrix respectively, and the calculation formula is as follows:

[0108] (5)

[0109] In the formula , D -1 Denotes the inverse function of D.

[0110] Schematic diagram as Figure 6 As shown, Figure 6 The figure shows the dot coordinates after camera internal parameter correction. Figure 4 The distortion of the original image has been largely corrected, but due to the influence of the LMD attitude, the dot matrix is ​​not arranged uniformly as expected.

[0111] h) Calculate the actual corrected coordinates after the complete correction; According to the external parameters of LMD, the lattice coordinates after LMD distortion correction ( and ) to perform perspective posture correction and obtain the actual correction point coordinates and , where i and j represent the row and column numbers of the current point in the dot matrix respectively, and the calculation formula is as follows:

[0112] (6)

[0113] Where [p,q,r] is a vector with one row and three columns, and the calculation formula is , where T p It is the 3-row and 3-column matrix of LMD attitude external parameters calculated by the optimization algorithm.

[0114] i) Calculate the expected lattice coordinates and , where i and j represent the row and column numbers of the current point in the dot matrix respectively, and the calculation formula is as follows:

[0115] (7)

[0116] Where i c and j c Respectively represent the row and column numbers of the center point of the dot matrix. For example, the center point of the 18-row and 32-column dot matrix is ​​9-row and 16-column, that is, ic=9, jc=16, where and They represent the distance between the center point and the adjacent point on the right and the distance between the center point and the adjacent point below, respectively. The schematic diagram is shown in Figure 7 shown.

[0117] It should be noted that the distortion of the pixel point at the center of the image is usually small, so the point at the center of the dot matrix after the internal and external parameters are corrected can be used as the standard point, and the distance between the two points in the center in the row and column direction can be used as the row and column spacing of the equally spaced arrangement. Then, starting from the center of the corrected dot matrix, the expected coordinates of each point when it is distributed according to the regular arrangement can be obtained. Figure 7 It can be seen that the coordinates after internal and external reference correction and With expected coordinates and There is still a certain deviation, so further local error compensation is needed.

[0118] j) Calculate the local error; subtract the actual coordinates corresponding to the same point in the lattice from the expected lattice coordinates to obtain the local error corresponding to each point. Each point is calculated with the lattice coordinates after distortion correction. and is the index, denoted by and , for the local error and Interpolate the coordinate values ​​with a step size of 1 to expand the data to and , where (u,v) are integer grid point (x,y) coordinates with a step size of 1.

[0119] k) Save the data as an LMD calibration file to complete the wide-angle LMD distortion calibration; save the LMD internal reference data ( )、External reference data T p and local error interpolation data and .

[0120] Figure 8 is a flow chart of a wide-angle LMD distortion correction method provided in an embodiment of the present application; Figure 8 As shown, the following steps are included:

[0121] Step S201, acquiring an image of a wide-angle LMD;

[0122] Step S202, using Figure 2 The internal parameters, external parameters and local interpolation parameters obtained by the provided method are used to correct the captured image in turn to obtain a distortion-corrected image.

[0123] It should be noted that the above-mentioned distortion correction mainly refers to the distortion correction of coordinates, and the corresponding grayscale value correction can refer to the existing related interpolation algorithm to smooth the distorted image and correct the distortion as much as possible without grayscale distortion. The specific grayscale value adaptive correction part can refer to the records of the relevant prior art, and this application will not elaborate on it.

[0124] In a more specific embodiment, the LMD distortion calibration data obtained above can be used to implement distortion correction of any LMD image. A typical LMD distortion correction workflow is as follows:

[0125] a) Traverse each pixel of the LMD original image to obtain its coordinates and grayscale value ;

[0126] b) Calculate coordinates According to the internal reference obtained by calibration ( ) and external reference T p The coordinates after distortion correction ( ), the calculation formula is shown in formula (5) and formula (6); the coordinates after distortion correction ( ) corresponds to the actual correction point coordinates obtained by formula (5) and formula (6) and ;

[0127] c) Perform local error compensation on the coordinates after distortion correction, and the calculation formula is as follows:

[0128] (8)

[0129] d) Use the interpolation algorithm to calculate the gray value matrix F(u,v), where F satisfies , u and v are integer grid coordinate values ​​with a spacing of 1;

[0130] It should be noted that LMD is generally an industrial camera or an array colorimeter, and the RGB sensor of the colorimeter is generally arranged in Bayer, which is different from pure black and white; therefore, when the LMD is a camera or a colorimeter, the interpolation algorithm used in the above step d) is slightly different. The specific interpolation algorithm can be selected by those skilled in the art, so as to obtain the gray value distribution of the distortion-corrected image in combination with the distorted gray value under the premise of knowing the coordinates after distortion correction.

[0131] e) F can be cropped according to actual needs to obtain the distortion-corrected image.

[0132] Fig. 9 An architecture diagram of a wide-angle LMD distortion calibration device provided in an embodiment of the present application; Fig. 9 As shown, including:

[0133] The image acquisition module 910 is used to acquire an image captured by the wide-angle LMD and including a planar calibration pattern with regularly arranged dot arrays, and determine the coordinates of each point in the dot array in the image acquisition image;

[0134] An internal and external parameter determination module 920 is used to perform optimization and solution based on the wide-angle LMD imaging model and the coordinates of each point to obtain the internal and external parameters of the wide-angle LMD;

[0135] The local interpolation parameter determination module 930 is used to obtain the corrected coordinates of each point and the expected coordinates of each point after the distortion of the captured image is corrected once according to the internal parameters and the external parameters; the local interpolation parameters of the wide-angle LMD are determined based on the corrected coordinates of each point and the expected coordinates of each point; the expected coordinates are the coordinates of each point when they are arranged and distributed according to the rule relative to the center of the dot matrix, determined by referring to the point row and column spacing at the center of the dot matrix obtained after the primary correction; the local interpolation parameters are used to perform local error compensation on the captured image after the primary correction, so as to perform secondary correction on the distortion of the captured image.

[0136] Optionally, the internal and external parameter determination module 920 performs optimization and solution based on the wide-angle LMD imaging model and the coordinates of the points, including: initializing the internal and external parameters of the wide-angle LMD; performing distortion correction on the coordinates of the points based on the internal parameters and imaging model of the wide-angle LMD to obtain the coordinates after distortion correction; and performing perspective transformation posture correction on the coordinates after distortion correction based on the external parameters of the wide-angle LMD to obtain the coordinates after posture correction; determining the point row and column spacing at the center of the dot matrix according to the coordinates after posture correction of each point in the dot matrix, updating the coordinates after posture correction of each point according to the point row and column spacing, and obtaining the expected coordinates of each point when arranged and distributed according to the rule relative to the center of the dot matrix; and taking the average distance between the expected coordinates of all points in the dot matrix and the coordinates after posture correction as the optimization objective function; optimizing and updating the internal and external parameters until the value of the objective function is minimized.

[0137] Optionally, the internal and external parameter determination module 920 determines the point row and column spacing at the center of the dot matrix through the following steps: obtaining the corrected coordinates of the center point at the center of the dot matrix; obtaining the corrected coordinates of the adjacent points in the row and column directions of the center point; and determining the point row and column spacing based on the distance between the corrected coordinates of the center point and its adjacent points in the row and column directions.

[0138] Optionally, the internal and external parameter determination module 920 determines the expected coordinates of each point through the following steps: the corrected coordinates of each point are updated in combination with the regular arrangement of the dot matrix, the corrected coordinates of the center point at the center of the dot matrix, and the point row and column spacing to obtain the expected coordinates of each point when the point is arranged according to the regular arrangement relative to the center point.

[0139] Optionally, the local interpolation parameter determination module 930 determines the local interpolation parameters of the wide-angle LMD based on the corrected coordinates of each point and the expected coordinates of each point, including: subtracting the corrected coordinates of each point from the expected coordinates to obtain the local interpolation parameters of each point; interpolating the local interpolation parameters between adjacent points in the dot matrix to obtain the local interpolation parameters at each pixel between the adjacent points.

[0140] Fig.10 is a structural diagram of a wide-angle LMD distortion correction device provided in an embodiment of the present application; Fig.10 As shown, including:

[0141] An image acquisition unit 1010 is used to acquire an image of a wide-angle LMD;

[0142] The distortion correction unit 1020 is used to correct the captured image in sequence using the intrinsic parameters, extrinsic parameters and local interpolation parameters obtained by the method described in the first aspect or any possible implementation manner of the first aspect to obtain a distortion-corrected image.

[0143] It should be understood that the above Fig. 9 and Fig.10 The device provided is used to execute the method in the above embodiment. The implementation principle and technical effect of the corresponding program module or unit in the device are similar to those described in the above method. The working process of the device can refer to the corresponding process in the above method and will not be repeated here.

[0144] Based on the method in the above embodiment, the embodiment of the present application provides an electronic device, such as Fig.11 As shown, the electronic device may include: a processor 1110, a communication interface 1120, a memory 1130 and a communication bus 1140, wherein the processor 1110, the communication interface 1120, and the memory 1130 communicate with each other via the communication bus 1140. The processor 1110 may call the logic instructions in the memory 1130 to execute the method in the above embodiment.

[0145] In addition, the logic instructions in the above-mentioned memory 1130 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application.

[0146] Based on the method in the above embodiment, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a processor, the processor executes the method in the above embodiment.

[0147] Based on the method in the above embodiment, an embodiment of the present application provides a computer program product. When the computer program product runs on a processor, the processor executes the method in the above embodiment.

[0148] It is understandable that the processor in the embodiment of the present application may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.

[0149] The method steps in the embodiments of the present application can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC.

[0150] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions may be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.

[0151] It should be understood that the various numerical numbers involved in the embodiments of the present application are only used for the convenience of description and are not used to limit the scope of the embodiments of the present application.

[0152] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A wide-angle LMD distortion calibration method, It is characterized in that include: Acquire an image captured by a wide-angle light measurement device LMD and containing a planar calibration pattern with regularly arranged dot arrays, and determine the coordinates of each point in the dot array in the image captured; Based on the wide-angle LMD imaging model and the coordinates of each point, the internal and external parameters of the wide-angle LMD are obtained; The internal parameters include: image distance and dot matrix centroid coordinate deviation; the external parameters include: perspective transformation matrix; after the image is corrected by the internal and external parameters, a corrected dot matrix image is obtained, which has a local deviation from the regularly arranged dot matrix; Obtaining the corrected coordinates of each point and the expected coordinates of each point after correcting the distortion of the captured image once according to the internal and external parameters; the expected coordinates of each point are determined by the following steps: updating the corrected coordinates of each point in combination with the regular arrangement of the dot matrix, the corrected coordinates of the center point at the center of the dot matrix, and the row and column intervals of the points, to obtain the expected coordinates of each point when the center point is arranged according to the regular arrangement; After obtaining the internal and external parameters of the wide-angle LMD, the local interpolation parameters of the wide-angle LMD are determined based on the corrected coordinates of each point and the expected coordinates of each point; the local interpolation parameters are used to perform local error compensation on the captured image after the primary correction, so as to perform secondary correction on the distortion of the captured image.

2. The method according to claim 1, It is characterized in that An optimization solution is performed based on the wide-angle LMD imaging model and the coordinates of each point, including: Initialize the internal and external parameters of the wide-angle LMD; Based on the internal parameters and imaging model of the wide-angle LMD, the coordinates of each point are subjected to distortion correction to obtain the coordinates after distortion correction; and based on the external parameters of the wide-angle LMD, the coordinates after distortion correction are subjected to perspective transformation posture correction to obtain the coordinates after posture correction; Determine the point row and column spacing at the center of the dot matrix according to the coordinates of each point in the dot matrix after posture correction, update the coordinates of each point after posture correction according to the point row and column spacing, and obtain the expected coordinates of each point when it is arranged and distributed according to the rule relative to the center of the dot matrix; and use the average distance between the expected coordinates of all points in the dot matrix and the coordinates after posture correction as the optimization objective function; Optimize and update the internal and external parameters until the value of the objective function is minimized.

3. The method according to claim 1 or 2, It is characterized in that The spacing of the rows and columns of points at the center of the dot matrix is ​​determined by the following steps: Get the corrected coordinates of the center point at the center of the dot matrix; Obtaining corrected coordinates of adjacent points in the row and column directions of the center point; The point row and column spacing is determined based on the corrected coordinate spacing between the center point and its adjacent points in the row and column directions.

4. The method according to claim 1, It is characterized in that The local interpolation parameters of the wide-angle LMD are determined based on the corrected coordinates of each point and the expected coordinates of each point, including: Subtract the corrected coordinates of each point from the expected coordinates to obtain the local interpolation parameters of each point; The local interpolation parameters between adjacent points in the dot matrix are interpolated to obtain the local interpolation parameters at each pixel between the adjacent points.

5. The method according to claim 1, It is characterized in that The center of the planar calibration pattern is located at the center of the field of view of the wide-angle LMD, and / or the planar calibration pattern fills a preset proportion of the field of view of the wide-angle LMD.

6. A wide-angle LMD distortion correction method, It is characterized in that include: Acquire wide-angle LMD imaging images; The captured image is corrected in sequence using the internal parameters, external parameters and local interpolation parameters obtained by the method according to any one of claims 1 to 5 to obtain a distortion-corrected image.

7. A wide-angle LMD distortion calibration device, It is characterized in that include: An image acquisition module is used to acquire an image of a planar calibration pattern including regularly arranged dot arrays captured by a wide-angle LMD, and determine the coordinates of each point in the dot array in the image; An internal and external parameter determination module, used for optimizing and solving based on the wide-angle LMD imaging model and the coordinates of each point to obtain the internal and external parameters of the wide-angle LMD; The internal parameters include: image distance and dot matrix centroid coordinate deviation; the external parameters include: perspective transformation matrix; after the image is corrected by the internal and external parameters, a corrected dot matrix image is obtained, which has a local deviation from the regularly arranged dot matrix; A local interpolation parameter determination module is used to obtain the corrected coordinates of each point and the expected coordinates of each point after the distortion of the captured image is corrected once according to the internal parameters and the external parameters; after obtaining the internal parameters and the external parameters of the wide-angle LMD, the local interpolation parameters of the wide-angle LMD are determined based on the corrected coordinates of each point and the expected coordinates of each point; the expected coordinates of each point are determined by the following steps: the corrected coordinates of each point are updated in combination with the regular arrangement of the dot matrix, the corrected coordinates of the center point at the center of the dot matrix, and the row and column intervals of the points, so as to obtain the expected coordinates of each point when the center point is arranged according to the regular arrangement; the local interpolation parameters are used to perform local error compensation on the captured image after the primary correction, so as to perform secondary correction on the distortion of the captured image.

8. A wide-angle LMD distortion correction device, It is characterized in that include: An imaging image acquisition unit, used to acquire an imaging image of a wide-angle LMD; A distortion correction unit, used to correct the captured image in sequence using the internal parameters, external parameters and local interpolation parameters obtained by the method according to any one of claims 1 to 5 to obtain a distortion-corrected image.

9. An electronic device, It is characterized in that include: at least one memory for storing a computer program; At least one processor is used to execute the program stored in the memory, and when the program stored in the memory is executed, the processor is used to execute the method according to any one of claims 1-5 or 6.