Camera imaging pose adjustment method and device, electronic equipment and test system

By taking preset marks on the target plane of the camera, adjusting the position and posture of the camera and the target plane, and using image information to determine the inclination data between the optical axis and the target plane, solving the perpendicularity of the camera optical axis and the target plane in the prior art The adjustment error and cost problems achieve high-precision and low-cost calibration results.

CN119450223APending Publication Date: 2025-02-14ZHUHAI MOJIE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411157242.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

When using the camera to acquire images for testing, it is difficult to accurately adjust the perpendicularity between the camera optical axis and the target plane, easily introduce debugging errors of the collimator, and increase the overall calibration cost and difficulty.

Method used

By shooting preset marks on the target plane of the camera, adjust the positional relationship and attitude relationship between the camera and the target plane, use the identification image length information in the image to determine the inclination data between the optical axis and the target plane, and realize the optical axis and the target plane. Preset adjustment of angle between the two.

Benefits of technology

Directly calibrating the image acquisition of the target plane with the camera reduces errors during the calibration process, reduces overall calibration cost and improves calibration accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119450223A_ABST
    Figure CN119450223A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a camera imaging pose adjustment method and device, electronic equipment and a test system. The method comprises the following steps: acquiring a first image obtained by shooting a target plane by a camera; adjusting a position relation between a camera and a target plane according to the first image so as to enable a first center of the preset identifier to be on an optical axis of the camera; obtaining a second image obtained by shooting the target plane by the camera; determining inclination data between the target plane and the optical axis according to the length of the second identification image in the second image in the direction corresponding to the preset direction; and adjusting the attitude relationship between the camera and the target plane according to the tilt data. According to the technical scheme, the pose between the target plane and the optical axis of the camera is calibrated through the camera, errors are reduced, and calibration cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of equipment detection technology, and in particular to a camera imaging posture adjustment method, device, electronic equipment and testing system. Background Art

[0002] When using a camera to capture images for testing, it is often necessary to set the camera optical axis perpendicular to the target plane, such as the object plane or the plane of the object to be tested. In the related art, a collimator is used to calibrate the verticality between the camera optical axis and the target plane. However, this test method easily introduces the debugging error of the collimator, and the collimator itself also needs to be installed on the debugging device, which increases the overall calibration cost and difficulty. Summary of the invention

[0003] The embodiments of the present application provide a camera imaging posture adjustment method, device, electronic device and test system, which aim to use the image captured by the camera to adjust the posture between the target plane and the camera optical axis, thereby reducing the angular error between the optical axis and the target plane.

[0004] In a first aspect, an embodiment of the present application provides a camera imaging posture adjustment method, comprising:

[0005] Acquire a first image obtained by photographing a target plane with a camera, wherein a preset mark is provided on the target plane, the preset mark has a first center, and the preset mark is symmetrical about the first center in a preset direction passing through the first center;

[0006] adjusting the positional relationship between the camera and the target plane according to the first image so that the first center is on the optical axis;

[0007] Acquire a second image obtained by photographing the target plane by the camera, wherein the second image includes an identification image corresponding to the preset identification and an image center corresponding to the first center;

[0008] Determine the tilt data between the target plane and the optical axis according to the length information of the identification image in the second image in the preset direction;

[0009] The posture relationship between the camera and the target plane is adjusted according to the tilt data so that the angle between the optical axis and the target plane is a preset angle.

[0010] Optionally, the preset mark has a first endpoint and a second endpoint that are opposite to each other in the preset direction, the first endpoint and the second endpoint are symmetrical about the first center, and the mark image includes a first point corresponding to the first endpoint and a second point corresponding to the second endpoint;

[0011] The determining, according to the length information of the identification image in the second image in the preset direction, the tilt data between the target plane and the optical axis comprises:

[0012] The tilt data between the target plane and the optical axis is determined according to the length from the first endpoint to the second endpoint, the length from the image center to the first point, and the length from the image center to the second point.

[0013] Optionally, determining the tilt data between the target plane and the optical axis according to the length from the first endpoint to the second endpoint, the length from the image center to the first point, and the length from the image center to the second point includes:

[0014] Determine a first angle between a line from the first endpoint to the first point and the optical axis, and a second angle between a line from the first endpoint to the first point and a line from the first endpoint to the second endpoint according to a length from the first endpoint to the second endpoint, a length from the image center to the first point, and a length from the image center to the second point;

[0015] The tilt data between the target plane and the optical axis is determined according to the first angle and the second angle.

[0016] Optionally, determining the tilt data between the target plane and the optical axis according to the first angle and the second angle includes:

[0017] Determine the tilt data between the target plane and the camera imaging plane according to 90 degrees minus the difference between the first angle and the second angle;

[0018] The tilt data between the target plane and the optical axis is determined according to the tilt data between the target plane and the camera imaging plane.

[0019] Optionally, a first angle θ1 between a line connecting the first endpoint to the first point and the optical axis is determined according to the following formula:

[0020]

[0021] The second angle β1 between the line connecting the first endpoint to the first point and the line connecting the first endpoint to the second endpoint is determined according to the following formula:

[0022]

[0023] Wherein, L1 is the length from the first point to the center of the image, L2 is the length from the second point to the center of the image, and L3 is the length from the imaging surface to the focal plane of the camera along the optical axis direction.

[0024] Optionally, adjusting the posture relationship between the camera and the target plane according to the tilt data so that the angle between the optical axis and the target plane is the preset angle includes:

[0025] Adjusting the posture relationship between the camera and the target plane according to the tilt data so that the optical axis is perpendicular to the target plane;

[0026] According to the target angle, the posture relationship between the camera and the target plane is adjusted so that the angle between the optical axis and the target plane is the target angle.

[0027] Optionally, the preset direction includes a first preset direction and a second preset direction, the preset mark includes a first line segment symmetrical about the first center in the first preset direction, and a second line segment symmetrical about the first center in the second preset direction, and the first preset direction is perpendicular to the second preset direction;

[0028] The identification image includes a third line segment corresponding to the first line segment and a fourth line segment corresponding to the second line segment;

[0029] The determining, according to the length information of the identification image in the second image in the preset direction, the tilt data between the target plane and the optical axis comprises:

[0030] Determine, according to the length information of the third line segment, a first direction tilt angle between the target plane and the optical axis, where the first direction tilt angle is a tilt angle corresponding to the second preset direction;

[0031] Determine, according to the length information of the fourth line segment, a second direction tilt angle between the target plane and the optical axis, where the second direction tilt angle is a tilt angle corresponding to the first preset direction;

[0032] The step of adjusting the posture relationship between the camera and the target plane according to the tilt data so that the angle between the optical axis and the target plane is a preset angle includes:

[0033] According to the first direction tilt angle and the second direction tilt angle, the posture relationship between the camera and the target plane is adjusted so that the angle between the optical axis and the target plane is the preset angle.

[0034] Optionally, the preset angle includes a first direction target angle and / or a second direction target angle.

[0035] The adjusting the posture relationship between the camera and the target plane according to the first direction tilt angle and the second direction tilt angle so that the angle between the optical axis and the target plane is a preset angle includes:

[0036] According to the first direction target angle, controlling the driving mechanism to drive the target plane to rotate around the second preset direction relative to the optical axis, so that the first direction inclination angle between the optical axis and the target plane is the first direction target angle; and / or

[0037] According to the second direction target angle, the driving mechanism is controlled to drive the target plane to rotate relative to the first preset direction, so that the second direction inclination angle between the optical axis and the target plane is the second direction target angle.

[0038] In a second aspect, an embodiment of the present application further provides an electronic device, comprising a processor and a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the camera imaging posture adjustment method as described in the first aspect are implemented.

