Projection control method and device, equipment and storage medium

By acquiring historical and current projection information of the projection device, detecting its status, and adjusting its pose, the problem of time-consuming projection in finding the optimal projection area in different spaces is solved, thus achieving efficient projection control.

CN118741056APending Publication Date: 2024-10-01CHENGDU XGIMI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310320672.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-29
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

When existing projectors are moved or relocated to other spaces, they require a significant amount of time and computing resources to search for the best projection area, which affects user efficiency.

Method used

By acquiring historical and current projection information of the projection device, detecting status information, determining the pose information of the projection device relative to the target projection area, and adjusting the pose, the optimal projection area can be found quickly.

Benefits of technology

When the target projection area is known or unknown, the current pose information of the projection device can be quickly determined, saving time and computing resources in finding the target projection area and improving projection efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118741056A_ABST
    Figure CN118741056A_ABST
Patent Text Reader

Abstract

The invention provides a projection control method and device, equipment and a storage medium, and belongs to the technical field of projection. The method comprises the following steps: the projection equipment can respectively determine first current pose information and second current pose information of the projection equipment based on environmental data acquired by data acquisition equipment of the projection equipment; and then, on the basis of the first current pose information or the second current pose information, pose adjustment can be performed on the projection equipment, so that the projection equipment can be controlled to project the target projection area. A large amount of time and computing resources for searching the target projection area can be saved, and the projection efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of projection technology, and relate to but are not limited to a projection control method, device, equipment and storage medium. Background Art

[0002] With the development of intelligent projection, the perception and spatial interaction capabilities of projectors have become particularly important. In the process of using a projector, it is generally necessary to calibrate the projection image projected by the projector to meet viewing needs. However, when the position of the projector is moved in the current space (i.e., the current projection room), or when the projector is replaced in another space (i.e., another room), the projector needs to spend more time searching for the best projection area, which causes the projector to consume more computing resources to determine the best projection area of ​​the projector, thereby affecting the user's efficiency. Therefore, how to quickly find the best projection area is a problem that needs to be solved. Summary of the invention

[0003] Embodiments of the present application provide a projection control method, device, equipment and storage medium.

[0004] The technical solution of the embodiment of the present application is implemented as follows:

[0005] The present application provides a projection control method, the method comprising:

[0006] Acquire historical projection information when a projection device projects onto at least one historical projection area and current projection information of the projection device; detect status information of the projection device; if the status information indicates that the position of a target projection area of ​​a current environment of the projection device is known, determine first current posture information of the projection device relative to the projection onto the target projection area based on the historical projection information and the current projection information; the target projection area is any area of ​​the at least one historical projection area; if the status information indicates that the position of the target projection area of ​​the current environment of the projection device is unknown, determine a target historical projection image corresponding to a current environment image of the current projection information from the historical projection information; and determine second current posture information of the projection device relative to the projection onto the target projection area based on the target historical projection image and the current environment image; and adjust the posture of the projection device based on the first current posture information or the second current posture information.

[0007] The present application provides a projection control device, the device comprising:

[0008] An acquisition module is used to acquire historical projection information when a projection device projects onto at least one historical projection area and current projection information of the projection device; a detection module is used to detect status information of the projection device; a determination module is used to determine, if the status information indicates that the position of a target projection area of ​​a current environment of the projection device is known, based on the historical projection information and the current projection information, first current posture information of the projection device when projecting onto the target projection area; the target projection area is any area of ​​the at least one historical projection area; the determination module is also used to determine, from the historical projection information, a target historical projection image corresponding to a current environment image of the current projection information if the status information indicates that the position of the target projection area of ​​the current environment of the projection device is unknown; and determine, based on the target historical projection image and the current projection information, second current posture information of the projection device when projecting onto the target projection area; an adjustment module is used to adjust the posture of the projection device based on the first current posture information or the second current posture information.

[0009] In some embodiments, the target historical projection image includes at least one target historical projection environment object, and each of the target historical projection environment objects includes multiple object feature points; the determination module is also used to determine the pixel coordinates of each of the object feature points in the current environment of the projection device and the spatial coordinates corresponding to the pixel coordinates; obtain the depth value corresponding to each of the pixel coordinates and the camera intrinsic parameter matrix corresponding to the image acquisition device of the projection device; based on the depth value, the camera intrinsic parameter matrix, the pixel coordinates and the spatial coordinates, determine the posture transformation matrix of the projection device; decompose the posture transformation matrix to obtain the first rotation matrix and the first translation matrix of the projection device; determine the first rotation matrix and the first translation matrix as the first current posture information of the projection device relative to the projection to the target projection area.

[0010] In some embodiments, the historical projection information includes multiple target historical spatial coordinates, and the target historical spatial coordinates are the spatial coordinates of the projection center of the historical projection area relative to the projection device; the determination module is also used to obtain the target historical spatial coordinates; based on the first translation matrix, determine the current spatial coordinates of the current environment of the projection device; based on the current spatial coordinates and the target historical spatial coordinates, determine the Euler angle between the projection device and the projection center point; the Euler angle, the first rotation matrix and the first translation matrix are determined as the first current posture information of the projection device relative to the projection to the target projection area.

[0011] In some embodiments, the current projection information includes a current environment image, which is an environment image captured by an image acquisition device of the environment in which the projection device is currently located; the determination module is also used to determine the homography matrix of the projection device based on the current environment image and the target historical projection image; based on a preset singular value decomposition method, the homography matrix is ​​decomposed to obtain a second rotation matrix and a second translation matrix of the projection device; the second rotation matrix and the second translation matrix are used to determine the second current posture information of the projection device relative to the projection to the target projection area.

[0012] In some embodiments, the current environment image includes at least one current environment object; the target historical projection image includes at least one target historical projection object; the determination module is further used to perform feature comparison between each current environment object in the current environment image and each target historical projection object in each target historical projection image to obtain an object comparison value between each current environment object and each target historical projection object; based on the object comparison value, determine the image similarity between the current environment image and each target historical projection image; determine the target historical projection image with the maximum image similarity as a similar image of the current environment image; determine similar feature pairs between the current environment image and the similar images; and determine the homography matrix of the projection device based on the similar feature pairs.

[0013] In some embodiments, each of the current environment objects and each of the target historical projection environment objects includes multiple object feature points; the determination module is also used to perform feature comparison on each object feature point of the current environment image with the corresponding object feature point in the similar image to obtain a feature comparison value for each object feature point; and determine the feature pair whose feature comparison value is greater than the comparison value threshold as the similar feature pair.

[0014] In some embodiments, the determination module is further used to determine an asymptotic function between two object feature points in the similar feature pair based on the spatial coordinates of the similar feature pair; and determine the homography matrix of the projection device based on the asymptotic function.

[0015] In some embodiments, the historical projection information includes point cloud data of the projection device; the projection control device also includes: a judgment module, which is used to obtain the target historical spatial coordinates of the projection device and the current spatial coordinates of the current environment of the projection device; based on the historical projection information and the point cloud data, the projection area of ​​the projection device is sequentially segmented and identified to obtain the projection area of ​​the projection device; based on the target historical spatial coordinates and the current spatial coordinates, the Euler distance between the projection device and the projection center point is determined; the projection area is compared with the target projection area to obtain a first comparison result; the Euler distance is compared with the preset Euler distance to obtain a second comparison result; the posture adjustment module is used to adjust the projection device based on the first current posture information or the second current posture information if the first comparison result is that the area difference between the projection area and the target projection area is within a preset area range, and the second comparison result is that the distance difference between the Euler distance and the preset Euler distance is within a preset distance range.

[0016] An embodiment of the present application provides a projection control device, comprising: a memory, used to store executable instructions; and a processor, used to implement the above-mentioned projection control method when executing the executable instructions stored in the memory.

[0017] An embodiment of the present application provides a computer-readable storage medium storing executable instructions for causing a processor to execute the executable instructions to implement the above-mentioned projection control method.

