Camera assembly detection method, detection device and computer readable storage medium
By photographing calibration charts and calculating external parameter information, the optical center position and optical axis direction of the camera component are determined, and the installation deviation of the camera component is detected. This solves the problem of inaccurate installation of camera components in VR and AR equipment, ensuring assembly accuracy and user satisfaction. Accuracy of data acquisition.
Patent Information
- Application Number
- CN202210662466.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-13
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2042-06-13
AI Technical Summary
In VR and AR devices, inaccurate installation positions of camera components will lead to large deviations between user facial data acquisition and actual data, affecting the use of the device.
By obtaining the images of the calibration chart taken by the camera component at different positions, the external parameter information between the camera component and the calibration chart is determined, the optical center position and optical axis direction are calculated, and compared with the preset reference position and direction, the position deviation and Angle deviation determines the detection result of the camera component.
This ensures the assembly accuracy of camera components, avoids deviations in facial data acquisition when the device is in use, and improves user experience.
Smart Images

Figure CN114900688B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of automatic control principles, and in particular to a detection method, detection equipment, and computer-readable storage medium for a camera component. Background Art
[0002] Camera components are usually installed in VR (Virtual Reality), AR (Augmented Reality) and other related products. The camera components collect data such as the user's facial image to achieve functions such as positioning tracking and eye tracking.
[0003] Since VR, AR and other devices are highly integrated electronic products, high assembly accuracy is required for the installation position of the camera components. If the installation position of the camera components is inaccurate during the assembly process, when the user uses VR, AR and other devices, there will be a large deviation between the user's facial data obtained by the device and the user's actual facial data (such as gaze position, facial expression, etc.).
[0004] Therefore, how to ensure the assembly accuracy of camera components is an urgent problem to be solved.
[0005] The above content is only used to assist in understanding the technical solution of the present invention and does not constitute an admission that the above content is prior art. Summary of the Invention
[0006] The main purpose of the present invention is to provide a method for detecting a camera assembly, aiming to solve the problem of how to ensure the assembly accuracy of the camera assembly.
[0007] To achieve the above-mentioned object, the present invention provides a method for detecting a camera assembly, the method comprising:
[0008] Obtaining a calibration chart image obtained by photographing the calibration chart at different positions of the camera component to be inspected;
[0009] Determining extrinsic parameter information between the camera assembly and the calibration chart according to the chart image;
[0010] Determine the optical center position and optical axis direction of the camera assembly according to the external parameter information;
[0011] Determining a positional deviation between the optical center position and a preset reference position, and / or determining an angular deviation between the optical axis direction and a preset reference direction;
[0012] A detection result of the camera assembly is determined according to at least one of the position deviation and the angle deviation.
[0013] Optionally, the extrinsic parameter information includes a rotation vector and a translation vector, and the step of determining the optical center position and optical axis direction of the camera assembly according to the extrinsic parameter information includes:
[0014] determining the optical center position according to the translation vector;
[0015] The optical axis direction is determined according to the rotation vector and the optical center position.
[0016] Optionally, the step of determining the direction of the optical axis according to the rotation vector and the optical center position includes:
[0017] Determine the rotation matrix corresponding to the rotation vector based on a preset function;
[0018] Calculating the unit vector of the optical center position relative to the calibration chart;
[0019] The direction of the optical axis is determined according to the unit vector and the rotation matrix.
[0020] Optionally, before the step of determining the position deviation between the optical center position and a preset reference position, and / or determining the angular deviation between the optical axis direction and a preset reference direction, the method further includes:
[0021] Acquire a reference chart image obtained by photographing the calibration chart at different positions using a reference camera assembly;
[0022] The reference camera assembly is calibrated according to the reference chart image to obtain the reference position and the reference direction.
[0023] Optionally, determining the position deviation between the optical center position and a preset reference position includes:
[0024] Obtaining the coordinates of the optical center position and the reference position;
[0025] determining a relative positional relationship between the optical center position and the reference position according to the coordinates of the optical center position and the coordinates of the reference position;
[0026] The position deviation is determined according to the relative position relationship.
[0027] Optionally, determining the angular deviation between the optical axis direction and a preset reference direction includes:
[0028] Determining a cosine value between the optical axis direction and the reference direction based on a computational relationship of vector angles in three-dimensional space;
[0029] Performing an inverse trigonometric transformation on the cosine value to obtain an angle between the optical axis direction and the reference direction;
[0030] The angular deviation is determined according to the included angle.
[0031] Optionally, after the step of determining the detection result of the camera assembly according to at least one of the position deviation and the angle deviation, the method further includes:
[0032] When the position deviation and / or the direction deviation exists, determining that the detection result of the camera assembly is unqualified; or
[0033] When the position deviation is greater than a position deviation threshold, and / or the direction deviation is greater than a direction deviation threshold, the detection result of the camera assembly is determined to be unqualified.
[0034] Optionally, after the step of determining that the detection result of the camera assembly is unqualified, the method further includes:
[0035] The detection result is output to issue an early warning prompt that the camera component is offset.
[0036] In addition, to achieve the above-mentioned purpose, the present invention also provides a detection device, which includes: a calibration card, a fixture, a robotic arm, a memory, a processor, and a component offset detection program stored in the memory and runnable on the processor, the calibration card is used for camera calibration, the fixture is used to clamp the camera component, the robotic arm is connected to the fixture, and moves the camera component through the fixture, and when the component offset detection program is executed by the processor, the steps of the component offset detection method as described in any one of the above items are implemented.
[0037] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, which stores a detection program for a camera component. When the detection program for a camera component is executed by a processor, the various steps of the camera component detection method described in the above embodiment are implemented.
[0038] An embodiment of the present invention provides a method, a detection device, and a computer-readable storage medium for detecting a camera assembly, wherein the method includes: obtaining a chart image obtained by photographing a calibration chart at different positions of the camera assembly to be detected; determining external parameter information between the camera assembly and the calibration chart based on the chart image; determining the optical center position and optical axis direction of the camera assembly based on the external parameter information; determining the positional deviation between the optical center position and a preset reference position, and / or determining the angular deviation between the optical axis direction and a preset reference direction; and determining the detection result of the camera assembly based on at least one of the positional deviation and the angular deviation. By comparing the optical center position and optical axis direction of the camera assembly to be detected with the reference position and reference direction of a standard camera assembly, the positional deviation and angular deviation between the two are determined, thereby detecting whether the camera assembly has assembly deviation and ensuring the assembly accuracy of the camera assembly. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 Schematic diagram of the hardware architecture of the detection device involved in the embodiment of the present invention;
[0040] Figure 2 1 is a flow chart of a first embodiment of a method for detecting a camera assembly according to the present invention;
[0041] Figure 3 FIG. 4 is a flow chart of a second embodiment of a method for inspecting a camera assembly according to the present invention.
[0042] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0043] In the design of VR, AR and other products, cameras are needed to perform positioning tracking and eye tracking algorithms. To complete these positioning algorithms, the installation position of the camera in the product is required. Therefore, the assembly accuracy of the camera is very high, and the assembly accuracy needs to be tested during all assembly processes.
[0044] This method uses camera calibration to calculate the camera's optical center and optical axis, thereby inferring the camera's position and orientation. This is then compared with a standard design drawing to determine if any deviations exist in the camera's assembly. The testing solution consists of a camera calibration chart, a fixture, and a high-precision robotic arm. The calibration chart is fixed and used to perform camera calibration; the fixture is used to clamp the component under test, ensuring accurate product placement and handling. A high-precision robotic arm, connected to the fixture, moves the product and completes camera calibration with high repeatability.
[0045] It should be understood that the drawings of the present invention show exemplary embodiments of the present invention, and that the present invention 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 invention and to fully convey the scope of the present invention to those skilled in the art.
[0046] As an implementation solution, the hardware architecture of the detection equipment can be as follows Figure 1 shown.
[0047] The embodiment of the present invention relates to a hardware architecture of a detection device, which includes a processor 101, such as a CPU, a memory 102, and a communication bus 103. The communication bus 103 is used to achieve connection and communication between these components.
[0048] The memory 102 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. Figure 1 As shown, the memory 102 as a computer-readable storage medium may include a detection program for the camera component; and the processor 101 may be used to call the detection program for the camera component stored in the memory 102 and perform the following operations:
[0049] Obtaining a calibration chart image obtained by photographing the calibration chart at different positions of the camera component to be inspected;
[0050] Determining extrinsic parameter information between the camera assembly and the calibration chart according to the chart image;
[0051] Determine the optical center position and optical axis direction of the camera assembly according to the external parameter information;
[0052] Determining a positional deviation between the optical center position and a preset reference position, and / or determining an angular deviation between the optical axis direction and a preset reference direction;
[0053] A detection result of the camera assembly is determined according to at least one of the position deviation and the angle deviation.
[0054] In one embodiment, the processor 101 may be configured to call a camera component detection program stored in the memory 102 and perform the following operations:
[0055] determining the optical center position according to the translation vector;
[0056] The optical axis direction is determined according to the rotation vector and the optical center position.
[0057] In one embodiment, the processor 101 may be configured to call a camera component detection program stored in the memory 102 and perform the following operations:
[0058] Determine the rotation matrix corresponding to the rotation vector based on a preset function;
[0059] Calculating the unit vector of the optical center position relative to the calibration chart;
[0060] The direction of the optical axis is determined according to the unit vector and the rotation matrix.
[0061] In one embodiment, the processor 101 may be configured to call a camera component detection program stored in the memory 102 and perform the following operations:
[0062] Acquire a reference chart image obtained by photographing the calibration chart at different positions using a reference camera assembly;
[0063] The reference camera assembly is calibrated according to the reference chart image to obtain the reference position and the reference direction.
[0064] In one embodiment, the processor 101 may be configured to call a camera component detection program stored in the memory 102 and perform the following operations:
[0065] Obtaining the coordinates of the optical center position and the reference position;
[0066] determining a relative positional relationship between the optical center position and the reference position according to the coordinates of the optical center position and the coordinates of the reference position;
[0067] The position deviation is determined according to the relative position relationship.
[0068] In one embodiment, the processor 101 may be configured to call a camera component detection program stored in the memory 102 and perform the following operations:
[0069] Determining a cosine value between the optical axis direction and the reference direction based on a computational relationship of vector angles in three-dimensional space;
[0070] Performing an inverse trigonometric transformation on the cosine value to obtain an angle between the optical axis direction and the reference direction;
[0071] The angular deviation is determined according to the included angle.
[0072] In one embodiment, the processor 101 may be configured to call a camera component detection program stored in the memory 102 and perform the following operations:
[0073] When the position deviation and / or the direction deviation exists, determining that the detection result of the camera assembly is unqualified; or
[0074] When the position deviation is greater than a position deviation threshold, and / or the direction deviation is greater than a direction deviation threshold, the detection result of the camera assembly is determined to be unqualified.
[0075] In one embodiment, the processor 101 may be configured to call a camera component detection program stored in the memory 102 and perform the following operations:
[0076] The detection result is output to issue an early warning prompt that the camera component is offset.
[0077] Based on the hardware architecture of the above-mentioned detection equipment based on the automatic control principle technology, an embodiment of the detection method of the camera component of the present invention is proposed.
[0078] Reference Figure 2 In a first embodiment, the method for detecting a camera assembly includes the following steps:
[0079] Step S10, obtaining a calibration chart image obtained by photographing the calibration chart at different positions of the camera assembly to be tested;
[0080] In this embodiment, the camera assembly to be inspected is clamped by a fixture of the inspection equipment. The inspection equipment's robotic arm is controlled to move the fixture and camera assembly. The robotic arm begins at a predetermined initial position and follows a trajectory compiled in a preset program, moving in front of a calibration chart before returning to the initial position. During this movement, the camera assembly is controlled to capture the calibration chart at different positions in front of the camera assembly at a preset frequency to obtain chart images. It should be noted that in this embodiment, there are no specific restrictions on the initial position; it only needs to be in a position where the camera assembly can fully capture the calibration chart. Optionally, the calibration chart can be captured once per second, with at least 10 chart images captured during the movement.
[0081] Step S20, determining external parameter information associated between the camera assembly and the calibration chart according to the chart image;
[0082] After obtaining the chart image, the camera is calibrated to determine the relationship between the 3D geometric position of a point on the surface of the spatial object and its corresponding point in the image, using the calibration chart (i.e., the chart image) captured by the camera assembly and the actual calibration chart. This allows machine image recognition to determine whether the camera assembly is correctly assembled. Using a calibration object of known dimensions (i.e., the chart image), the internal and external parameters of the camera assembly are determined using a specific algorithm. This algorithm is relatively existing and mature, and will not be further described here.
[0083] Camera calibration can be used to obtain the camera assembly's internal parameters, such as the intrinsic parameter matrix K and the distortion coefficient D, as well as the camera assembly's external parameters, such as the rotation vector Rot_vet and the translation vector Tans_vet. Since this embodiment omits the distortion correction process for the camera lens, the internal parameters are not the focus of this description. Instead, the focus will be on the external parameter information, namely, establishing a mapping relationship between the camera assembly and the calibration chart (i.e., the rotation vector and translation vector in the external parameter information). Based on this mapping relationship, the camera assembly is tested for qualified assembly.
[0084] Step S30, determining the optical center position and optical axis direction of the camera assembly according to the external parameter information;
[0085] After determining the extrinsic parameter information through camera calibration, the optical center position and optical axis direction of the camera assembly are determined based on this extrinsic parameter information. The optical center position is a special point on the principal axis of the camera lens assembly. Light passing through this point maintains its propagation direction; this point is called the optical center position. The optical axis direction is the propagation direction of light passing through the optical center. In this embodiment, the optical center position represents the position of the camera assembly, and the optical axis direction represents the orientation of the camera assembly.
[0086] Optionally, the optical center position of the camera can be determined based on the translation vector in the extrinsic parameter information, and then the optical axis direction of the camera can be determined based on the rotation vector and the optical center position in the extrinsic parameter information.
[0087] For example, the optical center position P0 = -Tans_vet0, and the rotation vector is calculated using the Rodriguez formula to obtain its corresponding rotation matrix Rot_mat. The Rodriguez formula is a calculation formula in three-dimensional space. A vector is rotated around a rotation axis by a certain angle to obtain a new vector. First, a three-dimensional unit vector K is determined as the rotation axis. Then a rotation angle θ is defined. The vector to be rotated is rotated θ degrees around the rotation axis. The rotated vector is the rotation matrix Rot_mat, and its standard formula is:
[0088] Rot_mat=I+(1-cos(θ))K 2 +sin(θ)K)
[0089] Where I is the 3*3 identity matrix.
[0090] Then, the optical center position P0 of the camera component relative to the unit vector Vet0 of the calibration chart is calculated based on the rotation matrix Rot_mat:
[0091] Vet0=Rot_mat0 -1 *[0, 0, 1]
[0092] Vet0 represents the direction of the optical axis of the camera.
[0093] Step S40, determining a positional deviation between the optical center position and a preset reference position, and / or determining an angular deviation between the optical axis direction and a preset reference direction;
[0094] In this step, the optical center position and optical axis direction are compared with their respective reference positions and reference directions. The reference positions and reference directions are obtained by measuring a standard camera assembly that meets the corresponding specifications in the product design drawing. The standard camera assembly is clamped by the detection equipment to perform the above-mentioned camera calibration process, and the data is used as the reference standard.
[0095] Optionally, it is possible to determine whether the camera assembly to be inspected has position deviation based on the coordinates between the optical center position of the camera assembly to be inspected and the reference position of the standard camera assembly. For example, assuming that the reference position is P ref =(x ref ,y ref , z ref ), the optical center position P0=(x0,y0,z0), then the position deviation of the camera assembly P error =|P ref -P0|=|x ref -x0,y ref -y0,z ref -z0|.
[0096] Optionally, whether the camera assembly to be detected has an angular deviation may be determined based on the angle between the optical axis direction of the camera assembly to be detected and a reference direction of the camera assembly to be detected.
[0097] For example, the reference direction is represented by Vet ref =[x ref ,y ref , z ref ], the optical axis direction is expressed as Vet0 = [x0, y0, z0]. Since the direction is a vector in three-dimensional space, the angle between the optical axis direction and the reference direction can be determined based on the operational relationship of the vector angle in three-dimensional space, by determining the cosine value between the optical axis direction and the reference direction:
[0098]
[0099] Perform inverse trigonometric transformation on the cosine value to obtain the angle θ:
[0100]
[0101] The larger the angle, the greater the angular deviation.
[0102] Step S50: determining a detection result of the camera assembly according to at least one of the position deviation and the angle deviation.
[0103] After determining the positional deviation and the angular deviation, a detection result of the camera assembly is determined based on at least one of the positional deviation and the angular deviation, thereby determining whether the camera assembly has a deviation based on the detection result. Since the camera may have the positional deviation, the angular deviation, or both during assembly, there are at least three ways of determining the detection result in this embodiment: 1. Outputting a detection result when a deviation in the installation position of the camera assembly is detected; 2. Outputting a detection result when a deviation in the installation angle of the camera assembly is detected; 3. Outputting a detection result when a deviation in both the installation angle and the installation position of the camera assembly is detected.
[0104] In the technical solution provided in this embodiment, the external parameter information obtained by calibration is used to determine the optical center position and optical axis direction of the camera component to be detected by means of camera calibration. By comparing the optical center position and optical axis direction of the camera component to be detected with the reference position and reference direction of the standard camera component, at least one of the position deviation and angle deviation between the two is determined, thereby detecting whether there is an assembly deviation of the camera component, ensuring the assembly accuracy of the camera component, and avoiding inaccurate installation position of the camera component during the assembly process, which leads to a large deviation between the user facial data obtained by the device and the user's actual facial data (such as gaze position, facial expression, etc.) when the user uses VR, AR and other devices.
[0105] Reference Figure 3 In the second embodiment, based on the first embodiment, after step S50, the following steps are further included:
[0106] Step S60, when the position deviation exists, and / or the direction deviation exists, the detection result of the camera component is judged to be unqualified; or, when the position deviation is greater than the position deviation threshold, and / or the direction deviation is greater than the direction deviation threshold, the detection result of the camera component is judged to be unqualified.
[0107] Optionally, this embodiment provides two ways to determine whether the inspection result of the camera assembly is unqualified. The first method has a higher requirement for the accuracy of camera assembly. When there is at least one of position deviation and direction deviation in the inspection result, regardless of the deviation value, the inspection result of the camera assembly is judged to be unqualified. Of course, it should be noted that, due to the limitations of the calibration algorithm and the accuracy of the inspection equipment, there is usually an error between the deviation obtained by calculation and the actual deviation. This error is objective and difficult to eliminate. Therefore, the position deviation and direction deviation in this method are the deviation values obtained after calculation, which are not completely equivalent to the actual deviation between the device to be inspected and the standard device. However, as long as the error between the calculated deviation value and the actual deviation does not affect the actual product inspection result, for example, when the camera assembly is used to obtain the user's facial data and other functions, the error between the obtained facial data and the actual facial data meets the production requirements of the equipment, the camera assembly can be judged to be qualified.
[0108] The second method has lower requirements for camera assembly accuracy. The inspection result of the camera component is judged as unqualified only when the position deviation is greater than the set position deviation threshold and / or when the direction deviation is greater than the set direction deviation threshold.
[0109] After step S60, the method further includes:
[0110] Step S70: output the detection result to issue an early warning prompt that the camera component is offset.
[0111] Furthermore, in this embodiment, when the inspection result of the camera component is determined to be unqualified, the inspection result is output to issue an early warning prompt that the camera component is offset.
[0112] For example, when the inspection device detects that the inspection result of the camera component is unqualified, the inspection result is sent to the control terminal that is communicatively connected to the inspection device. When receiving the inspection result, the control terminal determines the number of the camera component corresponding to the inspection result, enters the number into the early warning program, and generates a prompt of "Unqualified camera component number: XX; Inspection problem: assembly offset; Problem details: There is an offset in the assembly position, there is an offset in the assembly direction, the position offset coordinate is XX, and the direction offset angle is XX", so that the inspection personnel can quickly determine the problematic camera component and the specific problem content.
[0113] The technical solution provided in this embodiment offers two methods for determining unqualified camera component inspection results: one with high assembly precision requirements, where deviation is considered unqualified; the other with low assembly precision requirements, where deviation is greater than a set threshold. Inspectors can set these two different precision inspection methodologies based on actual needs, flexibly adjusting quality control requirements for product components.
[0114] In addition, the present invention also provides a detection device, which includes: a calibration card, a tooling fixture, a robotic arm, a memory, a processor, and a component offset detection program stored in the memory and runnable on the processor, the calibration card is used for camera calibration, the tooling fixture is used to clamp the camera component, the robotic arm is connected to the tooling fixture, and moves the camera component through the tooling fixture, and when the component offset detection program is executed by the processor, the steps of the component offset detection method as described in any one of the above items are implemented.
[0115] In addition, the present invention also provides a computer-readable storage medium, which stores a camera component detection program. When the camera component detection program is executed by a processor, the various steps of the camera component detection method described in the above embodiment are implemented.
[0116] 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 apparatus 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 apparatus. 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 apparatus comprising the element.
[0117] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course 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 invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a computer-readable storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0118] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for detecting a camera component, characterized in that: The method comprises: Acquire a calibration chart image obtained by shooting a calibration chart at different positions of the camera assembly to be tested, wherein the camera assembly moves in front of the calibration chart at a preset initial position and then returns to the initial position, and during the movement, the camera assembly is controlled to shoot the calibration chart at different positions in front of the camera assembly at a preset frequency to obtain the chart image; Determine the external parameter information between the camera assembly and the calibration chart according to the chart image, wherein the external parameter information includes a rotation vector and a translation vector; Determine the optical center position of the camera assembly according to the translation vector, wherein the optical center position represents the position of the camera assembly; Determine the optical axis direction of the camera assembly according to the rotation vector and the optical center position, wherein the optical axis direction represents the direction of the camera assembly; Determining a position deviation between the optical center position and a preset reference position, and / or determining an angular deviation between the optical axis direction and a preset reference direction; Determining a detection result of the camera assembly according to at least one of the position deviation and the angle deviation; The step of determining the direction of the optical axis according to the rotation vector and the optical center position comprises: Based on a preset function, determining a rotation matrix corresponding to the rotation vector; Calculating the unit vector of the optical center position relative to the calibration chart; Determining the direction of the optical axis according to the unit vector and the rotation matrix; Before the step of determining the position deviation between the optical center position and the preset reference position, and / or determining the angular deviation between the optical axis direction and the preset reference direction, the method further includes: Acquire a reference chart image obtained by photographing the calibration chart at different positions by a reference camera assembly; Calibrate the reference camera assembly according to the reference chart image to obtain the reference position and the reference direction; Determining the position deviation between the optical center position and a preset reference position comprises: Acquiring the coordinates of the optical center position and acquiring the coordinates of the reference position; Determining a relative positional relationship between the optical center position and the reference position according to the coordinates of the optical center position and the coordinates of the reference position; determining the position deviation according to the relative position relationship; Determining the angular deviation between the optical axis direction and a preset reference direction comprises: Determine the cosine value between the optical axis direction and the reference direction based on the computational relationship of the vector angle in the three-dimensional space; Performing an inverse trigonometric transformation on the cosine value to obtain an angle between the optical axis direction and the reference direction; The angular deviation is determined according to the included angle.
2. The camera assembly detection method according to claim 1, characterized in that: After the step of determining the detection result of the camera assembly according to at least one of the position deviation and the angle deviation, the method further includes: When the position deviation exists and / or the direction deviation exists, the detection result of the camera component is judged to be unqualified; or When the position deviation is greater than a position deviation threshold, and / or the direction deviation is greater than a direction deviation threshold, the detection result of the camera component is determined to be unqualified.
3. The camera assembly detection method according to claim 2, characterized in that: After the step of determining that the detection result of the camera assembly is unqualified, the method further includes: The detection result is output to issue an early warning prompt that the camera component is offset.
4. A detection device, characterized in that: The detection equipment includes: a calibration card, a fixture, a robotic arm, a memory, a processor, and a component offset detection program stored in the memory and executable on the processor, the calibration card is used for camera calibration, the fixture is used for clamping the camera component, the robotic arm is connected to the fixture and moves the camera component via the fixture, and the component offset detection program, when executed by the processor, implements the steps of the component offset detection method as described in any one of claims 1 to 3.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a camera component detection program, and when the camera component detection program is executed by a processor, the steps of the camera component detection method according to any one of claims 1 to 3 are implemented.