[0039] In a third aspect, an embodiment of the present application further provides a camera imaging posture adjustment device, the camera imaging posture adjustment device comprising:

[0040] A first image acquisition module, used for acquiring a first image obtained by photographing a target plane with a camera, wherein a preset mark is provided on the target plane, wherein the preset mark has a first center, and the preset mark is symmetrical about the first center in a preset direction passing through the first center;

[0041] a first posture adjustment module, configured to adjust the positional relationship between the camera and the target plane according to the first image so that the first center is on the optical axis of the camera;

[0042] A second image acquisition module, used for acquiring a second image obtained by photographing the target plane by the camera, wherein the second image includes an identification image corresponding to the preset identification and an image center corresponding to the first center;

[0043] a data determination module, configured to determine tilt data between the target plane and the optical axis according to length information of the identification image in the second image in the preset direction; and

[0044] The second posture adjustment module is used to adjust the posture relationship between the camera and the target plane according to the tilt data so that the angle between the optical axis and the target plane is a preset angle.

[0045] In a fourth aspect, an embodiment of the present application further provides a testing system, including:

[0046] camera;

[0047] The object-carrying platform has a target plane, the target plane is provided with a preset mark, the preset mark has a first center, and the preset mark is symmetrical about the first center in a preset direction passing through the first center;

[0048] A posture adjustment device, the posture adjustment device is connected to the object-carrying platform and / or the camera, and the posture adjustment device is used to adjust the position relationship and posture relationship between the camera and the target plane;

[0049] a processor, electrically connected to the posture adjustment device and the camera;

[0050] The processor is used to implement the steps of the camera imaging posture adjustment method as described in the first aspect above.

[0051] The embodiment of the present application provides a camera imaging posture adjustment method, device, electronic device and test system, which obtains a first image obtained by a camera shooting a target plane, and adjusts the positional relationship between the camera and the target plane according to the first image, so that the first center of the preset mark on the target plane is on the optical axis of the camera, and then obtains a second image obtained by the camera shooting the target plane, thereby determining the tilt data between the target plane and the optical axis according to the length of the preset mark in the second image in the direction corresponding to the preset direction, and then adjusting the posture relationship between the camera and the target plane according to the tilt data, so that the angle between the camera optical axis and the target plane is the preset angle, and the posture adjustment between the camera optical axis and the target plane is achieved. Directly using the camera to capture the image of the target plane, and realizing calibration based on the captured image, without introducing other calibration devices, is conducive to reducing errors in the calibration process, and is also conducive to reducing the overall calibration cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0053] Figure 1 A schematic diagram of a process for adjusting the camera imaging posture provided in an embodiment of the present application;

[0054] Figure 2 A schematic diagram of the structure of a test system provided in an embodiment of the present application;

[0055] Figure 3A schematic diagram of the structure between the target plane and the camera when the camera provided in an embodiment of the present application captures a first image;

[0056] Figure 4 A schematic diagram of the structure between the target plane and the camera when the camera provided in an embodiment of the present application captures a second image;

[0057] Figure 5 A flowchart of the detailed steps of step S15 provided in the embodiment of the present application;

[0058] Figure 6 A flowchart of detailed steps of step S35 provided in another embodiment of the present application;

[0059] Figure 7 A schematic block diagram of the structure of an electronic device provided in an embodiment of the present application;

[0060] Figure 8 This is a schematic block diagram of the structure of the camera imaging posture adjustment device according to an embodiment of the present application. DETAILED DESCRIPTION

[0061] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0062] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0063] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0064] The embodiments of the present application provide a method, device, electronic device and test system for adjusting the camera imaging posture. The method for adjusting the camera imaging posture can be applied to electronic devices, including mobile phones, tablet computers, laptop computers, desktop computers, personal digital assistants or wearable devices.

[0065] Some embodiments of the present application are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0066] Please refer to Figure 1-3 , an embodiment of the present application provides a camera imaging posture adjustment method. The camera imaging posture adjustment method can be applied to Figure 2 The test system shown.

[0067] like Figure 1 As shown, the camera imaging posture adjustment method includes steps S11 to S15.

[0068] Step S11, obtaining a first image obtained by photographing a target plane 2a by the camera 1, wherein a preset mark 20 is provided on the target plane 2a, the preset mark 20 has a first center 201, and the preset mark 20 is symmetrical about the first center 201 in a preset direction passing through the first center 201; correspondingly, the first image is formed on the camera imaging surface H1, such as Figure 3 As shown, the first image contains a first identification image 20 ′ corresponding to the preset identification 20 in the target plane 2 a , and the first identification image 20 ′ has a first image center 201 ′ corresponding to the first center 201 .

[0069] For example, the preset mark includes a preset graphic or a preset line segment, and the preset direction may include Figure 2 Specifically, when the target plane 2a is parallel to the planes corresponding to the X-axis and the Y-axis, the preset mark 20 is symmetrical about the first center 201 in at least one preset direction.

[0070] Exemplarily, the X-axis direction and the Y-axis direction are parallel to the camera imaging surface H1 and perpendicular to the camera optical axis O.

[0071] Step S12: adjusting the positional relationship between the camera 1 and the target plane 2a according to the first image so that the first center 201 of the preset mark 20 is on the optical axis O of the camera.

[0072] Exemplarily, the position of the camera relative to the target plane 2a is adjusted according to the distance between a point 200' located on the optical axis O in the first image and the center 201' of the first image, so that the first image center 201' of the first identification image 20' is on the camera optical axis O, that is, the first center 201 of the preset identification 20 is on the camera optical axis O.

[0073] It is worth noting that the camera 1 can be controlled to move relative to the target plane 2a according to the first image so that the first image center 201' of the first identification image 20' in the first image is located on the camera optical axis O, or the target plane 2a can be controlled to move according to the first image so that the first image center 201' of the first identification image 20' in the first image is located on the camera optical axis O, which can be specifically adjusted according to the actual test scene.

[0074] For example, Figure 2 As shown, the object platform 2 having the target plane 2a is assembled and connected to the posture adjustment device 3, and the posture adjustment device 3 can drive the object platform 2 to move so that the first center 201 of the target plane 2a of the object platform 2 is located on the camera optical axis O. Among them, the posture adjustment device 3 includes an X-axis displacement stage 31 and a Y-axis displacement stage 32. The object platform 2 is assembled and connected to the X-axis displacement stage 31, and the X-axis displacement stage 31 is assembled and connected to the Y-axis displacement stage 32. The X-axis displacement stage 31 can drive the target plane 2a to move on the X-axis, and the Y-axis displacement stage 32 can drive the X-axis displacement stage 31 and the target plane to move together on the Y-axis.

[0075] Specifically, in one embodiment of the present application, the preset mark 20 of the target plane 2a is a cross mark, and the intersection of the cross mark is the first center 201. The camera 1 shoots the target plane 2a and forms a first image on the camera imaging surface H1. The camera imaging surface H1 is provided with a virtual cross mark, and the intersection of the virtual cross mark can be located on the camera optical axis O. The distance from the first image center 201' to the intersection of the virtual cross mark on the camera imaging surface H1 on the X-axis and Y-axis can be calculated through the pixels of the camera 1, so that the X-axis translation stage 31 and the Y-axis translation stage 32 can be controlled according to the distance between the two on the X-axis and Y-axis to drive the loading platform 2 to move, and the positional relationship between the camera 1 and the target plane 2a is adjusted so that the first image center 201' and the intersection of the virtual cross mark on the camera imaging surface H1 coincide, that is, the first center 201 of the target plane 2a is located on the camera optical axis O.

