Projector calibration system, calibration method, device, equipment and storage medium
By using a turntable and industrial camera, the projector calibration system solves the problems of high projector calibration cost and difficulty in deployment, and achieves low-cost and high-efficiency projector calibration. Only four points of data are needed to complete internal and external parameters. Calibration.
Patent Information
- Application Number
- CN202310457245.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-24
- Publication Date
- 2024-10-25
AI Technical Summary
Existing projector calibration solutions require a variety of equipment, making deployment difficult and costly. In particular, the robotic arms are expensive, making it difficult to achieve calibration with low cost and high deployment efficiency.
A projector calibration system including a turntable, industrial camera and calibration plate is used to collect data at different points through the turntable, and use the camera and inertial measurement unit to calculate the internal and external parameters of the projector to achieve the calibration of the projector.
It reduces calibration costs and improves deployment efficiency. Only four points of information are needed to complete internal and external parameter calibration, which is more efficient and economical than existing solutions.
Smart Images

Figure CN118840429A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of calibration technology, and in particular to a projector calibration system, calibration method, device, equipment and storage medium. Background Art
[0002] As people's living standards improve, they have higher requirements for the ease of use of projectors. Therefore, projectors with functions such as keystone correction, automatic obstacle avoidance, and automatic screen entry have gradually entered people's lives. In order to achieve the above functions, in addition to the optical machine, the projector must also have sensors such as cameras and inertial measurement units (IMUs) to effectively capture wall and gravity information, so as to automatically complete the above functions using algorithms. The algorithm consists of two parts, one is used to calibrate the internal and external parameters between the sensor and the optical machine, and the other is the functional algorithm. In order to achieve the function, the internal and external parameters between the sensor and the optical machine need to be calibrated in advance. However, the current calibration solution requires a lot of equipment, which makes deployment difficult, and requires a robotic arm, which is expensive. Summary of the invention
[0003] In view of the above technical problems, the purpose of the present application is to provide a projector calibration system with low cost and high deployment efficiency, and a projector calibration method with low cost and high calibration efficiency.
[0004] An embodiment of the present invention provides a projector calibration system, which includes a turntable, a first camera, a screen, and a calibration plate. The first camera is arranged opposite to the screen, and the turntable is used to support and drive the projector to rotate.
[0005] Furthermore, the first camera is an industrial camera.
[0006] Furthermore, the turntable is a two-axis turntable.
[0007] In a second aspect, an embodiment of the present invention provides a projector calibration method, which is calibrated using any of the projector calibration systems described above, wherein the projector includes an optical machine, a projector camera, and an inertial measurement unit, and the method includes:
[0008] Calibrate the screen plane to obtain the plane equation of the screen plane in the first camera coordinate system; wherein the screen plane is the plane where the screen is located;
[0009] Controlling the turntable to rotate to different points in sequence, and collecting corresponding calibration data at each point; wherein the number of the points is greater than or equal to four;
[0010] The projector is calibrated using the plane equation and the calibration data.
[0011] Furthermore, the step of calibrating the screen plane and obtaining the plane equation of the screen plane in the first camera coordinate system includes:
[0012] Acquire an image captured by the first camera of a calibration plate on the screen plane; wherein the calibration plate is placed close to the screen plane;
[0013] Using a calibration plate corner point detection tool to detect two-dimensional information of the calibration plate corner points in the image;
[0014] Acquiring pre-stored three-dimensional information of the corner points of the calibration plate;
[0015] The plane equation of the screen plane in the first camera coordinate system is calculated using the two-dimensional information of the corner point and the three-dimensional information of the corner point.
[0016] Furthermore, the step of controlling the turntable to rotate to different positions in sequence and collecting corresponding calibration data at each position includes:
[0017] Controlling the turntable to rotate to a specified first point position so that the projector faces the calibration plate; wherein the calibration plate can be placed at any position;
[0018] When the turntable rotates to the first point, the data of the inertial measurement unit is collected and the projector camera photographs the calibration plate to obtain an image;
[0019] Controlling the turntable to rotate to a position facing the screen, so that the projector faces the screen;
[0020] Taking the position of the turntable facing the screen as a reference position, control the turntable to rotate to the designated 2nd to Nth points in sequence, and project the designated calibration plate image onto the screen through the optical machine at each of the 2nd to Nth points, and control the first camera and the projector camera to simultaneously shoot the calibration plate projected onto the screen to obtain corresponding first images and second images; wherein N is greater than or equal to 4.
[0021] Further, the calibrating the projector using the plane equation and the calibration data includes:
[0022] Calculating the external parameters of the inertial measurement unit and the projector camera using the data of the inertial measurement unit collected at the first point and the image obtained by photographing the calibration plate by the projector camera;
[0023] The plane equation and the first image and the second image collected at the 2nd to Nth points are used to calculate the intrinsic parameters of the projector camera, the intrinsic parameters of the optical machine, and the extrinsic parameters between the projector camera and the optical machine.
[0024] Furthermore, the step of calculating the intrinsic parameters of the projector camera, the intrinsic parameters of the optical machine, and the extrinsic parameters between the projector camera and the optical machine by using the plane equation and the first image and the second image collected at the second to Nth points includes:
[0025] Identifying two-dimensional information of corner points of a calibration plate in the first image;
[0026] Calculating the three-dimensional information of the corner points of the calibration plate projected onto the screen using the two-dimensional information of the corner points of the calibration plate in the first image and the plane equation;
[0027] Identifying two-dimensional information of corner points of the calibration plate in the second image;
[0028] Identify two-dimensional information of corner points of the calibration plate in the designated calibration plate image;
[0029] The intrinsic parameters of the projector camera, the intrinsic parameters of the optical machine and the extrinsic parameters between the projector camera and the optical machine are calculated using the three-dimensional information of the corner points of the calibration plate projected onto the screen at the second to Nth points, the two-dimensional information of the corner points of the calibration plate in the corresponding second image, and the two-dimensional information of the corner points of the calibration plate in the corresponding designated calibration plate image.
[0030] Furthermore, the method of calculating the intrinsic parameters of the projector camera, the intrinsic parameters of the optical machine, and the extrinsic parameters between the projector camera and the optical machine by using the three-dimensional information of the corner points of the calibration plate projected on the screen at the second to Nth points, the two-dimensional information of the corner points of the calibration plate in the corresponding second image, and the two-dimensional information of the corner points of the calibration plate in the corresponding designated calibration plate image includes:
[0031] Using the objective function:
[0032]
[0033] Calculate the internal parameters of the projector camera, the internal parameters of the optical machine, and the external parameters between the projector camera and the optical machine; wherein, K cam is the internal parameter of the projector camera, K proj is the internal parameter of the optical machine, and is the external parameter between the projector camera and the optical machine, p ij is the 3D information of the jth corner point on the calibration plate projected onto the screen at the i-th point, z cij and z pijThey are respectively the two-dimensional information of the corner points of the calibration plate in the corresponding second image and the two-dimensional information of the corner points of the calibration plate in the designated calibration plate image, m represents the number of points, and n represents the number of corner points.
[0034] Furthermore, after the step of calibrating the projector using the plane equation and the calibration data, the method further includes:
[0035] Controlling the turntable to rotate so that the projector faces the calibration plate; wherein the calibration plate is closely attached to the screen;
[0036] When the projector faces the calibration plate, capturing a projector camera image;
[0037] Identify two-dimensional information of corner points of the calibration plate on the projector camera image;
[0038] The position and posture of the calibration plate relative to the projector camera are calculated using the three-dimensional information of the corner points of the calibration plate and the two-dimensional information of the corner points of the calibration plate on the projector camera image;
[0039] Calculate the position of the projection point, and project the three-dimensional information of the corner points of the calibration plate onto the optical-mechanical image plane;
[0040] Generate a corresponding bright spot according to the position of the projection point;
[0041] The bright spot is back-projected onto the calibration plate through an optical machine.
[0042] Furthermore, the step of calculating the position of the projection point includes:
[0043] The position of the projection point is calculated according to the intrinsic parameters of the optical machine, the posture of the calibration plate relative to the projector camera, the extrinsic parameters between the projector camera and the optical machine, and the three-dimensional coordinates of the corner points of the calibration plate.
[0044] In a third aspect, an embodiment of the present invention provides a projector calibration device, which is calibrated using any of the projector calibration systems described above, and the device includes:
[0045] A curtain calibration module, used to calibrate the curtain plane and obtain the plane equation of the curtain plane in the first camera coordinate system; wherein the curtain plane is the plane where the curtain is located;
[0046] A control module, used to control the turntable to rotate to different points in sequence and collect corresponding calibration data at each point; wherein the number of the points is greater than or equal to four;
[0047] A projector calibration module is used to calibrate the projector using the plane equation and the calibration data.
[0048] In a third aspect, an embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any of the methods described above are implemented.
[0049] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any of the methods described above.
[0050] Beneficial effects of the present invention:
[0051] The projector calibration system provided by the embodiment of the present invention includes a turntable, a first camera, a screen and a calibration plate. It can be seen that the embodiment of the present invention has less equipment and is more efficient than the current calibration scheme. In addition, since the embodiment of the present invention does not use a mechanical arm but a turntable, the turntable has a lower manufacturing cost than the mechanical arm, so the cost of the embodiment of the present invention is lower than that of the target calibration scheme.
[0052] The projector calibration method provided by the embodiment of the present invention only needs to collect information of four points to calibrate the required internal and external parameter information. Therefore, compared with the existing calibration scheme that needs to collect information of nine points to calibrate the required internal and external parameter information, the calibration efficiency is higher. In addition, since the cost of the calibration system adopted by the embodiment of the present invention is lower than that of the existing calibration scheme, the calibration method of the embodiment of the present invention is low in cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the implementation manner will be briefly introduced below. Obviously, the drawings described below are only some implementation manners of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0054] Figure 1 is a schematic diagram of the layout of a projector calibration system provided in an embodiment of the present application;
[0055] Figure 2 is a flow chart of a projector calibration method provided in an embodiment of the present application;
[0056] Figure 3 It is a schematic diagram of the back projection of the light spot onto the physical calibration plate;
[0057] Figure 4 is a structural schematic diagram of a projector calibration device provided in an embodiment of the application;
[0058] Figure 5 It is a schematic block diagram of the structure of a computer device provided in an embodiment of the present application.
[0059] Reference numerals: projector 1 , turntable 2 , first camera 3 , screen 4 , calibration plate 5 , wall 6 . DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0061] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "above", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of features, integers, steps, operations, elements, modules, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, modules, components, and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may also be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any module and all combinations of one or more associated listed items.
[0062] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.
[0063] Embodiment 1:
[0064] An embodiment of the present invention provides a projector calibration system, which includes: a turntable 2, a first camera 2, a screen 4 and a calibration plate 5, wherein the first camera 3 is arranged opposite to the screen 4, and the turntable 2 is used to support and drive the projector 1 to rotate.
[0065] Schematically, the deployment of the projector calibration system is as follows Figure 1 As shown, it can be arranged indoors (calibration room), the calibration plate 5 is movable, and the calibration plate 5 can be placed at a set position according to actual needs during calibration, such as Figure 1, the calibration plate is attached to the wall 6. The turntable 2 is preferably a two-axis turntable, and the two-axis turntable can rotate in the horizontal direction and the vertical direction. The turntable can be placed / fixed on a desktop / workbench, and the turntable 2 is connected to the projector 1 through a flat plate, and the projector 1 is detachably fixed to the flat plate by a clamp. Therefore, when the turntable 2 is adjusted to a horizontal state, the projector 1 will also be adjusted to a horizontal state. Since the two-axis turntable can meet the calibration requirements and has low cost, the use of a two-axis turntable can reduce the calibration cost. The first camera 3 can be fixed at a position to be set relative to the screen 4, such as Figure 1 As shown, the first camera 3 is suspended from the ceiling. The first camera 3 can be an ordinary camera or an industrial camera, preferably an industrial camera, because the industrial camera has the characteristics of stability, high definition, and the image obtained by long-term operation is still stable and of good quality. The projector calibration system of the present invention is suitable for calibrating a projector with a camera and an inertial measurement unit. The inertial measurement unit is commonly known as an imu.
[0066] The projector calibration system provided by the embodiment of the present invention includes a turntable, a first camera, a screen and a calibration plate. It can be seen that the embodiment of the present invention has less equipment and is more efficient than the current calibration scheme. In addition, since the embodiment of the present invention does not use a mechanical arm but a turntable, the turntable has a lower manufacturing cost than the mechanical arm, so the cost of the embodiment of the present invention is lower than that of the target calibration scheme.
[0067] Embodiment 2:
[0068] Please refer to 2. The embodiment of the present invention further provides a projector calibration method, which uses the projector calibration system described above to calibrate the projector. The method includes steps S1 to S3:
[0069] S1. Calibrate the screen plane to obtain the plane equation of the screen plane in the first camera coordinate system; wherein the screen plane is the plane where the screen is located.
[0070] As shown in step S1 above, since the calibration algorithm requires the three-dimensional information of the calibration plate projected onto the screen by the optical machine, and this information needs to be determined with the help of the first camera and the screen plane information, it is necessary to calibrate the screen plane to obtain the plane equation of the screen plane in the first camera coordinate system.
[0071] S2. Control the turntable to rotate to different points in sequence, and collect corresponding calibration data at each point; wherein the number of the points is greater than or equal to four.
[0072] S3. Calibrate the projector using the plane equation and the calibration data.
[0073] The projector calibration method provided in the embodiment of the present invention is suitable for calibrating a projector with a projector camera and an inertial measurement unit, and the projector camera is a monocular camera.
[0074] It can be seen from the above steps that the embodiment of the present invention only needs to collect information from four points to calibrate the required internal and external parameter information. Therefore, compared with the existing calibration scheme that needs to collect information from nine points to calibrate the required internal and external parameter information, the calibration efficiency is higher. In addition, since the cost of the calibration system adopted by the embodiment of the present invention is lower than that of the existing calibration scheme, the calibration method of the embodiment of the present invention is low-cost.
[0075] In one embodiment, the step of calibrating the screen plane and obtaining the plane equation of the screen plane in the first camera coordinate system includes steps S11-S14:
[0076] S11. Acquire an image captured by the first camera of a calibration plate on the screen plane; wherein the calibration plate is placed close to the screen plane.
[0077] S12, using a calibration plate corner point detection tool to detect two-dimensional information of the calibration plate corner points in the image.
[0078] S13, obtaining the pre-stored three-dimensional information of the corner points of the calibration plate;
[0079] S14. Calculate the plane equation of the screen plane in the first camera coordinate system by using the two-dimensional information of the corner point and the three-dimensional information of the corner point.
[0080] As described above, to calibrate the plane of the curtain, first, a calibration plate needs to be placed only against the plane of the curtain, and then the calibration plate on the curtain is photographed by the first camera, and then the two-dimensional information of the corner points of the calibration plate in the image is detected by a calibration plate corner detection tool such as the opencv calibration plate corner detection tool. The two-dimensional information of the corner points of the calibration plate can also be understood as two-dimensional corner point information. Since the three-dimensional information of the corner points of the calibration plate is pre-stored, that is, known, the plane equation of the curtain plane in the first camera coordinate system can be solved by the PnP algorithm. Among them, the three-dimensional information of the corner points of the calibration plate can also be understood as three-dimensional corner point information. The first camera is preferably an industrial camera. It should be noted that step S12 and step S13 can be executed in parallel or in series, for example, step S12 is executed first and then step S13, or step S13 is executed first and then step S12. The embodiment of the present invention does not limit the execution order of step S12-step S13.
[0081] The embodiment of the present invention realizes the calibration of the screen plane through the above steps S11 to S14, laying a foundation for the subsequent calibration of the projector.
[0082] In one embodiment, the step of controlling the turntable to rotate to different positions in sequence and collecting corresponding calibration data at each position includes steps S21 to S24:
[0083] S21, control the turntable to rotate to a specified first point so that the projector faces the calibration plate; wherein the calibration plate can be placed at any position.
[0084] As in the above step S21, the controller controls the turntable to rotate to the first point. Since the projector is fixed on the turntable, the turntable can be used to drive the projector to rotate. The first point is the position where the projector is facing the calibration plate, and the projector is in a horizontal state. The projector can be adjusted to a horizontal state by adjusting the turntable to a horizontal state. It should be noted that when calibrating the screen plane, the calibration plate is positioned close to the screen. After completing the calibration of the screen plane, the calibration plate can be removed and placed in another position. The selection of the other position is arbitrary and can be based on Figure 1 The layout described above places the calibration plate, because Figure 1 A two-axis turntable is used, so the calibration plate is placed on Figure 1 The position shown, that is, placed on the wall perpendicular to the curtain, is convenient for engineering implementation.
[0085] S22. When the turntable rotates to the first point, the data of the inertial measurement unit is collected and the projector camera photographs the calibration plate to obtain an image.
[0086] As in the above step S22, since the external parameters of the inertial measurement unit and the projector camera need to use the data of the inertial measurement unit (imu data) and the image obtained by the projector camera shooting the calibration plate, it is necessary to collect these two data as the calibration data corresponding to the first point. The projector camera can work continuously during the calibration process. When it is detected that the turntable rotates to the first point, the image captured by the projector camera is collected. It should be noted that when laying out the position of the turntable, it is necessary to ensure that when the turntable rotates to the first point, the calibration plate can fall into the visual range of the projector camera.
[0087] S23, controlling the turntable to rotate to a position facing the screen, so that the projector faces the screen.
[0088] S24. Taking the position of the turntable facing the screen as a reference position, control the turntable to rotate to the designated 2nd to Nth points in sequence, and project the designated calibration plate image onto the screen through the optical machine at each of the 2nd to Nth points, and control the first camera and the projector camera to simultaneously shoot the calibration plate projected onto the screen to obtain corresponding first images and second images; wherein N is greater than or equal to 4.
[0089] As in the above step S24, since the calibration of the internal parameters of the projector camera, the internal parameters of the optical machine, and the external parameters between the projector camera and the optical machine requires the use of images formed by the calibration plate projected onto the screen by the optical machine at multiple different points, it is necessary to control the turntable to rotate to the designated 2nd to Nth points in sequence, and project the designated calibration plate image onto the screen through the optical machine at each point from the 2nd to the Nth point, and control the first camera and the projector camera to simultaneously shoot the calibration plate projected onto the screen as the calibration data of the 2nd to the Nth point. In the embodiment of the present invention, N is preferably equal to 6, that is, by collecting the calibration data at the 2nd to the 6th points, the requirements for calibrating the internal parameters of the projector camera, the internal parameters of the optical machine, and the external parameters between the projector camera and the optical machine can be met, and the accuracy and precision are high. In fact, N only needs to be greater than or equal to 4, that is, the internal parameters of the projector camera, the internal parameters of the optical machine, and the external parameters between the projector camera and the optical machine can be calibrated by 3 sets of calibration data at the 2nd to the 4th points. It should be noted that the existing calibration scheme requires the collection of 9 points for calibration, while the embodiment of the present invention only requires the collection of 4 points. If higher accuracy is required, only 6 points are required. Therefore, the calibration method provided by the embodiment of the present invention has higher calibration efficiency. It should also be noted that when projecting the calibration plate image onto the screen, it is necessary to ensure that the calibration plate image can completely fall into the screen.
[0090] As a specific embodiment of step S24, the position of the turntable facing the screen is used as a reference position, and the turn is controlled to turn to the five points of 15 degrees to the right, 15 degrees to the upper right, 15 degrees to the upper left, and 15 degrees to the left. At the second point of 15 degrees to the right, the calibration plate is projected onto the screen by the optical machine, and the first camera and the projector camera are controlled to simultaneously shoot the calibration plate projected onto the screen as the calibration data of 15 degrees to the right. At the third point of 15 degrees to the upper right, the calibration plate is projected onto the screen by the optical machine, and the first camera and the projector camera are controlled to simultaneously shoot the calibration plate projected onto the screen as the calibration data of 15 degrees to the upper right. In this way, the calibration data corresponding to 15 degrees to the upper left, 15 degrees to the upper left, and 15 degrees to the left can be obtained. It should be understood that the projector rotates with the turntable, so the position of the calibration plate projected onto the screen is different at different points.
[0091] In one embodiment, the calibrating the projector using the plane equation and the calibration data includes steps S31 and S32:
[0092] S31, calculating the external parameters of the inertial measurement unit and the projector camera by using the data of the inertial measurement unit collected at the first point and the image obtained by photographing the calibration plate by the projector camera;
[0093] S32, using the plane equation and the first image and the second image collected at the 2nd to Nth points, calculating the intrinsic parameters of the projector camera, the intrinsic parameters of the optical machine, and the extrinsic parameters between the projector camera and the optical machine.
[0094] As in the above step S31, after the data of the inertial measurement unit collected at the first point is taken out, the attitude of the inertial measurement unit can be calculated using the first set of formulas (1), and then the image obtained by the projector camera shooting the calibration plate at the first point is taken out and recognized, the two-dimensional information of the corner points of the calibration plate in the image is recognized, and then the three-dimensional information of the corner points of the physical calibration plate stored in advance is read, and the attitude of the projector camera is calculated using the PnP algorithm. Finally, the external parameters of the inertial measurement unit projector camera are calculated using formula (2).
[0095]
[0096] Where a is the three-axis acceleration value measured by the inertial measurement unit, I represents the unit matrix, Indicates the attitude of the inertial measurement unit (imu).
[0097]
[0098] in, represents the external parameters of the inertial measurement unit and the projector camera, represents the pose of the projector camera, Indicates the attitude of the inertial measurement unit (imu).
[0099] As in the above step S32, the first image and the second image corresponding to each point (the 2nd to the Nth) are collected. In addition, the N can be greater than or equal to 4, that is, only the data of 3 points need to be collected to realize the calibration of the internal parameters of the projector camera, the internal parameters of the optical machine, and the external parameters between the projector camera and the optical machine. Therefore, compared with the existing calibration scheme, the calibration efficiency is high.
[0100] It should be understood that the purpose of calibrating the projector is to obtain the external parameters of the inertial measurement unit and the projector camera, the internal parameters of the projector camera, the internal parameters of the optical machine, and the external parameters between the projector camera and the optical machine. That is, the calibration result of the projector includes the external parameters of the inertial measurement unit and the projector camera, the internal parameters of the projector camera, the internal parameters of the optical machine, and the external parameters between the projector camera and the optical machine.
[0101] In one embodiment, the step of calculating the intrinsic parameters of the projector camera, the intrinsic parameters of the optical machine, and the extrinsic parameters between the projector camera and the optical machine using the plane equation and the first image and the second image collected at the second to Nth points includes steps S321-S325:
[0102] S321, identifying the two-dimensional information of the corner points of the calibration plate in the first image.
[0103] It should be understood that the first image is an image obtained by the first camera taking pictures of the calibration plate projected on the screen. Therefore, by using the corner detection tool to perform corner detection on the first image, two-dimensional information of the corner points of the calibration plate in the first image can be obtained. The two-dimensional information includes the two-dimensional coordinates of the corner points of the calibration plate.
[0104] S322: Calculate the three-dimensional information of the corner points of the calibration plate projected onto the screen by using the two-dimensional information of the corner points of the calibration plate in the first image and the plane equation.
[0105] Assuming that the first camera captures the coordinates of the corner point of the calibration plate projected onto the screen as (u, ν), according to the equation:
[0106] [x n ,y n ,1] T =K -1 工业相机 [u,ν,1] T
[0107] Get the coordinates of the corner point on the normalized plane (x n ,y n ). Assuming the first camera coordinate system as the reference coordinate system, the equation of the straight line passing through the origin and the normalized corner pixel coordinates can be obtained as:
[0108]
[0109] Assume that the plane equation obtained by the curtain plane calibration process is:
[0110] Ax+By+Cz+1=0
[0111] By combining the straight line equations and the plane equations to construct a system of equations, the three-dimensional information of the corner points of the calibration plate projected on the screen can be obtained.
[0112] The above method can be used to calculate the three-dimensional information of the corner points of the calibration plate projected on the screen corresponding to each point (the 2nd to the Nth).
[0113] S323, identifying the two-dimensional information of the corner points of the calibration plate in the second image.
[0114] It should be understood that the second image is an image obtained by the projector camera taking pictures of the calibration plate projected on the screen. Therefore, the corner point detection tool is used to perform corner point detection on the second image to obtain two-dimensional information of the corner points of the calibration plate in the second image. The two-dimensional information includes the coordinates of the corner points of the calibration plate.
[0115] S324: Identify two-dimensional information of corner points of the calibration plate in the designated calibration plate image.
[0116] It should be understood that the designated calibration plate image is an optical machine image, that is, an image that needs optical machine projection. The designated calibration plate image is subjected to corner point detection using a corner point detection tool to obtain two-dimensional information of the calibration plate corner points in the designated calibration plate image.
[0117] S325. Calculate the intrinsic parameters of the projector camera, the intrinsic parameters of the optical machine, and the extrinsic parameters between the projector camera and the optical machine by using the three-dimensional information of the corner points of the calibration plate projected onto the screen from the second to the Nth points, the two-dimensional information of the corner points of the calibration plate in the corresponding second image, and the two-dimensional information of the corner points of the calibration plate in the corresponding designated calibration plate image.
[0118] In the embodiment of the present invention, if N is greater than or equal to 4, it can be seen from steps S321 to S325 that it is only necessary to collect data at 3 points to calibrate the internal parameters of the projector camera, the internal parameters of the optical machine, and the external parameters between the projector camera and the optical machine. Therefore, the calibration method of the embodiment of the present invention has higher calibration efficiency than the existing calibration scheme.
[0119] Under normal circumstances, only three sets of data are needed to calculate the internal and external parameters of the optical machine and the projector camera. To improve the accuracy, more than three sets of data need to be collected. In this case, the collected data is redundant. To address this situation, the following embodiment of the present invention provides an optimization objective function to obtain higher accuracy results.
[0120] In one embodiment, the three-dimensional information of the corner points of the calibration plate projected on the screen collected at the second to Nth points, the two-dimensional information of the corner points of the calibration plate in the corresponding second image, and the two-dimensional information of the corner points of the calibration plate in the corresponding designated calibration plate image are used to calculate the intrinsic parameters of the projector camera, the intrinsic parameters of the optical machine, and the extrinsic parameters between the projector camera and the optical machine, including:
[0121] Using the objective function:
[0122] Calculate the internal parameters of the projector camera, the internal parameters of the optical machine, and the external parameters between the projector camera and the optical machine; wherein, K cam is the internal parameter of the projector camera, K proj is the internal parameter of the optical machine, and is the external parameter between the projector camera and the optical machine, p ij is the 3D information of the jth corner point on the calibration plate projected onto the screen at the i-th point, z cij and z pij They are respectively the two-dimensional information of the corner points of the calibration plate in the corresponding second image and the two-dimensional information of the corner points of the calibration plate in the designated calibration plate image, m represents the number of points, and n represents the number of corner points.
[0123] It should be noted that although the value range of i in the objective function is [0, m], it does not mean that when i=1, it corresponds to the first point described in step S21 of the embodiment of the present invention. In fact, the 2nd to Nth points of the embodiment of the present invention correspond to i=[0, m].
[0124] In order to verify the calibration results, the following embodiment of the present invention also provides a feasible method for verifying the calibration results.
[0125] In one embodiment, after the step of calibrating the projector using the plane equation and the calibration data, the method further includes:
[0126] S41, controlling the turntable to rotate so that the projector faces the calibration plate; wherein the calibration plate is closely attached to the screen.
[0127] S42, when the projector faces the calibration plate, capturing a projector camera image;
[0128] S43, identifying the two-dimensional information of the corner points of the calibration plate on the projector camera image;
[0129] S44, calculating the position and posture of the calibration plate relative to the projector camera by using the three-dimensional information of the corner points of the calibration plate and the two-dimensional information of the corner points of the calibration plate on the projector camera image;
[0130] S45, calculating the position of the projection point, and projecting the three-dimensional information of the corner points of the calibration plate onto the optical-mechanical image plane;
[0131] S46, generating a corresponding bright spot according to the position of the projection point;
[0132] S47, back-projecting the bright spot onto the calibration plate through an optical machine.
[0133] As in the above steps S41-S47, in order to verify the calibration results, first, a calibration plate needs to be placed close to the screen, and the projector is directed toward the calibration plate. Then, the projector camera image is captured, and then the three-dimensional information of the corner points of the calibration plate and the two-dimensional information of the corner points of the calibration plate on the projector camera image are used to obtain the position and posture of the calibration plate relative to the projector camera using the PnP algorithm, so that the coordinates of the three-dimensional corner points of the calibration plate in the projector camera coordinate system can be known. Then, the position of the projection point is calculated according to the calibration result, and the three-dimensional information of the corner points of the calibration plate is projected onto the optical machine image plane. According to the position of the projection point, a corresponding bright spot is generated, and the bright spot is back-projected onto the calibration plate through the optical machine, as shown in FIG. Figure 3 As shown in Figure 3, if the bright spot can be effectively projected onto the corresponding corner point of the calibration plate, it means that the calibration result is valid.
[0134] The calibration results are verified through the above steps S41-S47. Since the accuracy and precision of the calibration results can be verified by observing the overlap between the bright spot and the corner point of the calibration plate, this verification method can intuitively show whether the calibration results are valid.
[0135] In one embodiment, the step of calculating the position of the projection point includes:
[0136] The position of the projection point is calculated according to the intrinsic parameters of the optical machine, the posture of the calibration plate relative to the projector camera, the extrinsic parameters between the projector camera and the optical machine, and the three-dimensional coordinates of the corner points on the calibration plate.
[0137] Specifically, the position of the projection point is calculated according to the following formula.
[0138]
[0139] Among them, z proj represents the position of the projection point, and represents the position of the calibration plate relative to the projector camera, p w represents the coordinates of the three-dimensional corner points on the calibration plate, K proj is the internal parameter of the optical machine, and It is the external parameter between the projector camera and the optical machine.
[0140] Embodiment three:
[0141] See also Figure 4 The embodiment of the present invention provides a projector calibration device, which is calibrated using any of the projector calibration systems described above, and the device includes:
[0142] The curtain calibration module 101 is used to calibrate the curtain plane and obtain the plane equation of the curtain plane in the first camera coordinate system; wherein the curtain plane is the plane where the curtain is located;
[0143] The first control module 102 is used to control the turntable to rotate to different points in sequence and collect corresponding calibration data at each point; wherein the number of the points is greater than or equal to four;
[0144] The projector calibration module 103 is used to calibrate the projector using the plane equation and the calibration data.
[0145] Furthermore, the curtain calibration module 101 includes:
[0146] A first acquisition unit is used to acquire an image obtained by the first camera photographing a calibration plate on the screen plane; wherein the calibration plate is placed close to the screen plane;
[0147] A detection unit, used to detect two-dimensional information of corner points of the calibration plate in the image using a calibration plate corner point detection tool;
[0148] A second acquisition unit, used to acquire pre-stored three-dimensional information of the corner points of the calibration plate;
[0149] The first calculation unit is used to calculate the plane equation of the screen plane in the first camera coordinate system by using the two-dimensional information of the corner point and the three-dimensional information of the corner point.
[0150] The first control module 102 includes:
[0151] A first control unit, used for controlling the turntable to rotate to a specified first point position so that the projector faces the calibration plate; wherein the calibration plate can be placed at any position;
[0152] A collection unit, used for collecting data of the inertial measurement unit and an image obtained by photographing the calibration plate by the projector camera when the turntable rotates to the first point;
[0153] A second control unit is used to control the turntable to rotate to a position facing the screen, so that the projector faces the screen;
[0154] The third control unit is used to control the turntable to rotate to the designated 2nd to Nth points in sequence, taking the position of the turntable facing the screen as a reference position, and projecting the designated calibration plate image onto the screen through the optical machine at each of the 2nd to Nth points, and controlling the first camera and the projector camera to simultaneously shoot the calibration plate projected onto the screen to obtain corresponding first images and second images; wherein N is greater than or equal to 4.
[0155] The projector calibration module 103 includes:
[0156] A second calculation unit is used to calculate the external parameters of the inertial measurement unit and the projector camera by using the data of the inertial measurement unit collected at the first point and the image obtained by the projector camera shooting the calibration plate;
[0157] The third calculation unit is used to calculate the intrinsic parameters of the projector camera, the intrinsic parameters of the optical machine and the extrinsic parameters between the projector camera and the optical machine by using the plane equation and the first image and the second image collected at the 2nd to Nth points.
[0158] The third computing unit comprises:
[0159] A first recognition subunit, used to recognize two-dimensional information of corner points of a calibration plate in the first image;
[0160] A first calculation subunit, configured to calculate three-dimensional information of the corner points of the calibration plate projected onto the screen by using the two-dimensional information of the corner points of the calibration plate in the first image and the plane equation;
[0161] A second recognition subunit, used to recognize two-dimensional information of corner points of the calibration plate in the second image;
[0162] A third recognition subunit, used to recognize two-dimensional information of corner points of the calibration plate in the designated calibration plate image;
[0163] The second calculation subunit is used to calculate the intrinsic parameters of the projector camera, the internal parameters of the optical machine and the external parameters between the projector camera and the optical machine by using the three-dimensional information of the corner points of the calibration plate projected on the screen at the second to Nth points, the two-dimensional information of the corner points of the calibration plate in the corresponding second image, and the two-dimensional information of the corner points of the calibration plate in the corresponding designated calibration plate image.
[0164] Furthermore, the method of calculating the intrinsic parameters of the projector camera, the intrinsic parameters of the optical machine, and the extrinsic parameters between the projector camera and the optical machine by using the three-dimensional information of the corner points of the calibration plate projected on the screen at the second to Nth points, the two-dimensional information of the corner points of the calibration plate in the corresponding second image, and the two-dimensional information of the corner points of the calibration plate in the corresponding designated calibration plate image includes:
[0165] Using the objective function:
[0166]
[0167] Calculate the internal parameters of the projector camera, the internal parameters of the optical machine, and the external parameters between the projector camera and the optical machine; wherein, K cam is the internal parameter of the projector camera, K proj is the internal parameter of the optical machine, and is the external parameter between the projector camera and the optical machine, p ij is the 3D information of the jth corner point on the calibration plate projected onto the screen at the i-th point, z cij and z pij They are respectively the two-dimensional information of the corner points of the calibration plate in the corresponding second image and the two-dimensional information of the corner points of the calibration plate in the designated calibration plate image, m represents the number of points, and n represents the number of corner points.
[0168] The projector calibration device further includes:
[0169] A second control module is used to control the rotation of the turntable so that the projector faces the calibration plate; wherein the calibration plate is closely attached to the screen;
[0170] A capture module, used for capturing a projector camera image when the projector faces the calibration plate;
[0171] A recognition module, used to recognize two-dimensional information of corner points of the calibration plate on the projector camera image;
[0172] A posture calculation module, used to calculate the posture of the calibration plate relative to the projector camera using the three-dimensional information of the corner points of the calibration plate and the two-dimensional information of the corner points of the calibration plate on the projector camera image;
[0173] A projection point calculation module, used to calculate the position of the projection point and project the three-dimensional information of the corner points of the calibration plate onto the optical-mechanical image plane;
[0174] A bright spot generating module, used to generate a corresponding bright spot according to the position of the projection point;
[0175] The back-projection module is used to back-project the bright spot onto the calibration plate through an optical machine.
[0176] The projection point calculation module is specifically used to calculate the position of the projection point based on the internal parameters of the optical machine, the position of the calibration plate relative to the projector camera, the external parameters between the projector camera and the optical machine, and the three-dimensional coordinates of the corner points of the calibration plate.
[0177] The projector calibration device provided in the embodiment of the present invention corresponds one-to-one to the projector calibration system described in the first embodiment, and therefore, the embodiment of the present invention will not be described in detail.
[0178] Embodiment 4:
[0179] Reference Figure 5 The present application also provides a computer device, the internal structure of which can be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor designed by the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating device, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as a projector calibration method. The network interface of the computer device is used to communicate with an external terminal through a network connection. Further, the above-mentioned computer device can also be provided with an input device and a display screen. When the above-mentioned computer program is executed by the processor, a projector calibration method is implemented. A projector calibration method includes the following steps: calibrating the screen plane to obtain the plane equation of the screen plane in the first camera coordinate system; wherein the screen plane is the plane where the screen is located; controlling the turntable to rotate to different points in turn, and collecting corresponding calibration data at each of the points; wherein the number of the points is greater than or equal to four; calibrating the projector using the plane equation and the calibration data. Those skilled in the art will understand that Figure 5 The structure shown in is merely a block diagram of a portion of the structure related to the present application solution and does not constitute a limitation on the computer device to which the present application solution is applied.
[0180] Embodiment five:
[0181] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, a projector calibration method is implemented. A projector calibration method includes the following steps: calibrating the screen plane to obtain the plane equation of the screen plane in the first camera coordinate system; wherein the screen plane is the plane where the screen is located; controlling the turntable to rotate to different points in sequence, and collecting corresponding calibration data at each of the points; wherein the number of the points is greater than or equal to four; calibrating the projector using the plane equation and the calibration data. A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in the present application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchl ink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0182] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.
[0183] The above description is only a preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A projector calibration system, It is characterized in that The calibration system includes: a turntable, a first camera, a screen and a calibration plate. The first camera is arranged opposite to the screen. The turntable is used to support and drive the projector to rotate.
2. The projector calibration system according to claim 1, It is characterized in that The first camera is an industrial camera.
3. The projector calibration system according to claim 1, It is characterized in that The turntable is a two-axis turntable.
4. A projector calibration method, It is characterized in that Calibration is performed using the projector calibration system according to any one of claims 1 to 3, the projector comprising an optical machine, a projector camera and an inertial measurement unit, and the method comprises: Calibrate the screen plane to obtain the plane equation of the screen plane in the first camera coordinate system; wherein the screen plane is the plane where the screen is located; Controlling the turntable to rotate to different points in sequence, and collecting corresponding calibration data at each point; wherein the number of the points is greater than or equal to four; The projector is calibrated using the plane equation and the calibration data.
5. The projector calibration method according to claim 4, It is characterized in that The step of calibrating the screen plane and obtaining the plane equation of the screen plane in the first camera coordinate system includes: Acquire an image captured by the first camera of a calibration plate on the screen plane; wherein the calibration plate is placed close to the screen plane; Using a calibration plate corner point detection tool to detect two-dimensional information of the calibration plate corner points in the image; Acquiring pre-stored three-dimensional information of the corner points of the calibration plate; The plane equation of the screen plane in the first camera coordinate system is calculated using the two-dimensional information of the corner point and the three-dimensional information of the corner point.
6. The projector calibration method according to claim 5, It is characterized in that The step of controlling the turntable to rotate to different positions in sequence and collecting corresponding calibration data at each position comprises: Controlling the turntable to rotate to a specified first point position so that the projector faces the calibration plate; wherein the calibration plate can be placed at any position; When the turntable rotates to the first point, the data of the inertial measurement unit is collected and the projector camera photographs the calibration plate to obtain an image; Controlling the turntable to rotate to a position facing the screen, so that the projector faces the screen; Taking the position of the turntable facing the screen as a reference position, control the turntable to rotate to the designated 2nd to Nth points in sequence, and project the designated calibration plate image onto the screen through the optical machine at each of the 2nd to Nth points, and control the first camera and the projector camera to simultaneously shoot the calibration plate projected onto the screen to obtain corresponding first images and second images; wherein N is greater than or equal to 4.
7. The projector calibration method according to claim 6, It is characterized in that The calibrating the projector by using the plane equation and the calibration data includes: Calculating the external parameters of the inertial measurement unit and the projector camera using the data of the inertial measurement unit collected at the first point and the image obtained by photographing the calibration plate by the projector camera; The plane equation and the first image and the second image collected at the 2nd to Nth points are used to calculate the intrinsic parameters of the projector camera, the intrinsic parameters of the optical machine, and the extrinsic parameters between the projector camera and the optical machine.
8. The projector calibration method according to claim 7, It is characterized in that The step of calculating the intrinsic parameters of the projector camera, the intrinsic parameters of the optical machine, and the extrinsic parameters between the projector camera and the optical machine by using the plane equation and the first image and the second image collected at the second to Nth points comprises: Identifying two-dimensional information of corner points of a calibration plate in the first image; Calculating the three-dimensional information of the corner points of the calibration plate projected onto the screen using the two-dimensional information of the corner points of the calibration plate in the first image and the plane equation; Identifying two-dimensional information of corner points of the calibration plate in the second image; Identify two-dimensional information of corner points of the calibration plate in the designated calibration plate image; The intrinsic parameters of the projector camera, the intrinsic parameters of the optical machine and the extrinsic parameters between the projector camera and the optical machine are calculated using the three-dimensional information of the corner points of the calibration plate projected onto the screen at the second to Nth points, the two-dimensional information of the corner points of the calibration plate in the corresponding second image, and the two-dimensional information of the corner points of the calibration plate in the corresponding designated calibration plate image.
9. The camera calibration method according to claim 8, It is characterized in that The method calculates the internal parameters of the projector camera, the internal parameters of the optical machine, and the external parameters between the projector camera and the optical machine by using the three-dimensional information of the corner points of the calibration plate projected on the screen at the second to Nth points, the two-dimensional information of the corner points of the calibration plate in the corresponding second image, and the two-dimensional information of the corner points of the calibration plate in the corresponding designated calibration plate image, including: Using the objective function: Calculate the internal parameters of the projector camera, the internal parameters of the optical machine, and the external parameters between the projector camera and the optical machine; wherein, K cam is the internal parameter of the projector camera, K proj is the internal parameter of the optical machine, and is the external parameter between the projector camera and the optical machine, p ij is the 3D information of the jth corner point on the calibration plate projected onto the screen at the i-th point, z cij and z pij They are respectively the two-dimensional information of the corner points of the calibration plate in the corresponding second image and the two-dimensional information of the corner points of the calibration plate in the designated calibration plate image, m represents the number of points, and n represents the number of corner points.
10. The projector calibration method according to claim 5, It is characterized in that After the step of calibrating the projector using the plane equation and the calibration data, the method further includes: Controlling the turntable to rotate so that the projector faces the calibration plate; wherein the calibration plate is closely attached to the screen; When the projector faces the calibration plate, capturing a projector camera image; Identify two-dimensional information of corner points of the calibration plate on the projector camera image; The position and posture of the calibration plate relative to the projector camera are calculated using the three-dimensional information of the corner points of the calibration plate and the two-dimensional information of the corner points of the calibration plate on the projector camera image; Calculate the position of the projection point, and project the three-dimensional information of the corner points of the calibration plate onto the optical-mechanical image plane; Generate a corresponding bright spot according to the position of the projection point; The bright spot is back-projected onto the calibration plate through an optical machine.
11. The projector calibration method according to claim 10, It is characterized in that The step of calculating the position of the projection point comprises: The position of the projection point is calculated according to the intrinsic parameters of the optical machine, the posture of the calibration plate relative to the projector camera, the extrinsic parameters between the projector camera and the optical machine, and the three-dimensional coordinates of the corner points of the calibration plate.
12. A projector calibration device, It is characterized in that Calibration is performed using the projector calibration system according to any one of claims 1 to 3, the device comprising: A curtain calibration module, used to calibrate the curtain plane and obtain the plane equation of the curtain plane in the first camera coordinate system; wherein the curtain plane is the plane where the curtain is located; A control module, used to control the turntable to rotate to different points in sequence, and collect corresponding calibration data at each point; wherein the number of the points is greater than or equal to four; A projector calibration module is used to calibrate the projector using the plane equation and the calibration data.
13. A computer device comprising a memory and a processor, wherein a computer program is stored in the memory. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 4 to 11 are implemented.
14. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 4 to 11 are implemented.
Citation Information
Patent Citations
Keystone correction method and device, projector and computer readable storage medium
CN113824942A
