Collimator output beam modeling and camera internal parameter calibration method based on universal imaging model

By installing a star-shaped calibration pattern on the parallel light tube and using a universal imaging model, the problem of parameter adjustment of the camera in the wild environment and the non-parallelism of the beam exiting from the parallel light tube is solved, and high-precision automatic calibration and large-scale calibration of internal parameters of the camera are achieved. Field of view calibration improves the convenience and accuracy of the calibration process.

CN114758015BActive Publication Date: 2024-10-22NAT UNIV OF DEFENSE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210493344.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-07
Publication Date
2024-10-22
Estimated Expiration
2042-05-07

AI Technical Summary

Technical Problem

The existing camera measurement system needs to adjust the focal length and lens when installing the camera in the field environment. As a result, the parameters calibrated in advance in the laboratory cannot be used directly. In addition, the non-parallelism of the outgoing beam of the parallel light tube results in limited calibration accuracy, making it impossible to achieve automation and large-scale viewing. Field splicing calibration.

Method used

The modeling method of the beam emitted by the collimator based on the universal imaging model is adopted. By installing a star-shaped calibration pattern on the collimator, a universal camera is used to collect photo data and extract feature points, establish a parameterized calibration model, and determine the direction and angle of the light. information to achieve automatic calibration of parameters within the camera.

Benefits of technology

It improves the accuracy and convenience of camera internal parameter calibration, realizes universal camera internal parameter calibration for large fields of view, reduces the complexity and workload of the calibration process, and enhances the robustness and accuracy of feature extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114758015B_ABST
    Figure CN114758015B_ABST
Patent Text Reader

Abstract

The present application relates to a method and system for modeling the output beam of a collimator based on a universal imaging model and calibrating the internal parameters of a camera. A collimator with a star-shaped calibration pattern graticule is used, and a universal camera is used to collect data from the star-shaped calibration pattern of the collimator. Feature extraction is performed on the collected calibration data set, and the universal camera is calibrated according to the extracted image features. The collimator is further modeled according to the internal parameters obtained by calibration. Other cameras to be calibrated shoot the modeled collimator, determine the coordinates of the marking points, and use the parameterized calibration model to complete the calibration of the internal parameters of other cameras to be calibrated. The method or system can realize the internal parameter calibration of a universal camera with a large field of view based on a collimator, can check the parallelism of the output beam of the collimator, improve the robustness and accuracy of feature extraction, and improve the calibration accuracy. In addition, the method realizes the automation of the calibration process, which is more convenient than the traditional method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of camera internal parameter calibration, and in particular to a method and system for modeling a collimator output light beam and camera internal parameter calibration based on a universal imaging model. Background Art

[0002] With the development of video measurement technology, the characteristics of high precision, non-contact, real-time motion measurement and low cost have made video measurement technology popularized and expanded from the aerospace and defense fields to the civilian field. In the field of video measurement, the calibration of parameters in the video measurement system is mainly used to determine the camera's principal point, equivalent focal length, distortion coefficient and other parameters. The camera in the traditional video measurement system is usually required to be installed on a stable measurement platform, and a global coordinate system is established through equipment such as a total station. The three-dimensional coordinates of the scene feature points in the global coordinate system are then measured for the calibration of the camera's internal and external parameters. Due to the cumbersome calibration process, the camera is usually required not to be adjusted to ensure that the camera's internal parameters remain unchanged after calibration, thereby maintaining the measurement accuracy of the target motion parameters.

[0003] However, the calibration of the internal parameters of the camera measurement system often encounters these problems in large-scale actual engineering scenes: First, after the camera is installed on the field measurement platform, it is still necessary to adjust the camera status according to the actual situation on site, such as changing the focal length, depth of field, and changing the lens. This makes it impossible to directly use the internal parameters of the camera calibrated in advance in the laboratory environment. Second, during the field measurement of aerial targets, the scene information in the field of view of the camera shooting in the air is small, which makes it difficult to calibrate the camera parameters.

[0004] In view of the above problems, using collimator to assist in the calibration of camera parameters is a feasible idea. The main function of collimator is to emit parallel light, thus providing a marker point at infinity for camera calibration. Professor Sun Xiangyi and others proposed a patent "Camera Calibration Method Based on Collimator", which uses the camera calibration method based on collimator to solve the above problems.