[0018] The projection control method, apparatus, device and storage medium provided in the embodiments of the present application first detect the status information of the current projection device; then, if the status information indicates that the position of the target projection area of ​​the current environment of the projection device is known, then based on the historical projection information and current projection information of the projection device, determine the first current posture information of the projection device relative to the projection to the target projection area; if the status information indicates that the position of the target projection area of ​​the current environment of the projection device is unknown, determine the target historical projection image corresponding to the current environment image of the current projection information from the historical projection information; and based on the target historical projection image and the current environment image, determine the second current posture information of the projection device relative to the projection to the target projection area; finally, adjust the posture of the projection device based on the first current posture information or the second current posture information. In this way, the projection device can quickly determine the current posture information of the current projection device when the position of the target projection area is known, and can quickly determine the current posture information of the current projection device based on the target historical projection image and the current environment image when the position of the target projection area is unknown. In the embodiment of the present application, it is only necessary to search for the target projection area once in the new projection environment, which saves a lot of time and computing resources required to search for the target projection area, and greatly improves the projection efficiency of the projection device. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a structural schematic diagram of a projector system provided by the prior art;

[0020] Figure 2 is a schematic diagram of the structure of a projection control system provided in an embodiment of the present application;

[0021] Figure 3 It is a flowchart of a projection control method provided in an embodiment of the present application;

[0022] Figure 4 is a flowchart of another projection control method provided in an embodiment of the present application;

[0023] Figure 5 is a flowchart of a projector control method provided in an embodiment of the present application;

[0024] Figure 6 is a schematic diagram of a projector provided in an embodiment of the present application;

[0025] Figure 7 is a top view of a projector and a projection area provided in an embodiment of the present application;

[0026] Figure 8 is a schematic diagram of the structure of the projection control device provided in an embodiment of the present application;

[0027] Fig. 9 It is a schematic diagram of the composition structure of the projection control device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0028] 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. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0029] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict. Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meaning as those commonly understood by those skilled in the art of the technical field of the embodiments of the present application. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0030] Here, the professional terms involved in the embodiments of the present application are first explained.

[0031] (1) Bundle Adjustment (BA): The camera pose and spatial point position are minimized and optimized using a nonlinear optimization method to obtain the camera motion transformation matrix. The process of extracting the coordinates of the 3D points and the relative positions and optical information of each camera from these multi-view information.

[0032] (2) Homography: It is a concept in projective geometry, also known as projective transformation. Homography can map points (three-dimensional homogeneous vectors) on a projective plane to another projective plane, and map straight lines to straight lines, with the line-preserving property.

[0033] (3) Homography Matrix: It refers to the transformation relationship of coplanar points from an image taken from one perspective to an image taken from another perspective. The homography matrix describes the mapping relationship between two projective planes.

[0034] (4) Homography motion estimation: If the feature points in the scene all fall on the same plane (such as a wall or ceiling), homography motion estimation can be used. This situation is common in the bird's-eye view cameras carried by drones or the top view cameras carried by sweepers.

[0035] (5) Scale uncertainty: The estimated displacement vector has no unit, and the camera movement distance has only relative values, not absolute values. Therefore, the displacement vectors obtained from the first and second frames will be used for normalization, and the subsequent movements are all relative to the changes in the result. In other words, the normalization of the length of the translation matrix leads to scale uncertainty in monocular vision, making it impossible to determine the size of the parameters in the translation matrix in the real world.

[0036] (6) Singular Value Decomposition (SVD): It is a matrix decomposition algorithm used to simplify a matrix into its components to make subsequent matrix calculations easier. Singular value decomposition is different from eigendecomposition. SVD does not require the decomposed matrix to be a square matrix.

[0037] In the related art, a scheme of a projection correction method is: obtaining the screen coordinates of at least three non-collinear feature points in the projection image in a screen coordinate system; the at least three non-collinear feature points constitute one or more feature triangles; determining a projection device coordinate system with a minimum offset error according to the screen coordinates of the feature points in the one or more feature triangles, the screen coordinate system, and the azimuth of the feature points of the feature triangles at the light exit point of the projection device, the projection device coordinate system corresponding to an ideal feature triangle in the one or more feature triangles; obtaining a translation correction component and a rotation correction component of the light exit point in the projection device coordinate system according to the projection device coordinate system and the ideal coordinates of the light exit point in the projection device coordinate system; rotating and / or translating the projection device according to the translation correction component and the rotation correction component to correct the position of the projection device.

[0038] Figure 1 It is a structural diagram of a projector system of the prior art. Figure 1 As shown, Figure 1 1 , a projector system 100 , a projector 110 , a surface 120 , a camera 130 , a processor 140 , an optical sensor 150 , an output image 160 , and an input image 170 are shown respectively.

[0039] In the related art, a computer implementation method for adjusting the posture of a projector relative to a display surface is as follows: determining a homography matrix H between the display surface and the projector D,P ; The homography matrix H D,P Decomposed into the projector posture M P The rotation and translation parameters of the projector are determined according to the ideal homography matrix H0. A =M0(M P ) -1 Confirm the posture adjustment MA ; Adjust the posture to M A Decomposed into rotation and translation adjustment parameters; and mechanically adjusting the projector to an ideal posture M0 according to the rotation and translation adjustment parameters.

[0040] In related technologies, the homography matrix H can be decomposed based on the SVD decomposition method to obtain the rotation matrix R and the translation vector t. In practical applications, this can be achieved through the ORB-SLAM3 algorithm. Definition of homography matrix decomposition: Suppose there is a pair of matching points x1 and x2 on the normalized plane, R is the rotation matrix of the second frame image relative to the first frame image, and t is the translation vector of the second frame image relative to the first frame image. From the camera coordinate transformation relationship, it can be seen that:

[0041] x2=Rx1+t (1)

[0042] If points x1 and x2 are on the same plane, let the distance from the origin of the camera coordinate system of the first frame image to the plane be d, the plane normal vector be n, and T represent the transposed matrix, then there is a plane equation constraint:

[0043] n T x1=d (2)

[0044] Right now:

[0045]

[0046] Substituting equation (3) into equation (1), we can obtain:

[0047]

[0048] From the definition of the homography matrix, we can know that:

[0049] x2=Hx1 (5)

[0050] Then under the scale equivalence constraint, we can get:

[0051] H=dR+tn T (6)

[0052] Therefore, we can conclude that the decomposition of the homography matrix is ​​to decompose H to obtain d, R, t, and n.

[0053] In the related art, the control of the projection device usually has the following problems: the current technology of automatically searching for the best projection area takes a relatively long time, and lacks the ability to map the map information between the projector and the projection space, which causes the user to spend a certain amount of time to make the projector find the best projection area. However, when the position of the projector is moved or changed to another environment, the projector needs to spend more time to search for the best projection area, which causes the projector to consume more computing resources to determine the best projection area of ​​the projector, thereby affecting the user's efficiency.

[0054] Based on at least one of the above-mentioned problems existing in the related art, an embodiment of the present application provides a projection control method, first, detecting the status information of the current projection device; then, if the status information indicates that the position of the target projection area of ​​the current environment of the projection device is known, then based on the historical projection information and current projection information of the projection device, determining the first current posture information of the projection device relative to the projection to the target projection area; if the status information indicates that the position of the target projection area of ​​the current environment of the projection device is unknown, determining the target historical projection image corresponding to the current environment image of the current projection information from the historical projection information; and determining the second current posture information of the projection device relative to the projection to the target projection area based on the target historical projection image and the current environment image; finally, adjusting the posture of the projection device based on the first current posture information or the second current posture information to control the projection device to project to the target projection area. In this way, the projection device can quickly determine the current posture information of the current projection device when the position of the target projection area is known, and can quickly determine the current posture information of the current projection device based on the target historical projection image and the current environment image when the position of the target projection area is unknown. In the embodiment of the present application, it is only necessary to search for the target projection area once in the new projection environment, which saves a lot of time and computing resources required to search for the target projection area, and greatly improves the projection efficiency of the projection device.

[0055] See also Figure 2 , Figure 2 1 is a schematic diagram of the structure of the projection control system provided in the embodiment of the present application. The projection control system 20 provided in the embodiment of the present application includes a terminal 100, a network 200 and a projection device 300. The terminal 100 is connected to the projection device 300 via the network 200, and the network 200 can be a wide area network or a local area network, or a combination of the two.

