Seamless keystone correction method, projection equipment and storage medium
By acquiring the projection device's attitude angle and transformation matrix, the projection area is automatically adjusted, solving the trapezoidal correction problem when the projection device is not directly facing the wall. This achieves seamless, fast, and intelligent rectangular correction, improving user experience and correction accuracy.
Patent Information
- Application Number
- CN202310263417.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-17
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2043-03-17
AI Technical Summary
Existing projection devices cannot quickly and intelligently correct trapezoidal images to rectangles when projecting onto surfaces other than directly onto a wall, which affects user experience and is cumbersome to operate.
By acquiring the attitude angle of the projection device, and using preset rotation transformation relationships and projection transformation matrices, the projection area is automatically adjusted to achieve seamless trapezoidal correction. This includes acquiring the attitude angle, constructing a mapping cuboid, perspective projection transformation, and window transformation, gradually mapping to a rectangular reference area and adjusting the projection area.
It achieves fast and intelligent projection image correction without the need for projection feature maps, adapts to different posture angles, improves user experience, and enhances correction accuracy.
Smart Images

Figure CN116320339B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of projection device image correction, and more particularly to a non-intrusive keystone correction method, projection device, and storage medium. Background Technology
[0002] When a projector projects onto a wall directly, the image projected onto the wall is rectangular. However, in real-world applications, projectors cannot be positioned directly opposite the wall, and users often need to adjust the projector's position. In such cases, the projector tilts relative to the wall, and the projected image becomes trapezoidal instead of rectangular, negatively impacting the user's viewing experience. Therefore, it's necessary to correct the trapezoidal image back to a rectangular one. Current projection trapezoidal correction technology primarily involves projecting feature maps, such as QR codes, and then capturing these feature maps with a camera. A homography matrix is then established based on the captured image and existing feature maps within the system. This homography matrix is used to adjust the range of the subsequent projected image, thus achieving trapezoidal correction. However, this method requires projecting a QR code first, and typically requires the user to wait several seconds for focusing, capturing the image, recognizing the feature map, and performing calculations, which degrades the user experience.
[0003] There are also a few seamless keystone correction technologies that do not require a projection feature map. However, these technologies need to use a distance sensor to collect projection distances in several directions to calculate the tilt angle of the projector relative to the wall. Then, based on these parameters and the relationship between the preset tilt angle and the correction image, the projected image is adjusted. While this achieves seamless keystone correction, it requires testing the projected image at multiple tilt angles before the projector leaves the factory. This is cumbersome, not very intelligent, and can only correct for specific angles, failing to flexibly handle various side projection situations. Furthermore, it requires a depth sensor to detect the tilt angle of the projector relative to the screen. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention proposes a seamless keystone correction method, projection device, and storage medium, which solves the problems of poor user experience, cumbersome operation, and lack of intelligence in current projection image correction technologies, and achieves seamless, fast, and intelligent projection image correction.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] A non-intrusive trapezoidal correction method includes the following steps:
[0007] Obtain the attitude angle of the projection device;
[0008] Based on the preset rotation transformation relationship, the attitude angle, and the original rectangular projection area in the first spatial coordinate system, the first rectangular reference area is obtained;
[0009] Based on the projection transformation relationship, the first rectangular reference region is mapped to the first plane to obtain the second trapezoidal reference region, and the first plane is determined by the first rectangular reference region;
[0010] Obtain a second rectangular reference area with a preset aspect ratio within the second trapezoidal reference area;
[0011] The second rectangular reference region is mapped to the first rectangular reference region according to the inverse transformation relationship of the projection transformation relationship to obtain the third trapezoidal reference region;
[0012] The third trapezoidal reference region is transformed inversely according to the rotational transformation relationship to obtain the fourth trapezoidal reference region;
[0013] The projection area is adjusted based on the fourth trapezoidal reference area.
[0014] In some embodiments, the present invention further includes the following technical features:
[0015] The step of mapping the first rectangular reference region onto the first plane to obtain the second trapezoidal reference region based on the projection transformation relationship includes the following steps:
[0016] Based on the first rectangular reference region, a mapped cuboid is constructed in the first spatial coordinate system. The length, width, and height of the mapped cuboid are parallel to the three coordinate axes, and the plane with the smallest value of the mapped cuboid is the first plane.
[0017] The second trapezoidal reference region is obtained by the intersection of the lines connecting each vertex of the first rectangular reference region to the origin of the first spatial coordinate system on the first plane.
[0018] The projection transformation relationship includes a perspective projection transformation matrix M22, which is used to transform the first rectangular reference region to obtain the second trapezoidal reference region.
[0019]
[0020] Where n is the coordinate value with the smallest absolute value in the Z-axis direction of the mapped cuboid, and f is the coordinate value with the largest absolute value in the Z-axis direction of the mapped cuboid.
[0021] Obtaining a second rectangular reference region with a preset aspect ratio within the second trapezoidal reference region includes the following steps:
[0022] According to the compression projection transformation relationship, the second trapezoidal reference region is reduced to a preset unit space to obtain the first transition region;
[0023] Based on a preset resolution, the first transition region is magnified according to the window transformation relationship to obtain the second transition region;
[0024] In the second transition region, a second transition rectangle reference region with a preset aspect ratio is obtained;
[0025] The second transition rectangular reference region is transformed according to the inverse transformation relationship of the compression projection transformation relationship and the window transformation relationship to obtain the second rectangular reference region in the second trapezoidal reference region.
[0026] The compressed projection transformation relationship includes a compressed projection transformation matrix M21, which is used to shrink the second trapezoidal reference region to a preset unit space.
[0027]
[0028] Wherein, n is the coordinate value with the smallest absolute value in the Z-axis direction of the mapped cuboid, f is the coordinate value with the largest absolute value in the Z-axis direction of the mapped cuboid, r is the maximum coordinate value in the X-axis direction of the mapped cuboid, l is the minimum coordinate value in the X-axis direction of the mapped cuboid, t is the maximum coordinate value in the Y-axis direction of the mapped cuboid, and b is the minimum coordinate value in the Y-axis direction of the mapped cuboid.
[0029] The window transformation relationship includes a window transformation matrix M23, which is used to magnify the first transition region to obtain a second transition region, that is, to magnify the preset unit space into a window with the preset resolution;
[0030]
[0031] Wherein, W is the horizontal resolution of the preset resolution, and H is the vertical resolution of the preset resolution.
[0032] The step of mapping the second rectangular reference region onto the first rectangular reference region according to the inverse transformation relationship of the projection transformation relationship to obtain the third trapezoidal reference region includes:
[0033] Based on the coordinates of any three different positions in the first rectangular reference region, the plane equation of the first rectangular reference region in the first spatial coordinate system is determined as ax + by + cz + d = 0.
[0034] Substitute the x and y coordinates of each vertex of the second rectangular reference region into the plane equation to obtain the corresponding z value, and use each z value as the z coordinate of each vertex in the second rectangular reference region;
[0035] The second rectangular reference region is mapped to the first rectangular reference region according to the inverse transformation relationship of the projection transformation relationship to obtain the third trapezoidal reference region.
[0036] The first plane is parallel to the original rectangular projection area and is located between the original rectangular projection area and the origin of the first spatial coordinate system.
[0037] The present invention also provides a projection device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the steps of the above-described non-intrusive keystone correction method.
[0038] The present invention also provides a storage medium storing a computer program thereon, characterized in that the computer program, when executed by a processor, implements the steps of the above-described non-intrusive trapezoidal correction method.
[0039] The seamless trapezoidal correction method provided by this invention does not require projected feature maps. After acquiring the attitude angle, it only needs to obtain a first rectangular reference region based on a preset rotation transformation relationship and the original rectangular projection region. Then, based on the projection transformation relationship, the first rectangular reference region is mapped onto a first plane to obtain a second trapezoidal reference region. Within the second trapezoidal reference region, a second rectangular reference region with a preset aspect ratio is obtained. Next, the second rectangular reference region is mapped back to the first rectangular reference region according to the inverse transformation relationship of the projection transformation relationship to obtain a third trapezoidal reference region. Then, the third trapezoidal reference region is transformed according to the inverse transformation relationship of the rotation transformation relationship to obtain a fourth trapezoidal reference region. Finally, the projection region is adjusted based on the fourth trapezoidal reference region. All the above steps are completed automatically and can adapt to different attitude angles. It does not require reliance on a limited number of pre-calibrated attitude angle transformation relationships, allowing users to complete trapezoidal correction without perceiving any correction operation, thus improving the user experience. Furthermore, the method of this invention considers more computational factors, resulting in higher intelligence and correction accuracy. Attached Figure Description
[0040] Figure 1 This is a schematic diagram of the rotation direction of each attitude angle in an embodiment of the present invention;
[0041] Figure 2 This is a top-view diagram of the projection device in front projection mode;
[0042] Figure 3 This is a top view of the projection device in the side projection state in an embodiment of the present invention;
[0043] Figure 4 This is a flowchart illustrating a non-intrusive trapezoidal correction method provided in one embodiment of the present invention;
[0044] Figure 5 This is a schematic diagram of the original rectangular projection area S1 in the first spatial coordinate system in an embodiment of the present invention;
[0045] Figure 6 This is a schematic diagram of the first rectangular reference area S2 in the first spatial coordinate system in an embodiment of the present invention;
[0046] Figure 6a This is a schematic diagram of the mapped cuboid in an embodiment of the present invention;
[0047] Figure 6b This is a schematic diagram of the second trapezoidal reference region S3 in the first spatial coordinate system in an embodiment of the present invention;
[0048] Figure 7 This is a schematic diagram of the first transition region S30 in the first spatial coordinate system in an embodiment of the present invention;
[0049] Figure 8 This is a schematic diagram of the second transition region S31 in the first spatial coordinate system in an embodiment of the present invention;
[0050] Figure 9 This is a schematic diagram of the third trapezoidal reference region S5 in the first spatial coordinate system in an embodiment of the present invention;
[0051] Figure 10 This is a schematic diagram of the fourth trapezoidal reference region S6 in the first spatial coordinate system in an embodiment of the present invention;
[0052] Figure 11 This is a schematic diagram of the window configuration in an embodiment of the present invention;
[0053] Figure 12 This is a schematic diagram of another window configuration in an embodiment of the present invention;
[0054] Figure 13 This is an internal structural diagram of the computer device in an embodiment of the present invention;
[0055] In the diagram, 1-lens light-emitting surface, 2-projection light path area, 3-center point. Detailed Implementation
[0056] To make the technical solutions and advantages of the present invention clearer, the technical solutions of the embodiments of the present invention will be fully described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0057] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0058] like Figures 1 to 3 As shown, Figure 1 This illustrates the rotational relationships of the three attitude angles of the projection device. Figure 2 This is a top view diagram of the projection device projecting onto screen 10. Figure 3 This is a top-down view of the projection device when it is tilted relative to screen 10. 20 represents the theoretical position of the projected image when screen 10 is not present. When the projection device projects without its light output direction directly facing the screen, it can be understood as being in a side-projection state. When the projection device is directly facing screen 10, the image projected onto screen 10 is generally rectangular. However, when the projection device is tilted relative to screen 10 and in a side-projection state, the image shape will change from a rectangle to a trapezoid, affecting the user's viewing experience. Therefore, it is necessary to correct the shape of the projected image so that users facing screen 10 can still observe a rectangular projected image when the projection device is in a side-projection state.
[0059] like Figure 4 As shown, in some embodiments of the present invention, the non-intrusive keystone correction method can correct the image according to the following steps:
[0060] A1: Obtain the attitude angle of the projection device;
[0061] The projection device in this embodiment of the invention is equipped with an angle sensor to obtain attitude angles, such as a gyroscope. The gyroscope can measure the attitude angles (pitch angle and roll angle) of the projection device. The other attitude angle, yaw angle, is generally calculated using distance information measured by a depth sensor (such as a TOF sensor or a structured light sensor) and trigonometric relationships. The specific calculation method is quite common and will not be elaborated here. For long-focal-length projection devices, the rotation axis of the yaw angle is the Y-axis, which can be understood as perpendicular to the ground; the rotation of the pitch angle is the X-axis; and the rotation of the roll angle is the Z-axis, which can be understood as parallel to the light output axis of the projection device. Any tilt state of the projection device can be represented by the components of these three attitude angles.
[0062] A2: Based on the preset rotation transformation relationship, the attitude angle, and the original rectangular projection area S1 in the first spatial coordinate system, the first rectangular reference area S2 is obtained;
[0063] like Figure 5As shown, the image correction algorithm of the projection device presets an original rectangular projection area S1 in a first spatial coordinate system. This original rectangular projection area S1 has preset initial coordinates and size in the first spatial coordinate system, which corresponds to the projection environment of the projection device. The original rectangular projection area S1 corresponds to the projected image in that projection environment. For example, in... Figure 5 In the illustrated embodiment, the bottom edge of the original rectangular projection area S1 is parallel to the X-axis and passes through the Z-axis. The z-coordinate of the original rectangular projection area S1 is f0. By default, the projection device projects according to the size of the original rectangular projection area S1. Furthermore, under normal circumstances, the position of the original rectangular projection area S1 relative to the origin of the first spatial coordinate system actually corresponds to the position of the light-emitting surface on the projection lens relative to the optical modulation device DMD (spatial light modulator) in the projection device. To reflect the actual rotation of the projected image in the projection environment, when the projection device tilts relative to the screen, the projected image in the projection environment should rotate synchronously. Therefore, it is necessary to first determine the rotation matrix M1 based on a preset rotation transformation relationship and the attitude angle.
[0064]
[0065] The rotation matrix M1 corresponds to the rotation of the original rectangular projection area S1 relative to the origin of the first spatial coordinate system by a certain attitude angle, where Y is the yaw angle, R is the roll angle, and P is the picth angle. After the three-dimensional coordinates of each vertex of the original rectangular projection area S1 are calculated using the rotation matrix M1, a tilted image reflecting the rotation of the projection device can be obtained. Figure 6 The first rectangular reference area S2 in the middle.
[0066] Specifically, based on the vertex coordinates of the original rectangular projection region S1 in the first spatial coordinate system and the aforementioned rotation matrix M1, the vertex coordinates of the first rectangular reference region S2 are obtained.
[0067] like Figure 5 As shown, in the first spatial coordinate system, all points in the original rectangular projection area S1 have the same z-coordinate, which can be the distance f0 from the spatial light modulator to the center of the lens. The projection device projects an image based on the original rectangular projection area S1 in this coordinate system. When the projection device is facing the wall, the projected image will have no trapezoidal distortion and will be exactly rectangular. The resolution of S1 is generally 1920*1080, that is, the width W is 1920 and the height H is 1080, but other common resolutions are also possible.
[0068] like Figure 6As shown, when the coordinates of the four vertices of S1 are applied to the rotation matrix M1, the coordinates of the four vertices of the first rectangular reference region S2 can be obtained in the same coordinate system. S2 is a region obtained by rotating S1 based on various attitude angles, and the rotation angles of S2 correspond to the rotation attitude angles of the projection device. In the first spatial coordinate system, the shape and area of S2 are the same as those of S1, also a rectangle, only rotated. The coordinate calculations are as follows:
[0069]
[0070] S1x is the x-coordinate of a vertex of S1 in the first spatial coordinate system, S1y is the y-coordinate of the same vertex of S1 in the first spatial coordinate system, S1z is the z-coordinate of the same vertex of S1 in the first spatial coordinate system, S2x is the x-coordinate of a vertex of S2 in the first spatial coordinate system, S2y is the y-coordinate of the same vertex of S2 in the first spatial coordinate system, S2z is the z-coordinate of the same vertex of S2 in the first spatial coordinate system, and K11 and K12 are arbitrary constants, which are taken as 1 in this example. Performing matrix operations between the coordinates of the four vertices of S1 and M1 respectively yields the corresponding four vertices of S2.
[0071] A3: Based on the projection transformation relationship, the first rectangular reference region S2 is mapped to the first plane to obtain the second trapezoidal reference region S3, and the first plane is determined by the first rectangular reference region S2;
[0072] In some embodiments, the first plane is parallel to the original rectangular projection area S1, and the first plane is located between the original rectangular projection area S1 and the origin of the first spatial coordinate system. The origin of the coordinate system can simulate the user's viewing position in the environment, while the first plane can be used to simulate a screen facing the user. Therefore, the projection of the first rectangular reference area S2 about the origin onto the first plane (i.e., the second trapezoidal reference area S3) can characterize the changed shape of the projected image observed by the user after side projection. Generally, it can be as follows... Figure 6 As shown, the original rectangular projection area S1 is parallel to the xy plane in the first spatial coordinate system. At this time, the first plane determined by the first rectangular reference area S2 is also parallel to the xy plane; however, the original rectangular projection area S1 can also be parallel to the xz plane or the yz plane.
[0073] In some embodiments, step A3 specifically includes steps A3-1 and A3-2, as detailed below:
[0074] A3-1: Construct a mapped cuboid (reference) in the first spatial coordinate system based on the first rectangular reference region S2. Figure 6a(dashed line portion), the length, width, and height of the mapped cuboid are parallel to the three coordinate axes, and the mapped cuboid is the smallest cuboid containing the first rectangular reference region S2. The plane with the smallest absolute value of the z-coordinate in the mapped cuboid is the first plane.
[0075] The coordinate parameters of the six faces of the mapped cuboid are as follows: n = nearplane(z), which is the z-coordinate of the face of the mapped cuboid closest to the origin, and in this embodiment, it can be understood as the coordinate value with the smallest absolute value in the Z-axis direction; f = farplane(z), which is the z-coordinate of the face of the mapped cuboid furthest from the origin, and in this embodiment, it can be understood as the coordinate value with the largest absolute value in the Z-axis direction; l = leftplane(x), which is the x-coordinate of the left face of the mapped cuboid, and in this embodiment, it can be understood as the coordinate value with the smallest absolute value in the X-axis direction; r = rightplane(x), which is the x-coordinate of the right face of the mapped cuboid, and in this embodiment, it can be understood as the coordinate value with the largest absolute value in the X-axis direction; b = bottomplane(y), which is the y-coordinate of the bottom face of the mapped cuboid, and in this embodiment, it can be understood as the coordinate value with the smallest absolute value in the Y-axis direction; t = topplane(y), which is the y-coordinate of the top face of the mapped cuboid, and in this embodiment, it can be understood as the coordinate value with the largest absolute value in the Y-axis direction.
[0076] The specific values of the six parameters depend on the coordinates of each vertex of S2, while the coordinates of S2 in the spatial coordinate system depend on the initial position of S1 and the subsequently measured attitude angles. These coordinates will change with the attitude angles as the projection device rotates each time, and are not unique values.
[0077] A3-2: The second trapezoidal reference region S3 is obtained by the intersection of the lines connecting each vertex of the first rectangular reference region S2 to the origin of the first spatial coordinate system on the first plane;
[0078] Based on the perspective projection transformation matrix M22, the four vertices in S2, which originally had different z-coordinates, can be remapped onto the same xy two-dimensional plane in the first spatial coordinate system according to the principle of near-large and far-small. That is, they can be mapped onto the surface of the mapped cuboid facing the Y-axis, resulting in the second trapezoidal reference region S3 in the first spatial coordinate system. Viewed along the Z-axis, the shape of S3 corresponds to the shape of the projected image seen by the user facing the wall when the projection device projects from the side.
[0079]
[0080] S3x is the x-coordinate of a vertex of S3 in the first spatial coordinate system, S3y is the y-coordinate of the vertex of S3 in the first spatial coordinate system, S3z is the z-coordinate of the vertex of S3 in the first spatial coordinate system, and K21 is an arbitrary constant, which is 1 in this example.
[0081] The projection transformation relationship includes a perspective projection transformation matrix M22, which is used to transform the first rectangular reference region S2 to obtain the second trapezoidal reference region S3.
[0082]
[0083] M22 is a perspective projection transformation matrix used to obtain the x and y values of each vertex of S2 after perspective projection onto the plane z=n. It mainly obtains the x and y coordinates of each vertex after M22 is applied to each vertex of S2. In fact, it can reflect the phenomenon of near objects appearing larger and far objects appearing smaller after the projection device is side-projected. Here, n is the coordinate value with the smallest absolute value in the Z-axis direction of the mapped cuboid, and f is the coordinate value with the largest absolute value in the Z-axis direction of the mapped cuboid.
[0084] A4: Obtain a second rectangular reference area S4 with a preset length-to-width ratio in the second trapezoidal reference area S3;
[0085] A rectangle with a preset aspect ratio is formed in S3, namely the second rectangular reference area S4. The aspect ratio of the rectangular area can be 16:9 or other common screen display ratios. Preferably, the rectangle with the largest area is formed in S3.
[0086] In some embodiments, step A4 further includes steps A4-1 to A4-4, as detailed below:
[0087] A4-1: According to the compression projection transformation relationship, the second trapezoidal reference region S3 is reduced to a preset unit space to obtain the first transition region S30 (e.g., Figure 7 );
[0088] The compressed projection transformation relationship includes the compressed projection transformation matrix M21.
[0089]
[0090] like Figures 6b to 7The transformation, M21, is a compression projection transformation matrix used to proportionally compress a two-dimensional or three-dimensional structure within a cuboid (whose six face coordinates are determined by l, b, n, r, t, f) into a cube with a side length of 2 (determined by x = -1, x = 1, y = -1, y = 1, z = -1, z = 1), where n is the coordinate value with the smallest absolute value in the Z-axis direction of the mapped cuboid, f is the coordinate value with the largest absolute value in the Z-axis direction of the mapped cuboid, and r is the coordinate of the mapped cuboid. The maximum coordinate in the X-axis direction, l is the minimum coordinate in the X-axis direction of the mapped cuboid, t is the maximum coordinate in the Y-axis direction of the mapped cuboid, and b is the minimum coordinate in the Y-axis direction of the mapped cuboid. This simplifies subsequent calculations, and the parameters in the subsequent window matrix M23 can be directly set to the desired resolution. After the operations of matrices M21 and M23, the resulting S31 is within a rectangular window of that resolution, and the size of S31 is close to the resolution of that window. Proportional compression means that the relative proportions of length, width, and height between two-dimensional or three-dimensional structures remain unchanged after compression.
[0091] A4-2: Based on a preset resolution and according to the window transformation relationship, the first transition region S30 is magnified to obtain the second transition region S31 (e.g., ...). Figure 8 );
[0092] The window transformation relationship includes a window transformation matrix M23, which is used to enlarge the preset unit space into a window with the preset resolution.
[0093]
[0094] The window transformation matrix M23 can enlarge the region formed by the aforementioned mapped vertices to a desired resolution window size, where W is the horizontal resolution and H is the vertical resolution. For example, W = 1920, H = 1080. Figures 7 to 8 The change in the size of the window can be compared to the projection area formed on the wall when the projector is originally facing the wall, while S31 can be compared to the trapezoidal area formed by the deformation of the projected image on the wall after the projector is side-projected.
[0095] After S2 undergoes matrix operations M22, M21, and M23 sequentially, a mapped plane (not shown in the figure) is obtained, compressed into a cube with a side length of 2 centered at the origin after projection perspective transformation. Since M21 compresses S3 into a cube with a side length of 2 centered at the origin, after performing the operation of M21, the size of this compressed plane S30 must be restored to be comparable to that of S1. In this embodiment, the compression projection transformation matrix M21, combined with the window matrix M23, allows for simpler and more accurate magnification of S3, accelerating computational efficiency and ensuring magnification accuracy.
[0096] A4-3: Obtain a second transition rectangle reference area S41 with a preset aspect ratio in the second transition area S31; Figure 8 In the middle, viewed along the Z-axis, the shape of S41 is equivalent to the shape of the corrected rectangular projection image seen by the user when looking at the side projection of the projector directly facing the wall.
[0097] A4-4: The second transition rectangular reference region S41 is transformed according to the inverse transformation relationship of the compression projection transformation relationship and the window transformation relationship to obtain the second rectangular reference region S4 in the second trapezoidal reference region S3;
[0098] The four vertices of the second transition rectangle reference region S41 in the first spatial coordinate system are respectively operated with the inverse matrices of M23 and M21 to obtain the second rectangle reference region S4. S4 must be inside S3.
[0099]
[0100] S41x is the x-coordinate of the vertex of S41 in the first spatial coordinate system, S41y is the y-coordinate of the vertex of S41 in the first spatial coordinate system, S41z is the z-coordinate of the vertex of S41 in the first spatial coordinate system, S4x is the x-coordinate of the vertex of S4 in the first spatial coordinate system, S4y is the y-coordinate of the vertex of S4 in the first spatial coordinate system, S4z is the z-coordinate of the vertex of S4 in the first spatial coordinate system, and K41 and K42 are arbitrary constants.
[0101] In some embodiments, the second rectangular reference region S4 is the rectangle with the largest area in the second trapezoidal reference region S3.
[0102] A5: Map the second rectangular reference region S4 to the first rectangular reference region S2 according to the inverse transformation relationship of the projection transformation relationship to obtain the third trapezoidal reference region S5 (e.g., Figure 9 ;
[0103] By performing operations on the four vertices of the second rectangular reference region S4 in the first spatial coordinate system with the inverse matrix of M22, the third trapezoidal reference region S5 is obtained. S5 must be within S2.
[0104]
[0105] S4x is the x-coordinate of the vertex of S4 in the first spatial coordinate system, S4y is the y-coordinate of the vertex of S4 in the first spatial coordinate system, S4z is the z-coordinate of the vertex of S4 in the first spatial coordinate system, S5x is the x-coordinate of the vertex of S5 in the first spatial coordinate system, S5y is the y-coordinate of the vertex of S5 in the first spatial coordinate system, S5z is the z-coordinate of the vertex of S5 in the first spatial coordinate system, and K51 and K41 are arbitrary constants, which are taken as 1 in this example.
[0106] In some embodiments, S4z can be obtained by the following methods:
[0107] Based on the coordinates of any three different positions in the first rectangular reference region S2, the plane equation of the first rectangular reference region S2 in the first spatial coordinate system is determined as ax+by+cz+d=0, and then a, b, c, d are obtained.
[0108] Substitute the x and y coordinates of each vertex of the second rectangular reference region S4 into the plane equation to obtain the corresponding z value, and use each z value as the z coordinate of each vertex in the second rectangular reference region S4; then, map the second rectangular reference region to the first rectangular reference region according to the inverse transformation relationship of the projection transformation relationship to obtain the third trapezoidal reference region.
[0109] A6: The third trapezoidal reference region S5 is transformed according to the inverse transformation relationship of the rotation transformation relationship to obtain the fourth trapezoidal reference region S6;
[0110] like Figure 10 As shown, by performing operations on the four vertices of the third rectangular reference region S5 in the first spatial coordinate system with the inverse matrix of M1, the fourth trapezoidal reference region S6 is obtained. S6 must be within S1.
[0111]
[0112] S6x is the x-coordinate of the vertex of S6 in the first spatial coordinate system, S6y is the y-coordinate of the vertex of S6 in the first spatial coordinate system, S6z is the z-coordinate of the vertex of S6 in the first spatial coordinate system, and K61 is an arbitrary constant.
[0113] Generally, S1 represents the maximum projection area in the projection system, and the projected image based on this area is the maximum image size. Of course, S1 can also be an area scaled down according to a custom scaling ratio. In short, the projection device originally projects according to area S1, but because the projection device rotates relative to the screen 10, the projected image appears trapezoidal to the user (as shown in the image). Figure 8 (S31 in the diagram). S6 serves as the calibrated projection area. The projection device projects according to the (xy) area of S6, allowing users directly facing the screen to see a calibrated rectangular image (as shown in the diagram). Figure 8 (S41 in the text).
[0114] A7: Adjust the projection area based on the fourth trapezoidal reference area S6.
[0115] The projection device projects according to the S6 area, which allows users facing the screen to see a rectangular image, thus achieving accurate and imperceptible keystone correction.
[0116] Figure 11 The projection area of the projected light path onto the light-emitting surface of the lens, its corresponding Figure 5 The (xy) coordinates of S1 are shown, where 1 is the lens emitting surface, 2 is the area covered by the projected light path on the lens emitting surface 1, and 3 is the center point of the lens emitting surface 1; however, since not all optical systems are like this... Figure 11 Generally, therefore, the position of S1 in the spatial coordinate system varies depending on the position of the light path on the light-emitting surface of different projection devices. (For comparison...) Figure 12 The correspondence is that the position of the projection light path area 2 on the light-emitting surface 1 of the lens relative to the center point 3 of the light-emitting surface is the same as the (xy) position of S1 relative to the origin of the first spatial coordinate system.
[0117] In one embodiment, this application also provides a projection device, the projection device including a processor, the processor being capable of performing the steps of the non-intrusive keystone correction method as described in the above embodiments.
[0118] For specific limitations regarding projection equipment, please refer to the limitations on projection correction methods mentioned above, which will not be repeated here. Each module in the aforementioned projection equipment can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware or independently of the processor in the computer device, or stored in software in the computer device's memory, so that the processor can call and execute the corresponding operations of each module.
[0119] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 13As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a non-intrusive trapezoidal correction method.
[0120] Those skilled in the art will understand that Figure 13 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0121] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the non-inductive trapezoidal correction method as described in the above embodiments.
[0122] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SL DRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0123] The background section of this invention may include background information about the problems or circumstances surrounding the invention, rather than a description of prior art by others. Therefore, the content included in the background section is not an admission of prior art by the applicant.
[0124] The above description provides a further detailed explanation of the present invention in conjunction with specific / preferred embodiments, and it should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various substitutions or modifications can be made to these described embodiments without departing from the concept of the present invention, and all such substitutions or modifications should be considered within the scope of protection of the present invention. In the description of this specification, the reference to terms such as "an embodiment," "some embodiments," "preferred embodiment," "example," "specific example," or "some examples," etc., indicates that the specific features, structures, materials, or characteristics described in connection with that embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any suitable manner in one or more embodiments or examples. Furthermore, those skilled in the art can combine and integrate different embodiments or examples and features of different embodiments or examples described in this specification without contradiction. Although the embodiments of the present invention and their advantages have been described in detail, it should be understood that various changes, substitutions, and modifications can be made herein without departing from the scope defined by the appended claims.
Claims
1. A method of trapezoidal correction without inductance, characterized by, The method comprises the following steps: obtaining an attitude angle of a projection device; obtaining a first rectangular reference region based on a preset rotation transformation relationship, the attitude angle and a rectangular original projection region in a first space coordinate system; mapping the first rectangular reference region to a first plane based on a projection transformation relationship to obtain a second trapezoidal reference region, the first plane being determined by the first rectangular reference region; obtaining a second rectangular reference region with a preset length-width ratio in the second trapezoidal reference region; mapping the second rectangular reference region to the first rectangular reference region according to an inverse transformation relationship of the projection transformation relationship to obtain a third trapezoidal reference region; obtaining a fourth trapezoidal reference region according to an inverse transformation relationship of the rotation transformation relationship; adjusting a projection region based on the fourth trapezoidal reference region; The method of mapping the first rectangular reference region to a first plane based on a projection transformation relationship to obtain a second trapezoidal reference region comprises the following steps: constructing a mapping cuboid based on the first rectangular reference region in the first space coordinate system, the length, width and height of the mapping cuboid being parallel to three coordinate axes, and the first plane being parallel to the rectangular original projection region and located between the rectangular original projection region and an origin of the first space coordinate system; obtaining the second trapezoidal reference region according to the intersection points of the lines connecting the vertices of the first rectangular reference region to the origin of the first space coordinate system on the first plane.
2. The method of claim 1, wherein, The projection transformation relationship comprises a perspective projection transformation matrix M22, which is used to transform the first rectangular reference region to obtain the second trapezoidal reference region, wherein the plane with the minimum absolute value of the z coordinate of the mapping cuboid is the first plane, n is the coordinate value with the minimum absolute value of the mapping cuboid in the Z axis direction, and f is the coordinate value with the maximum absolute value of the mapping cuboid in the Z axis direction.
3. The method of claim 1, wherein the method is performed by a non- inductive trapezoidal correction method. The method of obtaining a second rectangular reference region with a preset length-width ratio in the second trapezoidal reference region comprises the following steps: reducing the second trapezoidal reference region to a preset unit space according to a compression projection transformation relationship to obtain a first transition region; enlarging the first transition region according to a window transformation relationship based on a preset resolution to obtain a second transition region; obtaining a second transition rectangular reference region with a preset length-width ratio in the second transition region; transforming the second transition rectangular reference region according to the inverse transformation relationship of the compression projection transformation relationship and the window transformation relationship to obtain the second rectangular reference region in the second trapezoidal reference region.
4. The method of claim 3, wherein the method is performed by a non- inductive trapezoidal correction method. The compression projection transformation relationship comprises a compression projection transformation matrix M21, which is used to reduce the second trapezoidal reference region to a preset unit space. The plane with the minimum absolute value of the mapping cuboid z coordinate is the first plane, n is the minimum absolute value of the mapping cuboid coordinate in the Z-axis direction, f is the maximum absolute value of the mapping cuboid coordinate in the Z-axis direction, r is the maximum value of the mapping cuboid coordinate in the X-axis direction, l is the minimum value of the mapping cuboid coordinate in the X-axis direction, t is the maximum value of the mapping cuboid coordinate in the Y-axis direction, and b is the minimum value of the mapping cuboid coordinate in the Y-axis direction.
5. The method of claim 3, wherein the method is performed by a non- inductive trapezoidal correction method. The window transformation relationship includes a window transformation matrix M23, and the window transformation matrix M23 is used to enlarge the first transition area to obtain a second transition area, that is, the preset unit space is enlarged to a window with the preset resolution. W is the resolution in the horizontal direction of the preset resolution, and H is the resolution in the vertical direction of the preset resolution.
6. The method of claim 3, wherein the method is performed by a non- inductive trapezoidal correction method. The step of mapping the second rectangular reference area to the first rectangular reference area according to the inverse transformation relationship of the projection transformation relationship to obtain a third trapezoidal reference area includes: Based on the coordinates of any three different positions in the first rectangular reference area, a plane equation ax+by+cz+d=0 of the first rectangular reference area in the first space coordinate system is determined; The x coordinates and y coordinates of the vertices of the second rectangular reference area are substituted into the plane equation to obtain corresponding z values, and the z values are used as the z coordinates corresponding to the vertices of the second rectangular reference area; The second rectangular reference area is mapped to the first rectangular reference area according to the inverse transformation relationship of the projection transformation relationship to obtain a third trapezoidal reference area.
7. A projection device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to realize the steps of the method of any one of claims 1-6.
8. A storage medium having stored thereon a computer program, characterized in that The computer program is executed by the processor to realize the steps of the stepless trapezoidal correction method according to any one of claims 1-6. The computer program is executed by the processor to realize the steps of the stepless trapezoidal correction method according to any one of claims 1-6.
Citation Information
Patent Citations
Projector projection correction method and device and projector
CN114727081A