[0076] Exemplarily, in the embodiment of the present application, the images obtained by the camera 1 shooting the target plane 2a may be acquired multiple times during the process of adjusting the positional relationship between the camera 1 and the target plane 2a. If the point corresponding to the first center 201 of the preset mark 20 in the current image is not on the camera optical axis O, the current image is determined to be an updated first image; and the positional relationship between the camera 1 and the target plane 2a is adjusted according to the updated first image so that the first center 201 of the preset mark 20 is on the camera optical axis O. If the point corresponding to the first center 201 in the current image is on the camera optical axis O, step S13 may be executed.

[0077] Step S13, obtaining a second image obtained by photographing the target plane 2a by the camera 1, wherein the second image includes a second identification image 20" corresponding to the preset identification 20.

[0078] It can be understood that the identification image corresponding to the preset identification 20 in the first image is the first identification image 20 ′, and the identification image corresponding to the preset identification 20 in the second image is the second identification image 20 ″.

[0079] Step S14: Determine the tilt data between the target plane 2a and the camera optical axis O according to the length information of the second identification image 20" in the second image in the preset direction.

[0080] In an exemplary embodiment, the preset logo 20 includes a line segment, the first center 201 is the midpoint of the line segment, the line segment is symmetrical about the first center 201 in a preset direction, the second logo image 20" includes a line segment feature corresponding to the line segment, and the length information of the second logo image 20" in the preset direction may be the length of the line segment feature determined based on the camera pixels.

[0081] Step S15, adjusting the posture relationship between the camera 1 and the target plane 2a according to the tilt data, so that the angle between the camera optical axis O and the target plane 2a is a preset angle.

[0082] The camera imaging posture adjustment method of this embodiment, by shooting the target plane 2a of the object plane through the camera 1, and adjusting the posture of the object plane relative to the camera 1, can make the angle between the camera optical axis O and the target plane 2a a preset angle, and realize the posture adjustment between the camera optical axis and the target plane 2a. After adjusting the angle between the camera optical axis and the target plane 2a to the preset angle, the image of the object to be tested on the target plane 2a can be obtained by the camera 1, and the test result of the object to be tested can be determined according to the image of the object to be tested. The object to be tested is, for example, an optical waveguide or a screen.

[0083] It can be understood that the test system of the object to be tested includes a camera 1 and a target plane 2a. Before the test, the existing camera 1 and target plane 2a in the test system are used to adjust the posture, thereby realizing the structural reuse of the test system. At the same time, there is no need to introduce other calibration devices, thus avoiding the introduction of calibration errors, improving the calibration accuracy, and helping to reduce the overall calibration cost.

[0084] Combination Figure 4As shown, in some embodiments, the preset mark 20 has a first endpoint A and a second endpoint B opposite to each other in a preset direction, the first endpoint A and the second endpoint B are symmetrical about the first center 201, and the second mark image 20" includes a first point a1 corresponding to the first endpoint A, a second point b1 corresponding to the second endpoint B, and a second image center 201" corresponding to the first center 201". According to the length of the second mark image 20" in the direction corresponding to the preset direction, the tilt data between the target plane 2a and the camera optical axis O is determined, that is, step S14, including:

[0085] Step S141, determine the tilt data between the target plane 2a and the camera optical axis O according to the length from the first endpoint A to the second endpoint B, the length L1 from the second image center 201" to the first point a1, and the length L2 from the second image center 201" to the second point b1.

[0086] It can be understood that the image center is imaged by the first center 201, the image center corresponding to the first center 201 in the first identification image 'is the first image center 201', and the image center corresponding to the first center 201 in the second identification image 20"is the second image center 201".

[0087] It can be understood that the first center 201 is located on the camera optical axis O, and the first endpoint A and the second endpoint B are symmetrical about the first center 201. If the line connecting the first endpoint A to the second endpoint B is inclined relative to the camera optical axis O, one of the first endpoint A and the second endpoint B is bound to be close to the camera imaging plane H1, and the other is far away from the camera imaging plane H1. Then, the length L1 from the first point a1 to the second image center 201" is different from the length L2 from the second point b1 to the second image center 201", and according to the different inclination data between the target plane 2a and the camera optical axis O, it is reflected that the difference between the length L1 from the first point a1 to the second image center 201" and the length L2 from the second point b1 to the second image center 201" is different. Therefore, the inclination data between the target plane 2a and the camera optical axis O can be determined according to the length from the first endpoint A to the second endpoint B, the length L1 from the first point a1 to the second image center 201", and the length L2 from the second image center 201" to the second point b1 in the second image of the target plane 2a captured by the camera 1.

[0088] For example, Figure 4It is a schematic diagram of the preset mark and the second mark image when observed along the Y-axis direction. In the figure, the preset mark 20 is tilted relative to the camera optical axis O, and the length L1 from the first point a1 to the second image center 201" is different from the length L2 from the second point b1 to the second image center 201". According to the length from the first endpoint A to the second endpoint B, the length L1 from the first point a1 to the second image center 201", and the length L2 from the second image center 201" to the second point b1, the corresponding tilt data between the target plane 2a and the camera optical axis O in the X-axis direction can be determined, that is, the tilt angle of the target plane 2a relative to the camera optical axis O in the direction of rotation around the Y-axis direction.

[0089] Exemplarily, the length from the first point a1 to the center 201 ″ of the second image, and the length from the center 201 ″ of the second image to the second point b1 in the second image may be determined by the pixels of the camera 1 .

[0090] Further, according to the length from the first endpoint A to the second endpoint B, the length from the second image center 201″ to the first point a1, and the length from the second image center 201″ to the second point b1, the inclination data between the target plane 2a and the camera optical axis O is determined, that is, step S141, including:

[0091] Step S1411, determine the first angle θ1 between the line from the first endpoint A to the first point a1 and the camera optical axis O, and the second angle β1 between the line from the first endpoint A to the first point a1 and the line from the first endpoint A to the second endpoint B according to the length from the first endpoint A to the second endpoint B, the length from the second image center 201" to the first point a1, and the length from the second image center 201" to the second point b1.

[0092] It can be understood that the second image is formed on the camera imaging plane H1, and the line from the first endpoint A to the first point a1 is the line from the position where the first endpoint A of the target plane 2a is located to the position where the first point a1 is formed on the camera imaging plane H1, and the line intersects with the camera optical axis O. For example, when observing the camera 1 and the target plane 2a along the Y-axis direction, it can be seen as follows: Figure 4 As shown, the first angle can be Figure 4 As shown in θ1, the second angle can be Figure 4 As shown in β1.

[0093] Step S1412: determine the tilt data between the target plane 2a and the camera optical axis O according to the first angle θ1 and the second angle β1.

[0094] It can be understood that the tilt data between the target plane 2a and the camera optical axis O reflects the tilt angle of the target plane 2a relative to the camera optical axis O. Therefore, the angle data of the first angle θ1 and the second angle β1 related to the three length data can be obtained according to the length from the first end point A to the second end point B, the length from the second image center 201″ to the first point a1, and the length from the second image center 201″ to the second point b1. Then, according to the relationship between the first angle θ1, the second angle β1, and the angle between the target plane 2a and the camera optical axis O, the tilt data between the target plane 2a and the camera optical axis O can be obtained.

[0095] Furthermore, the tilt data between the target plane 2a and the camera optical axis O is determined according to the first angle θ1 and the second angle β1, that is, step S1412, including:

[0096] Step S14121, determine the tilt data between the target plane 2a and the camera imaging plane H1 according to the difference between 90 degrees and the first angle θ1 and the second angle β1.

[0097] For example, if the plane where the first endpoint A is located, which is parallel to the camera imaging plane H1 and perpendicular to the camera optical axis O, is recorded as the first plane, the tilt data can be expressed as the angle θ1 between the preset mark 20 and the first plane when the first endpoint A is the vertex. Since the first plane is parallel to the camera imaging plane H1, the angle between the line connecting the first endpoint A to the first point a1 and the line connecting the first point a1 to the second point b1 is equal to the angle between the line connecting the first endpoint A to the first point a1 and the first plane. On the basis of determining the first angle θ1 and the second angle β1, since the camera optical axis O is perpendicular to the camera imaging surface H1, a right triangle is formed between the line connecting the first point a1 to the second point b1, the line connecting the first point a1 to the first endpoint A, and the camera optical axis O, then the angle between the line connecting the first point a1 to the second point b1 and the first point a1 to the first endpoint A is equal to 90 degrees minus the difference of the first angle θ1, so that the angle between the line connecting the first endpoint A to the second endpoint B and the first plane is equal to 90 degrees minus the difference of the first angle θ1 minus the second angle β1, that is, the inclination data between the target plane 2a and the camera imaging surface H1 is obtained.

[0098] When the angle is determined by subtracting the difference between 90 degrees and the first angle θ1 and then subtracting the second angle β1, when the angle is greater than 0, the tilt state of the target plane 2a is manifested as the side where the first endpoint A is located is far away from the camera imaging plane H1, while the side where the second endpoint B is located is close to the camera imaging plane H1. When the angle is less than 0, the tilt state of the target plane 2a is manifested as the side where the first endpoint A is located is close to the camera imaging plane H1, while the side where the second endpoint B is located is far away from the camera imaging plane H1.

[0099] Step S14122: determine the tilt data between the target plane 2a and the camera optical axis O according to the tilt data between the target plane 2a and the camera imaging plane H1.

[0100] It can be understood that since the camera optical axis O is perpendicular to the camera imaging plane H1, after determining the inclination data between the target plane 2a and the camera imaging plane H1 according to the first angle θ1 and the second angle β1, the inclination data between the target plane 2a and the camera optical axis O can be determined according to the relative relationship between the camera optical axis O and the camera imaging plane H1.

[0101] In some embodiments, the first angle θ1 between the line connecting the first endpoint A to the first point a1 and the camera optical axis O is determined according to the following formula:

[0102]

[0103] The second angle β1 between the line connecting the first endpoint A to the first point a1 and the line connecting the first endpoint A to the second endpoint B is determined according to the following formula:

[0104]

[0105] Among them, L1 is the length from the first point a1 to the second image center 201", L2 is the length from the second point b1 to the second image center 201", and L3 is the length from the camera imaging surface H1 to the focal plane H2 of the camera 1 along the optical axis.

[0106] Exemplarily, the preset mark includes a first line segment 21, Figure 4 FIG. 2 shows the relationship between the target plane 2a and the camera imaging surface H1 when the target plane 2a and the camera 1 are observed along a line perpendicular to the camera optical axis O and the first line segment 21 after the first center B is located on the camera optical axis O. Figure 2 As shown, the first line segment 21 includes a first endpoint A and a second endpoint B, the length from the first endpoint A to the first center 201 and the length from the second endpoint B to the first center 201 are both L5, the length of the line from the first point a1 to the second image center 201" in the second image formed on the camera imaging surface H1 is L1, the length of the line from the second point b1 to the second image center 201" is L2, the length from the camera imaging surface H1 to the camera focal plane H2 along the optical axis direction is L3, the length from the first endpoint A to the first point a1 is L4, and the length from the first endpoint A to the first point a1 is L5. The first angle between the connecting line and the camera optical axis O is θ1, the angle between the connecting line from the second endpoint B to the second point b1 and the camera optical axis O is θ2, the second angle between the connecting line from the first endpoint A to the first point a1 and the connecting line from the first endpoint A to the second endpoint B is β1, the angle between the connecting line from the second endpoint B to the second point b1 and the connecting line from the first endpoint A to the second endpoint B is β1, and the angle between the connecting line from the first endpoint A to the second endpoint B and the plane passing through the first endpoint A and parallel to the camera imaging surface W1 is α.

[0107] Depend on Figure 2 It can be seen that the camera optical axis O is perpendicular to the camera imaging plane H1, the line connecting the first point a1 to the second point b1, the line connecting the first end point A to the first point a1 and the camera optical axis O form a right triangle, and the length L3 from the camera imaging plane H1 to the camera focal plane H2 along the optical axis direction is determined. Therefore, after determining the length L1 from the first point a1 to the second image center 201", the first angle θ1 can be determined according to the above formula (1).

[0108] The camera optical axis O is perpendicular to the camera imaging plane H1. The line connecting the first point a1 to the second point b1, the line connecting the second endpoint B to the second point b1, and the camera optical axis O form another right triangle. The length L3 from the camera imaging plane H1 to the camera focal plane H2 along the optical axis direction is determined. Therefore, after determining the length from the second point b1 to the second image center 201", the second angle β1 can be determined according to the following formula (3).

[0109]

[0110] According to the sine theorem, we can get:

[0111]

[0112]

[0113] and:

[0114] β1=180°-θ1-θ2-β2 (6)

[0115] Therefore, according to the above formulas (1), (3), (4), (5) and (6), it can be concluded that the second angle β1 between the line connecting the first endpoint A to the first point a1 and the line connecting the first endpoint A to the second endpoint B satisfies the above formula (2).

[0116] like Figure 5 As shown, in some embodiments, the posture relationship between the camera 1 and the target plane 2a is adjusted according to the tilt data so that the angle between the camera optical axis O and the target plane 2a is a preset angle, that is, step S15, including:

[0117] Step S151 , adjusting the posture relationship between the camera 1 and the target plane 2 a according to the tilt data, so that the camera optical axis O is perpendicular to the target plane 2 a .

[0118] Step S152: adjust the posture relationship between the camera 1 and the target plane 2a according to the target angle, so that the angle between the camera optical axis O and the target plane 2a is the target angle.

[0119] It can be understood that the preset angle includes an intermediate angle and a target angle, wherein the intermediate angle corresponds to the ninety-degree angle between the camera optical axis O and the target plane 2a when the camera optical axis O is perpendicular to the target plane 2a, and the target angle can correspond to the angle between the camera optical axis O and the target plane 2a required for the test piece to be tested, and the target angle can be the ninety-degree angle between the camera optical axis O and the target plane 2a when the two are perpendicular, or can be the acute angle between the camera optical axis O and the target plane 2a when the two are inclined. First, the posture relationship between the camera 1 and the target plane 2a is adjusted according to the tilt data so that the camera optical axis O and the target plane 2a are perpendicular, so that the positional relationship between the target plane 2a and the camera optical axis O can be verified through the image of the target plane 2a captured by the camera 1. After verifying that the adjustment direction is correct, the angle between the target plane 2a and the camera optical axis O is adjusted to the target angle, which is conducive to improving the accuracy of the posture adjustment between the target plane 2a and the camera optical axis O.

[0120] Exemplarily, after adjusting the posture relationship between the camera 1 and the target plane 2a according to the tilt data, the image of the target plane 2a captured by the camera 1 can be used to determine whether the first center 201 of the preset mark 20 is still located on the camera optical axis O. If so, the adjustment direction is verified to be correct. And / or, after adjusting the posture relationship between the camera 1 and the target plane 2a according to the tilt data, the image of the target plane 2a captured by the camera 1 can be used to determine whether the length from the point corresponding to the first endpoint A in the image to the point corresponding to the first center 201 in the image is consistent with the length from the point corresponding to the second endpoint B in the image to the point corresponding to the first center 201 in the image. If so, the adjustment direction is verified to be correct.

[0121] like Figure 4 As shown, another embodiment of the present application provides a camera imaging posture adjustment method. The camera imaging posture adjustment method includes steps S21 to S28. The camera imaging posture adjustment method can be applied to Figure 2 The test system shown.

