Movatterモバイル変換


[0]ホーム

URL:


CN105808184A - Method and device for displaying Android 2D (Two-dimensional) application image, and headset equipment - Google Patents

Method and device for displaying Android 2D (Two-dimensional) application image, and headset equipment
Download PDF

Info

Publication number
CN105808184A
CN105808184ACN201610102773.XACN201610102773ACN105808184ACN 105808184 ACN105808184 ACN 105808184ACN 201610102773 ACN201610102773 ACN 201610102773ACN 105808184 ACN105808184 ACN 105808184A
Authority
CN
China
Prior art keywords
screen
android
application
image
width
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.)
Granted
Application number
CN201610102773.XA
Other languages
Chinese (zh)
Other versions
CN105808184B (en
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.)
Beijing Pico Technology Co Ltd
Original Assignee
Beijing Pico Technology 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 Beijing Pico Technology Co LtdfiledCriticalBeijing Pico Technology Co Ltd
Priority to CN201610102773.XApriorityCriticalpatent/CN105808184B/en
Publication of CN105808184ApublicationCriticalpatent/CN105808184A/en
Application grantedgrantedCritical
Publication of CN105808184BpublicationCriticalpatent/CN105808184B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The invention discloses a method and a device for displaying an image of an Android 2D (Two-dimensional) application, and headset equipment. The method comprises the following steps: revising the screen width of the image of the Android 2D application to be displayed into half of the own width of the screen of display equipment; obtaining the undistorted image, based on the revised screen width, of the Android 2D application to be displayed; calling a SurfaceFlinger module which is in charge of display synthesis in an Android system to independently establish a grid on the left side screen and the right side screen of display equipment; and using OpenGL (Open Graphics Library) to independently draw the texture of the undistorted image of the Android 2D application to be displayed onto the independent grids of the left side screen and the right side screen to be displayed. The technical scheme solves the problem of image distortion caused when the image of the Android 2D application is drawn into the display equipment with a plurality of screens, including VR (Virtual Reality) equipment or AR (Augmented Reality) equipment and the like, by the prior art. In addition, the method is low in cost, is simple, improves the display effect of the 2D application and is suitable for practicality.

Description

