CN102915234A - Method and device for realizing program interface in application program - Google Patents
Method and device for realizing program interface in application program Download PDFInfo
- Publication number
- CN102915234A CN102915234A CN2011102224836A CN201110222483A CN102915234A CN 102915234 A CN102915234 A CN 102915234A CN 2011102224836 A CN2011102224836 A CN 2011102224836A CN 201110222483 A CN201110222483 A CN 201110222483A CN 102915234 A CN102915234 A CN 102915234A
- Authority
- CN
- China
- Prior art keywords
- real
- interface
- scene
- mathematical
- coordinate system
- 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
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
- Processing Or Creating Images (AREA)
Abstract
本发明公开了一种应用程序中程序界面的实现方法及装置,在构造实景界面和数学界面后,建立实景界面的实景坐标系和数学界面的数学坐标系之间的绑定关系,并根据绑定关系,将实景界面的坐标转换到数学坐标系下,并在数学坐标系中将实景界面与数学界面结合生成程序界面;一方面,较现有技术来说,由于本发明的方法使用获取到的实景界面作为程序界面的一部分,能够达到减少程序界面生成的计算量,节省终端的资源开销的效果;另一方面,本发明将实景界面和数学界面有机地结合到一起,能够达到程序界面画面逼真的效果。
The invention discloses a method and device for realizing a program interface in an application program. After constructing a real scene interface and a mathematical interface, the binding relationship between the real scene coordinate system of the real scene interface and the mathematical coordinate system of the mathematical interface is established, and according to the binding Determine the relationship, convert the coordinates of the real scene interface to the mathematical coordinate system, and combine the real scene interface and the mathematical interface in the mathematical coordinate system to generate the program interface; on the one hand, compared with the prior art, because the method of the present invention is used to obtain As a part of the program interface, the real-scene interface of the present invention can achieve the effect of reducing the calculation amount generated by the program interface and saving terminal resource overhead; on the other hand, the present invention organically combines the real-scene interface and the mathematical interface together to achieve Realistic effect.
Description
技术领域 technical field
本发明涉及终端技术领域,尤其涉及一种应用程序中程序界面的实现方法及装置。The invention relates to the technical field of terminals, in particular to a method and device for realizing a program interface in an application program.
背景技术 Background technique
随着终端技术以及终端上硬件能力的不断发展,应用在终端上的各种软件(应用程序)越来越多,并且各种应用程序中程序界面的展现方式也在快速发展。With the continuous development of terminal technology and hardware capabilities of the terminal, more and more various software (application programs) are applied to the terminal, and the display modes of program interfaces in various application programs are also developing rapidly.
目前应用程序中程序界面的一种实现方法是通过软件仿真模拟计算得到的,具体是由应用程序中的运算元件计算出将要显示在屏幕上的图形,通过仿真模拟计算在屏幕上显示出具有立体、仿真效果的图形。尤其是在近些年,随着专用于图形处理的图形库(如DirectX和OpenGL)的快速发展,应用程序的开发者可以利用这些图形库开发出具有复杂的程序界面的应用程序,这些程序界面能对现实环境作出精妙的模拟,使得用户有身临其境的感觉。但是,使用上述图形库对应用程序中的程序界面进行开发,对于终端的资源开销很大,不利于终端的应用程序发展。At present, one implementation method of the program interface in the application program is obtained through software simulation calculation. Specifically, the calculation elements in the application program calculate the graphics to be displayed on the screen, and the three-dimensional graphics are displayed on the screen through simulation calculation. , Graphics of simulation effect. Especially in recent years, with the rapid development of graphics libraries (such as DirectX and OpenGL) dedicated to graphics processing, application developers can use these graphics libraries to develop applications with complex program interfaces. Can make exquisite simulation of the real environment, so that users have an immersive feeling. However, using the graphics library above to develop the program interface in the application program requires a lot of resource overhead for the terminal, which is not conducive to the development of the terminal application program.
此外,在现有的应用程序中程序界面的另一种实现方法是采用摄像头获取的图像直接作为程序界面的背景,不对使用摄像头获取得到的图像做任何修改,从而呈现出透明的背景效果;或者是利用摄像头获取得到的图像作为程序界面的背景后,采集图像中关键图形的位置信息,将该位置信息应用于应用程序中,例如,在从摄像头获取的图像中搜索一张特定纸的位置信息,并在该位置信息上显示篮筐的数学图像。上述两种方法,相对于软件模拟计算仿真构造程序界面的方法,只是将摄像头获取的图像(实景界面)作为应用程序的背景或者作为信息点(关键图形的位置信息),为应用程序中程序界面的构造提供参考,从而减少应用程序在终端上所占资源,但是,用上述两种方法制作出的程序界面由于实景界面和应用程序计算出的数学界面结合不够紧密,因此呈现出的程序界面效果不够真实。In addition, another implementation method of the program interface in the existing application program is to use the image obtained by the camera directly as the background of the program interface, without any modification to the image obtained by using the camera, so as to present a transparent background effect; or It is to use the image obtained by the camera as the background of the program interface, collect the position information of the key graphics in the image, and apply the position information to the application program, for example, search for the position information of a specific piece of paper in the image obtained from the camera , and display the mathematical image of the basket on the position information. The above two methods, compared to the method of software simulation calculation simulation to construct the program interface, only use the image (real scene interface) acquired by the camera as the background of the application program or as information points (position information of key graphics), which are used as the program interface in the application program. The structure of the application provides a reference, thereby reducing the resources occupied by the application program on the terminal. However, the program interface produced by the above two methods is not closely combined with the real scene interface and the mathematical interface calculated by the application program, so the program interface effect presented Not real enough.
发明内容 Contents of the invention
本发明实施例提供了一种应用程序中程序界面的实现方法及装置,用以解决现有程序界面生成技术对终端的资源开销大以及呈现效果不够真实的问题。Embodiments of the present invention provide a method and device for implementing a program interface in an application program, which are used to solve the problems that the existing program interface generation technology has a large resource overhead on the terminal and the presentation effect is not realistic enough.
本发明实施例提供的一种应用程序中程序界面的实现方法,包括:A method for implementing a program interface in an application program provided by an embodiment of the present invention includes:
根据获取到的实景图像构造实景界面,并建立实景界面的实景坐标系;Construct a real-scene interface according to the acquired real-scene image, and establish a real-scene coordinate system of the real-scene interface;
根据数学图像构造数学界面,并建立数学界面的数学坐标系;Construct the mathematical interface according to the mathematical image, and establish the mathematical coordinate system of the mathematical interface;
建立所述实景坐标系和所述数学坐标系的绑定关系;Establish a binding relationship between the real scene coordinate system and the mathematical coordinate system;
根据所述绑定关系,计算出所述实景坐标系的实景界面在所述数学坐标系中的位置;Calculate the position of the real-scene interface in the real-scene coordinate system in the mathematical coordinate system according to the binding relationship;
在数学坐标系中,将所述实景界面与数学界面结合生成程序界面。In the mathematical coordinate system, the real-scene interface is combined with the mathematical interface to generate a program interface.
本发明实施例提供的一种应用程序中程序界面的实现装置,包括:A device for implementing a program interface in an application program provided by an embodiment of the present invention includes:
实景模块,用于根据获取到的实景图像构造实景界面,并建立实景界面的实景坐标系;A real-scene module, configured to construct a real-scene interface according to the obtained real-scene image, and establish a real-scene coordinate system of the real-scene interface;
数学模块,用于根据数学图像构造数学界面,并建立数学界面的数学坐标系;A mathematical module, configured to construct a mathematical interface according to a mathematical image, and establish a mathematical coordinate system of the mathematical interface;
绑定模块,用于建立所述实景坐标系和所述数学坐标系的绑定关系;A binding module, configured to establish a binding relationship between the real scene coordinate system and the mathematical coordinate system;
计算模块,用于根据所述绑定关系,计算出所述实景坐标系的实景界面在所述数学坐标系中的位置;A calculation module, configured to calculate the position of the real-scene interface in the real-scene coordinate system in the mathematical coordinate system according to the binding relationship;
程序界面生成模块,用于在数学坐标系中,将所述实景界面与数学界面结合生成程序界面。The program interface generation module is used to combine the real-scene interface with the mathematical interface in the mathematical coordinate system to generate the program interface.
本发明实施例的有益效果包括:The beneficial effects of the embodiments of the present invention include:
本发明实施例提供的一种应用程序中程序界面的实现方法及装置,在构造实景界面和数学界面后,建立实景界面的实景坐标系和数学界面的数学坐标系之间的绑定关系,并根据绑定关系,将实景界面的坐标转换到数学坐标系下,并在数学坐标系中将实景界面与数学界面结合生成程序界面;一方面,较现有技术来说,由于本发明的方法使用获取到的实景界面作为程序界面的一部分,能够达到减少程序界面生成的计算量,节省终端的资源开销的效果;另一方面,本发明将实景界面和数学界面有机地结合到一起,能够达到程序界面画面逼真的效果。The embodiment of the present invention provides a method and device for implementing a program interface in an application program. After constructing the real scene interface and the mathematical interface, the binding relationship between the real scene coordinate system of the real scene interface and the mathematical coordinate system of the mathematical interface is established, and According to the binding relationship, the coordinates of the real scene interface are converted to the mathematical coordinate system, and the real scene interface and the mathematical interface are combined to generate the program interface in the mathematical coordinate system; on the one hand, compared with the prior art, due to the use of the method of the present invention The obtained real-scene interface is used as a part of the program interface, which can achieve the effect of reducing the calculation amount generated by the program interface and saving the resource overhead of the terminal; on the other hand, the present invention organically combines the real-scene interface and the mathematical interface to achieve the Realistic effect of the interface picture.
附图说明 Description of drawings
图1为本发明实施例提供的应用程序中程序界面的实现方法的流程图之一;Fig. 1 is one of the flowcharts of the implementation method of the program interface in the application program provided by the embodiment of the present invention;
图2为本发明实施例提供的应用程序的程序界面的示意图;FIG. 2 is a schematic diagram of a program interface of an application program provided by an embodiment of the present invention;
图3为本发明实施例提供的应用程序中程序界面的实现方法的流程图之二;Fig. 3 is the second flow chart of the implementation method of the program interface in the application program provided by the embodiment of the present invention;
图4为本发明实施例提供的实施例的示意图;Fig. 4 is a schematic diagram of an embodiment provided by an embodiment of the present invention;
图5为本发明实施例提供的应用程序中程序界面的实现装置的结构图。FIG. 5 is a structural diagram of an apparatus for implementing a program interface in an application program provided by an embodiment of the present invention.
具体实施方式 Detailed ways
下面结合附图,对本发明实施例提供的一种应用程序中程序界面的实现方法及装置的具体实施方式进行详细地说明。The specific implementation manners of a method and device for implementing a program interface in an application program provided by an embodiment of the present invention will be described in detail below in conjunction with the accompanying drawings.
本发明实施例提供的一种应用程序中程序界面的实现方法,如图1所示,具体流程包括:A method for implementing a program interface in an application program provided by an embodiment of the present invention, as shown in FIG. 1 , the specific process includes:
S101、根据获取到的实景图像构造实景界面,并建立实景界面的实景坐标系;S101. Construct a real-scene interface according to the acquired real-scene image, and establish a real-scene coordinate system of the real-scene interface;
S102、根据数学图像构造数学界面,并建立数学界面的数学坐标系;S102. Construct a mathematical interface according to the mathematical image, and establish a mathematical coordinate system of the mathematical interface;
S103、建立实景坐标系和数学坐标系的绑定关系;S103. Establish a binding relationship between the real scene coordinate system and the mathematical coordinate system;
S104、根据绑定关系,计算出实景坐标系的实景界面在数学坐标系中的位置;S104. Calculate the position of the real-scene interface in the real-scene coordinate system in the mathematical coordinate system according to the binding relationship;
S105、在数学坐标系中,将实景界面与数学界面结合生成程序界面。S105. In the mathematical coordinate system, combine the real-scene interface and the mathematical interface to generate a program interface.
其中,步骤S101中,实景图像的获取可以使用终端上的摄像头等硬件和/或软件工具,在本发明实施例中不做限定。Wherein, in step S101, hardware and/or software tools such as a camera on the terminal may be used to acquire the real-scene image, which is not limited in this embodiment of the present invention.
较佳地,在上述步骤S101和S102中,还可以对数学界面或实景界面分别使用各种图像过滤方式(例如:图像的位移、形状、颜色变化、模糊化、锐化等),创造出具有自然景深和光线效果的界面,进一步增强最终生成的程序界面的真实感。Preferably, in the above steps S101 and S102, various image filtering methods (for example: image displacement, shape, color change, blurring, sharpening, etc.) Interfaces with natural depth of field and light effects further enhance the sense of reality of the final generated program interface.
具体地,如图2所示的程序界面示意图,上述步骤S103中建立实景坐标系和数学坐标系的绑定关系,可以包括以下步骤:Specifically, as shown in the schematic diagram of the program interface in FIG. 2 , the establishment of the binding relationship between the real scene coordinate system and the mathematical coordinate system in the above step S103 may include the following steps:
确定实景坐标系的原点在数学坐标系的坐标为O(p,q);Determine the coordinates of the origin of the real scene coordinate system in the mathematical coordinate system as O(p, q);
确定实景坐标系的x′轴到数学坐标系的x轴顺时针夹角θ。Determine the clockwise angle θ between the x' axis of the real scene coordinate system and the x axis of the mathematical coordinate system.
上述步骤S104中根据绑定关系,计算出位于实景坐标系的实景界面在数学坐标系中的位置,可以通过下述流程实现:In the above step S104, according to the binding relationship, the position of the real scene interface located in the real scene coordinate system in the mathematical coordinate system is calculated, which can be realized through the following process:
确定实景界面中点P在实景坐标系中的坐标为P(x′,y′);Determine the coordinates of the real scene interface midpoint P in the real scene coordinate system as P(x', y');
通过坐标变换,计算点P在数学坐标系中的坐标P(x,y)为:Through coordinate transformation, the coordinates P(x, y) of the calculation point P in the mathematical coordinate system are:
较佳地,当数学界面相对实景界面发生位移时,本发明实施例提供的应用程序中程序界面的实现方法,还需要执行下述操作:重新建立实景坐标系与数学坐标系的绑定关系。Preferably, when the mathematical interface is displaced relative to the real-scene interface, the method for implementing the program interface in the application program provided by the embodiment of the present invention also needs to perform the following operations: re-establish the binding relationship between the real-scene coordinate system and the mathematical coordinate system.
较佳地,本发明实施例提供的应用程序中程序界面的实现方法,如图3所示,还可以执行以下步骤:Preferably, the implementation method of the program interface in the application program provided by the embodiment of the present invention, as shown in Figure 3, may also perform the following steps:
S301、判断实景界面是否发生位移,如果是,执行步骤S302,如果否,执行步骤S304;S301. Determine whether the real scene interface is displaced, if yes, execute step S302, if not, execute step S304;
S302、计算实景界面与上一帧实景界面之间的相对位移;S302. Calculate the relative displacement between the real scene interface and the previous frame real scene interface;
S303、在数学坐标中,根据计算出的实景界面与上一帧实景界面的相对位移,将数学界面移动到对应位置;S303. In the mathematical coordinates, move the mathematical interface to a corresponding position according to the calculated relative displacement between the real-scene interface and the previous frame of the real-scene interface;
S304、结束。S304, end.
具体地,上述步骤S302中计算实景界面与上一帧实景界面的相对位移的具体计算方法如下:Specifically, the specific calculation method for calculating the relative displacement between the real-scene interface and the last frame of the real-scene interface in the above step S302 is as follows:
将所述实景界面与上一帧实景界面分为16×16个小块;Dividing the real scene interface and the previous frame real scene interface into 16×16 small blocks;
选取实景界面中的N个小块,分别计算选取的N个小块中每个小块与上一帧实景界面中的每个小块之间的相对位移;Select N small blocks in the real scene interface, and calculate the relative displacement between each small block in the selected N small blocks and each small block in the previous frame real scene interface;
基于下述公式计算所述实景界面与上一帧实景界面的相对位移D:Calculate the relative displacement D between the real scene interface and the previous frame real scene interface based on the following formula:
其中,d(n)表征为所述N个小块中第n小块与上一帧实景界面中第n小块之间的相对位移,所述n的取值范围为[1-N]。Wherein, d(n) is characterized as the relative displacement between the nth small block in the N small blocks and the nth small block in the real scene interface of the previous frame, and the value range of n is [1-N].
上述计算实景界面与上一帧实景界面的相对位移的过程中,计算选取的N个小块中每个小块与上一帧实景界面中的每个小块之间的相对位移的具体实施方式属于现有技术的范畴,例如可以使用下述两种方法:In the process of calculating the relative displacement between the real-scene interface and the previous frame of the real-scene interface, the specific implementation method for calculating the relative displacement between each small block in the selected N small blocks and each small block in the previous frame of the real-scene interface Belonging to the category of prior art, for example, the following two methods can be used:
第一种:对于第n小块的图像,将图像整体经位移k变化后,计算N个小块中第n小块图像矢量数据ik(n)与上一帧中第n小块图像矢量数据i′(n)的误差δ2(n)=|ik(n)-i′(n)|2,其中n的取值范围为[1-N]。The first one: For the image of the nth small block, after changing the whole image by displacement k, calculate the image vector data ik(n) of the nth small block in the N small blocks and the image vector data of the nth small block in the previous frame The error of i′(n) δ 2 (n)=|i k (n)-i′(n)| 2 , where the value range of n is [1-N].
确定当计算得到的误差δ2(n)数值最小时,位移k为N个小块中第n小块与上一帧实景界面中第n小块之间的相对位移d(n)。Determine that when the calculated error δ 2 (n) is the smallest, the displacement k is the relative displacement d(n) between the nth small block in the N small blocks and the nth small block in the real scene interface of the previous frame.
第二种:对于第n小块的图像,将图像整体经位移k变化后,计算N个小块中第n小块图像矢量数据ik(n)与上一帧中第n小块图像矢量数据i′(n)的相关度:arg maxk[ik(n)-i′(n)]2,其中n的取值范围为[1-N]。The second method: for the image of the nth small block, after changing the whole image by displacement k, calculate the image vector data i k (n) of the nth small block in the N small blocks and the image vector of the nth small block in the previous frame Correlation degree of data i′(n): arg max k [i k (n)-i′(n)] 2 , where the value range of n is [1-N].
确定当计算得到的相关度数值最大时,位移k为N个小块中第n小块与上一帧实景界面中第n小块之间的相对位移d(n)。It is determined that when the calculated correlation value is the largest, the displacement k is the relative displacement d(n) between the nth small block in the N small blocks and the nth small block in the real scene interface of the previous frame.
此外,还可以采用其他现有的实施方式,例如《结合两步估算和运动补偿的子像素运动估计》(《计算机工程与应用》,2009.45(7),190-191页)中提到的三种计算方法,在此不再赘述。In addition, other existing implementations can also be used, such as the three-step method mentioned in "Sub-pixel Motion Estimation Combining Two-Step Estimation and Motion Compensation" ("Computer Engineering and Applications", 2009.45(7), pp. 190-191) calculation method, which will not be repeated here.
下面通过一个具体地实施例对本发明实施例提供的应用程序中程序界面的实现方法进行详细地说明。The implementation method of the program interface in the application program provided by the embodiment of the present invention will be described in detail below through a specific embodiment.
一款应用程序的程序界面如图4所示,利用终端设备的摄像头获取实景界面(包含桌子的界面)并建立数学界面(包含杯子的界面);建立实景界面的实景坐标系和数学界面的数学坐标系之间的绑定关系后,生成程序界面。The program interface of an application program is shown in Figure 4. The camera of the terminal device is used to obtain the real-scene interface (comprising the interface of the table) and establishes the mathematical interface (comprising the interface of the cup); After the binding relationship between the coordinate systems, the program interface is generated.
当实景界面发生位移时(在图4中从实线桌子的位置移动到虚线所示桌子的位置),计算出实景界面的位移a;之后,对实景界面的位移a进行坐标变换得到在数学坐标系下的位移a’;在数学坐标系中,将数学界面也移动到相应的位移,到达虚线所示的位置,即在程序界面中,实线杯子的位置与虚线杯子的位置之间的位移b等于位移a’。这样,可以实现不论实景界面如何发生变化,程序界面能够始终呈现杯子放置在作为实景的桌子上面的逼真显示效果。When the real scene interface is displaced (moving from the position of the solid line table to the position of the table shown in the dotted line in Fig. 4), the displacement a of the real scene interface is calculated; after that, coordinate transformation is carried out to the displacement a of the real scene interface to obtain in the mathematical coordinate system The displacement a' below; in the mathematical coordinate system, move the mathematical interface to the corresponding displacement to reach the position shown by the dotted line, that is, the displacement b between the position of the cup in the solid line and the position of the cup in the dotted line in the program interface equal to the displacement a'. In this way, no matter how the real-scene interface changes, the program interface can always present a realistic display effect that the cup is placed on the table as the real-scene.
此外,如果对数学界面进行效果处理(例如杯子被打碎),当实景界面发生位移时,数学界面也移动到相对应的位置过程中,那么可以呈现杯子一直处于被打碎的状态的效果。In addition, if effect processing is performed on the mathematical interface (for example, the cup is broken), when the real scene interface is displaced, the mathematical interface also moves to the corresponding position, so the effect that the cup is always in a broken state can be presented.
基于同一发明构思,本发明实施例还提供了一种应用程序中程序界面的实现装置,由于该装置解决问题的原理与前述一种应用程序中程序界面的实现方法相似,因此该装置的实施可以参见方法的实施,重复之处不再赘述。Based on the same inventive concept, the embodiment of the present invention also provides a device for implementing a program interface in an application program. Since the problem-solving principle of the device is similar to that of the aforementioned method for implementing a program interface in an application program, the implementation of the device can Refer to the implementation of the method, and the repetition will not be repeated.
本发明实施例提供的一种应用程序中程序界面的实现装置,如图5所示,包括:An implementation device for a program interface in an application program provided by an embodiment of the present invention, as shown in FIG. 5 , includes:
实景模块501,用于根据获取到的实景图像构造实景界面,并建立实景界面的实景坐标系;The real-
数学模块502,用于根据数学图像构造数学界面,并建立数学界面的数学坐标系;A
绑定模块503,用于建立实景坐标系和数学坐标系的绑定关系;A
计算模块504,用于根据绑定关系,计算出实景坐标系的实景界面在数学坐标系中的位置;
程序界面生成模块505,用于在数学坐标系中,将实景界面与数学界面结合生成程序界面。The program
具体地,本发明实施例提供的上述装置中的绑定模块503,如图5所示,具体包括:Specifically, the binding
确定原点坐标子模块5031,用于确定实景坐标系的原点在数学坐标系的坐标为O(p,q);Determine the origin coordinate
确定夹角子模块5032,用于确定所述实景坐标系的x′轴到所述数学坐标系的x轴顺时针夹角θ;Determine the included angle sub-module 5032, which is used to determine the clockwise included angle θ from the x' axis of the real scene coordinate system to the x axis of the mathematical coordinate system;
具体地,上述装置中的计算模块504,如图5所示,具体包括:Specifically, the
确定坐标子模块5041,用于确定实景界面中点P在所述实景坐标系中的坐标为P(x′,y′);Determine the coordinate sub-module 5041, for determining the coordinates of the midpoint P in the real scene interface in the real scene coordinate system as P(x', y');
坐标转换子模块5042,用于通过坐标变换,计算点P在所述数学坐标系中的坐标P(x,y)为
较佳地,本发明实施例提供的上述装置中的绑定模块503,还用于当数学界面相对实景界面发生位移时,重新建立实景坐标系与数学坐标系的绑定关系。Preferably, the binding
较佳地,本发明实施例提供的应用程序中程序界面的实现装置,如图5所示,还包括:Preferably, the implementation device of the program interface in the application program provided by the embodiment of the present invention, as shown in Figure 5, further includes:
位移计算模块506,用于当实景界面发生变化时,计算当前实景界面与上一帧实景界面之间的相对位移;The
移动模块507,用于在数学坐标中,根据计算出的实景界面与上一帧实景界面的相对位移,将数学界面移动到对应位置。The moving
具体地,上述位移计算模块506,如图5所示,具体包括:Specifically, the above-mentioned
图像分块子模块5061,用于将实景界面与上一帧实景界面分为16×16个小块;The
位移计算子模块5062,用于选取实景界面中的N个小块,分别计算选取的N个小块中每个小块与上一帧实景界面中的每个小块之间的相对位移;基于下述公式计算实景界面与上一帧实景界面的相对位移D:The
其中,d(n)表征为N个小块中第n小块与上一帧实景界面中第n小块之间的相对位移,n的取值范围为[1-N]。Among them, d(n) is characterized as the relative displacement between the nth small block in the N small blocks and the nth small block in the real scene interface of the previous frame, and the value range of n is [1-N].
本发明实施例提供的一种应用程序中程序界面的实现方法及装置,在构造实景界面和数学界面后,建立实景界面的实景坐标系和数学界面的数学坐标系之间的绑定关系,并根据绑定关系,将实景界面的坐标转换到数学坐标系下,并在数学坐标系中将实景界面与数学界面结合生成程序界面;一方面,较现有技术来说,由于本发明的方法使用获取到的实景界面作为程序界面的一部分,能够达到减少程序界面生成的计算量,节省终端的资源开销的效果;另一方面,本发明将实景界面和数学界面有机地结合到一起,能够达到程序界面画面逼真的效果。The embodiment of the present invention provides a method and device for implementing a program interface in an application program. After constructing the real scene interface and the mathematical interface, the binding relationship between the real scene coordinate system of the real scene interface and the mathematical coordinate system of the mathematical interface is established, and According to the binding relationship, the coordinates of the real scene interface are converted to the mathematical coordinate system, and the real scene interface and the mathematical interface are combined to generate the program interface in the mathematical coordinate system; on the one hand, compared with the prior art, due to the use of the method of the present invention The obtained real-scene interface is used as a part of the program interface, which can achieve the effect of reducing the calculation amount generated by the program interface and saving the resource overhead of the terminal; on the other hand, the present invention organically combines the real-scene interface and the mathematical interface to achieve the Realistic effect of the interface picture.
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention also intends to include these modifications and variations.
Claims (10)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2011102224836A CN102915234A (en) | 2011-08-04 | 2011-08-04 | Method and device for realizing program interface in application program |
| PCT/CN2012/079271 WO2013017046A1 (en) | 2011-08-04 | 2012-07-27 | Method and device for implementing program interface in application, computer program and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2011102224836A CN102915234A (en) | 2011-08-04 | 2011-08-04 | Method and device for realizing program interface in application program |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN102915234A true CN102915234A (en) | 2013-02-06 |
Family
ID=47613610
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN2011102224836A Pending CN102915234A (en) | 2011-08-04 | 2011-08-04 | Method and device for realizing program interface in application program |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN102915234A (en) |
| WO (1) | WO2013017046A1 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP7374082B2 (en) | 2017-09-15 | 2023-11-06 | オッポ広東移動通信有限公司 | Data transmission methods, terminal devices and network devices |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1305143A (en) * | 2001-01-16 | 2001-07-25 | 郭方红 | System and method for inputting coordinate and control information to computer |
| CN101101505A (en) * | 2006-07-07 | 2008-01-09 | 华为技术有限公司 | A method and system for realizing three-dimensional augmented reality |
| US20090323801A1 (en) * | 2008-06-25 | 2009-12-31 | Fujitsu Limited | Image coding method in thin client system and computer readable medium |
| CN101951464A (en) * | 2010-05-19 | 2011-01-19 | 上海稳像信息技术有限公司 | Real-time video image stabilizing method based on integral image characteristic block matching |
| CN102067152A (en) * | 2008-05-05 | 2011-05-18 | 索纳维森股份有限公司 | Method and system for enhanced image alignment |
| CN102110379A (en) * | 2011-02-22 | 2011-06-29 | 黄振强 | Multimedia reading matter giving readers enhanced feeling of reality |
| US20110164116A1 (en) * | 2010-01-04 | 2011-07-07 | Disney Enterprises, Inc. | Video capture system control using virtual cameras for augmented reality |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101261730A (en) * | 2007-03-06 | 2008-09-10 | 阮伟 | Digital Large Scale Mapping Method of Image |
| CN101729739A (en) * | 2009-11-16 | 2010-06-09 | 潘林岭 | Method for rectifying deviation of image |
| CN101907459B (en) * | 2010-07-12 | 2012-01-04 | 清华大学 | Monocular video based real-time posture estimation and distance measurement method for three-dimensional rigid body object |
-
2011
- 2011-08-04 CN CN2011102224836A patent/CN102915234A/en active Pending
-
2012
- 2012-07-27 WO PCT/CN2012/079271 patent/WO2013017046A1/en active Application Filing
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1305143A (en) * | 2001-01-16 | 2001-07-25 | 郭方红 | System and method for inputting coordinate and control information to computer |
| CN101101505A (en) * | 2006-07-07 | 2008-01-09 | 华为技术有限公司 | A method and system for realizing three-dimensional augmented reality |
| CN102067152A (en) * | 2008-05-05 | 2011-05-18 | 索纳维森股份有限公司 | Method and system for enhanced image alignment |
| US20090323801A1 (en) * | 2008-06-25 | 2009-12-31 | Fujitsu Limited | Image coding method in thin client system and computer readable medium |
| US20110164116A1 (en) * | 2010-01-04 | 2011-07-07 | Disney Enterprises, Inc. | Video capture system control using virtual cameras for augmented reality |
| CN101951464A (en) * | 2010-05-19 | 2011-01-19 | 上海稳像信息技术有限公司 | Real-time video image stabilizing method based on integral image characteristic block matching |
| CN102110379A (en) * | 2011-02-22 | 2011-06-29 | 黄振强 | Multimedia reading matter giving readers enhanced feeling of reality |
Non-Patent Citations (1)
| Title |
|---|
| 刘佳福 等: "《空间解析几何》", 31 December 1987, 吉林教育出版社, article "一般坐标变换", pages: 316-317 * |
Also Published As
| Publication number | Publication date |
|---|---|
| WO2013017046A1 (en) | 2013-02-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP7604669B2 (en) | Special effects display method, device, equipment and medium | |
| CN103324453B (en) | Display | |
| CN113034662B (en) | Virtual scene rendering method and device, storage medium and electronic equipment | |
| US20240303921A1 (en) | Virtual-camera-based image acquisition method and related apparatus | |
| KR20090087807A (en) | Method for implementing augmented reality and apparatus using the same | |
| CN105159522A (en) | Method for response of virtual reality display device to operation of peripheral device | |
| CN108133454B (en) | Space geometric model image switching method, device and system and interaction equipment | |
| WO2023207001A1 (en) | Image rendering method and apparatus, and electronic device and storage medium | |
| CN103984720A (en) | Tile map establishment method and device based on OpenGL (open graphics library) | |
| CN105808071A (en) | Display control method and device and electronic equipment | |
| CN114842120A (en) | Image rendering processing method, device, equipment and medium | |
| US20250157124A1 (en) | Method and apparatus for rendering particle effect, device and medium | |
| EP4325344A1 (en) | Multi-terminal collaborative display update method and apparatus | |
| CN110363860B (en) | 3D model reconstruction method and device and electronic equipment | |
| WO2023056840A1 (en) | Method and apparatus for displaying three-dimensional object, and device and medium | |
| WO2023121569A2 (en) | Particle special effect rendering method and apparatus, and device and storage medium | |
| WO2024016930A1 (en) | Special effect processing method and apparatus, electronic device, and storage medium | |
| US9460549B2 (en) | Method and device for generating perspective image | |
| CN114928718B (en) | Video monitoring method, device, electronic equipment and storage medium | |
| CN106204703A (en) | Three-dimensional scene models rendering intent and device | |
| US20160336002A1 (en) | Positioning method and apparatus in three-dimensional space of reverberation | |
| CN114067030A (en) | Dynamic fluid effect processing method, apparatus, electronic device and readable medium | |
| CN115619986A (en) | Scene roaming method, device, equipment and medium | |
| CN102915234A (en) | Method and device for realizing program interface in application program | |
| WO2024051639A1 (en) | Image processing method, apparatus and device, and storage medium and product |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20130206 |