[0056] In some embodiments, the terminal may be any terminal with a projection control function, such as a mobile device (e.g., a mobile phone, a satellite phone, a portable controller, a personal digital assistant, a dedicated control device, a portable control device), a laptop computer, a tablet computer, a desktop computer, and a smart watch. The terminal may also be a remote control device for a projection device. Of course, the terminal may also be other types of devices or apparatuses with a control function, which is not specifically limited in the embodiments of the present application.

[0057] In some practical application scenarios, the projection device can also be controlled by any of the following methods:

[0058] Method 1): In some application scenarios, the projection device can also be equipped with far-field language technology, and the user can directly control the projection device through voice.

[0059] Method 2): In some application scenarios, the user can rotate and move the projection device through manual control.

[0060] Method 3): In some application scenarios, the projection device may also be equipped with physical buttons or touch areas, and the user may directly control the projection device through the physical buttons or touch areas.

[0061] In some embodiments, please refer to Figure 2 When the projection device is projected, the terminal 100 sends a projection control request to the projection device 300 through the network 200. The projection device 300 responds to the projection control request and obtains the historical projection information when the projection device projects to at least one historical projection area and the current projection information of the projection device. The projection device 300 detects the state information of the projection device; then, if the state information indicates that the position of the target projection area of ​​the current environment of the projection device is known, based on the historical projection information and the current projection information, the first current posture information of the projection device relative to the projection to the target projection area is determined; if the state information indicates that the position of the target projection area of ​​the current environment of the projection device is unknown, the target historical projection image corresponding to the current environment image of the current projection information is determined from the historical projection information; and based on the target historical projection image and the current environment image, the second current posture information of the projection device relative to the projection to the target projection area is determined; finally, the projection device 300 adjusts the posture of the projection device based on the first current posture information or the second current posture information. After the projection is performed, the projection device 300 displays the current projection content on the terminal 100 through the network 200, thereby realizing the projection control of the projection device.

[0062] The present application embodiment provides a projection control method, see Figure 3 , Figure 3is a flowchart of a projection control method provided by an embodiment of the present application, such as Figure 3 As shown, it will be combined Figure 3 The steps shown are explained.

[0063] Step S301: acquiring historical projection information when a projection device projects onto at least one historical projection area and current projection information of the projection device.

[0064] In some embodiments, the projection device can project an image or video onto a screen or a television, and the projection device has a certain processing function, and the projection device can specifically be a projector or a projector. The projection device can be a liquid crystal projector (3LCD, Liquid Crystal Display), a digital light processor projector (DLP, Digital Lighting Process) and a cathode ray tube projector (CRT, Cathode Ray Tube) and other devices, and the projection device can also be a mobile device (for example, a mobile phone, a satellite phone, a portable projection player, a personal digital assistant, a dedicated projection device, a portable projection device), a laptop, a tablet computer, a desktop computer and a smart watch, and any terminal with a projection function. The projected device includes but is not limited to any type of device such as a wall, a projection screen, a television, a display screen, etc., and the embodiment of the present application can be a projection control for a television.

[0065] In some embodiments, the historical projection area refers to the area where the projection device can project, which is an unobstructed plane area with the largest projection area, etc., that is, the optimal projection area. In other words, the historical projection area refers to the optimal projection area of ​​the projection device under the historical environment. In practical applications, the historical projection area can be determined by the following method: data of the projection environment is collected by sensors such as image acquisition devices and inertial measurement units (IMU, Inertial Measurement Unit) to obtain environmental data, and then the collected environmental data is calculated and processed to obtain the historical projection area of ​​the projection device; it can also be determined by a user interaction method, that is, a historical projection area can be manually specified; of course, the method for determining the historical projection area includes but is not limited to the method provided in the embodiments of the present application, and the historical projection area of ​​the projection device can also be determined by other methods, and the embodiments of the present application do not specifically limit this.

[0066] In some embodiments, the data acquisition device may be an image acquisition device, or a posture sensor, etc. Of course, the data acquisition device may also be other types of acquisition devices, which are not specifically limited in the embodiments of the present application.

[0067] In some embodiments, historical projection information refers to the projection information when the projection device projects onto at least one historical projection area, and this projection information can be collected by the image acquisition device of the projection device. Of course, this projection information can also be collected by a device with data acquisition function such as an IMU sensor or a gyroscope, and the embodiment of the present application does not specifically limit this. Here, the historical projection information may include any one or more of the following: the position information when the projection device projects onto each historical projection area (such as the position of the projection device and the posture of the projection device), the spatial coordinates of the projection center of each historical projection area relative to the projection device (i.e., the target historical spatial coordinates in the embodiment of the present application), and the projection device projects onto each historical projection area, and the image obtained by the image acquisition device (such as a top view camera) after restoring the level.

[0068] In an embodiment of the present application, the above-mentioned historical projection information can be collected by a data acquisition device. In actual applications, the data acquisition device can collect the environmental information of the projection surface of the physical environment where the projection device is located (i.e., the projection space, such as room A). That is to say, the target historical projection image can refer to the environmental data of the projection surface of room A. Here, the projection surface can be a blank white wall, or a projection screen. Of course, the projection surface can also be other forms of projection surfaces, and the embodiments of the present application do not specifically limit the projection surface. In some embodiments, the projection surface can also be a projection surface or a projection screen containing an environmental object. When the projected object is a television, the environmental object can be a television. When the projected object is a wall, the environmental object can be a picture frame, a pot of flowers, etc. on the wall. In other words, the environmental object can be an objectively existing object on the projection surface.

[0069] The current projection information refers to the projection information of the projection device in the current environment (i.e., after the projection device changes its posture), and the projection information can be collected by the image acquisition device of the projection device. Of course, these projection information can also be collected by devices with data acquisition functions such as IMU sensors or gyroscopes, and the embodiments of the present application do not specifically limit this. Here, the current projection information may include any one or more of the following: the posture information of the projection device when projecting to the target projection area, the spatial coordinates of the projection center of the target projection area relative to the projection device (i.e., the current spatial coordinates in the embodiments of the present application), and the environmental image collected by the image acquisition device of the current environment of the projection device.

[0070] In the embodiment of the present application, the above current projection information can be collected by a data acquisition device. In practical applications, the data acquisition device can collect environmental information of the ceiling of the physical environment where the projection device is located (i.e., the projection space, such as room A). In other words, the current environmental image can refer to environmental data of the ceiling of room A. Here, the ceiling can be a blank white wall, or a wall containing environmental objects. The present application does not specifically limit the ceiling.

[0071] In some embodiments, the projection device obtains historical projection information when projecting onto at least one historical projection area and current projection information of the projection device, or directly obtains historical projection information when projecting onto at least one historical projection area and current projection information of the projection device from a database.

[0072] Step S302: detecting status information of the projection device.

[0073] Step S303: If the status information indicates that the position of the target projection area of ​​the current environment of the projection device is known, determine the first current position information of the projection device relative to the projection to the target projection area based on the historical projection information and the current projection information.

[0074] Here, the target projection area is any area in at least one historical projection area.

[0075] In some embodiments, the target projection area refers to the area where the projection device can project in the current environment, which has the maximum projection area, etc., that is, the optimal projection area. In other words, the target projection area refers to the optimal projection area of ​​the projection device in the current environment.

[0076] In an embodiment of the present application, when it is determined that the position of the target projection area of ​​the current environment of the projection device is known, the first current posture information of the projection device relative to the projection to the target projection area can be determined based on the historical projection information and the current projection information.

[0077] Step S304, if the status information indicates that the position of the target projection area of ​​the current environment of the projection device is unknown, determine the target historical projection image corresponding to the current environment image of the current projection information from the historical projection information; and based on the target historical projection image and the current environment image, determine the second current posture information of the projection device relative to the projection to the target projection area.

[0078] In an embodiment of the present application, when the position of the target projection area of ​​the current environment of the projection device is unknown, it is necessary to first determine the target historical projection image corresponding to the current environment image of the current projection information from the historical projection information, and then, based on the determined target historical projection image and the current environment image, determine the second current posture information of the projection device relative to the projection to the target projection area.

[0079] Step S305: Adjust the posture of the projection device based on the first current posture information or the second current posture information.

