Automatic curtain alignment method and device, computer equipment and storage medium
By combining a three-axis rotating projector with a depth camera and IMU device, the screen range can be identified and the three-axis angle can be calculated, solving the problems of image quality loss and complex installation in projector-screen alignment. Automatic, accurate and lossless screen alignment is achieved, improving user experience and device flexibility.
Patent Information
- Application Number
- CN202511042236.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-28
- Publication Date
- 2025-10-10
AI Technical Summary
During the screen alignment process of existing projectors, software changes lead to image quality loss, and the physical installation method is complex and inflexible, making it difficult to achieve automatic, accurate and lossless screen alignment.
The projector with three-axis rotation function, combined with a depth camera and IMU device, can achieve precise alignment of the projected image with the screen by identifying the screen range, calculating three-axis angle data, and controlling the projector rotation and lens movement.
It achieves lossless, automatic and precise alignment of the projected image, improves user experience and equipment flexibility, and reduces installation complexity and cost.
Smart Images

Figure CN120769028A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of projectors, and more particularly to a method and device for automatic screen alignment, a computer device, and a storage medium. Background Art
[0002] With the continuous development of display technology, projectors, as an important display device, are widely used in various scenarios such as home theaters, conference rooms, and classrooms. During the use of projectors, how to achieve precise alignment between the projected image and the screen has always been one of the key factors affecting the user experience.
[0003] Currently, some projectors with automatic screen alignment features are available on the market. These projectors primarily adjust the projected image through software-based digital transformation methods. Specifically, these projectors use image processing algorithms to drag, scale, and other operations on the projected image to ensure it fits within the screen as closely as possible. This method improves the automation of projected image alignment and reduces the need for manual adjustments.
[0004] However, screen alignment solely through software has significant drawbacks. Due to pixel interpolation and resampling during the software transformation process, the projected image quality suffers a significant loss. This manifests itself as jagged edges, blurred details, and color distortion. Furthermore, because the actual pixel count of the transformed image is reduced, areas not covered by the original image are filled with black, creating a visually distorted gray edge. This not only affects the overall aesthetics of the image but also reduces the audience's sense of immersion, significantly diminishing the overall viewing experience.
[0005] To address these issues, some high-end projectors use physical installation methods for screen alignment. This involves precisely adjusting the projector's mounting position and angle to align the projected image directly with the screen. However, this method places extremely stringent demands on equipment layout and installation techniques, requiring specialized installers and precise measurement tools, increasing cost and complexity. Furthermore, any change in the projector's position requires complex readjustment, making it unsuitable for flexible and ever-changing usage scenarios.
[0006] Therefore, developing an automatic, accurate and flexible screen alignment method while maintaining the quality of the projected image is of great significance for improving the user experience and market competitiveness of the projector. Summary of the Invention
[0007] The purpose of the present invention is to overcome the defects of the prior art and provide a method, device, computer equipment and storage medium for automatic screen alignment.
[0008] To achieve the above object, the present application adopts the following technical solutions.
[0009] The curtain automatic alignment method is applied to a projector with three-axis rotation function, and the method comprises the following steps of:
[0010] Identifying the curtain in the field of view to obtain curtain range data;
[0011] Obtaining depth information from the curtain range data and calculating the included angle of the projector and the curtain on three axes to obtain three-axis angle data;
[0012] Controlling the projector to rotate along the three axes in sequence according to the three-axis angle data, so that the projector directly faces the curtain;
[0013] Performing lens shift and zoom actions to align the projection picture of the projector with the curtain.
[0014] The present application further provides a curtain automatic alignment device applied to a projector with three-axis rotation function, and the device comprises the following:
[0015] An identification unit for identifying the curtain in the field of view to obtain curtain range data;
[0016] An acquisition and calculation unit for obtaining depth information from the curtain range data and calculating the included angle of the projector and the curtain on three axes to obtain three-axis angle data;
[0017] A control unit for controlling the projector to rotate along the three axes in sequence according to the three-axis angle data, so that the projector directly faces the curtain;
[0018] An execution unit for performing lens shift and zoom actions to align the projection picture of the projector with the curtain.
[0019] The present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the above method when executing the computer program.
[0020] The present application further provides a storage medium storing a computer program, wherein the computer program is executed by the processor to implement the above method.
[0021] Compared with the prior art, the present application has the beneficial effects that: through the cooperative optimization of hardware and software, the lossless, automatic and accurate alignment of the projection picture is realized, and the user experience and technical application value are improved.
[0022] The present application will be further described below in combination with the drawings and specific embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0024] Figure 1 A schematic diagram of a process for automatically aligning a screen provided by an embodiment of the present invention;
[0025] Figure 2 Schematic diagram of the three-axis rotation of the projector;
[0026] Figure 3 This is a schematic diagram showing that the projector's image is parallel to the screen but not yet aligned after it has been rotated;
[0027] Figure 4 Schematic diagram of horizontal shift and vertical shift;
[0028] Figure 5 Schematic diagram of lens zoom;
[0029] Figure 6 This is a schematic diagram showing the coincidence of the projection center and the screen center after tilt-shifting;
[0030] Figure 7 This is a schematic diagram of matching projection size with screen size;
[0031] Figure 8 A schematic block diagram of an automatic screen alignment device provided by an embodiment of the present invention;
[0032] Figure 9 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0033] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0034] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0035] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the present invention. As used in the specification and appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0036] Figure 1 FIG. 1 is a flow chart of the automatic screen alignment method provided by an embodiment of the present invention. Figure 1 As shown, the method is applied to a projector with a three-axis rotation function, and includes the following steps S110 to S140.
[0037] S110, identifying the screen within the field of view to obtain screen range data;
[0038] Among them, the projector with three-axis rotation function includes an optical engine module, a three-axis rotation mechanical mechanism and a drive and control system.
[0039] Among them, the optical engine module includes:
[0040] Light source system: uses LED, laser or traditional bulb to provide high-brightness projection beam.
[0041] Imaging chip: such as DLP (digital micromirror device), LCD (liquid crystal panel) or LCoS (liquid crystal on silicon), is responsible for generating image signals.
[0042] Lens group: focuses the light beam and adjusts the focal length to ensure image clarity. Some designs support zoom to adapt to different projection distances.
[0043] The three-axis rotating mechanical mechanism includes:
[0044] Horizontal axis (Yaw): The base or outer frame is driven by a built-in motor to achieve horizontal rotation of the projector left and right (usually ±180°) to adjust the horizontal projection angle of the image.
[0045] Pitch: The middle bracket connects the horizontal axis to the projection body, and controls the up and down tilt (such as ±30°) through the motor to correct the vertical height or tilt of the image.
[0046] Roll: A rotation mechanism is set inside the projector or around the lens to support left and right tilt of the lens (e.g. ±15°) to correct image distortion caused by uneven installation surface.
[0047] Among them, high-precision gears or belts are used between the shafts to ensure smooth rotation without jitter.
[0048] The drive and control system includes:
[0049] Motor driver: Independently controls the three-axis motors, supports speed and acceleration adjustment, and adapts to dynamic adjustment needs.
[0050] Main control board: Receives user input (such as remote control, app, or sensor signals), runs algorithms to calculate target angles, coordinates three-axis linkage to avoid mechanical interference, and supports automatic calibration functions (such as keystone correction and screen alignment).
[0051] Communication module: integrated Wi-Fi, Bluetooth or RS-232 interface to achieve remote control or linkage with smart home system.
[0052] Specifically, the projector has a built-in depth camera or binocular vision system to collect three-dimensional point cloud data in the field of view in real time. The screen area is located through color threshold segmentation (such as the high reflectivity of a white screen under low light) or edge detection (such as the straight line features of the screen frame). Then, combined with the depth information, background interference (such as walls and furniture) is filtered out, and the plane equation and boundary coordinates of the screen (such as the upper left / lower right pixel position) are extracted. Finally, the two-dimensional projection range (pixel coordinate system) and three-dimensional spatial position (world coordinate system) of the screen are generated, and the screen range data is obtained.
[0053] In other words, the depth camera can distinguish between the screen and the background, avoiding misidentification and ensuring the accuracy of the alignment benchmark. In addition, the algorithm supports different lighting conditions (such as dark field / bright field) and screen colors (white / gray / black frame), improving robustness.
[0054] In one embodiment, identifying the screen within the field of view to obtain screen range data includes:
[0055] Collect data on the colors and materials of different screens and frames. Also, record data under different ambient lighting conditions, when the projector is on and off, and when the projector is on, the inclusion, intersection, and inclusion relationships between the image and the screen to form a data set.
[0056] Specifically, the diversity of curtains and curtain frames is collected:
[0057] Color: Covers white, gray, and black framed curtains, as well as special curtains with textures or gradient colors (such as acoustically transparent curtains). Material: Includes PVC soft curtains, fiberglass hard curtains, metal curtains, etc., recording the light reflection characteristics of different materials (such as diffuse reflection and specular reflection). Frame Type: Collects data for borderless, narrow, wide (such as wood or metal frames), and special-shaped frames (such as curved and polygonal).
[0058] Ambient lighting simulation: Light intensity: Collects light in bins ranging from 0.1 lux (dark room) to 1000 lux (direct sunlight). Light source type: Includes light sources with different spectral distributions, such as LEDs, fluorescent lamps, and projection lights. Lighting angle: Simulates frontal, side, and backlit scenes, recording changes in highlights and shadows on the screen surface.
[0059] Projector status data collection: Off state: Only the original image of the screen under ambient light is collected for background modeling.
[0060] Opening state: Relationship between the picture and the screen: There are three types of scene collection:
[0061] The image is contained by the screen (projection size < screen size);
[0062] The picture intersects with the screen (the projected part overflows the screen);
[0063] The image includes the screen (projection size > screen size, such as ultra-short-throw projection).
[0064] Screen content: including pure color test images, grid images, natural images, etc., to prevent content from interfering with screen feature extraction.
[0065] In addition, the polygon annotation tool is used to accurately outline the curtain contour, and the annotation attributes include curtain type, lighting conditions, projection status, etc. The curtain frame area is separately annotated for subsequent verification of quadrilateral extraction rules.
[0066] Select an image segmentation model based on segmentation performance, running speed, model size, and compatibility with the motherboard's CPU / GPU architecture;
[0067] Specifically, the model selection criteria are:
[0068] Segmentation effect: Prioritize models with mIoU (mean intersection over union) > 90%, such as DeepLabV3+ and Mask R-CNN.
[0069] Running speed: Measure the FPS on a projector motherboard (such as an ARM Cortex-A72) and select a lightweight model (such as MobileNetV3-DeepLab) that meets real-time requirements (≥15 FPS).
[0070] Model size: The compressed model size is less than 50MB, suitable for embedded storage (such as eMMC 4GB).
[0071] Hardware adaptation: Optimize operators for motherboard GPUs (such as Mali-G52) and enable TensorRT or OpenVINO acceleration.
[0072] Use the dataset to train the image segmentation model to obtain the recognition model;
[0073] Specifically, the Dice Loss + BCE Loss (weight ratio 7:3) is adopted to solve the class imbalance problem caused by the small proportion (about 5%) of the curtain edge pixels. AdamW (β1=0.9, β2=0.999) is used with an initial learning rate of 3e-4, and a Cosine Annealing scheduler is used for dynamic adjustment. In addition, the training set: validation set: test set = 7:2:1, to ensure that the model has not seen the test scene (such as new material curtains).
[0074] More specifically, the training is performed on an NVIDIA A100 GPU (40GB memory) with a batch size of 16 and 100 training epochs. The training is terminated when the validation set mIoU does not improve for 5 consecutive rounds to prevent overfitting (the final training epoch is 72). The trained PyTorch model is converted to ONNX format and then deployed to the projector through TensorRT quantization (INT8).
[0075] The field of view image captured by the depth camera on the projector is input to the recognition model to obtain the curtain segmentation result.
[0076] Specifically, Intel RealSense D435i (integrated RGB camera and ToF depth sensor) is used with a resolution of 1280x720 and a frame rate of 30fps. The projector light machine and the camera exposure are synchronized through the GPIO interface to avoid image blur caused by flickering. In addition, the lens distortion (radial distortion coefficients k1=-0.1, k2=0.02) is corrected according to the camera intrinsic parameters (fx, fy, cx, cy, k1, k2). In addition, the pixel value is scaled to the range [0, 1] to accelerate model convergence. In addition, the BiSeNetV2 model optimized by TensorRT is run on RK3588 NPU with an input size of 512x512 (scaled by bilinear interpolation). The probability map (0-1) output by the model is binarized with a threshold of 0.5 to generate the curtain mask. The mask is opened (eroded first and then dilated) to remove small noise (such as dust particles), and closed to fill small holes on the edge of the curtain, finally obtaining the curtain segmentation result.
[0077] The curtain segmentation result is extracted to obtain the curtain range data.
[0078] Specifically, the Otsu algorithm or local adaptive threshold (such as the Sauvola algorithm) is used to dynamically calculate the segmentation threshold based on the grayscale distribution of the screen area and the background. For example, when the projector is turned on, the screen area has a higher brightness due to the reflected projection light, while the background (such as the wall) has a lower brightness. The Otsu algorithm can automatically distinguish between the two. If the input is RGB-D data, the threshold can be adjusted in combination with the depth information. For example, for pixels within the depth range of the screen in the depth map, the brightness threshold is lowered to retain the edge of the low-reflectivity screen (such as a gray screen). If the screen is black after binarization (the background is white), it needs to be inverted to unify the subsequent processing logic.
[0079] In addition, the kernel size is selected according to the noise type of the screen segmentation result. For example, if there are isolated small noise points (such as reflections from stains on the screen surface), a 3×3 rectangular kernel is used; if there are slender noise points (such as projections from screen wrinkles), a 5×5 elliptical kernel is used. The kernel size is dynamically adjusted according to the area of the screen contour. For example, a 7×7 kernel is used for a large screen (such as 120 inches), and a 3×3 kernel is used for a small screen (such as 60 inches). In addition, the corrosion operation is used to eliminate holes (such as the black area inside the screen caused by reflections), and the expansion operation restores the continuity of the screen edge. It is usually iterated 1-2 times to avoid excessive corrosion that causes the screen edge to shrink or excessive expansion that introduces background noise.
[0080] In addition, all contours are quickly extracted based on topological analysis, and the area, perimeter and other features of each contour are calculated. The findContours function of OpenCV is used to obtain the parent-child relationship of the contours, and the outer contours are processed first (to avoid interference from the internal structure of the curtain frame). Contours with too small an area (such as noise) and contours with too large an area (such as windows in the background) are excluded. For example, the area threshold is set to 50%-150% of the total area of the curtain segmentation result. Contours are filtered according to the typical aspect ratio of the curtain (such as 16:9 or 4:3), and non-rectangular objects (such as round chandeliers) are excluded.
[0081] In addition, after obtaining the maximum contour, the least squares method or other suitable fitting algorithm is used to fit a regular quadrilateral to the maximum contour. The basic idea of the least squares method is to find the optimal quadrilateral parameters by minimizing the sum of the squares of the distances from the points on the contour to the fitted quadrilateral. In specific implementation, you can first assume the coordinates of the four vertices of a quadrilateral, and then adjust the coordinates of the four vertices through mathematical calculations based on the coordinates of the points on the contour so that the sum of the squares of the distances from the points on the contour to the quadrilateral is minimized. Finally, a regular quadrilateral that can better enclose the maximum contour is obtained. The four vertex coordinates of this quadrilateral represent the curtain range data.
[0082] S120, obtaining depth information from the screen range data, and calculating the angles between the projector and the screen on three axes to obtain three-axis angle data;
[0083] Specifically, depth information is obtained from the curtain range data, and then a curtain plane equation is constructed according to the depth information, and a normal vector is extracted from the curtain plane equation, and an included angle is calculated with the projector optical axis direction (default vertical downward or horizontal forward). The three-axis angle includes:
[0084] Horizontal axis (Yaw) : the rotation angle of the curtain plane around the vertical axis (left and right skew).
[0085] Pitch axis (Pitch) : the rotation angle of the curtain plane around the horizontal axis (up and down tilt).
[0086] Roll axis (Roll) : the rotation angle of the curtain plane around the optical axis (picture distortion).
[0087] In addition, the integrated IMU (Inertial Measurement Unit) monitors the projector posture in real time, and corrects the calculation error (such as the initial deviation caused by the uneven installation surface).
[0088] That is, the coverage of traditional trapezoidal correction can only handle the limitations of pitch / roll, and the alignment of any angle in space is realized. IMU data can correct the angle drift caused by projector movement or vibration in real time, and improve stability.
[0089] In an embodiment, the depth information is obtained from the curtain range data, and the included angle of the projector and the curtain in three axes is calculated to obtain three-axis angle data, including:
[0090] Depth information in the curtain range data is collected by a depth camera to obtain a collection image, and data of an accelerometer is collected by an IMU device;
[0091] Specifically, the depth camera is aligned with the curtain, and the position and angle of the camera are adjusted so that the curtain is completely within the field of view of the camera. Start the collection function of the depth camera and set appropriate collection parameters such as resolution, frame rate, etc. The selection of resolution needs to be determined according to actual demand and computing resources, higher resolution can provide more detailed depth information, but will increase the amount of data processing; frame rate affects the real-time performance of collection. The depth camera measures the distance from the object to the camera by emitting infrared light or other means, and fuses the depth information with the color image information (if it is an RGB-D camera) to generate a collection image containing depth information. Each pixel point in this collection image contains not only color information (if it is an RGB-D camera), but also distance information from the camera to the camera. Example: in a conference room, install the depth camera next to the projector, adjust the angle of the camera so that it faces the curtain. Set the resolution of the depth camera to 640x480 and the frame rate to 30fps, then start the collection function to obtain a collection image containing depth information of the curtain.
[0092] The 3D point corresponding to the pixel coordinate in the collected image is calculated;
[0093] Specifically, the intrinsic matrix of the depth camera is known, which contains parameters such as the focal length and principal point coordinates of the camera. These parameters are usually obtained during camera calibration. For each pixel in the collected image, its corresponding depth value is obtained from the depth channel of the collected image. According to the pinhole model of camera imaging, the pixel coordinates can be converted into coordinates in the 3D camera coordinate system.
[0094] According to the 3D points, the point cloud data of the curtain is constructed, and the point cloud data is fitted to obtain the plane equation in which the curtain is located.
[0095] Specifically, the 3D points corresponding to all pixel points in the collected image are collected to construct the point cloud data of the curtain. The point cloud data is a set of points in 3D space, which can intuitively represent the shape and position of the curtain. A plane fitting algorithm (such as the least squares method) is used to fit the point cloud data to obtain the plane equation in which the curtain is located. The basic idea of the least squares method is to find a plane such that the sum of the squared distances of all points in the point cloud to the plane is minimized.
[0096] According to the plane equation, the horizontal deflection angle is calculated, and the pitch angle and roll angle are calculated according to the data collected by the IMU device, and are integrated to obtain three-axis angle data.
[0097] Specifically, the horizontal deflection angle (Yaw): The horizontal deflection angle represents the rotation angle of the curtain plane around the z-axis. It can be obtained by calculating the angle between the projection of the plane normal vector on the x-y plane and the x-axis.
[0098] Pitch angle (Pitch): The pitch angle represents the rotation angle of the curtain plane around the x-axis. The pitch angle can be calculated only by the IMU.
[0099] Roll angle (Roll): After the horizontal deflection angle and the pitch angle are determined, the roll angle can be calculated through further geometric relationships. The roll angle represents the rotation angle of the curtain plane around the y-axis, and the roll angle can be calculated only by the IMU.
[0100] The calculated horizontal deflection angle, pitch angle and roll angle are integrated to obtain three-axis angle data.
[0101] In other words, by directly acquiring the screen's depth information, we provide richer 3D scene information than traditional methods that rely solely on color images. This enables subsequent calculations to more accurately determine the screen's position and shape in 3D space, providing the foundation for precisely calculating the three-axis angle between the projector and the screen. Furthermore, by converting 2D pixel coordinates into point coordinates in 3D space, we establish a connection between the image and the actual 3D scene. This enables us to extract physically meaningful 3D information from the image, providing the necessary data support for subsequent point cloud data construction and plane fitting. Furthermore, point cloud data intuitively represents the screen's shape and position, while plane fitting further abstracts the screen into a mathematical plane, deriving the plane equation for the screen. This plane equation provides a key mathematical model for subsequent calculations of the three-axis angle between the projector and the screen, enabling angle calculations based on accurate geometric relationships. Furthermore, the calculated three-axis angle data accurately describes the spatial posture relationship between the projector and the screen. These angle data can be used for automatic correction of the projector, so that the projected image can be accurately projected on the screen, improving the projection effect; they can also be used in applications such as virtual reality and augmented reality to achieve more accurate scene fusion and interaction.
[0102] More specifically, after obtaining the screen range data, the depth information within the range is obtained from the depth camera. Combined with the IMU device, the angle between the projector and the screen on the three axes is calculated. The steps are as follows:
[0103] (1) Calculate the 3D point (X, Y, Z) corresponding to the pixel coordinates (u, v) in the depth camera image:
[0104]
[0105] Among them, f x 、f y is the focal length of the depth camera in the x and y directions (in pixels), c x 、c y is the pixel coordinate of the principal point (optical center) of the depth camera, these values are pre-calibrated by the camera; Z depth is the depth value corresponding to the coordinate (u, v) in the depth map.
[0106] (2) Through the above steps, the 3D point cloud information of the curtain can be obtained, and the point cloud can be fitted with a plane. The fitting method can use RANSAC or the least squares method to obtain the plane equation:
[0107] Ax+By+Cz+D=0;
[0108] Among them, the vector (A, B, C) is the normal vector of the plane.
[0109] (3) When the projector is manufactured, the normal vector a of the optical machine facing the projection surface can be pre-calibrated. When the projector is used, horizontal deflection occurs. The normal vector b at this time is obtained according to step (2), and the angle θ between the two normal vectors is calculated:
[0110]
[0111] where a·b is the dot product of the vectors:
[0112] a·b=a x b x +a y b y +a z b z ;
[0113] Where ‖a‖ and ‖b‖ are the magnitudes of the vectors:
[0114]
[0115] Then θ is the horizontal deflection angle.
[0116] (4) Based on the IMU device, the pitch angle and roll angle can be calculated separately:
[0117]
[0118] Among them, (a x , a y , a z ) is the three-axis data of the accelerometer, α is the pitch angle, and β is the roll angle.
[0119] S130, controlling the projector to rotate along the three axes in sequence according to the three-axis angle data so that the projector faces the screen;
[0120] Specifically, the rotation order is optimized:
[0121] Pan first, then pitch: Avoid changing the horizontal axis coordinates during pitch rotation to reduce cumulative errors.
[0122] Final adjustment of the scroll axis: Make sure there is no distortion on the image before fine-tuning.
[0123] Motor control strategy: Uses a PID control algorithm to drive the three-axis motors, dynamically adjusting the speed based on angular error (e.g., fast rotation at large angles, slow and precise positioning at small angles). Set mechanical and soft limits (e.g., ±180° rotation range) to prevent hardware collisions.
[0124] In other words, independent control of each axis shortens adjustment time. In addition, the PID algorithm eliminates jitter during rotation and prevents screen flicker.
[0125] The control of the projector according to the three-axis angle data is sequentially rotated along three axes to make the projector face the screen, comprising:
[0126] The rotation sequence of the projector is set, sequentially horizontal rotation, pitch rotation and roll rotation;
[0127] Specifically, from the perspective of the mechanical structure and control principle of the projector. The horizontal rotation mainly adjusts the orientation of the projector in the horizontal plane, the pitch rotation adjusts the inclination angle of the projector in the vertical plane, and the roll rotation adjusts the rotation angle of the projector around its front-back axis. Considering the mutual influence between rotations, first performing horizontal rotation can first determine the general alignment of the projector in the horizontal direction, providing a relatively stable horizontal reference for subsequent pitch and roll adjustments. If pitch or roll rotation is performed first, the position of the projector in the horizontal plane may be changed, making the subsequent horizontal rotation adjustment complex. After completing the horizontal rotation, the pitch rotation is performed to further adjust the up-down angle of the projector, making the projection light closer to vertical projection on the screen. Finally, the roll rotation is performed to adjust the slight inclination of the projector, ensuring the accuracy of the vertical and horizontal directions of the projection picture. Example: In a conference room, the staff pre-sets the rotation sequence in the control system of the projector according to experience and understanding of the projector adjustment, which is horizontal rotation first, then pitch rotation, and finally roll rotation.
[0128] According to the three-axis angle data, set the corresponding rotation angle for each rotation axis;
[0129] Specifically, the three-axis angle data calculated in the previous step is obtained, assuming that the three-axis angle data is (θ, α, β), where θ is the horizontal deflection angle, α is the pitch angle, and β is the roll angle.
[0130] For the horizontal rotation axis, the horizontal deflection angle θ is directly used as the set angle for horizontal rotation. If θ is positive, the projector needs to rotate to the right; if it is negative, it needs to rotate to the left.
[0131] For the pitch rotation axis, the pitch angle α is used as the set angle for pitch rotation. If α is positive, the projector needs to be tilted upwards; if it is negative, it needs to be tilted downwards.
[0132] For the roll rotation axis, the roll angle β is used as the set angle for roll rotation. When β is positive, the projector rotates clockwise around its front-back axis (from the front of the projector); when β is negative, it rotates counterclockwise.
[0133] According to the rotation sequence of horizontal rotation, pitch rotation and roll rotation, and the corresponding rotation angle, the projector is sequentially rotated to make the projector face the screen.
[0134] Specifically, a horizontal rotation command containing a set horizontal rotation angle θ is sent to the projector through the projector's control interface (such as a serial port or network interface). Upon receiving the command, the projector's rotation mechanism (such as a stepper motor or servo motor) rotates horizontally by the specified angle. During the rotation process, a sensor (such as an encoder) provides real-time feedback on the rotation angle to ensure rotation accuracy.
[0135] Pitch control: After completing horizontal rotation, a pitch command is sent to the projector, which contains the set pitch angle α. The projector's pitch mechanism makes corresponding pitch adjustments based on the command, and angle feedback and correction can also be performed through sensors.
[0136] Roll rotation control: Finally, a roll rotation command is sent, which includes the set roll rotation angle β, and the projector's roll rotation mechanism completes the final adjustment.
[0137] After each rotation, a visual feedback system (such as a camera) or a projection image detection algorithm can be used to check whether the projector is facing the screen. If the projected image is still deviated, the three-axis angle data can be re-acquired and the rotation adjustment can be performed again until the projector is accurately facing the screen.
[0138] For example, in a smart conference room system, a central controller communicates with a projector. Following a preset rotation sequence and angles, the central controller sends commands to the projector: pan 10°, pitch -5°, and roll 2°. Upon receiving these commands, the projector's motor drive system then completes the corresponding rotations.
[0139] In other words, this rotation sequence fully considers the coupling relationship between rotations, reducing mutual interference during the rotation process and improving adjustment efficiency and accuracy. Performing horizontal rotation first quickly determines the projector's approximate horizontal position, providing a good foundation for subsequent pitch and roll adjustments, making the entire adjustment process more organized and efficient. Furthermore, the projector's rotation on each axis can be precisely controlled, ensuring that the projector can be accurately adjusted to a position facing the screen. By directly applying the calculated three-axis angle data to the rotation angle setting, projector adjustment is quantified and precise, eliminating the subjectivity and uncertainty of manual adjustment. Furthermore, by controlling the projector's rotation according to the set sequence and angle, the projector can automatically align with the screen. This not only improves the efficiency of projector installation and commissioning, reducing the workload and time cost of manual operation, but also ensures the quality and accuracy of the projected image, providing users with a better visual experience.
[0140] like Figure 2The three calculated angles are sent to the rotating mechanism to make the projector rotate along the three axes in sequence and face the screen.
[0141] S140, performing lens shift and zoom actions to align the projection screen of the projector with the screen.
[0142] Specifically, the remaining offset is compensated by fine-tuning the up / down / left / right position of the picture through the tilt shift mechanism (such as Shift lens group) built in the lens. In addition, the best projection distance is calculated according to the screen depth data, and the zoom lens is driven to adjust the focal length to ensure that the picture fills the screen and the edges are clear.
[0143] That is, the shift eliminates the pixel stretching caused by traditional trapezoidal correction, maintaining the original resolution. The zoom function adapts to different sizes of screens (such as 80-150 inches), without the need for manual adjustment of the projection distance.
[0144] In an embodiment, the execution of the lens shift and zoom actions to align the projection screen of the projector with the screen comprises:
[0145] Determine the shift parameters and zoom parameters;
[0146] Specifically, the parameters are determined based on image analysis: after the projector is turned on, the projection picture on the screen and the boundary information of the screen are captured through the camera built in the projector or the auxiliary camera connected externally. Image processing algorithms such as edge detection algorithms (such as Canny edge detection algorithm) are used to identify the edges of the projection picture and the edges of the screen. In addition, the positional deviation between the edges of the projection picture and the edges of the screen is calculated, including the deviation distance in the horizontal and vertical directions. According to these deviation distances, combined with the optical characteristics and mechanical structure of the projector lens, the shift parameters to be adjusted, such as the horizontal shift amount and the vertical shift amount, are calculated through a pre-established mathematical model. At the same time, the difference between the size of the projection picture and the size of the screen is analyzed. If the projection picture is too large or too small, according to the linear relationship of the lens zoom, the appropriate zoom parameter, i.e. zoom multiple, is calculated to make the projection picture exactly fill the screen. For example: in a classroom, the picture projected by the projector has a large blank on the right side of the screen and the left edge is close to the edge of the screen. Through image analysis, it is detected that there is a 20 cm deviation between the right edge of the picture and the right edge of the screen in the horizontal direction. According to the shift characteristics of the projector lens (1 mm of shift corresponds to 5 cm of picture horizontal movement), the horizontal shift amount is calculated to be 4 mm. If the height of the projection picture is less than the height of the screen, the ratio of the height of the picture to the height of the screen is determined to determine that the lens needs to be zoomed by 1.2 times to match the height of the picture with the screen.
[0147] Control the lens of the projector to perform the shift action according to the shift parameters;
[0148] Specifically, the projector's control unit (such as a microcontroller or dedicated chip) receives the calculated shift parameters and converts them into corresponding control signals. For horizontal shift, the control unit sends a pulse signal to the horizontal shift motor. The motor's rotation is converted into linear horizontal movement of the lens through a transmission mechanism (such as a screw-nut mechanism). Based on the shift parameter and the motor's step angle or speed, the number of motor revolutions or pulses is precisely controlled to achieve accurate horizontal shift of the lens. The control principle for vertical shift is similar to that of horizontal shift. The control unit sends a control signal to the vertical shift motor to move the lens vertically. During the shift process, a position sensor provides real-time feedback on the lens' position. The control unit uses this feedback to implement closed-loop control of the motor to ensure that the lens accurately reaches the target shift position. For example, after receiving a 4 mm horizontal shift parameter, the projector control unit calculates that 400 pulse signals are required based on the horizontal shift motor's step angle (e.g., 0.01 mm per step). Upon receiving the pulse signals, the motor begins rotating, and the screw-nut mechanism converts the rotational motion into linear motion, driving the lens to move 4 mm horizontally. At the same time, the position sensor monitors the position of the lens in real time. When it detects that the lens has reached the target position, it sends a feedback signal to the control unit. The control unit stops sending pulse signals and the motor stops rotating.
[0149] The projector lens is controlled to perform a zoom action according to the zoom parameter so that the projected image of the projector is aligned with the screen.
[0150] Specifically, after the control unit of the projector receives the zoom parameter (zoom factor), it converts it into a control signal for the zoom motor according to the optical principles and mechanical structure of the lens zoom. For a motorized zoom lens, the zoom motor drives the zoom lens group inside the lens to move through a transmission device (such as a gear set), thereby changing the focal length of the lens and achieving zoom function. The control unit calculates the distance the zoom lens group needs to move based on the zoom factor and sends corresponding number and frequency of pulse signals to the zoom motor to control the direction and speed of the motor. During zooming, the focal length sensor can monitor the change of the focal length of the lens in real time, and the control unit compares the feedback focal length information with the target focal length to adjust the control signal of the motor, achieving closed-loop control of zooming and ensuring that the lens can accurately zoom to the target focal length, making the projection picture align with the screen. For example: after the control unit of the projector receives the parameter that the lens needs to be zoomed by 1.4 times, it calculates that the zoom lens group needs to move 10 millimeters according to the zoom characteristic curve of the lens. The control unit sends pulse signals to the zoom motor, and the motor starts to rotate, driving the zoom lens group to move through the gear set. At the same time, the focal length sensor monitors the focal length of the lens in real time, and when it detects that the focal length reaches the target value (corresponding to 1.4 times zoom), it sends feedback signals to the control unit, which stops sending pulse signals and the motor stops rotating, completing the zooming action.
[0151] That is, by determining the shift parameter and zoom parameter through image analysis or sensor feedback, the deviation information between the projection picture and the screen can be accurately obtained, and precise calculation can be performed according to the characteristics of the projector lens. This method improves the accuracy and reliability of parameter determination, avoids errors in manual estimation and adjustment, and provides an accurate basis for subsequent lens adjustment. In addition, the position of the projector lens in the horizontal and vertical directions can be accurately adjusted to correct the tilt and offset of the projection picture. Through closed-loop control, combined with the feedback of the position sensor, the lens can accurately reach the target shift position, improving the accuracy of the projection picture and the screen alignment, making the projection picture more regular and clear. In addition, the size of the projection picture can be accurately adjusted according to the size of the screen and the projection distance, so that the projection picture fills the screen exactly, avoiding the problem of picture being too large to exceed the screen or too small to leave blank. The closed-loop control zooming method can ensure that the lens accurately zooms to the target focal length, improving the stability and reliability of the projection picture and the screen alignment, providing better visual experience for users. By combining shift and zoom actions, the position and size of the projection picture can be adjusted comprehensively, achieving fast and accurate alignment of the projector and the screen.
[0152] As shown in Figure 3 , after the projector rotates, its picture is parallel to the screen, but it is not yet aligned.
[0153] More specifically, the next step is to align the projected image with the screen: the key actions for lossless alignment are lens shift and zoom:
[0154] (1) Shifting is to change the relative relationship between the optical axis and the projection panel by translating the lens, so that the position of the projected image moves without changing the position of the projector body; Shifting is divided into horizontal shifting and vertical shifting, such as Figure 4 shown.
[0155] (2) Zoom is achieved by changing the relative position of the lens group inside the lens to achieve the change of projection ratio. Under the premise that the position of the projector body does not change, the size of the projected image is enlarged or reduced. Figure 5 shown.
[0156] (3) Since shift and zoom change the light path rather than operate the pixels of the projection panel, the projected image remains lossless after the position and size are changed.
[0157] The specific process of screen alignment is as follows:
[0158] (1) First, align the projection center with the screen center by shifting the axis. The shift amount is calculated as follows:
[0159]
[0160] Among them, f is the physical focal length of the lens, D is the depth of the center of the screen, △d x and △d y are the Euclidean distances between the projection center and the screen center in the horizontal and vertical directions respectively:
[0161] Δd x =|X2-X1|;
[0162] Δd y =|Y2-Y1|;
[0163] Among them, (X1, Y1) is the world coordinate of the projection center, and (X2, Y2) is the world coordinate of the screen center (the depth value is D).
[0164] (2) Based on △s x Control the horizontal shift of the lens, and then according to △s y Control the vertical shift of the lens so that the projection center and the screen center coincide with each other. Figure 6 shown.
[0165] (3) Align the projection size with the screen size by zooming. The target focal length required for zooming is calculated as follows:
[0166]
[0167] Among them, f current is the current lens focal length, usually read by the API provided by the module; Ws is the screen width, W current is the projection width, both of which can be calculated using the above 3D points.
[0168] W = |X2-X1|;
[0169] Among them, X1 and X2 are the horizontal coordinates of the diagonal points of the screen / projection image respectively.
[0170] (4) According to f target Control the lens zoom, and the projection size after zooming matches the screen size, such as Figure 7 shown.
[0171] In other words, through the above steps, the projected image can be automatically and losslessly aligned with the screen.
[0172] The above-mentioned automatic screen alignment method, through the coordinated optimization of hardware and software, achieves lossless, automatic and precise alignment of the projected image, improving the user experience and the value of technical application.
[0173] Figure 8 FIG is a schematic block diagram of an automatic screen alignment device 300 provided by an embodiment of the present invention. Figure 8 As shown, corresponding to the above automatic screen alignment method, the present invention also provides an automatic screen alignment device 300. The automatic screen alignment device 300 includes a unit for executing the above automatic screen alignment method, and the device can be configured in a server. Figure 8 The automatic screen alignment device 300 is applied to a projector with a three-axis rotation function, and the device includes:
[0174] The identification unit 301 is used to identify the curtain in the field of view to obtain curtain range data;
[0175] An acquisition and calculation unit 302 is used to obtain depth information from the screen range data and calculate the angle between the projector and the screen on three axes to obtain three-axis angle data;
[0176] The control unit 303 is used to control the projector to rotate along the three axes in sequence according to the three-axis angle data so that the projector faces the screen;
[0177] The execution unit 304 is configured to execute lens shift and zoom operations to align the projection image of the projector with the screen.
[0178] In one embodiment, the identification unit 301 includes:
[0179] The collection module is used to collect data on the colors and materials of different screens and screen frames. It also records data under different ambient lighting conditions, data when the projector is on and off, and data on the inclusion, intersection, and inclusion relationships between the image and the screen when the projector is on, to form a data set.
[0180] The selection module is used to select an image segmentation model based on segmentation effect, running speed, model size, and compatibility with the motherboard CPU / GPU architecture;
[0181] A training module is used to train the image segmentation model using the data set to obtain a recognition model;
[0182] The input acquisition module is used to input the field of view image captured by the depth camera on the projector into the recognition model to obtain the screen segmentation result;
[0183] The extraction module is used to extract regular quadrilateral screen data from the curtain segmentation result to obtain curtain range data.
[0184] In one embodiment, the obtaining and calculating unit 302 includes:
[0185] The acquisition module is used to collect depth information within the range of the screen through the depth camera to obtain the acquired image, and to collect accelerometer data through the IMU device;
[0186] A calculation module, used to calculate the 3D points corresponding to the pixel coordinates in the captured image;
[0187] Build a fitting module to construct the point cloud data of the curtain based on the 3D points, and perform plane fitting on the point cloud data to obtain the plane equation of the curtain;
[0188] The calculation and integration module is used to calculate the horizontal deflection angle based on the plane equation, and then calculate the pitch angle and roll angle based on the data collected by the IMU device, and integrate them to obtain three-axis angle data.
[0189] In one embodiment, the control unit 303 includes:
[0190] The first setting module is used to set the rotation order of the projector, which is horizontal rotation, pitch rotation and roll rotation;
[0191] The second setting module is used to set the corresponding rotation angle for each rotation axis according to the three-axis angle data;
[0192] The control module is used to control the projector to rotate in sequence according to the rotation order of horizontal rotation, pitch rotation and roll rotation, and the corresponding rotation angles, so that the projector faces the screen.
[0193] In one embodiment, the execution unit 304 includes:
[0194] A determination module, used for determining a shift parameter and a zoom parameter;
[0195] A first execution module, configured to control the lens of the projector to perform a shift action according to the shift parameter;
[0196] The second execution module is used to control the lens of the projector to perform a zoom action according to the zoom parameter, so that the projection image of the projector is aligned with the screen.
[0197] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned automatic screen alignment device 300 and each unit can refer to the corresponding description in the above-mentioned method embodiment, and for the convenience and brevity of description, it will not be repeated here.
[0198] The automatic curtain alignment device 300 can be implemented as a computer program. Figure 9 Runs on the computer equipment shown.
[0199] See also Figure 9 , Figure 9 1 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 500 may be a server, wherein the server may be an independent server or a server cluster composed of multiple servers.
[0200] See Figure 9 The computer device 500 includes a processor 502 , a memory, and a network interface 505 connected via a system bus 501 , wherein the memory may include a non-volatile storage medium 503 and an internal memory 504 .
[0201] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions, which, when executed, can enable the processor 502 to perform a method for automatically aligning a screen.
[0202] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500.
[0203] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a method for automatic alignment of a screen.
[0204] The network interface 505 is used to communicate with other devices through the network. Figure 9The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0205] The processor 502 is configured to execute a computer program 5032 stored in the memory to implement the following steps:
[0206] Identify the screen within the field of view to obtain screen range data; obtain depth information from the screen range data, and calculate the angle between the projector and the screen on three axes to obtain three-axis angle data; control the projector to rotate along the three axes in sequence according to the three-axis angle data so that the projector faces the screen; perform lens shift and zoom actions to align the projected image of the projector with the screen.
[0207] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0208] Those skilled in the art will appreciate that all or part of the steps in the method of the above-described embodiment can be implemented by instructing the relevant hardware through a computer program. The computer program includes program instructions, which can be stored in a storage medium that is computer-readable. The program instructions are executed by at least one processor in the computer system to implement the steps in the method of the above-described embodiment.
[0209] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein when the computer program is executed by a processor, the processor performs the following steps:
[0210] Identify the screen within the field of view to obtain screen range data; obtain depth information from the screen range data, and calculate the angle between the projector and the screen on three axes to obtain three-axis angle data; control the projector to rotate along the three axes in sequence according to the three-axis angle data so that the projector faces the screen; perform lens shift and zoom actions to align the projected image of the projector with the screen.
[0211] The storage medium may be any computer-readable storage medium that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk.
[0212] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the composition and steps of each example according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0213] In the several embodiments provided herein, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the various units is merely a logical functional division, and actual implementation may employ other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not implemented.
[0214] The steps in the methods of the embodiments of the present invention may be adjusted in order, combined, or deleted as needed. The units in the devices of the embodiments of the present invention may be combined, divided, or deleted as needed. Furthermore, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit.
[0215] If this integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the existing technology, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, terminal, or network device, etc.) to execute all or part of the steps of the method described in various embodiments of the present invention.
[0216] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. The automatic screen alignment method is characterized by: Applied to a projector with a three-axis rotation function, the method includes: Identify the screen within the field of view to obtain screen range data; Obtain depth information from the screen range data and calculate the angle between the projector and the screen on the three axes to obtain the three-axis angle data; According to the three-axis angle data, the projector is controlled to rotate along the three axes in sequence so that the projector faces the screen; Perform lens shift and zoom movements to align the projector's image with the screen.
2. The automatic screen alignment method according to claim 1, characterized in that: The identifying of the curtain within the field of view to obtain curtain range data includes: Collect data on the colors and materials of different screens and frames. Also, record data under different ambient lighting conditions, when the projector is on and off, and when the projector is on, the inclusion, intersection, and inclusion relationships between the image and the screen to form a data set. Select an image segmentation model based on segmentation performance, running speed, model size, and compatibility with the motherboard's CPU / GPU architecture; Use the dataset to train the image segmentation model to obtain the recognition model; Input the field of view image captured by the depth camera on the projector into the recognition model to obtain the screen segmentation result; Regular quadrilateral screen data is extracted from the curtain segmentation result to obtain curtain range data.
3. The automatic screen alignment method according to claim 1, characterized in that: The method of obtaining depth information from the screen range data and calculating the angle between the projector and the screen on three axes to obtain three-axis angle data includes: The depth information within the range of the screen is collected by the depth camera to obtain the collected image, and the accelerometer data is collected by the IMU device; Calculate the 3D points corresponding to the pixel coordinates in the acquired image; Construct the point cloud data of the curtain based on the 3D points, and perform plane fitting on the point cloud data to obtain the plane equation of the curtain; The horizontal deflection angle is calculated according to the plane equation, and the pitch angle and roll angle are calculated according to the data collected by the IMU device, and then integrated to obtain the three-axis angle data.
4. The automatic screen alignment method according to claim 1, characterized in that: The method of controlling the projector to rotate along the three axes in sequence according to the three-axis angle data so that the projector faces the screen includes: Set the rotation order of the projector, which is horizontal rotation, pitch rotation and roll rotation; According to the three-axis angle data, set the corresponding rotation angle for each rotation axis; The projector is controlled to rotate in sequence according to the rotation order of horizontal rotation, pitch rotation and roll rotation, and the corresponding rotation angles, so that the projector faces the screen.
5. The automatic screen alignment method according to claim 1, characterized in that: The performing of lens shift and zoom actions to align the projection image of the projector with the screen includes: Determine the shift and zoom parameters; Controlling the lens of the projector to perform a shift action according to the shift parameter; The projector lens is controlled to perform a zoom action according to the zoom parameter so that the projected image of the projector is aligned with the screen.
6. The automatic screen alignment device is characterized by: Applicable to a projector with a three-axis rotation function, the device comprises: An identification unit, used for identifying the screen in the field of view to obtain screen range data; An acquisition calculation unit is used to obtain depth information from the screen range data and calculate the angle between the projector and the screen on three axes to obtain three-axis angle data; A control unit, configured to control the projector to rotate along the three axes in sequence according to the three-axis angle data so that the projector faces the screen; The execution unit is used to execute lens shift and zoom actions to align the projection image of the projector with the screen.
7. The automatic screen alignment device according to claim 6, characterized in that: The identification unit includes: The collection module is used to collect data on the colors and materials of different screens and screen frames. It also records data under different ambient lighting conditions, data when the projector is on and off, and data on the inclusion, intersection, and inclusion relationships between the image and the screen when the projector is on, to form a data set. The selection module is used to select an image segmentation model based on segmentation effect, running speed, model size, and compatibility with the motherboard CPU / GPU architecture; A training module is used to train the image segmentation model using the data set to obtain a recognition model; The input acquisition module is used to input the field of view image captured by the depth camera on the projector into the recognition model to obtain the screen segmentation result; The extraction module is used to extract regular quadrilateral screen data from the curtain segmentation result to obtain curtain range data.
8. The automatic screen alignment device according to claim 6, characterized in that: The acquisition calculation unit includes: The acquisition module is used to collect depth information within the range of the screen through the depth camera to obtain the acquired image, and to collect accelerometer data through the IMU device; A calculation module, used to calculate the 3D points corresponding to the pixel coordinates in the captured image; Build a fitting module to construct the point cloud data of the curtain based on the 3D points, and perform plane fitting on the point cloud data to obtain the plane equation of the curtain; The calculation and integration module is used to calculate the horizontal deflection angle based on the plane equation, and then calculate the pitch angle and roll angle based on the data collected by the IMU device, and integrate them to obtain three-axis angle data.
9. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 5 when executing the computer program.
10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.