WO2022121260A1 - Projection picture anti-shake method and apparatus, projection device, and storage medium - Google Patents

Projection picture anti-shake method and apparatus, projection device, and storage medium Download PDF

Info

Publication number
WO2022121260A1
WO2022121260A1 PCT/CN2021/098494 CN2021098494W WO2022121260A1 WO 2022121260 A1 WO2022121260 A1 WO 2022121260A1 CN 2021098494 W CN2021098494 W CN 2021098494W WO 2022121260 A1 WO2022121260 A1 WO 2022121260A1
Authority
WO
WIPO (PCT)
Prior art keywords
quaternion
projection
gyroscope
image
difference value
Prior art date
Application number
PCT/CN2021/098494
Other languages
French (fr)
Chinese (zh)
Inventor
苏博文
王鑫
Original Assignee
成都极米科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 成都极米科技股份有限公司 filed Critical 成都极米科技股份有限公司
Publication of WO2022121260A1 publication Critical patent/WO2022121260A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/12Picture reproducers
    • H04N9/31Projection devices for colour picture display, e.g. using electronic spatial light modulators [ESLM]
    • H04N9/3179Video signal processing therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/12Picture reproducers
    • H04N9/31Projection devices for colour picture display, e.g. using electronic spatial light modulators [ESLM]
    • H04N9/3191Testing thereof

Definitions

  • the present application relates to the technical field of projection display, and in particular, to an anti-shake method, device, projection device and storage medium for a projection image.
  • the projector When the projector is unstable, it tends to produce a flickering picture due to its own shaking or shaking. In many usage scenarios of the projector, when the plane on which the projector is placed, such as the table top of the projector or the suspended ceiling vibrates, it will cause the projector to shake, resulting in the instability of the projected image. The instability of the projected image often causes viewers an uncomfortable experience in watching movies.
  • the present application proposes an electronic digital anti-shake method on software, which uses the rotation angle data of the gyroscope inside the projector to calculate the real three-dimensional attitude of the projector at each frame moment, and simultaneously sets a stable three-dimensional attitude. , calculate the compensation difference from the real 3D attitude to the stable 3D attitude, and compensate each frame of the projected picture of the projector optical machine according to the compensation difference, so as to achieve the effect of picture stabilization.
  • This method can quickly and effectively stabilize the projected image, and is more cost-effective than mechanical image stabilization.
  • the present application provides a method for image stabilization of a projection image, including:
  • each pixel is remapped to obtain a stabilized image.
  • the collecting gyroscope data includes:
  • the angular velocities w x , w y and w z of the gyroscope in the x, y and z directions are acquired according to the acquisition interval ⁇ t.
  • the collecting gyroscope data further includes:
  • the calculating the rotation angle according to the gyroscope data includes:
  • ⁇ , and ⁇ are the rotation angles in the x, y and z directions, respectively
  • w x1 , w y1 and w z1 are the angular velocities of the gyroscope in the x, y and z directions of the previous acquisition in the two adjacent acquisitions, respectively
  • w x2 , w y2 and w z2 are the angular velocities of the gyroscope in the x, y and z directions of the last acquisition in two adjacent acquisitions, respectively.
  • the calculating the rotation angle according to the gyroscope data includes:
  • ⁇ , and ⁇ are the rotation angles in the x, y and z directions, respectively
  • w x1 , w y1 and w z1 are the angular velocities of the gyroscope in the x, y and z directions of the previous acquisition in the two adjacent acquisitions, respectively
  • w x2 , w y2 and w z2 are the angular velocities of the gyroscope in the x, y and z directions of the last acquisition in the two adjacent acquisitions, respectively
  • t 2 and t 1 are the latter acquisition in the two adjacent acquisitions, respectively
  • the converting the rotation angle into the first quaternion q includes calculating the first quaternion q according to the following formula:
  • the difference value is the difference value
  • the remapping of each pixel to obtain a stabilized image according to the difference value ⁇ q includes:
  • X is the pixel coordinates of the original image
  • X' is the pixel coordinates of the stabilized image
  • the remapping of each pixel to obtain a stabilized image according to the difference value ⁇ q includes:
  • X is the pixel coordinates of the original image
  • X' is the pixel coordinates of the stabilized image
  • the rotation matrix where ⁇ a, ⁇ b, ⁇ c and ⁇ d are the four components of the difference value ⁇ q.
  • the target three-dimensional posture is the three-dimensional posture of the projector in a stable state
  • the second quaternion Q is calculated after the projector is placed.
  • the method further includes:
  • the gyroscope is installed at the structural connection with the optomechanical body.
  • a projection image stabilization device comprising:
  • the gyroscope data acquisition module is used to collect gyroscope data
  • a rotation angle calculation module for calculating the rotation angle according to the gyroscope data
  • a first quaternion conversion module for converting the rotation angle into a first quaternion q
  • a difference value calculation module configured to calculate the difference value ⁇ q between the first quaternion q and the second quaternion Q, and the second quaternion Q is used to reflect the three-dimensional attitude of the target;
  • the stabilized image transformation module is configured to remap each pixel to obtain a stabilized image according to the difference value ⁇ q.
  • it also includes:
  • the second quaternion setting module is used to calculate the second quaternion Q.
  • it also includes:
  • the picture adjustment module is used for cropping the projection picture and scaling the cropped projection picture to the target display size.
  • the present application provides a projection device, the projection device includes a processor and a memory, the memory stores at least one piece of program code, and the at least one piece of program code is loaded and executed by the processor to implement The projection image stabilization method as described in the first aspect or a possible implementation manner of the first aspect.
  • the present application provides a storage medium, where at least one piece of program code is stored in the storage medium, and the at least one piece of program code is loaded and executed by a processor to implement the first aspect or the possibility of the first aspect
  • the anti-shake method for the projection image described in the implementation manner is implemented.
  • the projection image stabilization device described in the second aspect, the projection device described in the third aspect, and the storage medium described in the fourth aspect are used to implement the method provided in the above-mentioned first aspect, Therefore, the same beneficial effects as the method described in the first aspect can be achieved, and details are not repeated in the embodiments of the present application.
  • the present application adopts the method of the gyroscope quaternion to solve the problem of image projection jitter in the application scene of the projector, with fast response and low cost.
  • the present application installs the gyroscope at the position of the projector opto-mechanical, not just inside the machine, so that the attitude transformation of the opto-mechanical can be estimated more accurately.
  • FIG. 1 is a flowchart of a method for anti-shake of a projection image provided by an embodiment of the present application.
  • the embodiment of the present application mainly uses the gyroscope data as input, and uses the gyroscope data to calculate the motion state of the projector at each moment.
  • a stable state is set, and the motion state of each frame is aligned to the stable state, that is, the difference between the two states is calculated, and the difference is the compensation amount.
  • the compensation amount each frame of projection picture is corrected and displayed, so as to achieve the effect of anti-shake.
  • the anti-shake method for a projection image provided by an embodiment of the present application includes the following steps:
  • the gyroscope data can be the angular velocity w x , w of the gyroscope in the three directions of x, y and z. y and w z . Since the time interval between two adjacent acquisitions may fluctuate near the acquisition interval, when collecting gyroscope data, the system time t corresponding to the gyroscope data at this time can also be recorded to improve the accuracy of the time interval.
  • the gyroscope is installed at the structural connection with the optical machine body, which can ensure that the gyroscope can accurately record the motion state of the optical machine in real time when the optical machine sends jitter.
  • the angle that the projector has turned for two adjacent acquisitions can be calculated according to the following formula:
  • step S101 If the system time corresponding to the acquisition of the gyroscope data is recorded in step S101, the angle that the projector has turned for two adjacent acquisitions is calculated according to the following formula:
  • w x1 , w y1 and w z1 are the angular velocities of the gyroscope in the x, y and z directions of the previous acquisition in the two adjacent acquisitions, respectively
  • w x2 , w y2 and w z2 are the angular velocities of the gyroscope in the x, y and z directions of the last acquisition in the two adjacent acquisitions, respectively
  • t 2 and t 1 are the latter acquisition in the two adjacent acquisitions, respectively The system time corresponding to the previous acquisition.
  • the first quaternion q represents the pose of the projector in the three-dimensional space at the current moment.
  • the specific conversion formula is as follows:
  • Step S103 can obtain the first quaternion q at each acquisition moment, such as the pose of the projector in the three-dimensional space every 33 ms.
  • This set of quaternions reflects the actual jitter of the projector at each acquisition moment.
  • it is hoped that the pose of the projector at each acquisition moment will change from q to Q, so that the actual pose of the projector at each acquisition moment will be the same value, thus changing from jitter to stability .
  • the difference value ⁇ q between the first quaternion q and the second quaternion Q represents the compensation amount required to change the projector from the actual rotation attitude q to the ideal and stable rotation attitude Q at each acquisition moment, the calculation
  • the formula is:
  • ⁇ q means the difference between q and Q, that is, when the frame is in the q posture, it will reach the Q posture after rotating ⁇ q.
  • each pixel can be transformed in the following two ways:
  • the value range is between 0-1920 and 0-1080, respectively.
  • ⁇ a, ⁇ b, ⁇ c and ⁇ d are the four components of the difference value ⁇ q.
  • step S105 After the image is transformed in step S105, the screen will be adjusted, and after the adjustment, a non-visible area outside the screen will appear on the border. This is unacceptable to the user, so the non-visible area displayed by the border needs to be cropped, and only the middle picture is retained.
  • the specific method is as follows: after step S105, the projection picture is cropped, and the cropped projection picture is scaled to the target display size. For example, a picture with a length and width of 80% from the picture center (w/2, h/2) (the value depends on demand) is extracted, and the extracted picture is scaled to the projector display size.
  • Embodiments of the present application further provide a projection image stabilization device, which is used to implement the projection image stabilization method involved in the above embodiments, which can be implemented by hardware or by executing corresponding software in hardware.
  • the hardware or software includes one or more modules corresponding to the above-mentioned functions, for example, a gyroscope data acquisition module for collecting gyroscope data; a rotation angle calculation module for calculating the rotation angle according to the gyroscope data; A first quaternion conversion module for converting the rotation angle into a first quaternion q; a difference value calculation module for calculating the difference value ⁇ q between the first quaternion q and the second quaternion Q , the second quaternion Q is used to reflect the three-dimensional attitude of the target; it is used to remap each pixel to obtain a stabilized image transformation module of the stabilized image according to the difference value ⁇ q.
  • the projection image stabilization apparatus may further include a second quaternion setting module for calculating the second quaternion Q, and may also include a second quaternion setting module for cropping the projection picture, and for cropping the cropped image.
  • a screen adjustment module that scales the projected screen to the target display size.
  • An embodiment of the present application further provides a projection device, the projection device includes a processor and a memory, the memory stores at least one piece of program code, and the at least one piece of program code is loaded and executed by the processor to implement the above The anti-shake method of the projection picture involved in the embodiment.
  • Embodiments of the present application further provide a storage medium, where at least one piece of program code is stored in the storage medium, and the at least one piece of program code is loaded and executed by a processor to implement the projection image stabilization method involved in the foregoing embodiments.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are only illustrative.
  • the division of the modules is only a logical function division. In actual implementation, there may be other division methods.
  • multiple modules or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application.
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more functions for implementing the specified logical function(s) executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional module in each embodiment of the present application may be integrated in one processing unit, or each module may exist physically alone, or two or more modules may be integrated in one unit.
  • the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution, and the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, a network device or a terminal device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, removable hard disk, ROM, RAM) disk or optical disk and other media that can store program codes.
  • the words “if” or “if” as used herein may be interpreted as “at” or “when” or “in response to determining” or “in response to detecting.”
  • the phrases “if determined” or “if detected (the stated condition or event)” can be interpreted as “when determined” or “in response to determining” or “when detected (the stated condition or event),” depending on the context )” or “in response to detection (a stated condition or event)”.

Abstract

The present application relates to the technical field of projection display. Disclosed are a projection picture anti-shake method and apparatus, a projection device, and a storage medium. The projection picture anti-shake method comprises: acquiring gyroscope data; calculating a rotation angle according to the gyroscope data; converting the rotation angle into a first quaternion q; calculating a difference value Δq between the first quaternion q and a second quaternion Q, the second quaternion Q being used for reflecting a target three-dimensional attitude; and remapping each pixel according to the difference value Δq to obtain a stabilized image. According to the present application, the problem of picture projection shake in a projector application scene is solved by using a gyroscope quaternion method, response is fast, and costs are low. In addition, according to the present application, a gyroscope is mounted at the position of a projector ray machine instead of the inside of the machine, so that the attitude change of the ray machine can be estimated more accurately.

Description

一种投影画面防抖方法、装置、投影设备及存储介质A projection image stabilization method, device, projection equipment and storage medium 技术领域technical field
本申请涉及投影显示技术领域,尤其涉及一种投影画面防抖方法、装置、投影设备及存储介质。The present application relates to the technical field of projection display, and in particular, to an anti-shake method, device, projection device and storage medium for a projection image.
背景技术Background technique
当投影仪不稳定时,往往会由于自身的抖动或摇晃而产生颤动的画面。在投影仪的众多使用场景中,当放置平面如:投影仪的桌面或吊装的天花板发生震动时,都会造成投影仪的摇晃,从而导致投影画面的不稳定。而投影画面的不稳定往往会给观影者造成观影上的不适体验。When the projector is unstable, it tends to produce a flickering picture due to its own shaking or shaking. In many usage scenarios of the projector, when the plane on which the projector is placed, such as the table top of the projector or the suspended ceiling vibrates, it will cause the projector to shake, resulting in the instability of the projected image. The instability of the projected image often causes viewers an uncomfortable experience in watching movies.
发明内容SUMMARY OF THE INVENTION
目前主流的投影仪大多没有防抖措施,即使有防抖措施大多数也是基于机械上的防抖,这种办法对结构设计有较高的要求,同时也提高了相应的成本。有鉴于此,本申请提出了一种软件上电子数码防抖方法,该方法利用投影仪内部的陀螺仪的旋转角度数据计算每帧时刻投影仪的真实三维姿态,同时设定一个稳定的三维姿态,计算真实三维姿态到稳定三维姿态的补偿差量,根据补偿差量对投影仪光机的每帧投影画面进行补偿,从而达到画面稳定的效果。该方法可以快速有效地稳定投影画面,并且相对于机械防抖更加节省成本。At present, most of the mainstream projectors do not have anti-shake measures. Even if there are anti-shake measures, most of them are based on mechanical anti-shake. This method has higher requirements on structural design and also increases the corresponding cost. In view of this, the present application proposes an electronic digital anti-shake method on software, which uses the rotation angle data of the gyroscope inside the projector to calculate the real three-dimensional attitude of the projector at each frame moment, and simultaneously sets a stable three-dimensional attitude. , calculate the compensation difference from the real 3D attitude to the stable 3D attitude, and compensate each frame of the projected picture of the projector optical machine according to the compensation difference, so as to achieve the effect of picture stabilization. This method can quickly and effectively stabilize the projected image, and is more cost-effective than mechanical image stabilization.
第一方面,本申请提供一种投影画面防抖方法,包括:In a first aspect, the present application provides a method for image stabilization of a projection image, including:
采集陀螺仪数据;Collect gyroscope data;
根据所述陀螺仪数据,计算旋转角度;According to the gyroscope data, calculate the rotation angle;
将所述旋转角度转换成第一四元数q;converting the rotation angle into a first quaternion q;
计算所述第一四元数q与第二四元数Q的差异值Δq,所述第二四元数Q用于反映目标三维姿态;Calculate the difference value Δq between the first quaternion q and the second quaternion Q, and the second quaternion Q is used to reflect the three-dimensional attitude of the target;
根据所述差异值Δq,对每个像素重映射得到稳定后的图像。According to the difference value Δq, each pixel is remapped to obtain a stabilized image.
在一种可能的实现方式中,所述采集陀螺仪数据包括:In a possible implementation manner, the collecting gyroscope data includes:
根据采集间隔Δt采集陀螺仪在x,y和z三个方向的角速度w x,w y和w zThe angular velocities w x , w y and w z of the gyroscope in the x, y and z directions are acquired according to the acquisition interval Δt.
在一种可能的实现方式中,所述采集陀螺仪数据还包括:In a possible implementation manner, the collecting gyroscope data further includes:
记录采集陀螺仪数据时对应的系统时间。Record the corresponding system time when the gyroscope data is collected.
在一种可能的实现方式中,根据投影画面的帧率p确定所述采集间隔Δt,且Δt=1/p。In a possible implementation manner, the acquisition interval Δt is determined according to the frame rate p of the projected picture, and Δt=1/p.
在一种可能的实现方式中,所述根据所述陀螺仪数据,计算旋转角度包括:In a possible implementation manner, the calculating the rotation angle according to the gyroscope data includes:
θ=w x1×Δt,
Figure PCTCN2021098494-appb-000001
ψ=w z1×Δt,或者,
θ=w x1 ×Δt,
Figure PCTCN2021098494-appb-000001
ψ=w z1 ×Δt, or,
Figure PCTCN2021098494-appb-000002
Figure PCTCN2021098494-appb-000002
其中,θ,
Figure PCTCN2021098494-appb-000003
和ψ分别为x,y和z三个方向的旋转角度,w x1,w y1和w z1分别为相邻两次采集中前一次采集的陀螺仪在x,y和z三个方向的角速度,w x2,w y2和w z2分别为相邻两次采集中后一次采集的陀螺仪在x,y和z三个方向的角速度。
where θ,
Figure PCTCN2021098494-appb-000003
and ψ are the rotation angles in the x, y and z directions, respectively, w x1 , w y1 and w z1 are the angular velocities of the gyroscope in the x, y and z directions of the previous acquisition in the two adjacent acquisitions, respectively, w x2 , w y2 and w z2 are the angular velocities of the gyroscope in the x, y and z directions of the last acquisition in two adjacent acquisitions, respectively.
在一种可能的实现方式中,所述根据所述陀螺仪数据,计算旋转角度包括:In a possible implementation manner, the calculating the rotation angle according to the gyroscope data includes:
θ=w x1×(t 2-t 1),
Figure PCTCN2021098494-appb-000004
ψ=w z1×(t 2-t 1),或者,
θ=w x1 ×(t 2 -t 1 ),
Figure PCTCN2021098494-appb-000004
ψ=w z1 ×(t 2 -t 1 ), or,
Figure PCTCN2021098494-appb-000005
Figure PCTCN2021098494-appb-000005
其中,θ,
Figure PCTCN2021098494-appb-000006
和ψ分别为x,y和z三个方向的旋转角度,w x1,w y1和w z1分别为相邻两次采集中前一次采集的陀螺仪在x,y和z三个方向的角速度,w x2,w y2和w z2分别为相邻两次采集中后一次采集的陀螺仪在x,y和z三个方向的角速度,t 2和t 1分别为相邻两次采集中后一次采集和前一次采集对应的系统时间。
where θ,
Figure PCTCN2021098494-appb-000006
and ψ are the rotation angles in the x, y and z directions, respectively, w x1 , w y1 and w z1 are the angular velocities of the gyroscope in the x, y and z directions of the previous acquisition in the two adjacent acquisitions, respectively, w x2 , w y2 and w z2 are the angular velocities of the gyroscope in the x, y and z directions of the last acquisition in the two adjacent acquisitions, respectively, t 2 and t 1 are the latter acquisition in the two adjacent acquisitions, respectively The system time corresponding to the previous acquisition.
在一种可能的实现方式中,所述将所述旋转角度转换成第一四元数q包括根据下式计算第一四元数q:In a possible implementation, the converting the rotation angle into the first quaternion q includes calculating the first quaternion q according to the following formula:
Figure PCTCN2021098494-appb-000007
其中,a,b,c和d为第一四元数q的四个分量。
Figure PCTCN2021098494-appb-000007
where a, b, c and d are the four components of the first quaternion q.
在一种可能的实现方式中,所述差异值
Figure PCTCN2021098494-appb-000008
In one possible implementation, the difference value
Figure PCTCN2021098494-appb-000008
在一种可能的实现方式中,所述根据所述差异值Δq,对每个像素重映射得到稳定后的图像包括:In a possible implementation manner, the remapping of each pixel to obtain a stabilized image according to the difference value Δq includes:
对每个像素进行如下变换:X'=Δq -1XΔq, Transform each pixel as follows: X'=Δq -1 XΔq,
其中,X为原始图像的像素坐标,X’为稳定后的图像的像素坐标。Among them, X is the pixel coordinates of the original image, and X' is the pixel coordinates of the stabilized image.
在一种可能的实现方式中,所述根据所述差异值Δq,对每个像素重映射得到稳定后的图像包括:In a possible implementation manner, the remapping of each pixel to obtain a stabilized image according to the difference value Δq includes:
将所述差异值Δq转换成旋转矩阵R;converting the difference value Δq into a rotation matrix R;
对每个像素进行如下变换:X'=RX,Transform each pixel as follows: X'=RX,
其中,X为原始图像的像素坐标,X’为稳定后的图像的像素坐标。Among them, X is the pixel coordinates of the original image, and X' is the pixel coordinates of the stabilized image.
在一种可能的实现方式中,所述旋转矩阵
Figure PCTCN2021098494-appb-000009
其中Δa,Δb,Δc和Δd为差异值Δq的四个分量。
In a possible implementation, the rotation matrix
Figure PCTCN2021098494-appb-000009
where Δa, Δb, Δc and Δd are the four components of the difference value Δq.
在一种可能的实现方式中,所述目标三维姿态为投影仪稳定状态下的三维姿态,所述第二四元数Q在所述投影仪放置好后计算得到。In a possible implementation manner, the target three-dimensional posture is the three-dimensional posture of the projector in a stable state, and the second quaternion Q is calculated after the projector is placed.
在一种可能的实现方式中,在所述根据所述补偿量,对每个像素重映射得到稳定后的图像之后,还包括:In a possible implementation manner, after obtaining a stabilized image by remapping each pixel according to the compensation amount, the method further includes:
对投影画面进行裁剪,并对裁剪后的投影画面缩放至目标显示尺寸。Crop the projected image and scale the cropped projected image to the target display size.
在一种可能的实现方式中,所述陀螺仪安装在与光机机体的结构连接处。In a possible implementation manner, the gyroscope is installed at the structural connection with the optomechanical body.
第二方面,本申请提供一种投影画面防抖装置,包括:In a second aspect, the present application provides a projection image stabilization device, comprising:
陀螺仪数据采集模块,用于采集陀螺仪数据;The gyroscope data acquisition module is used to collect gyroscope data;
旋转角度计算模块,用于根据所述陀螺仪数据,计算旋转角度;a rotation angle calculation module for calculating the rotation angle according to the gyroscope data;
第一四元数转换模块,用于将所述旋转角度转换成第一四元数q;a first quaternion conversion module for converting the rotation angle into a first quaternion q;
差异值计算模块,用于计算所述第一四元数q与第二四元数Q的差异值Δq,所述第二四元数Q用于反映目标三维姿态;a difference value calculation module, configured to calculate the difference value Δq between the first quaternion q and the second quaternion Q, and the second quaternion Q is used to reflect the three-dimensional attitude of the target;
稳定图像变换模块,用于根据所述差异值Δq,对每个像素重映射得到稳定后的图像。The stabilized image transformation module is configured to remap each pixel to obtain a stabilized image according to the difference value Δq.
在一种可能的实现方式中,还包括:In a possible implementation, it also includes:
第二四元数设定模块,用于计算第二四元数Q。The second quaternion setting module is used to calculate the second quaternion Q.
在一种可能的实现方式中,还包括:In a possible implementation, it also includes:
画面调整模块,用于对投影画面进行裁剪,并对裁剪后的投影画面缩放至目 标显示尺寸。The picture adjustment module is used for cropping the projection picture and scaling the cropped projection picture to the target display size.
第三方面,本申请提供一种投影设备,所述投影设备包括处理器和存储器,所述存储器中存储有至少一条程序代码,所述至少一条程序代码由所述处理器加载并执行,以实现如第一方面或第一方面的可能的实现方式中所述的投影画面防抖方法。In a third aspect, the present application provides a projection device, the projection device includes a processor and a memory, the memory stores at least one piece of program code, and the at least one piece of program code is loaded and executed by the processor to implement The projection image stabilization method as described in the first aspect or a possible implementation manner of the first aspect.
第四方面,本申请提供一种存储介质,所述存储介质中存储有至少一条程序代码,所述至少一条程序代码由处理器加载并执行,以实现如第一方面或第一方面的可能的实现方式中所述的投影画面防抖方法。In a fourth aspect, the present application provides a storage medium, where at least one piece of program code is stored in the storage medium, and the at least one piece of program code is loaded and executed by a processor to implement the first aspect or the possibility of the first aspect The anti-shake method for the projection image described in the implementation manner is implemented.
需要说明的是,本申请中第二方面所述的投影画面防抖装置、第三方面所述的投影设备以及第四方面所述的存储介质,用于实现上述第一方面所提供的方法,因此可以达到与第一方面所述的方法相同的有益效果,本申请实施例不再一一赘述。It should be noted that, in the present application, the projection image stabilization device described in the second aspect, the projection device described in the third aspect, and the storage medium described in the fourth aspect are used to implement the method provided in the above-mentioned first aspect, Therefore, the same beneficial effects as the method described in the first aspect can be achieved, and details are not repeated in the embodiments of the present application.
本申请采用陀螺仪四元数的方法来解决投影仪应用场景下的画面投影抖动问题,响应快,成本低。此外,本申请将陀螺仪安装在投影仪光机位置,而不仅仅是机器内部,这样可以更加准确地估计光机的姿态变换。The present application adopts the method of the gyroscope quaternion to solve the problem of image projection jitter in the application scene of the projector, with fast response and low cost. In addition, the present application installs the gyroscope at the position of the projector opto-mechanical, not just inside the machine, so that the attitude transformation of the opto-mechanical can be estimated more accurately.
附图说明Description of drawings
本申请将通过实施例并参照附图的方式说明,其中:The present application will be described by way of example and with reference to the accompanying drawings, wherein:
图1为本申请实施例提供的投影画面防抖方法流程图。FIG. 1 is a flowchart of a method for anti-shake of a projection image provided by an embodiment of the present application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本申请中的技术方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。此外,虽然本申请中公开内容按照示范性一个或几个实例来介绍,但应理解,可以就这些公开内容的各个方面也可以单独构成一个完整技术方案。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described The embodiments are only a part of the embodiments of the present application, but not all of the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the scope of protection of the present application. In addition, although the disclosures in this application are presented in terms of one or several exemplary examples, it should be understood that each aspect of these disclosures can also constitute a complete technical solution individually. The embodiments described below and features in the embodiments may be combined with each other without conflict.
在本申请实施例中,“示例地”、“例如”等词用于表示作例子、例证或说明。 本申请中被描述为“示例”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用示例的一词旨在以具体方式呈现概念。In the embodiments of the present application, words such as "exemplarily" and "for example" are used to represent examples, illustrations or illustrations. Any embodiment or design described in this application as "exemplary" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of the word example is intended to present a concept in a concrete way.
除非另外定义,本申请使用的技术术语或者科学术语应当为本申请所属领域内具有一般技能的人士所理解的通常意义。本申请中使用的“第一”、“第二”以及类似的词语并不表示任何顺序、数量或者重要性,而是仅用于区分描述,且对应术语的含义可以相同也可以不同。“包括”或者“包含”等类似的词语意指出现该词前面的元件或者物件涵盖出现在该词后面列举的元件或者物件及其等同,而不排除其他元件或者物件。Unless otherwise defined, technical or scientific terms used in this application shall have the ordinary meaning as understood by those of ordinary skill in the art to which this application belongs. "First", "second" and similar words used in this application do not indicate any order, quantity or importance, but are only used to distinguish descriptions, and the meanings of corresponding terms may be the same or different. "Comprises" or "comprising" and similar words mean that the elements or things appearing before the word encompass the elements or things recited after the word and their equivalents, but do not exclude other elements or things.
下面将结合附图,对本申请中的技术方案进行描述。The technical solutions in the present application will be described below with reference to the accompanying drawings.
本申请实施例主要根据陀螺仪数据作为输入,利用陀螺仪数据计算每时刻的投影仪的运动状态。设定一个稳定的状态,并将每帧的运动状态对齐至该稳定状态,即计算两者状态的差值,该差值即为补偿量。根据该补偿量对每帧投影画面进行矫正显示,从而达到防抖的效果。如图1所示,本申请实施例提供的投影画面防抖方法包括以下步骤:The embodiment of the present application mainly uses the gyroscope data as input, and uses the gyroscope data to calculate the motion state of the projector at each moment. A stable state is set, and the motion state of each frame is aligned to the stable state, that is, the difference between the two states is calculated, and the difference is the compensation amount. According to the compensation amount, each frame of projection picture is corrected and displayed, so as to achieve the effect of anti-shake. As shown in FIG. 1 , the anti-shake method for a projection image provided by an embodiment of the present application includes the following steps:
S101.采集陀螺仪数据。S101. Collect gyroscope data.
在采集陀螺仪数据时,采集间隔Δt可根据实际情况进行选择。示例地,可根据经验人为地设定一采集间隔,也可根据投影画面的帧率p确定采集间隔Δt,且Δt=1/p。如,影片播放帧率为30fps,也就是每33ms播放一帧画面,那么每33ms采集一帧陀螺仪数据,陀螺仪数据可以为陀螺仪在x,y和z三个方向的角速度w x,w y和w z。由于相邻两次采集的时间间隔可能会在采集间隔附近波动,因此,在采集陀螺仪数据时,还可以记录此时陀螺仪数据对应的系统时间t,提高时间间隔的准确性。 When collecting gyroscope data, the collection interval Δt can be selected according to the actual situation. For example, a collection interval may be artificially set according to experience, or the collection interval Δt may be determined according to the frame rate p of the projection image, and Δt=1/p. For example, if the video playback frame rate is 30fps, that is, one frame is played every 33ms, then one frame of gyroscope data is collected every 33ms. The gyroscope data can be the angular velocity w x , w of the gyroscope in the three directions of x, y and z. y and w z . Since the time interval between two adjacent acquisitions may fluctuate near the acquisition interval, when collecting gyroscope data, the system time t corresponding to the gyroscope data at this time can also be recorded to improve the accuracy of the time interval.
在一些实施例中,所述陀螺仪安装在与光机机体的结构连接处,这样可以保证在光机发送抖动时,陀螺仪可以实时准确地记录除光机的运动状态。In some embodiments, the gyroscope is installed at the structural connection with the optical machine body, which can ensure that the gyroscope can accurately record the motion state of the optical machine in real time when the optical machine sends jitter.
S102.根据所述陀螺仪数据,计算旋转角度。S102. Calculate the rotation angle according to the gyroscope data.
在步骤S101得到每帧投影画面对应的陀螺仪数据后,可根据如下公式计算相邻两次采集投影仪转过的角度:After obtaining the gyroscope data corresponding to each frame of the projected picture in step S101, the angle that the projector has turned for two adjacent acquisitions can be calculated according to the following formula:
θ=w x1×Δt,
Figure PCTCN2021098494-appb-000010
ψ=w z1×Δt,或者,
θ=w x1 ×Δt,
Figure PCTCN2021098494-appb-000010
ψ=w z1 ×Δt, or,
Figure PCTCN2021098494-appb-000011
Figure PCTCN2021098494-appb-000011
若步骤S101中记录了采集陀螺仪数据时对应的系统时间,则根据如下公式计算相邻两次采集投影仪转过的角度:If the system time corresponding to the acquisition of the gyroscope data is recorded in step S101, the angle that the projector has turned for two adjacent acquisitions is calculated according to the following formula:
θ=w x1×(t 2-t 1),
Figure PCTCN2021098494-appb-000012
ψ=w z1×(t 2-t 1),或者,
θ=w x1 ×(t 2 -t 1 ),
Figure PCTCN2021098494-appb-000012
ψ=w z1 ×(t 2 -t 1 ), or,
Figure PCTCN2021098494-appb-000013
Figure PCTCN2021098494-appb-000013
其中,其中,θ,
Figure PCTCN2021098494-appb-000014
和ψ分别为x,y和z三个方向的旋转角度,w x1,w y1和w z1分别为相邻两次采集中前一次采集的陀螺仪在x,y和z三个方向的角速度,w x2,w y2和w z2分别为相邻两次采集中后一次采集的陀螺仪在x,y和z三个方向的角速度,t 2和t 1分别为相邻两次采集中后一次采集和前一次采集对应的系统时间。
where, where θ,
Figure PCTCN2021098494-appb-000014
and ψ are the rotation angles in the x, y and z directions, respectively, w x1 , w y1 and w z1 are the angular velocities of the gyroscope in the x, y and z directions of the previous acquisition in the two adjacent acquisitions, respectively, w x2 , w y2 and w z2 are the angular velocities of the gyroscope in the x, y and z directions of the last acquisition in the two adjacent acquisitions, respectively, t 2 and t 1 are the latter acquisition in the two adjacent acquisitions, respectively The system time corresponding to the previous acquisition.
S103.将所述旋转角度转换成第一四元数q。S103. Convert the rotation angle into a first quaternion q.
根据步骤S102计算相邻两帧陀螺仪数据的旋转角度θ,
Figure PCTCN2021098494-appb-000015
和ψ,可根据如下公式将其转换成对应的第一四元数q。第一四元数q表示当前时刻投影仪在三维空间的位姿。具体转换公式如下:
Calculate the rotation angle θ of two adjacent frames of gyroscope data according to step S102,
Figure PCTCN2021098494-appb-000015
and ψ, which can be converted into the corresponding first quaternion q according to the following formula. The first quaternion q represents the pose of the projector in the three-dimensional space at the current moment. The specific conversion formula is as follows:
Figure PCTCN2021098494-appb-000016
其中,a,b,c和d为第一四元数q的四个分量。
Figure PCTCN2021098494-appb-000016
where a, b, c and d are the four components of the first quaternion q.
S104.计算所述第一四元数q与第二四元数Q的差异值Δq。S104. Calculate the difference value Δq between the first quaternion q and the second quaternion Q.
设定一个固定的第二四元数Q=(a’,b’,c’,d’),该第二四元数Q用于反映目标三维姿态,即一个稳定的三维姿态。可以设定为投影仪稳定状态下的三维姿态,在投影仪放置好后,即可进行计算,若投影仪的摆放位置不变,则该四元数Q不变,若投影仪的摆放位置发生变化,则需重新计算该四元数Q。A fixed second quaternion Q=(a',b',c',d') is set, and the second quaternion Q is used to reflect the three-dimensional attitude of the target, that is, a stable three-dimensional attitude. It can be set to the three-dimensional posture of the projector in a stable state. After the projector is placed, the calculation can be performed. If the placement position of the projector remains unchanged, the quaternion Q remains unchanged. If the position changes, the quaternion Q needs to be recalculated.
步骤S103可以得到每一采集时刻的第一四元数q,如每隔33ms的投影仪在三维空间的位姿。这组四元数反映了投影仪在每个采集时刻实际的抖动情况。为了达到防抖效果,希望投影仪在每个采集时刻的位姿都从q变为Q,这样投影仪 在每个采集时刻,投影仪的实际位姿都会为同一值,从而由抖动变为稳定。Step S103 can obtain the first quaternion q at each acquisition moment, such as the pose of the projector in the three-dimensional space every 33 ms. This set of quaternions reflects the actual jitter of the projector at each acquisition moment. In order to achieve the anti-shake effect, it is hoped that the pose of the projector at each acquisition moment will change from q to Q, so that the actual pose of the projector at each acquisition moment will be the same value, thus changing from jitter to stability .
第一四元数q与第二四元数Q的差异值Δq代表在每个采集时刻,如果要把投影仪从实际的旋转姿态q变为理想稳定的旋转姿态Q需要的补偿量,其计算公式为:The difference value Δq between the first quaternion q and the second quaternion Q represents the compensation amount required to change the projector from the actual rotation attitude q to the ideal and stable rotation attitude Q at each acquisition moment, the calculation The formula is:
Figure PCTCN2021098494-appb-000017
Figure PCTCN2021098494-appb-000017
其中,
Figure PCTCN2021098494-appb-000018
表示四元数乘法。Δq即表示q与Q的差异,即表示该帧画面处于q姿态时,旋转Δq后达到Q姿态。
in,
Figure PCTCN2021098494-appb-000018
Represents quaternion multiplication. Δq means the difference between q and Q, that is, when the frame is in the q posture, it will reach the Q posture after rotating Δq.
S105.根据所述差异值Δq,对每个像素重映射得到稳定后的图像。S105. According to the difference value Δq, remap each pixel to obtain a stabilized image.
利用步骤S104计算得到的四元数补偿量Δq对投影画面进行补偿,从而达到画面稳定的效果。示例地,可以采用如下两种做法对每个像素进行变换:The projected image is compensated by using the quaternion compensation amount Δq calculated in step S104, so as to achieve the effect of image stabilization. Illustratively, each pixel can be transformed in the following two ways:
方法一:X'=Δq -1XΔq, Method 1: X'=Δq -1 XΔq,
其中,X=(u,r,1,1),u,r为原始图像的像素坐标,如,图像左上点坐标为(0,0),右下角坐标为(1920,1080),u,r取值范围分别在0-1920和0-1080之间。对X进行上述公式变换后得到新的坐标X’,即最终图像X’位置的像素对应原始图像X的位置像素。得到的最终图像即为补偿后的画面,从而达到投影画面防抖的效果。Among them, X=(u,r,1,1), u, r are the pixel coordinates of the original image, for example, the coordinates of the upper left point of the image are (0,0), and the coordinates of the lower right corner are (1920, 1080), u, r The value range is between 0-1920 and 0-1080, respectively. After transforming X with the above formula, a new coordinate X' is obtained, that is, the pixel at the position of the final image X' corresponds to the position pixel of the original image X. The final image obtained is the image after compensation, so as to achieve the effect of anti-shake of the projected image.
方法二:先将所述差异值Δq转换成对应的旋转矩阵R,转换公式如下:Method 2: First convert the difference value Δq into the corresponding rotation matrix R, the conversion formula is as follows:
Figure PCTCN2021098494-appb-000019
Figure PCTCN2021098494-appb-000019
其中,Δa,Δb,Δc和Δd为差异值Δq的四个分量。Among them, Δa, Δb, Δc and Δd are the four components of the difference value Δq.
然后利用旋转矩阵R对投影画面进行校正:X'=RX,此时,X=(u,r,1)。Then use the rotation matrix R to correct the projection picture: X'=RX, at this time, X=(u, r, 1).
当图像经过步骤S105的变换后,会对画面进行调整,调整后边界会出现画面以外的非可见区域。这是用户所不能接受的,所以需要裁剪掉边界显示出的非可见区域,只保留中间的画面。具体方法是:在步骤S105后,对投影画面进行裁剪,并对裁剪后的投影画面缩放至目标显示尺寸。示例地,提取出距离画面中心(w/2,h/2)长宽各80%(该值视需求情况而定)的画面,并对提取后的画面缩放至投影仪显示尺寸。After the image is transformed in step S105, the screen will be adjusted, and after the adjustment, a non-visible area outside the screen will appear on the border. This is unacceptable to the user, so the non-visible area displayed by the border needs to be cropped, and only the middle picture is retained. The specific method is as follows: after step S105, the projection picture is cropped, and the cropped projection picture is scaled to the target display size. For example, a picture with a length and width of 80% from the picture center (w/2, h/2) (the value depends on demand) is extracted, and the extracted picture is scaled to the projector display size.
本申请实施例还提供一种投影画面防抖装置,该装置用于实现上述实施例涉 及的投影画面防抖方法,可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块,例如,用于采集陀螺仪数据的陀螺仪数据采集模块;用于根据所述陀螺仪数据,计算旋转角度的旋转角度计算模块;用于将所述旋转角度转换成第一四元数q的第一四元数转换模块;用于计算所述第一四元数q与第二四元数Q的差异值Δq的差异值计算模块,所述第二四元数Q用于反映目标三维姿态;用于根据所述差异值Δq,对每个像素重映射得到稳定后的图像的稳定图像变换模块。Embodiments of the present application further provide a projection image stabilization device, which is used to implement the projection image stabilization method involved in the above embodiments, which can be implemented by hardware or by executing corresponding software in hardware. The hardware or software includes one or more modules corresponding to the above-mentioned functions, for example, a gyroscope data acquisition module for collecting gyroscope data; a rotation angle calculation module for calculating the rotation angle according to the gyroscope data; A first quaternion conversion module for converting the rotation angle into a first quaternion q; a difference value calculation module for calculating the difference value Δq between the first quaternion q and the second quaternion Q , the second quaternion Q is used to reflect the three-dimensional attitude of the target; it is used to remap each pixel to obtain a stabilized image transformation module of the stabilized image according to the difference value Δq.
在一些实施例中,投影画面防抖装置还可以包括用于计算第二四元数Q的第二四元数设定模块,也还可以包括用于对投影画面进行裁剪,并对裁剪后的投影画面缩放至目标显示尺寸的画面调整模块。In some embodiments, the projection image stabilization apparatus may further include a second quaternion setting module for calculating the second quaternion Q, and may also include a second quaternion setting module for cropping the projection picture, and for cropping the cropped image. A screen adjustment module that scales the projected screen to the target display size.
本申请实施例还提供一种投影设备,所述投影设备包括处理器和存储器,所述存储器中存储有至少一条程序代码,所述至少一条程序代码由所述处理器加载并执行,以实现上述实施例涉及的投影画面防抖方法。An embodiment of the present application further provides a projection device, the projection device includes a processor and a memory, the memory stores at least one piece of program code, and the at least one piece of program code is loaded and executed by the processor to implement the above The anti-shake method of the projection picture involved in the embodiment.
本申请实施例还提供一种存储介质,所述存储介质中存储有至少一条程序代码,所述至少一条程序代码由处理器加载并执行,以实现上述实施例涉及的投影画面防抖方法。Embodiments of the present application further provide a storage medium, where at least one piece of program code is stored in the storage medium, and the at least one piece of program code is loaded and executed by a processor to implement the projection image stabilization method involved in the foregoing embodiments.
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,部分或全部步骤可以并行执行或先后执行,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that, in various embodiments of the present application, the size of the sequence numbers of the above-mentioned processes does not imply the sequence of execution, some or all of the steps may be executed in parallel or sequentially, and the execution sequence of each process should be based on its functions and It is determined by the internal logic and should not constitute any limitation on the implementation process of the embodiments of the present application.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的模块及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, for the specific working process of the above-described devices and modules, reference may be made to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如, 所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。例如,附图中的流程图和框图显示了根据本申请的多个实施例的装置、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are only illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. For example, the flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more functions for implementing the specified logical function(s) executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个单元中。In addition, each functional module in each embodiment of the present application may be integrated in one processing unit, or each module may exist physically alone, or two or more modules may be integrated in one unit.
所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,网络设备或者终端设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM)磁碟或者光盘等各种可以存储程序代码的介质。If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution, and the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, a network device or a terminal device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, removable hard disk, ROM, RAM) disk or optical disk and other media that can store program codes.
在本申请实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请。在本申请实施例和所附权利要求书中所使用的单数形式的“一种”、 “所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。本文中字符“/”,一般表示前后关联对象是一种“或”的关系。The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. As used in the embodiments of this application and the appended claims, the singular forms "a," "the," and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise. It will also be understood that the term "and/or" as used herein refers to and includes any and all possible combinations of one or more of the associated listed items. The character "/" in this article generally indicates that the related objects are an "or" relationship.
取决于语境,如在此所使用的词语“如果”或“若”可以被解释成为“在……时”或“当……时”或“响应于确定”或“响应于检测”。类似地,取决于语境,短语“如果确定”或“如果检测(陈述的条件或事件)”可以被解释成为“当确定时”或“响应于确定”或“当检测(陈述的条件或事件)时”或“响应于检测(陈述的条件或事件)”。Depending on the context, the words "if" or "if" as used herein may be interpreted as "at" or "when" or "in response to determining" or "in response to detecting." Similarly, the phrases "if determined" or "if detected (the stated condition or event)" can be interpreted as "when determined" or "in response to determining" or "when detected (the stated condition or event)," depending on the context )" or "in response to detection (a stated condition or event)".
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited to this. should be covered within the scope of protection of this application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims (19)

  1. 一种投影画面防抖方法,其特征在于,包括:A method for image stabilization of projection images, comprising:
    采集陀螺仪数据;Collect gyroscope data;
    根据所述陀螺仪数据,计算旋转角度;According to the gyroscope data, calculate the rotation angle;
    将所述旋转角度转换成第一四元数q;converting the rotation angle into a first quaternion q;
    计算所述第一四元数q与第二四元数Q的差异值Δq,所述第二四元数Q用于反映目标三维姿态;Calculate the difference value Δq between the first quaternion q and the second quaternion Q, and the second quaternion Q is used to reflect the three-dimensional attitude of the target;
    根据所述差异值Δq,对每个像素重映射得到稳定后的图像。According to the difference value Δq, each pixel is remapped to obtain a stabilized image.
  2. 根据权利要求1所述的一种投影画面防抖方法,其特征在于,所述采集陀螺仪数据包括:The anti-shake method of a projection image according to claim 1, wherein the collecting gyroscope data comprises:
    根据采集间隔Δt采集陀螺仪在x,y和z三个方向的角速度w x,w y和w zThe angular velocities w x , w y and w z of the gyroscope in the x, y and z directions are acquired according to the acquisition interval Δt.
  3. 根据权利要求2所述的一种投影画面防抖方法,其特征在于,所述采集陀螺仪数据还包括:The anti-shake method for a projection image according to claim 2, wherein the collecting gyroscope data further comprises:
    记录采集陀螺仪数据时对应的系统时间。Record the corresponding system time when the gyroscope data is collected.
  4. 根据权利要求2所述的一种投影画面防抖方法,其特征在于,根据投影画面的帧率p确定所述采集间隔Δt,且Δt=1/p。The anti-shake method for a projection image according to claim 2, wherein the acquisition interval Δt is determined according to the frame rate p of the projection image, and Δt=1/p.
  5. 根据权利要求2所述的一种投影画面防抖方法,其特征在于,所述根据所述陀螺仪数据,计算旋转角度包括:The anti-shake method for a projection image according to claim 2, wherein the calculating the rotation angle according to the gyroscope data comprises:
    θ=w x1×Δt,
    Figure PCTCN2021098494-appb-100001
    ψ=w z1×Δt,或者,
    θ=w x1 ×Δt,
    Figure PCTCN2021098494-appb-100001
    ψ=w z1 ×Δt, or,
    Figure PCTCN2021098494-appb-100002
    Figure PCTCN2021098494-appb-100002
    其中,θ,
    Figure PCTCN2021098494-appb-100003
    和ψ分别为x,y和z三个方向的旋转角度,w x1,w y1和w z1分别为相邻两次采集中前一次采集的陀螺仪在x,y和z三个方向的角速度,w x2,w y2和w z2分别为相邻两次采集中后一次采集的陀螺仪在x,y和z三个方向的角速度。
    where θ,
    Figure PCTCN2021098494-appb-100003
    and ψ are the rotation angles in the x, y and z directions, respectively, w x1 , w y1 and w z1 are the angular velocities of the gyroscope in the x, y and z directions of the previous acquisition in the two adjacent acquisitions, respectively, w x2 , w y2 and w z2 are the angular velocities of the gyroscope in the x, y and z directions of the last acquisition in two adjacent acquisitions, respectively.
  6. 根据权利要求3所述的一种投影画面防抖方法,其特征在于,所述根据所述陀螺仪数据,计算旋转角度包括:The anti-shake method for a projection image according to claim 3, wherein the calculating the rotation angle according to the gyroscope data comprises:
    θ=w x1×(t 2-t 1),
    Figure PCTCN2021098494-appb-100004
    ψ=w z1×(t 2-t 1),或者,
    θ=w x1 ×(t 2 -t 1 ),
    Figure PCTCN2021098494-appb-100004
    ψ=w z1 ×(t 2 -t 1 ), or,
    Figure PCTCN2021098494-appb-100005
    Figure PCTCN2021098494-appb-100006
    Figure PCTCN2021098494-appb-100005
    Figure PCTCN2021098494-appb-100006
    其中,θ,
    Figure PCTCN2021098494-appb-100007
    和ψ分别为x,y和z三个方向的旋转角度,w x1,w y1和w z1分别为相邻两次采集中前一次采集的陀螺仪在x,y和z三个方向的角速度,w x2,w y2和w z2分别为相邻两次采集中后一次采集的陀螺仪在x,y和z三个方向的角速度,t 2和t 1分别为相邻两次采集中后一次采集和前一次采集对应的系统时间。
    where θ,
    Figure PCTCN2021098494-appb-100007
    and ψ are the rotation angles in the x, y and z directions, respectively, w x1 , w y1 and w z1 are the angular velocities of the gyroscope in the x, y and z directions of the previous acquisition in the two adjacent acquisitions, respectively, w x2 , w y2 and w z2 are the angular velocities of the gyroscope in the x, y and z directions of the last acquisition in the two adjacent acquisitions, respectively, t 2 and t 1 are the latter acquisition in the two adjacent acquisitions, respectively The system time corresponding to the previous acquisition.
  7. 根据权利要求5或6所述的一种投影画面防抖方法,其特征在于,所述将所述旋转角度转换成第一四元数q包括根据下式计算第一四元数q:A projection image stabilization method according to claim 5 or 6, wherein the converting the rotation angle into the first quaternion q comprises calculating the first quaternion q according to the following formula:
    Figure PCTCN2021098494-appb-100008
    其中,a,b,c和d为第一四元数q的四个分量。
    Figure PCTCN2021098494-appb-100008
    where a, b, c and d are the four components of the first quaternion q.
  8. 根据权利要求1所述的一种投影画面防抖方法,其特征在于,所述差异值
    Figure PCTCN2021098494-appb-100009
    The anti-shake method of a projection image according to claim 1, wherein the difference value is
    Figure PCTCN2021098494-appb-100009
  9. 根据权利要求1所述的一种投影画面防抖方法,其特征在于,所述根据所述差异值Δq,对每个像素重映射得到稳定后的图像包括:The anti-shake method for a projection image according to claim 1, wherein, according to the difference value Δq, remapping each pixel to obtain a stabilized image comprises:
    对每个像素进行如下变换:X'=Δq -1XΔq, Transform each pixel as follows: X'=Δq -1 XΔq,
    其中,X为原始图像的像素坐标,X’为稳定后的图像的像素坐标。Among them, X is the pixel coordinates of the original image, and X' is the pixel coordinates of the stabilized image.
  10. 根据权利要求1所述的一种投影画面防抖方法,其特征在于,所述根据所述差异值Δq,对每个像素重映射得到稳定后的图像包括:The anti-shake method for a projection image according to claim 1, wherein, according to the difference value Δq, remapping each pixel to obtain a stabilized image comprises:
    将所述差异值Δq转换成旋转矩阵R;converting the difference value Δq into a rotation matrix R;
    对每个像素进行如下变换:X'=RX,Transform each pixel as follows: X'=RX,
    其中,X为原始图像的像素坐标,X’为稳定后的图像的像素坐标。Among them, X is the pixel coordinates of the original image, and X' is the pixel coordinates of the stabilized image.
  11. 根据权利要求10所述的一种投影画面防抖方法,其特征在于,所述旋转矩阵
    Figure PCTCN2021098494-appb-100010
    其中Δa,Δb,Δc和Δd为差异值Δq的四个分量。
    The anti-shake method of a projection image according to claim 10, wherein the rotation matrix
    Figure PCTCN2021098494-appb-100010
    where Δa, Δb, Δc and Δd are the four components of the difference value Δq.
  12. 根据权利要求1所述的一种投影画面防抖方法,其特征在于,所述目标 三维姿态为投影仪稳定状态下的三维姿态,所述第二四元数Q在所述投影仪放置好后计算得到。The anti-shake method of a projection image according to claim 1, wherein the three-dimensional posture of the target is the three-dimensional posture of the projector in a stable state, and the second quaternion Q is after the projector is placed Calculated.
  13. 根据权利要求1所述的一种投影画面防抖方法,其特征在于,在所述根据所述补偿量,对每个像素重映射得到稳定后的图像之后,还包括:The anti-shake method for projection images according to claim 1, characterized in that, after obtaining a stabilized image by remapping each pixel according to the compensation amount, the method further comprises:
    对投影画面进行裁剪,并对裁剪后的投影画面缩放至目标显示尺寸。Crop the projected image and scale the cropped projected image to the target display size.
  14. 根据权利要求1所述的一种投影画面防抖方法,其特征在于,所述陀螺仪安装在与光机机体的结构连接处。The anti-shake method of a projection image according to claim 1, wherein the gyroscope is installed at a structural connection with the optical machine body.
  15. 一种投影画面防抖装置,其特征在于,包括:A projection image stabilization device, characterized in that it includes:
    陀螺仪数据采集模块,用于采集陀螺仪数据;The gyroscope data acquisition module is used to collect gyroscope data;
    旋转角度计算模块,用于根据所述陀螺仪数据,计算旋转角度;a rotation angle calculation module for calculating the rotation angle according to the gyroscope data;
    第一四元数转换模块,用于将所述旋转角度转换成第一四元数q;a first quaternion conversion module for converting the rotation angle into a first quaternion q;
    差异值计算模块,用于计算所述第一四元数q与第二四元数Q的差异值Δq,所述第二四元数Q用于反映目标三维姿态;a difference value calculation module, configured to calculate the difference value Δq between the first quaternion q and the second quaternion Q, and the second quaternion Q is used to reflect the three-dimensional attitude of the target;
    稳定图像变换模块,用于根据所述差异值Δq,对每个像素重映射得到稳定后的图像。The stabilized image transformation module is configured to remap each pixel to obtain a stabilized image according to the difference value Δq.
  16. 根据权利要求15所述的一种投影画面防抖装置,其特征在于,还包括:A projection image stabilization device according to claim 15, further comprising:
    第二四元数设定模块,用于计算第二四元数Q。The second quaternion setting module is used to calculate the second quaternion Q.
  17. 根据权利要求15所述的一种投影画面防抖装置,其特征在于,还包括:A projection image stabilization device according to claim 15, further comprising:
    画面调整模块,用于对投影画面进行裁剪,并对裁剪后的投影画面缩放至目标显示尺寸。The picture adjustment module is used for cropping the projection picture and scaling the cropped projection picture to the target display size.
  18. 一种投影设备,其特征在于,所述投影设备包括处理器和存储器,所述存储器中存储有至少一条程序代码,所述至少一条程序代码由所述处理器加载并执行,以实现如权利要求1-14中任一项所述的投影画面防抖方法。A projection device, characterized in that the projection device includes a processor and a memory, and the memory stores at least one piece of program code, and the at least one piece of program code is loaded and executed by the processor, so as to realize the method as claimed in the claims. The anti-shake method for a projection screen according to any one of 1-14.
  19. 一种存储介质,其特征在于,所述存储介质中存储有至少一条程序代码,所述至少一条程序代码由处理器加载并执行,以实现如权利要求1-14中任一项所述的投影画面防抖方法。A storage medium, characterized in that, at least one piece of program code is stored in the storage medium, and the at least one piece of program code is loaded and executed by a processor to realize the projection according to any one of claims 1-14 Image stabilization method.
PCT/CN2021/098494 2020-12-09 2021-06-05 Projection picture anti-shake method and apparatus, projection device, and storage medium WO2022121260A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011427165.9A CN112565725B (en) 2020-12-09 2020-12-09 Projection picture anti-shake method and device, projection equipment and storage medium
CN202011427165.9 2020-12-09

Publications (1)

Publication Number Publication Date
WO2022121260A1 true WO2022121260A1 (en) 2022-06-16

Family

ID=75060104

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/098494 WO2022121260A1 (en) 2020-12-09 2021-06-05 Projection picture anti-shake method and apparatus, projection device, and storage medium

Country Status (2)

Country Link
CN (1) CN112565725B (en)
WO (1) WO2022121260A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112565725B (en) * 2020-12-09 2022-09-13 成都极米科技股份有限公司 Projection picture anti-shake method and device, projection equipment and storage medium
CN115704737B (en) * 2021-08-03 2024-04-23 宜宾市极米光电有限公司 Method and related device for measuring shaking amount of projection picture of projector
CN115278183B (en) * 2022-06-23 2023-03-14 广州市恒众车联网科技股份有限公司 HUD picture display method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102297693A (en) * 2010-06-24 2011-12-28 鼎亿数码科技(上海)有限公司 Method for measuring position and azimuths of object
US20190158813A1 (en) * 2016-06-10 2019-05-23 Lucid VR, Inc. Real Time Re-Calibration of Stereo Cameras
CN110708465A (en) * 2019-10-21 2020-01-17 厦门美图之家科技有限公司 Video jitter correction method and device, readable storage medium and electronic equipment
EP3657441A1 (en) * 2018-11-26 2020-05-27 Connaught Electronics Ltd. Method for determining a mounting height of a camera by determining a motion vector, computer program product, electronic computing device, as well as camera
CN112565725A (en) * 2020-12-09 2021-03-26 成都极米科技股份有限公司 Projection picture anti-shake method and device, projection equipment and storage medium

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2666419B1 (en) * 1990-08-31 1993-02-19 Elf Aquitaine METHOD FOR TRANSMITTING WELL DRILLING DATA FROM BOTTOM TO SURFACE.
JP3739846B2 (en) * 1995-12-28 2006-01-25 株式会社キクチ科学研究所 Projector ceiling mount
JP2006133401A (en) * 2004-11-04 2006-05-25 Olympus Corp Projector and its light reducing method
JP4708765B2 (en) * 2004-11-10 2011-06-22 キヤノン株式会社 Projection type image display device
CN101221348A (en) * 2007-12-25 2008-07-16 方恒 Automatic positioning equipment for projection film
JP5354168B2 (en) * 2009-01-13 2013-11-27 セイコーエプソン株式会社 Projector and control method
JP2012047850A (en) * 2010-08-25 2012-03-08 Canon Inc Projection type display device
US8872081B2 (en) * 2011-11-01 2014-10-28 Ge Aviation Systems Llc Methods for adjusting a relative navigation system
CN104639922A (en) * 2015-02-06 2015-05-20 陈思源 Digital projection device capable of realizing ultra-definition replay
CN109540126B (en) * 2018-12-03 2020-06-30 哈尔滨工业大学 Inertial vision integrated navigation method based on optical flow method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102297693A (en) * 2010-06-24 2011-12-28 鼎亿数码科技(上海)有限公司 Method for measuring position and azimuths of object
US20190158813A1 (en) * 2016-06-10 2019-05-23 Lucid VR, Inc. Real Time Re-Calibration of Stereo Cameras
EP3657441A1 (en) * 2018-11-26 2020-05-27 Connaught Electronics Ltd. Method for determining a mounting height of a camera by determining a motion vector, computer program product, electronic computing device, as well as camera
CN110708465A (en) * 2019-10-21 2020-01-17 厦门美图之家科技有限公司 Video jitter correction method and device, readable storage medium and electronic equipment
CN112565725A (en) * 2020-12-09 2021-03-26 成都极米科技股份有限公司 Projection picture anti-shake method and device, projection equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"Fundamentals of Robot Control Technology. Design and Implementation of Quadcopter based on Arduino", 30 April 2017, ISBN: 7-118-11007-8, article XU, ZHENPING: "Quaternions and Rotation Matrices", pages: 192 - 199, XP009538184 *

Also Published As

Publication number Publication date
CN112565725A (en) 2021-03-26
CN112565725B (en) 2022-09-13

Similar Documents

Publication Publication Date Title
WO2022121260A1 (en) Projection picture anti-shake method and apparatus, projection device, and storage medium
KR102526794B1 (en) Camera module, solid-state imaging device, electronic device, and imaging method
US10027893B2 (en) Real-time video stabilization for mobile devices based on on-board motion sensing
WO2017020150A1 (en) Image processing method, device and camera
JP3450833B2 (en) Image processing apparatus and method, program code, and storage medium
WO2015081870A1 (en) Image processing method, device and terminal
US20110234750A1 (en) Capturing Two or More Images to Form a Panoramic Image
WO2020253207A1 (en) Projection picture anti-shake method and apparatus, and projector
EP3296952B1 (en) Method and device for blurring a virtual object in a video
US8264589B2 (en) Display control apparatus, method of controlling display apparatus, and storage medium
CN109690568A (en) A kind of processing method and mobile device
US20150207988A1 (en) Interactive panoramic photography based on combined visual and inertial orientation tracking
TWI700000B (en) Image stabilization method and apparatus for panoramic video, and method for evaluating image stabilization algorithm
US10447926B1 (en) Motion estimation based video compression and encoding
WO2020125130A1 (en) Panoramic video anti-shake method and portable terminal
WO2020125132A1 (en) Panoramic video anti-shake method and portable terminal
US11657477B2 (en) Image processing device, image processing system, imaging device, image processing method, and recording medium storing program code
WO2023241495A1 (en) Photographic method and apparatus
US11128814B2 (en) Image processing apparatus, image capturing apparatus, video reproducing system, method and program
US11614627B2 (en) Image processing apparatus, head-mounted display, and image displaying method
WO2022041013A1 (en) Control method, handheld gimbal, system, and computer readable storage medium
CN110415329B (en) Three-dimensional modeling device and calibration method applied to same
JP2020167657A (en) Image processing apparatus, head-mounted display, and image display method
EP4354383A1 (en) Image processing apparatus, image processing system, imaging apparatus, image processing method
CN115278086B (en) Electronic anti-shake method for gyroscope

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21901973

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21901973

Country of ref document: EP

Kind code of ref document: A1