Method for detecting relative attitude between projection plane and projection equipment and related device
By fusing multiple sensor-based estimates of surface normals, the method corrects trapezoidal distortion in projection systems by accurately determining the relative pose between the projector and the projection surface, enhancing user experience.
Patent Information
- Application Number
- CN202410028144.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-08
- Publication Date
- 2025-07-15
AI Technical Summary
During the use of the projector, the projection screen is distorted due to position changes or environmental changes, which affects the user experience. It is difficult for the prior art to accurately estimate the wall normal vector for effective keystone correction.
By acquiring a variety of sensing data, the wall normal vectors are estimated, including image sensing data and distance sensing data, and the weighted sum and validity detection method is used to fuse multiple normal vector estimation results to improve the accuracy of normal vector detection.
Accurate detection of the relative posture between the projection plane and the projection device is achieved, the effect of keystone correction is improved, and the projection screen rectangular display is ensured.
Smart Images

Figure CN120321374A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of plane estimation, and particularly to a method and related device for detecting the relative pose between a projection plane and a projection device. Background Art
[0002] During the use of a projector, the following situation often occurs: due to the change in the placement position of the projector or the change in the projection environment, the position of the projector is not perpendicular to the projection screen, resulting in trapezoidal distortion of the projection image, leading to distortion of the projection image and affecting the user experience. Therefore, the trapezoidal correction function of the projector is particularly important.
[0003] To achieve trapezoidal correction, it is necessary to estimate the wall normal vector, and determine the trapezoidal shape projected onto the wall based on the estimated wall normal vector, so as to correct the projection image. Summary of the Invention
[0004] This application provides a method and related device for detecting the relative pose between a projection plane and a projection device to determine the wall normal vector.
[0005] In a first aspect, a method for detecting the relative pose between a projection plane and a projection device is provided, including:
[0006] Obtaining a plurality of normal vector estimation results corresponding to the target projection plane, where the normal vector estimation results are used to represent the estimated normal vector of the target projection plane, and different normal vector estimation results are estimated based on different sensing data;
[0007] Fusing the plurality of normal vector estimation results to obtain a normal vector detection result of the target projection plane;
[0008] According to the normal vector detection result, determining the relative pose between the target projection plane and the projection device, where the relative pose is used to correct the target image, and the target image is the image projected by the projection device onto the target projection plane.
[0009] In this technical solution, by obtaining multiple normal vector estimation results corresponding to the target projection plane and fusing the multiple normal vector estimation results, a normal vector detection result of the target projection plane is obtained. Since the normal vector estimation result is used to represent the estimated normal vector of the target projection plane, and the normal vector detection result of the target projection plane can be used to represent the normal vector of the target projection plane, the detection of the normal vector of the projection plane (i.e., the wall surface) can be realized, thereby realizing the detection of the relative pose between the projection plane and the projection device. Since different normal vector estimation results are estimated based on different sensing data, by fusing multiple normal vector estimation results corresponding to the projection plane to realize the detection of the normal vector of the projection plane, the problem of inaccurate normal vector estimation caused by sensing noise can be avoided, the accuracy of the wall surface normal vector detection can be improved, so that the relative pose between the detected projection plane and the projection device is accurate enough, and the effect of picture trapezoidal correction can be improved.
[0010] Combined with the first aspect, in a possible implementation manner, before fusing the multiple normal vector estimation results to obtain the normal vector detection result of the target projection plane, it further includes: performing validity detection on the multiple normal vector estimation results; fusing the multiple normal vector estimation results to obtain the normal vector detection result of the target projection plane, including: fusing the valid normal vector estimation results to obtain the normal vector detection result of the target projection plane. By detecting the validity of the normal vector estimation results first and then fusing the valid normal vector estimation results to detect the normal vector of the projection plane before fusing the multiple normal vector estimation results, the accuracy of the normal vector detection can be further improved.
[0011] Combined with the first aspect, in a possible implementation manner, each normal vector estimation result includes a pitch angle; performing validity detection on the multiple normal vector estimation results includes: obtaining a reference vector detection result, where the reference vector detection result is used to represent the ground normal vector corresponding to the projection device, the ground normal vector is perpendicular to the normal vector of the target projection plane, and the reference vector detection result includes a reference pitch angle; if the angle difference between the pitch angle corresponding to the target normal vector estimation result and the reference pitch angle is greater than a preset angle, it is determined that the target normal vector estimation result is an invalid normal vector estimation result, and the target normal vector estimation result is any one of the multiple normal vector estimation results; if the angle difference between the pitch angle corresponding to the target normal vector estimation result and the reference pitch angle is less than or equal to the preset angle, it is determined that the target normal vector estimation result is a valid normal vector estimation result. By comparing the pitch angle in the normal vector estimation result of the projection plane with the pitch angle in the reference vector detection result to detect the validity of the normal vector estimation result, the implementation method is simple and effective.
[0012] Combined with the first aspect, in a possible implementation manner, the obtaining of the reference vector detection result includes: obtaining the target inertial acceleration of the projection device; calculating the reference vector detection result according to the target inertial acceleration.
[0013] Combined with the first aspect, in a possible implementation manner, the obtaining of the target inertial acceleration of the projection device includes: obtaining a plurality of inertial accelerations of the projection device; filtering out the noise inertial accelerations that are not within the range of the inertial accelerations of the projection device among the plurality of inertial accelerations; determining the mean value of the filtered inertial accelerations as the target inertial acceleration. When determining the reference normal vector detection result, by filtering out the noise inertial accelerations that are not within the range of the inertial accelerations, the accuracy of the inertial acceleration can be ensured, thereby improving the accuracy of the reference normal vector detection result.
[0014] Combined with the first aspect, in a possible implementation manner, each normal vector estimation result includes a pitch angle and a yaw angle; the fusing of the plurality of normal vector estimation results to obtain the normal vector detection result of the target projection plane includes: performing weighted summation on the pitch angles in the plurality of normal vector estimation results to obtain the pitch angle in the normal vector detection result; performing weighted summation on the yaw angles in the plurality of normal vector estimation results to obtain the yaw angle in the normal vector detection result. By fusing a plurality of normal vector estimation results in a weighted summation manner, the deviation of the normal vector estimation caused by noise can be reduced, and the accuracy of the wall normal vector detection can be improved.
[0015] Combined with the first aspect, in a possible implementation manner, the plurality of normal vector estimation results include a first normal vector estimation result, and the first normal vector estimation result is a normal vector estimation result estimated based on image sensing data; the obtaining of the plurality of normal vector estimation results corresponding to the target projection plane includes: projecting a target image including a plurality of preset feature points onto the target projection plane; obtaining the projection plane image corresponding to the target projection plane, where the projection plane image includes the target image; determining the first normal vector estimation result according to the positions of the plurality of preset feature points in the projection plane image.
[0016] In combination with the first aspect, in a possible implementation, after obtaining the projection plane image corresponding to the target projection plane, the method further includes: if at least one of the multiple preset feature points is not detected in the projection plane image, skip the step of determining the first normal vector estimation result according to the positions of the multiple preset feature points in the projection plane image. When all the preset feature points are not detected in the projection plane image, it indicates that there are stains on the wall surface, which will affect the wall surface normal vector detection effect. Skipping the calculation of the normal vector detection result based on the image sensing data can avoid the normal vector detection error caused by the wall surface stains.
[0017] In combination with the first aspect, in a possible implementation, the multiple normal vector estimation results include a second normal vector estimation result, and the second normal vector estimation result is a normal vector estimation result estimated based on distance sensing data; obtaining the multiple normal vector estimation results corresponding to the target projection plane includes: obtaining four target distance data corresponding to the target projection plane, where the four target distance data respectively reflect the distances between the projection device and the upper, lower, left, and right four regions in the target projection plane; calculating the second normal vector estimation result according to the four target distance data.
[0018] In combination with the first aspect, in a possible implementation, obtaining the four target distance data corresponding to the target projection plane includes: obtaining multiple distance data between the projection device and a target region in the target projection plane, where the target region is any one of the upper, lower, left, and right four regions; filtering out the distance data that is not within the target distance range corresponding to the target region from the multiple distance data; determining the mean value of the filtered distance data as the target distance data corresponding to the target region. When determining the wall surface normal vector estimation result, filtering out the distance data that is not within the distance range can ensure the accuracy of the distance data, thereby improving the accuracy of the wall surface normal vector estimation result.
[0019] In combination with the first aspect, in a possible implementation, after obtaining the four target distance data corresponding to the target projection plane, the method further includes: if the ratio between the number of the filtered distance data and the total number of the obtained distance data exceeds a preset ratio, skip the step of calculating the second normal vector estimation result according to the four target distance data. When the ratio between the filtered distance data and the total number of the obtained distance data exceeds the preset ratio, it indicates that there is more noise in the distance data. Skipping the calculation of the normal vector detection result based on the distance data can prevent the normal vector detection error caused by the noise.
[0020] In a second aspect, a relative pose detection device between a projection plane and a projection device is provided, including:
[0021] A normal vector acquisition module, configured to acquire a plurality of normal vector estimation results corresponding to a target projection plane, where the normal vector estimation results are used to represent the estimated normal vector of the target projection plane, and different normal vector estimation results are estimated based on different sensing data;
[0022] A method fusion module, configured to fuse the plurality of normal vector estimation results to obtain a normal vector detection result of the target projection plane; and determine a relative pose between the target projection plane and the projection device according to the normal vector detection result, where the relative pose is used to correct a target image, and the target image is an image projected by the projection device onto the target projection plane.
[0023] In a third aspect, a projection device is provided, including a memory, a plurality of sensors, and one or more processors, where the memory and the plurality of sensors are connected to the one or more processors, the plurality of sensors are configured to detect a plurality of plane sensing data, and the one or more processors are configured to execute one or more computer programs stored in the memory. When the one or more processors execute the one or more computer programs, the projection device implements the method for detecting the relative pose between the projection plane and the projection device in the first aspect above.
[0024] In a fourth aspect, a computer-readable storage medium is provided, where the computer-readable storage medium stores a computer program, and the computer program includes program instructions. When the program instructions are executed by a processor, the processor executes the method for detecting the relative pose between the projection plane and the projection device in the first aspect above.
[0025] The present application can achieve the following technical effects: Since the normal vector estimation result is used to represent the estimated normal vector of the target projection plane, and the normal vector detection result of the target projection plane can be used to represent the normal vector of the target projection plane, the detection of the normal vector of the projection plane (i.e., the wall surface) can be realized, and thus the detection of the relative pose between the projection plane and the projection device can be realized; Since different normal vector estimation results are estimated based on different sensing data, the detection of the normal vector of the projection plane is realized by fusing a plurality of normal vector estimation results corresponding to the projection plane, which can avoid the problem of inaccurate normal vector estimation caused by sensing noise, improve the accuracy of the wall surface normal vector detection, make the detected relative pose between the projection plane and the projection device accurate enough, and improve the effect of trapezoidal correction of the image. Description of the Drawings
[0026] To more clearly illustrate the technical solutions of the embodiments of the present application, the accompanying drawings required for the description of the embodiments of the present application will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.
[0027] Figure 1 It is a schematic flowchart of a method for detecting the relative pose between a projection plane and a projection device provided by an embodiment of the present application;
[0028] Figure 2 It is a schematic flowchart of a method for detecting the relative pose between a projection plane and a projection device provided by an embodiment of the present application;
[0029] Figure 3 It is a schematic structural diagram of a device for detecting the relative pose between a projection plane and a projection device provided by an embodiment of the present application;
[0030] Figure 4 It is a schematic structural diagram of a projection device provided by an embodiment of the present application. Specific embodiments
[0031] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application and are not used to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.
[0032] It should be noted that if there is no conflict, the various features in the embodiments of the present application can be combined with each other, and all are within the scope of protection of the present application. In addition, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order from the module division in the device or the flowchart. Furthermore, the terms "first", "second", "third", etc. used in the present application do not limit the data and execution order, but only distinguish the same items or similar items with basically the same functions and effects.
[0033] The technical solution of the present application is applicable to scenarios that require wall surface estimation, such as the trapezoidal correction scenario of a projector.
[0034] When a projector projects an image onto a wall, if the projection device projects in a posture directly facing the wall, the central ray projected by the projection device is parallel to the normal vector of the wall, and the shape of the image projected by the projection device onto the wall is the same as the original shape of the image, presenting as a rectangle; if the projection device does not project in a posture directly facing the wall, the central ray projected by the projection device is not parallel to the normal vector of the wall. Without processing the image, the shape of the image projected by the projection device onto the wall will be distorted and present as a trapezoid. In order to make the shape of the image projected by the projection device onto the wall also present as a rectangle when the projection device does not project directly facing the wall, it is necessary to correct the image in advance before projecting the image onto the wall. The prerequisite for correcting the image is to estimate the wall, detect the relative posture between the projection device and the wall, and then adjust the image to be projected onto the wall according to the relative posture between the projection device and the wall. Among them, the relative posture between the wall and the projection device can be represented by estimating the coordinate representation of the normal vector of the wall in the coordinate system of the projection device and converting the coordinates of the normal vector in the coordinate system of the projection device into the posture of the projection device.
[0035] The schemes for estimating the normal vector of the wall mainly include two schemes based on time of flight (TOF) and based on a camera. The TOF-based scheme estimates the normal vector of the wall according to the measured distance data, and the camera-based scheme estimates the normal vector of the wall according to the image captured by the camera. The TOF-based scheme may have the problem of unstable data, that is, the measured distance data is not accurate enough, resulting in an inaccurate estimated normal vector of the wall. The camera-based scheme has high requirements for the cleanliness of the wall. When there are stains on the wall, the estimated wall will be inaccurate.
[0036] In view of this, the present application proposes a new wall estimation scheme. By obtaining multiple sensing data to estimate the normal vector of the wall respectively, multiple normal vector estimation results are obtained, and then the multiple normal vector estimation results are fused to obtain the final normal vector detection result of the wall. Through the fusion method, the detection error caused by inaccurate one sensing data can be reduced, thereby improving the accuracy of the normal vector estimation of the wall.
[0037] The technical solution of the present application is specifically introduced below. Among them, the technical solution of the present application can be applied to a projection device including multiple sensors. The multiple sensors in the projection device can include an image sensor, a distance sensor, an inertial sensor, etc.
[0038] See Figure 1 , Figure 1 is a schematic flowchart of a method for detecting the relative posture between a projection plane and a projection device provided by an embodiment of the present application. As Figure 1 shown, the method includes the following steps:
[0039] S101. Obtain multiple normal vector estimation results corresponding to the target projection plane.
[0040] Here, the target projection plane refers to the plane to which the projection device needs to project. The target projection plane can be the wall to which the projection device needs to project, or the screen to which the projection device needs to project, etc.
[0041] The normal vector estimation results corresponding to the target projection plane are used to represent the estimated normal vector of the target projection plane. The normal vector estimation results corresponding to the target projection plane are converted from the coordinates of the normal vector of the target projection plane in the coordinate system of the projection device, and can represent the relative attitude between the wall and the projection device. Each normal vector estimation result includes a pitch angle and a yaw angle. The pitch angle is the angle of rotation along the Y-axis of the coordinate system of the projection device, and the yaw angle is the angle of rotation along the Z-axis of the coordinate system of the projection device. The X-axis direction of the coordinate system of the projection device is the orientation of the projection device. The Y-axis direction of the projection device is parallel to the device plane and perpendicular to the X-axis, and the Z-axis direction of the projection device is perpendicular to the device plane.
[0042] The multiple normal vector estimation results corresponding to the target projection plane are estimated based on multiple sensing data. Different normal vector estimation results are estimated based on different sensing data, and one normal vector estimation result corresponds to one sensing data. The multiple normal vector estimation results corresponding to the target projection plane may include the normal vector estimation result (hereinafter referred to as the first normal vector estimation result) estimated based on the image sensing data and the normal vector estimation result (hereinafter referred to as the second normal vector estimation result) estimated based on the distance sensing data.
[0043] The image sensing data can be obtained based on a camera, and the first normal vector estimation result can be obtained by detecting and recognizing the image of the target projection plane captured by the camera. The first normal vector estimation result can be obtained through the following steps A1 - A3:
[0044] A1. Project a target image containing multiple preset feature points onto the target projection plane.
[0045] Here, the preset feature points refer to the feature points that are easy to be recognized and detected in the image, and the target image is a calibration image for camera calibration. Exemplarily, the target image can be a checkerboard image, and the corner points in the checkerboard image are the preset feature points.
[0046] Among them, the target image can be projected onto the target projection plane through the optical machine of the projection device. After the target image is projected onto the target projection plane, it is displayed on the target projection plane.
[0047] A2. Obtain the projection plane image corresponding to the target projection plane.
[0048] Here, the target projection plane can be photographed by the camera of the projection device to obtain the projection plane image corresponding to the target projection plane. Since the target image containing a plurality of preset feature points is projected onto the target projection plane in advance, the projection plane image corresponding to the target projection plane contains the target image, that is, contains the plurality of preset feature points.
[0049] A3. Determine the first normal vector estimation result according to the positions of the plurality of preset feature points in the projection plane image.
[0050] Here, the plurality of preset feature points can be detected from the projection plane image first; then determine the positions of the plurality of preset feature points in the projection plane image, and use the determined positions of the plurality of preset feature points in the projection plane image as the true positions of the plurality of preset feature points in the projection plane image; then construct a relationship model between the plane normal vector and the position information of the preset feature points, and a position error model of the error between the first position corresponding to the preset feature point and the second position corresponding to the preset feature point. The first position corresponding to the preset feature point is the estimated position of the preset feature point in the projection plane image determined based on the position information of the preset feature point, and the second position corresponding to the preset feature point is the true position of the preset feature point in the projection plane image; finally, solve the plane normal vector that minimizes the error corresponding to the position error model and satisfies the relationship model as the first plane normal vector. After calculating the first plane normal vector, represent the first plane normal vector in the form of the pitch angle and yaw angle of the projection device to obtain the first normal vector estimation result.
[0051] Among them, the relationship model between the plane normal vector and the position information of the preset feature points can be expressed as shown in formula (1):
[0052] n x x i +n y y i +n z z i +1.0 = 0.0 (1)
[0053] Among them, (n x , n y , n z ) is the vector representation of the plane normal vector; (x i , y i , z i ) is the position coordinate of the i-th preset feature point.
[0054] The position error model of the error between the first position corresponding to the preset feature point and the second position corresponding to the preset feature point can be expressed as shown in formula (2):
[0055]
[0056] Among them, \(L\) represents the error between the first position corresponding to the preset feature point and the second position corresponding to the preset feature point; \(m\) represents the total number of preset feature points; \(K\) cam represents the internal parameters of the camera, \(K\) cam is used to reflect the correspondence between the camera coordinate system and the pixel coordinate system, and \(\mathbf{p}_i\) represents the position coordinates of the \(i\)-th preset feature point; \(K\) cam \(\mathbf{p}\) i represents the first position corresponding to the \(i\)-th preset feature point, \(m\) cami represents the second position corresponding to the \(i\)-th preset feature point; \(K\) prj represents the internal parameters of the optical-mechanical device, \(K\) prj is used to reflect the correspondence between the optical-mechanical device coordinate system and the pixel coordinate system, and represents the external parameters of the optical-mechanical device, and is used to reflect the correspondence between the camera coordinate system and the optical-mechanical device coordinate system, represents the first position corresponding to the \(i\)-th preset feature point, \(m\) prji represents the second position corresponding to the \(i\)-th preset feature point.
[0057] According to the above formulas (1) and (2), determine \((n\) x , \(n\) y , \(n\) z ) that minimizes the error \(L\) as the first plane normal vector.
[0058] The calculation formulas for the pitch angle and yaw angle in the first normal vector estimation result can be shown as in formulas (3) and (4):
[0059]
[0060]
[0061] Among them, \(\text{pitch}\) cam is the pitch angle in the first normal vector estimation result, and \(\text{yaw}\) cam is the yaw angle in the first normal vector estimation result.
[0062] In some possible cases, before determining the first normal vector estimation result based on the positions of multiple preset feature points in the projected plane image, it is also possible to determine whether all the preset feature points are detected in the projected plane image corresponding to the target projected plane. If at least one of the multiple preset feature points is not detected in the projected plane image corresponding to the target projected plane, it indicates that there may be dirt on the wall, resulting in incomplete detection of the preset feature points, which may increase the calculation error of the wall normal vector. In this case, the above step A3 can be skipped, that is, the first normal vector estimation result is not calculated. If all the multiple preset feature points are detected in the projected plane image corresponding to the target projected plane, it indicates that the wall is clean and tidy, and the above step A3 is executed to complete the calculation of the first normal vector estimation result. Among them, it is possible to determine whether the number of preset feature points detected in the projected plane image is equal to the preset number. If the number of preset feature points detected in the projected plane image is equal to the preset number, it is determined that all the multiple preset feature points are detected in the projected plane image corresponding to the target projected plane. If the number of preset feature points detected in the projected plane image is less than the preset number, it is determined that at least one of the multiple preset feature points is not detected in the projected plane image corresponding to the target projected plane. The preset feature points in the projected plane image can be detected by a corner detection algorithm. The corner detection algorithm includes, but is not limited to, a corner retrieval algorithm based on a binary image, a corner detection algorithm based on a contour curve, and a corner detection algorithm based on a grayscale image, etc. The present application does not make any restrictions.
[0063] When not all the preset feature points in the target image are detected in the projected plane image, it indicates that there are stains on the wall, which will affect the detection effect of the wall normal vector. Skipping the calculation of the normal vector detection result based on the image sensing data can avoid the normal vector detection error caused by the wall stains.
[0064] The distance sensing data can be measured and calculated based on the TOF method, and the second normal vector estimation result can be obtained by processing the distance sensing data. The second normal vector estimation result can be obtained through the following steps B1 - B2:
[0065] B1. Obtain four target distance data corresponding to the target projected plane.
[0066] Here, the target distance data respectively reflect the distances between the projection device and the upper, lower, left, and right four regions in the target projected plane. Multiple distance data between the projection device and the upper, lower, left, and right four regions of the target projected plane can be detected by a distance sensor respectively, and multiple distance data corresponding to the upper, lower, left, and right four regions of the target projected plane are obtained. Based on the multiple distance data corresponding to the upper, lower, left, and right four regions of the target projected plane, the four target distance data corresponding to the target projected plane are determined.
[0067] Among them, for any one of the upper, lower, left, and right regions of the target projection plane (hereinafter referred to as the target region), any one of the multiple distance data between the projection device and the target region of the target projection plane can be selected as the target distance data corresponding to the target region of the target projection plane. The average value of the multiple distance data between the projection device and the target region of the target projection plane can also be used as the target distance data corresponding to the target region of the target projection plane, that is D is the target
[0068] target distance data corresponding to the target region of the projection plane, and d j is the j-th distance data between the projection device and the target region of the target projection plane, and n is the total number of distance data detected between the projection device and the target region of the target projection plane. It is also possible to filter out the distance data that is not within the target distance range corresponding to the target region of the target projection plane among the multiple distance data between the projection device and the target region of the target projection plane, and determine the average value of the filtered distance data as the target distance data corresponding to the target region of the target projection plane. Here, the filtered distance data refers to the remaining distance data after filtering out the distance data that is not within the target distance range corresponding to the target region of the target projection plane. The two distance boundary values within the target distance range corresponding to the target region of the target projection plane can be obtained based on the following formulas (5)-(7):
[0069]
[0070]
[0071]
[0072] Among them, d min is the lower limit value of the target distance range corresponding to the target region of the target projection plane, and d max is the upper limit value of the target distance range corresponding to the target region of the target projection plane, [d min , d max is the target distance range corresponding to the target region of the target projection plane, and σ1 is a preset distance value. σ1 is used to reflect the measurement noise of the distance sensor, and σ1 is usually recorded in the instruction manual of the distance sensor.
[0073] When determining the wall normal vector, filtering out the distance data outside the distance range can ensure the accuracy of the distance data, thereby improving the accuracy of the wall normal vector.
[0074] By processing the multiple distance data corresponding to the upper, lower, left, and right regions of the target projection plane in the same processing manner, the target distance data corresponding to the upper, lower, left, and right regions of the target projection plane can be obtained, that is, the four target distance data corresponding to the target projection plane are obtained. The four target distance data corresponding to the target projection plane can be respectively expressed as d up 、d down 、d left and d right 。
[0075] B2. Calculate the second normal vector estimation result according to the four target distance data.
[0076] Here, the second normal vector estimation result also includes the pitch angle and the yaw angle. The pitch angle and the yaw angle in the second normal vector estimation result can be calculated according to the following formulas (8)-(9):
[0077]
[0078]
[0079] where pitch tof is the pitch angle in the second normal vector estimation result, yaw tof is the yaw angle in the second normal vector estimation result, and α is the inherent angle of the distance sensor.
[0080] In some possible cases, before calculating the second normal vector estimation result according to the four target distance data, the ratio between the total number of distance data filtered out during the acquisition of the four target distance data and the total number of acquired distance data can also be determined. If the ratio between the total number of filtered distance data and the total number of acquired distance data exceeds a preset ratio, it indicates that there are more noise data, which will lead to a large error in the calculated wall normal vector. The above step B2 can be skipped, that is, the second normal vector estimation result is not calculated. If the ratio between the total number of filtered distance data and the total number of acquired distance data does not exceed the preset ratio, it indicates that there are fewer noise data and the error in the calculated wall normal vector is smaller. Execute the above step B2 to complete the calculation of the second normal vector estimation result. Among them, the ratio of the filtered distance data to the total number of distance data acquired in each of the upper, lower, left, and right regions of the target projection plane can be determined respectively. If the ratio of the filtered distance data in the target region to the total number of distance data acquired in the target region is greater than the preset ratio, then skip the execution of the above step B2, that is, c k / n k >P, 1≤k≤4, that is, skip the execution of the above step B2, c k is the number of distance data filtered out in the kth region, n kk is the total number of distance data of the k-th obtained region, and P is a preset ratio; alternatively, it is also possible to determine the total number of distance data of each filtered region and the total number of distance data of each obtained region. If the total number of distance data of each filtered region and the total number of distance data of each obtained region is greater than the preset ratio, then skip the execution of the above step B2, that is, (c1 + c2 + c3 + c4) / (n1 + n2 + n3 + n4) > P, that is, skip the execution of the above step B2.
[0081] When the ratio between the total number of filtered distance data and the total number of obtained distance data exceeds the preset ratio, it indicates that there is more noise in the distance data. Skipping the calculation of the normal vector estimation result based on the distance data can prevent the normal vector detection error caused by noise.
[0082] It should be understood that the multiple normal vector estimation results corresponding to the target projection plane may also include normal vector estimation results estimated based on other sensing data in addition to the above first normal vector estimation result and the above second normal vector estimation result, and this application does not make any restrictions.
[0083] S102. Fuse the multiple normal vector estimation results corresponding to the target projection plane to obtain the normal vector detection result of the target projection plane.
[0084] In a feasible implementation manner, after obtaining the pitch angle and yaw angle included in each of the multiple normal vector estimation results corresponding to the target projection plane, the pitch angles in the multiple normal vector estimation results can be weighted and summed to obtain the pitch angle in the normal vector detection result; and the yaw angles in the multiple normal vector estimation results can be weighted and summed to obtain the yaw angle in the normal vector detection result.
[0085] Taking the multiple normal vector estimation results corresponding to the target projection plane including the first normal vector estimation result and the second normal vector estimation result introduced in the above step S101 as an example, the pitch angle and yaw angle in the normal vector detection result of the target projection plane can be calculated through the following formulas (10) and (11):
[0086] Pitch = a * pitch cam +(1 - a) * pitch tof (10)
[0087] Yaw = a * yaw cam +(1 - a) * yaw tof (11)
[0088] Among them, Pitch is the pitch angle in the normal vector detection result, Yaw is the yaw angle in the normal vector detection result, 1 - a and a are the weights of the first normal vector estimation result and the second normal vector estimation result respectively.
[0089] Among them, a can be the ratio between the number of distance data filtered out during the process of calculating the second normal vector estimation result and the total number of obtained distance data, that is, a = (c1 + c2 + c3 + c4) / (n1 + n2 + n3 + n4). The weight value is positively correlated with the number of filtered distance data. The more the number of filtered distance data, the more unstable the distance sensor data indicates. A greater weight is given to the normal vector estimation result obtained based on the image sensor data, so that the calculated normal vector detection result can be more accurate.
[0090] Fusing multiple normal vector estimation results by weighted summation can reduce the normal vector estimation deviation caused by noise and improve the accuracy of wall normal vector detection.
[0091] S103. According to the normal vector detection result of the target projection plane, determine the relative pose between the target projection plane and the projection device.
[0092] Here, the normal vector detection result is used to reflect the orientation and tilt direction of the wall. Since the normal vector detection result includes the pitch angle and the yaw angle, the pitch angle is used to reflect the relative tilt degree between the target projection plane and the projection device in the Y-axis direction, and the yaw angle is used to reflect the relative tilt degree between the target projection plane and the projection device in the Z-axis direction.
[0093] After obtaining the normal vector detection result of the target projection plane and determining the relative pose between the projection plane and the projection device, the target image can be corrected. The target image is the image projected by the projection device onto the target projection plane.
[0094] In a specific implementation manner, the relative angle between the target projection plane and the projection device can be calculated according to the pitch angle and the yaw angle, and then the target image can be corrected according to the relative angle between the target projection plane and the projection device. Among them, the distance for left or right image translation can be determined according to the positive or negative value of the relative angle. When the relative angle is positive, the image is translated to the left; when the relative angle is negative, the image is translated to the right. And, the angle for upward or downward tilting the image can be determined according to the positive or negative value of the relative angle. When the relative angle is positive, the image is tilted upward; when the relative angle is negative, the image is tilted downward. The calculation formula for the relative angle can be: α = arccos(cosYaw)*cos(pitch)). α is the relative angle.
[0095] In the above Figure 1In the corresponding technical solution, by obtaining multiple normal vector estimation results corresponding to the target projection plane and fusing the multiple normal vector estimation results, a normal vector detection result of the target projection plane is obtained. Since the normal vector estimation result is used to represent the estimated normal vector of the target projection plane, and the normal vector detection result of the target projection plane can be used to represent the normal vector of the target projection plane, the detection of the normal vector of the projection plane (i.e., the wall surface) can be realized, thereby realizing the detection of the relative pose between the projection plane and the projection device. Since different normal vector estimation results are estimated based on different sensing data, by fusing the multiple normal vector estimation results corresponding to the projection plane to realize the detection of the normal vector of the projection plane, the problem of inaccurate normal vector estimation caused by sensing noise can be avoided, the accuracy of the wall surface normal vector detection can be improved, so that the relative pose between the detected projection plane and the projection device is accurate enough, and the effect of picture trapezoid correction is improved.
[0096] See Figure 2 , Figure 2 is a schematic flowchart of a method for detecting the relative pose between a projection plane and a projection device provided by an embodiment of the present application. As Figure 2 shown, the method includes the following steps:
[0097] S201, obtain multiple normal vector estimation results corresponding to the target projection plane.
[0098] Here, for the specific implementation manner of step S201, reference can be made to the description of the foregoing step S101, which will not be elaborated here.
[0099] S202, perform validity detection on multiple normal vector estimation results corresponding to the target projection plane.
[0100] In a feasible implementation manner, the validity detection of multiple normal vector estimation results corresponding to the target projection plane can be performed through the following steps C1-C4:
[0101] C1. Obtain the reference vector detection result.
[0102] Here, the reference vector detection result is used to represent the ground normal vector corresponding to the projection device. The ground normal vector is perpendicular to the normal vector of the projection plane. The reference vector detection result can be used to represent the relative pose between the ground (i.e., the horizontal plane) and the projection device. The reference vector detection result includes a reference roll angle and a reference pitch angle, and the reference roll angle and the reference pitch angle can be expressed as roll imu and pitch imu .
[0103] In a feasible implementation manner, the reference vector detection result can be determined through the following steps C11-C12:
[0104] C11. Obtain the target inertial acceleration of the projection device.
[0105] Here, multiple inertial accelerations can be detected by an inertial sensor, and the target inertial acceleration of the projection device can be determined based on the multiple inertial accelerations. Among them, any one of the multiple detected inertial accelerations can be selected as the target inertial acceleration of the projection device. The average value of the multiple detected inertial accelerations can also be used as the target inertial acceleration of the projection device, that is A is the target inertial acceleration of the projection device, a f is the f-th detected inertial acceleration, and N is the total number of detected inertial accelerations. It is also possible to filter out the noise inertial accelerations that are not within the inertial acceleration range of the projection device among the multiple detected inertial accelerations, and determine the average value of the filtered inertial accelerations as the target inertial acceleration. Here, the filtered inertial acceleration refers to the remaining inertial acceleration after filtering out the noise inertial accelerations that are not within the inertial acceleration range of the projection device.
[0106] Among them, the two inertial acceleration boundary values corresponding to the inertial acceleration range of the projection device can be obtained based on the following formulas (12)-(14):
[0107]
[0108]
[0109]
[0110] Among them, a min is the lower limit value of the inertial acceleration corresponding to the inertial acceleration range, a max is the upper limit value of the inertial acceleration corresponding to the inertial acceleration range, [a min , a max is the inertial acceleration range of the projection device, and σ2 is a preset inertial acceleration value. σ2 is used to reflect the measurement noise of the inertial sensor, and σ2 is usually recorded in the instruction manual of the inertial sensor.
[0111] When determining the reference normal vector detection result, by filtering out the noise inertial accelerations that are not within the inertial acceleration range, the accuracy of the inertial acceleration can be ensured, thereby improving the accuracy of the reference normal vector detection result.
[0112] C12. Calculate the reference vector detection result based on the target inertial acceleration of the projection device.
[0113] Here, the reference vector detection result can be calculated according to the following formulas (15)-(16):
[0114]
[0115]
[0116] wherein, a y and a x are respectively the Y-axis and X-axis components of the target inertial acceleration.
[0117] C2. Determine whether the angular difference between the pitch angle in the target normal vector estimation result and the reference pitch angle is greater than a preset angle.
[0118] C3. If the angular difference between the pitch angle in the target normal vector estimation result and the reference pitch angle is greater than the preset angle, determine that the target normal vector estimation result is an invalid normal vector estimation result.
[0119] If the angular difference between the pitch angle in the target normal vector estimation result and the reference pitch angle is greater than the preset angle, it indicates that the calculation error of the target normal vector estimation result is relatively large.
[0120] C4. If the angular difference between the pitch angle in the target normal vector estimation result and the reference pitch angle is less than or equal to the preset angle, determine that the target normal vector estimation result is a valid normal vector estimation result.
[0121] If the angular difference between the pitch angle corresponding to the target normal vector estimation result and the reference pitch angle corresponding to the ground normal vector is less than or equal to the preset angle, it indicates that the calculation error of the target normal vector estimation result is relatively small.
[0122] By detecting the validity of each normal vector estimation result corresponding to the target projection plane respectively in the manner of the above steps C1 - C4, the detection of the validity of multiple normal vector estimation results corresponding to the target projection plane can be realized. By comparing the pitch angle in the normal vector estimation result of the projection plane with the pitch angle in the reference vector detection result to detect the validity of the normal vector estimation result, the implementation method is simple and effective.
[0123] S203. Fuse the valid normal vector estimation results to obtain the normal vector detection result of the target projection plane.
[0124] Here, the principle of fusing the valid normal vector estimation results is the same as that of fusing multiple normal vector estimation results in the foregoing step S202. The specific implementation method in the foregoing step S202 can be referred to, and will not be elaborated here.
[0125] S204. Determine the relative pose between the target projection plane and the projection device according to the normal vector detection result of the target projection plane.
[0126] Here, for the specific implementation method of step S204, the description in the foregoing step S103 can be referred to, and will not be elaborated here.
[0127] In the above Figure 2 corresponding technical solution, after obtaining multiple normal vector estimation results corresponding to the target projection plane, first perform validity detection on the multiple normal vector estimation results corresponding to the target projection plane, and then fuse the valid normal vector estimation results to obtain the normal vector detection result of the target projection plane, which can realize the detection of the normal vector of the projection plane (i.e., the wall surface), thereby realizing the detection of the relative pose between the projection plane and the projection device; before fusing the multiple normal vector estimation results, first detect the validity of the normal vector estimation results, and then fuse the valid normal vector estimation results to detect the normal vector of the projection plane, which can further improve the accuracy of the normal vector detection.
[0128] The above introduces the method of the present application. Next, the device of the present application will be introduced.
[0129] Refer to Figure 3 , Figure 3 which is a schematic structural diagram of a relative pose detection device between a projection plane and a projection device provided by an embodiment of the present application. As Figure 3 shown, the relative pose detection device 30 between the projection plane and the projection device includes:
[0130] A normal vector acquisition module 301, configured to obtain multiple normal vector estimation results corresponding to the target projection plane, where the normal vector estimation results are used to represent the estimated normal vector of the target projection plane, and different normal vector estimation results are estimated based on different sensing data;
[0131] A normal vector fusion module 302, configured to fuse the multiple normal vector estimation results to obtain the normal vector detection result of the target projection plane; determine the relative pose between the target projection plane and the projection device according to the normal vector detection result, where the relative pose is used to correct the target image, and the target image is the image projected by the projection device onto the target projection plane.
[0132] In a possible design, the relative pose detection device 30 between the projection plane and the projection device further includes a validity detection module 303, configured to perform validity detection on the multiple normal vector estimation results; specifically, the normal vector fusion module 302 is configured to: fuse the valid normal vector estimation results to obtain the normal vector detection result of the target projection plane.
[0133] In a possible design, each normal vector estimation result includes a pitch angle; specifically, the validity detection module 303 is configured to: obtain a reference vector detection result, where the reference vector detection result is used to characterize the ground normal vector corresponding to the projection device, the ground normal vector is perpendicular to the normal vector of the target projection plane, and the reference vector detection result includes a reference pitch angle; if the angle difference between the pitch angle corresponding to the target normal vector estimation result and the reference pitch angle is greater than a preset angle, determine that the target normal vector estimation result is an invalid normal vector estimation result, where the target normal vector estimation result is any one of the multiple normal vector estimation results; if the angle difference between the pitch angle corresponding to the target normal vector estimation result and the reference pitch angle is less than or equal to the preset angle, determine that the target normal vector estimation result is a valid normal vector estimation result.
[0134] In a possible design, specifically, the validity detection module 303 is configured to: obtain the target inertial acceleration of the projection device; and calculate the reference vector detection result according to the target inertial acceleration.
[0135] In a possible design, specifically, the validity detection module 303 is configured to: obtain multiple inertial accelerations of the projection device; filter out noise inertial accelerations that are not within the range of the inertial acceleration of the projection device from the multiple inertial accelerations; and determine the mean value of the filtered inertial accelerations as the target inertial acceleration.
[0136] In a possible design, each normal vector estimation result includes a pitch angle and a yaw angle; specifically, the normal vector fusion module 302 is configured to: perform weighted summation on the pitch angles in the multiple normal vector estimation results to obtain the pitch angle in the normal vector detection result; and perform weighted summation on the yaw angles in the multiple normal vector estimation results to obtain the yaw angle in the normal vector detection result.
[0137] In a possible design, the multiple normal vector estimation results include a first normal vector estimation result, where the first normal vector estimation result is a normal vector estimation result estimated based on image sensing data; specifically, the normal vector acquisition module 301 is configured to: project a target image including multiple preset feature points onto the target projection plane; obtain the projection plane image corresponding to the target projection plane, where the projection plane image includes the target image; and determine the first normal vector estimation result according to the positions of the multiple preset feature points in the projection plane image.
[0138] In a possible design, the above-mentioned normal vector acquisition module 301 is further configured to: if at least one of the multiple preset feature points is not detected in the projection plane image, skip the step of determining the first normal vector estimation result according to the positions of the multiple preset feature points in the projection plane image.
[0139] In a possible design, the multiple normal vector estimation results include a second normal vector estimation result, and the second normal vector estimation result is a normal vector estimation result estimated based on distance sensing data; specifically, the above-mentioned normal vector acquisition module 301 is configured to: acquire four target distance data corresponding to the target projection plane, and the four target distance data respectively reflect the distances between the projection device and the upper, lower, left, and right regions in the target projection plane; calculate the second normal vector estimation result according to the four target distance data.
[0140] In a possible design, the above-mentioned normal vector acquisition module 301 is specifically configured to: acquire a plurality of distance data between the projection device and a target region in the target projection plane, and the target region is any one of the upper, lower, left, and right regions; filter out the distance data that is not within the target distance range corresponding to the target region from the plurality of distance data; determine the mean value of the filtered distance data as the target distance data corresponding to the target region.
[0141] In a possible design, the above-mentioned normal vector acquisition module 301 is further configured to: if the ratio between the number of the filtered distance data and the total number of the acquired distance data exceeds a preset ratio, skip the step of calculating the second normal vector estimation result according to the four target distance data.
[0142] It should be noted that Figure 3 For the content not mentioned in the corresponding embodiment, reference may be made to the description of the foregoing method embodiment, which will not be elaborated here.
[0143] The above-mentioned device obtains multiple normal vector estimation results corresponding to the target projection plane, and fuses the multiple normal vector estimation results to obtain the normal vector detection result of the target projection plane. Since the normal vector estimation result is used to represent the estimated normal vector of the target projection plane, and the normal vector detection result of the target projection plane can be used to represent the normal vector of the target projection plane, the detection of the normal vector of the projection plane (i.e., the wall surface) is realized. Since the normal vector estimation result is used to represent the estimated normal vector of the target projection plane, and the normal vector detection result of the target projection plane can be used to represent the normal vector of the target projection plane, the detection of the normal vector of the projection plane (i.e., the wall surface) can be realized, thereby realizing the detection of the relative pose between the projection plane and the projection device. Since different normal vector estimation results are estimated based on different sensing data, the detection of the normal vector of the projection plane is realized by fusing multiple normal vector estimation results corresponding to the projection plane, which can avoid the problem of inaccurate normal vector estimation caused by sensing noise, improve the accuracy of wall surface normal vector detection, make the relative pose between the detected projection plane and the projection device accurate enough, and improve the effect of picture trapezoidal correction.
[0144] See Figure 4 , Figure 4 FIG. is a schematic structural diagram of a projection device provided by an embodiment of the present application. The projection device 40 includes a processor 401, a memory 402, and a sensor 403. The memory 402 and the sensor 403 are connected to the processor 401, for example, connected to the processor 401 through a bus.
[0145] The processor 401 is configured to support the projection device 40 to execute the corresponding functions in the method in the above method embodiment. The processor 401 may be a central processing unit (CPU), a network processor (NP), a hardware chip, or any combination thereof. The above hardware chip may be an application specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The above PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0146] The memory 402 is used to store program codes and the like. The memory 402 may include volatile memory (VM), such as random access memory (RAM); the memory 402 may also include non-volatile memory (NVM), such as read-only memory (ROM), flash memory, hard disk drive (HDD) or solid-state drive (SSD); the memory 402 may further include a combination of the above types of memories.
[0147] The sensor 403 is used to detect sensing data outside the projection device 40. There are various types of sensors 403, and the sensor 403 includes but is not limited to the following sensors: an image sensor, a distance sensor, and an inertial sensor. The image sensor is used to detect an image outside the projection device 40, and the image sensor can specifically be used to obtain an image of the projection plane. The distance sensor is used to detect the distance between the projection device 40 and the projection plane, and the inertial sensor is used to detect the posture and inertial acceleration of the projection device 40.
[0148] The processor 401 can call the program code to perform the following operations:
[0149] According to the normal vector detection result, determine the relative posture between the target projection plane and the projection device, where the relative posture is used to correct the target image, and the target image is the image projected by the projection device onto the target projection plane.
[0150] The embodiment of the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer is caused to execute the method as described in the foregoing embodiment.
[0151] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it may include the processes of the embodiments of the above methods. Among them, the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.
[0152] The above disclosure is only for the preferred embodiments of the present application, and of course, it cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application still fall within the scope covered by the present application.
Claims
1. A method for detecting the relative attitude between a projection plane and a projection device, characterized in that Including: Obtaining a plurality of normal vector estimation results corresponding to a target projection plane, where the normal vector estimation results are used to represent the estimated normal vector of the target projection plane, and different normal vector estimation results are estimated based on different sensing data; Fusing the plurality of normal vector estimation results to obtain a normal vector detection result of the target projection plane; Determining a relative pose between the target projection plane and a projection device according to the normal vector detection result, where the relative pose is used to correct a target image, and the target image is an image projected by the projection device onto the target projection plane.
2. The method according to claim 1, wherein Before fusing the plurality of normal vector estimation results to obtain a normal vector detection result of the target projection plane, it further includes: Performing validity detection on the plurality of normal vector estimation results; Fusing the plurality of normal vector estimation results to obtain a normal vector detection result of the target projection plane, including: Fusing valid normal vector estimation results to obtain a normal vector detection result of the target projection plane.
3. The method according to claim 2, characterized in that, Each normal vector estimation result includes a pitch angle; performing validity detection on the plurality of normal vector estimation results includes: Obtaining a reference vector detection result, where the reference vector detection result is used to represent a ground normal vector corresponding to the projection device, the ground normal vector is perpendicular to the normal vector of the target projection plane, and the reference vector detection result includes a reference pitch angle; If the angle difference between the pitch angle in a target normal vector estimation result and the reference pitch angle is greater than a preset angle, determining that the target normal vector estimation result is an invalid normal vector estimation result, where the target normal vector estimation result is any one of the plurality of normal vector estimation results; If the angle difference between the pitch angle in the target normal vector estimation result and the reference pitch angle is less than or equal to the preset angle, determining that the target normal vector estimation result is a valid normal vector estimation result.
4. The method according to claim 3, wherein Obtaining the reference vector detection result includes: Obtaining a target inertial acceleration of the projection device; Calculating the reference vector detection result according to the target inertial acceleration.
5. The method according to claim 4, wherein Obtaining the target inertial acceleration of the projection device includes: Obtaining a plurality of inertial accelerations of the projection device; Filtering out noise inertial accelerations that are not within the inertial acceleration range of the projection device from the plurality of inertial accelerations; Determining the mean value of the filtered inertial accelerations as the target inertial acceleration.
6. The method according to claim 1, wherein Each normal vector estimation result includes a pitch angle and a yaw angle; Fusing the plurality of normal vector estimation results to obtain a normal vector detection result of the target projection plane, including: Performing weighted summation on the pitch angles in the plurality of normal vector estimation results to obtain the pitch angle in the normal vector detection result; Performing weighted summation on the yaw angles in the plurality of normal vector estimation results to obtain the yaw angle in the normal vector detection result.
7. The method according to any one of claims 1-6, characterized in that, The plurality of normal vector estimation results include a first normal vector estimation result, and the first normal vector estimation result is a normal vector estimation result estimated based on image sensing data; The obtaining of multiple normal vector estimation results corresponding to the target projection plane includes: Projecting a target image including multiple preset feature points onto the target projection plane; Obtaining a projection plane image corresponding to the target projection plane, where the projection plane image includes the target image; Determining the first normal vector estimation result according to the positions of the multiple preset feature points in the projection plane image.
8. The method according to claim 7, wherein After obtaining the projection plane image corresponding to the target projection plane, it further includes: If at least one of the multiple preset feature points is not detected in the projection plane image, skip the step of determining the first normal vector estimation result according to the positions of the multiple preset feature points in the projection plane image.
9. The method according to any one of claims 1-6, characterized in that The multiple normal vector estimation results include a second normal vector estimation result, and the second normal vector estimation result is a normal vector estimation result estimated based on distance sensing data; The obtaining of multiple normal vector estimation results corresponding to the target projection plane includes: Obtaining four target distance data corresponding to the target projection plane, where the four target distance data respectively reflect the distances between the projection device and the upper, lower, left, and right regions in the target projection plane; Calculating the second normal vector estimation result according to the four target distance data.
10. The method according to claim 9, wherein The obtaining of the four target distance data corresponding to the target projection plane includes: Obtaining multiple distance data between the projection device and a target region in the target projection plane, where the target region is any one of the upper, lower, left, and right regions; Filtering out the distance data that is not within the target distance range corresponding to the target region from the multiple distance data; Determining the mean value of the filtered distance data as the target distance data corresponding to the target region.
11. The method according to claim 10, characterized in that, After obtaining the four target distance data corresponding to the target projection plane, it further includes: If the ratio between the number of filtered distance data and the total number of obtained distance data exceeds a preset ratio, skip the step of calculating the second normal vector estimation result according to the four target distance data.
12. A relative attitude detection device between a projection plane and a projection device, characterized in that It includes: A normal vector obtaining module, configured to obtain multiple normal vector estimation results corresponding to the target projection plane, where the normal vector estimation results are used to represent the normal vector of the estimated target projection plane, and different normal vector estimation results are estimated based on different sensing data; A fusion module, configured to fuse the multiple normal vector estimation results to obtain a normal vector detection result of the target projection plane; Determining a relative pose between the target projection plane and the projection device according to the normal vector detection result, where the relative pose is used to correct a target image, and the target image is an image projected by the projection device onto the target projection plane.
13. A projection device, characterized in that, It includes a memory, a processor, and a variety of sensors. The memory and the variety of sensors are connected to the processor. The variety of sensors are used to detect a variety of sensing data. The processor is used to execute one or more computer programs stored in the memory. When the processor executes the one or more computer programs, the projection device is caused to implement the method according to any one of claims 1-11.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program. The computer program includes program instructions. When the program instructions are executed by the processor, the processor is caused to execute the method according to any one of claims 1-11.