[0005] However, low-cost and convenient collimators often have the problem of inaccuracy, that is, the outgoing light beam of the collimator is not parallel, and it is necessary to use a high-precision angle measuring instrument in advance to measure the angle pointing information of the outgoing light beam of the collimator, and establish an angle pointing database for each target point of the collimator. The main disadvantages are as follows: the accuracy of camera calibration is subject to the angle measurement accuracy of the angle measuring instrument; the workload of establishing the angle pointing database is large, and the shooting position and angle of the camera and the collimator are strictly limited during the calibration of the camera internal parameters; the calibration process cannot be automated. In addition, when the field of view of the calibrated camera is larger than the field of view of the collimator, the collimator must be imaged multiple times to cover the entire camera target surface. The existing method cannot realize the camera field of view stitching calibration method based on collimators. Summary of the invention

[0006] Based on this, it is necessary to provide a method and system for modeling the output light beam of a parallel light tube and calibrating internal parameters of a camera based on a universal imaging model to address the above technical problems.

[0007] A method for modeling a collimator output light beam and calibrating camera internal parameters based on a universal imaging model, the method comprising:

[0008] A star-shaped calibration pattern is installed at the reticle of the collimator, wherein the star-shaped calibration pattern is composed of a plurality of special star-shaped patterns repeatedly combined, each special star-shaped pattern is represented by a square, and each square is composed of a specific number of black and white line segments;

[0009] Use a general camera to take photos of the collimator star-shaped calibration pattern and collect data;

[0010] Perform feature extraction on the collected calibration data set, and the extracted feature position is the center of the star pattern;

[0011] Perform universal camera calibration based on the extracted image features;

[0012] Model the collimator outgoing light beam, determine the direction and angle of the collimator light, and establish a parameterized calibration model;

[0013] The other cameras to be calibrated shoot the modeled collimator, determine the coordinates of the marker points according to the light direction and angle pointing information of the collimator, substitute the coordinates of the marker points into the parameterized calibration model, and calibrate the internal parameters of other cameras to be calibrated.

[0014] In one embodiment, each special star-shaped pattern is represented by a square, and each square is composed of a specific number of black and white line segments. It also includes: the black and white line segments in each square are triangular color blocks of similar area, and these color blocks are rotated around the center of the square in a black and white manner to form a star-shaped pattern.

[0015] In one of the embodiments, a universal camera is used to capture data of a collimator star-shaped calibration pattern, and the method further includes: the star-shaped calibration pattern includes a square mark code, all square mark codes are searched in the image, and four corner points of the middle square mark code are detected, wherein the four corner points of the square mark code can provide a correspondence between a known calibration pattern and a calibration image.

[0016] In one of the embodiments, feature extraction is performed on the collected calibration data set, which also includes: calculating the homography matrix of the calibration pattern and the calibration image according to the correspondence between them, using the homography matrix to roughly estimate the positions of four star-shaped features directly adjacent to the square mark code, and obtaining the correspondence between the positions of the feature points in the pattern and the image. For the positions of other adjacent feature points that have not yet been detected, the algorithm calculates a new local homography matrix from the adjacent correspondence to obtain the positions of the adjacent feature points, and then repeats the detection process until all feature points are detected.

[0017] In one embodiment, after all feature points are detected, the feature point positions are optimized using a matching-based optimization method, and erroneous feature point positions are eliminated. A local window of a certain size is used to search in the star pattern template to obtain a gray value sample at the center of each window, and then a mobile search is performed in the calibration image based on the obtained gray value sample to obtain the feature point position closest to the sample gray value, and then the feature extraction accuracy is improved based on matching. In order to improve the matching accuracy of the feature point position, a cost function is used for optimization, specifically:

[0018]

[0019] Among them, f and m are the affine factor and deviation of the brightness affine transformation, respectively, and p i (t) is the image intensity obtained by bilinear interpolation at sample i, q i is the rendering intensity at the sampling sample i. To initialize f and m, let t = 0, then f and m are expressed by the following formulas:

[0020]