[0122] Step S21, obtaining a first image obtained by photographing a target plane 2a by the camera 1. A preset mark 20 is provided on the target plane 2a, and the preset mark 20 has a first center 201. The preset mark 20 includes a first line segment 21 symmetrical about the first center 201 in a first preset direction passing through the first center 201, and a second line segment 22 symmetrical about the first center 201 in a second preset direction passing through the first center 201. The first preset direction and the second preset direction are perpendicular to each other.

[0123] For example, the first preset direction may be Figure 2 The X-axis direction in the coordinate system shown, the second preset direction can be as follows Figure 2 The Y-axis direction in the coordinate system shown.

[0124] Step S22: adjusting the positional relationship between the camera 1 and the target plane 2a according to the first image so that the first image center 201' of the first image is on the optical axis of the camera.

[0125] Step S23, obtaining a second image obtained by photographing the target plane 2a by the camera 1, the second image including a second identification image 20" corresponding to the preset identification 20, the second identification image including a third line segment corresponding to the first line segment 21 and a fourth line segment corresponding to the second line segment 22.

[0126] Step S24: determine a first direction tilt angle between the target plane 2a and the relative optical axis according to the length information of the third line segment in the second image, where the first direction tilt angle is a tilt angle corresponding to the second preset direction.

[0127] Among them, the inclination angle in the first direction is the inclination angle corresponding to the second preset direction, that is, the angle at which the target plane 2a is inclined relative to the optical axis in the direction of rotation around the second preset direction, and the angle between the target plane 2a and the plane perpendicular to the camera optical axis and passing through the first center 201 in the direction of rotation around the second preset direction.

[0128] For example, Figure 3 As shown, the horizontal direction through the first center 201 is the first preset direction, and the direction through the first center 201 perpendicular to the paper surface is the second preset direction. At this time, the target plane 2a is tilted relative to the camera optical axis in the direction of rotation around the second preset direction, and the tilt angle in the direction of rotation around the second preset direction is α. The tilt angle of the first direction can be Figure 3 The angle corresponding to the angle α in .

[0129] Step S25, adjusting the posture relationship between the camera 1 and the target plane 2a according to the first direction tilt angle, so that the angle between the camera optical axis and the target plane 2a is a preset angle.

[0130] Exemplarily, the preset angle includes a first direction target angle. Adjusting the posture relationship between the camera 1 and the target plane 2a according to the first direction tilt angle so that the angle between the camera optical axis and the target plane 2a is the preset angle includes: according to the first direction target angle, controlling the driving mechanism to drive the target plane 2a to rotate around the second preset direction relative to the camera optical axis so that the first direction tilt angle between the camera optical axis and the target plane 2a is the first direction target angle.

[0131] For example, Figure 2As shown, the object platform 2 with the target plane 2a is arranged on the posture adjustment device, and the posture adjustment device can drive the object platform 2 to rotate around the second preset direction, so that the second direction tilt angle between the camera optical axis and the target plane 2a is the second direction target angle. Wherein, the posture adjustment device includes an X-axis angle table 35, a Y-axis angle table 34, and a Y-axis displacement table 32. The object platform 2 is assembled and connected to the X-axis angle table 35, and the X-axis angle table 35 is assembled and connected to the Y-axis angle table 34. The X-axis angle table 35 can drive the target plane 2a to rotate around the X-axis, and the Y-axis angle table 34 can drive the X-axis angle table 35 and the target plane 2a to rotate around the Y-axis together. The preset mark 20 of the target plane 2a includes a first line segment 21 and a second line segment 22. After determining the first direction inclination angle between the target plane 2a and the camera optical axis based on the length information of the third line segment corresponding to the first line segment 21 in the second image obtained by shooting the target plane 2a with the camera 1, the Y-axis angle stage 34 can be controlled to rotate according to the first direction inclination angle, so that the target plane 2a rotates around the Y axis, that is, rotates around the second preset direction, so that the first direction inclination angle between the camera optical axis and the target plane 2a is the first direction target angle.

[0132] Step S26, again obtain the second image obtained by photographing the target plane 2a with the camera 1, the second image includes a second identification image 20" corresponding to the preset identification 20, the second identification image 20" includes a third line segment corresponding to the first line segment, a fourth line segment corresponding to the second line segment and a second image center 201" corresponding to the first center 201.

[0133] It can be understood that the target plane 2a photographed by the camera 1 is in a positional relationship with the camera 1 after the adjustment according to the tilt angle in the first direction, so the third line segment in the second image acquired again is different from the third line segment in the second image acquired in step S23. However, it is worth noting that although the third line segment in the second image acquired again after the adjustment changes, the second image center 201" in the second image should still be located at the position of the point in the second image corresponding to the camera optical axis.

[0134] Step S27, determining a second tilt angle between the target plane 2a and the camera optical axis according to the length information of the fourth line segment in the second image acquired again, wherein the second direction tilt angle is the tilt angle corresponding to the first preset direction.

[0135] Among them, the inclination angle in the second direction is the inclination angle corresponding to the first preset direction, that is, the angle at which the target plane 2a is tilted relative to the camera optical axis in the direction of rotation around the first preset direction, and the angle between the target plane 2a and the plane perpendicular to the camera optical axis and passing through the first center 201 in the direction of rotation around the first preset direction.

[0136] Step S28, adjusting the posture relationship between the camera 1 and the target plane 2a according to the second direction tilt angle, so that the angle between the camera optical axis and the target plane 2a is a preset angle.

[0137] Exemplarily, the posture relationship between the camera 1 and the target plane 2a is adjusted according to the second direction tilt angle so that the angle between the camera optical axis and the target plane 2a is a preset angle, including: according to the second direction target angle, controlling the driving mechanism to drive the target plane 2a to rotate around the first preset direction relative to the camera optical axis so that the second direction tilt angle between the camera optical axis and the target plane 2a is the second direction target angle.

[0138] Exemplarily, after the camera 1 determines the second direction inclination angle between the target plane 2a and the camera optical axis based on the length information of the fourth line segment corresponding to the second line segment 22 in the second image, the camera 1 can control the rotation of the X-axis angle stage 35 according to the second direction inclination angle, so that the target plane 2a rotates around the X-axis, that is, rotates around the first preset direction, so that the second direction inclination angle between the camera optical axis and the target plane 2a is the second direction target angle.

[0139] The camera imaging posture adjustment method of this embodiment, through the camera 1 to shoot the target plane 2a of the object plane, and adjust the posture of the object plane relative to the camera 1, can make the angle between the camera optical axis and the target plane 2a a preset angle, thereby realizing the posture adjustment between the camera optical axis and the target plane 2a.

[0140] After adjusting the angle between the camera optical axis and the target plane 2a to a preset angle, the image of the object to be tested on the target plane 2a can be obtained by the camera 1, and the test result of the object to be tested can be determined according to the image of the object to be tested. The object to be tested is, for example, an optical waveguide or a screen. It can be understood that the test system of the object to be tested includes a camera 1 and a target plane 2a, and before the test, the posture adjustment is performed using the camera 1 and the target plane 2a already in the test system, thereby realizing the structural reuse of the test system, and at the same time, there is no need to introduce other calibration devices, thereby avoiding the introduction of calibration errors, improving the calibration accuracy, and also helping to reduce the overall calibration cost.

[0141] In addition, after adjusting the posture relationship between the target plane 2a and the camera optical axis according to the first direction tilt angle, a second image is captured again. Not only can it be verified based on the second image captured again whether the angle between the camera 1 and the target plane 2a after adjustment according to the first preset direction meets the first direction target angle, but the posture relationship between the target plane 2a and the camera optical axis can also be adjusted based on the second direction tilt angle determined by the second image captured again.

[0142] In some embodiments, a virtual cross mark is provided on the imaging surface of the camera 1, the intersection of the virtual cross mark may be located on the optical axis of the camera, and the virtual cross mark has a first virtual line and a second virtual line perpendicular to each other. After adjusting the positional relationship between the camera 1 and the target plane 2a according to the first image so that the first center 201 of the preset mark 20 is on the optical axis of the camera, the camera imaging posture adjustment method may also include: acquiring an image of the target plane 2a captured by the camera 1, adjusting the posture relationship between the camera 1 and the target plane 2a so that the first line segment of the preset mark 20 is aligned with the first virtual line of the imaging surface of the camera 1 in the direction of the optical axis, and the second line segment of the preset mark 20 is aligned with the second virtual line of the imaging surface of the camera 1 in the direction of the optical axis. By making the first center 201 of the target plane 2a on the camera optical axis, aligning the first line segment of the preset mark 20 with the first virtual line of the imaging surface of the camera 1, and aligning the second line segment of the preset mark 20 with the second virtual line of the imaging surface of the camera 1, and then determining the inclination data between the target plane 2a and the camera optical axis, and adjusting the posture relationship between the target plane 2a and the camera optical axis according to the inclination data, it is beneficial to improve the accuracy of the posture between the target plane 2a and the camera optical axis after adjustment.

[0143] It can be understood that the first line segment of the preset mark 20 corresponds to the first virtual line of the imaging surface of the camera 1, and the second line segment of the preset mark 20 corresponds to the second virtual line of the imaging surface of the camera 1, that is, the line segment corresponding to the first line segment in the image of the target plane 2a captured by the camera 1 coincides with the first virtual line, and the line segment corresponding to the second line segment in the image coincides with the second virtual line.

[0144] Exemplarily, the first center 201 of the target plane 2a is located behind the camera optical axis, and the image of the target plane 2a captured by the camera 1 is obtained again. Then, the angle by which the target plane 2a needs to be rotated around the camera optical axis can be determined based on the angle between the line segment corresponding to the first line segment in the image and the first virtual line, and / or the angle between the line segment corresponding to the second line segment in the image and the second virtual line. The rotation of the target plane 2a can be controlled so that the first line segment of the preset mark 20 is aligned with the first virtual line of the imaging surface of the camera 1, and the second line segment of the preset mark 20 is aligned with the second virtual line of the imaging surface of the camera 1.

[0145] For example, Figure 3As shown, the camera optical axis is located on the Z axis, and the posture adjustment device 3 includes a Z-axis rotating table 33, and a Y-axis angle table 34 is assembled and connected to the Z-axis rotating table 33. After determining the angle at which the target plane 2a needs to be rotated around the camera optical axis based on the image obtained by photographing the target plane 2a by the camera 1, the Y-axis angle table 34, the X-axis angle table 35 and the loading platform 2 are driven to rotate by the Z-axis rotating table 33, so that the first line segment 21 of the preset mark 20 is aligned with the first virtual line of the imaging surface of the camera 1, and the second line segment 22 of the preset mark 20 is aligned with the second virtual line of the imaging surface of the camera 1.

[0146] like Figure 5 As shown, another embodiment of the present application provides a camera imaging posture adjustment method. The posture adjustment method includes steps S31 to S35. The camera imaging posture adjustment method can be applied to Figure 2 The test system shown.

[0147] Step S31, obtaining a first image obtained by photographing a target plane 2a by a camera 1. A preset mark 20 is provided on the target plane 2a, and the preset mark 20 has a first center 201. The preset mark 20 includes a first line segment 21 symmetrical about the first center 201 in a first preset direction passing through the first center 201, and a second line segment 22 symmetrical about the first center 201 in a second preset direction passing through the first center 201. The first preset direction and the second preset direction are perpendicular to each other.

[0148] For example, the first preset direction may be Figure 2 The X-axis direction in the coordinate system shown, the second preset direction can be as follows Figure 2 The Y-axis direction in the coordinate system shown.

[0149] Step S32: adjust the positional relationship between the camera 1 and the target plane 2a according to the first image so that the first center 201 is on the optical axis of the camera.

[0150] Step S33 , obtaining a second image obtained by photographing the target plane 2a by the camera 1 , the second image including an identification image corresponding to the preset identification 20 , and the identification image including a third line segment corresponding to the first line segment 21 and a fourth line segment corresponding to the second line segment 22 .

[0151] Step S34, determining the first direction tilt angle between the target plane 2a and the camera optical axis according to the length information of the third line segment, and determining the second direction tilt angle between the target plane 2a and the camera optical axis according to the length information of the fourth line segment.

[0152] The first direction tilt angle is the tilt angle corresponding to the second preset direction, that is, the angle at which the target plane 2a is tilted relative to the camera optical axis in the direction of rotation around the second preset direction, and the angle between the target plane 2a and the plane perpendicular to the camera optical axis and passing through the first center 201 in the direction of rotation around the second preset direction. The second direction tilt angle is the tilt angle corresponding to the first preset direction, that is, the angle at which the target plane 2a is tilted relative to the camera optical axis in the direction of rotation around the first preset direction, and the angle between the target plane 2a and the plane perpendicular to the camera optical axis and passing through the first center 201 in the direction of rotation around the first preset direction.

[0153] Step S35, adjusting the posture relationship between the camera 1 and the target plane 2a according to the first direction tilt angle and the second direction tilt angle, so that the angle between the camera optical axis and the target plane 2a is a preset angle.

[0154] The camera imaging posture adjustment method of this embodiment, through the camera 1 to shoot the target plane 2a of the object plane, and adjust the posture of the object plane relative to the camera 1, can make the angle between the camera optical axis and the target plane 2a a preset angle, thereby realizing the posture adjustment between the camera optical axis and the target plane 2a.

[0155] After adjusting the angle between the camera optical axis and the target plane 2a to a preset angle, the image of the object to be tested on the target plane 2a can be obtained by the camera 1, and the test result of the object to be tested can be determined according to the image of the object to be tested. The object to be tested is, for example, an optical waveguide or a screen. It can be understood that the test system of the object to be tested includes a camera 1 and a target plane 2a, and before the test, the posture adjustment is performed using the camera 1 and the target plane 2a already in the test system, thereby realizing the structural reuse of the test system, and at the same time, there is no need to introduce other calibration devices, thereby avoiding the introduction of calibration errors, improving the calibration accuracy, and also helping to reduce the overall calibration cost.

[0156] It can be understood that the same second image obtained by shooting the target plane 2a with camera 1 can be used to determine the length information of the third line segment and the fourth line segment in the second image, which is different from the different second images obtained by shooting the target plane 2a with camera 1 as described above, and the length messages of the third line segment and the fourth line segment are confirmed in turn.

[0157] In some embodiments, the preset angle includes a first direction target angle. According to the first direction tilt angle and the second direction tilt angle, the posture relationship between the camera 1 and the target plane 2a is adjusted so that the angle between the camera optical axis and the target plane 2a is the preset angle, that is, step S35, including: according to the first direction target angle, controlling the driving mechanism to drive the target plane 2a to rotate around the second preset direction relative to the camera optical axis O so that the first direction tilt angle between the camera optical axis and the target plane 2a is the first direction target angle.

[0158] In some embodiments, the preset angle includes a second direction target angle. According to the first direction tilt angle and the second direction tilt angle, the posture relationship between the camera 1 and the target plane 2a is adjusted so that the angle between the camera optical axis O and the target plane 2a is the preset angle, that is, step S35, including: according to the second direction target angle, controlling the driving mechanism to drive the target plane 2a to rotate relative to the first preset direction so that the second direction tilt angle between the camera optical axis O and the target plane 2a is the second direction target angle.

