WO2018045670A1 - 基于自然手势的虚拟数字雕塑方法 - Google Patents

基于自然手势的虚拟数字雕塑方法 Download PDF

Info

Publication number
WO2018045670A1
WO2018045670A1 PCT/CN2016/111383 CN2016111383W WO2018045670A1 WO 2018045670 A1 WO2018045670 A1 WO 2018045670A1 CN 2016111383 W CN2016111383 W CN 2016111383W WO 2018045670 A1 WO2018045670 A1 WO 2018045670A1
Authority
WO
WIPO (PCT)
Prior art keywords
point
sculpture
virtual
collision
finger
Prior art date
Application number
PCT/CN2016/111383
Other languages
English (en)
French (fr)
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 WO2018045670A1 publication Critical patent/WO2018045670A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/22Procedural
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/017Gesture based interaction, e.g. based on a set of recognized hand gestures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects

Definitions

  • the invention belongs to the field of natural human-computer interaction, and particularly relates to a virtual digital sculpture method based on natural gestures.
  • the hand In the various organs of the human body, the hand is the most flexible, and people can draw a variety of gestures according to the ideas in the heart. Just like a sculptor holding a knife in the hand can easily engrave the shape of the object, but according to the domestic and international situation, the domestic 3D modeling software is powerful but it takes a lot of time to learn and skill software; Lightweight design studies have been implemented quickly but the models that can be built are simpler. In view of the above situation, we will focus on further optimization and powerful virtual sculpture functions to achieve natural human-computer interaction mode and fine sculptural effects. Create a virtual sculpture that is more natural, effective, and highly fluid than smart space. Based on the above two phenomena, we try to complement their advantages.
  • Leap motion is used to perform virtual sculpture on a computer, and fast 3D modeling is performed, and then the model is printed in conjunction with a 3D printer. This solves the current difficult problem of 3D modeling, making the 3D printer available to the public, and the threshold is low and easy to promote.
  • the invention proposes a method for allowing a user to perform virtual sculpture in a computer through natural gestures.
  • This method uses a natural human-computer interaction interface based on a leap motion contactless device, which allows the user to visually perform virtual sculpture and real-time observation. The results of the sculpture feedback.
  • a virtual digital sculpture method based on natural gestures comprising the following steps:
  • gesture position acquisition gesture position obtained by Leap Motion
  • S3 model deformation
  • the collision detection method uses the algorithm of the intersection of the triangle and the triangle in the three-dimensional space to determine whether there is an intersection point, and the intersection position with the intersection point, and then uses the virtual sculpture deformation algorithm according to the calculation of the collision depth.
  • the coordinates of the intersection point position are modified in real time to achieve the sculpture deformation effect.
  • step S1 includes the following steps:
  • the data of the gesture position is obtained by Leap Motion.
  • the virtual sculpture needs to use the finger to perform the sculpture. Therefore, we need to obtain the relevant data of the finger.
  • Each hand can get the data of 5 fingers, and 5 fingers respectively. for:
  • Each finger can get its initial position start(X,Y,Z), end position end(X,Y,Z) and direction direction(pitch,roll,yaw).
  • Subdividing each finger can be divided into the following four joints:
  • step S2 includes the following steps:
  • the coordinate system used by Leap Motion is the X-axis with respect to the horizontal direction of the device, the positive axis for the right, the Y-axis for the vertical direction of the device, the positive axis for the upward direction, and the Z-axis for the horizontal plane perpendicular to the X-axis.
  • the user's direction is the positive axis
  • the horizontal direction of the window is the X axis
  • the right side is the positive axis.
  • the vertical direction of the window device is the Z axis
  • the upward direction is the positive axis
  • the horizontal plane is perpendicular to the X axis.
  • the direction to the user is the positive axis, so the incoming Y-axis and Z-axis data need to be exchanged when using the passed coordinate data in OpenSceneGraph.
  • Create a Group pointer as the root node in OpenSceneGraph use the in-line matrix conversion function to process each cylinder in combination with the passed coordinates, and then add 17 cylinders as nodes to the root node, using osg::Viewer It is displayed in the scene.
  • the virtual mud preset model is provided in use, that is, the cuboid is constructed by using 3dmax. Cubes, cylinders, and spheres are presets.
  • step S3 includes the following steps:
  • the two triangle collision detection algorithms in three-dimensional space are as follows:
  • intersection point is at ⁇ ABC, and the collision point is the intersection point;
  • intersection point is at ⁇ ABC, and the collision point is the intersection point;
  • intersection of PQ and *0 is calculated as follows:
  • the process of the sculpture deformation algorithm is as shown in Fig. 4.
  • the finger is continuously approaching the sculpture, according to the collision algorithm, it can be detected whether the finger surface and the sculpture surface collide, and if a collision occurs, all the collision points can be calculated. For each collision point, after the collision occurs, it must be offset by a certain distance in a certain direction, so that the sculpture surface is deformed.
  • the collision distance of the P point can be defined as follows :
  • the direction of motion of point P can be defined as follows:
  • the point P With the collision distance Distance (P) and the motion direction Orientation (P), the point P can be offset accordingly. By shifting each of the calculated collision points in this way, the sculpture can realize the function of deformation.
  • This invention proposes a task that allows an operator to perform a virtual sculpture task on a computer OSG platform through a three-dimensional gesture.
  • This Leap Motion-based interface captures more accurate joint coordinates for natural human-computer interaction, and is applied to 3D modeling sculptures to get rid of the limitations of excessive physical devices.
  • Figure 1 is a space diagram of collision detection two triangles
  • Figure 2 is a schematic diagram of intersections between intersection lines and faces in space
  • Figure 3 is a schematic diagram of whether the point is in a triangle
  • Figure 4 is a collision diagram of the finger face and the sculpture face.
  • the virtual digital sculpture implementation method based on the natural gesture of the present example includes the following steps:
  • the step S1 includes the following steps:
  • the data of the gesture position is obtained by Leap Motion.
  • the virtual sculpture needs to use the finger to perform the sculpture. Therefore, we need to obtain the relevant data of the finger.
  • Each hand can get the data of 5 fingers, and 5 fingers respectively. for:
  • Each finger can get its initial position start(X,Y,Z), end position end(X,Y,Z) and direction direction(pitch,roll,yaw).
  • Subdividing each finger can be divided into the following four joints:
  • the step S2 includes the following steps:
  • the coordinate system used by Leap Motion is the X-axis with respect to the horizontal direction of the device, the positive axis for the right, the Y-axis for the vertical direction of the device, the positive axis for the upward direction, and the Z-axis for the horizontal plane perpendicular to the X-axis.
  • the user's direction is the positive axis
  • the horizontal direction of the window is the X axis
  • the right side is the positive axis.
  • the vertical direction of the window device is the Z axis
  • the upward direction is the positive axis
  • the horizontal plane is perpendicular to the X axis.
  • the direction to the user is the positive axis, so the incoming Y-axis and Z-axis data need to be exchanged when using the passed coordinate data in OpenSceneGraph.
  • Create a Group pointer as the root node in OpenSceneGraph use the in-line matrix conversion function to process each cylinder in combination with the passed coordinates, and then add 17 cylinders as nodes to the root node, using osg::Viewer It is displayed in the scene.
  • the virtual mud preset model is provided in use, that is, the cuboid is constructed by using 3dmax. Cubes, cylinders, and spheres are presets.
  • the step S3 includes the following steps:
  • intersection point is at ⁇ ABC, and the collision point is the intersection point;
  • intersection point is at ⁇ ABC, and the collision point is the intersection point;
  • Figure 3 relates to whether the point is obtained at a known plane intersection:
  • ⁇ 2> The process of the sculpture deformation algorithm is as shown in Fig. 4.
  • the collision algorithm When the finger is continuously approaching the sculpture, according to the collision algorithm, it can be detected whether the finger surface and the sculpture surface collide, and if a collision occurs, all the calculations can be calculated. Collision point. For each collision point, after the collision occurs, it must be offset by a certain distance in a certain direction, so that the sculpture surface is deformed.
  • the collision distance of the P point can be defined as follows :
  • the direction of motion of point P can be defined as follows:
  • the point P With the collision distance Distance (P) and the motion direction Orientation (P), the point P can be offset accordingly. By shifting each of the calculated collision points in this way, the sculpture can realize the function of deformation.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Processing Or Creating Images (AREA)