[0021] Where p is the image intensity and q is the rendering intensity. Then the Levenberg-Marquardt method is used to optimize the four parameters f, m, p, and q. After optimizing the position of the feature points, the sub-pixel precise positioning of the feature points is also required, specifically:

[0022] Taking the feature point positions obtained by matching-based optimization as input, the precise sub-pixel positions of the features are then determined, and the precise feature point positions are calculated using a symmetry-based cost function:

[0023]

[0024] Where H is the local homography matrix from the space point on the star calibration pattern template to the corresponding image space point, s i represents the spatial position of the star-shaped calibration pattern of sample i, -s i is the sample position at the mirror image, and I refers to the image obtained by bilinear interpolation. In order to minimize C sym , use the Levenberg-Marquardt method to optimize H, and finally get the estimated accurate feature point position (H 0,2 , H 1,2 ) T .

[0025] In one of the embodiments, the output light beam of the collimator is modeled to determine the light direction and angular pointing information of the collimator, specifically: a homography matrix between a star-shaped calibration pattern template and a calibration image taken by a camera is obtained, and the light direction of each pixel in the image is solved to determine the light direction and angular pointing information of the collimator. After obtaining the light direction of the pixel, more pictures taken at different angles are needed to continuously expand the calibration image, so as to make the calibration image more complete, and finally the light direction of each pixel in an image can be obtained.

[0026] A collimator output light beam modeling and camera internal parameter calibration system based on a universal imaging model, characterized in that the system comprises:

[0027] A collimator, wherein a star-shaped calibration pattern is installed on the reticle of the collimator, and the star-shaped calibration pattern is composed of a plurality of special star-shaped patterns repeatedly combined, each special star-shaped pattern is represented by a square, and each square is composed of a specific number of black and white line segments;

[0028] A camera, used to take photos and collect data of the collimator star-shaped calibration pattern;

[0029] A computer, used for extracting features from the collected calibration data set and modeling the light beam emitted by the collimator;

[0030] Other cameras to be calibrated are used to calibrate parameters through the modeled collimator.

[0031] The above-mentioned collimator output light beam modeling and camera internal parameter calibration method and system based on the universal imaging model adopts a collimator with a star-shaped calibration pattern graticule, uses a telephoto camera to collect data from the collimator star-shaped calibration pattern, extracts features from the collected calibration data set, performs universal camera calibration based on the extracted image features, and further models the collimator based on the internal parameters obtained by calibration, determines the light direction and angle pointing information of the collimator, and establishes a parameterized calibration model. When it is necessary to continue to calibrate other cameras to be calibrated, the camera to be calibrated can directly take a photo of the modeled collimator on other occasions. Since the output light beam of the collimator has been modeled, the direction of the mark point can be known, thereby determining the coordinates of the calibration point photographed by the camera, and then the parameterized calibration model can be used to calculate the camera internal parameters based on the coordinates of the mark point.

[0032] The present invention aims at the problem that the calibration of the internal parameters of a camera with long-distance focusing is not convenient enough, realizes the calibration of the internal parameters of a general camera with a large field of view based on a collimator, checks the parallelism of the light beam emitted by the collimator, and uses a special black and white star-shaped calibration pattern as a calibration target, which is less affected by perspective and lens distortion, improves the robustness and accuracy of feature extraction, and realizes the automation of the calibration process, which is more convenient than the traditional method. In addition, the present invention also uses a universal imaging model to calibrate the internal parameters of the camera, which can more accurately describe the camera model and improve the calibration accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 A schematic diagram of a flow chart of a method for modeling a collimator output light beam and calibrating camera internal parameters based on a general imaging model in one embodiment;

[0034] Figure 2 A physical picture of a collimator customized for an embodiment;

[0035] Figure 3 A special star-shaped calibration pattern in one embodiment;

[0036] Figure 4 A diagram of an optimization method based on matching in one embodiment;

[0037] Figure 5 A flowchart of data collection and feature extraction in one embodiment;

[0038] Figure 6 A general camera calibration flow chart in one embodiment;

[0039] Figure 7 The structure block diagram of a collimator output light beam modeling and camera internal parameter calibration system based on a general imaging model in one embodiment. DETAILED DESCRIPTION

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

[0041] The present application provides a method and system for modeling the output light beam of a collimator and calibrating the internal parameters of a camera based on a universal imaging model, which can be applied to the calibration of the internal parameters of a camera with long-distance focusing.

[0042] In one embodiment, Figure 1 As shown, a method for modeling the output light beam of a collimator and calibrating the internal parameters of a camera based on a general imaging model is provided, comprising the following steps:

[0043] Step 1: Choose Figure 2 The collimator shown in the figure is used to install the prepared star-shaped calibration pattern on the reticle of the collimator as the target plate for the camera to shoot. Figure 3 As shown, it is composed of a repeated combination of multiple special star-shaped patterns, each of which is represented by a square. Each square is composed of 16 black and white line segments, and the black and white line segments in each square are triangular color blocks of similar area. These color blocks rotate around the center of the square in a black and white manner to form a star-shaped pattern. The star-shaped calibration pattern contains a square mark code.

[0044] Step 2: Use a universal camera to take photos of the star-shaped calibration pattern in the collimator to collect data. Due to the effect of the collimator, the star-shaped calibration pattern is located at infinity relative to the universal camera. Aim the universal camera at the collimator, search for all square mark codes in the image, and detect the four corner points of the middle square mark code. The detection process refers to the square mark code library, where the four corner points of the square mark code can provide the correspondence between the known calibration pattern and the calibration image.

[0045] Step 3: Use a computer to extract features from the calibration data set collected by the general camera. The extracted feature position is the center of the star pattern. The homography matrix of the star pattern is calculated based on the correspondence relationship. The homography matrix can be used to roughly estimate the positions of the four star features directly adjacent to the square mark code, and finally obtain the correspondence between the positions of the feature points in the pattern and the image. For the positions of other adjacent feature points that have not yet been detected, the algorithm calculates a new local homography matrix from the adjacent correspondence relationship to obtain the positions of the adjacent feature points, and then repeats this detection process until all feature points are detected.

[0046] Step 4: Perform universal camera calibration based on the extracted image features. After obtaining the feature point positions of the image, it is first necessary to obtain the homography matrix between the star-shaped calibration pattern template and the calibration image taken by the camera. Since the star-shaped calibration pattern is planar, the homography matrix can be used to represent the mapping relationship between the special star-shaped pattern template and the calibration image taken by the camera, where the homography matrix is ​​a projective transformation that can map points on one plane to another plane. Therefore, the homography matrix is ​​a linear transformation relationship, and the four adjacent feature positions of each square can be used to define a homography matrix to map the square. The homography matrix used in this embodiment refers to the correspondence between the same-name point pairs between images after the camera captures images of a plane scene from different perspectives. In this way, the transformation relationship between the image pixels and the coordinates of the center point of the special star pattern can be obtained for initialization in the next step.

[0047] Step 5: Model the light beam emitted by the collimator, determine the light direction and angle pointing information of the collimator, and establish a parameterized calibration model. The camera calibration initialization uses a linear pose solver to solve the coordinates of a point in the camera coordinate system in the direction of the image pixel light, thereby initializing the light direction of each pixel. After obtaining the light direction of the pixel, it is necessary to use more pictures taken at different angles to continuously expand the calibration image, so that the calibration image is more complete. Finally, the light direction of each pixel in an image can be obtained. After obtaining the light direction and angle pointing information of the collimator, a parameterized calibration model corresponding to the collimator is established.

[0048] Step 6: Calibrate the parameters of other cameras to be calibrated. Use other cameras to be calibrated to shoot the collimator that has been modeled. Determine the coordinates of the marker points based on the direction and angle of the light from the collimator. Substitute the coordinates of the marker points into the parametric calibration model to calibrate the internal parameters of other cameras to be calibrated. Directly use the camera to be calibrated to shoot the collimator that has been modeled in other situations. Since the outgoing light beam of the collimator has been modeled, the direction of the marker point can be known, thereby determining the coordinates of the calibration points shot by the camera. Then, the parametric calibration model can be used to calculate the internal parameters of the camera based on the marker point coordinates.

[0049] In the above-mentioned method for modeling the output beam of a collimator based on a universal imaging model and calibrating the internal parameters of a camera, a collimator with a star-shaped calibration pattern graticule is used, and a universal camera is used to collect data from the star-shaped calibration pattern of the collimator. Feature extraction is performed on the collected calibration data set, and the universal camera is calibrated according to the extracted image features. The collimator is further modeled according to the internal parameters obtained by calibration. Other cameras to be calibrated shoot the modeled collimator to determine the coordinates of the marking points, and the internal parameters of other cameras to be calibrated can be calibrated using a parameterized calibration model. The method or system can realize the internal parameter calibration of a universal camera with a large field of view based on a collimator, can verify the parallelism of the output beam of the collimator, improve the robustness and accuracy of feature extraction, improve the calibration accuracy, and also realize the automation of the calibration process.

[0050] In another embodiment, the initial feature point position obtained by the above steps is not accurate enough, so after all feature points are detected, the feature point positions are optimized using a matching-based optimization method, and erroneous feature point positions are eliminated. The matching-based optimization method first uses a local window of a certain size to search in the star pattern template to obtain a grayscale value sample at the center of each window. Then, according to the obtained grayscale value sample, a moving search is performed in the calibration image to obtain the feature point position closest to the sample grayscale value. Then, the feature extraction accuracy is improved based on matching. Figure 4 As shown in the figure, the process (a) is to use the known star-shaped calibration pattern to estimate the local homography between the pattern and the image. The search result is the grayscale sample at the center of the local window. The process (b) is that the grayscale sample moves in the image to find the best matching feature point position. The feature point position is matched by calculating whether the sampling intensity and the image intensity are consistent. The sampling intensity refers to the grayscale value of the RGB three channels of the sampling sample pixel, and the image intensity refers to the grayscale value of the RGB three channels of the image pixel. In order to improve the matching accuracy of the feature point position, the cost function is used for optimization:

[0051]

[0052] Among them, f and m are the affine factor and deviation of the brightness affine transformation, respectively, and p i (t) is the image intensity obtained by bilinear interpolation at sample i. i is the rendering intensity at the sampling sample i. To initialize f and m, let t = 0, then f and m are expressed by the following formulas:

[0053]

[0054] Where p is the image intensity and q is the rendering intensity. Then the Levenberg-Marquardt method is used to optimize the four parameters f, m, p, and q.

[0055] After optimizing the position of the feature points, it is also necessary to perform sub-pixel precision positioning of the feature points, such as Figure 5 As shown. The feature point positions obtained by matching-based optimization are taken as input, and the precise sub-pixel positions of the features are then determined. The precise feature point positions are calculated using a symmetry-based cost function:

[0056]

[0057] Where H is the local homography matrix from the space point on the star calibration pattern template to the corresponding image space point, s i represents the spatial position of the star-shaped calibration pattern of sample i, -s i is the sample position at the mirror image, and I refers to the image obtained by bilinear interpolation. In order to minimize C sym , use the Levenberg-Marquardt method to optimize H, and finally get the estimated accurate feature point position (H 0,2 , H 1,2 ) T .

[0058] Obtain the homography matrix between the star-shaped calibration pattern template and the calibration image taken by the camera, solve the light direction of each pixel in the image, and thus determine the light direction and angle pointing information of the collimator. After obtaining the light direction of the pixel, it is necessary to use more pictures taken at different angles to continuously expand the calibration image, so as to make the calibration image more complete. Finally, the light direction of each pixel in an image can be obtained, such as Figure 6 The camera calibration initialization uses a linear pose solver to solve the coordinates of a point in the camera coordinate system in the direction of the image pixel light, thereby initializing the light direction of each pixel. The camera takes two photos of the calibration image in succession, and two different intersection points P of the light direction and the calibration image can be obtained. 1 , P 2 The two intersection points P 1 , P 2 The position of the local coordinate system on the calibration image is known, but the relative posture is unknown. Establish a common coordinate system and use the condition that the two points are collinear to convert P 1 , P 2 The coordinates of the two points P are transformed into a common coordinate system. 1 , P 2 P′ in the common coordinate system 1 , P′ 2The coordinates of the pixel. The principle of determining a straight line with two points is used to determine the direction of the pixel light. Assume that there are three points S, S′ and S″ in the local coordinate system at different positions. The local coordinate system where S is located is taken as the common coordinate system. Assume that the rotation matrices of S′ and S″ relative to S are R′ and R″ respectively, and the translation vectors are t′ and t″ respectively, then the expression of the three points in the common coordinate system is

[0059]

[0060] Using the collinear relationship of the three points, the determinant of the matrix formed by the coordinate vectors of the three points is zero.

[0061]

[0062] There are 12 unknowns in the above equation, so at least 12 light directions are needed to form a collinear equation group to complete the solution of the rotation matrix and translation vector. Calculate P 1 , P 2 The coordinates of the two points in a common coordinate system, and finally determine the direction of the light according to the coordinates of the two points. After obtaining the light direction of the pixel, use more pictures taken at different angles to continuously expand the calibration image, so that the calibration image is more complete. Finally, the light direction of each pixel in an image can be obtained. The model describes the light direction of each pixel in the calibration image. For pixels in the image that have not been estimated in direction, they can be fitted according to the direction of their neighborhood. In order to make the light direction of each pixel in the model as close as possible to the actual camera outgoing light direction, it is also necessary to use a nonlinear optimization method to optimize the model parameters. This embodiment uses the bundle adjustment to jointly optimize the camera model parameters. The following formula is the cost function in the bundle adjustment:

[0063]

[0064] r c,i,o =π c (M c , T i , p o )-d i,o

[0065] Among them, C represents the camera, L c represents the set of images captured by the camera, O i Indicates the light direction of the feature point in the calibration image i. o is the coordinate of the calibration pattern feature point corresponding to the light direction o of the calibration image feature point, d i,o A represents the two-dimensional coordinates of feature point o extracted from the calibration image i. i is the transformation relationship of the feature points from the common coordinate system to the local coordinate system of the calibration image i, M cThe conversion relationship of converting the landmark points of the calibration image i from the local coordinate system of image i to the camera coordinate system of camera c. c represents the process of projecting the coordinates in the local coordinate system onto the calibration image of camera c. α represents the residual of the loss function. The Levenberg-Marquardt method is used to optimize the cost function W.

[0066] It should be understood that although Figure 1 , 5 The steps in the flowchart of 6 are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 , 5 At least part of the steps in 6 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0067] In one embodiment, Figure 7 As shown, a collimator output light beam modeling and camera internal parameter calibration system based on a general imaging model is provided, comprising:

[0068] A collimator is used to make the calibration target be located at infinity relative to the camera, wherein a star-shaped calibration pattern is installed at the graticule of the collimator, and the star-shaped calibration pattern is composed of a plurality of special star-shaped patterns repeatedly combined, each special star-shaped pattern is represented by a square, and each square is composed of a specific number of black and white line segments;

[0069] A general-purpose camera for taking photos and collecting data of the collimator star-shaped calibration pattern;

[0070] A computer, used for extracting features from the collected calibration data set and modeling the light beam emitted by the collimator;

[0071] Other cameras to be calibrated are used to calibrate parameters through the modeled collimator.

[0072] The specific definition of the collimator output beam modeling and camera internal parameter calibration system based on the general imaging model can be found in the above-mentioned definition of the collimator output beam modeling and camera internal parameter calibration method based on the general imaging model, which will not be repeated here. Those skilled in the art can understand that Figure 7The structure shown in the figure is only part of the devices related to the present application scheme, and does not constitute a limitation on the application of the present application scheme to other camera calibration systems. The specific camera calibration system may include more or fewer devices than those shown in the figure, or combine certain devices, or have a different component arrangement.