The display method of Android 2D application image, device and a kind of helmet
Technical field
The present invention relates to field of computer technology, particularly to the method, device and a kind of helmet that show that Android 2D applies without distortions.
Background technology
In recent years, VR (VirtualReality, virtual reality) technology and AR (AugmentedReality, augmented reality) technology development, consider the extensive use of Android system and increasing income property, more and more urgent based on the integral type VR equipment of Android platform and the demand of AR equipment.But being required for providing picture to the left eye of user and right eye at VR equipment and AR equipment, this makes existing major part Android application, and especially 2D application cannot be applied directly in VR system and AR system simultaneously.This results in when VR system and AR system there is no unified standard, and the content on relevant device lacks.If simply the screen of the display device of display Android 2D application being divided into left screen and right screen, and when the image of 2D application to be shown is plotted on left screen and right screen respectively, the problem that there will be again image fault.
Summary of the invention
In view of the above problems, it is proposed that the present invention in case provide a kind of overcome the problems referred to above or solve the problems referred to above at least in part show method, device and the one helmet that Android 2D applies without distortions.
According to one aspect of the present invention, it is provided that a kind of method showing Android 2D application image, including:
The screen width of this Android 2D application image to be shown is revised as the half of the width of screen of display device own;
Obtain the Android 2D application to be shown undistorted image based on amended screen width;
Call the SurfaceFlinger module being responsible for display synthesis in Android system, set up grid in the left screen of display device and right screen respectively;
Use OpenGL that the texture of the undistorted image of described Android 2D application to be shown is plotted on described left screen and the respective grid of right screen respectively and is displayed.
Alternatively, the half of the width of screen that the described screen width by this Android 2D application image to be shown is revised as display device own includes:
Calling the window management service WindowManagerService of Android system, the screen size of the DisplayContent apoplexy due to endogenous wind revising Display object corresponding to this 2D to be shown display device applied is screen height * (screen width/2).
Alternatively, the undistorted image of the Android application that described acquisition is to be shown includes:
Amended screen size is returned to Android 2D application to be shown by the window management service WindowManagerService calling Android system, and obtains the undistorted image that this Android 2D application obtains based on amended screen size self adaptation.
According to another aspect of the present invention, it is provided that a kind of device showing Android 2D application image, including:
Screen size amendment unit, for being revised as the half of the width of screen own by the screen width of this Android 2D application image to be shown;
Undistorted image acquiring unit, for obtaining the Android 2D application to be shown undistorted image based on amended screen width;
Grid sets up unit, for calling the SurfaceFlinger module being responsible for display synthesis in Android system, sets up grid in the left screen of display device and right screen respectively;
Draw display unit, for using OpenGL that the texture of the undistorted image of described Android 2D application to be shown is plotted on described left screen and the respective grid of right screen respectively and is displayed.
Alternatively, described screen size amendment unit, window management for calling Android system services WindowManagerService, and the screen size of the DisplayContent apoplexy due to endogenous wind revising Display object corresponding to this 2D to be shown display device applied is screen height * (screen width/2).
Alternatively, described undistorted image acquiring unit, window management for calling Android system services WindowManagerService and amended screen size returns to Android 2D application to be shown, and obtains the undistorted image that this Android 2D application obtains based on amended screen size self adaptation.
According to another aspect of the present invention, it is provided that a kind of helmet, it is characterised in that described helmet includes the device of the display Android 2D application image as described in above-mentioned any one.
From the above, technical scheme, the screen width of this Android 2D application image to be shown is revised as the half of the width of screen of display device own, then the Android 2D application to be shown undistorted image based on amended screen width is obtained further, afterwards again through calling the SurfaceFlinger module being responsible for display synthesis in Android system, grid is set up respectively in the left screen of display device and right screen, it is then used by OpenGL the texture of the undistorted image of described Android 2D application to be shown is plotted on described left screen and the respective grid of right screen respectively and is displayed.Due in prior art, when the image of Android 2D application to be shown is on the screen being plotted to display device, what generate is the image of corresponding whole screen size, and need during actual displayed to be respectively displayed on left screen and the right screen of screen, therefore it is accomplished by image is zoomed in and out, thus producing distortion;And the Android 2D being to be shown obtained in the technical program applies the image based on amended screen width, therefore it is made without convergent-divergent thus not producing distortion, solve the problem utilizing prior art to there will be image fault when the Android 2D image rendering applied to VR equipment or AR equipment etc. is had the display device of multiple screen, can so that user watches the picture of more high-quality, picture for Android 2D application, especially the display effect of word promotes clearly, and the virtual reality all-in-one applying this technical scheme can be applied by the compatible existing Android 2D of magnanimity, when using this kind of VR equipment or AR equipment, user can experience more rich content with more joyful mood, and the cost of this technical scheme is low, method is simple, be suitable to practicality.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention, and can be practiced according to the content of description, and in order to above and other objects of the present invention, feature and advantage can be become apparent, below especially exemplified by the specific embodiment of the present invention.
Accompanying drawing explanation
By reading hereafter detailed description of the preferred embodiment, various other advantage and benefit those of ordinary skill in the art be will be clear from understanding.Accompanying drawing is only for illustrating the purpose of preferred implementation, and is not considered as limitation of the present invention.And in whole accompanying drawing, it is denoted by the same reference numerals identical parts.In the accompanying drawings:
Fig. 1 illustrates the flow chart of a kind of according to an embodiment of the invention method showing Android 2D application image;
Fig. 2 illustrates the schematic diagram of a kind of according to an embodiment of the invention method showing Android 2D application image;
Fig. 3 illustrates the structural representation of a kind of according to an embodiment of the invention device showing Android 2D application image;
Fig. 4 illustrates the structural representation of a kind of according to an embodiment of the invention helmet.
Detailed description of the invention
It is more fully described the exemplary embodiment of the disclosure below with reference to accompanying drawings.Although accompanying drawing showing the exemplary embodiment of the disclosure, it being understood, however, that may be realized in various forms the disclosure and should do not limited by embodiments set forth here.On the contrary, it is provided that these embodiments are able to be best understood from the disclosure, and complete for the scope of the present disclosure can be conveyed to those skilled in the art.
Fig. 1 illustrates the flow chart of a kind of according to an embodiment of the invention method showing Android 2D application image, as it is shown in figure 1, the method includes:
Step S110, is revised as the half of the width of screen of display device own by the screen width of this Android 2D application image to be shown.
Step S120, obtains the Android 2D application to be shown undistorted image based on amended screen width.
Step S130, calls the SurfaceFlinger module being responsible for display synthesis in Android system, sets up grid in the left screen of display device and right screen respectively.
Step S140, uses OpenGL that the texture of the undistorted image of Android 2D application to be shown is plotted on left screen and the respective grid of right screen respectively and is displayed.
In Android system, by time on texture rendering to screen, it is necessary to whole screen is set up grid, for instance lower-left coordinate is (-1 ,-1), top-left coordinates is (1,1), and centre coordinate is (0,0).When the present embodiment being applied in VR system or AR system, it is necessary to utilizing screen respectively left eye and right eye to provide display, therefore screen into left screen and right screen, in left screen and right screen, the image of display should be independent.In being embodied as, can consider when carrying out the drafting of left screen, the centrage that datum line on the right side of screen grid moves to screen sets up new grid, thus the image of the left screen drawn out be distortionless, be suitable to the image of left screen, right screen can be drawn similarly.Specifically, it is possible to use OpenGL (OpenGraphicsLibrary, open graphic library) carries out the drafting of the texture of undistorted image.
Visible, method shown in Fig. 1, the screen width of this Android 2D application image to be shown is revised as the half of the width of screen of display device own, then the Android 2D application to be shown undistorted image based on amended screen width is obtained further, afterwards again through calling the SurfaceFlinger module being responsible for display synthesis in Android system, grid is set up respectively in the left screen of display device and right screen, it is then used by OpenGL the texture of the undistorted image of described Android 2D application to be shown is plotted on described left screen and the respective grid of right screen respectively and is displayed.This technical scheme solves the problem utilizing prior art to there will be image fault when the Android 2D image rendering applied to VR equipment or AR equipment etc. is had the display device of multiple screen, can so that user watches the picture of more high-quality, picture for Android 2D application, especially the display effect of word promotes clearly, and the virtual reality all-in-one applying this technical scheme can be applied by the compatible existing Android 2D of magnanimity, when using this kind of VR equipment or AR equipment, user can experience more rich content with more joyful mood, and the cost of this technical scheme is low, method is simple, be suitable to practicality.
In one embodiment of the invention, in method shown in Fig. 1, the half of the width of screen that the screen width of this Android 2D application image to be shown is revised as display device own includes: calling the window management service WindowManagerService of Android system, the screen size of the DisplayContent apoplexy due to endogenous wind revising Display object corresponding to this 2D to be shown display device applied is screen height * (screen width/2).
In Android system, it can be display device one independent Display object of distribution of each this system of application, window management service WindowManagerService can be then the newly-built DisplayContent class of this Display object, and this apoplexy due to endogenous wind just contains the information such as the window relevant with corresponding Display object.Such as, at this apoplexy due to endogenous wind, mInitialDisplayWidth, mInitialDisplayHeight, mInitialDisplayDensity correspondence saves the width of screen, height and density.So in the present embodiment, it is possible to the value of mInitialDisplayWidth is revised as 1/2nd of former display device screen width, for instance, former screen size is 800*480, then amended screen size is 400*480.
In one embodiment of the invention, in said method, the undistorted image obtaining Android application to be shown includes: amended screen size is returned to Android 2D application to be shown by the window management service WindowManagerService calling Android system, and obtains the undistorted image that this Android 2D application obtains based on amended screen size self adaptation.
If the application in Android system needs to display on the display device, generally requiring the screen size by obtaining display device, accordingly generate the image adapted with this screen size, this method is called the Android application self adaptation to screen.
In prior art, if 2D application needs to be applied directly in the scene of VR system and AR system.When the image of 2D application to be shown is plotted on left screen and right screen respectively, it is former screen size owing to being supplied to the screen size of 2D application, arise that the problem in following sight: such as, former screen size is 800*480, owing to this screen needs to be divided into left screen and right screen, respectively the left eye of user and right eye provide independent image, and therefore, practical application needs the screen size of display to be 400*480.And owing to 2D application is according to the screen size got, the image that self adaptation obtains is the screen adapting to 800*480 size, when being more completely shown on the screen of 400*480, it is necessary for image down, namely at least to narrow down to 400*240 (i.e. screen width and highly all become self adaptation is raw obtains 1/2nd of image).The problem that thus can produce image fault, and all leave black surround up and down at screen.And window management owing to calling Android system services WindowManagerService amended screen size returns to Android 2D application to be shown in the present embodiment, namely 2D application is the screen adapting to 400*480 size according to the image that amended screen size obtains, therefore 2D application can display in whole left screen and whole right screen, not only it is absent from image fault, and the utilization rate of screen is also higher.
Fig. 2 illustrates the schematic diagram of a kind of according to an embodiment of the invention method showing Android 2D application image.As shown in Figure 2, the 2D application of Android application layer interacts by servicing WindowManagerService with the window management of Android ccf layer, obtain the amended screen size of the DisplayContent apoplexy due to endogenous wind of Display object corresponding to this 2D to be shown display device applied, the image that will obtain according to this amended screen size self adaptation again, service WindowManagerService by window management, call SurfaceFlinger module further by the 2D image rendering applied to the left screen and right screen of display device.
Fig. 3 illustrates the structural representation of a kind of according to an embodiment of the invention device showing Android 2D application image, as it is shown on figure 3, show that the Android 2D device 300 applied includes without distortions:
Screen size amendment unit 310, for being revised as the half of the width of screen own by the screen width of this Android 2D application image to be shown.
Undistorted image acquiring unit 320, for obtaining the Android 2D application to be shown undistorted image based on amended screen width.
Grid sets up unit 330, for calling the SurfaceFlinger module being responsible for display synthesis in Android system, sets up grid in the left screen of display device and right screen respectively.
Draw display unit 340, for using OpenGL that the texture of the undistorted image of Android 2D application to be shown is plotted on left screen and the respective grid of right screen respectively and is displayed.
Visible, device shown in Fig. 3, the screen width of this Android 2D application image to be shown is revised as the half of the width of screen of display device own, then the Android 2D application to be shown undistorted image based on amended screen width is obtained further, afterwards again through calling the SurfaceFlinger module being responsible for display synthesis in Android system, grid is set up respectively in the left screen of display device and right screen, it is then used by OpenGL the texture of the undistorted image of described Android 2D application to be shown is plotted on described left screen and the respective grid of right screen respectively and is displayed.This technical scheme solves the problem utilizing prior art to there will be image fault when the Android 2D image rendering applied to VR equipment or AR equipment etc. is had the display device of multiple screen, can so that user watches the picture of more high-quality, picture for Android 2D application, especially the display effect of word promotes clearly, and the virtual reality all-in-one applying this technical scheme can be applied by the compatible existing Android 2D of magnanimity, when using this kind of VR equipment or AR equipment, user can experience more rich content with more joyful mood, and the cost of this technical scheme is low, method is simple, be suitable to practicality.
In one embodiment of the invention, in device shown in Fig. 3, screen size amendment unit 310, window management for calling Android system services WindowManagerService, and the screen size of the DisplayContent apoplexy due to endogenous wind revising Display object corresponding to this 2D to be shown display device applied is screen height * (screen width/2).
In one embodiment of the invention, in said apparatus, undistorted image acquiring unit 320, window management for calling Android system services WindowManagerService and amended screen size returns to Android 2D application to be shown, and obtains the undistorted image that this Android 2D application obtains based on amended screen size self adaptation.
It should be noted that the detailed description of the invention of above-mentioned each device embodiment is identical with the detailed description of the invention in aforementioned corresponding method embodiment, do not repeat them here.
Fig. 4 illustrates the structural representation of a kind of according to an embodiment of the invention helmet, and as shown in Figure 4, helmet 400 includes showing the Android 2D device 300 applied without distortions in above-mentioned any embodiment.This helmet can allow user experience the picture of more high-quality, joyful use mood in the virtual reality all-in-one of compatible 2D, greatly enriches content.
In sum, technical scheme, the screen width of this Android 2D application image to be shown is revised as the half of the width of screen of display device own, then the Android 2D application to be shown undistorted image based on amended screen width is obtained further, afterwards again through calling the SurfaceFlinger module being responsible for display synthesis in Android system, grid is set up respectively in the left screen of display device and right screen, it is then used by OpenGL the texture of the undistorted image of described Android 2D application to be shown is plotted on described left screen and the respective grid of right screen respectively and is displayed.This technical scheme solves the problem utilizing prior art to there will be image fault when the Android 2D image rendering applied to VR equipment or AR equipment etc. is had the display device of multiple screen, can so that user watches the picture of more high-quality, picture for Android 2D application, especially the display effect of word promotes clearly, and the virtual reality all-in-one applying this technical scheme can be applied by the compatible existing Android 2D of magnanimity, when using this kind of VR equipment or AR equipment, user can experience more rich content with more joyful mood, and the cost of this technical scheme is low, method is simple, be suitable to practicality.
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit protection scope of the present invention.All make within the spirit and principles in the present invention any amendment, equivalent replacement, improvement etc., be all contained in protection scope of the present invention.

