Test field of view adjustment method, device, test equipment and computer medium
By obtaining the spatial coordinates of each parallel light tube in the test field of view and performing linear fitting, and converting them into the target coordinates required by the sensor, the field of view adjustment problem caused by imaging distortion of wide-angle lenses is solved, and fast and accurate field of view adjustment is achieved.
Patent Information
- Application Number
- CN202310505031.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-28
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2043-04-28
AI Technical Summary
When testing camera modules with wide-angle lenses using test equipment equipped with collimators, technicians find it difficult to quickly and accurately adjust the position of the test field of view, especially when distortion occurs during lens imaging.
By obtaining the preset test field of view and determining the spatial coordinates of each parallel light tube in the test field of view, linear fitting is performed using the camera parameter table to transform the plane coordinates into the target required coordinates corresponding to the sensor. Finally, the position of the test field of view is adjusted based on the target required coordinates and the initial spatial coordinates.
It can quickly and accurately adjust the position of the test field of view, solve the problem of field of view adjustment caused by imaging distortion of wide-angle lenses, and improve detection efficiency and accuracy.
Smart Images

Figure CN116567200B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method, device, test equipment, and computer-readable storage medium for adjusting a test field of view. Background Art
[0002] With the continuous development of cameras, panoramic cameras with wide-angle lenses have become the shooting choice of more and more users. During the production process of panoramic cameras, technicians mainly use test equipment equipped with light source boards to test the camera modules configured in panoramic cameras. However, due to the large size of test equipment equipped with light source boards, and when the wide-angle lens in the panoramic camera exceeds 150°, technicians cannot use test equipment equipped with light source boards to test the camera modules. Therefore, more and more technicians choose to use test equipment equipped with parallel light tubes to test the camera modules.
[0003] However, when testing camera modules using test equipment equipped with a collimator, technicians often need to spend a lot of time adjusting the test field of view corresponding to the collimator. At the same time, since the wide-angle lens will cause a certain degree of image distortion when imaging, the position of the test field of view is even more difficult to adjust. Summary of the Invention
[0004] The main purpose of this application is to provide a method, device, test equipment and computer-readable storage medium for adjusting the test field of view, so as to enable the test equipment to quickly and accurately adjust the position of the test field of view.
[0005] To achieve the above objectives, the present application provides a method for adjusting a test field of view, which is applied to a test device for detecting a camera module equipped with a sensor. The method for adjusting the test field of view comprises the following steps:
[0006] Acquire a preset test field of view, and determine a first spatial coordinate corresponding to a central collimator contained in the test field of view;
[0007] Determining the second spatial coordinates corresponding to each of the other collimators except the central collimator in the test field of view, and determining the first plane coordinates corresponding to each of the other collimators based on the second spatial coordinates;
[0008] Obtaining a preset camera parameter table, and obtaining a linear fitting function based on the camera parameter table, and converting each of the first plane coordinates into target required coordinates corresponding to the sensor through the linear fitting function;
[0009] The position of the test field of view is adjusted based on the target required coordinates and the first spatial coordinates so that the test field of view is located at a required position corresponding to the sensor.
[0010] Furthermore, the step of determining the first spatial coordinate corresponding to the central collimator contained in the test field of view includes:
[0011] Determining a test distance and an effective diameter corresponding to a central collimator within the test field of view, and determining a first angle value corresponding to the central collimator, wherein the first angle value is a value of an angle between a center point of the collimator and a horizontal direction;
[0012] The first spatial coordinate corresponding to the central collimator is determined based on the test distance, effective diameter and first angle value corresponding to the central collimator, wherein the first spatial coordinate is the spatial coordinate of the central collimator relative to the center point of the sensor.
[0013] Furthermore, the step of determining the second spatial coordinates corresponding to each of the other collimators except the central collimator in the test field of view includes:
[0014] Determining the first angle value and the second angle value corresponding to each of the other collimators in the test field of view except the central collimator, wherein the second angle value is the angle value between the center point of each of the other collimators and the center point of the central collimator in the vertical direction;
[0015] The second spatial coordinate corresponding to each of the other parallel light tubes is determined based on the first angle value, the second angle value, the test distance and the effective diameter corresponding to each of the other parallel light tubes, wherein the second spatial coordinate is the spatial coordinate of the other parallel light tube relative to the center point of the sensor.
[0016] Furthermore, the step of determining the first plane coordinates corresponding to each of the other collimators based on each of the second space coordinates includes:
[0017] Determining a third angle value corresponding to each of the other collimators, wherein the third angle value is a value of an angle between a center point of the other collimators and a center point of the central collimator in a horizontal direction;
[0018] The first plane coordinates corresponding to each of the other collimators are determined based on the second space coordinates corresponding to each of the other collimators and the third angle value.
[0019] Furthermore, the step of obtaining a linear fitting function based on the camera parameter table includes:
[0020] Determining the image height value and the field of view angle value of each lens contained in the camera parameter table;
[0021] A linear fitting function is obtained by performing linear fitting on each of the lens image height values and each of the field of view angle values.
[0022] Furthermore, the step of converting each of the first plane coordinates into target required coordinates corresponding to the sensor by using the linear fitting function includes:
[0023] Determine a first-plane abscissa calculation formula and a first-plane ordinate calculation formula corresponding to each of the first-plane coordinates;
[0024] Determine a second plane ordinate calculation formula and a second plane ordinate calculation formula based on the linear fitting function, the first plane abscissa calculation formula, and the first plane ordinate calculation formula;
[0025] Each of the first plane coordinates is converted into a target required coordinate corresponding to the sensor according to the second plane horizontal coordinate calculation formula and the second plane vertical coordinate calculation formula.
[0026] Furthermore, the step of adjusting the position of the test field of view based on the target required coordinates and the first spatial coordinates so that the test field of view is at the required position corresponding to the sensor includes:
[0027] Determining an angle difference between the target required coordinates and the first space coordinates;
[0028] The position of the test field of view is adjusted based on the angle difference so that the test field of view is located at a required position corresponding to the sensor.
[0029] In addition, to achieve the above-mentioned purpose, the present application also provides a device for adjusting the test field of view, which is used for testing equipment to detect a camera module equipped with a sensor, and the device includes:
[0030] A first coordinate calculation module is used to obtain a preset test field of view and determine a first spatial coordinate corresponding to a central collimator contained in the test field of view;
[0031] a second coordinate calculation module, configured to determine a second spatial coordinate corresponding to each of the other collimators except the central collimator within the test field of view, and determine a first plane coordinate corresponding to each of the other collimators based on the second spatial coordinates;
[0032] A plane coordinate conversion module, configured to obtain a preset camera parameter table, obtain a linear fitting function based on the camera parameter table, and convert each of the first plane coordinates into a target required coordinate corresponding to the sensor through the linear fitting function;
[0033] A test field of view adjustment module is used to adjust the position of the test field of view based on the target required coordinates and the first spatial coordinates, so that the test field of view is located at a required position corresponding to the sensor.
[0034] In addition, to achieve the above-mentioned purpose, the present application also provides a testing device, which includes: a memory, a processor, and a test field of view adjustment program stored on the memory and runnable on the processor. When the test field of view adjustment program is executed by the processor, the steps of the test field of view adjustment method as described above are implemented.
[0035] In addition, to achieve the above-mentioned purpose, the present application also provides a computer-readable storage medium, on which a test field of view adjustment program is stored. When the test field of view adjustment program is executed by a processor, the steps of the test field of view adjustment method as described above are implemented.
[0036] The test field of view adjustment method, device, test equipment and computer-readable storage medium provided in the embodiments of the present application are applied to the test equipment to detect a camera module equipped with a sensor, by obtaining a preset test field of view and determining the first spatial coordinates corresponding to the central collimator contained in the test field of view; determining the second spatial coordinates corresponding to each of the other collimators in the test field of view except the central collimator, and determining the first plane coordinates corresponding to each of the other collimators based on the second spatial coordinates; obtaining a preset camera parameter table, and obtaining a linear fitting function based on the camera parameter table, and converting the first plane coordinates into target required coordinates corresponding to the sensor through the linear fitting function; and adjusting the position of the test field of view based on the target required coordinates and the first spatial coordinates so that the test field of view is at the required position corresponding to the sensor.
[0037] In this embodiment, when the test equipment is running, it first obtains a test field of view preset by a technician, which includes multiple parallel light tubes, and fixes the test field of view at a target position corresponding to the sensor included in the camera module. At the same time, the test equipment determines the first spatial coordinates of the central parallel light tube included in the test field of view relative to the sensor. After that, the test equipment determines the second spatial coordinates of each of the multiple parallel light tubes except the central parallel light tube in the test field of view relative to the sensor, and determines the first plane coordinates of each of the other parallel light tubes relative to the central parallel light tube based on each second spatial coordinate. After that, the test equipment reads the storage device to obtain the camera parameter table preset by the technician, and obtains a linear fitting function based on the camera parameter table. The test equipment then converts each first plane coordinate into the target requirement coordinates corresponding to the sensor according to the linear fitting function. Finally, the test equipment adjusts the position of the test field of view based on the target requirement coordinates and the first spatial coordinates, so that the test field of view is in the required position corresponding to the sensor.
[0038] In this way, the present application determines the second spatial coordinates corresponding to each parallel light tube except the central parallel light tube in the test field of view, and the first plane coordinates corresponding to each second spatial coordinate, and performs linear fitting on each first plane coordinate to obtain the target requirement coordinates corresponding to the sensor, and then adjusts the position of the test field of view based on the target requirement coordinates and the first spatial coordinates corresponding to the central parallel light tube, thereby achieving the technical effect of enabling the test equipment to quickly and accurately adjust the position of the test field of view. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a structural diagram of the test equipment of the hardware operating environment involved in the embodiment of the present application;
[0040] Figure 2 This is a flow chart of a first embodiment of a method for adjusting the test field of view of the present application;
[0041] Figure 3 Schematic diagram of a test field of view according to an embodiment of a method for adjusting a test field of view of the present application;
[0042] Figure 4 This is a schematic diagram of the calculation principle involved in an embodiment of the method for adjusting the test field of view of this application;
[0043] Figure 5 Schematic diagram of a plane test field of view according to an embodiment of a method for adjusting the test field of view of the present application;
[0044] Figure 6 This is a schematic diagram of a camera parameter table related to an embodiment of a method for adjusting the test field of view of this application;
[0045] Figure 7Schematic diagram of functional modules involved in an embodiment of a method for adjusting the test field of view of the present application.
[0046] The realization of the objectives, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0047] It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application.
[0048] Reference Figure 1 , Figure 1 This is a schematic diagram of the test equipment structure of the hardware operating environment involved in the embodiment of the present application.
[0049] It should be noted that Figure 1 The test device of the embodiment of the present invention can be a device that performs the test field adjustment method of the present invention, and can specifically be a mobile terminal, a data storage control terminal, a PC, or a portable computer.
[0050] like Figure 1 As shown, the test device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to implement connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and optionally the user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WI-FI) interface). The memory 1005 may be a high-speed random access memory (RAM) memory, or a stable non-volatile memory (NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0051] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation of the test device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0052] like Figure 1As shown, the memory 1005 as a storage medium may include an operating system, a data storage module, a network communication module, a user interface module, and a test field adjustment program.
[0053] exist Figure 1 In the test device shown, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the test device of the present application can be set in the test device. The test device calls the test field adjustment program stored in the memory 1005 through the processor 1001 and performs the following operations:
[0054] Acquire a preset test field of view, and determine a first spatial coordinate corresponding to a central collimator contained in the test field of view;
[0055] Determining the second spatial coordinates corresponding to each of the other collimators except the central collimator in the test field of view, and determining the first plane coordinates corresponding to each of the other collimators based on the second spatial coordinates;
[0056] Obtaining a preset camera parameter table, and obtaining a linear fitting function based on the camera parameter table, and converting each of the first plane coordinates into target required coordinates corresponding to the sensor through the linear fitting function;
[0057] The position of the test field of view is adjusted based on the target required coordinates and the first spatial coordinates so that the test field of view is located at a required position corresponding to the sensor.
[0058] Furthermore, the processor 1001 calls the adjustment program of the test field of view stored in the memory 1005, and further performs the following operations:
[0059] Determining a test distance and an effective diameter corresponding to a central collimator within the test field of view, and determining a first angle value corresponding to the central collimator, wherein the first angle value is a value of an angle between a center point of the collimator and a horizontal direction;
[0060] The first spatial coordinate corresponding to the central collimator is determined based on the test distance, effective diameter and first angle value corresponding to the central collimator, wherein the first spatial coordinate is the spatial coordinate of the central collimator relative to the center point of the sensor.
[0061] Furthermore, the processor 1001 calls the adjustment program of the test field of view stored in the memory 1005, and further performs the following operations:
[0062] Determining the first angle value and the second angle value corresponding to each of the other collimators in the test field of view except the central collimator, wherein the second angle value is the angle value between the center point of each of the other collimators and the center point of the central collimator in the vertical direction;
[0063] The second spatial coordinate corresponding to each of the other parallel light tubes is determined based on the first angle value, the second angle value, the test distance and the effective diameter corresponding to each of the other parallel light tubes, wherein the second spatial coordinate is the spatial coordinate of the other parallel light tube relative to the center point of the sensor.
[0064] Furthermore, the processor 1001 calls the adjustment program of the test field of view stored in the memory 1005, and further performs the following operations:
[0065] Determining a third angle value corresponding to each of the other collimators, wherein the third angle value is a value of an angle between a center point of the other collimators and a center point of the central collimator in a horizontal direction;
[0066] The first plane coordinates corresponding to each of the other collimators are determined based on the second space coordinates corresponding to each of the other collimators and the third angle value.
[0067] Furthermore, the processor 1001 calls the adjustment program of the test field of view stored in the memory 1005, and further performs the following operations:
[0068] Determining the image height value and the field of view angle value of each lens contained in the camera parameter table;
[0069] A linear fitting function is obtained by performing linear fitting on each of the lens image height values and each of the field of view angle values.
[0070] Furthermore, the processor 1001 calls the adjustment program of the test field of view stored in the memory 1005, and further performs the following operations:
[0071] Determine a first-plane abscissa calculation formula and a first-plane ordinate calculation formula corresponding to each of the first-plane coordinates;
[0072] Determine a second plane ordinate calculation formula and a second plane ordinate calculation formula based on the linear fitting function, the first plane abscissa calculation formula, and the first plane ordinate calculation formula;
[0073] Each of the first plane coordinates is converted into a target required coordinate corresponding to the sensor according to the second plane horizontal coordinate calculation formula and the second plane vertical coordinate calculation formula.
[0074] Furthermore, the processor 1001 calls the adjustment program of the test field of view stored in the memory 1005, and further performs the following operations:
[0075] Determining an angle difference between the target required coordinates and the first space coordinates;
[0076] The position of the test field of view is adjusted based on the angle difference so that the test field of view is located at a required position corresponding to the sensor.
[0077] Based on the above-mentioned testing equipment, various embodiments of the method for adjusting the test field of view of the present invention are provided.
[0078] Please refer to Figure 2 , Figure 2 FIG. 4 is a flow chart of a first embodiment of a method for adjusting a test field of view according to the present invention.
[0079] It should be understood that although a logical order is shown in the flowchart, in some cases, the test field adjustment method of the present invention may also perform the steps shown or described in an order different from that shown here.
[0080] In this embodiment, the method for adjusting the test field of view of the present invention is applied to a test device for detecting a camera module equipped with a sensor, and may include the following steps:
[0081] Step S10: obtaining a preset test field of view, and determining a first spatial coordinate corresponding to a central collimator contained in the test field of view;
[0082] In this embodiment, when the test equipment is running, it first obtains the test field of view preset by the technician, which contains multiple parallel light tubes, and fixes the test field of view at the target position corresponding to the sensor contained in the camera module. At the same time, the test equipment determines the first spatial coordinate of the center parallel light tube at the center of the test field of view relative to the sensor.
[0083] For example, see Figure 3 , Figure 3 The schematic diagram of the test field of view involved in the embodiment of the test field of view adjustment method of the present application is as follows: when the test equipment is running, the test field of view including multiple parallel light tubes preset by the technician is first obtained (eg Figure 3 At the same time, the test equipment determines the required position corresponding to the sensor contained in the camera module, thereby deploying the test field of view at the required position. The test equipment then constructs a spatial coordinate system with the sensor as the origin, and sets the spatial coordinates corresponding to the sensor to (0, 0, 0). The test equipment then determines the first spatial coordinates (x1, y1, z1) of the center parallel light tube at the center of the test field of view relative to (0, 0, 0).
[0084] Furthermore, in a feasible embodiment, the step of “determining the first spatial coordinate corresponding to the central collimator included in the test field of view” in the above step S10 may specifically include:
[0085] Step S101: determining a test distance and an effective diameter corresponding to a central collimator within the test field of view, and determining a first angle value corresponding to the central collimator, wherein the first angle value is a value of an angle between a center point of the collimator and a horizontal direction;
[0086] Step S102: determining a first spatial coordinate corresponding to the central collimator based on a test distance, an effective diameter, and a first angle value corresponding to the central collimator, wherein the first spatial coordinate is a spatial coordinate of the central collimator relative to a center point of the sensor;
[0087] For example, see Figure 4 , Figure 4 This is a schematic diagram of the calculation principle involved in an embodiment of the method for adjusting the test field of view of this application, such as Figure 4 As shown, the test equipment first determines the central collimator at the center of the test field of view and the test distance L between the central collimator and the sensor based on the spatial coordinates (0, 0, 0) corresponding to the sensor and the required position at the test field of view. At the same time, the test equipment detects the central collimator to determine the effective diameter D corresponding to the central collimator. At the same time, the test equipment determines the first angle value θ between the center point of the central collimator and the horizontal direction. Thereafter, the test equipment determines the first spatial coordinates (x1, y1, z1) of the central collimator relative to the spatial coordinates (0, 0, 0) corresponding to the sensor based on the effective diameter D corresponding to the central collimator, the test distance L, and the first angle value θ:
[0088]
[0089] Step S20: determining the second spatial coordinates corresponding to each of the other collimators except the central collimator in the test field of view, and determining the first plane coordinates corresponding to each of the other collimators based on the second spatial coordinates;
[0090] In this embodiment, the testing device determines the second spatial coordinates of each parallel light pipe other than the central parallel light pipe in the test field relative to the sensor, and calculates the first plane coordinates of each parallel light pipe relative to the central parallel light pipe based on the second spatial coordinates.
[0091] Exemplarily, for example, after determining the first spatial coordinates (x1, y1, z1) of the central collimator relative to the sensor, the test equipment determines the second spatial coordinates (x2, y2, z2) of each other collimator in the test field of view except the central collimator relative to the sensor. The test equipment then uses the central collimator as a reference and determines the first plane coordinates (x3, y3) of each other collimator relative to the central collimator based on the acquired second spatial coordinates (x2, y2, z2).
[0092] Furthermore, in a feasible embodiment, the step of “determining the second spatial coordinates corresponding to each of the other collimators in the test field except the central collimator” in the above step S20 may specifically include:
[0093] Step S201: determining the first angle value and the second angle value corresponding to each of the other collimators except the central collimator in the test field of view, wherein the second angle value is the angle value between the center point of each of the other collimators and the center point of the central collimator in the vertical direction;
[0094] Step S202: determining a second spatial coordinate corresponding to each of the other collimators based on the first angle value, the second angle value, the test distance, and the effective diameter corresponding to each of the other collimators, wherein the second spatial coordinate is the spatial coordinate of the other collimator relative to the center point of the sensor;
[0095] For example, see Figure 4 The test equipment first determines the first angle value θ corresponding to each of the other collimators in the target test field of view except the central collimator. At the same time, the test equipment detects each of the other collimators to determine the vertical angle φ between each of the other collimators and the central collimator, and determines the test distance L and effective diameter D of each of the other collimators relative to the sensor. Then, based on the first angle value θ, second angle value φ, test distance L, and effective diameter D corresponding to each of the other collimators, the test equipment determines the second spatial coordinates (x2, y2, z2) of each of the other collimators relative to the sensor as follows:
[0096]
[0097] Furthermore, in a feasible embodiment, the step of “determining the first plane coordinates corresponding to each of the other collimators based on each of the second space coordinates” in the above step S20 may specifically include:
[0098] Step S203: determining a third angle value corresponding to each of the other collimators, wherein the third angle value is a horizontal angle value between the center point of the other collimators and the center point of the central collimator;
[0099] Step S204: determining the first plane coordinates corresponding to each of the other collimators based on the second space coordinates corresponding to each of the other collimators and the third angle value;
[0100] For example, see Figure 4 and Figure 5 ,in, Figure 5 This is a schematic diagram of a plane test field of view involved in an embodiment of a method for adjusting the test field of view of this application, as shown in FIG. Figure 4 As shown, the test equipment first determines the third angle value between each of the other parallel light tubes and the central parallel light in the horizontal direction. At the same time, the test equipment determines the second space coordinates corresponding to each of the other parallel light pipes, and determines the second space horizontal coordinate calculation formula corresponding to each of the second space coordinates as follows:
[0101]
[0102] At the same time, the test equipment determines that the calculation formula for the second space ordinate corresponding to each second space coordinate is:
[0103]
[0104] Afterwards, the test equipment calculates the second spatial horizontal coordinate calculation formula, the second spatial vertical coordinate calculation formula and the third angle value corresponding to each other parallel light tube. The calculation formula for determining the first plane horizontal coordinate corresponding to each other parallel light tube is:
[0105]
[0106] And, the calculation formula of the first plane vertical coordinate is:
[0107]
[0108] The test equipment then calculates the following based on the first plane horizontal coordinate calculation formula and the first plane vertical coordinate calculation formula corresponding to each of the other parallel light tubes: Figure 5 The first plane coordinates (x3, y3) are shown relative to the center collimator.
[0109] Step S30: obtaining a preset camera parameter table, and obtaining a linear fitting function based on the camera parameter table, and converting each of the first plane coordinates into target required coordinates corresponding to the sensor through the linear fitting function;
[0110] In this embodiment, the testing equipment reads the storage device to obtain the camera parameter table preset by the technician, and determines the camera parameters contained in the camera table parameters. The testing equipment then performs linear fitting on the camera parameters to obtain a linear fitting function, and uses the linear fitting function to convert the first plane coordinates corresponding to each other parallel light tube into the target requirement coordinates corresponding to the sensor.
[0111] Exemplarily, for example, the test equipment first reads an internally configured storage device to obtain a camera parameter table preset by a technician containing various camera parameters, and determines the various camera parameters contained in the camera table parameters. Afterwards, the test equipment performs linear fitting on each camera parameter by the least squares method to obtain a linear fitting function, and uses the linear fitting function to convert the first plane coordinates (x3, y3) corresponding to each other test field of view into the target requirement coordinates (x4, y4) corresponding to the sensor.
[0112] Furthermore, in a feasible embodiment, the step of “obtaining a linear fitting function based on the camera parameter table” in the above step S30 may specifically include:
[0113] Step S301: determining the image height value and the field of view angle value of each lens contained in the camera parameter table;
[0114] Step S302: performing linear fitting on each of the lens image height values and each of the field of view angle values to obtain a linear fitting function;
[0115] For example, see Figure 6 , Figure 6 This is a schematic diagram of a camera parameter table involved in an embodiment of a method for adjusting the field of view tested in this application. Since the camera module will cause a large distortion in the generated image when capturing images through a wide-angle lens, when converting each first plane coordinate into the target required coordinate corresponding to the sensor, the target required coordinate cannot be obtained through the relationship between the above-mentioned similar triangles.
[0116] Therefore, the test equipment first reads the storage device to obtain the Figure 6 The camera parameter table shown contains multiple image height values and multiple field of view angle values, and based on the camera parameter table, the corresponding image height ih value and field of view angle of the camera module under multiple fields of view are determined. Afterwards, the test equipment determines the image height ih value and field of view angle The relationship between them is:
[0117]
[0118] At the same time, the test equipment determines the calculation formula corresponding to the field of view angle based on the first plane horizontal coordinate calculation formula and the first plane vertical coordinate calculation formula corresponding to each other parallel light tube:
[0119]
[0120]
[0121]
[0122] The test equipment then converts each first plane coordinate into a target required coordinate corresponding to the sensor based on a linear fitting function.
[0123] Furthermore, in a feasible embodiment, the step of “converting each of the first plane coordinates into target required coordinates corresponding to the sensor by using the linear fitting function” in the above step S30 may specifically include:
[0124] Step S303: determining a first plane abscissa calculation formula and a first plane ordinate calculation formula corresponding to each of the first plane coordinates;
[0125] Step S304: determining a second plane ordinate calculation formula and a second plane ordinate calculation formula based on the linear fitting function, the first plane abscissa calculation formula, and the first plane ordinate calculation formula;
[0126] Step S305: converting each of the first plane coordinates into a target required coordinate corresponding to the sensor according to the second plane horizontal coordinate calculation formula and the second plane vertical coordinate calculation formula;
[0127] For example, based on the characteristics of the lens in the camera device, it is known that the angle of the lens in the normal direction does not change. Therefore, the target required coordinates corresponding to the sensor and the plane coordinate points corresponding to each other collimator included in the test field of view are one-to-one corresponding. Therefore, the test equipment first determines the first plane horizontal coordinate calculation formula corresponding to each first plane coordinate (x3, y3):
[0128]
[0129] And determine the first plane ordinate calculation formula corresponding to each first plane coordinate (x3, y3) as follows:
[0130]
[0131] Afterwards, the test equipment determines the second plane abscissa calculation formula based on the obtained linear fitting function, the first plane abscissa calculation formula, and the first plane abscissa calculation formula as follows:
[0132]
[0133] At the same time, the test equipment determines the second plane vertical coordinate calculation formula based on the linear fitting function, the first plane horizontal coordinate calculation formula and the first plane horizontal coordinate calculation formula as follows:
[0134]
[0135] Finally, the test equipment converts each first plane coordinate (x3, y3) into the target required coordinate (x4, y4) corresponding to the sensor according to the second plane horizontal coordinate calculation formula and the second plane vertical coordinate calculation formula;
[0136] Thus, the present application calculates the image height ih value and field angle contained in the camera parameter table. By performing linear fitting to obtain a linear fitting function, and using the linear fitting function to convert each first plane coordinate into the target required coordinate corresponding to the sensor, the technical problem of image distortion when the sensor acquires an image through a wide-angle lens is avoided, thereby enabling the test equipment to more accurately adjust the position of the test field of view.
[0137] Step S40: adjusting the position of the test field of view based on the target required coordinates and the first spatial coordinates so that the test field of view is located at the required position corresponding to the sensor;
[0138] Exemplarily, for example, the test device adjusts the position of the test field of view based on the target requirement coordinates and the first spatial coordinates corresponding to the center sensor, and in the process of adjusting the position, detects whether the target requirement coordinates and the first spatial coordinates coincide. When the test device detects that the target requirement coordinates and the first spatial coordinates coincide, it determines that the test field of view is at the required position corresponding to the sensor.
[0139] Furthermore, in a feasible embodiment, the above step S40 may specifically include:
[0140] Step S401: determining the angle difference between the target required coordinates and the first space coordinates;
[0141] Step S402: adjusting the position of the test field of view based on the angle difference so that the test field of view is at a required position corresponding to the sensor;
[0142] Exemplarily, for example, after obtaining the target required coordinates (x4, y4) corresponding to the sensor, the test equipment determines the angle difference between the target required coordinates (x4, y4) and the first spatial coordinates (x1, y1, z1) corresponding to the central parallel light tube, and the test equipment then adjusts the position of the test field of view based on the angle difference so that the test field of view is at the required position corresponding to the sensor.
[0143] In this embodiment, when the testing device is in operation, it first obtains a test field of view preset by a technician, which includes multiple collimators, and fixes the test field of view at a target position corresponding to a sensor included in the camera module. At the same time, the testing device determines the first spatial coordinate of the central collimator at the center of the test field of view relative to the sensor. Then, the testing device determines the second spatial coordinate of each of the other collimators in the test field of view, except the central collimator, relative to the sensor, and calculates the first plane coordinate of each of the other collimators relative to the central collimator based on each second spatial coordinate. Then, the testing device reads a storage device to obtain a camera parameter table preset by the technician and determines each camera parameter included in the camera table parameters. The testing device then performs linear fitting on each camera parameter to obtain a linear fitting function, and uses the linear fitting function to convert the first plane coordinate corresponding to each of the other collimators into the target required coordinate corresponding to the sensor. Finally, the testing device adjusts the position of the test field of view based on the target required coordinate and the first spatial coordinate corresponding to the central sensor. During the position adjustment process, the testing device detects whether the target required coordinate and the first spatial coordinate coincide with each other. When the testing device detects that the target required coordinate and the first spatial coordinate coincide with each other, it determines that the test field of view is at the required position corresponding to the sensor.
[0144] In this way, the present application determines the second spatial coordinates corresponding to each parallel light tube except the central parallel light tube in the test field of view, and the first plane coordinates corresponding to each second spatial coordinate, and performs linear fitting on each first plane coordinate to obtain the target requirement coordinates corresponding to the sensor, and then adjusts the position of the test field of view based on the target requirement coordinates and the first spatial coordinates corresponding to the central parallel light tube, thereby achieving the technical effect of enabling the test equipment to quickly and accurately adjust the position of the test field of view.
[0145] Furthermore, in order to achieve the above-mentioned purpose, the present application also provides a device for adjusting the test field of view, which is used for testing equipment to detect a camera module equipped with a sensor. Figure 7 , Figure 7 This is a schematic diagram of the functional modules involved in an embodiment of the method for adjusting the test field of view of this application, as shown in FIG. Figure 7 As shown, the device includes:
[0146] A first coordinate calculation module 10 is used to obtain a preset test field of view and determine a first spatial coordinate corresponding to a central collimator contained in the test field of view;
[0147] a second coordinate calculation module 20, configured to determine a second spatial coordinate corresponding to each of the other collimators except the central collimator within the test field of view, and determine a first plane coordinate corresponding to each of the other collimators based on the second spatial coordinates;
[0148] A plane coordinate conversion module 30 is configured to obtain a preset camera parameter table, obtain a linear fitting function based on the camera parameter table, and convert each of the first plane coordinates into a target required coordinate corresponding to the sensor using the linear fitting function;
[0149] The test field of view adjustment module 40 is configured to adjust the position of the test field of view based on the target required coordinates and the first spatial coordinates, so that the test field of view is located at a required position corresponding to the sensor.
[0150] Furthermore, the first coordinate calculation module 10 includes:
[0151] a first parameter extraction unit, configured to determine a test distance and an effective diameter corresponding to a central collimator contained in the test field of view, and to determine a first angle value corresponding to the central collimator, wherein the first angle value is a value of an angle between a center point of the collimator and a horizontal direction;
[0152] The first parameter calculation unit is used to determine the first spatial coordinate corresponding to the central collimator based on the test distance, effective diameter and first angle value corresponding to the central collimator, wherein the first spatial coordinate is the spatial coordinate of the central collimator relative to the center point of the sensor.
[0153] Furthermore, the second coordinate calculation module 20 includes:
[0154] a second parameter extraction unit, configured to determine the first angle value and the second angle value corresponding to each of the other collimators in the test field of view except the central collimator, wherein the second angle value is the angle value between the center point of each of the other collimators and the center point of the central collimator in the vertical direction;
[0155] A second parameter calculation unit is used to determine the second spatial coordinates corresponding to each of the other collimators based on the first angle value, the second angle value, the test distance and the effective diameter corresponding to each of the other collimators, wherein the second spatial coordinates are the spatial coordinates of the other collimators relative to the center point of the sensor.
[0156] Furthermore, the second coordinate calculation module 20 further includes:
[0157] a third parameter calculation unit, configured to determine a third angle value corresponding to each of the other collimators, wherein the third angle value is a horizontal angle value between the center point of the other collimators and the center point of the central collimator;
[0158] The space coordinate conversion unit is used to determine the first plane coordinate corresponding to each of the other collimators based on the second space coordinate corresponding to each of the other collimators and the third angle value.
[0159] Furthermore, the plane coordinate conversion module 30 includes:
[0160] A camera parameter extraction unit, configured to determine the image height value of each lens and the field of view angle value contained in the camera parameter table;
[0161] The camera parameter fitting unit is used to perform linear fitting on each of the lens image height values and each of the field of view angle values to obtain a linear fitting function.
[0162] Furthermore, the plane coordinate conversion module 30 further includes:
[0163] an initial formula extraction unit, configured to determine a first-plane abscissa calculation formula and a first-plane ordinate calculation formula corresponding to each of the first-plane coordinates;
[0164] an initial formula conversion unit, configured to determine a second-plane ordinate calculation formula and a second-plane ordinate calculation formula based on the linear fitting function, the first-plane abscissa calculation formula, and the first-plane ordinate calculation formula;
[0165] The plane coordinate conversion unit is used to convert each of the first plane coordinates into a target required coordinate corresponding to the sensor according to the second plane horizontal coordinate calculation formula and the second plane vertical coordinate calculation formula.
[0166] Furthermore, the test field adjustment module 40 includes:
[0167] an angle difference calculation unit, configured to determine an angle difference between the target required coordinates and the first space coordinates;
[0168] A field of view position adjustment unit is used to adjust the position of the test field of view based on the angle difference so that the test field of view is located at a required position corresponding to the sensor.
[0169] In addition, the present application also provides a test device having a test field of view adjustment program that can be run on a processor. When the test device executes the test field of view adjustment program, it implements the steps of the test field of view adjustment method described in any of the above embodiments.
[0170] The specific embodiments of the test equipment of the present application are basically the same as the embodiments of the above-mentioned test field adjustment method, and will not be described in detail here.
[0171] In addition, the present application also provides a computer-readable storage medium, which stores a test field of view adjustment program. When the test field of view adjustment program is executed by a processor, the steps of the test field of view adjustment method described in any of the above embodiments are implemented.
[0172] The specific embodiments of the computer-readable storage medium of the present invention are substantially the same as the embodiments of the above-mentioned test field adjustment method, and are not described in detail here.
[0173] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.
[0174] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0175] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment method can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, including a number of instructions for enabling a test device (which can be a device that performs the test field adjustment method of the present invention, and the test device can specifically be a mobile terminal, a data storage control terminal, a PC or a portable computer and other terminals) to execute the methods described in each embodiment of the present application.
[0176] The above are only preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for adjusting a test field of view, characterized in that: The method is applied to a test device to detect a camera module equipped with a sensor, and the method for adjusting the test field of view includes the following steps: Acquire a preset test field of view, and determine a first spatial coordinate of a central collimator contained in the test field of view relative to a center point of the sensor; Determining a second spatial coordinate of each of the other collimators except the central collimator within the test field of view relative to the center point of the sensor, and determining a first plane coordinate of each of the other collimators relative to the central collimator based on each of the second spatial coordinates; Determine the image height values and field of view angle values of each lens contained in the preset camera parameter table; Performing linear fitting on each of the lens image height values and each of the field of view angle values to obtain a linear fitting function, and converting each of the first plane coordinates into a target required coordinate corresponding to the sensor using the linear fitting function; The position of the test field of view is adjusted based on the target required coordinates and the first spatial coordinates so that the test field of view is located at a required position corresponding to the sensor.
2. The method for adjusting the test field of view according to claim 1, wherein: The step of determining the first spatial coordinate corresponding to the central collimator contained in the test field of view includes: Determining a test distance and an effective diameter corresponding to a central collimator within the test field of view, and determining a first angle value corresponding to the central collimator, wherein the first angle value is a value of an angle between a center point of the collimator and a horizontal direction; The first spatial coordinate corresponding to the central collimator is determined based on the test distance, the effective diameter and the first angle value corresponding to the central collimator.
3. The method for adjusting the test field of view according to claim 2, wherein: The step of determining the second spatial coordinates corresponding to each of the other collimators except the central collimator in the test field of view comprises: Determining the first angle value and the second angle value corresponding to each of the other collimators in the test field of view except the central collimator, wherein the second angle value is the angle value between the center point of each of the other collimators and the center point of the central collimator in the vertical direction; The second spatial coordinate corresponding to each of the other parallel light tubes is determined based on the first angle value, the second angle value, the test distance and the effective diameter corresponding to each of the other parallel light tubes, wherein the second spatial coordinate is the spatial coordinate of the other parallel light tube relative to the center point of the sensor.
4. The method for adjusting the test field of view according to claim 3, wherein: The step of determining the first plane coordinates corresponding to each of the other parallel light pipes based on each of the second space coordinates includes: Determining a third angle value corresponding to each of the other collimators, wherein the third angle value is a value of an angle between a center point of the other collimators and a center point of the central collimator in a horizontal direction; The first plane coordinates corresponding to each of the other collimators are determined based on the second space coordinates corresponding to each of the other collimators and the third angle value.
5. The method for adjusting the test field of view according to claim 1, wherein: The step of converting each of the first plane coordinates into target required coordinates corresponding to the sensor by using the linear fitting function includes: Determine a first-plane abscissa calculation formula and a first-plane ordinate calculation formula corresponding to each of the first-plane coordinates; Determine a second plane abscissa calculation formula and a second plane ordinate calculation formula based on the linear fitting function, the first plane abscissa calculation formula, and the first plane ordinate calculation formula; Each of the first plane coordinates is converted into a target required coordinate corresponding to the sensor according to the second plane horizontal coordinate calculation formula and the second plane vertical coordinate calculation formula.
6. The method for adjusting the test field of view according to claim 1, wherein: The step of adjusting the position of the test field of view based on the target required coordinates and the first spatial coordinates so that the test field of view is at the required position corresponding to the sensor includes: Determining an angle difference between the target required coordinates and the first space coordinates; The position of the test field of view is adjusted based on the angle difference so that the test field of view is located at a required position corresponding to the sensor.
7. A device for adjusting the test field of view, characterized in that: The device for adjusting the test field of view is applied to a test device for detecting a camera module equipped with a sensor, and the device comprises: A first coordinate calculation module is used to obtain a preset test field of view and determine a first spatial coordinate of a central collimator contained in the test field of view relative to a center point of the sensor; a second coordinate calculation module, configured to determine a second spatial coordinate of each of the other collimators except the central collimator within the test field of view relative to the center point of the sensor, and determine a first plane coordinate of each of the other collimators relative to the central collimator based on each of the second spatial coordinates; a plane coordinate conversion module, configured to determine each lens image height value and each field of view angle value contained in a preset camera parameter table; perform linear fitting on each lens image height value and each field of view angle value to obtain a linear fitting function; and convert each first plane coordinate into a target required coordinate corresponding to the sensor using the linear fitting function; A test field of view adjustment module is used to adjust the position of the test field of view based on the target required coordinates and the first spatial coordinates, so that the test field of view is located at a required position corresponding to the sensor.
8. A testing device, characterized in that: The testing device includes: a memory, a processor, and a test field of view adjustment program stored in the memory and executable on the processor. When the test field of view adjustment program is executed by the processor, the steps of the test field of view adjustment method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a test field of view adjustment program, and when the test field of view adjustment program is executed by a processor, the steps of the test field of view adjustment method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Multi-optical-axis parallelism detection apparatus and method
CN105423958A
Method for measuring large field-of-view telescope optical system distortion and field curvature
CN106404352A