Abstract

基于自然手势的虚拟数字雕塑方法,包括如下步骤:手势位置获取,手势位置通过Leap Motion来获取得到;虚拟雕塑建模。在进行虚拟雕塑的任务工作时有两个主要模型,一个是已构建好等待雕塑的模型,一个是由Leap Motion获取关节坐标构建的虚拟手模型;当人手在Leap Motion下运动进而控制虚拟手与固定的等待雕塑模型发生轻微碰撞,碰撞处检测以三维空间三角形与三角形相交的算法判断有无交点,与交点交线位置,再根据碰撞深度的计算,利用虚拟雕塑变形算法进而将相交点位置坐标进行实时修改,从而实现雕塑变形效果。

Description

基于自然手势的虚拟数字雕塑方法 技术领域
本发明属于自然人机交互领域,特别涉及一种基于自然手势的虚拟数字雕塑方法。
背景技术
随着先进的数字化仪器及设备不断投入实际应用,计算机辅助下的三维建模技术已经发展到包括三维扫描仪、基于图像的建模与绘制(IBMR)等多种方法在内的三维建模,而且计算机辅助设计系统功能越来越强大,但是其使用门槛也越来越高,操作也来越复杂,用户需要费尽周折才能将自己的三维思路准确地传达给计算机,很大程度限制了设计者的设计想法。传统的三维建模主要是通过三维建模软件如3DMax、Maya和犀牛等来完成,他们的强大不可置否,初学者必须要花费一定的精力才能掌握如何建模,门槛较高,而且操作者也不容易将自己的想法给清晰的表达出来,而且上手后完成一个较为美观的模型的时间也常常需要几个小时,国外也有一些通过VR和AR来进行三维建模,但是所建出来的模型往往过于简单,实用性不高。3D打印机在日常生活运用十分普遍,然而却很难推广开来,其中最关键的原因有两点:一是三维建模软件的入门比较困难,非相关专业的人需要花费很大精力去学习如何使用建模软件;二是三维建模软件难以表达清楚人们心中所想物体的形状,特别是一些细节方面,往往人们心中所想的和软件所画出来的相差很大。所以进一步优化和强大虚拟雕塑的变形等功能正是人们理想的实现方式。
在人体的各个器官中,手是最灵活的,人们可以根据心中的想法比划出各种各样的手势。就好比一个雕刻家手中拿着刻刀可以轻易的刻出物体的外形,但根据国内外形势,国内的3D建模软件功能强大却需要耗费人们大量的时间学习和熟练软件;而国外的各种轻量化设计性研究已得到迅速实现但是所能建立的模型较为简单。针对以上情况,注重进一步优化和强大虚拟雕塑功能,实现自然的人机交互模式同时精细雕塑效果。建立一种比智能空间更为自然、有效的、具有高度流动性的手势虚拟雕塑。基于以上两个现象,我们试想着将其优势互补。通过自然的手势利用Leap motion在计算机上进行虚拟雕塑,并进行快速三维建模,然后结合3D打印机把模型打印出来。这样就解决了目前三维建模困难的问题,使得3D打印机可以面向大众,且门槛低、易推广。
发明内容
此发明提出了允许使用者通过自然的手势在电脑中进行虚拟雕塑的方法,此方法使用了基于leap Motion非接触式设备的自然人机交互接口,可以令使用者直观地进行虚拟雕塑及实时观察到雕塑的结果反馈。
本发明的目的通过如下技术方案实现。
基于自然手势的虚拟数字雕塑方法,包括如下步骤:
S1、手势位置获取,手势位置通过Leap Motion来获取得到;
S2、虚拟雕塑建模;
S3、模型变形,在进行虚拟雕塑的任务工作时有两个主要模型,一个是已构建好等待雕塑的模型,一个是由Leap Motion获取关节坐标构建的虚拟手模型;当人手在Leap Motion下运动进而控制虚拟手与固定的等待雕塑模型发生轻微碰撞,碰撞处检测以三维空间三角形与三角形相交的算法判断有无交点,与交点交线位置,再根据碰撞深度的计算,利用虚拟雕塑变形算法进而将相交点位置坐标进行实时修改,从而实现雕塑变形效果。
进一步地,所述步骤S1包括以下步骤:
手势位置的数据是通过Leap Motion来获取得到,虚拟雕塑需要用到的是手指来进行雕塑的,因此,我们需要获取手指的相关数据,每只手可以获得5个手指的数据,5个手指分别为:
(1)拇指(Thumb finger)
(2)食指(Index finger)
(3)中指(Middle finger)
(4)无名指(Ring finger)
(5)小拇指(Pinky finger)
每个手指可以获取其初始位置start(X,Y,Z),终止位置end(X,Y,Z)和方向direction(pitch,roll,yaw)。
对每个手指进行细分,可以分为如下四个关节:
(1)掌骨Metacarpal bone
(2)近端骨Proximal bone
(3)中间骨Middle bone
(4)远端骨Distal bone
对每一个关节,也可以获取其初始位置start(X,Y,Z),终止位置end(X,Y,Z)和方向 direction(pitch,roll,yaw)。
有了以上的数据,我们可以得到手的位置,由于Leap Motion获取手势数据也存在着一定的误差,抗干扰性不是很强,所以我们会利用混合卡尔曼滤波来对手势数据进行融合,这样手势数据的精确性就提高了很多,可以用于接下来的手势模型搭建。
进一步地,所述步骤S2包括以下步骤:
(1)利用3DMAX构建出表示人手关节的圆柱体,转换为OpenSceneGraph中后缀为.osg的节点模型以便用于场景的处理。随后利用Leap Motion来获取人手的各个关节的相应坐标,在Leap Motion的API中,人手的关节识别中将手指分成了17部分,分别是尾指的掌骨(Metacarpals)、近侧指骨(Proximal phalanges)、中段指骨(Intermediate phalanges)和末梢指骨(Distal phalanges)、无名指的掌骨(Metacarpals)、近侧指骨(Proximal phalanges)、中段指骨(Intermediate phalanges)和末梢指骨(Distal phalanges)、中指的掌骨(Metacarpals)、近侧指骨(Proximal phalanges)、中段指骨(Intermediate phalanges)和末梢指骨(Distal phalanges)、食指的掌骨(Metacarpals)、近侧指骨(Proximal phalanges)、中段指骨(Intermediate phalanges)和末梢指骨(Distal phalanges)、拇指的近侧指骨(Proximal phalanges)、中段指骨(Intermediate phalanges)和末梢指骨(Distal phalanges)(拇指的掌骨长度置为0),所以在OpenSceneGraph中需要用17个圆柱体来构建人手的模型。
(2)由于Leap Motion中的坐标系与OpenSceneGraph中的坐标系不同,在由leap motion在传入坐标时需要进行转换。Leap Motion采用的坐标系时以相对设备水平的方向为X轴,右边为正轴,相对设备垂直的方向为Y轴,向上为正轴,在水平面与X轴垂直的方向为Z轴,以指向使用者的方向为正轴,而在OpenSceneGraph以视窗水平的方向为X轴,右边为正轴,视窗设备垂直的方向为Z轴,向上为正轴,在水平面与X轴垂直的方向为Y轴,以指向使用者的方向为正轴,因此在OpenSceneGraph中采用传入的坐标数据时需要将传入的Y轴和Z轴的数据相互交换。在OpenSceneGraph中创建一个Group指针作为根节点,使用内带的矩阵转换函数与传入的坐标结合处理各个圆柱体,再分别将17个圆柱体作为node加入到根节点中,使用osg::Viewer将其显示在场景中。
(3)在构建完虚拟手后,还需要对虚拟雕塑用泥进行构建,由于现实生活中雕塑用泥一般不定形,因此在使用中提供虚拟泥的预设模型,即利用3dmax构建出长方体,正方体,圆柱,球体作为预设。
进一步地,所述步骤S3包括以下步骤:
在进行虚拟雕塑的任务工作时有两个主要模型,一个是以构建好等待雕塑的模型,一个是由Leap Motion获取关节坐标构建的虚拟手模型。当人手在Leap Motion下运动进而控制虚拟手与固定的等待雕塑模型发生轻微碰撞,碰撞出检测以三维空间三角形与三角形相交的算法判断有无交点,与交点交线位置,再根据碰撞深度的计算,利用虚拟雕塑变形算法进而将相交点位置坐标进行一定实时修改,从而实现雕塑变形效果。过程中涉及的主要碰撞检测算法与虚拟雕塑变形算法如下详述。
三维空间两个三角形碰撞检测算法如下:
(1)假定三维空间有ΔABC与ΔPQR,以ΔABC所在平面为基准,建立该平面法线
Figure PCTCN2016111383-appb-000001
其中,由三角形ABC所在平面(定为*0)划分的空间中,
Figure PCTCN2016111383-appb-000002
为正向的空间为*1,
Figure PCTCN2016111383-appb-000003
为负向的空间为*2,详见附图1。
(2)根据三角形PQR的点P,点Q,点R各自所在空间领域(*1/*2/*0)的判断,分析碰撞情况。利用
Figure PCTCN2016111383-appb-000004
分别与
Figure PCTCN2016111383-appb-000005
的向量内积的正负值判断所在空间领域(*1/*2/*0)。
a)如果点P,点Q,点R三点均在*1或*2,则ΔABC与ΔPQR不可能相交;
b)如果点P,点Q,点R中存在点在*0,则ΔABC与*0肯定相交,ΔABC与ΔPQR可能相交:
b1)该交点在ΔABC,则碰撞点即为该交点;
b2)否则,继续c)步判断。
c)如果点P,点Q,点R三点不全在*0或*1或*2,则ΔABC与*0肯定相交,根据交线与面*0的相似三角形构建,向量投影求出ΔABC与*0的交点(详见附图2):
c1)该交点在ΔABC,则碰撞点即为该交点;
c2)否则,无碰撞点。
(3)判断点是否在已知三角形算法分析如下。建立附图3,ΔXYZ,点A在ΔXYZ上,点B在外。
对于在ΔXYZ的点有如下特征:
选取XY边,A,Z两点在同一侧;选取XZ边,A,Y两点在同一侧;选取YZ边,A,X两点在同一侧。
其中,涉及点是否在已知平面交点获取方法:
Figure PCTCN2016111383-appb-000006
Figure PCTCN2016111383-appb-000007
例如PQ与*0交点F计算如下:
Figure PCTCN2016111383-appb-000008
其中:
Figure PCTCN2016111383-appb-000009
雕塑变形算法的过程如附图4所示,当手指不断的向雕塑靠近时,根据碰撞算法可以检测出手指面和雕塑面是否产生碰撞,如果产生碰撞了,则可以计算出所有的碰撞点。对于每一个碰撞点,在产生碰撞之后,都必须要朝某一个方向偏移一定的距离,从而使得雕塑面产生一定的形变。
假设P(px,py,pz)为其中一个碰撞点,Q(qx,qy,qz)为碰撞面上距离P最近的一个点,则P点的碰撞距离可以被定义如下:
Figure PCTCN2016111383-appb-000010
点P的运动方向可以被定义如下:
Orientation(P)=(qx-px,qy-py,qz-pz)             (2)
有了碰撞距离Distance(P)和运动方向Orientation(P),就可以将点P进行相应的偏移。将所计算出的每一个碰撞点都按照这种方式进行偏移,则雕塑就可以实现变形的功能。
本发明相对于现有技术具有如下的优点及效果:
这个发明提出了一种允许操作者通过三维的手势动作来在计算机OSG平台上完成虚拟雕塑任务。这种基于Leap Motion的接口获取更加准确的关节坐标实现自然的人机交互,运用到三维建模雕塑上,摆脱过多的物理装置的限制。
附图说明
图1是碰撞检测两三角形的空间图;
图2是空间上交线与面求交点示意图;
图3是点是否在三角形示意图;
图4是手指面和雕塑面产生碰撞图。
具体实施方式
下面结合实施例对本发明作进一步详细的描述,但本发明的实施方式不限于此,以下若有未特别详细说明之处,均是本领域技术人员可参照现有技术实现的。
本实例基于自然手势的虚拟数字雕塑实现方法包括如下步骤:
S1、手势位置获取
S2、虚拟雕塑建模
S3、模型变形。
所述步骤S1包括以下步骤:
手势位置的数据是通过Leap Motion来获取得到,虚拟雕塑需要用到的是手指来进行雕塑的,因此,我们需要获取手指的相关数据,每只手可以获得5个手指的数据,5个手指分别为:
(1)Thumb finger
(2)Index finger
(3)Middle finger
(4)Ring finger
(5)Pinky finger;
每个手指可以获取其初始位置start(X,Y,Z),终止位置end(X,Y,Z)和方向direction(pitch,roll,yaw)。
对每个手指进行细分,可以分为如下四个关节:
(1)Metacarpal bone
(2)Proximal bone
(3)Middle bone
(4)Distal bone;
对每一个关节,也可以获取其初始位置start(X,Y,Z),终止位置end(X,Y,Z)和方向direction(pitch,roll,yaw)。
有了以上的数据,我们可以得到手的位置,由于Leap Motion获取手势数据也存在着一定的误差,抗干扰性不是很强,所以我们会利用混合卡尔曼滤波来对手势数据进行融合,这样手势数据的精确性就提高了很多,可以用于接下来的手势模型搭建。
所述步骤S2包括以下步骤:
(1)利用3DMAX构建出表示人手关节的圆柱体,转换为OpenSceneGraph中后缀为.osg的节点模型以便用于场景的处理。随后利用Leap Motion来获取人手的各个关节的相应坐标,在Leap Motion的API中,人手的关节识别中将手指分成了17部分,分别是尾指的掌骨(Metacarpals)、近侧指骨(Proximal phalanges)、中段指骨(Intermediate phalanges)和末梢指骨(Distal phalanges)、无名指的掌骨(Metacarpals)、近侧指骨(Proximal phalanges)、中段指骨(Intermediate phalanges)和末梢指骨(Distal phalanges)、中指的掌骨(Metacarpals)、近侧指骨(Proximal phalanges)、中段指骨(Intermediate phalanges)和末梢指骨(Distal phalanges)、食指的掌骨(Metacarpals)、近侧指骨(Proximal phalanges)、中段指骨(Intermediate phalanges)和末梢指骨(Distal phalanges)、拇指的近侧指骨(Proximal phalanges)、中段指骨(Intermediate phalanges)和末梢指骨(Distal phalanges)(拇指的掌骨长度置为0),所以在OpenSceneGraph中需要用17个圆柱体来构建人手的模型
(2)由于Leap Motion中的坐标系与OpenSceneGraph中的坐标系不同,在由leap motion在传入坐标时需要进行转换。Leap Motion采用的坐标系时以相对设备水平的方向为X轴,右边为正轴,相对设备垂直的方向为Y轴,向上为正轴,在水平面与X轴垂直的方向为Z轴,以指向使用者的方向为正轴,而在OpenSceneGraph以视窗水平的方向为X轴,右边为正轴,视窗设备垂直的方向为Z轴,向上为正轴,在水平面与X轴垂直的方向为Y轴,以指向使用者的方向为正轴,因此在OpenSceneGraph中采用传入的坐标数据时需要将传入的Y轴和Z轴的数据相互交换。在OpenSceneGraph中创建一个Group指针作为根节点,使用内带的矩阵转换函数与传入的坐标结合处理各个圆柱体,再分别将17个圆柱体作为node加入到根节点中,使用osg::Viewer将其显示在场景中。
(3)在构建完虚拟手后,还需要对虚拟雕塑用泥进行构建,由于现实生活中雕塑用泥一般不定形,因此在使用中提供虚拟泥的预设模型,即利用3dmax构建出长方体,正方体,圆柱,球体作为预设。
所述步骤S3包括以下步骤:
在进行虚拟雕塑的任务工作时有两个主要模型,一个是以构建好等待雕塑的模型,一个是由Leap Motion获取关节坐标构建的虚拟手模型。当人手在Leap Motion下运动进而控制虚拟手与固定的等待雕塑模型发生轻微碰撞,碰撞出检测以三维空间三角形与三角形相交的算法判断有无交点,与交点交线位置,再根据碰撞深度的计算,利用虚拟雕塑变形算 法进而将相交点位置坐标进行一定实时修改,从而实现雕塑变形效果。过程中涉及的主要碰撞检测算法与虚拟雕塑变形算法如下详述。
<一>过程中主要三维空间两个三角形碰撞检测算法如下:
(1)假定三维空间有ΔABC与ΔPQR,以ΔABC所在平面为基准,建立该平面法线
Figure PCTCN2016111383-appb-000011
其中,由三角形ABC所在平面(定为*0)划分的空间中,
Figure PCTCN2016111383-appb-000012
为正向的空间为*1,
Figure PCTCN2016111383-appb-000013
为负向的空间为*2,详见附图1。
(2)根据三角形PQR的点P,点Q,点R各自所在空间领域(*1/*2/*0)的判断,分析碰撞情况。利用
Figure PCTCN2016111383-appb-000014
分别与
Figure PCTCN2016111383-appb-000015
的向量内积的正负值判断所在空间领域(*1/*2/*0)。
c)如果点P,点Q,点R三点均在*1或*2,则ΔABC与ΔPQR不可能相交;
d)如果点P,点Q,点R中存在点在*0,则ΔABC与*0肯定相交,ΔABC与ΔPQR可能相交:
b1)该交点在ΔABC,则碰撞点即为该交点;
b2)否则,继续c)步判断。
c)如果点P,点Q,点R三点不全在*0或*1或*2,则ΔABC与*0肯定相交,根据交线与面*0的相似三角形构建,向量投影求出ΔABC与*0的交点(详见附图2):
c1)该交点在ΔABC,则碰撞点即为该交点;
c2)否则,无碰撞点。
(3)判断点是否在已知三角形算法分析如下。建立附图3,ΔXYZ,点A在ΔXYZ上,点B在外。
对于在ΔXYZ的点有如下特征:
选取XY边,A,Z两点在同一侧;选取XZ边,A,Y两点在同一侧;选取YZ边,A,X两点在同一侧。
其中,附图3,涉及点是否在已知平面交点获取方法:
Figure PCTCN2016111383-appb-000016
Figure PCTCN2016111383-appb-000017
例如PQ与*0交点F:
Figure PCTCN2016111383-appb-000018
Figure PCTCN2016111383-appb-000019
<二>雕塑变形算法的过程如附图4所示,当手指不断的向雕塑靠近时,根据碰撞算法可以检测出手指面和雕塑面是否产生碰撞,如果产生碰撞了,则可以计算出所有的碰撞点。对于每一个碰撞点,在产生碰撞之后,都必须要朝某一个方向偏移一定的距离,从而使得雕塑面产生一定的形变。
假设P(px,py,pz)为其中一个碰撞点,Q(qx,qy,qz)为碰撞面上距离P最近的一个点,则P点的碰撞距离可以被定义如下:
Figure PCTCN2016111383-appb-000020
点P的运动方向可以被定义如下:
Orientation(P)=(qx-px,qy-py,qz-pz)           (2)
有了碰撞距离Distance(P)和运动方向Orientation(P),就可以将点P进行相应的偏移。将所计算出的每一个碰撞点都按照这种方式进行偏移,则雕塑就可以实现变形的功能。
上述实施例为本发明较佳的实施方式,但本发明的实施方式并不受上述实施例的限制,其他的任何未背离本发明的精神实质与原理下所作的改变、修饰、替代、组合、简化,均应为等效的置换方式,都包含在本发明的保护范围之内。

Claims (5)

  1. 基于自然手势的虚拟数字雕塑方法,其特征在于包括如下步骤:
    S1、手势位置获取,手势位置通过Leap Motion来获取得到;
    S2、虚拟雕塑建模;
    S3、模型变形,在进行虚拟雕塑的任务工作时有两个主要模型,一个是已构建好等待雕塑的模型,一个是由Leap Motion获取关节坐标构建的虚拟手模型;当人手在Leap Motion下运动进而控制虚拟手与固定的等待雕塑模型发生轻微碰撞,碰撞处检测以三维空间三角形与三角形相交的算法判断有无交点,与交点交线位置,再根据碰撞深度的计算,利用虚拟雕塑变形算法进而将相交点位置坐标进行实时修改,从而实现雕塑变形效果。
  2. 根据权利要求1所述的基于自然手势的虚拟数字雕塑方法,其特征在于所述步骤S1包括以下步骤:
    通过Leap Motion来获取手势位置,需要获取手指的相关数据,每只手可以获得5个手指的数据,5个手指分别为拇指、食指、中指、无名指、小拇指;每个手指能获取其初始位置start(X,Y,Z),终止位置end(X,Y,Z)和方向direction(pitch,roll,yaw);
    对每个手指进行细分,分为四个关节:掌骨、近端骨、中间骨、远端骨;
    对于每一个关节,能获取其初始位置start(X,Y,Z),终止位置end(X,Y,Z)和方向direction(pitch,roll,yaw);进而得到手的位置,由于Leap Motion获取手势数据也存在误差,利用混合卡尔曼滤波来对手势数据进行融合提高精确性,以用于接下来的虚拟雕塑建模。
  3. 根据权利要求1所述的基于自然手势的虚拟数字雕塑方法,其特征在于所述步骤S2包括以下步骤:
    (1)利用3DMAX构建出表示人手关节的圆柱体,转换为OpenSceneGraph中后缀为.osg的节点模型以便用于场景的处理;随后利用Leap Motion来获取人手的各个关节的相应坐标,在Leap Motion的API中,人手的关节识别中将手指分成了17部分,分别是尾指的掌骨、近侧指骨、中段指骨和末梢指骨、无名指的掌骨、近侧指骨、中段指骨和末梢指骨、中指的掌骨、近侧指骨、中段指骨和末梢指骨、食指的掌骨、近侧指骨、中段指骨和末梢指骨、拇指的近侧指骨、中段指骨和末梢指骨,拇指的掌骨长度置为0,所以在OpenSceneGraph中需要用17个圆柱体来构建人手的模型;
    (4)由于Leap Motion中的坐标系与OpenSceneGraph中的坐标系不同,在由leap  motion在传入坐标时需要进行转换;Leap Motion采用的坐标系时以相对设备水平的方向为X轴,右边为正轴,相对设备垂直的方向为Y轴,向上为正轴,在水平面与X轴垂直的方向为Z轴,以指向使用者的方向为正轴,而在OpenSceneGraph以视窗水平的方向为X轴,右边为正轴,视窗设备垂直的方向为Z轴,向上为正轴,在水平面与X轴垂直的方向为Y轴,以指向使用者的方向为正轴,因此在OpenSceneGraph中采用传入的坐标数据时需要将传入的Y轴和Z轴的数据相互交换;在OpenSceneGraph中创建一个Group指针作为根节点,使用内带的矩阵转换函数与传入的坐标结合处理各个圆柱体,再分别将17个圆柱体作为节点node加入到根节点中,使用osg::Viewer将手指17个圆柱体显示在场景中;
    (5)在构建完虚拟手后,还需要对虚拟雕塑用泥进行构建,由于现实生活中雕塑用泥一般不定形,因此在使用中提供虚拟泥的预设模型,即利用3dmax构建出长方体,正方体,圆柱,球体作为预设。
  4. 根据权利要求1所述的基于自然手势的虚拟数字雕塑方法,其特征在于所述步骤S3中,三维空间两个三角形碰撞检测算法如下:
    (3)假定三维空间有ΔABC与ΔPQR,以ΔABC所在平面为基准,建立该平面法线
    Figure PCTCN2016111383-appb-100001
    其中,由三角形ABC所在平面即*0划分的空间中,
    Figure PCTCN2016111383-appb-100002
    为正向的空间为*1,
    Figure PCTCN2016111383-appb-100003
    为负向的空间为*2;
    (4)根据三角形PQR的点P,点Q,点R各自所在空间领域(*1/*2/*0)的判断,分析碰撞情况;利用
    Figure PCTCN2016111383-appb-100004
    分别与
    Figure PCTCN2016111383-appb-100005
    的向量内积的正负值判断所在空间领域(*1/*2/*0):
    e)如果点P,点Q,点R三点均在*1或*2,则ΔABC与ΔPQR不可能相交;
    f)如果点P,点Q,点R中存在点在*0,则ΔABC与*0肯定相交,ΔABC与ΔPQR可能相交:
    b1)该交点在ΔABC,则碰撞点即为该交点;
    b2)否则,继续c)步判断;
    c)如果点P,点Q,点R三点不全在*0或*1或*2,则ΔABC与*0肯定相交,根据交线与面*0的相似三角形构建,向量投影求出ΔABC与*0的交点;
    c1)该交点在ΔABC,则碰撞点即为该交点;
    c2)否则,无碰撞点;
    (4)判断点是否在已知三角形的算法如下:建立ΔXYZ,点A在ΔXYZ上,点B在 外;
    对于在ΔXYZ的点有如下特征:
    选取XY边,A,Z两点在同一侧;选取XZ边,A,Y两点在同一侧;选取YZ边,A,X两点在同一侧;
    涉及点是否在已知平面交点获取方法:
    Figure PCTCN2016111383-appb-100006
    Figure PCTCN2016111383-appb-100007
    其中PQ与*0交点F计算如下:
    Figure PCTCN2016111383-appb-100008
    其中:
    Figure PCTCN2016111383-appb-100009
  5. 根据权利要求1所述的基于自然手势的虚拟数字雕塑方法,其特征在于所述步骤S3中,雕塑变形算法的过程如下:当手指不断的向雕塑靠近时,根据碰撞算法可以检测出手指面和雕塑面是否产生碰撞,如果产生碰撞了,则能计算出所有的碰撞点;对于每一个碰撞点,在产生碰撞之后,都必须要朝某一个方向偏移预设定的距离,从而使得雕塑面产生形变;假设P(px,py,pz)为其中一个碰撞点,Q(qx,qy,qz)为碰撞面上距离P最近的一个点,则P点的碰撞距离被定义如下:
    Figure PCTCN2016111383-appb-100010
    点P的运动方向可以被定义如下:
    Orientation(P)=(qx-px,qy-py,qz-pz)    (2)
    有了碰撞距离Dis tan ce(P)和运动方向Orientation(P),就能将点P进行相应的偏移;将所计算出的每一个碰撞点都按照这种方式进行偏移,则雕塑就能实现变形的功能。
PCT/CN2016/111383 2016-09-09 2016-12-21 基于自然手势的虚拟数字雕塑方法 WO2018045670A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610810266.1 2016-09-09
CN201610810266.1A CN106406875B (zh) 2016-09-09 2016-09-09 基于自然手势的虚拟数字雕塑方法

Publications (1)

Publication Number Publication Date
WO2018045670A1 true WO2018045670A1 (zh) 2018-03-15

Family

ID=57998939

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/111383 WO2018045670A1 (zh) 2016-09-09 2016-12-21 基于自然手势的虚拟数字雕塑方法

Country Status (2)

Country Link
CN (1) CN106406875B (zh)
WO (1) WO2018045670A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109191365A (zh) * 2018-06-27 2019-01-11 杭州电子科技大学 一种基于有向长方体的三维空间手写字符维数约简方法
CN109308741A (zh) * 2018-08-08 2019-02-05 长春理工大学 一种基于Meta2的自然交互工艺品创意设计系统
CN113901881A (zh) * 2021-09-14 2022-01-07 燕山大学 一种肌电数据自动标注方法

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108334198B (zh) * 2018-02-09 2021-05-14 华南理工大学 基于增强现实的虚拟雕塑方法
CN109116992B (zh) * 2018-08-31 2020-12-04 北京航空航天大学 一种用于虚拟手力反馈交互的碰撞响应系统
CN110070777B (zh) * 2019-06-13 2021-07-09 大连民族大学 一种赫哲族鱼皮画仿真培训系统及实现方法
CN111429569B (zh) * 2020-03-30 2022-07-26 华南理工大学 一种基于5g+增强现实的人体解剖教学方法

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103914873A (zh) * 2014-03-13 2014-07-09 南京大学 一种根据人体动作驱动的雕塑三维模型生成方法
CN104850226A (zh) * 2015-04-30 2015-08-19 北京农业信息技术研究中心 基于手势识别的三维交互式果树树形修整方法

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140240227A1 (en) * 2013-02-26 2014-08-28 Corel Corporation System and method for calibrating a tracking object in a vision system
EP3107484B1 (en) * 2014-02-21 2022-03-30 Trispera Dental Inc. Augmented reality dental design method and system
CN104866824A (zh) * 2015-05-17 2015-08-26 华南理工大学 一种基于Leap Motion的手语字母识别方法
CN105354031A (zh) * 2015-11-09 2016-02-24 大连交通大学 基于Leap Motion的3D商品展示方法

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103914873A (zh) * 2014-03-13 2014-07-09 南京大学 一种根据人体动作驱动的雕塑三维模型生成方法
CN104850226A (zh) * 2015-04-30 2015-08-19 北京农业信息技术研究中心 基于手势识别的三维交互式果树树形修整方法

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
LU, HAORAN: "Three-dimensional Virtual Reassembling for Broken Artifact Fragments based on Leap motion", JOURNAL OF SYSTEM SIMULATION, vol. 27, no. 12, 31 December 2015 (2015-12-31), pages 3006 - 3011, ISSN: 1004-731X *
REN, YAXIANG: "Survey of human-computer interaction development based on hand posture and gesture recognition", COMPUTER ENGINEERING AND DESIGN, vol. 27, no. 7, 30 April 2006 (2006-04-30), pages 1201 - 1204 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109191365A (zh) * 2018-06-27 2019-01-11 杭州电子科技大学 一种基于有向长方体的三维空间手写字符维数约简方法
CN109191365B (zh) * 2018-06-27 2022-11-25 杭州电子科技大学 一种基于有向长方体的三维空间手写字符维数约简方法
CN109308741A (zh) * 2018-08-08 2019-02-05 长春理工大学 一种基于Meta2的自然交互工艺品创意设计系统
CN113901881A (zh) * 2021-09-14 2022-01-07 燕山大学 一种肌电数据自动标注方法
CN113901881B (zh) * 2021-09-14 2024-05-03 燕山大学 一种肌电数据自动标注方法

Also Published As

Publication number Publication date
CN106406875B (zh) 2019-11-15
CN106406875A (zh) 2017-02-15

Similar Documents

Publication Publication Date Title
WO2018045670A1 (zh) 基于自然手势的虚拟数字雕塑方法
US11543933B2 (en) Manipulating virtual environment using non-instrumented physical object
CN1304931C (zh) 一种头戴式立体视觉手势识别装置
Wang et al. Real-time hand-tracking with a color glove
Ong et al. Augmented assembly technologies based on 3D bare-hand interaction
CN101807114A (zh) 一种基于三维手势的自然交互方法
CN109116992B (zh) 一种用于虚拟手力反馈交互的碰撞响应系统
CN104156068B (zh) 一种基于虚拟手交互特征层模型的虚拟维修交互操作方法
JP2018119833A (ja) 情報処理装置、システム、推定方法、コンピュータプログラム、及び記憶媒体
CN109960403A (zh) 沉浸式环境下针对医学图像的可视化呈现和交互方法
CN108334198A (zh) 基于增强现实的虚拟雕塑方法
Xu et al. Rapid 3D human modeling and animation based on sketch and motion database
JP2008140101A (ja) 無制約、リアルタイム、かつマーカ不使用の手トラッキング装置
CN108664126B (zh) 一种虚拟现实环境下可变形手抓取交互方法
CN1710566A (zh) 虚拟环境中装配工具库建立的方法
CN104217458B (zh) 一种三维点云的快速配准方法
JP2018132319A (ja) 情報処理装置、及び、情報処理装置の制御方法、コンピュータプログラム、記憶媒体
CN109214295B (zh) 基于Kinect v2和Leap Motion的数据融合的手势识别方法
CN103824322B (zh) 利用透视关系交互创建三维曲线的方法及系统
Shi et al. Grasping 3d objects with virtual hand in vr environment
Shi et al. A real-time bimanual 3D interaction method based on bare-hand tracking
Cho et al. 3D volume drawing on a potter's wheel
Wang Real-time hand-tracking as a user input device
Chen et al. Construction Technology of Hand Posture Dataset Based on Virtual Simulation Method
Akgunduz et al. Two-step 3-dimensional sketching tool for new product development

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: 16915604

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 12/07/2019)

122 Ep: pct application non-entry in european phase

Ref document number: 16915604

Country of ref document: EP

Kind code of ref document: A1