Method and device for determining field angle of camera module, medium and equipment
By acquiring parameters in the camera module to correct the distortion of the target image, and using the least squares optimization algorithm to calculate the field of view angle, the problem of large FOV measurement error in the prior art is solved and the measurement accuracy is improved.
Patent Information
- Application Number
- CN202410971200.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-07-19
AI Technical Summary
In the prior art, the error is large when measuring the field angle (FOV) of the camera module, which affects the overall quality.
By obtaining the pre-calibrated internal parameters of the camera module, distortion correction is performed on the key points of the target image, the field of view angle is determined using the internal parameters, and the horizontal coordinate and vertical coordinate are processed by the least squares optimization algorithm to accurately calculate the field of view angle.
It reduces the error of external measurement environmental factors and improves the measurement accuracy of FOV.
Smart Images

Figure CN119094892A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of lens parameter determination, and in particular to a method, device, medium and equipment for determining the field of view angle of a camera module. Background Art
[0002] With the continuous development of technology, users have higher and higher requirements for the performance of camera modules. The field of view (FOV) of the lens is an important performance indicator. FOV refers to the angle formed by the upper and lower, left and right or diagonal boundaries of the three-dimensional world seen from the camera's perspective and the optical center of the lens, corresponding to the longitudinal FOV, lateral FOV and diagonal FOV respectively.
[0003] Before the camera module is delivered for use, the FOV needs to be measured and calibrated. In traditional technology, the main method of measuring FOV is to arrange a large-area plane grid in space, shoot the plane with a camera, and infer the FOV based on the number or proportion of grids in the image. However, this test method not only requires a large-area test environment, but also requires the camera module to face the plane grid, which has high test requirements and large measurement errors.
[0004] Based on this, there is an urgent need for a method to measure the FOV of a camera module in order to improve the measurement accuracy of the FOV. Summary of the invention
[0005] In response to the problems existing in the prior art, the embodiments of the present invention provide a method, device, medium and equipment for determining the field of view angle of a camera module, so as to solve or partially solve the technical problem in the prior art that when measuring the FOV of a camera module, the measurement error is large, thereby affecting the overall quality of the camera module.
[0006] A first aspect of the present invention provides a method for determining a field of view angle of a camera module, the method comprising:
[0007] Obtaining the pre-calibrated intrinsic parameters of the camera module;
[0008] The key points of the target image are distorted and corrected by using the intrinsic parameters to obtain corresponding target points; the target image is an image obtained by photographing the chart using the camera module;
[0009] The field of view angle of the camera module is determined according to the coordinates of the target point and the intrinsic parameters.
[0010] In the above scheme, the intrinsic parameters include: principal point coordinates, focal length, radial distortion parameters and tangential distortion parameters; using the intrinsic parameters to perform distortion correction on the key points of the target image to obtain the corresponding target points includes:
[0011] For any of the key points, obtain the current coordinates of the key point; the current coordinates include: a current horizontal coordinate and a current vertical coordinate;
[0012] Based on the formula And formula The current horizontal coordinate x and the current vertical coordinate y are processed by the least squares optimization algorithm to obtain the corresponding least squares optimal solution; the least squares optimal solution is the horizontal coordinate x′ of the target point and the vertical coordinate y′ of the target point; wherein,
[0013] The k1 is the first radial distortion parameter, the k2 is the second radial distortion parameter, the k3 is the third radial distortion parameter, the k4 is the fourth radial distortion parameter, the k5 is the fifth radial distortion parameter, the k6 is the sixth radial distortion parameter, the r is the distance between the main point and the target point, the s1 is the first tangential distortion parameter, and the s2 is the second tangential distortion parameter.
[0014] In the above solution, determining the field of view angle of the camera module according to the coordinates of the target point and the intrinsic parameters includes:
[0015] When the field of view angle is a horizontal field of view angle, obtaining coordinates of a first target point and coordinates of a second target point; the first target point is obtained by performing distortion correction on the first key point, the second target point is obtained by performing distortion correction on the second key point, the first key point is the midpoint of the left boundary of the target image, and the second key point is the midpoint of the right boundary of the target image;
[0016] Determine a first distance between the first target point and the second target point according to the coordinates of the first target point and the coordinates of the second target point;
[0017] according to Determine the lateral field of view FOV1 of the camera module; wherein d1 is the first distance, and f is the focal length.
[0018] In the above solution, determining the field of view angle of the camera module according to the coordinates of the target point and the intrinsic parameters includes:
[0019] When the field of view angle is a longitudinal field of view angle, the coordinates of the third target point and the coordinates of the fourth target point are obtained; the third target point is obtained by performing distortion correction on the third key point, the fourth target point is obtained by performing distortion correction on the fourth key point, the third key point is the midpoint of the upper boundary of the target image, and the fourth key point is the midpoint of the lower boundary of the target image;
[0020] Determine a second distance between the third target point and the fourth target point according to the coordinates of the third target point and the coordinates of the fourth target point;
[0021] according to Determine the longitudinal field of view FOV2 of the camera module; wherein d2 is the second distance, and f is the focal length.
[0022] In the above solution, determining the field of view angle of the camera module according to the coordinates of the target point and the intrinsic parameters includes:
[0023] When the field of view angle is a diagonal field of view angle, obtaining coordinates of a fifth target point and a sixth target point; the fifth target point is obtained by performing distortion correction on the fifth key point, the sixth target point is obtained by performing distortion correction on the fourth key point, and the fifth key point and the sixth key point are vertices on the diagonal line of the target image;
[0024] Determine a third distance between the fifth target point and the sixth target point according to the coordinates of the fifth target point and the coordinates of the sixth target point;
[0025] according to Determine the diagonal field of view FOV3 of the camera module; wherein d3 is the third distance, and f is the focal length.
[0026] A second aspect of the present invention provides a device for determining a field of view angle of a camera module, the device comprising:
[0027] An acquisition unit, used to acquire the pre-calibrated intrinsic parameters of the camera module;
[0028] A correction unit, used to perform distortion correction on key points of a target image using the intrinsic parameters to obtain corresponding target points; the target image is an image obtained by photographing a chart using the camera module;
[0029] A determination unit is used to determine the field of view angle of the camera module according to the coordinates of the target point and the intrinsic parameters.
[0030] In the above solution, the internal parameters include: principal point coordinates, focal length, radial distortion parameters and tangential distortion parameters; the correction unit is specifically used for:
[0031] For any of the key points, obtain the current coordinates of the key point; the current coordinates include: a current horizontal coordinate and a current vertical coordinate;
[0032] Based on the formula And formula The current horizontal coordinate x and the current vertical coordinate y are processed by the least squares optimization algorithm to obtain the corresponding least squares optimal solution; the least squares optimal solution is the horizontal coordinate x′ of the target point and the vertical coordinate y′ of the target point; wherein,
[0033] The k1 is the first radial distortion parameter, the k2 is the second radial distortion parameter, the k3 is the third radial distortion parameter, the k4 is the fourth radial distortion parameter, the k5 is the fifth radial distortion parameter, the k6 is the sixth radial distortion parameter, the r is the distance between the main point and the target point, the s1 is the first tangential distortion parameter, and the s2 is the second tangential distortion parameter.
[0034] In the above solution, the determining unit is specifically used for:
[0035] When the field of view angle is a horizontal field of view angle, obtaining coordinates of a first target point and coordinates of a second target point; the first target point is obtained by performing distortion correction on the first key point, the second target point is obtained by performing distortion correction on the second key point, the first key point is the midpoint of the left boundary of the target image, and the second key point is the midpoint of the right boundary of the target image;
[0036] Determine a first distance between the first target point and the second target point according to the coordinates of the first target point and the coordinates of the second target point;
[0037] according to Determine the lateral field of view FOV1 of the camera module; wherein d1 is the first distance, and f is the focal length.
[0038] According to a third aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the steps of any one of the methods described in the first aspect are implemented.
[0039] According to a fourth aspect of the present invention, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any one of the methods described in the first aspect are implemented.
[0040] The present invention provides a method, device, medium and equipment for determining the field of view of a camera module, the method comprising: obtaining the pre-calibrated intrinsic parameters of the camera module; using the intrinsic parameters to perform distortion correction on the key points of a target image to obtain corresponding target points; the target image is an image obtained by photographing a chart using the camera module; determining the field of view of the camera module according to the coordinates of the target point and the intrinsic parameters; in this way, the distortion correction is performed on the key points of the target image using the intrinsic parameters of the camera module, so that the target point, the optical center and any point on the corner ray of the field of view in the real three-dimensional space obtained after correction are kept collinear, so that the corresponding field of view angle is accurately determined based on the distance between the two target points and the focal length using the trigonometric Pythagorean theorem; compared with the method of calculating FOV based on the shooting distance in the real space and the length of a grid background image in the prior art, the present invention can reduce the error of external measurement environment factors, and thus helps to improve the measurement accuracy of FOV. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0042] Figure 1 A schematic diagram of a method for determining a camera module field of view angle according to an embodiment of the present invention is shown;
[0043] Figure 2 A schematic diagram showing a two-dimensional viewing angle of a corresponding target point obtained by performing distortion correction on each key point in a target image according to an embodiment of the present invention is shown;
[0044] Figure 3 A schematic diagram of a one-dimensional viewing angle of a target point obtained by performing distortion correction on a key point according to an embodiment of the present invention is shown;
[0045] Figure 4 A schematic diagram of the structure of a device for determining the field of view angle of a camera module according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0046] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0047] The present invention provides a method for determining the viewing angle of a camera module, such as Figure 1 As shown, the method mainly includes the following steps:
[0048] S110, obtaining the pre-calibrated intrinsic parameters of the camera module;
[0049] The method of calibrating the internal parameters of the camera module can be arbitrarily selected. For example, the Zhang Zhengyou flat plate calibration algorithm can be used to calibrate the internal parameters of the camera module. This method mainly uses the camera module to shoot multiple chessboard charts at different positions, and then uses the corner point extraction algorithm to extract the corner points in each image, and constructs a 2D-3D pose relationship based on the corner points. According to the pose relationship, the internal parameter calibration function in opencv is called to calculate the internal parameters of the camera module.
[0050] Since in this step, the present invention is mainly to obtain the pre-calibrated intrinsic parameters of the camera module, there is no limitation on the intrinsic parameter calibration algorithm.
[0051] After the intrinsic parameters are calibrated, the intrinsic parameters of the camera module can be directly obtained. The intrinsic parameters include: principal point coordinates (the coordinates of the intersection of the optical center and the sensor when the optical center is perpendicular to the photosensitive chip sensor), focal length, radial distortion parameters and tangential distortion parameters.
[0052] The radial distortion parameters include: a first radial distortion parameter k1, a second radial distortion parameter k2, a third radial distortion parameter k3, a fourth radial distortion parameter k4, a fifth radial distortion parameter k5 and a sixth radial distortion parameter k6.
[0053] The tangential distortion parameters include: a first tangential distortion parameter p1 and a second tangential distortion parameter p2.
[0054] S111, using the intrinsic parameters to perform distortion correction on key points of a target image to obtain corresponding target points; the target image is an image obtained by photographing a chart using the camera module;
[0055] In this step, the target image is an image obtained by photographing the chart using the camera module, and the chart can be understood as a black and white checkerboard. For an original target image without distortion correction, the FOV boundary in the three-dimensional world just corresponds to the boundary of the target image. Therefore, the key points of the target image are the four vertices of the target image and the midpoints of the upper, lower, left, and right boundaries.
[0056] In one implementation, using intrinsic parameters to perform distortion correction on key points of a target image to obtain corresponding target points includes:
[0057] For any key point, obtain the current coordinates of the key point; the current coordinates include: the current horizontal coordinate and the current vertical coordinate;
[0058] Based on the formula And formula The current horizontal coordinate x and the current vertical coordinate y are processed by the least squares optimization algorithm to obtain the corresponding least squares optimal solution; the least squares optimal solution is the horizontal coordinate x′ of the target point and the vertical coordinate y′ of the target point; wherein,
[0059] k1 is the first radial distortion parameter, k2 is the second radial distortion parameter, k3 is the third radial distortion parameter, k4 is the fourth radial distortion parameter, k5 is the fifth radial distortion parameter, k6 is the sixth radial distortion parameter, r is the distance between the principal point and the target point, s1 is the first tangential distortion parameter, and s2 is the second tangential distortion parameter.
[0060] Specifically, for the target image, each pixel has a unique coordinate, so the position of each key point in the target image can also be directly obtained. After the coordinates of each key point are determined, the least squares optimal solution can be determined based on the above formula and the least squares optimization algorithm (the solution process is equivalent to optimizing the coordinates of the target point according to the current coordinates, and finally obtaining the optimal solution), thereby obtaining the coordinates of the corresponding target point.
[0061] S112, determining the field of view angle of the camera module according to the coordinates of the target point and the intrinsic parameters.
[0062] After the coordinates of each target point are determined, the field of view of the camera module can be determined based on the coordinates of the target point and the intrinsic parameters. Figure 2 As shown in , after the 8 key points of the target image are distorted and corrected, the target points obtained are as follows Figure 2 As shown. Figure 2 In it, p1~p8 are key points, and p1′~p8′ are corresponding target points.
[0063] Since the field of view angle includes the horizontal field of view angle, the vertical field of view angle and the diagonal field of view angle, it is necessary to determine the above three field of view angles of the camera module. In one embodiment, the field of view angle of the camera module is determined according to the coordinates of the target point and the intrinsic parameters, including:
[0064] When the field of view angle is a horizontal field of view angle, the coordinates of the first target point and the coordinates of the second target point are obtained; the first target point is obtained by performing distortion correction on the first key point, and the second target point is obtained by performing distortion correction on the second key point, the first key point is the midpoint of the left boundary of the target image, and the second key point is the midpoint of the right boundary of the target image;
[0065] Determine a first distance between the first target point and the second target point according to the coordinates of the first target point and the coordinates of the second target point;
[0066] according to Determine the lateral field of view FOV1 of the camera module, wherein d1 is the first distance and f is the focal length.
[0067] Specifically, if Figure 3 As shown in the figure, assuming that the first key point is p1, the first target point is p1′; the second key point is p2, the second target point is p′2, A1 is any point on the FOV corner ray, B1 is any point on the other corner ray of FOV, and the optical center is OC, then the lateral FOV is Figure 3 The angle θ is shown in Figure 1. Figure 3 It can be seen that θ = 2β, so if β can be determined, the horizontal FOV can also be determined.
[0068] After correcting the first key point and the second key point, the first target point, the optical center OC and the point A1 will be collinear. Assuming that the first distance between p1′ and p′2 is d1, then:
[0069]
[0070] Then we can get:
[0071]
[0072] This determines the lateral FOV.
[0073] The same principle is used to determine the field of view of the camera module based on the coordinates of the target point and the intrinsic parameters, including:
[0074] When the field of view angle is a longitudinal field of view angle, the coordinates of the third target point and the coordinates of the fourth target point are obtained; the third target point is obtained by performing distortion correction on the third key point, the fourth target point is obtained by performing distortion correction on the fourth key point, the third key point is the midpoint of the upper boundary of the target image, and the fourth key point is the midpoint of the lower boundary of the target image;
[0075] determining a second distance between the third target point and the fourth target point according to the coordinates of the third target point and the coordinates of the fourth target point;
[0076] according to Determine the longitudinal field of view FOV2 of the camera module; wherein d2 is the second distance and f is the focal length.
[0077] Since the longitudinal field of view angle is the field of view angle in the up-down direction, it is necessary to determine the longitudinal field of view angle according to the midpoint of the upper boundary of the target image and the midpoint of the lower boundary of the target image. The specific determination principle is the same as the determination principle of the transverse field of view angle, so it will not be repeated here.
[0078] In one embodiment, determining the field of view angle of the camera module according to the coordinates of the target point and the intrinsic parameters includes:
[0079] When the field of view angle is a diagonal field of view angle, the coordinates of the fifth target point and the coordinates of the sixth target point are obtained; the fifth target point is obtained by performing distortion correction on the fifth key point, and the sixth target point is obtained by performing distortion correction on the fourth key point, and the fifth key point and the sixth key point are vertices on the diagonal line of the target image;
[0080] determining a third distance between the fifth target point and the sixth target point according to the coordinates of the fifth target point and the coordinates of the sixth target point;
[0081] according to Determine the diagonal field of view FOV3 of the camera module; wherein d3 is the third distance and f is the focal length.
[0082] Since the diagonal field of view angle is the field of view angle in the diagonal direction, it is necessary to determine the diagonal field of view angle according to the two vertices on the diagonal line of the target image. The specific determination principle is the same as the determination principle of the lateral field of view angle, so it will not be repeated here.
[0083] It should be noted that the target image has two diagonals, and the diagonal field of view angle can be determined by using two vertices on any diagonal. Figure 2 , when the fifth key point is p5, the sixth key point is p6; when the seventh key point is p7, the eighth key point is p8.
[0084] The above method can ultimately determine the horizontal FOV, vertical FOV and diagonal FOV of the camera module.
[0085] The present invention uses the internal parameters of the camera module to perform distortion correction on the key points of the target image, so that the target point, the optical center and any point on the corner ray of the field of view angle in the real three-dimensional space obtained after correction are kept collinear, so that based on the distance between the two target points and the focal length, the corresponding field of view angle is accurately determined using the trigonometric Pythagorean theorem; compared with the method of calculating FOV based on the shooting distance in the real space and the length of the grid background image in the prior art, the present invention can reduce the error of external measurement environment factors, and thus helps to improve the measurement accuracy of FOV.
[0086] Based on the same inventive concept as in the above-mentioned embodiment, this embodiment also provides a device for determining the field of view angle of a camera module, such as Figure 4As shown, the device comprises:
[0087] An acquisition unit 41 is used to acquire the pre-calibrated intrinsic parameters of the camera module;
[0088] A correction unit 42, used to perform distortion correction on key points of a target image using the intrinsic parameters to obtain corresponding target points; the target image is an image obtained by photographing a chart using the camera module;
[0089] The determination unit 43 is used to determine the field of view angle of the camera module according to the coordinates of the target point and the intrinsic parameters.
[0090] In one implementation, the intrinsic parameters include: principal point coordinates, focal length, radial distortion parameters and tangential distortion parameters; the correction unit 42 is specifically used for:
[0091] For any of the key points, obtain the current coordinates of the key point; the current coordinates include: a current horizontal coordinate and a current vertical coordinate;
[0092] Based on the formula And formula The current horizontal coordinate x and the current vertical coordinate y are processed by the least squares optimization algorithm to obtain the corresponding least squares optimal solution; the least squares optimal solution is the horizontal coordinate x′ of the target point and the vertical coordinate y′ of the target point; wherein,
[0093] The k1 is the first radial distortion parameter, the k2 is the second radial distortion parameter, the k3 is the third radial distortion parameter, the k4 is the fourth radial distortion parameter, the k5 is the fifth radial distortion parameter, the k6 is the sixth radial distortion parameter, the r is the distance between the main point and the target point, the s1 is the first tangential distortion parameter, and the s2 is the second tangential distortion parameter.
[0094] The determining unit 43 is specifically configured to:
[0095] When the field of view angle is a horizontal field of view angle, obtaining coordinates of a first target point and coordinates of a second target point; the first target point is obtained by performing distortion correction on the first key point, the second target point is obtained by performing distortion correction on the second key point, the first key point is the midpoint of the left boundary of the target image, and the second key point is the midpoint of the right boundary of the target image;
[0096] Determine a first distance between the first target point and the second target point according to the coordinates of the first target point and the coordinates of the second target point;
[0097] according to Determine the lateral field of view FOV1 of the camera module; wherein d1 is the first distance, and f is the focal length.
[0098] Since the device introduced in the embodiment of the present invention is a device used to implement the method for determining the field of view of the camera module in the embodiment of the present invention, based on the method introduced in the embodiment of the present invention, the person skilled in the art can understand the specific structure and deformation of the device, so it is not repeated here. All devices used in the method of the embodiment of the present invention belong to the scope of protection of the present invention.
[0099] Based on the same inventive concept, this embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any step of the method described above when executing the computer program.
[0100] Based on the same inventive concept, this embodiment provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the methods described above are implemented.
[0101] Through one or more embodiments of the present invention, the present invention has the following beneficial effects or advantages:
[0102] The present invention provides a method, device, medium and equipment for determining the field of view of a camera module, the method comprising: obtaining the pre-calibrated intrinsic parameters of the camera module; using the intrinsic parameters to perform distortion correction on the key points of a target image to obtain corresponding target points; the target image is an image obtained by photographing a chart using the camera module; determining the field of view of the camera module according to the coordinates of the target point and the intrinsic parameters; in this way, the distortion correction is performed on the key points of the target image using the intrinsic parameters of the camera module, so that the target point, the optical center and any point on the corner ray of the field of view in the real three-dimensional space obtained after correction are kept collinear, so that the corresponding field of view angle is accurately determined based on the distance between the two target points and the focal length using the trigonometric Pythagorean theorem; compared with the method of calculating FOV based on the shooting distance in the real space and the length of a grid background image in the prior art, the present invention can reduce the error of external measurement environment factors, and thus helps to improve the measurement accuracy of FOV.
[0103] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description of the above specific languages is for disclosing the best mode of the present invention.
[0104] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0105] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the intention that the claimed invention requires more features than those explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.
[0106] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0107] In addition, those skilled in the art will appreciate that, although some embodiments herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.
[0108] The various component embodiments of the present invention can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components in a gateway, proxy server, or system according to an embodiment of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0109] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between parentheses should not be constructed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" before an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names.
[0110] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0111] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for determining the field of view angle of a camera module, It is characterized in that The method comprises: Obtaining the pre-calibrated intrinsic parameters of the camera module; The key points of the target image are distorted and corrected by using the intrinsic parameters to obtain corresponding target points; the target image is an image obtained by photographing the chart using the camera module; The field of view angle of the camera module is determined according to the coordinates of the target point and the intrinsic parameters.
2. The method according to claim 1, It is characterized in that The intrinsic parameters include: principal point coordinates, focal length, radial distortion parameters and tangential distortion parameters; the use of the intrinsic parameters to correct the distortion of the key points of the target image to obtain the corresponding target points includes: For any of the key points, obtain the current coordinates of the key point; the current coordinates include: a current horizontal coordinate and a current vertical coordinate; Based on the formula And formula The current horizontal coordinate x and the current vertical coordinate y are processed by the least squares optimization algorithm to obtain the corresponding least squares optimal solution; the least squares optimal solution is the horizontal coordinate x′ of the target point and the vertical coordinate y′ of the target point; wherein, The k 1 is the first radial distortion parameter, the k 2 is the second radial distortion parameter, the k 3 is the third radial distortion parameter, the k 4 is the fourth radial distortion parameter, the k 5 is the fifth radial distortion parameter, the k 6 is the sixth radial distortion parameter, r is the distance between the principal point and the target point, s 1 is the first tangential distortion parameter, the s 2 is the second tangential distortion parameter.
3. The method according to claim 1, It is characterized in that The determining the field of view angle of the camera module according to the coordinates of the target point and the intrinsic parameters includes: When the field of view angle is a horizontal field of view angle, obtaining coordinates of a first target point and coordinates of a second target point; the first target point is obtained by performing distortion correction on the first key point, the second target point is obtained by performing distortion correction on the second key point, the first key point is the midpoint of the left boundary of the target image, and the second key point is the midpoint of the right boundary of the target image; Determine a first distance between the first target point and the second target point according to the coordinates of the first target point and the coordinates of the second target point; according to Determine the lateral field of view FOV of the camera module 1 ; wherein said d 1 is the first distance, and f is the focal length.
4. The method according to claim 1, It is characterized in that The determining the field of view angle of the camera module according to the coordinates of the target point and the intrinsic parameters includes: When the field of view angle is a longitudinal field of view angle, the coordinates of the third target point and the coordinates of the fourth target point are obtained; the third target point is obtained by performing distortion correction on the third key point, the fourth target point is obtained by performing distortion correction on the fourth key point, the third key point is the midpoint of the upper boundary of the target image, and the fourth key point is the midpoint of the lower boundary of the target image; Determine a second distance between the third target point and the fourth target point according to the coordinates of the third target point and the coordinates of the fourth target point; according to Determine the longitudinal field of view FOV of the camera module 2 ; wherein said d 2 is the second distance, and f is the focal length.
5. The method according to claim 1, It is characterized in that The determining the field of view angle of the camera module according to the coordinates of the target point and the intrinsic parameters includes: When the field of view angle is a diagonal field of view angle, obtaining coordinates of a fifth target point and a sixth target point; the fifth target point is obtained by performing distortion correction on the fifth key point, the sixth target point is obtained by performing distortion correction on the fourth key point, and the fifth key point and the sixth key point are vertices on the diagonal line of the target image; Determine a third distance between the fifth target point and the sixth target point according to the coordinates of the fifth target point and the coordinates of the sixth target point; according to Determine the diagonal field of view FOV of the camera module 3 ; wherein said d 3 is the third distance, and f is the focal length.
6. A device for determining the field of view angle of a camera module, It is characterized in that The device comprises: An acquisition unit, used to acquire the pre-calibrated intrinsic parameters of the camera module; A correction unit, used to perform distortion correction on key points of a target image using the intrinsic parameters to obtain corresponding target points; the target image is an image obtained by photographing a chart using the camera module; A determination unit is used to determine the field of view angle of the camera module according to the coordinates of the target point and the intrinsic parameters.
7. The device according to claim 6, It is characterized in that The internal parameters include: principal point coordinates, focal length, radial distortion parameters and tangential distortion parameters; the correction unit is specifically used for: For any of the key points, obtain the current coordinates of the key point; the current coordinates include: a current horizontal coordinate and a current vertical coordinate; Based on the formula And formula The current horizontal coordinate x and the current vertical coordinate y are processed by the least squares optimization algorithm to obtain the corresponding least squares optimal solution; the least squares optimal solution is the horizontal coordinate x′ of the target point and the vertical coordinate y′ of the target point; wherein, The k 1 is the first radial distortion parameter, the k 2 is the second radial distortion parameter, the k 3 is the third radial distortion parameter, the k 4 is the fourth radial distortion parameter, the k 5 is the fifth radial distortion parameter, the k 6 is the sixth radial distortion parameter, r is the distance between the principal point and the target point, s 1 is the first tangential distortion parameter, the s 2 is the second tangential distortion parameter.
8. The device according to claim 6, It is characterized in that The determining unit is specifically used for: When the field of view angle is a horizontal field of view angle, obtaining coordinates of a first target point and coordinates of a second target point; the first target point is obtained by performing distortion correction on the first key point, the second target point is obtained by performing distortion correction on the second key point, the first key point is the midpoint of the left boundary of the target image, and the second key point is the midpoint of the right boundary of the target image; Determine a first distance between the first target point and the second target point according to the coordinates of the first target point and the coordinates of the second target point; according to Determine the lateral field of view FOV of the camera module 1 ; wherein said d 1 is the first distance, and f is the focal length.
9. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
10. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Method and device for detecting module FOV by using checkerboard test table and readable storage medium
CN110035280A
Distortion correction method based on RC optical system
CN110751601A
Monocular camera field angle measurement method and system
CN117197170A
Dimensional calibration of the field-of-view of a single camera
US20230027236A1