[0080] In an embodiment of the present application, the posture of the projection device can be adjusted based on the first current posture information determined in the above step S303 or the second current posture information determined in step S304 to control the projection device to project the target projection area.

[0081] The projection control method provided in the embodiment of the present application detects the status information of the current projection device; then, if the status information indicates that the position of the target projection area of ​​the current environment of the projection device is known, then based on the historical projection information and the current projection information of the projection device, the first current posture information of the projection device relative to the projection to the target projection area is determined; if the status information indicates that the position of the target projection area of ​​the current environment of the projection device is unknown, the target historical projection image corresponding to the current environment image of the current projection information is determined from the historical projection information; and based on the target historical projection image and the current environment image, the second current posture information of the projection device relative to the projection to the target projection area is determined; finally, based on the first current posture information or the second current posture information, the projection device is adjusted in posture. In this way, the projection device can quickly determine the current posture information of the current projection device when the position of the target projection area is known, and can quickly determine the current posture information of the current projection device based on the target historical projection image and the current environment image when the position of the target projection area is unknown. In the embodiment of the present application, only one search for the target projection area is needed in the new projection environment, which saves a lot of time and computing resources required for searching the target projection area, and greatly improves the projection efficiency of the projection device.

[0082] Based on the above embodiments, the present application provides a projection control method, which can be executed by a projection device. Figure 4 is a flow chart of another projection control method provided by an embodiment of the present application, such as Figure 4 As shown, it will be combined Figure 4 The steps shown are explained.

[0083] Step S401: The terminal sends a projection control request to the projection device.

[0084] Step S402: The projection device obtains historical projection information when the projection device projects onto at least one historical projection area and current projection information of the projection device in response to the projection control request.

[0085] Step S403: the projection device detects status information of the projection device.

[0086] In some embodiments, when the position of the target projection area of ​​the current environment of the projection device is known, the first current posture information can be determined in the following manner, that is, the first current posture information of the projection device can be solved only according to the front image acquisition device (such as an RGBD camera), and this method can be implemented by the following steps S404 to S408:

[0087] In some embodiments, the first current posture information may also be estimated by a top view image acquisition device (the user does not need to block the front camera), and this method may also be implemented by following steps S404 to S408:

[0088] In some embodiments, the target historical projection image of the historical projection information includes at least one target historical projection environment object, and each target historical projection environment object includes a plurality of object feature points.

[0089] Step S404 : the projection device determines the pixel coordinates of each object feature point in the current environment of the projection device and the space coordinates corresponding to the pixel coordinates.

[0090] In some embodiments, the pixel coordinates of the object feature points of the target historical projection environment object (eg, u i =[u i ,v i ] T , where i represents the pixel ID, i.e., the i-th pixel), is determined by the target historical projection information collected by the front image acquisition device before the projection device changes its posture; after the projection device changes its posture, the pixel coordinates of the object feature point are determined to be the RGB mapping coordinates in the image, i.e., the spatial coordinates (e.g., P i =[X i ,Y i ,Z i ] T , where i represents the identity of the pixel, that is, the i-th pixel).

[0091] Step S405 , the projection device obtains the depth value corresponding to each pixel coordinate and the camera intrinsic parameter matrix corresponding to the image acquisition device of the projection device.

[0092] In some embodiments, the depth value corresponding to the pixel coordinate refers to the number of bits used to store each pixel coordinate, and can also be used to measure the resolution of the target historical projection image. The depth value determines the number of colors that each pixel coordinate in the target historical projection image may have, or determines the number of gray levels that each pixel coordinate in the target historical projection image may have. For example, the depth value can be expressed as s i , where i represents the identity of the pixel, that is, the i-th pixel.

[0093] In some embodiments, the camera intrinsic parameter matrix is ​​a matrix used to reflect the camera's own properties. The camera intrinsic parameter matrices of different cameras are different, and each camera intrinsic parameter matrix needs to be calibrated before the matrix parameters can be determined. Here, the camera intrinsic parameter matrix can be expressed by equation (7):

[0094]

[0095] Where, f represents the focal length in millimeters; f x Indicates that pixels are used to describe the length of the focal length in the x-axis direction, and the unit is pixel; f y Indicates that pixels are used to describe the length of the focal length in the y-axis direction, and the unit is pixel; c x , c y Indicates the translation size of the coordinate origin, the unit is also pixel.

[0096] Step S406: The projection device determines a posture transformation matrix of the projection device based on the depth value, the camera intrinsic parameter matrix, the pixel coordinates, and the space coordinates.

[0097] In some embodiments, the depth value s i , camera intrinsic parameter matrix K, pixel coordinate u i And the spatial coordinates P i Construct the positional relationship between the pixel position and the spatial point, and determine the posture transformation matrix T of the projection device (i.e., the Lie group, the reference formula of the Lie group is: SE(3), T∈R 4×4 , ). Here, the positional relationship can be expressed by equation (8):

[0098]

[0099] By constructing a least squares problem, the minimum posture change matrix T (ie, Lie group) of the camera is determined in an optimized manner, thereby obtaining the posture change matrix of the projection device relative to other target projection areas.

[0100] Step S407: The projection device decomposes the posture transformation matrix to obtain a first rotation matrix and a first translation matrix of the projection device.

[0101] In an embodiment of the present application, the projection device can decompose the posture transformation matrix by a preset singular value decomposition method, and solve the first rotation matrix and the first translation matrix from the posture transformation matrix.

[0102] Step S408: The projection device determines the first rotation matrix and the first translation matrix as first current position information of the projection device relative to the target projection area.

[0103] In some embodiments, the historical projection information includes a plurality of target historical spatial coordinates, where the target historical spatial coordinates are spatial coordinates of a projection center of the historical projection area relative to the projection device.

[0104] In some embodiments, the above step S408 may be determined in the following manner:

[0105] First, the projection device obtains the historical spatial coordinates of the target. Secondly, the projection device determines the current spatial coordinates of the current environment of the projection device based on the first translation matrix. Then, the projection device determines the Euler angle between the projection device and the projection center point based on the current spatial coordinates and the historical spatial coordinates of the target. Finally, the projection device determines the Euler angle, the first rotation matrix and the first translation matrix as the first current posture information of the projection device relative to the projection to the target projection area.

[0106] In some embodiments, the spatial coordinates of the projection center point refer to the focus of the target projection area acquired by the projection device and the lens optical axis, and the spatial coordinates of the projection center point are denoted as S=(s1, s2, s3).

[0107] In some embodiments, the projection device may obtain the first translation matrix and the target historical spatial coordinates of the projection device before the posture change (i.e., the projection device is at the origin of the projection coordinate system), and then the projection device may add the first translation matrix and the spatial coordinates of the projection device before the posture change, so as to determine the spatial coordinates of the current environment of the projection device (i.e., after the posture change). For example, the spatial coordinates of the projection device before the posture change are P0 (0, 0, 0), the first translation matrix is ​​t = (t1, t2, t3), and the spatial coordinates of the current environment of the projection device are P0 + t = (t1, t2, t3).

[0108] In the embodiment of the present application, the projection device can calculate the Euler angle between the current position of the projection device and the projection center point through the current spatial coordinates of the current environment of the projection device and the target historical spatial coordinates of the projection center point. The Euler angle can be directly calculated through the rotation matrix.

[0109] In an embodiment of the present application, the Euler angle calculated above can be combined with the first rotation matrix and the first translation matrix calculated above to control the projection device to realign the center point of the projection area with the projection center point, thereby enabling the projection device to quickly find the target projection area initially found after moving.

[0110] In some embodiments, the current projection information includes a current environment image, which is an environment image captured by an image capture device of the environment where the projection device is currently located.

[0111] In some embodiments, the image acquisition device may be an RGBD camera, a ToF camera, or a depth camera; an RGBD camera specifically refers to a camera that can measure distance by physical means, and obtains an RGB image and a depth image, and a depth camera refers to a camera that can directly output depth, or can indirectly calculate depth through software, or can directly measure depth through physical methods. Of course, the image acquisition device here may also be other types of data acquisition devices, and the embodiments of the present application do not specifically limit this.

[0112] In some practical application scenarios, there are scene limitations in calculating the first current posture information of the projection device based on the front image acquisition device. For example, if the front image acquisition device is partially or completely blocked by the user or the projection device is moved, the first current posture information estimated by the data obtained by the front image acquisition device may be inaccurate. Therefore, in order to solve the above phenomenon, the first current posture information can be estimated in the following way, that is, the IMU sensor and the front image acquisition device can be coupled to estimate the first current posture information. The posture estimation method can be implemented by solving the homography matrix, solving the essential matrix, or solving the translation matrix and the rotation matrix. This method can be implemented by following the steps S409 to S411:

[0113] Step S409: The projection device determines a homography matrix of the projection device based on the current environment image and the target historical projection image.

[0114] In some embodiments, the current environment image includes at least one current environment object; and the target history projection image includes at least one target history projection object.

[0115] In some embodiments, the above step S408 can be determined in the following manner:

[0116] First, the projection device compares the features of each current environment object in the current environment image with each target historical projection object in each target historical projection image, and obtains the object comparison value between each current environment object and each target historical projection object. Secondly, the projection device determines the image similarity between the current environment image and each target historical projection image based on the object comparison value. Then, the projection device determines the target historical projection image with the maximum image similarity as the similar image of the current environment image. Then, the projection device determines the similar feature pairs between the current environment image and the similar images. Finally, the projection device determines the homography matrix of the projection device based on the similar feature pairs.

[0117] In some embodiments, assuming that the projection device has completed the search for the target projection area in room A, room B, and room C, respectively, the target projection area corresponding to each room is determined according to the position where the projection device is placed by the user and the selected conditions, and projection is performed based on the target projection area corresponding to each room. At this time, the projection device can record the following data: [S1(x, y, z), P1(x, y, z), I1]...[S3(x, y, z), P3(x, y, z), I3].

[0118] Among them, S n is the spatial coordinate of the projection center point of the target projection area relative to the projector coordinate system, P n is the spatial coordinate of the projection device relative to the target projection area, through P n is (0, 0, 0), I n The target environment image is obtained by the top view image acquisition device under the ideal state of the projection device. The current projection information includes the current environment image, and the current environment image includes at least one current environment object.

[0119] In an embodiment of the present application, the projection device can obtain an object comparison value between each current environment object and each target historical projection object by comparing the similarity between the environment objects of the current environment image and the environment objects of the target historical projection image collected above.

[0120] In the embodiment of the present application, after the projection device finds the target historical projection image with the greatest image similarity among multiple target historical projection images, the projection device can define the target historical projection image as a similar image to the current environment image.

[0121] In some embodiments, each current environment object and each target historical projection environment object includes a plurality of object feature points.

[0122] In some embodiments, the above step of "the projection device determines similar feature pairs between the current environment image and the similar image" can be determined in the following manner:

[0123] First, the projection device can perform feature comparison on each object feature point in the current environment image with the corresponding object feature point in the similar image to obtain a feature comparison value for each object feature point; then, the projection device determines the feature pairs whose feature comparison values ​​are greater than the comparison value threshold as similar feature pairs.

[0124] In some embodiments, the above step of "the projection device determines the homography matrix of the projection device based on the similar feature pairs" can be determined in the following manner:

[0125] First, the projection device can obtain the spatial coordinates corresponding to each similar feature pair in the similar feature pairs; then, the projection device determines the asymptotic function between the feature points of the two objects in the similar feature pairs based on the spatial coordinates of the similar feature pairs; finally, the projection device determines the homography matrix of the projection device based on the determined asymptotic function.

[0126] In some embodiments, the projection device can obtain a mapping relationship between two projection planes, namely, a homography matrix, through a series of matrix calculations based on the two planes of the current environment image and the target historical projection image.

[0127] In some embodiments, assuming that two object feature points are p1=(μ1, ν1) and p1'==(μ1', ν1'), the following asymptotic function can be satisfied between the two object feature points:

[0128]

[0129] Among them, K is the camera intrinsic parameter matrix, R is the rotation matrix, t is the translation matrix, and n T is the unit normal vector of the plane where the three-dimensional space point P is located, d is the distance from the origin of the camera system to the plane, It is denoted as H.

[0130] Right now,

[0131]

[0132]

[0133] Step S410: The projection device decomposes the homography matrix based on a preset singular value decomposition method to obtain a second rotation matrix and a second translation matrix of the projection device.

[0134] In some embodiments, the preset singular value decomposition method may be Faugeras SVD-based decomposition or Zhang SVD-based decomposition.

[0135] In the embodiment of the present application, the projection device can decompose the homography matrix by using a preset singular value decomposition method, and solve the second rotation matrix and the second translation matrix from the homography matrix.

[0136] Step S411: The projection device uses the second rotation matrix and the second translation matrix to determine second current posture information of the projection device relative to the target projection area.

[0137] In the embodiment of the present application, the projection device determines the second current position information of the projection device relative to the target projection area based on the second rotation matrix and the second translation matrix determined above.

[0138] Step S412: The projection device adjusts the posture of the projection device based on the first current posture information or the second current posture information.

[0139] In some embodiments, the historical projection information first environment data includes point cloud data of the projection device.

[0140] In some embodiments, the above step S412 may be determined in the following manner:

[0141] First, the projection device obtains the target historical spatial coordinates of the projection device and the current spatial coordinates of the environment in which the projection device is currently located. Then, based on the historical projection information and the point cloud data, the projection device sequentially performs region segmentation and region recognition processing on the projection area of ​​the projection device to obtain the projection area of ​​the projection device. After that, the projection device determines the Euler distance between the projection device and the projection center point based on the target historical spatial coordinates and the current spatial coordinates. The projection device compares the projection area with the target projection area to obtain a first comparison result. The projection device compares the Euler distance with the preset Euler distance to obtain a second comparison result. Finally, if the first comparison result is that the area difference between the projection area and the target projection area is within the preset area range, and the second comparison result is that the distance difference between the Euler camera distance and the preset Euler distance is within the preset distance range, the projection device adjusts the projection device based on the first current posture information or the second current posture information.

[0142] In some embodiments, the point cloud data can be acquired through a camera of a projection device or a ToF depth camera.

[0143] In an embodiment of the present application, after adjusting the yaw angle and pitch angle, the projection device has ideally restored to a posture that is closest to the target projection image. First, the projection device can perform plane segmentation and projection area recognition processing on the projection area of ​​the projection device through the historical projection information and point cloud data obtained by the image acquisition device, and select the area in the projection area that is most likely to be projected to form a projectable area. Secondly, the projection device can calculate the Euler distance between the projection device and the projection center point through the Euler distance calculation formula based on the target historical spatial coordinates and the current spatial coordinates of the current environment of the projection device. Afterwards, the projection device needs to make two judgments. First, it needs to determine whether the area difference between the projectable area and the target projection area is within the preset area range; second, it needs to determine whether the distance difference between the Euler distance between the projection device and the projection center point and the preset Euler distance is within the preset distance range. Only when the following checks are passed: the area difference between the projectable area and the target projection area is within the preset area range, and the distance difference between the Euler distance and the preset Euler distance is within the preset distance range, the projection device can adjust the projection device's posture according to the first current posture information or the second current posture information to control the projection device to project the target projection area.

[0144] The following is an explanation of an exemplary application of the embodiments of the present application in a practical application scenario.

[0145] The embodiment of the present application proposes a projector control method, which is mainly divided into two modes: 1) Positioning mode when the projector is turned on. 2) Positioning mode after the projector is turned off and restarted. Here, the required sensors include ultra-wide-angle or fisheye cameras, IMU sensors, etc. Based on the above embodiments, the embodiment of the present application provides a projector control method, which is executed by the projector, Figure 5 is a flow chart of a projector control method provided in an embodiment of the present application, such as Figure 5 As shown, it will be combined Figure 5 The flowchart is shown for explanation.

[0146] Step S501: The projector obtains historical projection information when the projector projects onto at least one historical projection area and current projection information of the projection device.

