WO2018133692A1 - 实现增强现实的方法、计算机设备及存储介质 - Google Patents

实现增强现实的方法、计算机设备及存储介质 Download PDF

Info

Publication number
WO2018133692A1
WO2018133692A1 PCT/CN2018/071776 CN2018071776W WO2018133692A1 WO 2018133692 A1 WO2018133692 A1 WO 2018133692A1 CN 2018071776 W CN2018071776 W CN 2018071776W WO 2018133692 A1 WO2018133692 A1 WO 2018133692A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
augmented reality
terminal
page
video stream
Prior art date
Application number
PCT/CN2018/071776
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 WO2018133692A1 publication Critical patent/WO2018133692A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/006Mixed reality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/972Access to data in other repository systems, e.g. legacy data or dynamic Web page generation

Definitions

  • the present application relates to the field of augmented reality technologies, and in particular, to a method for implementing augmented reality, a computer device, and a computer storage medium.
  • Augmented Reality is a new technology direction developed on the basis of virtual reality technology. It is a technology that uses virtual objects to enhance the reality of real scenes. It is based on acquisition devices such as cameras.
  • the real physical environment according to the mark or feature to determine the coordinate position of the input image in the three-dimensional space of the real physical environment, and then superimpose the 3D (3 Dimensions) model on the coordinate system, thereby realizing the combination of the real environment and the virtual environment, Annotate, explain, or enhance and emphasize certain effects of the real-world physical environment in which the user is located.
  • the AR provides the user with a fusion of virtual objects and the real environment. It can effectively help the user to recognize the surrounding environment, add information about the surrounding environment, and realize the interaction between the user and the surrounding environment.
  • FIG. 1 shows a schematic diagram of the current AR technology implementation in an example. It can be seen from FIG. 1 that a specific implementation will be developed based on the operating system of the terminal. Clients of AR technology, currently, are typically two clients for IOS (mobile operating system developed by Apple) and Android (a Linux-based free and open source operating system). The implementation principle is developed through the existing image recognition library. However, the development of native applications is complicated. Not only do different terminal operating systems require different developers, but each change is based on the version of the operating system. The development cycle is long, the resources such as manpower and development costs are large, and the client version has When updating, the update must be manually downloaded by the end user, and the historical version must be maintained and the maintenance cost is high.
  • IOS mobile operating system developed by Apple
  • Android a Linux-based free and open source operating system
  • a method of implementing augmented reality, a computer device, and a computer storage medium are provided.
  • a method of implementing augmented reality comprising the steps of:
  • the terminal sends a page access request to the WEB server, where the page access request includes a page identifier
  • the page access response returned by the web server according to the page access request, where the page access response includes a WEB page corresponding to the page identifier, where the WEB page is embedded with an augmented reality device;
  • the drawing obtains the drawn 3D image, and displays the drawn 3D image in the picture captured by the imaging device to form a display screen of the augmented reality.
  • a method of implementing augmented reality comprising the steps of:
  • the WEB server receives a page access request sent by the terminal browser, where the page access request includes a page identifier
  • the WEB server obtains a WEB page corresponding to the page identifier, where the WEB page is embedded with an augmented reality device;
  • the WEB server returns a page access response to the terminal browser, where the page access response includes the WEB page;
  • the predetermined identifier is displayed, and the drawn 3D image is obtained by 3D drawing on the recognized predetermined identifier, and the drawn 3D image is displayed on the image captured by the imaging device to form a display screen of the augmented reality.
  • a computer device comprising a memory and a processor, the memory storing computer readable instructions, the computer readable instructions being executed by the processor such that the processor performs the following steps:
  • the drawing obtains the drawn 3D image, and displays the drawn 3D image in the picture captured by the imaging device to form a display screen of the augmented reality.
  • a computer device comprising a memory and a processor, the memory storing computer readable instructions, the computer readable instructions being executed by the processor such that the processor performs the following steps:
  • the predetermined identifier is displayed, and the drawn 3D image is obtained by 3D drawing on the recognized predetermined identifier, and the drawn 3D image is displayed on the image captured by the imaging device to form a display screen of the augmented reality.
  • a computer storage medium having stored thereon a computer program that, when executed by a processor, implements the steps of the method of implementing augmented reality as described above.
  • the solution of the embodiment described above implements the effect of the augmented reality by means of WEB.
  • the terminal browser obtains the augmented reality device from the WEB server based on the manner of accessing the webpage page, thereby implementing the augmented reality on the terminal. It has nothing to do with the operating system of the terminal. Therefore, it only needs to develop a set of code for different terminal operating systems during development, which has low development cost, is convenient and convenient to use, and can be applied to terminals of any operating system.
  • the terminal browser is a device that obtains augmented reality when requesting a page from the WEB server, it is only necessary to maintain the device of the augmented reality on the WEB server during maintenance, only in the WEB
  • the server updates the augmented reality device, and any subsequent terminal access is the latest implementation of augmented reality, which is convenient to maintain and low in cost.
  • FIG. 1 is a schematic diagram of a current AR technology implementation in an example
  • FIG. 2 is a schematic diagram of an application environment of an embodiment of the present application in an embodiment
  • FIG. 3 is a schematic structural diagram of a terminal in an embodiment
  • FIG. 4 is a schematic structural diagram of a WEB server in an embodiment
  • FIG. 5 is a schematic flow chart of a method for implementing augmented reality in an embodiment
  • FIG. 6 is a schematic flow chart of a method for implementing augmented reality in another embodiment
  • FIG. 7 is a schematic diagram of an interaction process when implementing augmented reality in a specific application example
  • FIG. 8 is a schematic diagram of a technical principle for implementing augmented reality in a specific application example
  • FIG. 9 is a schematic diagram of a grayscale image and a binarized image obtained by performing image processing in a specific application example
  • FIG. 10 is a schematic diagram showing an arrangement of ID information of a predetermined identifier in a specific application example
  • Figure 11 is a schematic diagram of an image of the predetermined logo shown in Figure 10;
  • FIG. 12 is a schematic structural diagram of a computer device in an embodiment
  • Figure 13 is a block diagram showing the structure of a computer device in another embodiment.
  • FIG. 2 is a schematic diagram of a working environment in an embodiment of the present application.
  • the working environment relates to the terminal 101 and the WEB (World Wide Web) server 100.
  • the terminal 101 and the WEB server 100 can communicate through the network.
  • the network can be a wired network or a wireless network.
  • the terminal 101 can request a WEB page from the WEB server 100, and the WEB server 100 acquires a corresponding WEB page based on the request of the terminal 101 and returns it to the terminal 101 for display.
  • the WEB server 100 after acquiring the WEB page requested by the terminal 101, the WEB server 100 embeds the augmented reality device in the WEB page, and then returns to the terminal 101, where the terminal 101 obtains the WEB page returned by the WEB server 100 and After the display, the augmented reality device embedded in the WEB page performs augmented reality processing, so that the effect of the augmented reality can be generated at the terminal of the WEB.
  • the terminal 101 includes a processor, a storage medium, a communication interface, a power interface, and a memory connected through a system bus.
  • the storage medium of the terminal 101 stores an operating system and computer readable instructions for implementing a method for implementing augmented reality.
  • the communication interface of the terminal 101 is used for connecting and communicating with the WEB server 100, and the power interface of the terminal 101 is used for connection with an external power source through which the external power source supplies power to the terminal 101.
  • the terminal 101 can be any device capable of accessing a WEB network, such as a mobile terminal, a tablet computer, a personal computer, etc.; or other devices having the above structure.
  • FIG. 100 A schematic structural diagram of the WEB server 100 in one embodiment is shown in FIG. It includes a processor, a power supply module, a storage medium, a memory, and a communication interface that are connected through a system bus.
  • the storage medium of the WEB server stores an operating system, a database, and computer readable instructions for implementing a method for implementing augmented reality.
  • the communication interface of the WEB server 100 is used to connect and communicate with the terminal 101.
  • FIG. 5 is a schematic flowchart diagram of a method for implementing augmented reality in an embodiment.
  • an application is used in the terminal 101 as an example for description.
  • the method for implementing augmented reality in this embodiment includes:
  • Step S501 Send a page access request to the WEB server, where the page access request includes a page identifier.
  • Step S502 Receive a page access response returned by the web server according to the page access request, where the page access response includes a WEB page corresponding to the page identifier, where the WEB page is embedded with an augmented reality device;
  • Step S503 The device of the augmented reality acquires a video stream of the camera device of the terminal, performs image processing on the video frame of the video stream, and identifies a predetermined identifier from the image processed image, and the identified predetermined identifier
  • the 3D image is drawn on the 3D image, and the drawn 3D image is displayed on the image captured by the imaging device to form a display screen of the augmented reality.
  • FIG. 6 shows a schematic flowchart of a method for implementing augmented reality in another embodiment. This embodiment is described by taking the processing procedure of the WEB server as an example.
  • the method for implementing augmented reality in this embodiment includes:
  • Step S601 Receive a page access request sent by the terminal browser, where the page access request includes a page identifier.
  • Step S602 Acquire a WEB page corresponding to the page identifier, where the WEB page is embedded with an augmented reality device;
  • Step S603 Returning a page access response to the terminal browser, where the page access response includes the WEB page;
  • Step S604 The terminal browser obtains a video stream of the imaging device of the terminal in the terminal based on the received augmented reality device in the WEB page, and performs image processing on the video frame of the video stream, after the image processing.
  • a predetermined identifier is recognized in the image
  • the drawn 3D image is obtained by 3D drawing on the recognized predetermined identifier
  • the drawn 3D image is displayed on the image captured by the imaging device to form a display screen of the augmented reality.
  • the solution of the embodiment described above implements the effect of the augmented reality by means of WEB.
  • the terminal browser obtains the augmented reality device from the WEB server based on the manner of accessing the webpage page, thereby implementing the augmented reality on the terminal. It has nothing to do with the operating system of the terminal. Therefore, it only needs to develop a set of code for different terminal operating systems during development. The development cost is low, not only convenient and convenient to use, but also applicable to any operating system terminal.
  • the terminal browser is a device that obtains augmented reality when requesting a page from the WEB server, it is only necessary to maintain the device of the augmented reality on the WEB server during maintenance, only in the WEB
  • the server updates the augmented reality device, and any subsequent terminal access is the latest implementation of augmented reality, which is convenient to maintain and low in cost.
  • the augmented reality device may further convert each video frame of the video stream into a canvas after performing image processing on the video frame of the video stream after acquiring the video stream of the image capturing device of the terminal. image. Therefore, when image processing is performed on the video frame of the video stream, image processing of the canvas image converted to the canvas may be performed based on the image processing capability of the canvas.
  • the terminal browser is based on the augmented reality device described above, and the synchronized video stream of the camera device of the terminal can be acquired through the media stream interface of the real-time communication.
  • the media stream interface of the real-time communication can be set in combination with actual technical application requirements.
  • the media stream interface of the real-time communication can be a MediaStream interface of the WebRTC.
  • the image obtained after the image processing described above may be a binarized image.
  • the terminal browser is based on the augmented reality device described above.
  • the gradation processing and the binarization processing may be sequentially performed.
  • the video frame may be sequentially grayed out by calling an image processing script.
  • the binarization process obtains the binarized image.
  • the image processing script here can be set in conjunction with actual technical application needs.
  • the image processing script can be cv.js.
  • the terminal browser is based on the augmented reality device described above, and the predetermined identifier may be identified from the binarized image by an image recognition library to obtain a coordinate range of the predetermined identifier
  • the image recognition library Includes image recognition library scripts.
  • the image recognition library script here can be set in combination with actual technical application needs.
  • the image recognition library script can be aruco.js or Awe.js.
  • the terminal browser is based on the augmented reality device described above, and the drawn 3D image may be displayed on the image captured by the imaging device according to the coordinate range of the predetermined identification to form a display screen of the augmented reality.
  • FIG. 7 shows a schematic diagram of an interaction process when implementing augmented reality in a specific application example.
  • the page access request may be sent to the WEB server through a terminal browser or the like, and the page access request includes a page identifier.
  • the WEB server After receiving the page access request, the WEB server obtains a WEB page corresponding to the page identifier, where the WEB page is embedded with an augmented reality device, and then returns a page access response to the terminal browser, where the page access response includes the above WEB page.
  • the device embedded in the enhanced display of the WEB in the page may be, in technical implementation, specifically a computer readable instruction code that can implement various functions implemented by the augmented reality device.
  • the device of the augmented reality acquires the video stream of the camera device of the terminal, performs image processing on the video frame of the video stream, and recognizes the image from the image processed image.
  • the predetermined identifier is displayed, and the drawn 3D image is obtained by 3D drawing on the recognized predetermined identifier, and the drawn 3D image is displayed on the image captured by the imaging device to form a display screen of the augmented reality.
  • FIG. 8 is a schematic diagram showing the technical principle of implementing augmented reality in a specific application example.
  • the device for augmented reality embedded in the WEB page can use a media stream interface of real-time communication, for example,
  • the browser provides a real-time communication javascript interface WebRtc, which obtains a video synchronization stream through the camera of the user device.
  • the MediaStream API in WebRtc can get the synchronized stream of video through the camera of the device.
  • the sync screen of the camera can be obtained by the video tag of html5.
  • the video frame of the video synchronization stream can be image processed and converted into a binarized image.
  • the above image processing can be performed directly on the video frame of the video sync stream.
  • the image processing capability of the canvas can be applied. Therefore, after the canvas is created, the video frame of the video stream is intercepted onto the created canvas to convert the video frame of the video stream into a canvas image. After being converted to a canvas image, each frame of video is converted into a canvas pixel matrix.
  • the above canvas image can be image processed, and a predetermined logo is recognized from the image processed image.
  • the canvas image may be subjected to gradation processing to convert it into a gray image, and then the gray image is binarized to obtain a binarized image.
  • the specific method of gradation processing and binarization processing can be performed in any manner that has been existing and may occur in the future.
  • when performing image processing it can be performed by calling an image processing script, such as cv.js in JavaScript.
  • FIG. A schematic diagram of a grayscale image and a binarized image obtained in a specific application example is shown in FIG. .
  • the position of the predetermined mark in the binarized image is determined when the predetermined mark is recognized from the binarized image based on the set predetermined mark.
  • the specific manner of identifying the predetermined identifier from the binarized image may be determined in conjunction with the type of the predetermined identifier set by the image recognition library.
  • the image recognition library script is Aruco.js, that is, the logo specified by Aruco.js, and the logo of Aruco.js stipulates that it must be a seven by seven, black border, and internal Five-by-five ID information, and a schematic diagram of the arrangement of the ID information of the predetermined identification specified by Aruco.js in a specific example is shown in FIG.
  • the binarized image determined by the above cv.js can be transmitted to Aruco.js, and the predetermined identifier is identified from Aruco.js.
  • the predetermined identifier is identified from Aruco.js.
  • FIG. A schematic image of the identified predetermined identification is shown in FIG. After Aruco.js recognizes the predetermined identifier, it can return the position coordinates of the identified predetermined identifier. Taking the predetermined identifier as a two-dimensional code as an example, the returned may be an array of coordinates of the four endpoints of the identifier.
  • the 3D drawing can be performed at the position of the identified predetermined identification to obtain the drawn 3D image.
  • the image modeling library can be used for 3D drawing, for example, three.js .
  • the drawn 3D image is displayed on the image captured by the imaging device, thereby forming a display screen of the augmented reality, and realizing the effect of augmented reality on the WEB end.
  • the development cost is low, the period is short, and the device for augmented reality when the specific augmented reality is embedded in the WEB page returned by the WEB server to the terminal, therefore, the device requiring augmented reality
  • the related page on the WEB server can be updated in real time, so that the end user can view the latest version in real time, thereby not only facilitating deployment, but also requiring no user installation, and also enabling the user terminal to always Access to the latest version, when you need to achieve different augmented reality effects, without a lot of modifications or re-writing the code, you can achieve different augmented reality effects by changing the image modeling library, and the maintenance process such as iterative update is easy.
  • the embodiment of the present application further provides a computer device, which can implement the foregoing method for implementing augmented reality.
  • the computer device in a specific embodiment may be the terminal 101.
  • the computer device in one embodiment includes:
  • a page request sending module 1201 configured to send a page access request to the WEB server, where the page access request includes a page identifier
  • the page response receiving module 1202 is configured to receive a page access response returned by the WEB server according to the page access request, where the page access response includes a WEB page corresponding to the page identifier, and the WEB page is embedded with an augmented reality s installation;
  • the device for augmented reality acquires a video stream of an image capturing device of a terminal, performs image processing on a video frame of the video stream, identifies a predetermined identifier from the image processed image, and performs 3D drawing on the identified predetermined identifier.
  • a drawn 3D image is obtained, and the drawn 3D image is displayed on a picture captured by the imaging device to form a display screen of augmented reality.
  • the operating system has nothing to do with it. Therefore, it only needs to develop a set of code for different terminal operating systems during development. The development cost is low, it is convenient and convenient to use, and can be applied to terminals of any operating system and can be used across platforms.
  • the terminal browser is a device that obtains augmented reality when requesting a page from the WEB server, it is only necessary to maintain the device of the augmented reality on the WEB server during maintenance, and only needs to be in the WEB server pair.
  • the augmented reality device is updated, and any subsequent terminal access is the latest implementation of augmented reality, which is convenient to maintain and low in cost.
  • the device 1200 of the augmented reality embedded in the WEB page received by the page response receiving module 1202 from the WEB server includes:
  • the video stream obtaining module 12001 is configured to acquire a video stream of the camera device of the terminal in the terminal; in a specific example, the video stream obtaining module 12001 can acquire the synchronized video stream of the camera device of the terminal in the real-time communication media stream interface;
  • the media stream interface of the real-time communication can be set in combination with actual technical application requirements.
  • the media stream interface of the real-time communication can be a MediaStream interface of the WebRTC;
  • the image processing module 12002 is configured to perform image processing on the video frame of the video stream to obtain an image processed image.
  • the image obtained after the image processing may be a binarized image
  • the image processing module 12002 When image processing is performed on the video frame, the gradation processing and the binarization processing may be sequentially performed to obtain a binarized image, for example, by sequentially calling the image processing script to perform grayscale processing and binarization processing on the video frame.
  • the binarized image; the image processing script herein can be set in combination with actual technical application requirements.
  • the image processing script can be cv.js;
  • An identifier identifying module 12003 configured to identify a predetermined identifier from the image processed by the image processing module 12002; in a specific example, the identifier identifying module 12003 may identify the selected image from the binarized image by using an image recognition library Defining a predetermined identifier, obtaining a coordinate range of the predetermined identifier, where the image recognition library may include an image recognition library script, where the image recognition library script may be set in combination with actual technical application requirements, and in a specific example, the image recognition Library scripts can identify image libraries such as aruco.js, Awe.js, etc.
  • a 3D drawing module 12004 configured to perform 3D drawing on the recognized predetermined identifier to obtain a drawn 3D image, and display the drawn 3D image in a picture captured by the imaging device to form a display screen of augmented reality;
  • the 3D drawing module displays the drawn 3D image in a picture captured by the imaging device according to the coordinate range of the predetermined identification to form a display screen of augmented reality;
  • a 3D drawing mode in a specific example, It can be drawn using three.js or the like.
  • the augmented reality device 1200 further includes a canvas image conversion module for converting each video frame of the video stream into a canvas image.
  • the image processing module 12002 performs image processing on the canvas image converted by the canvas image conversion module to obtain the binarized image.
  • FIG. 13 is a schematic structural diagram of a computer device in another embodiment, and the computer device in this embodiment may specifically be the WEB server 100 described above.
  • the computer device in this embodiment includes:
  • the page request receiving module 1301 is configured to receive a page access request sent by the terminal browser, where the page access request includes a page identifier;
  • a page obtaining module 1302 configured to acquire a WEB page corresponding to the page identifier, where the WEB page is embedded with an augmented reality device;
  • a page response sending module 1303, configured to return a page access response to the terminal browser, where the page access response includes the WEB page;
  • the augmented reality device After returning to the terminal browser, acquires a video stream of the image capturing device of the terminal, performs image processing on the video frame of the video stream, and identifies a predetermined identifier from the image processed image.
  • the 3D image is drawn on the recognized predetermined mark to obtain a drawn 3D image, and the drawn 3D image is displayed on the image captured by the imaging device to form a display screen of the augmented reality.
  • the solution of the embodiment described above implements the effect of the augmented reality by means of WEB.
  • the terminal browser obtains the augmented reality device from the WEB server based on the manner of accessing the webpage page, thereby implementing the augmented reality on the terminal. It has nothing to do with the operating system of the terminal. Therefore, it only needs to develop a set of code for different terminal operating systems during development. The development cost is low, not only convenient and convenient to use, but also applicable to any operating system terminal.
  • Cross-platform use because the terminal browser is a device that obtains augmented reality when requesting a page from the WEB server, it is only necessary to maintain the device of the augmented reality on the WEB server during maintenance.
  • the WEB server updates the augmented reality device, and any subsequent terminal access is the latest augmented reality implementation, which is convenient to maintain and low in cost.
  • the apparatus 1300 of the augmented reality embedded in the WEB page returned by the page response sending module 1303 of the WEB server to the terminal browser includes:
  • the video stream obtaining module 13001 is configured to acquire a video stream of the camera device of the terminal in the terminal; in a specific example, the video stream obtaining module 1301 may acquire the synchronized video stream of the camera device of the terminal in the real-time communication through the media stream interface;
  • the media stream interface of the real-time communication can be set in combination with actual technical application requirements.
  • the media stream interface of the real-time communication can be a MediaStream interface of the WebRTC;
  • the image processing module 13002 is configured to perform image processing on the video frame of the video stream to obtain an image processed image.
  • the image obtained after the image processing may be a binarized image
  • the image processing module 13002 When performing image processing on the video frame, the gradation processing and the binarization processing may be sequentially performed to obtain a binarized image, for example, by sequentially calling the image processing script to perform grayscale processing and binarization processing on the video frame.
  • the binarized image; the image processing script herein can be set in combination with actual technical application requirements.
  • the image processing script can be cv.js;
  • the identifier identifying module 13003 is configured to identify a predetermined identifier from the image processed by the image processing module 13002; in a specific example, the identifier identifying module 13003 may identify the predetermined item from the binarized image by using an image recognition library. Identifying, obtaining a coordinate range of the predetermined identifier, where the image recognition library may include an image recognition library script, where the image recognition library script may be set in combination with actual technical application requirements. In a specific example, the image recognition library script Can identify images for aruco.js, Awe.js, etc.;
  • a 3D drawing module 13004 configured to perform 3D drawing on the identified predetermined identifier to obtain a drawn 3D image, and display the drawn 3D image in a picture captured by the imaging device to form a display screen of the augmented reality;
  • the 3D drawing module displays the drawn 3D image in a picture captured by the imaging device according to the coordinate range of the predetermined identification to form a display screen of augmented reality;
  • a 3D drawing mode in a specific example, It can be drawn using three.js or the like.
  • the program can be stored in a non-volatile computer readable storage.
  • the program may be stored in a storage medium of the computer system and executed by at least one processor in the computer system to implement a flow including an embodiment of the methods as described above.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Graphics (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Processing Or Creating Images (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

一种实现增强现实的方法、计算机设备及存储介质,方法包括:终端(101)向WEB服务器(100)发送页面访问请求,所述页面访问请求包括页面标识(S501);终端(101)接收所述WEB服务器(100)根据所述页面访问请求返回的页面访问响应,所述页面访问响应包括与所述页面标识对应的WEB页面,所述WEB页面中嵌入有增强现实的装置(S502);由所述增强现实的装置获取所在终端(101)的摄像设备的视频流,对所述视频流的视频帧进行图像处理,从图像处理后的图像中识别出预定标识,在识别出的预定标识上进行3D绘图获得绘制的3D图像,并将绘制的3D图像显示在所述摄像设备拍摄到的画面中,形成增强现实的显示画面(S503)。所述方法开发成本低,可以应用于任何操作系统的终端,可以跨平台使用,且维护便利,维护成本低。

Description

实现增强现实的方法、计算机设备及存储介质
本申请要求于2017年01月17日提交中国专利局,申请号为2017100321256,发明名称为“实现增强现实的方法与装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及增强现实技术领域,特别是涉及一种实现增强现实的方法、一种计算机设备及一种计算机存储介质。
背景技术
旨在增强现实技术(Augmented Reality,简称AR)是在虚拟现实技术的基础上发展出来的一个新的技术方向,是利用虚拟物体对真实场景进行现实增强的技术,其基于摄像头等采集器件采集到的真实物理环境,根据标记或特征来确定输入图像在该真实物理环境的三维空间中的坐标位置,然后将3D(3 Dimensions)模型叠加到这个坐标系统,从而实现真实环境和虚拟环境的结合,实现对用户身处的现实物理环境的注释、说明,或者增强、强调现实环境的某些效果。AR给用户一种虚拟对象与现实环境两相融合的体验,能有效地帮助用户认知周围环境,增添周围环境的信息,实现用户与周围环境的交互。
目前的AR技术都是针对终端的客户端来实现,图1中示出了一个示例中的目前的AR技术实现的示意图,由图1可见,基于终端的操作系统的不同,会开发特定的实现AR技术的客户端,目前而言,通常分别为适用于IOS(苹果公司开发的移动操作系统)和适用于Android(一种基于Linux的自由及开放源代码的操作系统)的两个客户端。其实现原理,都是通过已有的图像识别库进行开发。然而,原生应用开发难度复杂,不仅不同的终端操作系 统需要不同的开发人员,每一个改动要基于操作系统的版本进行,开发周期长,人力、开发成本等资源耗费大,而且在客户端版本有更新时,必须由终端用户手动下载更新,而且历史版本也必须要维护,维护成本高。
发明内容
基于此,根据本申请的各实施例,提供一种实现增强现实的方法、一种计算机设备及一种计算机存储介质。
一种实现增强现实的方法,包括步骤:
终端向WEB服务器发送页面访问请求,所述页面访问请求包括页面标识;
终端接收所述WEB服务器根据所述页面访问请求返回的页面访问响应,所述页面访问响应包括与所述页面标识对应的WEB页面,所述WEB页面中嵌入有增强现实的装置;
由所述增强现实的装置获取所在终端的摄像设备的视频流,对所述视频流的视频帧进行图像处理,从图像处理后的图像中识别出预定标识,在识别出的预定标识上进行3D绘图获得绘制的3D图像,并将绘制的3D图像显示在所述摄像设备拍摄到的画面中,形成增强现实的显示画面。
一种实现增强现实的方法,包括步骤:
WEB服务器接收终端浏览器发送的页面访问请求,所述页面访问请求包括页面标识;
WEB服务器获取与所述页面标识对应的WEB页面,所述WEB页面中嵌入有增强现实的装置;
WEB服务器向所述终端浏览器返回页面访问响应,所述页面访问响应中包括所述WEB页面;
由所述终端浏览器基于接收的所述WEB页面中的增强现实的装置,获取所在终端的摄像设备的视频流,对所述视频流的视频帧进行图像处理,从图像处理后的图像中识别出预定标识,在识别出的预定标识上进行3D绘图 获得绘制的3D图像,并将绘制的3D图像显示在所述摄像设备拍摄到的画面中,形成增强现实的显示画面。
一种计算机设备,包括存储器和处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行以下步骤:
向WEB服务器发送页面访问请求,所述页面访问请求包括页面标识;
接收所述WEB服务器根据所述页面访问请求返回的页面访问响应,所述页面访问响应包括与所述页面标识对应的WEB页面,所述WEB页面中嵌入有增强现实的装置;
由所述增强现实的装置获取所在终端的摄像设备的视频流,对所述视频流的视频帧进行图像处理,从图像处理后的图像中识别出预定标识,在识别出的预定标识上进行3D绘图获得绘制的3D图像,并将绘制的3D图像显示在所述摄像设备拍摄到的画面中,形成增强现实的显示画面。
一种计算机设备,包括存储器和处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行以下步骤:
接收终端浏览器发送的页面访问请求,所述页面访问请求包括页面标识;
获取与所述页面标识对应的WEB页面,所述WEB页面中嵌入有增强现实的装置;
向所述终端浏览器返回页面访问响应,所述页面访问响应中包括所述WEB页面;
由所述终端浏览器基于接收的所述WEB页面中的增强现实的装置,获取所在终端的摄像设备的视频流,对所述视频流的视频帧进行图像处理,从图像处理后的图像中识别出预定标识,在识别出的预定标识上进行3D绘图获得绘制的3D图像,并将绘制的3D图像显示在所述摄像设备拍摄到的画面中,形成增强现实的显示画面。
一种计算机存储介质,所述计算机存储介质上存储有计算机程序,所述 计算机程序被处理器执行时,实现如上所述的实现增强现实的方法的步骤。
如上所述的实施例的方案,其通过WEB的方式实现增强现实的效果,实现时,是终端浏览器基于访问网页页面的方式从WEB服务器获得增强现实的装置,进而在终端上实现增强现实,其与终端的操作系统无关,因而在进行开发时针对不同的终端操作系统都只需要开发一套代码即可,开发成本低,使用时不仅方便便捷,而且可以应用于任何操作系统的终端,可以跨平台使用,另一方面,由于终端浏览器是从WEB服务器请求页面时获得增强现实的装置,在进行维护时可以只需在WEB服务器对其增强现实的装置进行维护即可,只需要在WEB服务器对增强现实的装置进行更新,后续任何终端访问时都是最新的增强现实的实现方式,维护便利且成本低。
附图说明
图1是一个示例中的目前的AR技术实现的示意图;
图2是一个实施例中本申请实施例方案的应用环境的示意图;
图3是一个实施例中的终端的组成结构示意图;
图4是一个实施例中的WEB服务器的组成结构示意图;
图5是一个实施例中的实现增强现实的方法的流程示意图;
图6是另一个实施例中的实现增强现实的方法的流程示意图;
图7是一个具体应用示例中的实现增强现实时的交互流程示意图;
图8是一个具体应用示例中的实现增强现实的技术原理示意图;
图9是一个具体应用示例中进行图像处理获得的灰度图像和二值化图像的示意图;
图10是一个具体应用示例中的预定标识的ID信息排列方式的示意图;
图11是图10所示的预定标识的图像示意图;
图12是一个实施例中的计算机设备的结构示意图;
图13是另一个实施例中的计算机设备的结构示意图。
具体实施方式
为使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步的详细说明。应当理解,此处所描述的具体实施方式仅仅用以解释本申请,并不限定本申请的保护范围。
图2示出了本申请一个实施例中的工作环境示意图,如图2所示,其工作环境涉及终端101以及WEB(环球网)服务器100,终端101与WEB服务器100之间可以通过网络进行通信,该网络可以是有线网络,也可以是无线网络。终端101可以向WEB服务器100请求WEB页面,WEB服务器100基于终端101的请求获取对应的WEB页面并返回给终端101进行显示。在本申请实施例中,WEB服务器100在获取了终端101请求的WEB页面后,在该WEB页面中嵌入增强现实的装置,然后返回给终端101,终端101在获得WEB服务器100返回的WEB页面并显示后,WEB页面中嵌入的增强现实的装置执行增强现实的处理,使得在WEB的终端就可以产生增强现实的效果。
终端101在一个实施例中的结构示意图如图3所示。该终端101包括通过系统总线连接的处理器、存储介质、通信接口、电源接口和内存。其中,终端101的存储介质存储有操作系统以及计算机可读指令,该计算机可读指令用于实现一种实现增强现实的方法。终端101的通信接口用于与WEB服务器100连接和通信,终端101的电源接口用于与外部电源连接,外部电源通过该电源接口向终端101供电。终端101可以是任何一种能够接入WEB网络的设备,例如移动终端、平板电脑、个人计算机等;也可以是其它具有上述结构的设备。
WEB服务器100在一个实施例中的结构示意图如图4所示。其包括通过系统总线连接的处理器、供电模块、存储介质、内存和通信接口。其中,WEB服务器的存储介质存储有操作系统、数据库和计算机可读指令,该计算机可读指令用于实现一种实现增强现实的方法。WEB服务器100的通信接口用于与终端101进行连接和通信。
图5示出了一个实施例中的实现增强现实的方法的流程示意图,该实施例中是以应用在终端101为例进行说明。
如图5所示,该实施例中的实现增强现实的方法包括:
步骤S501:向WEB服务器发送页面访问请求,所述页面访问请求包括页面标识;
步骤S502:接收所述WEB服务器根据所述页面访问请求返回的页面访问响应,所述页面访问响应包括与所述页面标识对应的WEB页面,所述WEB页面中嵌入有增强现实的装置;
步骤S503:由所述增强现实的装置获取所在终端的摄像设备的视频流,对所述视频流的视频帧进行图像处理,从图像处理后的图像中识别出预定标识,在识别出的预定标识上进行3D绘图获得绘制的3D图像,并将绘制的3D图像显示在所述摄像设备拍摄到的画面中,形成增强现实的显示画面。
相对应地,图6示出了另一个实施例中的实现增强现实的方法的流程示意图,该实施例是以WEB服务器的处理过程为例进行说明。
如图6所示,该实施例中的实现增强现实的方法包括:
步骤S601:接收终端浏览器发送的页面访问请求,所述页面访问请求包括页面标识;
步骤S602:获取与所述页面标识对应的WEB页面,所述WEB页面中嵌入有增强现实的装置;
步骤S603:向所述终端浏览器返回页面访问响应,所述页面访问响应中包括所述WEB页面;
步骤S604:由所述终端浏览器基于接收的所述WEB页面中的增强现实的装置,获取所在终端的摄像设备的视频流,对所述视频流的视频帧进行图像处理,从图像处理后的图像中识别出预定标识,在识别出的预定标识上进行3D绘图获得绘制的3D图像,并将绘制的3D图像显示在所述摄像设备拍摄到的画面中,形成增强现实的显示画面。
如上所述的实施例的方案,其通过WEB的方式实现增强现实的效果,实现时,是终端浏览器基于访问网页页面的方式从WEB服务器获得增强现实的装置,进而在终端上实现增强现实,其与终端的操作系统无关,因而在 进行开发时针对不同的终端操作系统都只需要开发一套代码即可,开发成本低,不仅使用时方便便捷,而且可以应用于任何操作系统的终端,可以跨平台使用,另一方面,由于终端浏览器是从WEB服务器请求页面时获得增强现实的装置,在进行维护时可以只需在WEB服务器对其增强现实的装置进行维护即可,只需要在WEB服务器对增强现实的装置进行更新,后续任何终端访问时都是最新的增强现实的实现方式,维护便利且成本低。
在一个具体示例中,上述增强现实的装置在获取所在终端的摄像设备的视频流之后,对所述视频流的视频帧进行图像处理之前,还可以将所述视频流的各视频帧转换为画布图像。从而在对视频流的视频帧进行图像处理时,可以是基于画布的图像处理能力,对转换到画布的画布图像进行图像处理。
在一个具体示例中,终端浏览器基于上述增强现实的装置,可以通过实时通信的媒体流接口获取所在终端的摄像设备的同步视频流。这里的实时通信的媒体流接口可以结合实际技术应用需要来设定,在一个具体示例中,该实时通信的媒体流接口可以为WebRTC的MediaStream接口。
在一个具体示例中,上述图像处理后的得到的图像可以为二值化图像。终端浏览器基于上述增强现实的装置,在对上述视频帧进行图像处理时,可以是依次进行灰度处理和二值化处理,例如,可以通过调用图像处理脚本对视频帧依次进行灰度化处理和二值化处理获得所述二值化图像。这里的图像处理脚本可以结合实际技术应用需要来设定,在一个具体示例中,该图像处理脚本可以为cv.js。
在一个具体示例中,终端浏览器基于上述增强现实的装置,可以通过图像识别库从所述二值化图像中识别出所述预定标识,获得所述预定标识的坐标范围,所述图像识别库包括图像识别库脚本。这里的图像识别库脚本可以结合实际技术应用需要来设定,在一个具体示例中,该图像识别库脚本可以为aruco.js、Awe.js。
在一个具体示例中,终端浏览器基于上述增强现实的装置,可以根据所述预定标识的坐标范围将绘制的3D图像显示在所述摄像设备拍摄到的画面 中,形成增强现实的显示画面。
为便于对本实施例方案的理解,图7示出了一个具体应用示例中的实现增强现实时的交互流程示意图。
如图7所示,在终端有访问网络的请求时,可以通过终端浏览器等向WEB服务器发送页面访问请求,该页面访问请求中包括有页面标识。
WEB服务器接收到该页面访问请求后,获取与上述页面标识对应的WEB页面,其中该WEB页面中嵌入有增强现实的装置,然后向终端浏览器返回页面访问响应,该页面访问响应中包括有上述WEB页面。可以理解,嵌入在WEB以页面中的该增强显示的装置,在技术实现上,具体可以是指可以实现上述增强现实的装置所实现的各功能的计算机可读指令代码。
终端浏览器接收到WEB服务器返回的页面访问响应后,由该增强现实的装置获取所在终端的摄像设备的视频流,对所述视频流的视频帧进行图像处理,从图像处理后的图像中识别出预定标识,在识别出的预定标识上进行3D绘图获得绘制的3D图像,并将绘制的3D图像显示在所述摄像设备拍摄到的画面中,形成增强现实的显示画面。
图8中示出了一个具体应用示例中的实现增强现实的技术原理示意图,如图8所示,上述嵌入在WEB页面中的增强现实的装置,可以运用实时通信的媒体流接口,例如能为浏览器提供实时通信的javascript接口WebRtc,通过用户设备的摄像头获得视频同步流。WebRtc里面的MediaStream这个API可以通过设备的摄像头获得视频的同步流。例如通过html5的video标签可以获得摄像头的同步画面。
在获得用户设备的视频同步流后,可对该视频同步流的视频帧进行图像处理,将其转化为二值化图像。在可能的情况下,可以直接对视频同步流的视频帧进行上述图像处理。为了提高处理效率,可以应用画布的图像处理能力,因此可以创建画布后,将视频流的视频帧截取到创建的画布上,以将视频流的视频帧转换为画布图像。在转化为画布图像后,每一帧视频帧就转换成了一个canvas像素矩阵。
随后,即可对上述画布图像进行图像处理,并从图像处理后的图像中识别出预定标识。
在进行图像处理时,在一个具体示例中,可以是对画布图像进行灰度处理将其转换为灰度图像后,再对该灰度图像进行二值化处理获得二值化图像。具体的灰度处理和二值化处理的方式可以采用目前已有以及以后可能出现的任何方式进行。一个具体应用示例中,在进行图像处理时,可以通过调用图像处理脚本,例如JavaScript中的cv.js进行,一个具体应用示例中得到的灰度图像和二值化图像的示意图如图9所示。
在得到二值化图像后,即可基于设定的预定标识,从二值化图像中识别出预定标识时,确定二值化图像中的预定标识的位置。具体的从二值化图像中识别出预定标识的方式,可以结合图像识别库设定好的预定标识的类型来确定。
在一个具体示例中,假设图像识别库脚本为Aruco.js,即采用的是Aruco.js规定的标识,而Aruco.js的标识规定了其必须是一个七乘七、有黑色边框的、内部是五乘五的ID信息,图10中示出了一个具体示例中的Aruco.js规定的预定标识的ID信息排列方式的示意图。
以采用Aruco.js规定的标识为预定标识为例,上述cv.js确定的二值化图像可传递给Aruco.js,由Aruco.js从中识别出上述预定标识,一个具体示例中从图10中识别出的预定标识的图像示意图如图11所示。Aruco.js从中识别出上述预定标识后,可以返回识别出的预定标识的位置坐标,以预定标识为二维码为例,其返回的可以是标识的四个端点的坐标的数组。
在识别出该预定标识后,即可在识别出的预定标识的位置进行3D绘图,获得绘制的3D图像,在进行3D绘图时,可以是使用图像建模的库进行3D绘图,例如three.js。然后将绘制的该3D图像显示在摄像设备拍摄到的画面中,从而形成增强现实的显示画面,实现WEB端的增强现实的效果。
如上所述的实施例中的方法,开发成本低,周期短,且由于具体增强现实时的增强现实的装置是嵌入在WEB服务器向终端返回的WEB页面中,因 此,在需要对增强现实的装置进行改变时,可以通过实时更新WEB服务器上的相关页面,就可以使得终端用户可以实时查看到最新的版本,从而不仅可以方便、快捷的部署,不需要用户安装,而且也能使得用户终端总能访问到最新的版本,在需要实现不同的增强现实的效果时,无需大量的修改或者重新编写代码,通过更改图像建模库即可实现不同的增强现实的效果,迭代更新等维护过程容易。
基于与上述方法相同的思想,本申请实施例还提供一种计算机设备,该计算机设备可实现上述实现增强现实的方法的运行,一个具体实施例中的该计算机设备可以是上述终端101。
如图12所示,一个实施例中的该计算机设备包括:
页面请求发送模块1201,用于向WEB服务器发送页面访问请求,所述页面访问请求包括页面标识;
页面响应接收模块1202,用于接收所述WEB服务器根据所述页面访问请求返回的页面访问响应,所述页面访问响应包括与所述页面标识对应的WEB页面,所述WEB页面中嵌入有增强现实的装置;
所述增强现实的装置获取所在终端的摄像设备的视频流,对所述视频流的视频帧进行图像处理,从图像处理后的图像中识别出预定标识,在识别出的预定标识上进行3D绘图获得绘制的3D图像,并将绘制的3D图像显示在所述摄像设备拍摄到的画面中,形成增强现实的显示画面。
如上所述的实施例的方案,其通过WEB的方式实现增强现实的效果,终端浏览器基于访问网页页面的方式从WEB服务器获得增强现实的装置,进而在终端上实现增强现实,其与终端的操作系统无关,因而在进行开发时针对不同的终端操作系统都只需要开发一套代码即可,开发成本低,不仅使用时方便便捷,而且可以应用于任何操作系统的终端,可以跨平台使用,另一方面,由于终端浏览器是在从WEB服务器请求页面时获得增强现实的装置,因此在进行维护时可以只需在WEB服务器对其增强现实的装置进行维护即可,只需要在WEB服务器对增强现实的装置进行更新,后续任何终端 访问时都是最新的增强现实的实现方式,维护便利且成本低。
如图12所示,在一个具体示例中,页面响应接收模块1202从WEB服务器接收的WEB页面中嵌入的增强现实的装置1200包括:
视频流获取模块12001,用于获取所在终端的摄像设备的视频流;在一个具体示例中,该视频流获取模块12001可以通过实时通信的媒体流接口获取所在终端的摄像设备的同步视频流;这里的实时通信的媒体流接口可以结合实际技术应用需要来设定,在一个具体示例中,该实时通信的媒体流接口可以为WebRTC的MediaStream接口;
图像处理模块12002,用于对所述视频流的视频帧进行图像处理获得图像处理后的图像;在一个具体示例中,上述图像处理后的得到的图像可以为二值化图像,图像处理模块12002在对上述视频帧进行图像处理时,可以是依次进行灰度处理和二值化处理得到二值化图像,例如,通过调用图像处理脚本对视频帧依次进行灰度化处理和二值化处理获得所述二值化图像;这里的图像处理脚本可以结合实际技术应用需要来设定,在一个具体示例中,该图像处理脚本可以为cv.js;
标识识别模块12003,用于从所述图像处理模块12002处理后的图像中识别出预定标识;在一个具体示例中,标识识别模块12003可以通过图像识别库从所述二值化图像中识别出所述预定标识,获得所述预定标识的坐标范围,这里的图像识别库可以包括图像识别库脚本,这里的图像识别库脚本可以结合实际技术应用需要来设定,在一个具体示例中,该图像识别库脚本可以为aruco.js、Awe.js等图像识别库;
3D绘图模块12004,用于在识别出的所述预定标识上进行3D绘图获得绘制的3D图像,并将绘制的3D图像显示在所述摄像设备拍摄到的画面中,形成增强现实的显示画面;在一个具体示例中,3D绘图模块根据所述预定标识的坐标范围将绘制的3D图像显示在所述摄像设备拍摄到的画面中,形成增强现实的显示画面;一个具体示例中的3D绘图方式,可以是采用three.js等进行绘制。
在一个具体示例中,上述增强现实的装置1200还包括画布图像转换模块:用于将所述视频流的各视频帧转换为画布图像。此时,上述图像处理模块12002,是对画布图像转换模块转换得到的画布图像进行图像处理获得所述二值化图像。
图13示出了另一个实施例中的计算机设备的结构示意图,该实施例中的计算机设备具体可以是上述WEB服务器100。
如图13所示,该实施例中的计算机设备包括:
页面请求接收模块1301,用于接收终端浏览器发送的页面访问请求,所述页面访问请求包括页面标识;
页面获取模块1302,用于获取与所述页面标识对应的WEB页面,所述WEB页面中嵌入有增强现实的装置;
页面响应发送模块1303,用于向所述终端浏览器返回页面访问响应,所述页面访问响应中包括所述WEB页面;
上述增强现实的装置在返回至所述终端浏览器后,获取所在终端的摄像设备的视频流,对所述视频流的视频帧进行图像处理,从图像处理后的图像中识别出预定标识,在识别出的预定标识上进行3D绘图获得绘制的3D图像,并将绘制的3D图像显示在所述摄像设备拍摄到的画面中,形成增强现实的显示画面。
如上所述的实施例的方案,其通过WEB的方式实现增强现实的效果,实现时,是终端浏览器基于访问网页页面的方式从WEB服务器获得增强现实的装置,进而在终端上实现增强现实,其与终端的操作系统无关,因而在进行开发时针对不同的终端操作系统都只需要开发一套代码即可,开发成本低,不仅使用时方便便捷,而且可以应用于任何操作系统的终端,可以跨平台使用,另一方面,由于终端浏览器是在从WEB服务器请求页面时获得增强现实的装置,在进行维护时可以只需在WEB服务器对其增强现实的装置进行维护即可,只需要在WEB服务器对增强现实的装置进行更新,后续任何终端访问时都是最新的增强现实的实现方式,维护便利且成本低。
如图13所示,在一个具体示例中,WEB服务器的页面响应发送模块1303向终端浏览器返回的WEB页面中嵌入的增强现实的装置1300包括:
视频流获取模块13001,用于获取所在终端的摄像设备的视频流;在一个具体示例中,该视频流获取模块13001可以通过实时通信的媒体流接口获取所在终端的摄像设备的同步视频流;这里的实时通信的媒体流接口可以结合实际技术应用需要来设定,在一个具体示例中,该实时通信的媒体流接口可以为WebRTC的MediaStream接口;
图像处理模块13002,用于对所述视频流的视频帧进行图像处理获得图像处理后的图像;在一个具体示例中,上述图像处理后的得到的图像可以为二值化图像,图像处理模块13002在对上述视频帧进行图像处理时,可以是依次进行灰度处理和二值化处理获得二值化图像,例如,通过调用图像处理脚本对视频帧依次进行灰度化处理和二值化处理获得所述二值化图像;这里的图像处理脚本可以结合实际技术应用需要来设定,在一个具体示例中,该图像处理脚本可以为cv.js;
标识识别模块13003,用于从图像处理模块13002处理后的图像中识别出预定标识;在一个具体示例中,标识识别模块13003可以通过图像识别库从所述二值化图像中识别出所述预定标识,获得所述预定标识的坐标范围,这里的图像识别库可以包括图像识别库脚本,这里的图像识别库脚本可以结合实际技术应用需要来设定,在一个具体示例中,该图像识别库脚本可以为aruco.js、Awe.js等图像识别库;
3D绘图模块13004,用于在识别出的所述预定标识上进行3D绘图获得绘制的3D图像,并将绘制的3D图像显示在所述摄像设备拍摄到的画面中,形成增强现实的显示画面;在一个具体示例中,3D绘图模块根据所述预定标识的坐标范围将绘制的3D图像显示在所述摄像设备拍摄到的画面中,形成增强现实的显示画面;一个具体示例中的3D绘图方式,可以是采用three.js等进行绘制。
本实施例的计算机设备中具体的技术应用实现方式,可以与上述实现增 强现实的方法类似的方式处理。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一非易失性的计算机可读取存储介质中,如本申请实施例中,该程序可存储于计算机系统的存储介质中,并被该计算机系统中的至少一个处理器执行,以实现包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (29)

  1. 一种实现增强现实的方法,其特征在于,包括步骤:
    终端向WEB服务器发送页面访问请求,所述页面访问请求包括页面标识;
    终端接收所述WEB服务器根据所述页面访问请求返回的页面访问响应,所述页面访问响应包括与所述页面标识对应的WEB页面,所述WEB页面中嵌入有增强现实的装置;
    由所述增强现实的装置获取所在终端的摄像设备的视频流,对所述视频流的视频帧进行图像处理,从图像处理后的图像中识别出预定标识,在识别出的预定标识上进行3D绘图获得绘制的3D图像,并将绘制的3D图像显示在所述摄像设备拍摄到的画面中,形成增强现实的显示画面。
  2. 根据权利要求1所述的实现增强现实的方法,其特征在于,所述图像处理后的图像为二值化图像。
  3. 根据权利要求2所述的实现增强现实的方法,其特征在于,所述增强现实的装置通过调用图像处理脚本对视频帧依次进行灰度化处理和二值化处理获得所述二值化图像。
  4. 根据权利要求2所述的实现增强现实的方法,其特征在于,所述增强现实的装置在获取所在终端的摄像设备的视频流之后,对所述视频流的视频帧进行图像处理获得二值化图像之前,还包括步骤:
    将所述视频流的各视频帧转换为画布图像。
  5. 根据权利要求2所述的实现增强现实的方法,其特征在于,所述增强现实的装置通过图像识别库从所述二值化图像中识别出所述预定标识,获得所述预定标识的坐标范围,所述图像识别库包括图像识别库脚本。
  6. 根据权利要求1至5任意一项所述的实现增强现实的方法,其特征在于:
    所述增强现实的装置通过实时通信的媒体流接口获取所在终端的摄像设备的视频流。
  7. 根据权利要求1至5任意一项所述的实现增强现实的方法,其特征在于,所述增强现实的装置根据所述预定标识的坐标范围将绘制的3D图像显示在所述摄像设备拍摄到的画面中,形成增强现实的显示画面。
  8. 一种实现增强现实的方法,其特征在于,包括步骤:
    WEB服务器接收终端浏览器发送的页面访问请求,所述页面访问请求包括页面标识;
    WEB服务器获取与所述页面标识对应的WEB页面,所述WEB页面中嵌入有增强现实的装置;
    WEB服务器向所述终端浏览器返回页面访问响应,所述页面访问响应中包括所述WEB页面;
    由所述终端浏览器基于接收的所述WEB页面中的增强现实的装置,获取所在终端的摄像设备的视频流,对所述视频流的视频帧进行图像处理,从图像处理后的图像中识别出预定标识,在识别出的预定标识上进行3D绘图获得绘制的3D图像,并将绘制的3D图像显示在所述摄像设备拍摄到的画面中,形成增强现实的显示画面。
  9. 根据权利要求8所述的实现增强现实的方法,其特征在于,所述图像处理后的图像为二值化图像。
  10. 根据权利要求9所述的实现增强现实的方法,其特征在于,所述终端浏览器基于所述增强现实的装置通过调用图像处理脚本对视频帧依次进行灰度化处理和二值化处理获得所述二值化图像。
  11. 根据权利要求9所述的实现增强现实的方法,其特征在于,所述终端浏览器基于所述增强现实的装置在获取所在终端的摄像设备的视频流之后,对所述视频流的视频帧进行图像处理获得二值化图像之前,还包括步骤:
    将所述视频流的各视频帧转换为画布图像。
  12. 根据权利要求7或8所述的实现增强现实的方法,其特征在于:
    所述终端浏览器基于所述增强现实的装置通过图像识别库从所述二值化图像中识别出所述预定标识,获得所述预定标识的坐标范围,所述图像识别 库包括图像识别库脚本。
  13. 根据权利要求8至12任意一项所述的实现增强现实的方法,其特征在于:
    所述终端浏览器基于所述增强现实的装置,通过实时通信的媒体流接口获取所在终端的摄像设备的视频流。
  14. 根据权利要求8至12任意一项所述的实现增强现实的方法,其特征在于:
    所述终端浏览器基于所述增强现实的装置根据所述预定标识的坐标范围将绘制的3D图像显示在所述摄像设备拍摄到的画面中,形成增强现实的显示画面。
  15. 一种计算机设备,包括存储器和处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行以下步骤:
    向WEB服务器发送页面访问请求,所述页面访问请求包括页面标识;
    接收所述WEB服务器根据所述页面访问请求返回的页面访问响应,所述页面访问响应包括与所述页面标识对应的WEB页面,所述WEB页面中嵌入有增强现实的装置;
    由所述增强现实的装置获取所在终端的摄像设备的视频流,对所述视频流的视频帧进行图像处理,从图像处理后的图像中识别出预定标识,在识别出的预定标识上进行3D绘图获得绘制的3D图像,并将绘制的3D图像显示在所述摄像设备拍摄到的画面中,形成增强现实的显示画面。
  16. 根据权利要求15所述的计算机设备,其特征在于,所述图像处理后的图像为二值化图像。
  17. 根据权利要求16所述的计算机设备,其特征在于,所述计算机可读指令还使得所述处理器执行以下步骤:
    所述增强现实的装置通过调用图像处理脚本对视频帧依次进行灰度化处理和二值化处理获得所述二值化图像。
  18. 根据权利要求16所述的计算机设备,其特征在于,所述计算机可读指令还使得所述处理器执行以下步骤:
    所述增强现实的装置在获取所在终端的摄像设备的视频流之后,对所述视频流的视频帧进行图像处理获得二值化图像之前,将所述视频流的各视频帧转换为画布图像。
  19. 根据权利要求16所述的计算机设备,其特征在于,所述计算机可读指令还使得所述处理器执行以下步骤:
    所述增强现实的装置通过图像识别库从所述二值化图像中识别出所述预定标识,获得所述预定标识的坐标范围,所述图像识别库包括图像识别库脚本。
  20. 根据权利要求15至19任意一项所述的计算机设备,其特征在于,所述计算机可读指令还使得所述处理器执行以下步骤:
    所述增强现实的装置通过实时通信的媒体流接口获取所在终端的摄像设备的视频流。
  21. 根据权利要求15至19任意一项所述的计算机设备,其特征在于,所述计算机可读指令还使得所述处理器执行以下步骤:
    所述增强现实的装置根据所述预定标识的坐标范围将绘制的3D图像显示在所述摄像设备拍摄到的画面中,形成增强现实的显示画面。
  22. 一种计算机设备,包括存储器和处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行以下步骤:
    接收终端浏览器发送的页面访问请求,所述页面访问请求包括页面标识;
    获取与所述页面标识对应的WEB页面,所述WEB页面中嵌入有增强现实的装置;
    向所述终端浏览器返回页面访问响应,所述页面访问响应中包括所述WEB页面;
    由所述终端浏览器基于接收的所述WEB页面中的增强现实的装置,获 取所在终端的摄像设备的视频流,对所述视频流的视频帧进行图像处理,从图像处理后的图像中识别出预定标识,在识别出的预定标识上进行3D绘图获得绘制的3D图像,并将绘制的3D图像显示在所述摄像设备拍摄到的画面中,形成增强现实的显示画面。
  23. 根据权利要求22所述的计算机设备,其特征在于,所述图像处理后的图像为二值化图像。
  24. 根据权利要求23所述的计算机设备,其特征在于,所述计算机可读指令还使得所述处理器执行以下步骤:
    所述终端浏览器基于所述增强现实的装置通过调用图像处理脚本对视频帧依次进行灰度化处理和二值化处理获得所述二值化图像。
  25. 根据权利要求23所述的计算机设备,其特征在于,所述计算机可读指令还使得所述处理器执行以下步骤:
    所述终端浏览器基于所述增强现实的装置在获取所在终端的摄像设备的视频流之后,对所述视频流的视频帧进行图像处理获得二值化图像之前,将所述视频流的各视频帧转换为画布图像。
  26. 根据权利要求23所述的计算机设备,其特征在于,所述计算机可读指令还使得所述处理器执行以下步骤:
    所述终端浏览器基于所述增强现实的装置通过图像识别库从所述二值化图像中识别出所述预定标识,获得所述预定标识的坐标范围,所述图像识别库包括图像识别库脚本。
  27. 根据权利要求22至26任意一项所述的计算机设备,其特征在于,所述计算机可读指令还使得所述处理器执行以下步骤:
    所述终端浏览器基于所述增强现实的装置,通过实时通信的媒体流接口获取所在终端的摄像设备的视频流。
  28. 根据权利要求22至26任意一项所述的计算机设备,其特征在于,所述计算机可读指令还使得所述处理器执行以下步骤:
    所述终端浏览器基于所述增强现实的装置根据所述预定标识的坐标范围 将绘制的3D图像显示在所述摄像设备拍摄到的画面中,形成增强现实的显示画面。
  29. 一种计算机存储介质,所述计算机存储介质上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时,实现权利要求1-14任意一项所述的实现增强现实的方法的步骤。
PCT/CN2018/071776 2017-01-17 2018-01-08 实现增强现实的方法、计算机设备及存储介质 WO2018133692A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710032125.6A CN106846495B (zh) 2017-01-17 2017-01-17 实现增强现实的方法与装置
CN201710032125.6 2017-01-17

Publications (1)

Publication Number Publication Date
WO2018133692A1 true WO2018133692A1 (zh) 2018-07-26

Family

ID=59123997

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/071776 WO2018133692A1 (zh) 2017-01-17 2018-01-08 实现增强现实的方法、计算机设备及存储介质

Country Status (2)

Country Link
CN (1) CN106846495B (zh)
WO (1) WO2018133692A1 (zh)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106846495B (zh) * 2017-01-17 2022-10-25 腾讯科技(深圳)有限公司 实现增强现实的方法与装置
CN109582122B (zh) * 2017-09-29 2022-05-03 阿里巴巴集团控股有限公司 增强现实信息提供方法、装置及电子设备
CN108364324B (zh) * 2018-01-22 2021-10-08 杭州橙云科技创新服务有限公司 图像数据处理方法、装置及电子终端
CN108388637A (zh) * 2018-02-26 2018-08-10 腾讯科技(深圳)有限公司 一种用于提供增强现实服务的方法、装置以及相关设备
CN108830153A (zh) * 2018-05-07 2018-11-16 平安普惠企业管理有限公司 用于人脸识别的身份验证方法、装置、设备及存储介质
CN111435069B (zh) * 2019-01-14 2022-07-08 顺丰科技有限公司 测量体积的方法和装置
CN112822557A (zh) * 2019-11-15 2021-05-18 中移物联网有限公司 信息处理方法、装置、电子设备及计算机可读存储介质
CN113055309A (zh) * 2019-12-28 2021-06-29 中移(成都)信息通信科技有限公司 资源加载方法、装置、设备及介质
CN111652637A (zh) * 2020-05-26 2020-09-11 北京掌中飞天科技股份有限公司 Ar广告营销活动跨平台解决方法及电子设备
CN111966942B (zh) * 2020-08-11 2024-06-07 济南科明数码技术股份有限公司 一种移动终端的vr展示方法、系统及设备
CN112433651B (zh) * 2020-11-13 2022-03-11 北京鸿腾智能科技有限公司 区域识别方法、设备、存储介质及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100008265A1 (en) * 2008-07-14 2010-01-14 Carl Johan Freer Augmented reality method and system using logo recognition, wireless application protocol browsing and voice over internet protocol technology
CN104361075A (zh) * 2014-11-12 2015-02-18 深圳市幻实科技有限公司 一种图像网址系统及实现方法
CN104571527A (zh) * 2015-01-26 2015-04-29 华东理工大学 一种基于增强现实技术的3d分子交互对接系统及实现方法
CN106161988A (zh) * 2015-03-26 2016-11-23 成都理想境界科技有限公司 一种增强现实视频生成方法
CN106846495A (zh) * 2017-01-17 2017-06-13 腾讯科技(深圳)有限公司 实现增强现实的方法与装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102523288A (zh) * 2011-12-16 2012-06-27 北京视博云科技有限公司 一种为终端设备提供网页服务的系统与方法
CN104134229A (zh) * 2014-08-08 2014-11-05 李成 实时交互的增强现实系统以及方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100008265A1 (en) * 2008-07-14 2010-01-14 Carl Johan Freer Augmented reality method and system using logo recognition, wireless application protocol browsing and voice over internet protocol technology
CN104361075A (zh) * 2014-11-12 2015-02-18 深圳市幻实科技有限公司 一种图像网址系统及实现方法
CN104571527A (zh) * 2015-01-26 2015-04-29 华东理工大学 一种基于增强现实技术的3d分子交互对接系统及实现方法
CN106161988A (zh) * 2015-03-26 2016-11-23 成都理想境界科技有限公司 一种增强现实视频生成方法
CN106846495A (zh) * 2017-01-17 2017-06-13 腾讯科技(深圳)有限公司 实现增强现实的方法与装置

Also Published As

Publication number Publication date
CN106846495B (zh) 2022-10-25
CN106846495A (zh) 2017-06-13

Similar Documents

Publication Publication Date Title
WO2018133692A1 (zh) 实现增强现实的方法、计算机设备及存储介质
US11270460B2 (en) Method and apparatus for determining pose of image capturing device, and storage medium
CN111295872B (zh) 获得场景中的对象的图像数据方法、系统以及可读介质
US10810430B2 (en) Augmented reality with markerless, context-aware object tracking
US9697581B2 (en) Image processing apparatus and image processing method
CN113015978B (zh) 处理图像以定位新颖对象
US20190073825A1 (en) Enhancing depth sensor-based 3d geometry reconstruction with photogrammetry
CN108430032B (zh) 一种实现vr/ar设备位置共享的方法及设备
CN113590878B (zh) 在视频画面上规划路径的方法、装置、终端设备
WO2020034981A1 (zh) 编码信息的生成方法和识别方法
JP7010952B2 (ja) 投影画像構築方法及び装置
CN115546377B (zh) 一种视频融合方法、装置、电子设备及存储介质
CN110111241B (zh) 用于生成动态图像的方法和装置
CN110598139A (zh) 基于5G云计算的Web浏览器增强现实实时定位的方法
WO2017013986A1 (ja) 情報処理装置、端末、および、遠隔通信システム
CN110263301B (zh) 用于确定文字的颜色的方法和装置
JP5864371B2 (ja) 静止画自動生成システム、静止画自動生成システムにおける作業者用情報処理端末及び指示者用情報処理端末、及び判定装置
CN116074485A (zh) 一种基于增强现实的通话方法及终端
US11189050B2 (en) Learning template representation libraries
CN112634460B (zh) 基于Haar-like特征的户外全景图生成方法及装置
CN113168706A (zh) 视频流的帧中的对象位置确定
KR102561903B1 (ko) 클라우드 서버를 이용한 ai 기반의 xr 콘텐츠 서비스 방법
CN107516339B (zh) 一种信息处理方法及信息处理装置
CN115239865A (zh) 模型构建方法、模型构建装置、介质及电子设备
CN117496029A (zh) 基于云端渲染技术的slam系统ar实时可视化方法和系统

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

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

Country of ref document: EP

Kind code of ref document: A1