[0073] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0074] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for modeling the output beam of a collimator and calibrating camera internal parameters based on a general imaging model, characterized in that: The method comprises: A star-shaped calibration pattern is installed at the reticle of the collimator, wherein the star-shaped calibration pattern is composed of a plurality of special star-shaped patterns repeatedly combined, each special star-shaped pattern is represented by a square, and each square is composed of a specific number of black and white line segments; Use a general camera to take photos of the star-shaped calibration pattern in the collimator to collect data; The collected calibration data set is subjected to feature extraction, and its homography matrix is ​​calculated according to the correspondence between the calibration pattern and the calibration image. The positions of the four star-shaped features directly adjacent to the square mark code are roughly estimated using the homography matrix to obtain the correspondence between the positions of the feature points in the pattern and the image. For the positions of other adjacent feature points that have not been detected, the algorithm calculates a new local homography matrix from the adjacent correspondence to obtain the positions of the adjacent feature points, and then repeats this detection process until all feature points are detected; the extracted feature position is the center of the star-shaped pattern; Perform universal camera calibration based on the extracted image features; Model the outgoing light beam of the collimator, determine the light direction and angle pointing information of the collimator, and establish a parameterized calibration model; obtain the homography matrix between the star-shaped calibration pattern template and the calibration image taken by the camera, solve the light direction of each pixel in the image, and thus determine the light direction and angle pointing information of the collimator. After obtaining the light direction of the pixel, it is necessary to use more pictures taken at different angles to continuously expand the calibration image, so as to make the calibration image more complete, and finally obtain the light direction of each pixel in an image; The other cameras to be calibrated shoot the modeled collimator, determine the coordinates of the marker points according to the light direction and angle pointing information of the collimator, substitute the coordinates of the marker points into the parameterized calibration model, and calibrate the internal parameters of other cameras to be calibrated.

2. The method according to claim 1, characterized in that Each of the special star-shaped patterns is represented by a square, and each square is composed of a specific number of black and white line segments, including: The black and white line segments in each square are triangular color blocks of similar area. These color blocks rotate around the center of the square in a black and white manner to form a star-shaped pattern.

3. The method according to claim 1, characterized in that Use a general camera to take photos of the collimator star-shaped calibration pattern and collect data, including: The star-shaped calibration pattern includes a square mark code, all square mark codes are searched in the image, and four corner points of the middle square mark code are detected, wherein the four corner points of the square mark code can provide a corresponding relationship between the known calibration pattern and the calibration image.

4. The method according to claim 1, characterized in that After detecting all feature points, the feature point positions are optimized using a matching-based optimization method and the wrong feature point positions are removed. Specifically: A local window of a certain size is used to search in the star pattern template to obtain the grayscale value samples at the center of each window. Then, a moving search is performed in the calibration image based on the obtained grayscale value samples to obtain the feature point position closest to the sample grayscale value. After that, the feature extraction accuracy is improved based on matching.

5. The method according to claim 4, characterized in that In order to improve the accuracy of feature point position matching, the cost function is used for optimization, specifically: Among them, f and m are the affine factor and deviation of the brightness affine transformation, respectively, and p i (t) is the image intensity obtained by bilinear interpolation at sample i, q i is the rendering intensity at sample i.

6. The method according to claim 5, characterized in that To initialize f and m, let t = 0, then f and m are expressed as follows: Where p is the image intensity, q is the rendering intensity, and then the Levenberg-Marquardt method is used to optimize the four parameters f, m, p, and q.

7. The method according to claim 6, characterized in that After optimizing the position of the feature points, it is also necessary to perform sub-pixel precise positioning of the feature points, specifically: Taking the feature point positions obtained by matching-based optimization as input, the precise sub-pixel positions of the features are then determined, and the precise feature point positions are calculated using a symmetry-based cost function: Where H is the local homography matrix from the space point on the star calibration pattern template to the corresponding image space point, s i represents the spatial position of the star-shaped calibration pattern of sample i, -s i is the sample position at the mirror image, I refers to the image obtained by bilinear interpolation, in order to minimize C sym , use the Levenberg-Marquardt method to optimize H, and finally get the estimated accurate feature point position (H 0,2 , H 1,2 ) T .

8. A collimator light beam modeling and camera internal parameter calibration system based on a universal imaging model, used to execute any one of the collimator light beam modeling and camera internal parameter calibration methods based on a universal imaging model according to claims 1-7, characterized in that: The system comprises: A collimator, wherein a star-shaped calibration pattern is installed on the reticle of the collimator, and the star-shaped calibration pattern is composed of a plurality of special star-shaped patterns repeatedly combined, each special star-shaped pattern is represented by a square, and each square is composed of a specific number of black and white line segments; A general-purpose camera for taking photos and collecting data of the collimator star-shaped calibration pattern; A computer, used for extracting features from the collected calibration data set and modeling the light beam emitted by the collimator; Other cameras to be calibrated are used to calibrate parameters through the modeled collimator.