[0147] In some embodiments, the projector captures images of the surrounding environment to obtain an environmental image; thereafter, by processing the captured environmental image or interacting with the user, the best projection area (i.e., the historical projection area in the above embodiment) is found and projection begins. The front view image capture device and the top view image capture device record the posture of the projector, the surrounding environment, and the spatial coordinates of the projection center point at this time, and establish a coordinate system belonging to the room with the position of the projector as the origin.

[0148] In some embodiments, the embodiments of the present application provide a projector that can search a projection area, and the projector can achieve 360-degree rotation around the Z axis and 180-degree rotation around the X axis by controlling its own joints. Figure 6 is a schematic diagram of a projector according to an embodiment of the present application. Figure 6 A visual sensor and a projector coordinate system are shown in FIG.

[0149] After the projector determines the best projection area, the top view of the projector and the projection area is as follows: Figure 7 As shown, Figure 7 A top view of the projector and the projection area according to an embodiment of the present application. Figure 7 The coordinates S are shown in n , coordinate P n , and coordinates P n ′.

[0150] In some embodiments, the coordinate S n The coordinate P is the focus of the optimal projection area found by the projector and the optical axis of the top view camera lens; n is the origin of the coordinate system of the projector in its working area, which is also the origin of the projector coordinate system; coordinate P n ′ is the coordinate of the position of the projector after it moves. n =(0,0,0), after recording the position of the projector when projecting the optimal projection area, the projector returns to a horizontal state (that is, ideally, the projector is parallel to the ceiling or floor, and the gravity measured by the IMU has no component on the x-axis of the IMU, or the pitch angle is 0 degrees).

[0151] As a feasible method, after planning the best projection area, when turning to the target position of the best projection area, the top view camera is used to record the environment image of the ceiling when it turns to the horizontal state, and the projector is continued to rotate until the target position is reached and then projection is started. Then, the top view camera of the projector records the current position of the projector at P n Ambient image of the ceiling at the time of the click.

[0152] Step S502: Detect status information of the projector.

[0153] If the state information of the projector is state A, step S503 is executed; if the state information of the projector is state B, step S504 is executed.

[0154] In some embodiments, state A is when the projector is powered on, the optimal projection area has been found, and the projector has no displacement after IMU integration. State B: The optimal projection area has not been found, and the projector is not sure of the current position but has a database (or the optimal projection area has been found but the projector has moved after being powered off).

[0155] Step S503: The projector performs a calculation process on the initial posture to obtain first current posture information when the position of the projector relative to the target projection area is known.

[0156] In some embodiments, it is assumed that the projector is projecting the best projection area at this time, the spatial coordinates of the projector are P0 = (0, 0, 0), the attitude quaternion of the projector is (0, 0, 0, 1), and the spatial coordinates of the projection center point of the best projection area are marked as S = (s1, s2, s3). If the position of the projector is moved to P1 = (x, y, z) and the attitude is unknown, in this process, the position change of the projector can be obtained by the front camera (such as RGBD camera) or IMU inertial measurement unit or RGBD camera and IMU data fusion.

[0157] In practical applications, RGBD cameras have scene limitations in solving the posture change technology. Assuming that the front camera is partially or completely blocked by the user, the projector is displaced. At this time, the posture change of the projector calculated by the front camera based on the environmental image will be inaccurate. In order to solve this problem, the motion posture change can usually be estimated by coupling the IMU and the top view camera. Here, the posture estimation method may include but is not limited to solving the homography matrix, solving the essential matrix, or the displacement matrix and the rotation matrix. The translation matrix is ​​scaled and the relative measurement of the two key frames is provided through the IMU data, so as to construct the error function to iteratively optimize the key frame posture. If the RGBD camera is used to solve the posture change of the projector, the user does not need to block the front camera.

[0158] Assume that the n spatial coordinates P of each first environment object are obtained by the forward-looking RGBD camera before the projector changes its posture i =[X i ,Y i ,Z i ] T After the projector is transformed in position, the pixel coordinates u of the projection of n spatial coordinates are obtained by matching i =[u i ,v i ]T , and the depth value s corresponding to each pixel coordinate i , where i represents the pixel ID, i.e. the i-th pixel. The position relationship between the pixel position and the first environmental object space point is as follows:

[0159]

[0160] By constructing a least squares problem, the minimum posture change matrix T (i.e., Lie group) of the camera is determined in an optimized manner, thereby obtaining the posture change matrix of the projection device relative to other optimal projection areas, from which the first translation matrix t and the first rotation matrix R can be decomposed.

[0161]

[0162] Among them, T * In order to fit the optimal Lie group T of the forward-looking RGBD camera through optimization method.

[0163] In some embodiments, the spatial coordinates of the projection device before the posture change are P0 (0, 0, 0), the first translation matrix is ​​t = (t1, t2, t3), and the spatial coordinates of the projection device after the posture change are P1 = P0 + t = (t1, t2, t3). The Euler angle between the projector at the current position and the spatial coordinate point S of the center of the projection area of ​​the best recorded projection image is calculated by P1 and the spatial coordinate S = (s1, s2, s3) of the center of the projection area. In combination with the first rotation matrix R, the projector is controlled to re-align the center S of the projection image with the recorded center point, so that the projector can quickly find the best projection area initially found after moving.

[0164] In some embodiments, considering that the image projected by the projector may affect the above-mentioned posture estimation method, the projector determines whether the projection is moving through the status information obtained by the IMU (such as changes in acceleration and angular velocity). If it is determined that the projector is moving at this time, the projector screen is turned off to eliminate the impact of the projection screen on the posture estimation.

[0165] In some embodiments, considering that there may be a lack of object feature points that can be solved for the pose within the FOV of the front camera (all walls in the field of view), resulting in the pose estimation failure, the IMU and RGBD can be loosely coupled (for example, EFK algorithm), that is, IMU is used as the prediction source, RGBD is used as the observation source, and when the difference between the two solution results is too large, the confidence of the prediction is much greater than the confidence of the observation, that is, at this time we can use the acceleration and angular velocity output by the IMU to estimate the pose transformation of the projector, thereby solving the problem that the FOV of the projector's RGBD is all walls and the pose cannot be solved. Here, the object feature point refers to the object feature point of the current environment object and the target historical projection environment object in the above embodiment.

[0166] Step S504, the projector returns to a horizontal state, the top view image acquisition device of the projector acquires current projection information, and the current projection information is compared with the recorded data to determine the current environment of the projector.

[0167] Step S505: Based on the current projection information, determine the second current posture information when the position of the projector relative to the target projection area is unknown.

[0168] In some embodiments, the projector motion is estimated by homography, the pose of the projector relative to the first best projection area is calculated, and the scale is restored.

[0169] In some embodiments, assuming that the projector completes the search for the best projection area in room 1, room 2, and room 3 respectively, finds the best projection area according to the user's placement and selected conditions, and performs projection based on the best projection area corresponding to each room, the projector should record three sets of data at this time:

[0170] [S1(x,y,z),P1(x,y,z),I1]...[S3(x,y,z),P3(x,y,z),I3].

[0171] Among them, S n is the target historical spatial coordinate of the projection center point of the historical projection area relative to the projector coordinate system, P n is the historical spatial coordinate of the projection device relative to the target projection area, through P n is (0, 0, 0), I nIt is the target historical projection image obtained by the image acquisition device under the ideal state of the projection device. After the data is recorded, when the user uses any room (such as room 1), the current environment image I is obtained by the top view camera after the projector is restored to the horizontal state. The current environment image I is matched with the target historical projection image I1, target historical projection image I2, and target historical projection image I3 in the recorded data for feature points to find the target historical projection image I with the highest image similarity. n , the target historical projection image I1 is recorded as the similar image I1' of the current environment image. Assume that the current environment image I and the similar image I1' have a pair of similar feature pairs, and the spatial coordinates p1 and p1' corresponding to the similar feature pairs satisfy the asymptotic function, which can be seen from the above formula (9):

[0172] Among them, K is the camera intrinsic parameter matrix, R is the rotation matrix, t is the translation matrix, and n T is the unit normal vector of the plane where the three-dimensional space point P is located, d is the distance from the origin of the camera system to the plane, It is denoted as H, that is,

[0173]

[0174] Therefore, the following equation can be constructed from a pair of similar features:

[0175] h1u1+h2v1+h3-h7u1u1'-h8v1u1'=u1' (14)

[0176] h4u1+h5v1+h6-h7u1v1'-h8v1v1'=v1' (15)

[0177] Continue to extract more than four pairs of similar feature pairs from the target historical projection image I and the similar image I1' to obtain the homography matrix H of the projector relative to the environmental information. Use the SVD decomposition method (for example, Faugeras SVD-based decomposition and Zhang SVD-based decomposition) to calculate the second rotation matrix R and the second translation matrix t from the homography matrix H. Use R and t to obtain the position and posture of the projector when the current projector is projecting relative to the recorded historical optimal projection area.

[0178] Due to the scale uncertainty of monocular vision, the actual physical size corresponding to the elements of the translation matrix t cannot be determined. Therefore, assuming that the user places the projector back to the position in Room 1, which is not much different from the position where the projector was first projected to the optimal projection area in Room 1, the scale of the translation matrix t is limited to 1 meter to estimate its pose.

[0179] Assumptions Figure 7The projector is transformed from P1 to P1', which only makes a two-dimensional plane translation change and a rotation around the Z axis. At this time, the projector position P1'=P1+t=(x+t1,y+t2), and the posture is a rotation around the Z axis α=arccos(R 1,1 ), R 1,1 The element in the first row and first column of the rotation matrix. The projection at position P1' needs to be rotated. The angle makes the optical-mechanical axis of the projector align with the recorded T1 point again.

[0180] Step S506 , determining that the area difference between the projection area and the target projection area is within a preset area range, and that the distance difference between the Euler distance and the preset Euler distance is within a preset distance range.

[0181] Step S507: adjusting the posture of the projection device based on the first current posture information or the second current posture information.

[0182] In an embodiment of the present application, after adjusting the yaw angle and pitch angle, the projector has ideally restored to a posture that is closest to the target projection area. First, the projector can obtain historical projection information and point cloud data when the projector projects to at least one historical projection area through a data acquisition device, perform plane segmentation and projection area recognition processing on the projection area of ​​the projector, and select the area in the projection area that is most likely to be projected to form a projectable area. Secondly, the projector can calculate the Euler distance between the projector and the projection center point based on the target historical spatial coordinates of the projector and the spatial current coordinates of the projector through the Euler distance calculation formula. Afterwards, the projector needs to make two judgments. First, it needs to determine whether the area difference between the projectable area and the target projection area is within the preset area range; second, it needs to determine whether the distance difference between the Euler distance between the projector and the projection center point and the preset Euler distance is within the preset distance range. Only when the following checks are passed: the area difference between the projectable area and the target projection area is within the preset area range, and the distance difference between the Euler distance and the preset Euler distance is within the preset distance range, the projector can adjust the projector's posture according to the first current posture information or the second current posture information to control the projector to project the target projection area.

[0183] In an embodiment of the present application, a method is provided for a projector to estimate its relative position change, which can quickly locate the target projection area based on the result of the best projection area found for the first time and the current position. The projector only needs to spend time searching for the best projection area once in a new environment. Ideally, the projector does not need to spend time rotating and searching the surrounding environment for the best projection area. By estimating its own position through projection, the projector can quickly locate the best projection area that has been found, greatly improving the efficiency of the best projection area projection. The VSLAM method is used to realize the estimation of continuous and discontinuous position changes of the projector.

[0184] Figure 8 is a schematic diagram of the structure of the projection control device provided in the embodiment of the present application. Figure 8 As shown, the projection control device 800 includes: an acquisition module 801, which is used to acquire historical projection information when the projection device projects onto at least one historical projection area and current projection information of the projection device; a detection module 802, which is used to detect the state information of the projection device; a determination module 803, which is used to determine the first current posture information of the projection device relative to the projection onto the target projection area based on the historical projection information and the current projection information if the state information indicates that the position of the target projection area of ​​the current environment of the projection device is known; the target projection area is any area in the at least one historical projection area; the determination module 803 is also used to determine the target historical projection image corresponding to the current environment image of the current projection information from the historical projection information if the state information indicates that the position of the target projection area of ​​the current environment of the projection device is unknown; and determine the second current posture information of the projection device relative to the projection onto the target projection area based on the target historical projection image and the current projection information; an adjustment module 804, which is used to adjust the posture of the projection device based on the first current posture information or the second current posture information.

[0185] In some embodiments, the target historical projection image includes at least one target historical projection environment object, and each of the target historical projection environment objects includes multiple object feature points; the determination module is also used to determine the pixel coordinates of each of the object feature points in the current environment of the projection device and the spatial coordinates corresponding to the pixel coordinates; obtain the depth value corresponding to each of the pixel coordinates and the camera intrinsic parameter matrix corresponding to the image acquisition device of the projection device; based on the depth value, the camera intrinsic parameter matrix, the pixel coordinates and the spatial coordinates, determine the posture transformation matrix of the projection device; decompose the posture transformation matrix to obtain the first rotation matrix and the first translation matrix of the projection device; determine the first rotation matrix and the first translation matrix as the first current posture information of the projection device relative to the projection to the target projection area.

[0186] In some embodiments, the historical projection information includes multiple target historical spatial coordinates, and the target historical spatial coordinates are the spatial coordinates of the projection center of the historical projection area relative to the projection device; the determination module is also used to obtain the target historical spatial coordinates; based on the first translation matrix, determine the current spatial coordinates of the current environment of the projection device; based on the current spatial coordinates and the target historical spatial coordinates, determine the Euler angle between the projection device and the projection center point; the Euler angle, the first rotation matrix and the first translation matrix are determined as the first current posture information of the projection device relative to the projection to the target projection area.

[0187] In some embodiments, the current projection information includes a current environment image, which is an environment image captured by an image acquisition device of the environment in which the projection device is currently located; the determination module is also used to determine the homography matrix of the projection device based on the current environment image and the target historical projection image; based on a preset singular value decomposition method, the homography matrix is ​​decomposed to obtain a second rotation matrix and a second translation matrix of the projection device; the second rotation matrix and the second translation matrix are used to determine the second current posture information of the projection device relative to the projection to the target projection area.

[0188] In some embodiments, the current environment image includes at least one current environment object; the target historical projection image includes at least one target historical projection object; the determination module is further used to perform feature comparison between each current environment object in the current environment image and each target historical projection object in each target historical projection image to obtain an object comparison value between each current environment object and each target historical projection object; based on the object comparison value, determine the image similarity between the current environment image and each target historical projection image; determine the target historical projection image with the maximum image similarity as a similar image of the current environment image; determine similar feature pairs between the current environment image and the similar images; and determine the homography matrix of the projection device based on the similar feature pairs.

[0189] In some embodiments, each of the current environment objects and each of the target historical projection environment objects includes multiple object feature points; the determination module is also used to perform feature comparison on each object feature point of the current environment image with the corresponding object feature point in the similar image to obtain a feature comparison value for each object feature point; and determine the feature pair whose feature comparison value is greater than the comparison value threshold as the similar feature pair.

[0190] In some embodiments, the determination module is further used to determine an asymptotic function between two object feature points in the similar feature pair based on the spatial coordinates of the similar feature pair; and determine the homography matrix of the projection device based on the asymptotic function.

[0191] In some embodiments, the historical projection information includes point cloud data of the projection device; the projection control device also includes: a judgment module, which is used to obtain the target historical spatial coordinates of the projection device and the current spatial coordinates of the current environment of the projection device; based on the historical projection information and the point cloud data, the projection area of ​​the projection device is sequentially segmented and identified to obtain the projection area of ​​the projection device; based on the target historical spatial coordinates and the current spatial coordinates, the Euler distance between the projection device and the projection center point is determined; the projection area is compared with the target projection area to obtain a first comparison result; the Euler distance is compared with the preset Euler distance to obtain a second comparison result; the posture adjustment module is used to adjust the projection device based on the first current posture information or the second current posture information if the first comparison result is that the area difference between the projection area and the target projection area is within a preset area range, and the second comparison result is that the distance difference between the Euler distance and the preset Euler distance is within a preset distance range.

[0192] It should be noted that the description of the device of the embodiment of the present application is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment, so it is not repeated. For technical details not disclosed in the embodiment of the device, please refer to the description of the method embodiment of the present application for understanding.

[0193] It should be noted that in the embodiment of the present application, if the above-mentioned projection control method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can be essentially or partly reflected in the form of a software product, which is stored in a storage medium and includes several instructions for a terminal to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.

[0194] Correspondingly, an embodiment of the present application provides a projection control device, Fig. 9 is a schematic diagram of the structure of the projection control device provided in the embodiment of the present application, such as Fig. 9 As shown, the projection control device 900 at least includes: a processor 901 and a computer-readable storage medium 902 configured to store executable instructions, wherein the processor 901 generally controls the overall operation of the projection control device. The computer-readable storage medium 902 is configured to store instructions and applications executable by the processor 901, and can also cache data to be processed or processed by each module in the processor 901 and the projection control device 900, which can be implemented by flash memory (FLASH) or random access memory (Random Access Memory, RAM).

[0195] The present application embodiment provides a storage medium storing executable instructions, wherein the executable instructions are stored. When the executable instructions are executed by a processor, the processor will execute the method provided by the present application embodiment, for example, Figure 2 The method shown.

[0196] In some embodiments, the storage medium can be a computer-readable storage medium, for example, a ferroelectric random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPR OM), a flash memory, a magnetic surface memory, an optical disk, or a compact disk read-only memory (CD-ROM), etc.; it can also be various devices including one or any combination of the above memories.

[0197] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0198] As an example, executable instructions may, but need not correspond to, a file in a file system, may be stored as part of a file storing other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions). As an example, executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one location, or on multiple electronic devices distributed at multiple locations and interconnected by a communication network.

[0199] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.

[0200] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.

[0201] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method or device. In the absence of further restrictions, an element defined by the statement "comprises one..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed.

[0202] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A projection control method, It is characterized in that The method comprises: Acquire historical projection information when a projection device projects onto at least one historical projection area and current projection information of the projection device; Detecting status information of the projection device; If the state information indicates that the position of the target projection area of ​​the current environment of the projection device is known, determine the first current position information of the projection device relative to the projection to the target projection area based on the historical projection information and the current projection information; the target projection area is any area of ​​the at least one historical projection area; If the state information indicates that the position of the target projection area of ​​the current environment of the projection device is unknown, determine a target historical projection image corresponding to the current environment image of the current projection information from the historical projection information; and determine a second current posture information of the projection device relative to the projection to the target projection area based on the target historical projection image and the current environment image; Based on the first current posture information or the second current posture information, the posture of the projection device is adjusted.

2. The method according to claim 1, It is characterized in that The target historical projection image includes at least one target historical projection environment object, and each of the target historical projection environment objects includes a plurality of object feature points; The determining, based on the historical projection information and the current projection information, first current position information of the projection device relative to the target projection area when projecting, comprises: Determine the pixel coordinates of each feature point of the object in the current environment of the projection device and the spatial coordinates corresponding to the pixel coordinates; Obtaining a depth value corresponding to each pixel coordinate and a camera intrinsic parameter matrix corresponding to an image acquisition device of the projection device; Determine a posture transformation matrix of the projection device based on the depth value, the camera intrinsic parameter matrix, the pixel coordinates and the space coordinates; Decomposing the posture transformation matrix to obtain a first rotation matrix and a first translation matrix of the projection device; The first rotation matrix and the first translation matrix are determined as first current posture information of the projection device relative to the target projection area.

3. The method according to claim 2, It is characterized in that The historical projection information includes a plurality of target historical spatial coordinates, where the target historical spatial coordinates are spatial coordinates of the projection center of the historical projection area relative to the projection device; The step of determining the first rotation matrix and the first translation matrix as first current posture information of the projection device relative to the target projection area includes: Obtaining the target historical spatial coordinates; Based on the first translation matrix, determining the current spatial coordinates of the environment in which the projection device is currently located; Determine the Euler angle between the projection device and the projection center point based on the current spatial coordinates and the target historical spatial coordinates; The Euler angles, the first rotation matrix, and the first translation matrix are determined as first current position information of the projection device relative to the target projection area.

4. The method according to claim 1, It is characterized in that The current projection information includes a current environment image, where the current environment image is an environment image captured by an image capture device of the environment where the projection device is currently located; The determining, based on the target historical projection image and the current environment image, second current posture information of the projection device relative to when projecting toward the target projection area comprises: Determining a homography matrix of the projection device based on the current environment image and the target historical projection image; Decomposing the homography matrix based on a preset singular value decomposition method to obtain a second rotation matrix and a second translation matrix of the projection device; The second rotation matrix and the second translation matrix are used to determine second current posture information of the projection device relative to the target projection area.

5. The method according to claim 4, It is characterized in that The current environment image includes at least one current environment object; the target historical projection image includes at least one target historical projection environment object; The determining, based on the current environment image and the target historical projection image, a homography matrix of the projection device comprises: Performing feature comparison on each current environment object in the current environment image and each target historical projection object in each target historical projection image to obtain an object comparison value between each current environment object and each target historical projection object; Determining, based on the object comparison value, an image similarity between the current environment image and each of the target historical projection images; Determine the target historical projection image with the maximum image similarity as a similar image to the current environment image; Determining similar feature pairs between the current environment image and the similar image; Based on the similar feature pairs, a homography matrix of the projection device is determined.

6. The method according to claim 5, It is characterized in that Each of the current environment objects and each of the target historical projection environment objects includes a plurality of object feature points; The determining of similar feature pairs between the current environment image and the similar image comprises: Performing feature comparison on each object feature point of the current environment image and the corresponding object feature point in the similar image to obtain a feature comparison value of each object feature point; The feature pairs whose feature comparison values ​​are greater than the comparison value threshold are determined as the similar feature pairs.

7. The method according to claim 6, It is characterized in that The determining, based on the similar feature pairs, a homography matrix of the projection device comprises: Determining a progressive function between two object feature points in the similar feature pair based on the spatial coordinates of the similar feature pair; Based on the progressive function, a homography matrix of the projection device is determined.

8. The method according to claim 1, It is characterized in that The historical projection information includes point cloud data of the projection device; the method further includes: Acquire the target historical spatial coordinates of the projection device and the current spatial coordinates of the environment in which the projection device is currently located; Based on the historical projection information and the point cloud data, sequentially performing region segmentation and region recognition processing on the projection area of ​​the projection device to obtain a projection area of ​​the projection device; Determine the Euler distance between the projection device and the projection center point based on the target historical spatial coordinates and the current spatial coordinates; Comparing the projectable area with the target projection area to obtain a first comparison result; Comparing the Euler distance with a preset Euler distance to obtain a second comparison result; The step of adjusting the posture of the projection device based on the first current posture information or the second current posture information includes: If the first comparison result is that the area difference between the projectable area and the target projection area is within a preset area range, and the second comparison result is that the distance difference between the Euler distance and the preset Euler distance is within a preset distance range, then based on the first current posture information or the second current posture information, the projection device is adjusted in posture.

9. A projection control device, It is characterized in that The device comprises: An acquisition module, used to acquire historical projection information when a projection device projects onto at least one historical projection area and current projection information of the projection device; A detection module, used for detecting status information of the projection device; a determination module, configured to determine, if the state information indicates that the position of a target projection area of ​​the current environment of the projection device is known, first current position information of the projection device relative to when projecting toward the target projection area based on the historical projection information and the current projection information; the target projection area is any area of ​​the at least one historical projection area; The determination module is further configured to, if the status information indicates that the position of the target projection area of ​​the current environment of the projection device is unknown, determine, from the historical projection information, a target historical projection image corresponding to the current environment image of the current projection information; and determine, based on the target historical projection image and the current projection information, a second current posture information of the projection device relative to the projection to the target projection area; An adjustment module is used to adjust the posture of the projection device based on the first current posture information or the second current posture information.

10. A projection control device, It is characterized in that include: A memory for storing executable instructions; The processor is used to implement the projection control method according to any one of claims 1 to 8 when executing the executable instructions stored in the memory.

11. A computer-readable storage medium, It is characterized in that Executable instructions are stored, which are used to cause a processor to execute the executable instructions to implement the projection control method according to any one of claims 1 to 8.