Claims (7)

CN201610102773.XA2016-02-242016-02-24The method, apparatus of display Android 2D application image and a kind of helmetActiveCN105808184B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201610102773.XACN105808184B (en)2016-02-242016-02-24The method, apparatus of display Android 2D application image and a kind of helmet

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201610102773.XACN105808184B (en)2016-02-242016-02-24The method, apparatus of display Android 2D application image and a kind of helmet

Publications (2)

Publication NumberPublication Date
CN105808184Atrue CN105808184A (en)2016-07-27
CN105808184B CN105808184B (en)2019-01-08

Family

ID=56466489

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201610102773.XAActiveCN105808184B (en)2016-02-242016-02-24The method, apparatus of display Android 2D application image and a kind of helmet

Country Status (1)

CountryLink
CN (1)CN105808184B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106570927A (en)*2016-10-142017-04-19惠州Tcl移动通信有限公司Method of realizing virtual reality based on Android system, terminal and system
CN106851240A (en)*2016-12-262017-06-13网易(杭州)网络有限公司The method and device of image real time transfer
WO2018137304A1 (en)*2017-01-262018-08-02华为技术有限公司Method for displaying 2d application in vr device, and terminal
CN108694028A (en)*2017-03-152018-10-23成都虚拟世界科技有限公司A kind of double-screen display method based on android system and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1992874A (en)*2005-12-292007-07-04宏碁股份有限公司 Adjustable Image Scaling System and Method for Manipulating Image Aspect Ratio
CN102006433A (en)*2009-09-022011-04-06康佳集团股份有限公司Television with split-screen displaying function and split-screen displaying method
US20120235998A1 (en)*2011-03-182012-09-20Siemens CorporationThree-Dimensional Reconstruction for Irregular Ultrasound Sampling Grids
CN104581128A (en)*2014-12-292015-04-29青岛歌尔声学科技有限公司Head-mounted display device and method for displaying external image information therein
CN104702932A (en)*2013-12-042015-06-10布谷鸟知识产权有限责任公司Method for Resizing an Image

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1992874A (en)*2005-12-292007-07-04宏碁股份有限公司 Adjustable Image Scaling System and Method for Manipulating Image Aspect Ratio
CN102006433A (en)*2009-09-022011-04-06康佳集团股份有限公司Television with split-screen displaying function and split-screen displaying method
US20120235998A1 (en)*2011-03-182012-09-20Siemens CorporationThree-Dimensional Reconstruction for Irregular Ultrasound Sampling Grids
CN104702932A (en)*2013-12-042015-06-10布谷鸟知识产权有限责任公司Method for Resizing an Image
CN104581128A (en)*2014-12-292015-04-29青岛歌尔声学科技有限公司Head-mounted display device and method for displaying external image information therein

Cited By (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106570927A (en)*2016-10-142017-04-19惠州Tcl移动通信有限公司Method of realizing virtual reality based on Android system, terminal and system
CN106851240A (en)*2016-12-262017-06-13网易(杭州)网络有限公司The method and device of image real time transfer
WO2018137304A1 (en)*2017-01-262018-08-02华为技术有限公司Method for displaying 2d application in vr device, and terminal
US11294533B2 (en)2017-01-262022-04-05Huawei Technologies Co., Ltd.Method and terminal for displaying 2D application in VR device
CN108694028A (en)*2017-03-152018-10-23成都虚拟世界科技有限公司A kind of double-screen display method based on android system and electronic equipment
CN108694028B (en)*2017-03-152022-01-07成都理想智美科技有限公司Android system-based double-screen display method and electronic equipment

Also Published As

Publication numberPublication date
CN105808184B (en)2019-01-08

Similar Documents

PublicationPublication DateTitle
CN110555895B (en)Utilizing inter-frame coherence in a mid-ordering architecture
CN108391103A (en)VR video observings shadow zone domain classification method and device
CN105447898A (en)Method and device for displaying 2D application interface in virtual real device
CN108108140B (en)Multi-screen cooperative display method, storage device and equipment supporting 3D display
WO2015131787A1 (en)Screen adaptation method and apparatus
CN104469179A (en)Method for combining dynamic pictures into mobile phone video
US20130293547A1 (en)Graphics rendering technique for autostereoscopic three dimensional display
CN102186091B (en)Grating-based video pixel arrangement method for multi-view stereoscopic mobile phone
CN105808184A (en)Method and device for displaying Android 2D (Two-dimensional) application image, and headset equipment
CN105528207A (en)Virtual reality system, and method and apparatus for displaying Android application images therein
US20240257436A1 (en)Image rendering method and apparatus, electronic device, and storage medium
CN106095437A (en)The implementation method of the layout type of user interface RTL from right to left and device
HK1221320A1 (en)Method and apparatus for processing image in mobile terminal device
CN101908216B (en)Method and device for realizing vector fonts
CN105096365A (en)3D interface local refreshing method and system
CN112714357B (en)Video playing method, video playing device, electronic equipment and storage medium
CN115937389A (en)Shadow rendering method, device, storage medium and electronic equipment
JP2023508516A (en) Animation generation method, apparatus, electronic device and computer readable storage medium
CN105183288B (en)Single-window multi-task display method and intelligent mobile terminal thereof
CN111292245B (en) Image processing method and device
CN115601472B (en) A Method of Drawing Undistorted Black Border Based on Dilation and Corrosion Algorithm
CN102082918B (en)Caption machine for diversified caption rolling play
CN109803163A (en)Image presentation method and its device, storage medium
CN104735466B (en)The method and device of pictorial trademark in a kind of replacing video
CN115457200A (en)Method, device, equipment and storage medium for automatic true stereo display of 2.5-dimensional image

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp