CN113824942A - Trapezoidal correction method, trapezoidal correction device, projector and computer readable storage medium - Google Patents
Trapezoidal correction method, trapezoidal correction device, projector and computer readable storage medium Download PDFInfo
- Publication number
- CN113824942A CN113824942A CN202111242419.4A CN202111242419A CN113824942A CN 113824942 A CN113824942 A CN 113824942A CN 202111242419 A CN202111242419 A CN 202111242419A CN 113824942 A CN113824942 A CN 113824942A
- Authority
- CN
- China
- Prior art keywords
- projector
- plane
- projection
- posture
- calculating
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000012937 correction Methods 0.000 title claims abstract description 74
- 238000000034 method Methods 0.000 title claims abstract description 54
- 230000008859 change Effects 0.000 claims abstract description 24
- 239000013598 vector Substances 0.000 claims description 108
- 230000005484 gravity Effects 0.000 claims description 35
- 239000011159 matrix material Substances 0.000 claims description 22
- 238000004590 computer program Methods 0.000 claims description 20
- 230000009466 transformation Effects 0.000 claims description 18
- 238000005259 measurement Methods 0.000 claims description 10
- 238000004364 calculation method Methods 0.000 claims description 9
- 230000008569 process Effects 0.000 description 12
- 238000010586 diagram Methods 0.000 description 11
- 239000000306 component Substances 0.000 description 8
- 230000006870 function Effects 0.000 description 8
- 230000001133 acceleration Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 239000008358 core component Substances 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000006073 displacement reaction Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000006798 recombination Effects 0.000 description 1
- 238000005215 recombination Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 230000001131 transforming effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N9/00—Details of colour television systems
- H04N9/12—Picture reproducers
- H04N9/31—Projection devices for colour picture display, e.g. using electronic spatial light modulators [ESLM]
- H04N9/3179—Video signal processing therefor
- H04N9/3185—Geometric adjustment, e.g. keystone or convergence
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N9/00—Details of colour television systems
- H04N9/12—Picture reproducers
- H04N9/31—Projection devices for colour picture display, e.g. using electronic spatial light modulators [ESLM]
- H04N9/3191—Testing thereof
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- Geometry (AREA)
- Transforming Electric Information Into Light Information (AREA)
- Projection Apparatus (AREA)
Abstract
The application is applicable to the technical field of projectors, and provides a trapezoidal correction method, a trapezoidal correction device, a projector and a computer-readable storage medium, wherein the trapezoidal correction method, the trapezoidal correction device, the projector and the computer-readable storage medium are applied to the projector, the projector comprises an inertial sensor, and the method comprises the following steps: obtaining calibration parameters calibrated in advance, wherein the calibration parameters comprise the calibration posture of the projector; when the change of the posture of the projector is monitored through the inertial sensor, calculating a plane inclination angle between a first projection plane and a second projection plane, wherein the first projection plane is a projection plane after the change of the posture of the projector, and the second projection plane is a projection plane before the change of the posture of the projector; determining an attitude inclination angle of the projector according to the plane inclination angle; and performing trapezoidal correction according to the calibration posture and the posture inclination angle of the projector. By the method, the trapezoidal correction accuracy can be effectively improved.
Description
Technical Field
The present application belongs to the field of projector technologies, and in particular, to a trapezoidal correction method and apparatus, a projector, and a computer-readable storage medium.
Background
During use of the projector, the following often occurs: due to the change of the placement position of the projector or the change of the projection environment, the position of the projector is not perpendicular to the projection screen, so that the trapezoidal distortion of a projection picture is generated, the projection picture is distorted, and the user experience is influenced. Therefore, the trapezoidal correction function of the projector is particularly important.
The existing keystone correction method usually needs to project a specific pattern onto a projection screen, acquire a projection picture of the specific pattern through a camera on a projector, and then perform keystone correction according to the projection picture. When the distance between the optical machine and the camera on the projector is short or light interference exists, the camera cannot acquire an accurate projection picture of a specific graph, and the trapezoidal correction effect is poor.
Disclosure of Invention
The embodiment of the application provides a trapezoidal correction method and device, a projector and a computer readable storage medium, which can effectively improve the trapezoidal correction accuracy.
In a first aspect, an embodiment of the present application provides a keystone correction method, which is applied to a projector including an inertial sensor, and the method includes:
obtaining calibration parameters calibrated in advance, wherein the calibration parameters comprise the calibration posture of the projector;
when the change of the posture of the projector is monitored through the inertial sensor, calculating a plane inclination angle between a first projection plane and a second projection plane, wherein the first projection plane is a projection plane after the change of the posture of the projector, and the second projection plane is a projection plane before the change of the posture of the projector;
determining an attitude inclination angle of the projector according to the plane inclination angle;
and performing trapezoidal correction according to the calibration posture and the posture inclination angle of the projector.
In the embodiment of the application, the posture change of the projector is monitored through the inertial sensor, when the posture of the projector changes, trapezoidal correction is carried out in a mode of calculating the plane inclination angle between the first projection plane and the second projection plane before and after the posture change of the projector, the original projection task is not required to be interrupted, and the user experience is effectively improved. In addition, the method only needs to determine the projection plane without acquiring the projection picture, thereby avoiding the error of the projection picture caused by the conditions of light interference and the like and effectively improving the accuracy of trapezoidal correction.
In one possible implementation manner of the first aspect, the calculating a plane inclination angle between the first projection plane and the second projection plane includes:
calculating a first plane equation of the first projection plane;
acquiring a second plane equation of the second projection plane;
and calculating the plane inclination angle according to the first plane equation and the second plane equation.
In a possible implementation manner of the first aspect, the projector further includes a distance measuring sensor, the pre-calibrated calibration parameter includes a light emitting direction vector of the distance measuring sensor in a first coordinate system, and the first coordinate system is a coordinate system where the projector is located;
the calculating a first plane equation for the first projection plane includes:
acquiring a first gravity vector in the first coordinate system;
acquiring distance measurement distances between two preset calibration points on the first projection plane and the projector respectively through the distance measurement sensor, wherein the preset calibration points are determined by the light emergent direction vector;
calculating respective projection coordinates of the two preset calibration points in the first coordinate system according to the light emergent direction vector and the ranging distance;
and calculating the first plane equation according to the first gravity vector and the respective projection coordinates of the two preset calibration points in the first coordinate system.
In a possible implementation manner of the first aspect, the pre-calibrated calibration parameters include a transformation matrix between a world coordinate system and the first coordinate system;
the obtaining a first gravity vector in the first coordinate system includes:
acquiring a second gravity vector in the world coordinate system through the inertial sensor;
converting the second gravity vector to a first gravity vector in the first coordinate system according to the transformation matrix.
In a possible implementation manner of the first aspect, the calculating the first plane equation according to the first gravity vector and the respective projection coordinates of the two preset calibration points in the first coordinate system includes:
calculating a first plane vector according to the respective projection coordinates of the two preset calibration points in the first coordinate system;
calculating a second plane vector according to the first gravity vector;
calculating the first plane equation according to the first plane vector and the second plane vector.
In a possible implementation manner of the first aspect, the calculating the plane inclination angle according to the first plane equation and the second plane equation includes:
determining a first normal vector of the first plane equation;
determining a second normal vector of the second planar equation;
calculating a vector included angle between the first normal vector and the second normal vector;
and determining the vector included angle as the plane inclination angle.
In a possible implementation manner of the first aspect, the performing trapezoidal correction according to the calibration posture and the posture inclination of the projector includes:
calculating the current posture of the projector according to the calibration posture and the posture inclination angle of the projector;
calculating the vertex coordinates of the projection area according to the current posture and the projection ratio of the projection;
and performing trapezoidal correction according to the vertex coordinates.
In a second aspect, an embodiment of the present application provides a trapezoidal correction apparatus, including: applied to a projector comprising an inertial sensor, the apparatus comprising:
the parameter acquisition module is used for acquiring calibration parameters calibrated in advance, and the calibration parameters comprise the calibration posture of the projector;
the angle calculation module is used for calculating a plane inclination angle between a first projection plane and a second projection plane when the change of the posture of the projector is monitored through the inertial sensor, wherein the first projection plane is a projection plane after the change of the posture of the projector, and the second projection plane is a projection plane before the change of the posture of the projector;
the angle determining module is used for determining the attitude inclination angle of the projector according to the plane inclination angle;
and the trapezoidal correction module is used for performing trapezoidal correction according to the calibration posture and the posture inclination angle of the projector.
In a third aspect, an embodiment of the present application provides a projector, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the keystone correction method according to any one of the first aspects.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, and the embodiment of the present application provides a computer-readable storage medium, where a computer program is stored, where the computer program, when executed by a processor, implements the keystone correction method according to any one of the first aspects.
In a fifth aspect, an embodiment of the present application provides a computer program product, which, when run on a terminal device, causes the terminal device to execute the keystone correction method described in any one of the above first aspects.
It is understood that the beneficial effects of the second aspect to the fifth aspect can be referred to the related description of the first aspect, and are not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a schematic diagram of a keystone correction system provided in an embodiment of the present application;
FIG. 2 is a schematic diagram of a calibration scenario provided by an embodiment of the present application;
FIG. 3 is a schematic flowchart of a trapezoidal correction method according to an embodiment of the present application;
FIG. 4 is a schematic view of a projection plane provided by an embodiment of the present application;
FIG. 5 is a schematic diagram of a calibration chart provided by an embodiment of the present application;
FIG. 6 is a schematic diagram of feature points on a calibration graph provided in an embodiment of the present application;
FIG. 7 is a block diagram of a trapezoidal correction apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a projector according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise.
Referring to fig. 1, a schematic diagram of a keystone correction system according to an embodiment of the present application is shown. As shown in FIG. 1, the keystone correction system may include a projector 11, a calibration apparatus 12, and a center console 13. And the center console is in communication connection with the projector and the calibration device respectively.
In one embodiment, the calibration device may include a camera group and a motorized turntable. The projector may include an Inertial sensor (IMU) and a range sensor (e.g., a tof (time of flight) sensor). The projector is placed on an electric rotating platform of the calibration device. The central control console calibrates the projector in advance through the calibration device to obtain calibration parameters calibrated in advance, and sends the calibration parameters to the projector. The projector uses the calibration parameters and the data obtained by the inertial sensor and the distance measuring sensor to perform automatic trapezoidal correction.
In an application scenario, refer to fig. 2, which is a schematic diagram of a calibration scenario provided in the embodiment of the present application. In this scenario, the pre-calibration process may include: the projector projects a preset calibration image onto the projection curtain/wall surface. The camera set on the calibration device is matched with the electric rotating platform to automatically find 0-bit alignment. The electric rotating platform controls the projector to rotate along the pitching direction, and when the projector rotates for a specific angle, the central console acquires a projection image through the camera group on the calibration device. The electric rotating platform controls the projector to rotate along the left and right directions, and when the projector rotates for a specific angle, the central console acquires a projection image through the camera group on the calibration device. And the center console inputs the acquired projection image into an OpenCV library function/MATLAB tool box to extract the characteristic points of the image, and calculates to obtain a homography matrix between a world coordinate system and a pixel coordinate system. The projector sends TOF data and IMU data corresponding to a plurality of angles (such as zero degrees, 20 degrees and the like) to the console. And the center console calculates calibration parameters such as yaw (namely, left and right direction) unit vectors, pitch (namely, pitch direction) unit vectors and transformation matrices between a world coordinate system and a projector coordinate system according to the obtained homography matrix, the acquired TOF data and the IMU data.
Through the embodiment, the calibration device is externally arranged on the projector, so that the device cost of the projector is reduced. The calibration of the parameters is carried out in advance, and in the automatic trapezoidal correction process of the projector, the calibration of the parameters is not needed, but the trapezoidal correction is carried out by utilizing the calibration parameters calibrated in advance, so that the trapezoidal correction time is effectively reduced. The keystone correction method at the projector end is described below.
Referring to fig. 3, which is a schematic flow chart of a trapezoidal correction method provided in an embodiment of the present application, by way of example and not limitation, the method may include the following steps:
s301, obtaining calibration parameters calibrated in advance.
The calibration parameters comprise the calibration attitude of the projector. The specific calibration process can be referred to the description of the embodiment of fig. 1 and 2. The nominal pose of the projector may include the yaw (i.e., left-right direction) unit vector, the pitch (i.e., pitch direction) unit vector, and the transformation matrix between the world coordinate system and the projector coordinate system.
And S302, when the attitude of the projector is monitored to change through the inertial sensor, calculating a plane inclination angle between the first projection plane and the second projection plane.
Inertial sensors are sensors that are used primarily to detect acceleration and rotational motion. The principle is realized by adopting the law of inertia, and the sensors range from a microminiature MEMS sensor to a laser gyro with very high measurement precision, namely the MEMS sensor with the size of only a few millimeters, to an optical fiber device with the diameter of about half a meter. Common inertial sensors include accelerometers and angular rate meters (gyroscopes), which are core components of the inertial system and are the primary factors affecting the performance of the inertial system.
The inertial sensor is the basis for triggering auto-focus and keystone correction. Whether the position of the projection equipment is changed in a displacement mode can be judged by detecting the change situation of the acceleration value in the IMU data. Whether the attitude inclination angle of the projector changes can be judged by detecting the angular velocity value in the IMU data. Alternatively, an inertial sensor of the type LSM6DS3TR-C (comprising a combination unit of a three-axis gyroscope and a three-axis accelerometer) may be used.
In one application scenario, when the data detected by the accelerometer and/or the angular velocity meter changes (for example, it can be defined that the data changes when the change value exceeds a preset value), that is, the posture of the projector changes, the automatic keystone correction function of the projector is started.
The first projection plane is a projection plane after the posture of the projector changes, and the second projection plane is a projection plane before the posture of the projector changes.
In one embodiment, calculating the plane inclination angle between the first projection plane and the second projection plane in S302 may include the steps of:
calculating a first plane equation of the first projection plane; acquiring a second plane equation of a second projection plane; and calculating the plane inclination angle according to the first plane equation and the second plane equation.
Exemplarily, refer to fig. 4, which is a schematic diagram of a projection plane provided in an embodiment of the present application. In the embodiment of the present application, the coordinate system of the projector is taken as a reference. As shown in fig. 4, the projection optical axis exits along the Z axis, the horizontal rightward direction is the X axis, and the vertical downward direction is the Y axis.
Optionally, the calculation method of the first plane equation may include:
I. a first gravity vector in a first coordinate system is obtained.
Since the direction of the gravitational acceleration vector is always parallel to the wall surface, the direction of gravity of the IMU can be translated onto the projection plane along the Y-axis OB as shown in fig. 4 under the projector coordinate system. As described in the embodiment of fig. 2, the pre-calibrated calibration parameters include a transformation matrix between the world coordinate system and the first coordinate system. Accordingly, the obtaining of the first gravity vector may include: acquiring a second gravity vector in a world coordinate system through an inertial sensor; and converting the second gravity vector into a first gravity vector in the first coordinate system according to the transformation matrix.
Illustratively, the gravity data for the IMU is:
transforming the gravity data of the IMU through a transformation matrix K, and converting the world coordinate system to the projector coordinate system to obtain a gravity vector under the projector coordinate system
Wherein,Gcx、Gcyand GczAre respectively gravity vectorThe components in the respective coordinate axes of the projector coordinate system.
II. And acquiring the distance measurement distance between each of the two preset calibration points on the first projection plane and the projector through a distance measurement sensor.
The pre-calibrated calibration parameters comprise light-emitting direction vectors of the ranging sensor in a first coordinate system, and the first coordinate system is a coordinate system where the projector is located. The preset calibration point is determined by the light-emitting direction vector.
The TOF sensor is used as a distance testing sensor, and different measuring areas can be divided in the TOF sensor, so that different areas can be gated to be activated to carry out subarea measurement, and depth information of different areas can be obtained. Optionally, a model VL53L1X (support area, single point ranging) TOF sensor may be used.
Typically, the mounting angle θ of the TOF sensorLAnd thetaRIs a known quantity, i.e. the light-emitting direction vector of the TOF sensorAndin known amounts. Accordingly, the landing point of the ranging beam emitted by the TOF sensor on the projection plane is determined, and the landing point is marked as a preset calibration point (e.g., points D and E shown in fig. 4). Of course, along with the change of the posture of the projector, the position of the preset calibration point on the projection plane correspondingly changes.
And III, calculating respective projection coordinates of the two preset calibration points in the first coordinate system according to the light-emitting direction vector and the ranging distance.
Illustratively, as shown in fig. 4, the distance from the projector to the point D is L and the distance from the projector to the point E is R, as measured by the distance measuring sensor. The projection coordinates of the point D and the point E in the first coordinate system are as follows:
and IV, calculating a first plane equation according to the first gravity vector and the respective projection coordinates of the two preset calibration points in the first coordinate system.
The manner of calculating the plane equation may include intercept, point normal, general, and normal. Any one of the above calculation methods may be adopted, and the present application is not particularly limited.
The embodiment of the application provides a calculation mode of a plane equation: calculating a first plane vector according to respective projection coordinates of the two preset calibration points in a first coordinate system; calculating a second plane vector according to the first gravity vector; and calculating a first plane equation according to the first plane vector and the second plane vector.
The principle that the plane equation of the plane can be determined according to two vectors on the same plane is that 2 coplanar vectors need to be constructed to solve the plane equation of the projection plane.
Illustratively, vectors, as shown in FIG. 4On the projection plane, the transformed gravity vectorAlso on the projection plane. Therefore, the plane equation can be solved from the two vectors. Specifically, the 2 coplanar vectors are respectively:
due to the vectorAndcoplanar, the plane formed by the two vectors is the first projection plane. The normal vector of the first projection plane must therefore also be perpendicular to the plane formed by these two vectors. In other words, the normal vector of the first projection plane is perpendicular to the two vectors, so that the cross product theorem is adoptedThe first planar equation Plane1: a can be obtained1x+b1y+c1z+d10. Normal vector of first projection planeComprises the following steps:
according to the normal vector of the first projection planeThe coefficients a of the first plane equation can be determined1、b1、c1And d1. And then determining a first plane equation.
In the embodiment of the present application, the calculation method of the second plane equation of the second projection plane is the same as that of the first plane equation, and details are not repeated here.
In one application scenario, before the posture of the projector changes, the projector may calculate the second plane equation at a preset period, that is, update the second plane equation at the preset period, and store the latest second plane equation in a storage medium of the projector. When the attitude of the projector changes, the projector acquires a second plane equation from the storage medium.
In one embodiment, calculating the plane inclination angle according to the first plane equation and the second plane equation may include:
determining a first normal vector of a first plane equation; determining a second normal vector of a second plane equation; calculating a vector included angle between the first normal vector and the second normal vector; the vector angle is determined as the plane tilt angle.
Illustratively, as can be seen from the above embodiment, the first Plane equation calculated is Plane1: a1x+b1y+c1z+d1From this equation, a first normal vector can be obtained as 0Similarly, assume that the second planar equation obtained is Plane2: a2x+b2y+c2z+d2From this equation, a second normal vector can be obtained as 0The angle between the two normal vectors is:
and S303, determining the attitude inclination angle of the projector according to the plane inclination angle.
Alternatively, the attitude tilt angle of the projector may be made equal to the plane tilt angle. The attitude tilt angle of the projector can also be made equal to the complement of the plane tilt angle.
And S304, performing trapezoidal correction according to the calibration posture and the posture inclination angle of the projector.
As described in the embodiment of fig. 1 and 2, in the pre-calibration process, the projector projects a preset calibration chart (the calibration chart may refer to the picture shown in fig. 5), and the camera acquires the projected image. In order to improve the recognition accuracy of the camera, a plurality of feature points are usually set on the calibration graph (as shown in fig. 6). The electric rotating table controls the projector to rotate by one angle every time, and the camera acquires a corresponding projection image; and the central console calculates a transformation matrix K between the two images before and after the rotation of the projector according to the coordinates of the characteristic points on the projected image. Therefore, when the projector is turned over by the inclination angle cos θ of different angles to change the posture, there is a transformation matrix K matching with it.
After the process of calibrating in advance, the center console sends the calibrated calibration parameters to the projector, and the projector stores the calibration parameters. The calibration parameters include multiple sets of parameters, and each set of parameters includes a calibration attitude (including a yaw value and a pitch value) and a transformation matrix K corresponding to the calibration attitude.
In the trapezoidal correction process of S304, the projector searches for a calibration attitude (i.e., a yaw value and a pitch value) corresponding to the calculated attitude inclination angle cos from the storage medium, then obtains a transformation matrix K corresponding to the calibration attitude, and then performs trapezoidal correction according to the obtained transformation matrix K. The specific correction procedure is as follows.
In one embodiment, one implementation of S304 is: calculating the current attitude of the projector according to the calibration attitude and the attitude inclination angle of the projector; calculating the corrected feature point coordinates according to the attitude inclination angle and the feature points on the projection picture; calculating the vertex coordinates of the projection area according to the current posture and the projection ratio of the projector, and limiting the maximum projection area of the projection picture after correction; and determining a corrected projection picture according to the corrected feature point coordinates and the maximum projection area.
One implementation manner of calculating the corrected feature point coordinates is as follows:
acquiring a target attitude (namely a calibration attitude corresponding to the attitude inclination angle); acquiring a target matrix (namely a transformation matrix K corresponding to the target attitude); and calculating the corrected characteristic point coordinates according to the target matrix and the characteristic points on the projection plane.
Specifically, the calculation method for calculating the corrected feature point coordinates according to the feature points on the target matrix and the projection plane includes:
assuming that a feature point a of one of the projection planes before correction has coordinates a (x, y), and projection coordinates of a feature point a 'corresponding to a point in the projection plane after correction have coordinates a' (x ', y'); according to the feature point coordinates A (x, y) and the corresponding transformation matrix K, the coordinates of the point A' in the corrected projection plane can be calculated and obtained: a ' (x ', y ') -K · a (x, y).
The throw ratio is a ratio of a projection distance to a width of a projection screen. The projection area can be determined according to the current posture and the projection ratio of the projector, and the vertex coordinates of the projection area (usually, the projection area is rectangular, that is, the coordinates of four vertices of the rectangle are calculated) are calculated, so that the projection area is defined.
To further improve the accuracy of the keystone correction, in one embodiment, after the projector performs the automatic keystone correction, a manual recombination may be performed. If the projection picture after the projector correction is still inclined, the user can manually perform the trapezoidal correction.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 7 is a block diagram of a trapezoidal correction apparatus provided in an embodiment of the present application, corresponding to the trapezoidal correction method described in the foregoing embodiment, and only the relevant portions of the embodiment of the present application are shown for convenience of illustration.
Referring to fig. 7, the apparatus includes:
a parameter obtaining module 71, configured to obtain calibration parameters calibrated in advance, where the calibration parameters include a calibration posture of the projector.
An angle calculating module 72, configured to calculate a plane tilt angle between a first projection plane and a second projection plane when it is monitored by the inertial sensor that the posture of the projector changes, where the first projection plane is a projection plane after the posture of the projector changes, and the second projection plane is a projection plane before the posture of the projector changes.
An angle determining module 73, configured to determine an attitude tilt angle of the projector according to the plane tilt angle.
And the trapezoidal correction module 74 is used for performing trapezoidal correction according to the calibration posture and the posture inclination angle of the projector.
Optionally, the angle calculating module 72 is further configured to:
calculating a first plane equation of the first projection plane; acquiring a second plane equation of the second projection plane; and calculating the plane inclination angle according to the first plane equation and the second plane equation.
Optionally, the projector further includes a distance measuring sensor, the pre-calibrated calibration parameter includes a light emitting direction vector of the distance measuring sensor in a first coordinate system, and the first coordinate system is a coordinate system where the projector is located.
Accordingly, the angle calculation module 72 is further configured to:
acquiring a first gravity vector in the first coordinate system;
acquiring distance measurement distances between two preset calibration points on the first projection plane and the projector respectively through the distance measurement sensor, wherein the preset calibration points are determined by the light emergent direction vector;
calculating respective projection coordinates of the two preset calibration points in the first coordinate system according to the light emergent direction vector and the ranging distance;
and calculating the first plane equation according to the first gravity vector and the respective projection coordinates of the two preset calibration points in the first coordinate system.
Optionally, the pre-calibrated calibration parameters include a transformation matrix between a world coordinate system and the first coordinate system.
Accordingly, the angle calculation module 72 is further configured to:
acquiring a second gravity vector in the world coordinate system through the inertial sensor; converting the second gravity vector to a first gravity vector in the first coordinate system according to the transformation matrix.
Optionally, the angle calculating module 72 is further configured to:
calculating a first plane vector according to the respective projection coordinates of the two preset calibration points in the first coordinate system; calculating a second plane vector according to the first gravity vector; calculating the first plane equation according to the first plane vector and the second plane vector.
Optionally, the angle calculating module 72 is further configured to:
determining a first normal vector of the first plane equation; determining a second normal vector of the second planar equation; calculating a vector included angle between the first normal vector and the second normal vector; and determining the vector included angle as the plane inclination angle.
Optionally, the keystone correction module 74 is further configured to:
calculating the current posture of the projector according to the calibration posture and the posture inclination angle of the projector; calculating the vertex coordinates of the projection area according to the current posture and the projection ratio of the projection; and performing trapezoidal correction according to the vertex coordinates.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
The keystone correction apparatus shown in fig. 7 may be a software unit, a hardware unit, or a combination of software and hardware unit built in the existing terminal device, may be integrated into the terminal device as a separate pendant, or may exist as a separate terminal device.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Fig. 8 is a schematic structural diagram of a projector according to an embodiment of the present application. As shown in fig. 8, the projector 8 of this embodiment includes: at least one processor 80 (only one shown in fig. 8), a memory 81, and a computer program 82 stored in the memory 81 and executable on the at least one processor 80, the processor 80 implementing the steps in any of the various trapezoidal correction method embodiments described above when executing the computer program 82.
The projector in the embodiment of the application is a device which can project an input image on a curtain after signal processing. The projector may be a separate projection device, or may be a device having a projection function mounted on another terminal. The projector may include, but is not limited to, a processor, a memory. Those skilled in the art will appreciate that fig. 8 is merely an example of projector 8, and does not constitute a limitation on projector 8, and may include more or less components than those shown, or combine certain components, or different components, such as input and output devices, network access devices, etc. The projector can be connected with different input sources, such as a computer, a game machine, a U disk and the like.
The processor 80 may be a Central Processing Unit (CPU), and the processor 80 may be other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, a discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 81 may in some embodiments be an internal storage unit of the projector 8, such as a hard disk or a memory of the projector 8. The memory 81 may also be an external storage device of the projector 8 in other embodiments, such as a plug-in hard disk, a Smart Memory Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the projector 8. Further, the memory 81 may also include both an internal storage unit and an external storage device of the projector 8. The memory 81 is used for storing an operating system, an application program, a Boot Loader (Boot Loader), data, and other programs, such as program codes of the computer programs. The memory 81 may also be used to temporarily store data that has been output or is to be output.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above-mentioned method embodiments.
The embodiments of the present application provide a computer program product, which when running on a terminal device, enables the terminal device to implement the steps in the above method embodiments when executed.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a device/projector, a recording medium, computer Memory, Read-Only Memory (ROM), Random-Access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/projector and method may be implemented in other ways. For example, the above-described apparatus/projector embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.
Claims (10)
1. A keystone correction method applied to a projector including an inertial sensor, the method comprising:
obtaining calibration parameters calibrated in advance, wherein the calibration parameters comprise the calibration posture of the projector;
when the change of the posture of the projector is monitored through the inertial sensor, calculating a plane inclination angle between a first projection plane and a second projection plane, wherein the first projection plane is a projection plane after the change of the posture of the projector, and the second projection plane is a projection plane before the change of the posture of the projector;
determining an attitude inclination angle of the projector according to the plane inclination angle;
and performing trapezoidal correction according to the calibration posture and the posture inclination angle of the projector.
2. The keystone correction method of claim 1, wherein calculating the plane tilt angle between the first projection plane and the second projection plane comprises:
calculating a first plane equation of the first projection plane;
acquiring a second plane equation of the second projection plane;
and calculating the plane inclination angle according to the first plane equation and the second plane equation.
3. The keystone correction method of claim 2, wherein the projector further includes a distance measuring sensor, the pre-calibrated calibration parameters include a light emitting direction vector of the distance measuring sensor in a first coordinate system, and the first coordinate system is a coordinate system where the projector is located;
the calculating a first plane equation for the first projection plane includes:
acquiring a first gravity vector in the first coordinate system;
acquiring distance measurement distances between two preset calibration points on the first projection plane and the projector respectively through the distance measurement sensor, wherein the preset calibration points are determined by the light emergent direction vector;
calculating respective projection coordinates of the two preset calibration points in the first coordinate system according to the light emergent direction vector and the ranging distance;
and calculating the first plane equation according to the first gravity vector and the respective projection coordinates of the two preset calibration points in the first coordinate system.
4. The keystone correction method of claim 3, wherein the pre-calibrated calibration parameters include a transformation matrix between a world coordinate system and the first coordinate system;
the obtaining a first gravity vector in the first coordinate system includes:
acquiring a second gravity vector in the world coordinate system through the inertial sensor;
converting the second gravity vector to a first gravity vector in the first coordinate system according to the transformation matrix.
5. The keystone correction method of claim 3, wherein the calculating the first plane equation based on the first gravity vector and the respective projection coordinates of the two predetermined calibration points in the first coordinate system comprises:
calculating a first plane vector according to the respective projection coordinates of the two preset calibration points in the first coordinate system;
calculating a second plane vector according to the first gravity vector;
calculating the first plane equation according to the first plane vector and the second plane vector.
6. The keystone correction method of claim 2, wherein the calculating the plane tilt angle based on the first plane equation and the second plane equation comprises:
determining a first normal vector of the first plane equation;
determining a second normal vector of the second planar equation;
calculating a vector included angle between the first normal vector and the second normal vector;
and determining the vector included angle as the plane inclination angle.
7. The keystone correction method of claim 1, wherein the keystone correction based on the nominal pose of the projector and the pose tilt angle comprises:
calculating the current posture of the projector according to the calibration posture and the posture inclination angle of the projector;
calculating the vertex coordinates of the projection area according to the current posture and the projection ratio of the projection;
and performing trapezoidal correction according to the vertex coordinates.
8. A keystone correction apparatus for use with a projector that includes an inertial sensor, the apparatus comprising:
the parameter acquisition module is used for acquiring calibration parameters calibrated in advance, and the calibration parameters comprise the calibration posture of the projector;
the angle calculation module is used for calculating a plane inclination angle between a first projection plane and a second projection plane when the change of the posture of the projector is monitored through the inertial sensor, wherein the first projection plane is a projection plane after the change of the posture of the projector, and the second projection plane is a projection plane before the change of the posture of the projector;
the angle determining module is used for determining the attitude inclination angle of the projector according to the plane inclination angle;
and the trapezoidal correction module is used for performing trapezoidal correction according to the calibration posture and the posture inclination angle of the projector.
9. A projector comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111242419.4A CN113824942B (en) | 2021-10-25 | 2021-10-25 | Trapezoidal correction method, apparatus, projector, and computer-readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111242419.4A CN113824942B (en) | 2021-10-25 | 2021-10-25 | Trapezoidal correction method, apparatus, projector, and computer-readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113824942A true CN113824942A (en) | 2021-12-21 |
CN113824942B CN113824942B (en) | 2023-08-29 |
Family
ID=78919040
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111242419.4A Active CN113824942B (en) | 2021-10-25 | 2021-10-25 | Trapezoidal correction method, apparatus, projector, and computer-readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113824942B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114745529A (en) * | 2022-03-30 | 2022-07-12 | 深圳市橙子数字科技有限公司 | Projector single TOF trapezoidal correction method and projector |
CN114760454A (en) * | 2022-05-24 | 2022-07-15 | 海信视像科技股份有限公司 | Projection equipment and trigger correction method |
CN114866751A (en) * | 2022-04-15 | 2022-08-05 | 海信视像科技股份有限公司 | Projection equipment and trigger correction method |
CN117288151A (en) * | 2023-11-21 | 2023-12-26 | 深圳市橙子数字科技有限公司 | Three-dimensional attitude determination method and device of projection equipment and electronic equipment |
CN117579798A (en) * | 2024-01-15 | 2024-02-20 | 深圳市橙子数字科技有限公司 | Projection equipment calibration method and device and electronic equipment |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120176415A1 (en) * | 2011-01-06 | 2012-07-12 | Telenav, Inc. | Graphical display system with adaptive keystone mechanism and method of operation thereof |
US20140160341A1 (en) * | 2012-12-10 | 2014-06-12 | Texas Instruments Incorporated | Maintaining Distortion-Free Projection From a Mobile Device |
EP3208699A1 (en) * | 2016-02-19 | 2017-08-23 | Sony Mobile Communications Inc. | Control device, control method, and program |
WO2018173797A1 (en) * | 2017-03-23 | 2018-09-27 | ソニー株式会社 | Projector, projection method, image processing system, and method |
CN110677634A (en) * | 2019-11-27 | 2020-01-10 | 成都极米科技股份有限公司 | Trapezoidal correction method, device and system for projector and readable storage medium |
CN111800620A (en) * | 2020-08-18 | 2020-10-20 | 深圳市慧视智图科技有限公司 | Noninductive trapezoidal correction module of projector and calculation method thereof |
CN112422939A (en) * | 2021-01-25 | 2021-02-26 | 深圳市橙子数字科技有限公司 | Trapezoidal correction method and device for projection equipment, projection equipment and medium |
CN112804507A (en) * | 2021-03-19 | 2021-05-14 | 深圳市火乐科技发展有限公司 | Projector correction method, projector correction system, storage medium, and electronic device |
CN112804508A (en) * | 2021-03-19 | 2021-05-14 | 深圳市火乐科技发展有限公司 | Projector correction method, projector correction system, storage medium, and electronic device |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4497900B2 (en) * | 2003-11-20 | 2010-07-07 | キヤノン株式会社 | Image projection apparatus and image projection system having the same |
JP4774826B2 (en) * | 2005-06-23 | 2011-09-14 | カシオ計算機株式会社 | Projection apparatus, projection control method, and program |
-
2021
- 2021-10-25 CN CN202111242419.4A patent/CN113824942B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120176415A1 (en) * | 2011-01-06 | 2012-07-12 | Telenav, Inc. | Graphical display system with adaptive keystone mechanism and method of operation thereof |
US20140160341A1 (en) * | 2012-12-10 | 2014-06-12 | Texas Instruments Incorporated | Maintaining Distortion-Free Projection From a Mobile Device |
EP3208699A1 (en) * | 2016-02-19 | 2017-08-23 | Sony Mobile Communications Inc. | Control device, control method, and program |
WO2018173797A1 (en) * | 2017-03-23 | 2018-09-27 | ソニー株式会社 | Projector, projection method, image processing system, and method |
CN110677634A (en) * | 2019-11-27 | 2020-01-10 | 成都极米科技股份有限公司 | Trapezoidal correction method, device and system for projector and readable storage medium |
CN111800620A (en) * | 2020-08-18 | 2020-10-20 | 深圳市慧视智图科技有限公司 | Noninductive trapezoidal correction module of projector and calculation method thereof |
CN112422939A (en) * | 2021-01-25 | 2021-02-26 | 深圳市橙子数字科技有限公司 | Trapezoidal correction method and device for projection equipment, projection equipment and medium |
CN112804507A (en) * | 2021-03-19 | 2021-05-14 | 深圳市火乐科技发展有限公司 | Projector correction method, projector correction system, storage medium, and electronic device |
CN112804508A (en) * | 2021-03-19 | 2021-05-14 | 深圳市火乐科技发展有限公司 | Projector correction method, projector correction system, storage medium, and electronic device |
Non-Patent Citations (1)
Title |
---|
赵?临;任永杰;杨凌辉;林嘉睿;: "一种基于双目视觉的三维投影标示方法", 自动化与仪器仪表 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114745529A (en) * | 2022-03-30 | 2022-07-12 | 深圳市橙子数字科技有限公司 | Projector single TOF trapezoidal correction method and projector |
CN114745529B (en) * | 2022-03-30 | 2024-05-28 | 深圳市橙子数字科技有限公司 | Projector single TOF trapezoidal correction method and projector |
CN114866751A (en) * | 2022-04-15 | 2022-08-05 | 海信视像科技股份有限公司 | Projection equipment and trigger correction method |
CN114760454A (en) * | 2022-05-24 | 2022-07-15 | 海信视像科技股份有限公司 | Projection equipment and trigger correction method |
CN117288151A (en) * | 2023-11-21 | 2023-12-26 | 深圳市橙子数字科技有限公司 | Three-dimensional attitude determination method and device of projection equipment and electronic equipment |
CN117288151B (en) * | 2023-11-21 | 2024-02-13 | 深圳市橙子数字科技有限公司 | Three-dimensional attitude determination method and device of projection equipment and electronic equipment |
CN117579798A (en) * | 2024-01-15 | 2024-02-20 | 深圳市橙子数字科技有限公司 | Projection equipment calibration method and device and electronic equipment |
CN117579798B (en) * | 2024-01-15 | 2024-04-19 | 深圳市橙子数字科技有限公司 | Projection equipment calibration method and device and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN113824942B (en) | 2023-08-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113824942B (en) | Trapezoidal correction method, apparatus, projector, and computer-readable storage medium | |
US20220286654A1 (en) | Projector Keystone Correction Method, Apparatus And System, And Readable Storage Medium | |
CN105716582B (en) | Measurement method, device and the camera field of view angle measuring instrument at camera field of view angle | |
CN112422939A (en) | Trapezoidal correction method and device for projection equipment, projection equipment and medium | |
US7768527B2 (en) | Hardware-in-the-loop simulation system and method for computer vision | |
US20180300900A1 (en) | Camera calibration method, recording medium, and camera calibration apparatus | |
CN108111828B (en) | Projection equipment correction method and device and projection equipment | |
US20090040312A1 (en) | Calibration apparatus and method thereof | |
CN108429908B (en) | Camera module testing method, device, equipment and medium | |
CA2233806C (en) | Camera/lens calibration apparatus and method | |
CN111896221B (en) | Alignment method of rotating optical measurement system for virtual coordinate system auxiliary camera calibration | |
BR112012032875B1 (en) | optical measurement method and system to determine the 3D coordinates of a multiplicity of measurement points | |
CN104006825A (en) | System and method for calibration of machine vision cameras along at least three discrete planes | |
US20210364900A1 (en) | Projection Method of Projection System for Use to Correct Image Distortion on Uneven Surface | |
JP7287793B2 (en) | Target device and survey system | |
CN111025330B (en) | Target inclination angle detection method and device based on depth map | |
CN112556994A (en) | Optical information detection method, device and equipment | |
WO2019230284A1 (en) | Three-dimensional measuring device, method for displaying position of three-dimensional measuring device, and program | |
US20230045402A1 (en) | Laser Leveling Device and Leveling Method | |
CN113566709A (en) | Calibration method and device of structured light measurement system and electronic equipment | |
CN116743973A (en) | Automatic correction method for noninductive projection image | |
JP2000205821A (en) | Instrument and method for three-dimensional shape measurement | |
CN113052974A (en) | Method and device for reconstructing three-dimensional surface of object | |
JP6966229B2 (en) | Runout correction characteristic evaluation device for optical equipment with runout correction function | |
CN106646349B (en) | The determination methods, devices and systems of deviation angle and the correction system of deviation angle |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |