WO2017113728A1 - 一种卷页特效的实现方法及系统 - Google Patents

一种卷页特效的实现方法及系统 Download PDF

Info

Publication number
WO2017113728A1
WO2017113728A1 PCT/CN2016/089566 CN2016089566W WO2017113728A1 WO 2017113728 A1 WO2017113728 A1 WO 2017113728A1 CN 2016089566 W CN2016089566 W CN 2016089566W WO 2017113728 A1 WO2017113728 A1 WO 2017113728A1
Authority
WO
WIPO (PCT)
Prior art keywords
page
point
quadrilateral
curling
curl
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.)
Ceased
Application number
PCT/CN2016/089566
Other languages
English (en)
French (fr)
Inventor
许小飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Le Holdings Beijing Co Ltd
Leshi Zhixin Electronic Technology Tianjin Co Ltd
Original Assignee
Le Holdings Beijing Co Ltd
Leshi Zhixin Electronic Technology Tianjin Co Ltd
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 Le Holdings Beijing Co Ltd, Leshi Zhixin Electronic Technology Tianjin Co Ltd filed Critical Le Holdings Beijing Co Ltd
Priority to US15/236,845 priority Critical patent/US20170186233A1/en
Publication of WO2017113728A1 publication Critical patent/WO2017113728A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/00Three-dimensional [3D] image rendering
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/00Three-dimensional [3D] image rendering
    • G06T15/005General purpose rendering architectures

Definitions

  • the present patent application relates to the field of video processing technologies, and in particular, to a method and system for implementing a page curling effect.
  • Watching videos in your spare time is an integral part of people's daily lives.
  • various video sources have increased in number, providing users with many choices for viewing.
  • videos such as ordinary video, 360 video, 3D video, and so on.
  • people are expected to watch various 3D videos through 3D TV in their own homes, and also conveniently use mobile terminals to watch various 3D videos.
  • the video application can provide a video preview function in order to facilitate the user to watch the video.
  • the current video preview function only captures a certain frame of the video image for the recommended video or plays the video in real time. Part of the content lacks vivid performance on the video content.
  • an embodiment of the present invention provides a method for implementing a page curling effect, comprising the steps of: acquiring a virtual reality VR image having transparency; and using a center point of the quadrilateral as an origin of the three-dimensional page curling model,
  • the plane of the quadrilateral is an XY plane, constructing a three-dimensional page-rolling model, and transforming the point coordinates on the quadrilateral into point coordinates after the page is scrolled in the three-dimensional page model; wherein the size of the quadrilateral and the VR image
  • the size of the quadrilateral point is in one-to-one correspondence with the pixel value of the point on the VR image; and the three-dimensional page-rolling model is rendered to obtain a VR image with a page-drawing effect.
  • One embodiment of the present invention provides a computer readable storage medium comprising computer executable instructions that, when executed by at least one processor, cause the processor to perform the above method.
  • An embodiment of the present invention further provides an implementation system for a page curling effect, comprising: an obtaining module, a modeling module, and a rendering module; the obtaining module is configured to acquire a virtual reality VR image with transparency; Taking the center point of the quadrilateral as the origin of the three-dimensional page-rolling model, the plane of the quadrilateral is an XY plane, constructing a three-dimensional page-rolling model, and transforming the point coordinates on the quadrilateral into volume pages in the three-dimensional page-rolling model Point coordinates; wherein the size of the quadrilateral is consistent with the size of the VR image; the pixel value of the inner point of the quadrangle corresponds to the pixel value of the point on the VR image; the rendering module is used according to A virtual reality VR image having transparency is used to render the three-dimensional page curling model to obtain a VR image having a page curling effect.
  • the embodiment of the present invention performs three-dimensional modeling on a virtual reality VR image with transparency, taking the center point of the quadrilateral as the origin, and the plane of the quadrilateral is the XY plane, constructing a three-dimensional page-rolling model, and in three-dimensional Convert the point coordinates on the quadrilateral to a page curl in the page model After the point coordinates, the coordinate-transformed three-dimensional page-rolling model is rendered according to the virtual reality VR image, thereby obtaining a VR image having a page-drawing effect.
  • the present embodiment realizes the effect of the page curling by using the coordinate transformation of the three-dimensional model, thereby making the page curling have a layered feeling, increasing the realism of the page curling, and improving the immersion of the user's viewing.
  • the quadrilateral in the step of constructing the three-dimensional page roll model, is subdivided along the page curl direction to obtain a plurality of meshes; in the step of rendering the three-dimensional page roll model, All meshes are rendered in turn, in order of the Z values of the grid from small to large. This way of rendering makes the page curling effect more realistic.
  • the width of each of the meshes resulting from the subdivision is less than the page radius. Therefore, the VR image can be subdivided according to the size of the page curl radius, thereby obtaining a more delicate page curling effect.
  • the quadrilateral in the step of subdividing the quadrilateral, is equally spaced.
  • the curling effect has better fluency, increases the fidelity of the page curling effect, and improves the immersion of the user's viewing.
  • FIG. 1 is a flow chart showing a method of implementing a page curl effect according to a first embodiment of the present invention
  • FIG. 2 is a schematic view of a three-dimensional scrolling model roll sheet according to a first embodiment of the present invention
  • FIG. 3 is a view showing an example of a VR image before the page of the page according to the method for realizing the page curl effect according to the first embodiment of the present invention
  • FIG. 4 is a view showing an example of an effect after scrolling a VR image according to FIG. 3;
  • Fig. 5 is a block diagram showing the structure of an implementation system for page curling effects according to the first embodiment of the present invention.
  • a first embodiment of the present invention relates to a method for implementing a page curling effect.
  • the specific process is as shown in FIG. 1 and includes the following steps:
  • Step 101 Acquire a virtual reality VR image with transparency.
  • Transparency refers to the transparency and translucency of an image, which can affect the effect of multiple image overlays, especially with the development of 3D video and Virtual Reality (VR) technology.
  • VR Virtual Reality
  • Step 102 taking the center point of the quadrilateral as the origin of the three-dimensional page-rolling model, the plane of the quadrilateral is the XY plane, constructing a three-dimensional page-rolling model, and transforming the point coordinates on the quadrilateral into point coordinates after the page is scrolled in the three-dimensional page-rolling model.
  • the size of the quadrilateral coincides with the size of the VR image
  • the pixel value of the point inside the quadrangle corresponds to the pixel value of the point on the VR image.
  • constructing the three-dimensional volume page model includes sub-steps 1020 - sub-step 1028:
  • Sub-step 1020 taking the center point of the quadrilateral as the origin and the plane of the quadrilateral as the XY plane, constructing a three-dimensional page-rolling model, and subdividing the quadrilateral along the page-rolling direction to obtain a plurality of grids.
  • a three-dimensional volume page model is constructed. As shown in Fig. 2, a three-dimensional page-rolling model is constructed with the center point of the quadrilateral as the origin and the plane of the quadrilateral as the XY plane. The size of the quadrilateral is the same as the size of the VR image, that is, the entire VR image is scrolled.
  • the quadrilateral can be divided into multiple parts in any direction to obtain n grids. The larger the value of n, the more the quadrilateral is subdivided, and the more accurate the coordinates of the three-dimensional page-rolling model are. The effect of the page curl is more delicate.
  • the quadrilateral is subdivided along the page curling direction.
  • the oblique lines in the quadrilateral in the figure are the subdivided lines, and all the subdivided lines are parallel to each other and perpendicular to the connecting line 201.
  • the two subdivided lines 202, 203 and the partially quadrilateral sides 204, 205 in the figure form a grid.
  • the equal division of the quadrilateral can make the curling effect have better fluency, increase the fidelity of the curling effect, and improve the immersion of the user.
  • the width w of each mesh obtained by subdivision is smaller than the radius of the page, and the VR image can be subdivided according to the size of the page radius, thereby obtaining a more delicate page curling effect.
  • Sub-step 1021 Determine the start and end points of the volume page.
  • the starting point of the page is the point in the quadrilateral vertices that is the first to participate in the page in the direction of the page, and the point is the point at which the vertices of the quad are finally involved in the page in the direction of the page.
  • the direction of the bottomRight and the point F connection 201 is the page orientation. It can be seen that the point that first participates in the page is bottomRight, and the point that participates in the page is topLeft.
  • Sub-step 1022 Determine the boundary line of each page according to the start point of the page, the end point, the page orientation, and the page time.
  • Line_topLeft is also perpendicular to the page orientation. Therefore, Line_topLeft is parallel to the subdivision line, that is, Line_topLeft can also be obtained by topLeft as a parallel line of the subdivision line.
  • the time period into several segments and advance by time to generate volume page graphs at different times.
  • the general time takes a value between 0 and 1 second.
  • the interpolation point P(x1, y1) intp(bottomRight(x, y), F(x, y), t) of bottomRight to point F is calculated first.
  • the third straight line Line_montion and its normal vector perpendicular to the second straight line are obtained, and the obtained third straight line is the dividing line.
  • the angle angle ie, the angle alpha in the figure
  • the slope k tan(angle)
  • the crossing point P(x1, y1) the crossing point P(x1, y1)
  • the normal vector N(fX,fY) (k,-1) of the boundary.
  • the point coordinates after converting the point coordinates on the quadrilateral into the page curl in the three-dimensional page-rolling model are implemented in steps 1023 to 1028.
  • Sub-step 1023 Calculate the distance distance from any point on the quadrilateral to the boundary line.
  • k is the fX component of the normal vector N
  • -1 is the fY component of the normal vector N.
  • Sub-step 1024 Determine if distance is less than or equal to zero. If distance is greater than 0, step 1025 is performed. If distance is less than or equal to 0, step 1026 is performed.
  • Sub-step 1025 Determine if the Distance is less than the circumference of the curled circumference. If Distance is less than the circumference of the curled circle, then step 1027 is performed if the distance is greater than or equal to the curled circle For the perimeter of the week, step 1028 is performed.
  • Sub-step 1026 The coordinates of the point are unchanged, that is, the point does not participate in the page.
  • Sub-step 1027 Calculate the point coordinates of the page corresponding to the point by using the volume page calculation formula.
  • the distance is greater than zero and less than the circumference of the curled circle, it means that the page is started, and the coordinates of the point vertices(x, y, z) of the point after the page is calculated as follows:
  • Vertices.x ptCoiling.fX+N.fX*sinAlpha;
  • Vertices.y ptCoiling.fY+N.fY*sinAlpha;
  • Vertices.z (1-cos(alpha))*R;
  • Ptcoiling represents the coordinates of the point after the two-dimensional movement, which is an intermediate value
  • sinAlpha R*sin(alpha), sin(alpha), cos(alpha) are the sine and cosine values of the angle alpha, respectively;
  • N.fX, N.fY are the two components of the normal vector N of the boundary line
  • Vertices.x, vertices.y, vertices.z are the three components of the coordinates of the point after the page.
  • Sub-step 1028 Calculate the point coordinates of the page corresponding to the point by using the continuous page calculation formula.
  • step 1027 participates in the scrolling point and continues the reel.
  • the coordinates of the point after the reel are calculated as follows: x, y, z:
  • Beta distance/[R*(1-t/2)]
  • Vertices.x ptCoiling.fX+N.fX*sinBeta;
  • Vertices.y ptCoiling.fY+N.fY*sinBeta;
  • Vertices.z (1-cos(beta))*R*(1-t/2);
  • step 103 is executed to render the three-dimensional page-rolling model according to the virtual reality VR image with transparency to obtain a VR image with page curling effects.
  • FIG. 3 An example of the virtual reality VR image before the page is described in the present embodiment is shown in FIG. 3, and FIG. 4 is a view showing an example of the effect after the page is obtained by the page winding method of the present embodiment.
  • all the grids can be rendered in order according to the Z value of the grid from small to large, which can make the effect of the page curl more realistic.
  • the Z value of the grid may be the Z coordinate value of the center point of the grid.
  • the present embodiment converts the point coordinates on the quadrilateral into point coordinates after the page is scrolled in the created three-dimensional page roll model. Since the quadrilateral is divided into multiple parts in the embodiment, and the point coordinates after the page is calculated by interpolation, the effect of the page can be presented in real time according to the rhythm of the page, so that the virtual reality VR image has a strong sense of layering, thereby increasing The reality of virtual reality VR movies or pictures during preview, enhances the immersion of the user's viewing.
  • the second embodiment of the present invention relates to an implementation system for page curling effects, which can be applied to various types of video applications, including an acquisition module, a modeling module, and a rendering module, as shown in FIG.
  • the acquisition module is used to acquire a virtual reality VR image with transparency.
  • the modeling module is used to construct the three-dimensional page-rolling model by using the center point of the quadrilateral as the origin of the three-dimensional page-rolling model, and the plane of the quadrilateral is the XY plane, and the modeling module is also used for the quadrilateral along the page turning direction.
  • the line is subdivided to obtain multiple grids, and the point coordinates on the quadrilateral subdivided into multiple copies are transformed into point coordinates after the page is scrolled in the three-dimensional page model.
  • the size of the quadrilateral is consistent with the size of the VR image, and the pixel value of the point inside the quadrilateral corresponds to the pixel value of the point on the VR image.
  • the modeling module further comprises: a point acquisition module, a line acquisition module, a distance acquisition module, and a volume page coordinate calculation module.
  • the point acquisition module is used to determine the start and end points of the volume page, wherein the starting point is the point in the quadrilateral vertices that is the first to participate in the page in the direction of the page, and the end point is the last of the vertices in the direction of the page in the direction of the page. Point.
  • the line acquisition module is used to determine the boundary line of each page according to the start point, end point, page orientation, and page time of the page.
  • the distance acquisition module is used to calculate the distance from any point on the quadrilateral to the boundary line.
  • the page turning coordinate calculation module is configured to calculate the point coordinates of the page corresponding to the point and calculate the distance calculated by the distance acquiring module when the distance calculated by the distance obtaining module is greater than zero and less than the circumference of the curling circle.
  • the point coordinate after the page corresponding to the point is calculated by using the continuous page calculation formula.
  • the circumference of the curling circle is calculated according to the radius of the page, and the calculation formula of the coordinates of the point after the page is the same as that in the first embodiment, and details are not described herein again.
  • the rendering module is configured to render the three-dimensional page-rolling model according to the VR image with transparency, that is, according to the order of the Z value of the grid from small to large, all the meshes are sequentially rendered to obtain a VR image with page curling effects. .
  • the present embodiment is a system embodiment corresponding to the first embodiment, and the present embodiment can be implemented in cooperation with the first embodiment.
  • the related technical details mentioned in the first embodiment are still effective in the present embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related art details mentioned in the present embodiment can also be applied to the first embodiment.
  • each module involved in this embodiment is a logic module.
  • a logical unit may be a physical unit, a part of a physical unit, or multiple physical entities. A combination of units is implemented.
  • the present embodiment does not have a single relationship that is not closely related to solving the technical problem proposed by the present invention. The introduction of elements, but this does not mean that there are no other units in this embodiment.
  • the steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two.
  • Software modules can reside in random access memory (RAM), flash memory, read only memory (ROM), programmable read only memory (PROM), erasable read only memory (PROM), erasable and programmable only Read memory (EPROM), electrically erasable programmable read only memory (EEPROM), registers, hard disk, removable disk, compact disk read only memory (CD-ROM), or any other form known in the art Storage media.
  • the storage medium may be integral to the processor.
  • the processor and the storage medium can reside in an application specific integrated circuit (ASIC).
  • the ASIC can reside in a computing device or user terminal, or the processor and storage medium can reside as discrete components in a computing device or user terminal.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Graphics (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

一种卷页特效的实现方法及系统,该方法包括:获取具有透明度的虚拟现实VR图像(101);以四边形的中心点为三维卷页模型的原点,四边形所在平面为XY平面,构建三维卷页模型,并在三维卷页模型中将四边形上的点坐标变换成卷页后的点坐标;其中,四边形的尺寸与VR图像的尺寸一致(102);根据具有透明度的虚拟现实VR图像,对三维卷页模型进行渲染,得到具有卷页特效的VR图像(103)。采用该方法及装置,使得具有透明度的虚拟现实VR图像在卷页时富有层次感,增加了卷页的真实感,提高观看的沉浸感。

Description

一种卷页特效的实现方法及系统
交叉引用
本申请引用于2015年12月27日递交的第201511005809.4号中国专利申请,其通过引用被全部并入本申请。
技术领域
本专利申请涉及视频处理技术领域,特别涉及一种卷页特效的实现方法及系统。
背景技术
闲暇之余观看视频是人们日常生活中不可或缺的部分。随着视频技术的蓬勃发展,各类视频源井喷式增加,给用户观影提供了众多选择。目前,视频的种类多种多样,如普通视频、360视频、3D视频等等。并且随着3D视频产量以及质量的不断提升以及观影技术的迅速发展,人们可望在自己家中通过3D电视观看各类3D视频,并且也可方便地使用移动终端观看各类3D视频。
发明人在实现本发明的过程中发现,为了方便用户观看视频,视频应用可以提供视频预览功能,然而,目前的视频预览功能仅是针对推荐视频截取某一帧视频图像进行显示或者实时播放视频中的一部分内容,缺乏对视频内容的生动表现。
发明内容
本发明部分实施例的目的在于提供一种卷页特效的实现方法及系统,使得具有透明度的虚拟现实VR图像在卷页时富有层次感,增加了卷页的真实感,提高观看的沉浸感。
为解决上述技术问题,本发明的实施方式提供了一种卷页特效的实现方法,包含以下步骤:获取具有透明度的虚拟现实VR图像;以四边形的中心点为三维卷页模型的原点,所述四边形所在平面为XY平面,构建三维卷页模型,并在三维卷页模型中将所述四边形上的点坐标变换成卷页后的点坐标;其中,所述四边形的尺寸与所述VR图像的尺寸一致;所述四边形内点的像素值与所述VR图像上点的像素值一一对应;对所述三维卷页模型进行渲染,得到具有卷页特效的VR图像。
本发明的一个实施例提供了一种计算机可读存储介质,包括计算机可执行指令,所述计算机可执行指令在由至少一个处理器执行时致使所述处理器执行上述方法。
本发明的实施方式还提供了一种卷页特效的实现系统,包含:获取模块,建模模块和渲染模块;所述获取模块用于获取具有透明度的虚拟现实VR图像;所述建模模块用于以四边形的中心点为所述三维卷页模型的原点,所述四边形所在平面为XY平面,构建三维卷页模型,并在三维卷页模型中将所述四边形上的点坐标变换成卷页后的点坐标;其中,所述四边形的尺寸与所述VR图像的尺寸一致;所述四边形内点的像素值与所述VR图像上点的像素值一一对应;所述渲染模块用于根据具有透明度的虚拟现实VR图像,对所述三维卷页模型进行渲染,得到具有卷页特效的VR图像。
本发明实施方式相对于现有技术而言,对具有透明度的虚拟现实VR图像进行三维建模,以四边形的中心点为原点,四边形所在平面为XY平面,构建出三维卷页模型,并在三维卷页模型中将四边形上的点坐标变换成卷页 后的点坐标,根据虚拟现实VR图像,对坐标变换后的三维卷页模型进行渲染,从而得到具有卷页特效的VR图像。由此可见,本实施方式通过利用三维模型的坐标变换实现卷页的效果,从而使得卷页时具有富有层次感,增加了卷页的真实感,能够提高用户观看的沉浸感。
在一个实施例中,在所述构建三维卷页模型的步骤中,沿卷页方向对所述四边形进行细分,得到多个网格;在对所述三维卷页模型进行渲染的步骤中,按照网格的Z值从小到大的顺序,依次对所有网格进行渲染。通过这种渲染方式,可以使得卷页效果更加真实。
在一个实施例中,所述细分得到的各网格的宽度小于所述卷页半径。从而可以根据卷页半径的大小对VR图像进行细分,进而得到较为细腻的卷页效果。
在一个实施例中,在所述对所述四边形进行细分的步骤中,对所述四边形进行等间隔划分。从而使得卷页效果具有较佳的流畅性,增加卷页效果的逼真度,提高用户观看的沉浸感。
附图说明
图1是根据本发明第一实施方式卷页特效的实现方法的流程图;
图2是根据本发明第一实施方式三维卷页模型卷页的示意图;
图3是根据本发明第一实施方式卷页特效的实现方法的卷页前的VR图像示例图;
图4是根据图3的VR图像卷页后的效果示例图;
图5是根据本发明第一实施方式卷页特效的实现系统的结构框图。
具体实施方式
为使本发明部分实施例的目的、技术方案和优点更加清楚,下面将结合附图对本发明的各实施方式进行详细的阐述。然而,本领域的普通技术人员可以理解,在本发明各实施方式中,为了使读者更好地理解本申请而提出了许多技术细节。但是,即使没有这些技术细节和基于以下各实施方式的种种变化和修改,也可以实现本申请所要求保护的技术方案。
本发明的第一实施方式涉及一种卷页特效的实现方法,具体流程如图1所示,包含以下步骤:
步骤101:获取具有透明度的虚拟现实VR图像。
透明度是指一张图片的透明、半透明程度,其能够影响到多张图片复叠的效果,特别是随着3D视频以及虚拟现实(Virtual Reality,虚拟现实,简称VR)技术的发展,产生了大量的虚拟现实影片、图片等,在该些虚拟现实影片、图片等中存在大量具有透明度的图像。
步骤102:以四边形的中心点为三维卷页模型的原点,四边形所在平面为XY平面,构建三维卷页模型,并在三维卷页模型中将四边形上的点坐标变换成卷页后的点坐标。本实施方式中四边形的尺寸与VR图像的尺寸一致,并且四边形内点的像素值与VR图像上点的像素值一一对应。具体而言,构建三维卷页模型包含子步骤1020~子步骤1028:
子步骤1020:以四边形的中心点为原点,四边形所在平面为XY平面,构建三维卷页模型,沿卷页方向对四边形进行细分,得到多个网格。
首先,基于获取的VR图像,构建三维卷页模型。如图2所示,以四边形的中心点为原点,以四边形所在平面为XY平面,构建三维卷页模型。其中,四边形的尺寸与VR图像的尺寸一致,即对整个VR图像进行卷页。为了计算四边形的顶点和纹理坐标,可以沿任意方向将四边形划分为多份,得到n个网格,n的值越大,四边形细分得越多,三维卷页模型的坐标越精确, 卷页的效果越细腻。
请参阅图2所示,假设四边形的4个顶点分别为topLeft,topRight,bottomLeft,bottomRight,从右下角bottomRight向左上角topLeft卷页,卷页方向为bottomRight与点F连线201的方向,那么可以沿卷页方向对四边形进行细分,图中四边形内的斜线即为细分线,所有细分线之间相互平行,且与连线201垂直。图中两条细分线202,203与部分四边形的边204,205构成一个网格。
此外,需要说明的是,对四边形进行等间隔划分,可以使得卷页效果具有较佳的流畅性,增加卷页效果的逼真度,提高用户观看的沉浸感。另外,细分得到的各网格的宽度w小于卷页半径,可以根据卷页半径的大小对VR图像进行细分,进而得到较为细腻的卷页效果。
子步骤1021:确定卷页起始点和终点。
卷页起始点为四边形各顶点中在卷页方向上最先参与卷页的点,终点为四边形各顶点在卷页方向上最后参与卷页的点。图2所示卷页模型中,bottomRight与点F连线201的方向为卷页方向,可以看出,最先参与卷页的点是bottomRight,最后参与卷页的点是topLeft。
子步骤1022:根据卷页起始点,终点,卷页方向以及卷页时间,确定每次卷页的分界线。
具体而言,可以通过以下步骤确定卷页的分界线:
1、计算经过终点topLeft,并与卷页方向垂直的第一直线Line_topLeft。
由于四边形内的细分线与卷页方向垂直,Line_topLeft也与卷页方向垂直,因此,Line_topLeft与细分线平行,也就是说,也可以通过topLeft作细分线的平行线得到Line_topLeft。
2、计算经过起始点bottomRight,并与第一直线垂直的第二直线(也就 是,连线201),以及第一直线和第二直线的交点F。
3、沿第二直线201从起始点bottomRight至交点F进行插值。
假设需要在time时间内完成卷页特效,为了实现比较细腻的卷页效果,可以将time时间段分成若干段,按时间推进,生成不同时间的卷页图。较为简单的方法是将time划分成与网格数相同的数目,也就是说,每次卷页向前推进一个网格,那么插值间隔为t=time/n。在实际实现中,一般time在0~1秒之间取值。
在实际计算时,以t为插值因子,先计算bottomRight到点F的插值点P(x1,y1)=intp(bottomRight(x,y),F(x,y),t)。
然后经过每一个插值点,求得与第二直线垂直的第三直线Line_montion及其法向量,所求得的第三直线即为分界线。具体地说,已知角度angle(即图中角度alpha),斜率k=tan(angle),过点P(x1,y1),求得分界线Line_montion的方程kx-y+y1-kx1=0以及分界线的法向量N(fX,fY)=(k,-1)。
通过上述步骤,确定每次卷页的分界线之后,在步骤1023至1028中实现在三维卷页模型中将四边形上的点坐标变换成卷页后的点坐标。
子步骤1023:计算四边形上的任意点到分界线的距离distance。
设定卷页半径为R,四边形上任意一点(x,y)到直线line_montion的距离可采用下式计算:
distance=(k*x+(-1)*y+y1-k*x1)/(k*k+1)。
其中,k为法向量N的fX分量,-1为法向量N的fY分量。
子步骤1024:判断distance是否小于或者等于0。如果distance大于0,则执行步骤1025,如果distance小于或者等于0,则执行步骤1026。
子步骤1025:判断Distance是否小于卷曲圆周的周长。如果Distance小于卷曲圆周的周长,则执行步骤1027,如果distance大于或者等于卷曲圆 周的周长,则执行步骤1028。
子步骤1026:该点坐标不变,即该点不参与卷页。
子步骤1027:采用卷页计算公式计算该点对应的卷页后的点坐标。
若distance大于零且小于卷曲圆周的周长,则表示开始卷页,卷页后的点的坐标vertices(x,y,z)的计算公式如下:
ptCoiling.fX=x-N.fX*distance;
ptCoiling.fY=y-N.fY*distance;
vertices.x=ptCoiling.fX+N.fX*sinAlpha;
vertices.y=ptCoiling.fY+N.fY*sinAlpha;
vertices.z=(1-cos(alpha))*R;
式中,Ptcoiling代表二维方向移动后的点的坐标,是一个中间值,ptCoiling.fX,ptCoiling.fY表示该坐标的两个分量;
sinAlpha=R*sin(alpha),sin(alpha),cos(alpha)分别为角度alpha的正弦值和余弦值;
N.fX,N.fY分别为分界线的法向量N的两个分量;
vertices.x,vertices.y,vertices.z分别为卷页后的点的坐标的三个分量。
子步骤1028:采用继续卷页计算公式计算该点对应的卷页后的点坐标。
若distance大于零且大于卷曲圆周的周长,则表示步骤1027参与过卷页的点继续卷轴,卷轴后的点的坐标vertices(x,y,z)计算方式如下:
beta=distance/[R*(1-t/2)];
sinBeta=R*(1-t/2)*sin(beta);
vertices.x=ptCoiling.fX+N.fX*sinBeta;
vertices.y=ptCoiling.fY+N.fY*sinBeta;
vertices.z=(1-cos(beta))*R*(1-t/2);
式中,sin(beta),cos(beta)分别为角度beta的正弦值和余弦值。
需要说明的是,这里举例说明了右下角向左上角卷页的计算公式,应当理解,任意方向卷页时卷页后的坐标的计算,根据上述公式适当做修改即可。
在建立三维卷页模型,并在三维卷页模型中将四边形上的点坐标变换成 卷页后的点坐标之后,执行步骤103,根据具有透明度的虚拟现实VR图像,对三维卷页模型进行渲染,得到具有卷页特效的VR图像。
具体而言,由于在三维卷页模型建立阶段,图像纹理坐标(也就是每一个点的像素值)就已经建立好了一一对应的关系,后续卷页过程中,纹理坐标不发生变化,变化的只是顶点坐标。当发生卷页的时候,图像会随着顶点的移动而移动。如图3所示为本实施方式卷页前的虚拟现实VR图像的一个示例,图4为采用本实施方式的卷页方法得到的卷页后的一个效果示例图。
此外,值得一提的是,可以按照网格的Z值从小到大的顺序,依次对所有网格进行渲染,可以使据卷页效果更加真实。其中,网格的Z值可以为网格中心点的Z坐标值。
由此可见,本实施方式在创建的三维卷页模型中将四边形上的点坐标变换成卷页后的点坐标。由于本实施方式将四边形分成多份,且采用插值方式计算卷页后的点坐标,从而可以根据卷页的节奏实时呈现卷页的效果,使得虚拟现实VR图像具有较强的层次感,从而增加虚拟现实VR影片或者图片等在预览时的真实感,提高用户观影的沉浸感。
上面各种方法的步骤划分,只是为了描述清楚,实现时可以合并为一个步骤或者对某些步骤进行拆分,分解为多个步骤,只要包含相同的逻辑关系,都在本专利的保护范围内;对算法中或者流程中添加无关紧要的修改或者引入无关紧要的设计,但不改变其算法和流程的核心设计都在该专利的保护范围内。
本发明第二实施方式涉及一种卷页特效的实现系统,该系统可以应用于各类视频应用中,包含获取模块,建模模块和渲染模块,如图5所示。
获取模块用于获取具有透明度的虚拟现实VR图像。
建模模块用于以四边形的中心点为三维卷页模型的原点,四边形所在平面为XY平面,构建三维卷页模型,建模模块还用于沿卷页方向对四边形进 行细分,得到多个网格,并在三维卷页模型中将细分为多份的四边形上的点坐标变换成卷页后的点坐标。其中,四边形的尺寸与VR图像的尺寸一致,并且四边形内点的像素值与VR图像上点的像素值一一对应。
建模模块进一步包含:点获取模块,线获取模块,距离获取模块,卷页坐标计算模块。点获取模块用于确定卷页起始点和终点,其中,起始点为四边形各顶点中在卷页方向上最先参与卷页的点,终点为四边形各顶点中在卷页方向上最后参与卷页的点。线获取模块用于根据卷页起始点,终点,卷页方向以及卷页时间,确定每次卷页的分界线。距离获取模块用于计算四边形上的任意点到分界线的距离。卷页坐标计算模块用于在距离获取模块计算得到的距离大于零且小于卷曲圆周的周长时,采用卷页计算公式计算该点对应的卷页后的点坐标,并在距离获取模块计算得到的距离大于或者等于卷曲圆周的周长时,采用继续卷页计算公式计算该点对应的卷页后的点坐标。其中,卷曲圆周的周长根据卷页半径计算得到,卷页后点坐标的计算公式与第一实施方式中相同,在此不再赘述。
渲染模块用于根据具有透明度的虚拟现实VR图像,对三维卷页模型进行渲染,即按照网格的Z值从小到大的顺序,依次对所有网格进行渲染,得到具有卷页特效的VR图像。
不难发现,本实施方式为与第一实施方式相对应的系统实施例,本实施方式可与第一实施方式互相配合实施。第一实施方式中提到的相关技术细节在本实施方式中依然有效,为了减少重复,这里不再赘述。相应地,本实施方式中提到的相关技术细节也可应用在第一实施方式中。
值得一提的是,本实施方式中所涉及到的各模块均为逻辑模块,在实际应用中,一个逻辑单元可以是一个物理单元,也可以是一个物理单元的一部分,还可以以多个物理单元的组合实现。此外,为了突出本发明的创新部分,本实施方式中并没有将与解决本发明所提出的技术问题关系不太密切的单 元引入,但这并不表明本实施方式中不存在其它的单元。
结合本文中所揭示的实施例而描述的方法或算法的步骤可直接体现于硬件中,由处理器执行的软件模块中或所述两者的组合中。软件模块可驻留在随机存取存储器(RAM)、快闪存储器、只读存储器(ROM)、可编程只读存储器(PROM),可擦除只读存储器(PROM)、可擦除可编程只读存储器(EPROM)、电可擦除可编程只读存储器(EEPROM)、寄存器、硬盘、可装卸式盘、压缩光盘只读存储器(CD-ROM)或此项技术中已知的任一其他形式的存储媒体。在替代方案中,存储媒体可与处理器成一体式。处理器及存储媒体可驻留在专用集成电路(ASIC)中。ASIC可驻留在计算装置或用户终端中,或者,处理器及存储媒体可作为离散组件驻留在计算装置或用户终端中。
本领域的普通技术人员可以理解,上述各实施方式是实现本发明的具体实施例,而在实际应用中,可以在形式上和细节上对其作各种改变,而不偏离本发明的精神和范围。

Claims (10)

  1. 一种卷页特效的实现方法,包含以下步骤:
    获取具有透明度的虚拟现实VR图像;
    以四边形的中心点为三维卷页模型的原点,所述四边形所在平面为XY平面,构建三维卷页模型,并在三维卷页模型中将所述四边形上的点坐标变换成卷页后的点坐标;其中,所述四边形的尺寸与所述VR图像的尺寸一致;所述四边形内点的像素值与所述VR图像上点的像素值一一对应;
    对所述三维卷页模型进行渲染,得到具有卷页特效的VR图像。
  2. 根据权利要求1所述的卷页特效的实现方法,其中,在所述构建三维卷页模型的步骤中,包含以下子步骤:
    确定卷页起始点和终点;其中,所述起始点为所述四边形各顶点中在卷页方向上最先参与卷页的点,所述终点为所述四边形各顶点中在卷页方向上最后参与卷页的点;
    根据所述卷页起始点,终点,卷页方向以及卷页时间,确定每次卷页的分界线;
    在所述在三维卷页模型中将所述四边形上的点坐标变换成卷页后的点坐标的步骤中,包含以下子步骤:
    计算所述四边形上的任意点到所述分界线的距离;
    如果所述计算得到的距离大于零且小于卷曲圆周的周长,则采用卷页计算公式计算该点对应的卷页后的点坐标;
    如果所述计算得到的距离大于或者等于卷曲圆周的周长,则采用继续卷页计算公式计算该点对应的卷页后的点坐标;
    其中,所述卷曲圆周的周长根据卷页半径计算得到。
  3. 根据权利要求2所述的卷页特效的实现方法,其中,在所述根据所述卷页起始点,终点,卷页方向以及卷页时间,确定每次卷页的分界线的步骤中,包含以下子步骤:
    计算经过所述终点,并与所述卷页方向垂直的第一直线;
    计算经过所述起始点,并与所述第一直线垂直的第二直线,以及第一直线和第二直线的交点;
    沿第二直线从所述起始点至所述交点进行插值;
    经过每一个插值点,求得与所述第二直线垂直的第三直线及其法向量;其中,所述第三直线为所述分界线。
  4. 根据权利要求1至3中任一项所述的卷页特效的实现方法,其中,在所述构建三维卷页模型的步骤中,沿卷页方向对所述四边形进行细分,得到多个网格;
    在对所述三维卷页模型进行渲染的步骤中,按照网格的Z值从小到大的顺序,依次对所有网格进行渲染。
  5. 根据权利要求4所述的卷页特效的实现方法,其中,所述细分得到的各网格的宽度小于所述卷页半径。
  6. 根据权利要求4所述的卷页特效的实现方法,其中,,在所述对所述四边形进行细分的步骤中,对所述四边形进行等间隔划分。
  7. 根据权利要求4所述的卷页特效的实现方法,其中,所述网格的Z值为所述网格中心点的Z坐标值。
  8. 一种卷页特效的实现系统,其中,包含:获取模块,建模模块和渲染模块;
    所述获取模块用于获取具有透明度的虚拟现实VR图像;
    所述建模模块用于以四边形的中心点为所述三维卷页模型的原点,所述 四边形所在平面为XY平面,构建三维卷页模型,并在三维卷页模型中将所述四边形上的点坐标变换成卷页后的点坐标;其中,所述四边形的尺寸与所述VR图像的尺寸一致;所述四边形内点的像素值与所述VR图像上点的像素值一一对应;
    所述渲染模块用于根据具有透明度的虚拟现实VR图像,对所述三维卷页模型进行渲染,得到具有卷页特效的VR图像。
  9. 根据权利要求8所述的卷页特效的实现系统,其中,所述建模模块包含:点获取模块,线获取模块,距离获取模块,卷页坐标计算模块;
    所述点获取模块用于确定卷页起始点和终点;其中,所述起始点为所述四边形各顶点中在卷页方向上最先参与卷页的点,所述终点为所述四边形各顶点中在卷页方向上最后参与卷页的点;
    所述线获取模块用于根据所述卷页起始点,终点,卷页方向以及卷页时间,确定每次卷页的分界线;
    所述距离获取模块用于计算所述四边形上的任意点到所述分界线的距离;
    所述卷页坐标计算模块用于在所述距离获取模块计算得到的距离大于零且小于卷曲圆周的周长时,采用卷页计算公式计算该点对应的卷页后的点坐标;并在所述距离获取模块计算得到的距离大于或者等于卷曲圆周的周长时,采用继续卷页计算公式计算该点对应的卷页后的点坐标;
    其中,所述卷曲圆周的周长根据卷页半径计算得到。
  10. 根据权利要求8或9所述的卷页特效的实现系统,其中,所述建模模块还用于沿卷页方向对所述四边形进行细分,得到多个网格;
    所述渲染模块还用于按照网格的Z值从小到大的顺序,依次对所有网格进行渲染。
PCT/CN2016/089566 2015-12-27 2016-07-10 一种卷页特效的实现方法及系统 Ceased WO2017113728A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/236,845 US20170186233A1 (en) 2015-12-27 2016-08-15 Method and electronic device for implementing page scrolling special effect

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201511005809.4A CN105913473A (zh) 2015-12-27 2015-12-27 一种卷页特效的实现方法及系统
CN2015110058094 2015-12-27

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/236,845 Continuation US20170186233A1 (en) 2015-12-27 2016-08-15 Method and electronic device for implementing page scrolling special effect

Publications (1)

Publication Number Publication Date
WO2017113728A1 true WO2017113728A1 (zh) 2017-07-06

Family

ID=56744262

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/089566 Ceased WO2017113728A1 (zh) 2015-12-27 2016-07-10 一种卷页特效的实现方法及系统

Country Status (2)

Country Link
CN (1) CN105913473A (zh)
WO (1) WO2017113728A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113111035A (zh) * 2021-04-09 2021-07-13 上海掌门科技有限公司 特效视频生成方法和设备

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115409930B (zh) * 2022-10-31 2023-02-14 深圳市趣推科技有限公司 电子页面的卷轴模拟方法、装置、设备及存储介质
CN117729349B (zh) * 2023-05-16 2025-02-25 书行科技(北京)有限公司 特效视频生成方法、装置、电子设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101226645A (zh) * 2008-02-18 2008-07-23 朱东晖 一种在二维图像中实现物体透视变化效果的方法
CN102467756A (zh) * 2010-10-29 2012-05-23 国际商业机器公司 用于三维场景的透视方法及装置
CN102724443A (zh) * 2011-05-17 2012-10-10 新奥特(北京)视频技术有限公司 一种二维字幕的卷页方式的变形方法及系统
CN102780851A (zh) * 2012-05-31 2012-11-14 新奥特(北京)视频技术有限公司 一种转场特技的实现方法
US20150138188A1 (en) * 2013-11-15 2015-05-21 Sony Corporation Method, apparatus and system for image processing

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6674484B1 (en) * 2000-01-10 2004-01-06 Koninklijke Philips Electronics N.V. Video sample rate conversion to achieve 3-D effects
US6975334B1 (en) * 2003-03-27 2005-12-13 Systems Paving Method and apparatus for simulating the appearance of paving stone on an existing driveway
CN103970432B (zh) * 2014-04-28 2017-06-16 深圳市云宙多媒体技术有限公司 一种模拟真实翻页效果的方法与装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101226645A (zh) * 2008-02-18 2008-07-23 朱东晖 一种在二维图像中实现物体透视变化效果的方法
CN102467756A (zh) * 2010-10-29 2012-05-23 国际商业机器公司 用于三维场景的透视方法及装置
CN102724443A (zh) * 2011-05-17 2012-10-10 新奥特(北京)视频技术有限公司 一种二维字幕的卷页方式的变形方法及系统
CN102780851A (zh) * 2012-05-31 2012-11-14 新奥特(北京)视频技术有限公司 一种转场特技的实现方法
US20150138188A1 (en) * 2013-11-15 2015-05-21 Sony Corporation Method, apparatus and system for image processing

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113111035A (zh) * 2021-04-09 2021-07-13 上海掌门科技有限公司 特效视频生成方法和设备

Also Published As

Publication number Publication date
CN105913473A (zh) 2016-08-31

Similar Documents

Publication Publication Date Title
CN114549731B (zh) 视角图像的生成方法、装置、电子设备及存储介质
WO2017113731A1 (zh) 360度全景显示方法、显示模块及移动终端
CN104010180B (zh) 三维视频滤波方法和装置
WO2022042124A1 (zh) 超分辨率图像重建方法、装置、计算机设备和存储介质
CN112652046A (zh) 游戏画面的生成方法、装置、设备及存储介质
KR102327972B1 (ko) 프로젝션 이미지 구성 방법 및 디바이스
CN110689626A (zh) 游戏模型渲染方法和装置
CN111316319A (zh) 图像处理方法、电子设备及计算机可读存储介质
CN112581632B (zh) 一种房源数据的处理方法和装置
CN114452646A (zh) 虚拟对象透视处理方法、装置及计算机设备
WO2017113728A1 (zh) 一种卷页特效的实现方法及系统
WO2025020734A1 (zh) 新视点图像生成方法、新视点生成模型的训练方法与装置
CN113920282B (zh) 图像处理方法和装置、计算机可读存储介质、电子设备
CN103955960B (zh) 一种基于单幅输入图像的图像视点变换方法
WO2019052338A1 (zh) 图像处理方法和装置、存储介质及电子装置
CN115018968A (zh) 图像渲染方法、装置、存储介质及电子设备
CN115272608B (zh) 一种人手重建方法及设备
CN118570367B (zh) 一种用于直播场景的几何感知人体辐射建模方法和系统
CN119722911A (zh) 一种环境光遮蔽模型的构建方法及环境光遮蔽方法
CN115082636B (zh) 基于混合高斯网络的单图像三维重建方法及设备
CN117671119A (zh) 静态图像动态化处理方法、装置、设备及存储介质
Lee et al. Photometric stereo super resolution via complex surface structure estimation
CN106991643B (zh) 一种低资源消耗的实时核线方法和实时核线系统
CN117611781B (zh) 一种实景三维模型的压平方法及装置
CN116342813B (zh) 一种基于频域的端到端人体三维模型重建方法

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

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

Country of ref document: EP

Kind code of ref document: A1