[0159] In some embodiments, such as Figure 6 As shown, the preset angle includes a first direction target angle and a second direction target angle. According to the first direction tilt angle and the second direction tilt angle, the posture relationship between the camera 1 and the target plane 2a is adjusted so that the angle between the camera optical axis and the target plane 2a is the preset angle, that is, step S35, including:

[0160] Step S351, according to the first direction target angle, control the driving mechanism to drive the target plane 2a to rotate around the second preset direction relative to the camera optical axis, so that the first direction inclination angle between the camera optical axis and the target plane 2a is the first direction target angle.

[0161] Step S352: According to the second direction target angle, control the driving mechanism to drive the target plane 2a to rotate relative to the first preset direction, so that the second direction tilt angle between the camera optical axis and the target plane 2a is the second direction target angle.

[0162] It can be understood that the first line segment is perpendicular to the second line segment, and when the target plane 2a is adjusted to rotate around the second preset direction according to the first direction target angle determined by the first line segment, it is helpful to avoid introducing a tilt deviation of the target plane 2a in other directions, such as the first preset direction, relative to the camera optical axis. Adjusting the target plane 2a to rotate around the first preset direction according to the second direction target angle determined by the second line segment is helpful to avoid introducing a tilt deviation of the target plane 2a in other directions, such as the second preset direction, relative to the camera optical axis.

[0163] See also Figure 7 An embodiment of the present application provides an electronic device 400, which includes a processor 401 and a memory 402, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the camera imaging posture adjustment method described above are implemented.

[0164] like Figure 7 As shown, the processor 401 and the memory 402 are connected via a bus 403, which is, for example, an I2C (Inter-integrated Circuit) bus.

[0165] Specifically, the processor 401 is used to provide computing and control capabilities to support the operation of the entire electronic device 400. The processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0166] Specifically, the memory 402 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB flash drive, or a mobile hard disk.

[0167] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a partial structure related to the embodiment of the present application, and does not constitute a limitation on the electronic device to which the embodiment of the present application is applied. The specific server may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0168] The processor is used to run a computer program stored in the memory, and implement any one of the camera imaging posture adjustment methods provided above when executing the computer program.

[0169] In one embodiment, the processor is used to run a computer program stored in the memory, and implements the following steps when executing the computer program:

[0170] Acquire a first image of a target plane captured by a camera, wherein a preset mark is provided on the target plane, the preset mark has a first center, and the preset mark is symmetrical about the first center in a preset direction passing through the first center;

[0171] adjusting the positional relationship between the camera and the target plane according to the first image so that the first center is on the optical axis of the camera;

[0172] Acquire a second image obtained by photographing the target plane with a camera, the second image including an identification image corresponding to a preset identification;

[0173] Determine the tilt data between the target plane and the camera optical axis according to the length information of the identification image in the second image in the preset direction;

[0174] The attitude relationship between the camera and the target plane is adjusted according to the tilt data so that the angle between the camera optical axis and the target plane is a preset angle.

[0175] It should be noted that technicians in the relevant field can clearly understand that for the convenience and conciseness of description, the specific working process of the electronic device described above can refer to the corresponding process in the aforementioned camera imaging posture adjustment method embodiment, and will not be repeated here.

[0176] An embodiment of the present application also provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any camera imaging posture adjustment method provided in the description of the embodiment of the present application.

[0177] The storage medium may be an internal storage unit of the electronic device of the aforementioned embodiment, such as a hard disk or memory of the electronic device. The storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device.

[0178] See also Figure 8 The embodiment of the present application further provides a camera imaging posture adjustment device 500, and the camera imaging posture adjustment device 500 includes:

[0179] The first image acquisition module 501 is used to acquire a first image obtained by photographing a target plane by a camera. A preset mark is provided on the target plane. The preset mark has a first center. The preset mark is symmetrical about the first center in a preset direction passing through the first center.

[0180] The first pose adjustment module 502 is used to adjust the positional relationship between the camera and the target plane according to the first image so that the first center is on the camera optical axis.

[0181] The second image acquisition module 503 is used to acquire a second image obtained by photographing the target plane by a camera, where the second image includes an identification image corresponding to a preset identification.

[0182] The data determination module 504 is used to determine the tilt data between the target plane and the camera optical axis according to the length information of the identification image in the second image in the preset direction.

[0183] The second posture adjustment module 505 is used to adjust the posture relationship between the camera and the target plane according to the tilt data, so that the angle between the camera optical axis and the target plane is a preset angle.

[0184] It is worth noting that technicians in the relevant field can clearly understand that for the convenience and conciseness of description, the specific working process of the above-described device and each module can refer to the corresponding process in the aforementioned camera imaging posture adjustment method embodiment, and will not be repeated here.

[0185] See also Figure 2 , an embodiment of the present application provides a test system, the test system includes a loading platform 2, a posture adjustment device 3, a camera 1 and a processor. Among them, the loading platform 2 has a target plane 2a, the target plane 2a is provided with a preset mark 21, the preset mark 21 has a first center 201, and the preset mark 20 is symmetrical about the first center 201 in a preset direction passing through the first center 201. The posture adjustment device 3 is connected to the loading platform 2 and / or the camera 1. The processor is electrically connected to the posture adjustment device 3 and the camera 1. The processor is used to implement the steps of the camera imaging posture adjustment method as described above.

[0186] It can be understood that the loading platform 2 is used to carry the test piece, for example, it can be used to carry an optical waveguide or a screen. By adjusting the posture relationship between the camera 1 and the loading platform 2, the angle between the target plane 2a of the loading platform 2 and the optical axis of the camera is made to be a preset angle, so that the camera 1 can be used to photograph the test piece carried by the loading platform 2, so as to test the performance of the test piece.

[0187] In the test system of this embodiment, the processor controls the camera 1 to shoot the target plane 2a of the loading platform 2, and controls the posture adjustment device 3 to adjust the posture of the loading platform 2 relative to the camera 1, so that the angle between the camera optical axis and the target plane 2a can be a preset angle, and the posture adjustment between the camera optical axis and the target plane 2a can be achieved. When using the camera 1 for testing, it is necessary to use the camera 1, the posture adjustment device 3 and the loading platform 2, etc., and before the test, the camera 1, the posture adjustment device 3 and the target plane 2a, etc. already in the test system can be used for posture adjustment, so that the structural reuse of the test system is realized, and at the same time, there is no need to introduce other calibration devices, so as to avoid introducing calibration errors, improve calibration accuracy, and also help reduce the overall calibration cost.

[0188] Exemplarily, the posture adjustment device 3 includes a translation module and a rotation module, wherein the translation module can drive the object-carrying platform 2 to move relative to the camera optical axis, and the rotation module can drive the object-carrying platform 2 to rotate relative to the camera optical axis.

[0189] In some embodiments, the preset mark 21 includes a first line segment 21 symmetrical about the first center 201 in a first preset direction passing through the first center 201, and a second line segment 22 symmetrical about the first center 201 in a second preset direction passing through the first center 201. The first preset direction and the second preset direction are perpendicular to each other. The processor can control the posture adjustment device 3 to adjust the positional relationship between the camera 1 and the target plane 2a according to the first image obtained by the camera 1 shooting the target plane 2a, so that the first center 201 of the preset mark 21 is on the camera optical axis. After that, the processor can adjust the posture relationship between the camera 1 and the target plane 2a according to the length information of the third line segment corresponding to the first line segment 21 and / or the fourth line segment corresponding to the second line segment 22 in the second image obtained by the camera 1 shooting the target plane 2a, so that the angle between the camera optical axis and the target plane 2a is the preset angle.

[0190] Exemplarily, the first preset direction is as follows Figure 2 The X-axis direction is shown in FIG. 1 , and the second preset direction is shown in FIG. Figure 2 As shown in the Y-axis direction in the figure. The rotation module is assembled and connected to the translation module, and the object platform 2 is assembled and connected to the rotation module. The translation module may include an X-axis translation table 31 and a Y-axis translation table 32, and the rotation module includes a Z-axis rotation table 33, an X-axis angle table 35, and a Y-axis angle table 34. Among them, the object platform 2, the X-axis angle table 35, the Y-axis angle table 34, the Z-axis rotation table 33, the X-axis translation table 31 and the Y-axis translation table 32 are arranged in sequence from top to bottom along the Z-axis direction. The X-axis translation table 31 can drive the object plane to move along the X-axis, and the Y-axis translation table 32 can drive the object plane to move along the Y-axis direction, so that the first center 201 of the target plane 2a of the object plane is located on the optical axis of the camera. The Z-axis rotation table 33 can drive the object plane to rotate around the Z-axis direction, so that the first line segment 21 of the preset mark is aligned with the first virtual line of the camera imaging surface in the optical axis direction, and the second line segment 22 of the preset mark is aligned with the second virtual line of the camera imaging surface in the optical axis direction. The X-axis angle stage 35 can drive the object platform 2 to rotate around the X-axis, and the Y-axis angle stage 34 can drive the object platform 2 to rotate around the Y-axis, so that the angle between the camera optical axis and the target plane is a preset angle.

[0191] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware embodiment, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0192] It should be understood that the term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.

[0193] The serial numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments. The above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A camera imaging posture adjustment method, characterized in that: The method comprises: Acquire a first image obtained by photographing a target plane with a camera, wherein a preset mark is provided on the target plane, the preset mark has a first center, and the preset mark is symmetrical about the first center in a preset direction passing through the first center; adjusting the positional relationship between the camera and the target plane according to the first image so that the first center is on the optical axis of the camera; Acquire a second image obtained by photographing the target plane by the camera, wherein the second image includes an identification image corresponding to the preset identification; Determine the tilt data between the target plane and the optical axis according to the length information of the identification image in the second image in the preset direction; The posture relationship between the camera and the target plane is adjusted according to the tilt data.

2. The camera imaging posture adjustment method according to claim 1, characterized in that: The preset mark has a first endpoint and a second endpoint opposite to each other in the preset direction, the first endpoint and the second endpoint are symmetrical about the first center, and the mark image includes a first point corresponding to the first endpoint, a second point corresponding to the second endpoint, and an image center corresponding to the first center; The determining, according to the length information of the identification image in the second image in the preset direction, the tilt data between the target plane and the optical axis comprises: The tilt data between the target plane and the optical axis is determined according to the length from the first end point to the second end point, the length from the image center to the first point, and the length from the image center to the second point.

3. The camera imaging posture adjustment method according to claim 2, characterized in that: Determining the tilt data between the target plane and the optical axis according to the length from the first endpoint to the second endpoint, the length from the image center to the first point, and the length from the image center to the second point includes: Determine a first angle between a line from the first endpoint to the first point and the optical axis, and a second angle between a line from the first endpoint to the first point and a line from the first endpoint to the second endpoint according to a length from the first endpoint to the second endpoint, a length from the image center to the first point, and a length from the image center to the second point; The tilt data between the target plane and the optical axis is determined according to the first angle and the second angle.

4. The camera imaging posture adjustment method according to claim 3, characterized in that: The determining the tilt data between the target plane and the optical axis according to the first angle and the second angle comprises: Determine the tilt data between the target plane and the camera imaging plane according to 90 degrees minus the difference between the first angle and the second angle; The tilt data between the target plane and the optical axis is determined according to the tilt data between the target plane and the camera imaging plane.

5. The camera imaging posture adjustment method according to claim 3, characterized in that: A first angle θ1 between a line connecting the first end point to the first point and the optical axis is determined according to the following formula: The second angle β1 between the line connecting the first endpoint to the first point and the line connecting the first endpoint to the second endpoint is determined according to the following formula: Wherein, L1 is the length from the first point to the center of the image, L2 is the length from the second point to the center of the image, and L3 is the length from the imaging surface to the focal plane of the camera along the optical axis direction.

6. The camera imaging posture adjustment method according to any one of claims 1 to 5, characterized in that: The adjusting the posture relationship between the camera and the target plane according to the tilt data includes: Adjusting the posture relationship between the camera and the target plane according to the tilt data so that the optical axis is perpendicular to the target plane; According to the target angle, the posture relationship between the camera and the target plane is adjusted so that the angle between the optical axis and the target plane is the target angle.

7. The camera imaging posture adjustment method according to any one of claims 1 to 5, characterized in that: The preset direction includes a first preset direction and a second preset direction, the preset mark includes a first line segment symmetrical about the first center in the first preset direction, and a second line segment symmetrical about the first center in the second preset direction, and the first preset direction and the second preset direction are perpendicular to each other; The identification image includes a third line segment corresponding to the first line segment and a fourth line segment corresponding to the second line segment; The determining, according to the length information of the identification image in the second image in the preset direction, the tilt data between the target plane and the optical axis comprises: Determine, according to the length information of the third line segment, a first direction tilt angle between the target plane and the optical axis, wherein the first direction tilt angle is a tilt angle corresponding to the second preset direction; Determine, according to the length information of the fourth line segment, a second direction tilt angle between the target plane and the optical axis, wherein the second direction tilt angle is a tilt angle corresponding to the first preset direction; The adjusting the posture relationship between the camera and the target plane according to the tilt data includes: The posture relationship between the camera and the target plane is adjusted according to the first direction tilt angle and the second direction tilt angle.

8. The camera imaging posture adjustment method according to claim 7, characterized in that: The preset angle includes a first direction target angle and / or a second direction target angle. The adjusting the posture relationship between the camera and the target plane according to the first direction tilt angle and the second direction tilt angle includes: According to the first direction target angle, controlling the driving mechanism to drive the target plane to rotate around the second preset direction relative to the optical axis, so that the first direction inclination angle between the optical axis and the target plane is the first direction target angle; and / or According to the second direction target angle, the driving mechanism is controlled to drive the target plane to rotate relative to the first preset direction, so that the second direction inclination angle between the optical axis and the target plane is the second direction target angle.

9. An electronic device, characterized in that: The electronic device includes a processor and a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the camera imaging posture adjustment method as described in any one of claims 1 to 8 are implemented.

10. A camera imaging posture adjustment device, characterized in that: The camera imaging posture adjustment device comprises: A first image acquisition module, used for acquiring a first image obtained by photographing a target plane with a camera, wherein a preset mark is provided on the target plane, wherein the preset mark has a first center, and the preset mark is symmetrical about the first center in a preset direction passing through the first center; a first posture adjustment module, configured to adjust the positional relationship between the camera and the target plane according to the first image so that the first center is on the camera optical axis; A second image acquisition module, used for acquiring a second image obtained by photographing the target plane by the camera, wherein the second image includes an identification image corresponding to the preset identification; a data determination module, configured to determine tilt data between the target plane and the optical axis according to length information of the identification image in the second image in the preset direction; and The second posture adjustment module is used to adjust the posture relationship between the camera and the target plane according to the tilt data.

11. A testing system, characterized in that: include: camera; The object-carrying platform has a target plane, the target plane is provided with a preset mark, the preset mark has a first center, and the preset mark is symmetrical about the first center in a preset direction passing through the first center; A posture adjustment device, the posture adjustment device is connected to the object-carrying platform and / or the camera, and the posture adjustment device is used to adjust the position relationship and posture relationship between the camera and the target plane; a processor, electrically connected to the posture adjustment device and the camera; The processor is used to implement the steps of the camera imaging posture adjustment method as described in any one of claims 1 to 8.