Projection geometry correction method and projection device
The projection geometry correction method, which uses attitude sensors and algorithms, solves the image distortion problem caused by changes in the position of the projection device, achieves automatic rectangular correction, reduces operational difficulty, and improves accuracy.
Patent Information
- Application Number
- CN202411394639.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-10-08
AI Technical Summary
The change in the position of the projection device causes image distortion. Manual correction is difficult to achieve with existing technology, and automatic correction increases equipment costs and affects the appearance.
The system uses an attitude sensor to acquire three-dimensional position information and uses an algorithm to calculate and correct the transformation coordinates, thereby achieving projection image correction without adjusting the device position. This includes a single correction, a compensation model, and three correction steps.
When the projection device is misaligned, the image is automatically corrected to a rectangular projection, reducing the difficulty of user operation, improving correction accuracy and speed, and reducing equipment costs.
Smart Images

Figure CN119728935B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of projection display, and particularly relates to a projection geometry correction method and a projection device. BACKGROUND
[0002] A projection device can project and display an image onto a projection screen. In actual application, the position of the projection device can be changed, which causes the projection image to be distorted, the rectangular projection area to become an irregular quadrilateral area, and the originally vertical or parallel frame to become inclined, thereby affecting the display effect of the projection device.
[0003] The change of the projection image and the projection area causes the projection device to project and display the image with poor effect. In the prior art, when the position of the projection device is changed and the projection image is distorted, the existing method restores the position of the projection device through manual or automatic mode. The manual mode has high professional requirements and is difficult for ordinary users to complete. The automatic mode needs to configure an automatic adjusting mechanism for the projection device, which increases the cost of the device and affects the appearance of the projection device. SUMMARY
[0004] In view of the above problems in the prior art, the present application provides a projection geometry correction method and a projection device. When the position of the projection device is changed and the projection image is distorted, the present application calculates the coordinates of the correction transformation through an algorithm, so that the projection device outputs the corrected coordinates, so as to display the projection image without distortion on the receiving screen without adjusting the position of the projection device.
[0005] The present application is implemented by using the following technical solutions:
[0006] The present application provides a projection geometry correction method, which is applied to a projection device. The projection device is configured with:
[0007] An attitude sensor, which is used to acquire three-dimensional position information of the projection device;
[0008] The correction method comprises the following steps:
[0009] Acquiring the three-dimensional position information detected by the attitude sensor; when the three-dimensional position information changes, the following steps are executed:
[0010] Projecting a correction image;
[0011] The first correction: obtaining the first deflection angle, the second deflection angle and / or the third deflection angle of the projection device according to the three-dimensional position information and the initial position information; determining the first pixel offset, the second pixel offset and / or the third pixel offset based on the first deflection angle, the second deflection angle and / or the third deflection angle; wherein the first deflection angle is the angle of the projection device deflected relative to the initial position with the X coordinate axis as the rotation axis, the second deflection angle is the angle of the projection device deflected relative to the initial position with the Y coordinate axis as the rotation axis, and the third deflection angle is the angle of the projection device deflected relative to the initial position with the X coordinate axis as the rotation axis;
[0012] The second correction: obtaining the pixel offset correction value by using the compensation model based on the deflection angle and the pixel offset, and compensating the first pixel offset, the second pixel offset and / or the third pixel offset by using the pixel offset correction value;
[0013] Compensating the first pixel offset, the second pixel offset and / or the third pixel offset to correct the image to the rectangular projection image;
[0014] The third correction: obtaining the pixel coordinates of the projection screen frame, and obtaining the correction projection coordinates based on the pixel coordinates of the projection screen frame and the pixel coordinates of the rectangular projection image;
[0015] Correcting the projection image to be projected by using the correction projection coordinates.
[0016] Compared with the prior art, the projection geometry correction method has the advantages and positive effects that: when the position of the projection device is offset, the correction image is projected, the three-dimensional position information detected by the attitude sensor is converted to obtain the deflection angles of the projection device in the X axis, the Y axis and the Z axis, the pixel offset corresponding to the deflection angle is obtained, the pixel offset is compensated by using the compensation model, the correction image is corrected to the rectangular projection image by using the compensated pixel offset, then the correction projection coordinates are obtained based on the pixel coordinates of the projection screen frame and the pixel coordinates of the rectangular projection image, and the projection image to be projected is corrected by using the correction projection coordinates; based on the above steps, when the position of the projection device is offset, the correction image is first corrected to the rectangular projection image by using the relationship between the deflection angle and the pixel offset, and then the rectangular projection image is corrected to the projection screen, so that the projection device with the offset position can normally project on the projection screen without adjusting the position, the viewing effect is guaranteed, and the operation difficulty of the user is reduced.
[0017] In some embodiments of the present application, the method further comprises a calibration step, comprising:
[0018] A three-dimensional coordinate system is established with the center of the projection device as the origin;
[0019] A first data set of pixel offsets at different deflection angles is obtained with the X axis as the rotation axis;
[0020] A second data set of pixel offsets at different deflection angles is obtained with the Y axis as the rotation axis;
[0021] A third data set of pixel offsets at different deflection angles is obtained with the Z axis as the rotation axis;
[0022] The first data set, the second data set and the third data set are fitted into a first polynomial, a second polynomial and a third polynomial respectively, to obtain a corresponding relationship between a first deflection angle and a first pixel offset in the X axis direction, a corresponding relationship between a second deflection angle and a second pixel offset in the Y direction, and a corresponding relationship between a third deflection angle and a third pixel offset in the Z direction.
[0023] In the embodiment, in a three-dimensional coordinate system with the center of the projection device as the origin, data sets of pixel offsets at different deflection angles are obtained with the X axis, the Y axis and the Z axis as the rotation axis respectively, and polynomials of the relationships between the deflection angles and the pixel offsets in the three directions are obtained by fitting the data sets respectively. The fitting relationships are stored in the projection device. When the position of the projection device changes, three-dimensional position data is obtained from the attitude sensor, the deflection angles of the projection device in the three-axis directions are obtained according to the three-dimensional position data, and then the pixel offsets corresponding to the deflection angles are calculated by calling the fitting polynomials. The present application is not limited to the way of obtaining the pixel offsets of the projection image. Other technical means for obtaining the pixel offsets corresponding to the deflection angles are also within the scope of the present application, such as accumulating the relationship between the pixel offsets corresponding to the deflection angles to obtain a relationship list, and obtaining the pixel offsets by querying the list when the deflection angles are known.
[0024] In some embodiments of the present application, the method further comprises a compensation calibration step, comprising:
[0025] A compensation data set of the relationships between the deflection angles and the pixel offsets in the XYZ three angles is obtained;
[0026] A polynomial regression model is established according to the compensation data set;
[0027] The regression coefficients of the polynomial regression model are solved by using the least square method;
[0028] The regression coefficients are brought into the polynomial regression model to obtain the compensation model.
[0029] In actual calibration in X, Y, Z three-axis directions and application, the offset in three-axis angles is not single change, and there is mutual influence relationship among them. In the embodiment, the compensation data set of the relationship between the deflection angles in XYZ three angles and the pixel offset is acquired, a polynomial regression model is established according to the compensation data set, the regression coefficient of the regression model is calculated to obtain a compensation model, and the regression coefficient of the polynomial regression model is solved by using the least square method. The compensation model is obtained by bringing the regression coefficient into the polynomial regression model. When the position of the projection device is offset, the pixel offset is obtained through the fitting relationship, the compensation model is called to compensate the offset of the mutual influence of the three-axis deflection angles, the mutual influence is eliminated, and thus the correction effect and the accuracy are improved.
[0030] In some embodiments of the present application, the method further comprises, before step S5:
[0031] The deviation of the corrected image from the standard rectangle is judged, and steps S2 to S4 are repeated until the corrected image is a rectangular projection image when the deviation is greater than a threshold.
[0032] In the embodiment, after one correction and secondary correction are performed, it is judged whether the corrected rectangular projection image conforms to the standard rectangle. When the corrected rectangular projection image does not conform to the standard rectangle, one correction and secondary correction are repeated until the corrected rectangular projection image is a standard rectangle, so as to guarantee the accuracy of three corrections.
[0033] In some embodiments of the present application, step S5 specifically comprises:
[0034] The pixel coordinates of the four vertices of the projection screen frame and the pixel coordinates of the four vertices of the rectangular projection image are acquired;
[0035] The pixel coordinates of the four vertices of the rectangular projection image are acquired by using the following formula: The corrected projection coordinates are obtained; wherein , The corrected projection coordinates are obtained, and The offset of the pixel coordinates of the four vertices of the rectangular projection image relative to the pixel coordinates of the four vertices of the projection screen frame in the x direction and the y direction; x and y are the pixel coordinates of the four vertices of the rectangular projection image.
[0036] The present application further provides a projection device, which is configured with:
[0037] The posture sensor is used to acquire the three-dimensional position information of the projection device;
[0038] The projection unit is controlled by the projection controller to project the image to be projected on the projection screen;
[0039] The projection controller is configured with:
[0040] The sensing unit is configured to acquire three-dimensional position information detected by the posture sensor, and determine whether the three-dimensional position information changes;
[0041] The projection control unit is configured to control the projection unit to project the correction image when the three-dimensional position information changes.
[0042] The first correction unit is configured to obtain a first deflection angle, a second deflection angle and / or a third deflection angle of the projection device according to the three-dimensional position information and the initial position information, and determine a first pixel offset, a second pixel offset and / or a third pixel offset based on the first deflection angle, the second deflection angle and / or the third deflection angle, wherein the first deflection angle is an angle of the projection device deflected relative to the initial position with the X coordinate axis as a rotation axis, the second deflection angle is an angle of the projection device deflected relative to the initial position with the Y coordinate axis as a rotation axis, and the third deflection angle is an angle of the projection device deflected relative to the initial position with the X coordinate axis as a rotation axis.
[0043] The second correction unit is configured to obtain a pixel offset correction value by using a compensation model constructed based on the deflection angle and the pixel offset, and compensate the first pixel offset, the second pixel offset and / or the third pixel offset by using the pixel offset correction value.
[0044] The third correction unit is configured to obtain a pixel coordinate of a projection screen frame after the projection control unit controls the projection unit to correct the correction image into a rectangular projection image by using the compensated first pixel offset, the second pixel offset and / or the third pixel offset, and obtain a correction projection coordinate based on the pixel coordinate of the projection screen frame and a pixel coordinate of the rectangular projection image, so that the projection control unit corrects a projection image to be projected by using the correction projection coordinate.
[0045] In some embodiments of the present application, the projection device further comprises:
[0046] The calibration unit is configured to fit the first data set, the second data set and the third data set into a first polynomial, a second polynomial and a third polynomial respectively, so as to obtain a corresponding relationship between the first deflection angle and the first pixel offset in the X axis direction, a corresponding relationship between the second deflection angle and the second pixel offset in the Y direction, and a corresponding relationship between the third deflection angle and the third pixel offset in the Z direction.
[0047] The X axis, the Y axis and the Z axis are three-dimensional coordinate axes established with the center of the projection device as an origin; the first data set is a data set of pixel offsets obtained under different deflection angles with the X axis as a rotation axis; the second data set is a data set of pixel offsets obtained under different deflection angles with the Y axis as a rotation axis; and the third data set is a data set of pixel offsets obtained under different deflection angles with the Z axis as a rotation axis.
[0048] In some embodiments of the present application, the projection device further comprises:
[0049] The compensation calibration unit is configured to obtain a compensation data set of the deflection angle and the pixel offset in the XYZ three angles, establish a polynomial regression model according to the compensation data set, solve the regression coefficient of the polynomial regression model using the least square method, and obtain the compensation model by inputting the regression coefficient into the polynomial regression model.
[0050] In some embodiments of the present application, the projection controller further comprises:
[0051] The rectangular correction judging unit is configured to judge the deviation of the corrected image from the standard rectangle after the first correction and the second correction, and repeat the first correction and the second correction until the corrected image is a rectangular projection image when the deviation is greater than a threshold.
[0052] In some embodiments of the present application, the third correction unit corrects the projection image to be projected in the following manner:
[0053] The pixel coordinates of the four vertices of the projection screen frame and the pixel coordinates of the four vertices of the rectangular projection image are obtained.
[0054] The pixel coordinates of the four vertices of the projection screen frame and the pixel coordinates of the four vertices of the rectangular projection image are obtained. The corrected projection coordinates are obtained; wherein , The corrected projection coordinates are obtained; wherein And The offset of the pixel coordinates of the four vertices of the rectangular projection image from the pixel coordinates of the four vertices of the projection screen frame in the x direction and the y direction; x and y are the pixel coordinates of the four vertices of the rectangular projection image.
[0055] In some embodiments of the present application, the projection screen frame is calibrated by using a fluorescent material.
[0056] Compared with the prior art, the projection device has the following advantages and positive effects: when the position of the projection device deviates, the projection device corrects the corrected image to a rectangular projection image using the relationship between the deflection angle and the pixel offset, and then corrects the rectangular projection image to the projection screen, so that the projection device with the deviated position can project normally on the projection screen without adjusting the position, which guarantees the viewing effect and reduces the operation difficulty of the user; in the projection device, the attitude sensor uses a tof (time of flight distance sensor), which has a millisecond-level calculation accuracy and a hundred frames per second speed, so that the accuracy and speed of the correction algorithm can be improved; the frame of the projection screen is calibrated by using a fluorescent material, the fluorescent frame is clear, and the calibration accuracy of the four vertices of the projection screen can be improved, so that the correction accuracy of the algorithm for the distorted projection image can be improved.
[0057] Other features and advantages of the present application will become more apparent from the following detailed description, taken in conjunction with the accompanying drawings, illustrating by way of example the principles of the application. BRIEF DESCRIPTION OF DRAWINGS
[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative effort.
[0059] Figure 1 The steps of the projection geometry correction method proposed by the present application are shown in the figure;
[0060] Figure 2 The three-dimensional coordinate system established in the geometry correction of the present application is shown in the figure;
[0061] Figure 3 The figure shows that the projection device in the geometry correction of the present application has an angle deflection with the X-axis as the rotation axis;
[0062] Figure 4 The figure shows that the projection device in the geometry correction of the present application has an angle deflection with the Y-axis as the rotation axis;
[0063] Figure 5 The figure shows that the projection device in the geometry correction of the present application has an angle deflection with the Z-axis as the rotation axis;
[0064] Figure 6 The steps of the projection geometry correction method proposed by the present application are shown in the figure;
[0065] Figure 7 The figure shows that the correction image in the geometry correction of the present application is distorted due to the change of the position of the projection device;
[0066] Figure 8 The rectangular correction image obtained by the projection geometry correction method given by the present application is shown in the figure;
[0067] Figure 9 The figure shows Figure 8 The projection example after the third correction of the embodiment shown in the figure;
[0068] Figure 10 The functional structure of the projection device proposed by the present application is shown in the figure. DETAILED DESCRIPTION
[0069] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0070] The present invention aims to propose a projection geometric correction method, which does not require a position correction device to be configured for the projection device. When the position of the projection device is offset and the projection image is distorted, the projection image can be projected onto the projection screen without distortion through the geometric correction method, without the need to manually adjust the position of the projection device.
[0071] The present invention will now explain in detail the projection geometry correction method using an ultra-short-throw laser TV as an example of projection equipment.
[0072] The first step is to obtain and model the data for the projection geometry correction, such as Figure 1 As shown, the following steps are included:
[0073] S1: Establish a three-dimensional coordinate system with the center of the projection device as the origin.
[0074] A three-dimensional coordinate system is established with the center of the laser TV as the coordinate origin, such as Figure 2 As shown, the horizontal direction is the X-axis, the front-back direction is the Y-axis, and the vertical direction is the Z-axis.
[0075] A quadrilateral is used to represent the projection area of the laser TV. When the laser TV is projecting forward, the projected image is a standard rectangle. When the laser TV is deflected, the X, Y and / or Z axes will deviate from the original reference position, causing the laser TV to offset an angle on the X, Y and / or Z axes. The projected image will be distorted from the original rectangle to an irregular quadrilateral.
[0076] S2: Calibration: Using the X, Y, and Z axes as rotation axes, obtain pixel offsets at different deflection angles and establish a data set of deflection angles and pixel offsets.
[0077] During the calibration process (pixel offset data measurement), the X, Y, and Z axes are used as the rotation axes to determine the angles. When rotating about the X axis, the laser TV deflects relative to the Y and Z axes. When rotating about the Y axis, the laser TV deflects relative to the X and Z axes. When rotating about the Z axis, the laser TV deflects relative to the X and Y axes. The angle information mentioned later is the angle information in the X, Y, and Z axes obtained based on the changes in the three-dimensional coordinates.
[0078] (1) With the X-axis as the rotation axis, obtain the first data set of pixel offsets at different deflection angles.
[0079] like Figure 3 As shown, with the X-axis as the rotation axis, between -10° and 10° ("-" represents counterclockwise rotation, and no sign represents clockwise rotation), more than ten groups of angles are changed at arbitrary deflection angles. Each time the angle changes, the pixel offset of the projected image relative to the standard rectangular projection is recorded, and the first data group is obtained: [( 1,(x1,y1))( 2, (x2, y2))……( i,(xi,yi))……( n,(xn,yn))], where i is the angle of deflection with the X axis as the rotation axis, (xi,yi) is the corresponding pixel offset, and n is the marking amount.
[0080] (2) With the Y axis as the rotation axis, obtain a second data set of pixel offsets at different deflection angles.
[0081] Similarly, if Figure 4 As shown, with the Y axis as the rotation axis, between -10° and 10° ("-" represents counterclockwise rotation, and no sign represents clockwise rotation), more than ten groups of angles are changed at arbitrary deflection angles. Each time the angle changes, the pixel offset of the projected image relative to the standard rectangular projection is recorded to obtain the second data group: [( 1,(x1,y1))( 2, (x2, y2))……( i,(xi,yi))……( m,(xm,ym))], where i is the angle of deflection with the Y axis as the rotation axis, (xi,yi) is the corresponding pixel offset, and m is the marking amount.
[0082] (3) With the Z axis as the rotation axis, obtain the first data set of pixel offsets at different deflection angles.
[0083] Similarly, if Figure 5 As shown, with the Z axis as the rotation axis, between -10° and 10° ("-" represents counterclockwise rotation, and no sign represents clockwise rotation), more than ten groups of angles are changed at arbitrary deflection angles. Each time the angle changes, the pixel offset of the projected image relative to the standard rectangular projection is recorded, and the third data group is obtained: [( 1,(x1,y1))( 2, (x2, y2))……( i,(xi,yi))……( q,(xq,yq))], where i is the angle of deflection with Z axis as the rotation axis, (xi, yi) is the corresponding pixel offset, and q is the marker quantity.
[0084] S3: Obtain a correction function by fitting the marker data.
[0085] (1) Fit the first data set as a first polynomial to obtain the corresponding relationship between the first deflection angle on the X axis and the first pixel offset:
[0086] wherein, is the polynomial coefficient, is the pixel offset.
[0087] (2) Fit the second data set as a second polynomial to obtain the corresponding relationship between the second deflection angle on the Y axis and the second pixel offset.
[0088] wherein, is the polynomial coefficient, is the pixel offset.
[0089] (3) Fit the third data set as a third polynomial to obtain the corresponding relationship between the third deflection angle on the Z axis and the third pixel offset.
[0090] wherein, is the polynomial coefficient, is the pixel offset.
[0091] The above, through the tof (time of flight) sensor, the distance data (d1, d2, d3, d4) of the four vertices of the laser television distance projection picture is obtained, and the three-dimensional coordinates (x, y, z) are converted through each distance d, the direction vector of the measuring point relative to the sensor is calculated, the geometric relationship between the vectors is found, and the angle information is calculated by using the trigonometric function.
[0092] S4: Compensation calibration.
[0093] In actual application, the deflection in X, Y, and Z directions is not always single change, when two or three directions are deflected at the same time, , and the corresponding offsets in the three angles have mutual influence, and the purpose of this step is to compensate the mutually influenced offsets, so as to eliminate their influence and better improve the correction effect.
[0094] It includes:
[0095] (1) Obtain a compensation data set of the deflection angle and pixel offset relationship in XYZ three angles.
[0096] Randomly generate multiple deflections at three angles XYZ at the same time, record the pixel offset at different angles: ; wherein, is the th data point, (Y) is the corresponding pixel offset.
[0097] (2) Establish a polynomial regression model according to the compensation data set.
[0098] Assuming that a polynomial model of order p is used, taking the X direction of the pixel coordinate system as an example, the pixel offset can be expressed as:
[0099] ; wherein, is the regression coefficient, is the order of the polynomial and the index of the interaction term, representing the power of each variable in the polynomial. Specifically: is the power related to , indicating the number of appearances in the polynomial; is the power related to , indicating the number of appearances in the polynomial; is the power related to , indicating the number of appearances in the polynomial.
[0100] Referring to the X direction, the Y direction is established in the same way to establish the pixel offset .
[0101] (3) Use the least squares method to solve the regression coefficients of the polynomial regression model.
[0102] Assuming that the design matrix in the least squares method solving process is (X), and the offset vector is (y), the regression coefficient (taking b as an example) can be obtained by the following formula:
[0103]
[0104] Wherein, the construction of the design matrix involves converting the input features (deflection angles in the invention ( ), ( ), ( ) and their interaction terms) into matrix form for regression analysis.
[0105] (4) Put the regression coefficient into the polynomial regression model to get the compensation model.
[0106] All the regression coefficients are calculated according to different offset vectors, and are brought into the constructed polynomial model to obtain the offset error caused by mutual influence in three directions.
[0107] After the data relationship between the position change of the projection device and the corresponding pixel offset is obtained through data collection, fitting and modeling, the data is stored in the storage unit.
[0108] When the projection device is in use, such as Figure 6 Geometric correction is implemented according to the following steps.
[0109] S21: Obtain the three-dimensional position information detected by the attitude sensor, and determine whether the position of the projection device has changed.
[0110] If the three-dimensional position has not changed, the projection can be implemented according to the normal projection steps, and if the three-dimensional position has changed, step S22 is executed.
[0111] S22: Project a correction image.
[0112] The correction image is a checkerboard correction image as shown in Figure 7 The checkerboard correction image is projected onto the projection screen, and at this time an irregular checkerboard image appears.
[0113] S23: Obtain the first deflection angle, the second deflection angle and / or the third deflection angle of the projection device according to the three-dimensional position information and the initial position information.
[0114] The first deflection angle is the angle of deflection of the projection device relative to the initial position with the X coordinate axis as the rotation axis, the second deflection angle is the angle of deflection of the projection device relative to the initial position with the Y coordinate axis as the rotation axis, and the third deflection angle is the angle of deflection of the projection device relative to the initial position with the X coordinate axis as the rotation axis. The initial position information is the position of the projection device when it can normally project.
[0115] The first deflection angle, the second deflection angle and the third deflection angle may exist simultaneously, one, two or three, for example, when the projection device only rotates around the Z axis, only the third deflection angle occurs.
[0116] The attitude sensor is installed at the center of the projection device, and the tof sensor is taken as an example. The four distance data d1, d2, d3 and d4 of the tof sensor to the four vertices in the distance diagram are obtained at the initial projection position of normal projection, and each distance d is converted into three-dimensional coordinates and stored. When the position of the projection device changes, the deflection angle is calculated by finding the geometric relationship between the vectors and the trigonometric functions of each measurement point relative to the sensor direction vector. As shown in Figure 7In the figure, the green fluorescent frame is a projection screen, the black-and-white checkerboard is a projection area, the red origin is an array projected by the tof sensor when the initial projection position of the tof sensor is normally projected, and the red area is a region to be corrected in the distorted image.
[0117] S24: Determine the first pixel offset, the second pixel offset, and / or the third pixel offset based on the first deflection angle, the second deflection angle, and the third deflection angle.
[0118] The correction function obtained in step S3 is called from the storage unit, and the deflection angle is brought into the function to obtain the pixel offset. For example, when the projection device is deflected by an angle with the Z axis as the rotation axis, the correction function corresponding to the Z axis is called, the third deflection angle is brought in, and the third pixel offset is obtained.
[0119] S25: Obtain the pixel offset correction value by using the compensation model constructed based on the deflection angle and the pixel offset, and compensate the first pixel offset, the second pixel offset, and / or the third pixel offset by using the pixel offset correction value.
[0120] The constructed polynomial model is called, the first deflection angle, the second deflection angle, and / or the third deflection angle are brought in, the pixel offset correction value is obtained, and the first pixel offset, the second pixel offset, and / or the third pixel offset obtained in step S24 are compensated by using the pixel offset correction value to obtain the compensation data.
[0121] S26: Correct the corrected image into a rectangular projection image by using the compensated first pixel offset, the second pixel offset, and / or the third pixel offset.
[0122] As Figure 8 shown is a checkerboard image corrected into a rectangle.
[0123] S27: Obtain the pixel coordinates of the frame of the projection screen, and obtain the corrected projection coordinates based on the pixel coordinates of the frame of the projection screen and the pixel coordinates of the rectangular projection image.
[0124] In the embodiment of the present application, the fluorescent material is arranged on the frame of the projection screen to form a fluorescent frame. After the distorted image is corrected into a rectangular projection image, the projection area is photographed by the camera to obtain an image including the fluorescent frame.
[0125] In the embodiment of the present application, the photographed image can be used to determine whether the corrected image is a standard rectangle before the corrected projection coordinates are calculated. That is, the two are compared to obtain the deviation therebetween. When the deviation is large, the above correction steps are repeated until the corrected rectangular projection image meets the requirements of the standard rectangle.
[0126] From Figure 8As can be seen, after the rectangular correction, the projection area is still outside the frame of the projection screen, and it is still needed to be constrained within the frame of the projection screen, the present application can simply and quickly determine the pixel coordinates of the screen frame by detecting the fluorescent frame, calculate the coordinates of the four vertices according to the pixel coordinates of the frame, and calculate the pixel coordinates of the four vertices of the rectangular projection image according to the shooting image, adopt
[0127]
[0128] obtain the corrected projection coordinates; wherein 、 the corrected projection coordinates, and the offset amount of the pixel coordinates of the four vertices of the rectangular projection image relative to the pixel coordinates of the four vertices of the frame of the projection screen in the x direction and the y direction, which is calculated according to the coordinates of the four vertices of the fluorescent frame and the coordinates of the four vertices of the rectangular projection image; x and y are the pixel coordinates of the four vertices of the rectangular projection image.
[0129] The corrected projection image can be judged again by the camera shooting whether it enters the projection screen, if not, repeat the coordinate calculation.
[0130] S28: correct the projection image to be projected by using the corrected projection coordinates.
[0131] The image file to be projected is written into the display control chip of the projection device, and the projection controller controls the display control chip of the device to complete the correction according to the above steps, and the corrected projection is as shown in Figure 9 .
[0132] The present application also proposes a projection device based on the above-mentioned projection geometric correction method, as shown in Figure 10 , comprising:
[0133] The attitude sensor 1 is used to obtain the three-dimensional position information of the projection device.
[0134] The projection unit 2 is controlled by the projection controller 3 to project the image to be projected on the projection screen 4.
[0135] The projection controller is configured with:
[0136] The sensing unit 31 is used to obtain the three-dimensional position information detected by the attitude sensor 1, and judge whether the three-dimensional position information changes.
[0137] The projection control unit 32 is used to control the projection unit 2 to project the correction image when the three-dimensional position information changes.
[0138] The first correction unit 33 is configured to obtain a first deflection angle, a second deflection angle and / or a third deflection angle of the projection device according to the three-dimensional position information and the initial position information; determine a first pixel offset, a second pixel offset and / or a third pixel offset based on the first deflection angle, the second deflection angle and / or the third deflection angle; wherein the first deflection angle is an angle of the projection device deflected relative to the initial position with the X coordinate axis as the rotation axis, the second deflection angle is an angle of the projection device deflected relative to the initial position with the Y coordinate axis as the rotation axis, and the third deflection angle is an angle of the projection device deflected relative to the initial position with the X coordinate axis as the rotation axis.
[0139] The second correction unit 34 is configured to obtain a pixel offset correction value by using a compensation model constructed based on the deflection angle and the pixel offset, and compensate the first pixel offset, the second pixel offset and / or the third pixel offset by using the pixel offset correction value.
[0140] The rectangular correction judgment unit 35 is configured to judge a deviation of the corrected image from the standard rectangle after the first correction and the second correction, and repeat the first correction and the second correction until the corrected image is a rectangular projection image when the deviation is greater than a threshold value.
[0141] The third correction unit 36 is configured to obtain pixel coordinates of a projection screen frame after the projection control unit controls the projection unit to correct the corrected image into a rectangular projection image by using the compensated first pixel offset, the second pixel offset and / or the third pixel offset, and obtain corrected projection coordinates based on the pixel coordinates of the projection screen frame and pixel coordinates of the rectangular projection image, so that the projection control unit corrects a projection image to be projected by using the corrected projection coordinates. In the embodiment of the present application, the third correction unit corrects the projection image to be projected in the following manner: obtaining pixel coordinates of four vertices of the projection screen frame and pixel coordinates of four vertices of the rectangular projection image; obtaining the corrected projection coordinates by using the pixel coordinates of the four vertices of the projection screen frame and the pixel coordinates of the four vertices of the rectangular projection image. obtaining the corrected projection coordinates; wherein 、 the corrected projection coordinates are and offsets of the pixel coordinates of the four vertices of the rectangular projection image relative to the pixel coordinates of the four vertices of the projection screen frame in the x direction and the y direction; x and y are the pixel coordinates of the four vertices of the rectangular projection image; wherein the projection screen frame is calibrated by using a fluorescent material.
[0142] The projection device further comprises:
[0143] The calibration unit 5 is used for fitting the first data set, the second data set and the third data set into the first polynomial, the second polynomial and the third polynomial respectively, so as to obtain the corresponding relationship between the first deflection angle and the first pixel offset in the X-axis direction, the corresponding relationship between the second deflection angle and the second pixel offset in the Y-axis direction and the corresponding relationship between the third deflection angle and the third pixel offset in the Z-axis direction; wherein the X-axis, the Y-axis and the Z-axis are three-dimensional coordinate systems established with the center of the projection device as the origin; the first data set is a data set of pixel offsets under different deflection angles with the X-axis as the rotation shaft; the second data set is a data set of pixel offsets under different deflection angles with the Y-axis as the rotation shaft; and the third data set is a data set of pixel offsets under different deflection angles with the Z-axis as the rotation shaft.
[0144] The compensation calibration unit 6 is used for obtaining a compensation data set of the deflection angle and the pixel offset relationship in the XYZ three angles; establishing a polynomial regression model according to the compensation data set; solving the regression coefficient of the polynomial regression model by using the least square method; and bringing the regression coefficient into the polynomial regression model to obtain a compensation model.
[0145] The projection device of the present application can correct the image to a rectangular projection image by using the relationship between the deflection angle and the pixel offset when the position of the projection device is offset, and then correct the rectangular projection image to the projection screen, so that the projection device which has been offset in position can project normally on the projection screen without adjusting the position, thereby ensuring the viewing effect and reducing the operation difficulty of the user; in the projection device, the posture sensor is a tof (time of flight sensor) which can achieve millisecond level calculation accuracy and hundred frames per second level speed, so as to improve the accuracy and speed of the correction algorithm; the frame of the projection screen is calibrated by using fluorescent material, the fluorescent frame is clear, and the calibration accuracy of the four vertices of the projection screen can be improved, thereby improving the correction accuracy of the algorithm for the distorted projection image.
[0146] It should be noted that in the specific implementation process, the above-mentioned method part can be realized by a processor in the form of hardware executing computer execution instructions in the form of software stored in the memory, which will not be described here, and the programs corresponding to the actions executed can be stored in the computer readable storage device of the system in the form of software, so that the processor calls and executes the operations corresponding to the above various modules.
[0147] The computer readable storage device in the above can include a volatile memory such as a random access memory, and can also include a non-volatile memory such as a read-only memory, a flash memory, a hard disk or a solid state disk, and can also include a combination of the above kinds of memories.
[0148] The processor mentioned above can also be a collective term for a plurality of processing elements. For example, the processor can be a central processing unit, or other general purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, etc. The general purpose processor can be a microprocessor or can be any conventional processor, etc., and can also be a special purpose processor.
[0149] It should be noted that the above description is not a limitation of the present application, and the present application is not limited to the above examples. Changes, modifications, additions or substitutions made by those skilled in the art within the spirit and scope of the present application should also be within the protection scope of the present application.
Claims
1. A projection geometry correction method, applied to a projection device, wherein the projection device is configured with: A posture sensor is used to obtain three-dimensional position information of the projection device; It is characterized by: Correction methods include: Obtain the three-dimensional position information detected by the attitude sensor; when the three-dimensional position information changes, perform the following steps: Projection correction image; Primary calibration: obtaining a first deflection angle, a second deflection angle, and a third deflection angle of the projection device based on the three-dimensional position information and the initial position information; determining a first pixel offset, a second pixel offset, and a third pixel offset based on the first deflection angle, the second deflection angle, and the third deflection angle; wherein the first deflection angle is an angle at which the projection device is deflected relative to the initial position with the X-coordinate axis as the rotation axis, the second deflection angle is an angle at which the projection device is deflected relative to the initial position with the Y-coordinate axis as the rotation axis, and the third deflection angle is an angle at which the projection device is deflected relative to the initial position with the Z-coordinate axis as the rotation axis; Secondary correction: using a compensation model based on the deflection angle and the pixel offset to obtain a pixel offset correction value, and using the pixel offset correction value to compensate for the first pixel offset, the second pixel offset, and / or the third pixel offset; Correcting the corrected image into a rectangular projection image using the compensated first pixel offset, second pixel offset, and / or third pixel offset; Three-stage correction: obtain the pixel coordinates of the projection screen border, and obtain the corrected projection coordinates based on the pixel coordinates of the projection screen border and the pixel coordinates of the rectangular projection image; The projected image to be projected is corrected using the corrected projection coordinates.
2. The projection geometry correction method according to claim 1, characterized in that: The method further comprises a calibration step, comprising: Establish a three-dimensional coordinate system with the center of the projection device as the origin; Taking the X-axis as the rotation axis, obtaining a first data set of pixel offsets at different deflection angles; Taking the Y axis as the rotation axis, obtaining a second data set of pixel offsets at different deflection angles; Taking the Z axis as the rotation axis, obtaining a third data set of pixel offsets at different deflection angles; The first data group, the second data group, and the third data group are fitted into a first polynomial, a second polynomial, and a third polynomial, respectively, to obtain a correspondence between a first deflection angle in the X-axis direction and a first pixel offset, a correspondence between a second deflection angle in the Y-direction and a second pixel offset, and a correspondence between a third deflection angle in the Z-direction and a third pixel offset.
3. The projection geometry correction method according to claim 2, characterized in that: The method further comprises the step of compensation calibration, comprising: Obtaining a compensation data set of the relationship between the deflection angle and the pixel offset at three angles of XYZ; A polynomial regression model is established based on the compensated data set; Use the least squares method to solve the regression coefficients of the polynomial regression model; Substituting the regression coefficients into the polynomial regression model, the compensation model is obtained.
4. The projection geometry correction method according to claim 1, characterized in that: After the primary calibration and the secondary calibration, the method further comprises: The deviation between the corrected image and the standard rectangle is determined, and when the deviation is greater than a threshold, the first correction and the second correction are repeated until the corrected image is a rectangular projection image.
5. The projection geometry correction method according to claim 1, characterized in that: The three calibrations specifically include: Get the pixel coordinates of the four vertices of the projection screen border and the pixel coordinates of the four vertices of the rectangular projection image; use Get the corrected projection coordinates; 、 To correct the projection coordinates, and is the offset in the x and y directions of the pixel coordinates of the vertices of the rectangular projection image relative to the pixel coordinates of the vertices of the projection screen border; x and y are the pixel coordinates of the vertices of the rectangular projection image.
6. A projection device comprising: A posture sensor is used to obtain three-dimensional position information of the projection device; The projection unit is controlled by the projection controller and projects the image to be projected onto the projection screen; It is characterized by: The projection controller is configured with: A sensing unit, configured to obtain three-dimensional position information detected by the posture sensor and determine whether the three-dimensional position information has changed; a projection control unit, configured to control the projection unit to project a correction image when the three-dimensional position information changes; a primary correction unit, configured to obtain a first deflection angle, a second deflection angle, and a third deflection angle of the projection device based on the three-dimensional position information and the initial position information; and determine a first pixel offset, a second pixel offset, and a third pixel offset based on the first deflection angle, the second deflection angle, and the third deflection angle; wherein the first deflection angle is an angle at which the projection device is deflected relative to the initial position with the X-coordinate axis as the rotation axis, the second deflection angle is an angle at which the projection device is deflected relative to the initial position with the Y-coordinate axis as the rotation axis, and the third deflection angle is an angle at which the projection device is deflected relative to the initial position with the Z-coordinate axis as the rotation axis; a secondary correction unit, configured to obtain a pixel offset correction value using a compensation model constructed based on the deflection angle and the pixel offset, and to compensate the first pixel offset, the second pixel offset, and / or the third pixel offset using the pixel offset correction value; The tertiary correction unit is used to obtain the pixel coordinates of the projection screen border after the projection control unit controls the projection unit to use the compensated first pixel offset, second pixel offset and / or third pixel offset to correct the correction image into a rectangular projection image, and obtain the corrected projection coordinates based on the pixel coordinates of the projection screen border and the pixel coordinates of the rectangular projection image, so that the projection control unit uses the corrected projection coordinates to correct the projection image to be projected.
7. The projection device according to claim 6, characterized in that The projection device further comprises: a calibration unit, configured to fit the first data set, the second data set, and the third data set to a first polynomial, a second polynomial, and a third polynomial, respectively, to obtain a correspondence between a first deflection angle in the X-axis direction and a first pixel offset, a correspondence between a second deflection angle in the Y-axis direction and a second pixel offset, and a correspondence between a third deflection angle in the Z-axis direction and a third pixel offset; Among them, the X-axis, Y-axis and Z-axis are used to establish a three-dimensional coordinate system with the center of the projection device as the origin; the first data group is a data group for obtaining pixel offsets at different deflection angles with the X-axis as the rotation axis; the second data group is a data group for obtaining pixel offsets at different deflection angles with the Y-axis as the rotation axis; and the third data group is a data group for obtaining pixel offsets at different deflection angles with the Z-axis as the rotation axis.
8. The projection device according to claim 7, characterized in that The projection device further comprises: The compensation calibration unit is used to obtain a compensation data set of the relationship between the deflection angle and the pixel offset at three angles of XYZ; establish a polynomial regression model based on the compensation data set; use the least squares method to solve the regression coefficient of the polynomial regression model; and substitute the regression coefficient into the polynomial regression model to obtain the compensation model.
9. The projection device according to claim 6, wherein: The projection controller further includes: The rectangle correction judgment unit is used to judge the deviation between the corrected image and the standard rectangle after the first correction and the second correction, and repeat the first correction and the second correction when the deviation is greater than a threshold until the corrected image is a rectangular projection image.
10. The projection device according to claim 6, wherein: The three-dimensional correction unit corrects the projected image as follows: Get the pixel coordinates of the four vertices of the projection screen border and the pixel coordinates of the four vertices of the rectangular projection image; use Get the corrected projection coordinates; 、 To correct the projection coordinates, and is the offset in the x and y directions of the pixel coordinates of the vertices of the rectangular projection image relative to the pixel coordinates of the vertices of the projection screen border; x and y are the pixel coordinates of the vertices of the rectangular projection image; Wherein, the projection screen frame is calibrated using fluorescent material.
Citation Information
Patent Citations
Projection method, projection equipment and computer readable storage medium
CN110876046A
Projection calibration method and apparatus, electronic device and storage medium
WO2023124777A1