CN117793317A - A multi-sensor Kalman fusion dynamic projection method and device for special-shaped surfaces - Google Patents
A multi-sensor Kalman fusion dynamic projection method and device for special-shaped surfaces Download PDFInfo
- Publication number
- CN117793317A CN117793317A CN202410018655.5A CN202410018655A CN117793317A CN 117793317 A CN117793317 A CN 117793317A CN 202410018655 A CN202410018655 A CN 202410018655A CN 117793317 A CN117793317 A CN 117793317A
- Authority
- CN
- China
- Prior art keywords
- special
- real
- pose information
- shaped surface
- projector
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 39
- 230000004927 fusion Effects 0.000 title claims abstract description 31
- 230000000007 visual effect Effects 0.000 claims abstract description 33
- 230000001788 irregular Effects 0.000 claims description 40
- 238000004364 calculation method Methods 0.000 claims description 11
- 238000001914 filtration Methods 0.000 claims description 7
- 238000005286 illumination Methods 0.000 abstract 1
- 239000011159 matrix material Substances 0.000 description 40
- 238000013519 translation Methods 0.000 description 13
- 238000004422 calculation algorithm Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 239000013256 coordination polymer Substances 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 238000000605 extraction Methods 0.000 description 3
- 238000005259 measurement Methods 0.000 description 3
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 2
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 2
- 230000002146 bilateral effect Effects 0.000 description 2
- 238000012937 correction Methods 0.000 description 2
- 230000001186 cumulative effect Effects 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 238000003384 imaging method Methods 0.000 description 2
- 238000007500 overflow downdraw method Methods 0.000 description 2
- 238000005295 random walk Methods 0.000 description 2
- 230000009466 transformation Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 239000002131 composite material Substances 0.000 description 1
- 238000000354 decomposition reaction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000009977 dual effect Effects 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Landscapes
- Navigation (AREA)
Abstract
Description
技术领域Technical field
本发明属于动态投影技术领域,尤其涉及一种多传感器卡尔曼融合的异形面动态投影方法和装置。The invention belongs to the field of dynamic projection technology, and in particular relates to a multi-sensor Kalman fusion dynamic projection method and device for special-shaped surfaces.
背景技术Background technique
动态投影在文旅演出、展览展示中有着广泛的应用前景。目前,常见的投影展示方式为投影仪静止,投影面为平面幕、弧形幕等规则幕的投影方式。动态投影指投影仪位置固定不动,投影面运动,动态投影使文旅演出、展览展示等节目创作更灵活,给观众带来更震撼的观看体验。Dynamic projection has broad application prospects in cultural tourism performances and exhibition displays. At present, the common projection display method is that the projector is stationary and the projection surface is a regular screen such as a flat screen or a curved screen. Dynamic projection means that the position of the projector is fixed and the projection surface moves. Dynamic projection makes the creation of cultural and tourism performances, exhibitions and other programs more flexible, giving the audience a more shocking viewing experience.
动态投影时,异形投影面位置改变,因此需要实时获取投影面的位姿信息。另外,异形面表面凹凸不平,不能采用规则幕投影时的单应变换实现投影几何校正,异形面投影相比规则幕(平面幕、弧形幕等)投影,难度大幅增加。同时,当光照条件变化剧烈时,异形面实时位姿有可能会获取失败。During dynamic projection, the position of the special-shaped projection surface changes, so it is necessary to obtain the pose information of the projection surface in real time. In addition, the surface of the special-shaped surface is uneven, and the homography transformation used in regular screen projection cannot be used to achieve projection geometric correction. Compared with the projection of regular screens (flat screens, curved screens, etc.), special-shaped surface projection is significantly more difficult. At the same time, when the lighting conditions change drastically, the real-time pose of the special-shaped surface may fail to be obtained.
发明内容Contents of the invention
本发明要解决的技术问题是,提供一种多传感器卡尔曼融合的异形面动态投影方法和装置。The technical problem to be solved by the present invention is to provide a method and device for dynamic projection of irregular surfaces by multi-sensor Kalman fusion.
为实现上述目的,本发明采用如下的技术方案:In order to achieve the above objects, the present invention adopts the following technical solutions:
一种多传感器卡尔曼融合的异形面动态投影方法,包括:A multi-sensor Kalman fusion dynamic projection method of special-shaped surfaces, including:
获取视觉异形面实时位姿信息和惯性定位异形面实时位姿信息;Obtain real-time position and posture information of visual profiled surfaces and real-time position and posture information of inertial positioning profiled surfaces;
融合视觉异形面实时位姿信息和惯性定位异形面实时位姿信息,得到融合位姿信息;Fusion of the real-time pose information of the visual irregular surface and the real-time pose information of the inertial positioning irregular surface to obtain the fused pose information;
根据融合位姿信息,计算得到投影仪图像;Based on the fused pose information, the projector image is calculated;
投影仪投射出投影仪图像,实现异形面动态投影。The projector projects the projector image to realize dynamic projection of special-shaped surfaces.
作为优选,利用误差状态卡尔曼滤波融合视觉异形面实时位姿信息和惯性定位异形面实时位姿信息。As a preferred option, the error state Kalman filter is used to fuse the real-time pose information of the visual irregular surface and the real-time pose information of the inertial positioning irregular surface.
作为优选,根据异形面表面稠密点云、投影仪内外参数和融合位姿信息,计算得到投影仪图像。As a preferred method, the projector image is calculated based on the dense point cloud on the surface of the special-shaped surface, the internal and external parameters of the projector, and the fused pose information.
作为优选,通过照相机实时拍摄异形面图像,得到视觉异形面实时位姿信息;对惯性定位系统和异形面进行刚性固定,并对惯性定位系统进行标定,得到惯性定位异形面实时位姿信息。As an option, the camera takes real-time images of the special-shaped surface to obtain real-time pose information of the visual special-shaped surface; rigidly fix the inertial positioning system and the special-shaped surface, and calibrate the inertial positioning system to obtain real-time pose information of the inertial positioning special-shaped surface.
本发明还提供一种多传感器卡尔曼融合的异形面动态投影装置,包括:The invention also provides a multi-sensor Kalman fusion special-shaped surface dynamic projection device, including:
获取模块,用于获取视觉异形面实时位姿信息和惯性定位异形面实时位姿信息;The acquisition module is used to obtain the real-time pose information of the visual irregular surface and the real-time pose information of the inertial positioning irregular surface;
融合模块,用于融合视觉异形面实时位姿信息和惯性定位异形面实时位姿信息,得到融合位姿信息;The fusion module is used to fuse the real-time pose information of the visual irregular surface and the real-time pose information of the inertial positioning irregular surface to obtain the fused pose information;
计算模块,用于根据融合位姿信息,计算得到投影仪图像;The calculation module is used to calculate the projector image based on the fused pose information;
投影模块,用于投影仪投射出投影仪图像,实现异形面动态投影。The projection module is used for projecting a projector image to realize dynamic projection of special-shaped surfaces.
作为优选,融合模块利用误差状态卡尔曼滤波融合视觉异形面实时位姿信息和惯性定位异形面实时位姿信息。Preferably, the fusion module utilizes error state Kalman filtering to fuse the real-time pose information of the visual profiled surface and the real-time pose information of the inertial positioning profiled surface.
作为优选,计算模块根据异形面表面稠密点云、投影仪内外参数和融合位姿信息,计算得到投影仪图像。As an option, the calculation module calculates the projector image based on the dense point cloud on the surface of the special-shaped surface, the internal and external parameters of the projector, and the fused pose information.
作为优选,获取模块通过照相机实时拍摄异形面图像,得到视觉异形面实时位姿信息;获取模块对惯性定位系统和异形面进行刚性固定,并对惯性定位系统进行标定,得到惯性定位异形面实时位姿信息。As an option, the acquisition module takes real-time images of the special-shaped surface through a camera to obtain real-time pose information of the visual special-shaped surface; the acquisition module rigidly fixes the inertial positioning system and the special-shaped surface, and calibrates the inertial positioning system to obtain the real-time position of the inertial positioning special-shaped surface. posture information.
本发明获取视觉异形面实时位姿信息和惯性定位异形面实时位姿信息;融合视觉异形面实时位姿信息和惯性定位异形面实时位姿信息,得到融合位姿信息;根据融合位姿信息,计算得到投影仪图像;投影仪投射出投影仪图像,实现异形面动态投影。采用本发明的技术方案,容易实现异形面投影;同时当光照条件变化剧烈时,容易获取异形面实时位姿。This invention obtains the real-time pose information of the visual irregular surface and the real-time pose information of the inertial positioning irregular surface; fuses the real-time pose information of the visual irregular surface and the real-time pose information of the inertial positioning irregular surface to obtain the fused pose information; according to the fused pose information, The projector image is calculated; the projector projects the projector image to realize dynamic projection of special-shaped surfaces. Using the technical solution of the present invention, it is easy to realize the projection of the special-shaped surface; at the same time, when the lighting conditions change drastically, it is easy to obtain the real-time pose of the special-shaped surface.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are only These are embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on the provided drawings without exerting creative efforts.
图1为本发明实施例一种多传感器卡尔曼融合的异形面动态投影方法的流程图;FIG1 is a flow chart of a method for dynamic projection of a profiled surface using multi-sensor Kalman fusion according to an embodiment of the present invention;
图2为本发明实施例另一种多传感器卡尔曼融合的异形面动态投影方法的流程图;Figure 2 is a flow chart of another multi-sensor Kalman fusion dynamic projection method of irregular surfaces according to an embodiment of the present invention;
图3为本发明实施例多传感器卡尔曼融合的异形面动态投影系统图的结构示意图;Figure 3 is a schematic structural diagram of a special-shaped surface dynamic projection system diagram of multi-sensor Kalman fusion according to an embodiment of the present invention;
图4为投影仪-照相机系统标定硬件配置图;Figure 4 is a projector-camera system calibration hardware configuration diagram;
图5为三维重建原理示意图;FIG5 is a schematic diagram of the principle of three-dimensional reconstruction;
图6为惯性定位系统的示意图。Figure 6 is a schematic diagram of the inertial positioning system.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.
为使本发明的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本发明作进一步详细的说明。In order to make the above objects, features and advantages of the present invention more obvious and understandable, the present invention will be described in further detail below with reference to the accompanying drawings and specific embodiments.
实施例1:Example 1:
如图1所示,本发明实施例提供一种多传感器卡尔曼融合的异形面动态投影方法,包括:As shown in FIG1 , an embodiment of the present invention provides a multi-sensor Kalman fusion method for dynamic projection of a profiled surface, comprising:
获取视觉异形面实时位姿信息和惯性定位异形面实时位姿信息;Obtain real-time position and posture information of visual profiled surfaces and real-time position and posture information of inertial positioning profiled surfaces;
融合视觉异形面实时位姿信息和惯性定位异形面实时位姿信息,得到融合位姿信息;Fusion of the real-time pose information of the visual irregular surface and the real-time pose information of the inertial positioning irregular surface to obtain the fused pose information;
根据融合位姿信息,计算得到投影仪图像;Based on the fused pose information, the projector image is calculated;
投影仪投射出投影仪图像,实现异形面动态投影。The projector projects the projector image to realize dynamic projection of special-shaped surfaces.
作为本发明实施例的一种实施方式,利用误差状态卡尔曼滤波融合视觉异形面实时位姿信息和惯性定位异形面实时位姿信息。As an implementation method of the embodiment of the present invention, the error state Kalman filter is used to fuse the real-time pose information of the visual irregular surface and the real-time pose information of the inertial positioning irregular surface.
作为本发明实施例的一种实施方式,根据异形面表面稠密点云、投影仪内外参数和融合位姿信息,计算得到投影仪图像。As an implementation method of the embodiment of the present invention, the projector image is calculated based on the dense point cloud on the surface of the special-shaped surface, the internal and external parameters of the projector, and the fused pose information.
作为本发明实施例的一种实施方式,通过照相机实时拍摄异形面图像,得到视觉异形面实时位姿信息;对惯性定位系统和异形面进行刚性固定,并对惯性定位系统进行标定,得到惯性定位异形面实时位姿信息。As an implementation method of the embodiment of the present invention, a camera is used to capture the image of the special-shaped surface in real time to obtain the real-time pose information of the visual special-shaped surface; the inertial positioning system and the special-shaped surface are rigidly fixed, and the inertial positioning system is calibrated to obtain the inertial positioning Real-time pose information of special-shaped surfaces.
实施例2:Example 2:
如图2、3所示,本发明实施例提供一种多传感器卡尔曼融合的异形面动态投影方法,包括:As shown in FIGS. 2 and 3 , an embodiment of the present invention provides a multi-sensor Kalman fusion method for dynamic projection of a profiled surface, comprising:
步骤S1、对投影仪和照相机进行刚性固定,得到照相机内、外参数和投影仪内、外参数;Step S1: Rigidly fix the projector and camera to obtain the internal and external parameters of the camera and the internal and external parameters of the projector;
步骤S2、投影仪投射一组结构光图像,照相机拍摄得到被异形面调制后的结构光图像;Step S2: The projector projects a set of structured light images, and the camera captures the structured light image modulated by the special-shaped surface;
步骤S3、获取异形面表面稠密点云;Step S3: Obtain the dense point cloud on the surface of the special-shaped surface;
步骤S4、照相机实时拍摄异形面图像,得到视觉异形面实时位姿信息;Step S4: The camera captures images of the special-shaped surface in real time to obtain real-time pose information of the visual special-shaped surface;
步骤S5、对惯性定位系统和异形面进行刚性固定,并对惯性定位系统进行标定,得到惯性定位异形面实时位姿信息;Step S5: Rigidly fix the inertial positioning system and the special-shaped surface, and calibrate the inertial positioning system to obtain real-time pose information of the inertial positioning special-shaped surface;
步骤S6、利用误差状态卡尔曼滤波融合视觉异形面实时位姿信息和惯性定位异形面实时位姿信息,得到融合位姿信息;Step S6: Use the error state Kalman filter to fuse the real-time pose information of the visual irregular surface and the real-time pose information of the inertial positioning irregular surface to obtain the fused pose information;
步骤S7、根据异形面表面稠密点云、投影仪内外参数和融合位姿信息,计算得到投影仪图像;Step S7: Calculate the projector image based on the dense point cloud on the surface of the special-shaped surface, the internal and external parameters of the projector, and the fused pose information;
步骤S8、投影仪投射出投影仪图像,实现异形面动态投影。Step S8: The projector projects the projector image to realize dynamic projection of the special-shaped surface.
作为本发明实施例的一种实施方式,步骤S1中,如图4所示,投影仪-照相机系统标定包括照相机和投影仪的内参数标定以及投影仪相对投影幕的位姿(或称为投影仪外参)标定。投影仪内参、外参标定是投影几何校正的基础,内参标定是外参标定的基础。投影仪不具备主动获取图像的能力,因此需要借助照相机来实现内、外参标定。As an implementation method of the embodiment of the present invention, in step S1, as shown in Figure 4, the calibration of the projector-camera system includes the calibration of the internal parameters of the camera and the projector and the posture of the projector relative to the projection screen (or called projection instrument external parameters) calibration. Calibration of internal and external parameters of the projector is the basis of projection geometric correction, and calibration of internal parameters is the basis of calibration of external parameters. The projector does not have the ability to actively acquire images, so a camera is needed to achieve internal and external parameter calibration.
如图3所示,对投影仪和照相机进行刚性固定,组成投影仪-照相机系统,将投影仪-照相机系统朝向贴有棋盘格图片的空间参考平面,并调整投影仪-照相机系统角度,使得投影区域与棋盘格图片不重叠且照相机视场能完全覆盖投影区域和棋盘格图片,进行照相机标定时,投影仪处于关闭状态,通过照相机拍摄棋盘格图片并进行标定,得到照相机内参数矩阵Kc和照相机外参数的旋转矩阵Rc、平移矩阵Tc。As shown in Fig. 3, the projector and the camera are rigidly fixed to form a projector-camera system. The projector-camera system is oriented toward the spatial reference plane with the checkerboard image attached, and the angle of the projector-camera system is adjusted so that the projection area does not overlap with the checkerboard image and the camera field of view can completely cover the projection area and the checkerboard image. When calibrating the camera, the projector is turned off, and the checkerboard image is photographed and calibrated by the camera to obtain the camera intrinsic parameter matrix Kc and the rotation matrix Rc and translation matrix Tc of the camera extrinsic parameters.
照相机外参数的旋转矩阵Rc的获取过程为:旋转矩阵是三个基本旋转的序列复合,关于右手笛卡尔坐标系的x,y,z轴的旋转分别叫做Rx,Ry,Rz。Rx可定义为θ即为绕x轴旋转的角度。同理可得Ry,Rz,将三个基本旋转相乘即为旋转矩阵Rc。The process of obtaining the rotation matrix R c of the camera's external parameters is as follows: the rotation matrix is a sequence composite of three basic rotations. The rotations about the x, y, and z axes of the right-handed Cartesian coordinate system are called R x , R y , and R z respectively. R x can be defined as θ is the angle of rotation around the x-axis. In the same way, R y and R z can be obtained, and the rotation matrix R c is obtained by multiplying the three basic rotations.
照相机外参数的平移矩阵Tc的获取过程为:平移矩阵Tc为分别沿着右手笛卡尔坐标系x,y,z轴的平移距离,tx为沿着x轴正方向平移的距离,所以平移矩阵Tc可表示为 The process of obtaining the translation matrix T c of the camera's external parameters is as follows: the translation matrix T c is the translation distance along the x, y, and z axes of the right-hand Cartesian coordinate system, and t x is the translation distance along the positive direction of the x axis, so The translation matrix T c can be expressed as
在已知三维空间点Xw与二维图像点xw对应关系的条件下,求取照相机内、外参数Kc、Rc和Tc的值,计算公式为:Under the condition that the corresponding relationship between the three-dimensional space point X w and the two-dimensional image point x w is known, the values of the internal and external parameters K c , R c and T c of the camera are obtained. The calculation formula is:
xw=PXw=Kc[Rc|Tc]Xw x w =PX w =K c [R c |T c ]X w
使用定制的棋盘格标定板对照相机进行标定,标定板上的棋盘格尺寸可以通过测量获得,其对应的二维图像坐标可通过图像角点提取的方法获得。The camera is calibrated using a customized checkerboard calibration plate. The size of the checkerboard on the calibration plate can be obtained by measurement, and its corresponding two-dimensional image coordinates can be obtained by extracting image corner points.
在获得照相机内参后,根据已知三维空间点Xw与二维图像点xw的对应关系,使用线性或者非线性算法,得到照相机外参数。After obtaining the internal parameters of the camera, based on the corresponding relationship between the known three-dimensional space point X w and the two-dimensional image point x w , a linear or nonlinear algorithm is used to obtain the camera external parameters.
投影仪可看作照相机的对偶系统,并使用与照相机相同的成像模型进行标定,但是由于投影仪没有主动获取图像的能力,因此需要借助已标定好的照相机对投影仪进行标定。照相机标定时,世界坐标系下三维空间点与图像坐标系下二维坐标点的对应关系分别通过人工测量和识别特征点来实现。在投影仪系统中,图像坐标系下二维坐标点仿照照相机方法,采用识别特征点的方法来提取,但投射到空间中的三维点位置难以测量,因此令投影仪与照相机关联,利用照相机的空间测量能力间接标定投影仪。The projector can be regarded as a dual system of the camera and is calibrated using the same imaging model as the camera. However, since the projector does not have the ability to actively acquire images, it is necessary to calibrate the projector with the help of a calibrated camera. When calibrating the camera, the correspondence between the three-dimensional space points in the world coordinate system and the two-dimensional coordinate points in the image coordinate system is achieved through manual measurement and feature point identification. In the projector system, the two-dimensional coordinate points in the image coordinate system are extracted by identifying feature points in the same way as the camera method, but the position of the three-dimensional points projected into space is difficult to measure. Therefore, the projector is associated with the camera, and the spatial measurement capability of the camera is used to indirectly calibrate the projector.
照相机完成标定后,将粘贴在空间参考平面上的棋盘格图片撤下,然后开启投影仪,投射棋盘格图片。设棋盘格图片的角点在投影仪成像面中的二维坐标为xw,其在空间参考平面上对应的三维空间点为Xw,照相机拍摄得到的此点二维图像坐标为xc。xw和xc可以通过图像角点提取方法获得,Xw依靠已标定的照相机计算获取。After the camera is calibrated, remove the checkerboard image pasted on the spatial reference plane, then turn on the projector to project the checkerboard image. Assume that the two-dimensional coordinates of the corner point of the checkerboard image in the imaging plane of the projector are x w , its corresponding three-dimensional space point on the spatial reference plane is X w , and the coordinates of the two-dimensional image captured by the camera are x c . x w and x c can be obtained through the image corner point extraction method, and X w is calculated and obtained by relying on the calibrated camera.
由于建立了投影仪图像二维坐标点xw与其对应的三维空间点Xw的对应关系,故可使用照相机标定方法对投影仪进行标定,获得投影仪的内、外参数Kp、Rp和Tp。标定投影仪后,进一步计算得到投影仪图像坐标与照相机图像坐标之间的映射关系,设同一空间点Xw在照相机和投影仪坐标系下的三维坐标分别为Xc和Xp,它们之间的坐标变换关系可用下式表述:Since the corresponding relationship between the two-dimensional coordinate point xw of the projector image and its corresponding three-dimensional space point Xw is established, the camera calibration method can be used to calibrate the projector to obtain the intrinsic and extrinsic parameters Kp , Rp and Tp of the projector. After the projector is calibrated, the mapping relationship between the projector image coordinates and the camera image coordinates is further calculated. Assuming that the three-dimensional coordinates of the same space point Xw in the camera and projector coordinate systems are Xc and Xp respectively, the coordinate transformation relationship between them can be expressed as follows:
消去上述方程组中的Xw,可得:Eliminating X w in the above system of equations, we can get:
XC=RCPXP+TCP X C =R CP X P +T CP
其中:RCP=RCRP -1;TCP=TC-RCRP -1TP。Among them: R CP =R C R P -1 ; T CP = TC -R C R P -1 T P .
作为本发明实施例的一种实施方式,步骤S2中,采用基于结构光的主动视觉方法,投影仪投射一组格雷码编码结构光图像到异形面;照相机拍摄被异形面调制后的结构光图像。As an implementation of an embodiment of the present invention, in step S2, an active vision method based on structured light is adopted, and a projector projects a set of Gray code encoded structured light images onto the profiled surface; and a camera captures the structured light image modulated by the profiled surface.
作为本发明实施例的一种实施方式,步骤S3中,根据投影仪投射的结构光图像、照相机拍摄到的调制后的结构光图像、投影仪-照相机系统的内外参数矩阵,计算异形面表面三维点的坐标P,获取异形面表面稠密点云,如图5所示。As an implementation method of the embodiment of the present invention, in step S3, the three-dimensional surface of the special-shaped surface is calculated based on the structured light image projected by the projector, the modulated structured light image captured by the camera, and the internal and external parameter matrix of the projector-camera system. The coordinate P of the point is used to obtain a dense point cloud on the surface of the special-shaped surface, as shown in Figure 5.
对照相机拍摄得到的被异形面调制后的结构光图像进行格雷码解码,得到结构光图像和被异形面调制后的结构光图像的对应关系,如图4所示,PL为投影仪投射的结构光图像像素,PR为照相机拍摄的调制后的结构光图像对应的像素,P为投影仪投射的结构光图像投射在异形面上的世界坐标系下的点。已知PL、PR投影仪内外参和照相机内外参,求P:The structured light image modulated by the profiled surface taken by the camera is decoded by Gray code to obtain the correspondence between the structured light image and the structured light image modulated by the profiled surface, as shown in Figure 4. PL is the pixel of the structured light image projected by the projector, PR is the pixel corresponding to the modulated structured light image taken by the camera, and P is the point in the world coordinate system where the structured light image projected by the projector is projected on the profiled surface. Given the internal and external parameters of the projector PL and PR and the internal and external parameters of the camera, calculate P:
其中(X,Y,Z)为点P的三维坐标,即要求解的异形面点云的坐标;Kc为照相机内参矩阵;Rc、Tc为照相机外参矩阵;Kp为投影仪内参矩阵;Rp、Tp为投影仪外参矩阵;(up,vp)为投影仪像素PL的坐标,(uc,vc)为照相机像素PR的坐标。Among them (X, Y, Z) are the three-dimensional coordinates of point P, that is, the coordinates of the special-shaped surface point cloud to be solved; K c is the internal parameter matrix of the camera; R c and T c are the external parameter matrices of the camera; K p is the internal parameter of the projector matrix; R p and T p are the external parameter matrices of the projector; (up , v p ) are the coordinates of the projector pixel P L , and ( uc , v c ) are the coordinates of the camera pixel P R.
作为本发明实施例的一种实施方式,步骤S4中,本发明实施例采用SURF算法进行特征点提取,SURF算法对边缘和弱纹理的地方能够进行更准确地特征点提取,SURF算法提取出的特征点更分散,有利于后续计算异形面位姿信息。As an implementation mode of the embodiment of the present invention, in step S4, the embodiment of the present invention uses the SURF algorithm to extract feature points. The SURF algorithm can more accurately extract feature points on edges and weak textures. The SURF algorithm extracts The feature points are more dispersed, which is beneficial to subsequent calculation of special-shaped surface pose information.
在完成特征点提取后,然后采用FLANN特征点匹配方法进行特征点匹配,得到匹配点对,FLANN匹配算法运算速度快。After the feature point extraction is completed, the FLANN feature point matching method is then used to match the feature points to obtain matching point pairs. The FLANN matching algorithm is fast in operation.
设得到的匹配点对为p1、p2,照相机内参矩阵为Kc,采用对极约束,求出异形面相对前一时刻的旋转矩阵Rx和平移矩阵tx,利用矩阵分解:Assume that the obtained matching point pair is p1 and p2, and the camera internal parameter matrix is K c . Using epipolar constraints, find the rotation matrix R x and translation matrix t x of the special-shaped surface relative to the previous moment, and use matrix decomposition:
求出基础矩阵(Fundamental Matrix)F:Find the fundamental matrix (Fundamental Matrix) F:
已知照相机内参矩阵Kc,进一步求出本质矩阵(Essential Matrix)E:Given the camera internal parameter matrix K c , further find the essential matrix (Essential Matrix) E:
采用八点法求出当前时刻异形面旋转矩阵Rx和平移矩阵tx,得到视觉异形面实时位姿信息。The eight-point method is used to calculate the rotation matrix R x and translation matrix t x of the irregular surface at the current moment, and obtain the real-time pose information of the visual irregular surface.
由于光照等因素的影响,相机拍摄得到的图像含有噪声。对相机采集得到的图像进行预处理,可以提高图像特征点匹配的精度。本实施例采用高斯双边滤波去噪:Due to the influence of lighting and other factors, the images captured by the camera contain noise. Preprocessing the images collected by the camera can improve the accuracy of image feature point matching. This embodiment uses Gaussian bilateral filtering to denoise:
其中:in:
其中,x为当前点位置;y为s*s区域内点;Ix、Iy为当前点的像素值;Gσd为空间邻域关系函数;‖x-y‖为空间距离;Gσr为灰度值相似关系函数;σd、σr为高斯标准差。Among them, x is the current point position; y is the point in the s*s area; I x and I y are the pixel values of the current point; G σd is the spatial neighborhood relationship function; ‖x-y‖ is the spatial distance; G σr is Gray value similarity relationship function; σ d and σ r are Gaussian standard deviations.
高斯双边滤波后的图像,特征点具备鲁棒性,有利于相邻时刻相机图像的特征点提取与匹配。The feature points of images after Gaussian bilateral filtering are robust, which is conducive to feature point extraction and matching of camera images at adjacent moments.
作为本发明实施例的一种实施方式,步骤S5中,惯性定位系统集成陀螺仪、加速度计、编码器等多种传感器,惯性定位系统上电之后,自动初始化,会以自身中心为坐标原点,如图6所示的x方向、y方向来获取坐标。惯性定位系统的坐标系被定义为一个绝对坐标系,惯性定位系统一旦被安装到异形面上,在惯性定位系统上电后,这个坐标系就确定了。由于惯性定位系统支持实时更新角度和坐标,因此每次数据更新,惯性定位系统的坐标系会随之改变。As an implementation method of an embodiment of the present invention, in step S5, the inertial positioning system integrates multiple sensors such as gyroscopes, accelerometers, encoders, etc. After the inertial positioning system is powered on, it is automatically initialized and uses its own center as the coordinate origin to obtain coordinates in the x-direction and y-direction as shown in Figure 6. The coordinate system of the inertial positioning system is defined as an absolute coordinate system. Once the inertial positioning system is installed on the special-shaped surface, this coordinate system is determined after the inertial positioning system is powered on. Since the inertial positioning system supports real-time updating of angles and coordinates, the coordinate system of the inertial positioning system will change each time the data is updated.
由于惯性定位系统的坐标系和照相机的坐标系是不重合的,所以在使用前需要先进行惯性定位系统和异形面的标定,标定的计算表达式如下:Since the coordinate system of the inertial positioning system and the coordinate system of the camera do not coincide, the inertial positioning system and the profiled surface need to be calibrated before use. The calibration calculation expression is as follows:
其中,x,y为所述惯性定位系统读取的坐标,t=[t1,t2,t3]T为异形面的平移矩阵,所述异形面的平移矩阵通过相机反馈使用特征点匹配以及对极约束算法获取,通过上式得到标定参数A: Among them, x, y are the coordinates read by the inertial positioning system, t = [t 1 , t 2 , t 3 ] T is the translation matrix of the special-shaped surface, and the translation matrix of the special-shaped surface uses feature point matching through camera feedback. And the epipolar constraint algorithm is obtained, and the calibration parameter A is obtained through the above formula:
后续每隔一定时间,惯性定位系统都会获取实时传输异形面的坐标x和y,已知惯性定位系统实时传输异形面的坐标x和y,根据标定参数A,计算得到此时相对于照相机的异形面旋转矩阵R'和平移向量t'。At subsequent intervals, the inertial positioning system will obtain the coordinates x and y of the special-shaped surface in real time. It is known that the inertial positioning system transmits the coordinates x and y of the special-shaped surface in real time. According to the calibration parameter A, the special-shaped surface relative to the camera at this time is calculated. Surface rotation matrix R' and translation vector t'.
作为本发明实施例的一种实施方式,步骤S6中,基于摄像机反馈的异形投影面位姿估计方法在使用中没有累计误差,可以比较准确地获得异形投影面的位姿。但是由于计算复杂,基于摄像机反馈的视觉位姿估计方法的时延无法单独满足动态投影的需求。基于惯性传感器的异形投影面位姿估计方法实时性好,计算时间短,实时性满足动态投影的需求,但是惯性传感器会随着时间的推移产生累计误差,因此需要结合基于摄像机反馈的位姿估计方法进行修正。本发明采用误差状态卡尔曼滤波器对视觉位姿和惯性传感器位姿进行数据融合。As an implementation method of the embodiment of the present invention, in step S6, the method for estimating the pose of the special-shaped projection surface based on camera feedback has no cumulative error during use, and can obtain the pose of the special-shaped projection surface relatively accurately. However, due to complex calculations, the time delay of the visual pose estimation method based on camera feedback cannot meet the needs of dynamic projection alone. The special-shaped projection surface pose estimation method based on inertial sensors has good real-time performance and short calculation time. The real-time performance meets the needs of dynamic projection. However, inertial sensors will produce cumulative errors over time, so it needs to be combined with pose estimation based on camera feedback. method to correct. The present invention uses an error state Kalman filter to perform data fusion on visual pose and inertial sensor pose.
(1)构造滤波系统(1) Construct a filter system
定义状态向量δX=[δpi δv δθi δba δbω]T。Define the state vector δX = [δ pi δv δθ i δb a δb ω ] T .
其中,状态向量δX是由惯性定位系统解算的误差向量,因为惯性定位系统与异形面刚性固定,故可用惯性定位系统解算的误差来表示异形面各参数误差:δpi为解算的异形面位置误差,δθi为解算的异形面姿态误差,δv为当前状态异形面速度误差,δba为惯性定位系统加速度计零偏误差,δbω为惯性定位系统陀螺仪零偏误差。Among them, the state vector δX is the error vector solved by the inertial positioning system. Because the inertial positioning system and the profiled surface are rigidly fixed, the error solved by the inertial positioning system can be used to represent the errors of various parameters of the profiled surface: δpi is the solved position error of the profiled surface, δθi is the solved attitude error of the profiled surface, δv is the velocity error of the profiled surface in the current state, δba is the zero bias error of the accelerometer of the inertial positioning system, and δbω is the zero bias error of the gyroscope of the inertial positioning system.
则系统的状态方程为:Then the state equation of the system is:
δXk=Fk-1δXk-1+Bk-1wk δX k =F k-1 δX k-1 +B k-1 w k
其中,为状态转移矩阵;/>a和ω分别是加速度计和陀螺仪的输出;T是卡尔曼滤波周期;R为旋转矩阵;i为单位阵。定义系统噪声/> wk~N(0,Qk),Q是系统噪声协方差矩阵。na、nω分别是加速度计的白噪声、陀螺仪的白噪声,分别是加速度计的高斯随机游走噪声、陀螺仪的高斯随机游走噪声。运算符[·]×表示向量中各元素组成反对称矩阵。in, is the state transition matrix;/> a and ω are the outputs of the accelerometer and gyroscope respectively; T is the Kalman filter period; R is the rotation matrix; i is the unit matrix. Define system noise/> w k ~N(0,Q k ), Q is the system noise covariance matrix. n a and n ω are the white noise of the accelerometer and the white noise of the gyroscope respectively, They are the Gaussian random walk noise of the accelerometer and the Gaussian random walk noise of the gyroscope. The operator [·] × indicates that each element in the vector forms an antisymmetric matrix.
定义观测向量Z=[δpv δθv]T。Define the observation vector Z = [δp v δθ v ] T .
其中δpv为观测位置误差,δθv观测姿态误差。δpv和δθv由以下公式计算得出:Among them, δp v is the observation position error, and δθ v is the observation attitude error. δp v and δθ v are calculated from the following formula:
其中,pi和Ri为惯性定位系统解算的位置和旋转矩阵,pv和Rv相机估计的位置和旋转矩阵。Among them, p i and R i are the position and rotation matrices solved by the inertial positioning system, and p v and R v are the position and rotation matrices estimated by the camera.
系统的观测方程为:The observation equation of the system is:
Zk=HkδXk+Cknk Z k =H k δX k +C k n k
其中,观测矩阵观测噪声/> 观测噪声满足E(nk)=0,nk~N(0,Nk),N表示观测噪声协方差矩阵。Among them, the observation matrix Observation noise/> The observation noise satisfies E(n k )=0,n k ~N(0,N k ), and N represents the observation noise covariance matrix.
(2)初始化(2) Initialization
状态量δX0初始为0,以及设置各噪声功率初始值,过程噪声和观测噪声一般在迭代中保持不变。The state quantity δX 0 is initially 0, and the initial value of each noise power is set. The process noise and observation noise generally remain unchanged during the iteration.
(3)预测更新(3) Forecast update
卡尔曼滤波预测过程:Kalman filter prediction process:
卡尔曼滤波更新过程:Kalman filter update process:
其中Pk为系统的协方差矩阵。Kk为卡尔曼增益。Where P k is the covariance matrix of the system. K k is the Kalman gain.
(4)计算后验位姿(4) Calculate the posterior pose
根据后验状态量,更新后验位姿并输出卡尔曼滤波后位置和旋转矩阵/> According to the posterior state quantity, update the posterior pose and output the position after Kalman filtering and rotation matrix/>
通过卡尔曼滤波得到的后验位姿值融合了惯性定位系统以及摄像机反馈得到的数据,该位姿通过多传感器数据融合更加精确,可以提升后续异形面动态投影的精度。The posterior pose value obtained through Kalman filtering is integrated with the data obtained from the inertial positioning system and camera feedback. The pose is more accurate through multi-sensor data fusion, which can improve the accuracy of subsequent dynamic projection of special-shaped surfaces.
作为本发明实施例的一种实施方式,步骤S7中,利用三维重建获取的异形面表面稠密点云信息、投影仪-照相机系统标定的投影仪内、外参数,以及融合位姿信息,即可实现待投影图像的预畸变,把预畸变后的图像输入投影仪,计算得到投影仪图像。As an implementation method of the embodiment of the present invention, in step S7, the dense point cloud information on the special-shaped surface obtained by three-dimensional reconstruction, the internal and external parameters of the projector calibrated by the projector-camera system, and the fused pose information are used. Realize pre-distortion of the image to be projected, input the pre-distorted image into the projector, and calculate the projector image.
将得到的异形面相对前一时刻的旋转矩阵Rx、平移矩阵tx和照相机的外参数进行计算,得到投影幕相对于投影仪的运动参数R、T:Calculate the rotation matrix R x of the obtained special-shaped surface relative to the previous moment, the translation matrix t x and the external parameters of the camera to obtain the motion parameters R and T of the projection screen relative to the projector:
R=RcRx,T=Tc+tx R=R c R x , T=T c +t x
异形面三维点云到投影仪图像二维坐标的转换公式如下:The conversion formula from the 3D point cloud of the irregular surface to the 2D coordinates of the projector image is as follows:
xw=PXw=Kp[R|T]Xw xw = PXw = Kp [R|T] Xw
其中,Xw为三维点云坐标;R、T为当前时刻投影仪相对投影面的旋转矩阵和平移矩阵,Kp为内参矩阵;xw为投影仪图像二维坐标。Among them, Xw is the three-dimensional point cloud coordinate; R, T are the rotation matrix and translation matrix of the projector relative to the projection surface at the current moment, Kp is the internal parameter matrix; xw is the two-dimensional coordinate of the projector image.
根据上式,计算出三维点云坐标Xw对应的投影仪图像二维坐标xw后,把坐标Xw处的三维点云的颜色信息赋给xw处的投影仪图像像素。对异形面上所有的点云实施该操作,则得到投影仪图像,实现异形面动态投影。According to the above formula, after calculating the two-dimensional coordinates x w of the projector image corresponding to the three-dimensional point cloud coordinate X w , the color information of the three-dimensional point cloud at the coordinate X w is assigned to the projector image pixel at x w . If this operation is performed on all point clouds on the special-shaped surface, the projector image will be obtained to realize dynamic projection of the special-shaped surface.
实施例3:Example 3:
本发明实施例子提供一种多传感器卡尔曼融合的异形面动态投影装置,包括:An implementation example of the present invention provides a multi-sensor Kalman fusion special-shaped surface dynamic projection device, including:
获取模块,用于获取视觉异形面实时位姿信息和惯性定位异形面实时位姿信息;The acquisition module is used to obtain the real-time pose information of the visual irregular surface and the real-time pose information of the inertial positioning irregular surface;
融合模块,用于融合视觉异形面实时位姿信息和惯性定位异形面实时位姿信息,得到融合位姿信息;The fusion module is used to fuse the real-time pose information of the visual irregular surface and the real-time pose information of the inertial positioning irregular surface to obtain the fused pose information;
计算模块,用于根据融合位姿信息,计算得到投影仪图像;A calculation module, used for calculating and obtaining a projector image according to the fused posture information;
投影模块,用于投影仪投射出投影仪图像,实现异形面动态投影。The projection module is used by the projector to project the projector image to achieve dynamic projection of special-shaped surfaces.
作为本发明实施例的一种实施方式,融合模块利用误差状态卡尔曼滤波融合视觉异形面实时位姿信息和惯性定位异形面实时位姿信息。As an implementation method of the embodiment of the present invention, the fusion module uses error state Kalman filter to fuse the real-time pose information of the visual irregular surface and the real-time pose information of the inertial positioning irregular surface.
作为本发明实施例的一种实施方式,计算模块根据异形面表面稠密点云、投影仪内外参数和融合位姿信息,计算得到投影仪图像。As an implementation method of the embodiment of the present invention, the calculation module calculates the projector image based on the dense point cloud on the surface of the special-shaped surface, the internal and external parameters of the projector, and the fused pose information.
作为本发明实施例的一种实施方式,获取模块通过照相机实时拍摄异形面图像,得到视觉异形面实时位姿信息;获取模块对惯性定位系统和异形面进行刚性固定,并对惯性定位系统进行标定,得到惯性定位异形面实时位姿信息。As an implementation method of the embodiment of the present invention, the acquisition module takes real-time images of the special-shaped surface through a camera to obtain real-time pose information of the visual special-shaped surface; the acquisition module rigidly fixes the inertial positioning system and the special-shaped surface, and calibrates the inertial positioning system , obtain the real-time pose information of the inertial positioning special-shaped surface.
以上所述的实施例仅是对本发明优选方式进行的描述,并非对本发明的范围进行限定,在不脱离本发明设计精神的前提下,本领域普通技术人员对本发明的技术方案做出的各种变形和改进,均应落入本发明权利要求书确定的保护范围内。The above-described embodiments are only descriptions of preferred modes of the present invention and do not limit the scope of the present invention. Without departing from the design spirit of the present invention, those of ordinary skill in the art can make various modifications to the technical solutions of the present invention. All deformations and improvements shall fall within the protection scope determined by the claims of the present invention.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410018655.5A CN117793317A (en) | 2024-01-05 | 2024-01-05 | A multi-sensor Kalman fusion dynamic projection method and device for special-shaped surfaces |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410018655.5A CN117793317A (en) | 2024-01-05 | 2024-01-05 | A multi-sensor Kalman fusion dynamic projection method and device for special-shaped surfaces |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117793317A true CN117793317A (en) | 2024-03-29 |
Family
ID=90379823
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410018655.5A Pending CN117793317A (en) | 2024-01-05 | 2024-01-05 | A multi-sensor Kalman fusion dynamic projection method and device for special-shaped surfaces |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117793317A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8761439B1 (en) * | 2011-08-24 | 2014-06-24 | Sri International | Method and apparatus for generating three-dimensional pose using monocular visual sensor and inertial measurement unit |
CN109376785A (en) * | 2018-10-31 | 2019-02-22 | 东南大学 | A Navigation Method Based on Iterative Extended Kalman Filter Fusion Inertial and Monocular Vision |
CN115442584A (en) * | 2022-08-30 | 2022-12-06 | 中国传媒大学 | Multi-sensor fusion irregular surface dynamic projection method |
-
2024
- 2024-01-05 CN CN202410018655.5A patent/CN117793317A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8761439B1 (en) * | 2011-08-24 | 2014-06-24 | Sri International | Method and apparatus for generating three-dimensional pose using monocular visual sensor and inertial measurement unit |
CN109376785A (en) * | 2018-10-31 | 2019-02-22 | 东南大学 | A Navigation Method Based on Iterative Extended Kalman Filter Fusion Inertial and Monocular Vision |
CN115442584A (en) * | 2022-08-30 | 2022-12-06 | 中国传媒大学 | Multi-sensor fusion irregular surface dynamic projection method |
Non-Patent Citations (1)
Title |
---|
KUNFENG WANG等: "Stereo Event-based Visual-Inertial Odometry", HTTP://ARXIV.ORG/, 25 July 2023 (2023-07-25) * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108629831B (en) | 3D Human Body Reconstruction Method and System Based on Parametric Human Template and Inertial Measurement | |
WO2021232470A1 (en) | Multi-sensor fusion-based slam method and system | |
CN111414798A (en) | Head posture detection method and system based on RGB-D image | |
CN103106688A (en) | Indoor three-dimensional scene rebuilding method based on double-layer rectification method | |
Tamas et al. | Targetless calibration of a lidar-perspective camera pair | |
CN105783913A (en) | SLAM device integrating multiple vehicle-mounted sensors and control method of device | |
CN112116651B (en) | Ground target positioning method and system based on monocular vision of unmanned aerial vehicle | |
CN205426175U (en) | Fuse on -vehicle multisensor's SLAM device | |
CN116222543B (en) | Multi-sensor fusion map construction method and system for robot environment perception | |
Bakthavatchalam et al. | Photometric moments: New promising candidates for visual servoing | |
WO2022000713A1 (en) | Augmented reality self-positioning method based on aviation assembly | |
Zhang | LILO: A novel LiDAR–IMU SLAM system with loop optimization | |
CN112767482B (en) | Indoor and outdoor positioning method and system with multi-sensor fusion | |
CN114663463A (en) | Method, system, device, electronic device and storage medium for measuring joint mobility | |
CN112179338A (en) | Low-altitude unmanned aerial vehicle self-positioning method based on vision and inertial navigation fusion | |
CN111275764B (en) | Depth camera visual odometry method based on line segment shadow | |
CN113409439A (en) | Unmanned aerial vehicle three-dimensional map modeling method | |
CN113240597A (en) | Three-dimensional software image stabilization method based on visual inertial information fusion | |
CN111914790B (en) | Real-time human rotation angle recognition method in different scenarios based on dual cameras | |
CN115442584B (en) | Multi-sensor fusion type special-shaped surface dynamic projection method | |
Lu et al. | Calibration of multi-sensor fusion for autonomous vehicle system | |
CN112767481A (en) | High-precision positioning and mapping method based on visual edge features | |
Ross et al. | Mobile robot mosaic imaging of vehicle undercarriages using catadioptric vision | |
CN117793317A (en) | A multi-sensor Kalman fusion dynamic projection method and device for special-shaped surfaces | |
CN115797490B (en) | Graph construction method and system based on laser vision fusion |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |